The other day I was trying to think how I could group together discriminated
union values in a way to let me later determine if values were
mutually-exclusive. For a simple discriminated union, I came up with a pretty
simple solution: store a Map<SomeUnion, SomeUnion list>
. Each key in …
GPG Key?
I recently bought a Yubikey 4 with the intent of playing around with it, setting up SSH to let me use it for authentication, and maybe even using it to sign some things in git. I forgot the part where that meant using gpg again...
Thus begins today's story...
Basically …
.NET and F#: Where functions are functions, except when they're not
Functions in .NET and F# in particular have some oddities that I've run into and can be a bit annoying at times. At least partially for my own benefit, I'm documenting my finds here while I remember them.
So in F#, if you want to define a function that adds …
Union Values in WPF
This morning I convered an enumeration from some VB code into a union in F#. This enum had been created so that I could create a generic "tab" view and view-model in WPF, and could easily tell each instance what tab it was to be. Unfortunately, I began receiving an …
Custom attributes on F#'s Discriminated Union cases
Working on a project, I found myself wanting to match different discriminated union cases with text for output. Normally I write this out as a discriminated union with a separate function that uses pattern matches to determine which value to return, but I'd really like to attach the text directly …
F# and WPF
In certain projects, it may be deemed appropriate to utilize both F# and WPF. Visual Studio has a large number of issues that make this difficult, not the least of which is that it simply doesn't support creating a WPF project with F# out-of-the-box. What follows is a guide based …
New Initial Commit in Git
If you're trying to use git's rebase command on your repo's first commit, you may not feel there are many options. What I found you could do is to create an empty commit in a new blank branch, and then rebase everything else off of that commit, essentially creating a …