Mutable closures in Haskell and nested IO

Posted: 2014-03-25

In my last post, I described IO (IO ()) as being a sign you might've made a mistake unless you knew it was what you wanted. There are patterns which involve using a closed-over mutable reference for things like counters. This naturally leads to nested IO actions.

Monads, lifting, join, and side-effecting actions.

Posted: 2014-03-24

While playing around with querying ElasticSearch I bumped into something that I hadn't really understood explicitly before about monads, nesting, and IO. Rather than blather on, I'm going to share a "literate" ghci session that demonstrates the point. Main editing change I made was to remove duplication in the output from querying the type :t in ghci.

Using shebang and lein-exec to write Clojure scripts that can use dependencies

Posted: 2013-02-18

A brief demonstration of how to run Clojure programs like scripts with leiningen.

Using drip for Clojure scripts (non-Leiningen)

Posted: 2013-02-17

Using drip to run Clojure code like a script.

February Book Log

Posted: 2013-02-14

It's Valentine's Day 2013 and since January 2013 I've read the following books.

OS X fsevent fatal error 'stdio.h' file not found

Posted: 2012-07-01

Getting the following error on Mac OS X? Read on.

Fixing arrow keys in iTerm and for Mac OS X

Posted: 2012-06-01

I am a user of irssi over GNU Screen + ssh as well as locally, and I tend to use Emacs style text movements in bash, so need my ctrl and alt/option keys to work more or less as they do in Linux.

Node.js, Requests, Connections, ending, and closing

Posted: 2012-05-01

You close connections, you end requests.

Fixing syntax highlighting in Jekyll

Posted: 2012-04-02

When I was getting the Jekyll version of my site rolling, I ran into some problems with how RedCloth, liquid, and pygments were interacting. What follows is the error that was caused.

How to resolve 'Could not find module XMonad.Actions.Volume'

Posted: 2012-03-01

You need to install xmonad-extras from Hackage as the volume control functions are not included by default in any standard XMonad install. Below is the script for getting it installed.