In mathematics, functions are composable because for a given input they are guaranteed to return the same output. By composing simple functions, complex behavior can be modeled in a way that is straight forward to reason about. In most programming languages however, functions do not compose well because they can perform arbitrary side-effects. Haskell takes a completely different approach by separating pure and impure functions in the type system.
For deep understanding it helps to get your hands dirty. Armed with the whitepaper, the yellow paper and the source code for the Go implementation we dive into the inner workings of Ethereum. In this Saturday long read, we cover among other things the state model, the peer-to-peer network, the EVM and the consensus algorithm. Lastly we discuss the Ethereum ice-age and why it exists. So prepare yourself a nice cup of coffee ☕️ and jump in!
A cheatsheet for my future self. We cover using the Hakyll eDSL to write website rules, advanced configuration which enables interesting features such as auto-generation of table of contents and \( \LaTeX \) math support on this website as well as discussion on how to roll your own Hakyll constructs.
At work we use Clojure as our primary implementation language. I wrote a blog post about the decision which got a lot of attention from the Hacker News community. While we are extremely happy with our decision we have started to deploy some Haskell code on some low memory VPS we deploy.
Some of the machines we deploy are 256M and 512M instances and with multiple instances of the JVM the machines start swapping to disk sooner or later. The other day we needed a simple way to forward all HTTP traffic received by our DNS servers to our website. It seemed like the perfect project to introduce Haskell since the code is independent of everything else and extremely simple; just output a HTTP 301 redirect response no matter what was received on the socket.
The resulting code is as close to a networking skeleton written in Haskell which I hope others will benefit from when starting a Haskell project involving network communication.