I hereby claim:
- I am sgoguen on github.
- I am sgoguen (https://keybase.io/sgoguen) on keybase.
- I have a public key ASB7lHbtpeTVKV_POAjX-YXpSjuk3i7VMIMeAKJ0cFCrOgo
To claim this, I am signing this object:
| // 1. Create a project and add Steego.FsPad as a Nuget dependency | |
| // 2. Build your project and set this folder to your output | |
| #I "bin/Debug/net461/" | |
| #r "FSharp.Core.dll" | |
| #r "Suave.dll" | |
| #r "Steego.FsPad.dll" | |
| module Watcher = |
| module TreeMaps | |
| type Map<'k,'v> = | |
| | Map of ('v -> 'k -> 'v) | |
| [<Struct>] | |
| type ShallowMap<'k,'v,'c> = | |
| | ShallowMap of value:'v * lookup:('k -> 'v -> 'c) |
| open Microsoft.FSharp.Reflection | |
| let rec listTypes(t:Type) = | |
| [ | |
| if FSharpType.IsFunction(t) then | |
| let(a,b) = FSharpType.GetFunctionElements(t) | |
| yield a | |
| if FSharpType.IsFunction(b) then | |
| yield! listTypes(b) | |
| else |
I hereby claim:
To claim this, I am signing this object:
| void Main() { | |
| Util.CurrentQueryPath.Dump(); | |
| string url = "http://localhost:8080"; | |
| using (WebApp.Start(url, Configuration)) { | |
| //Task.Run(DoTask); | |
| Console.ReadLine(); | |
| } |
| // In this example, we're using FsCheck in an unorthodox way. | |
| // Typically you tell FsCheck to look for something that violates | |
| // your rule. Here, we're reappropriating FsCheck's fuzz testing | |
| // capabilities to enumerate everything that has been deemed | |
| // "valid" to see if it's actually valid to help us figure out the rules. | |
| type Money = decimal | |
| type CouponType = FreeMail | FreeSide | |
| type PaymentOption = |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Object Watcher</title> | |
| </head> | |
| <body> | |
| <div id="output"></div> | |
| <!--Script references. --> | |
| <!--Reference the jQuery library. --> | |
| <script src="Scripts/jquery-2.0.3.min.js"></script> |
I've been working on a talk about the virtues of building toy examples for the purpose of communicating ideas with simple interactive examples.
The toys I talk about in my presentation are based my interest in tools that allow programmers to quickly build web applications that allow them to explore their architecture. So to kickstart this series off, I want to introduce a simple
| @import url( https://fonts.googleapis.com/css?family=Raleway:200,600 ); | |
| html, body { height: 100%; } | |
| .wrapper { | |
| position: absolute; | |
| width: 727px !important; | |
| left:-233px !important; | |
| top: 0; | |
| right: 0; |
I don't care for the MVC pattern most of us use for building web applications. What I like about frameworks like ASP.MVC is how is automatically maps URLs to an idiomatic C# method.
public class PersonController : Controller {
public ActionResult Get(int id) {
return View(new { Id = id, Name = "Bob" });
}