profile picture

@code @crypto @robotics

#bitcoin #ethereum #haskell #zkp

Construction by composition

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.

My personal Hakyll cheatsheet

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.

Bootstrapping Haskell for Bitcoin development

It’s time to get our hands dirty. Let’s begin bootstrapping our Haskell development environment. Before we proceed it’s probably fair to note that it’s very early days for Bitcoin development using Haskell and like users of most languages one should expect the Bitcoin libraries to be changing rapidly.

Network programming in Haskell

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.