I am delighted and horrified to announce a new graphical programming language called Turnstyle . You can see an example below (click to run). In the time leading up to ZuriHac 2024 earlier this year, I had been thinking about Piet a little. We ended up working on something else during the Hackathon, but this was still in the back of my mind. Some parts of Piets design are utter genius (using areas…
Prelude This blogpost is written in reproducible Literate Haskell , so we need some imports first. Show me the exact imports… {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} module Main where import qualified Codec.Picture as JP import qualified Codec.Picture.Types as JP import Control.Monad.ST (runST) import Data.Bool (bool) import Data.Foldable…
At ZuriHac 2023 , I worked on some Haskell Puzzles together with Alex , Francesco , Jussi and Patrick . You are given some Haskell tokens and a goal term, and you need to rearrange the tokens into an expression that produces the goal . Here a simple warmup exercise just to get an idea of how it works: Let’s continue with iterate but do a real puzzle next. What Monad are we looking for? How is e…
Now that we’re in a global pandemic, I’ve been doing significantly more hiking in Switzerland. Around a month ago we climbed the Pilatus mountain near Lucerne. Unfortunately, there was a thick layer of clouds so we didn’t get the amazing panoramic views from the top. On the flip side, this really works well with black-and-white photography: the clouds add a lot of drama and character. This is a…
Not to be taken seriously. Haskell is great building at DSLs – which are perhaps the ultimate form of slacking off at work. Rather than actually doing the work your manager tells you to, you can build DSLs to delegate this back to your manager so you can focus on finally writing up that GHC proposal for MultilinePostfixTypeOperators (which could have come in useful for this blogpost). So, we’ll…
TL;DR: You can use ReadyMedia without configuring it as a daemon. Just cd into any directory that has media files, and run this script: #!/bin/bash set -o nounset -o errexit -o pipefail # Create temporary locations for the configuration and data directories. CONFIG = " $( mktemp ) " DATADIR = " $( mktemp -d ) " # Write the configuration to the temporary location. echo "media_dir= $PWD " >> "…
Summary At some point during ICFP2019 in Berlin, I came across a completely unrelated old paper by S. Lovejoy and B. B. Mandelbrot called “Fractal properties of rain, and a fractal model” . While the model in the paper is primarily meant to model rain fall ; the authors explain that it can also be used for rain clouds , since these two phenomena are naturally similarly-shaped. This means it can be…
I have been writing Haskell for a reasonable time now – I believe I am coming up on ten years – so sadly the frequency with which I discover delightful things about the language has decreased. However, I was talking with HVR about the Handle pattern, and the topic of argument order came up. This lead me to a neat use case for flip that I hadn’t seen before. This blogpost should be approachable for…
Introduction I am one of the organizers of ZuriHac , and last year, we hand-rolled our own registration system for the event in Haskell. This blogpost explains why we decided to go this route, and we dip our toes into its design and implementation just a little bit. I hope that the second part is especially useful to less experienced Haskellers, since it is a nice example of a small but useful…