For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
gnome-cups-manager | |
------------------ | |
Once upon a time there was a printer who lived in the woods. He was a | |
lonely printer, because nobody knew how to configure him. He hoped | |
and hoped for someone to play with. | |
One day, the wind passed by the printer's cottage. "Whoosh," said the | |
wind. The printer became excited. Maybe the wind would be his | |
friend! |
// =================== | |
// Monadic parsing in F# | |
// by Murat Girgin | |
// Translated from "Monadic parsing in Haskell" paper by Graham Hutton & Erik Meijer | |
// Source: http://www.cs.nott.ac.uk/~gmh/pearl.pdf | |
// =================== | |
#nowarn "40" | |
// --------------------------------------------------------------------------------- |
This is a d3 map using topojson files derived from shapefiles from the datameet/maps repo.
Many thanks to authors of these awesome code samples.
public static TypeReference ResolveGenericParameter(this TypeReference type, TypeReference parent) | |
{ | |
var genericParent = parent as GenericInstanceType; | |
if (genericParent == null) | |
return type; | |
if (type.IsGenericParameter) | |
return genericParent.GenericArguments[(type as GenericParameter).Position]; | |
if (type.IsArray) |
Full source: https://gist.github.com/mrange/aa9e0898492b6d384dd839bc4a2f96a1
Option<_>
is great for ROP (Railway Oriented Programming) but we get no info on what went wrong (the failure value is None
which carries no info).
With the introduction F# 4.1 we got Result<_, _>
a "smarter" Option<_>
as it allows us to pass a failure value.
However, when one inspects the signature of Result.bind
one sees a potential issue for ROP:
There doesn't seem to be a good resource online describing the issues with protocol buffers and deterministic serialization (or lack thereof). This is a collection of links on the subject.
Protocol Buffers v3.0.0. release notes:
The deterministic serialization is, however, NOT canonical across languages; it is also unstable across different builds with schema changes due to unknown fields.
Wire format ordering and map iteration ordering of map values is undefined, so you cannot rely on your map items being in a particular order.
(* | |
Simulation of the Lorentz attractor, using Fable. | |
If you want to see this code in action, just copy this code into the Fable REPL: | |
https://fable.io/repl/ | |
*) | |
module App | |
open Elmish | |
open Elmish.React |
Some of the books I'll be recommending are based on .NET. Do not be discouraged. We shouldn't strive to stick to a specific technology stack. Your ambitions and goals will evolve over time and that might lead you a completely new space. Moreover, there are lessons to be learned from an environment that's different from what you're used to.
"C# in depth" by Jon Skeet (Book)
"F# for C# developers" by Tao Liu (Book)
F# to C# interop tips by Scott Wlaschin (Gist)