Nice Dice in Haskell
Carrying on my theme of (board/card) game design, I recently wanted to play around with probabilities and dice. I wanted to find out the frequencies of the outcomes for various combinations of dice,...
View ArticleSharp Cards in Haskell: Drawing Cards
Following on from my previous post on dice, in this post I’ll look at the support for cards that I am going to add to the next release of my game-probability library. So, cards: to work out the...
View ArticleSharp Cards in Haskell: The Odds
Recap In a previous post I introduced a way to specify the action of drawing cards, culminating in the DrawM type: data DrawM card a = DrawFail | Done a | DrawOne (card -> DrawM card a) | DrawAny...
View ArticleInterleaving
I spent some time late last year working further on what I originally called behaviours. It grew much longer than a blog post, so it’s ended up in the Monad.Reader electronic magazine, in the...
View ArticleProgramming Language Fiction
The latest issue of The Monad Reader (an electronic magazine vaguely themed around Haskell) was released this week — but rather than featuring technical articles, it’s a special “poetry and fiction”...
View ArticleCommunicating Haskell Processes: The Long And The Short Of It
The Long It’s been a long time coming, but I have completed the final corrected version of my PhD thesis. It’s entitled, rather unimaginatively (and against received wisdom), “Communicating Haskell...
View ArticleParallel Composition in Haskell
CHP, my Haskell concurrency library, allows you to run processes in parallel. One way of doing so is this binary operator: (<||>) :: CHP a -> CHP b -> CHP (a, b) Informally, the behaviour...
View ArticleTesting a Haskell Library
I’m currently gearing up for a CHP-3.0.0 release. Version 3 will be (internally) simpler in some places, faster in others, and has a slightly simplified API. The content of the library is mostly there...
View ArticleTesting a Side-Effecting Haskell Monad
In this post I’m going to continue discussing testing CHP, this time focusing on the CHP monad. The monad is a bit complex (and indeed, there is a subtle bug in the current version of CHP to do with...
View ArticlePieces of Yesod: Inverting a Haskell Function
I’ve recently been working with web frameworks, and decided to have a play with what Haskell has to offer for web resources. One of the several frameworks available is Yesod. Web frameworks need some...
View Article