Nick Mudge Ignition Software Consulting & Development

There's going to be a functional programming meeting in San Francisco on September 13. I want to go.

Don Stewart, John Goerzen and Bryan O'Sullivan are writing a book "Real-World Haskell". Here's the website for it.

An interesting thing about Haskell for me is that it hasn't been very clear to me why I'm so interested in it. This is revealing from a post by Bryan O'Sullivan:

We puzzled with Simon over the mystery of this recent buzz around functional programming languages. The best stab I could make at a guess was that languages like Python and Ruby have introduced a generation of programmers to the idea that their code can be expressive and concise. News is percolating out that Haskell offers comparable or better facilities for abstraction and brevity, but with the additional benefits of safety, native code performance, and multicore scalability.

The quote comes from a post Bryan O'Sullivan wrote about Simon Peyton Jones' Haskell sessions at OSCON: A brief Haskell-at-OSCON trip report

John Goerzen also wrote an interesting post about Simon's talk at OSCON.

Updated on 22 April 2014

Ignition Related

Inductive Automation Forum

News Websites

Hacker News

Guido van Rossum, the creator of the Python programming language, recently blogged about a python that ate a sheep and then got stuck in an electrical fence. Good pictures.

All functions in Haskell take only one argument. So how do you define functions that take multiple arguments? You don't.

Instead Haskell has currying.

As addition usually takes two arguments (two numbers to add) let's use it as a problem to solve with currying.

A way to think of currying is instead of using one function that takes multiple arguments, use multiple functions that each solve a single argument. Since our version of addition takes two arguments, we are going to have two functions, each taking a single argument.

Here is the currying addition function:

add x = \y -> x + y

There are some interesting things going on here in this code. The whole line, "add x = \y -> x + y", is one function definition called add, but there is another function defined in this line but it doesn't have a name. This part, "\y -> x + y", is a function definition. It could be called a function without a name or an anonymous function or a lambda function. It says that there is one argument (y) and it returns the value from x + y. y is the value from the argument, and the value x comes from outside the function definition, from the x argument for add. Functions that have values defined outside their definition are called closures, so the anonymous function here is a closure.

So what does this line of code do? Let's run it!

add 5 6

Okay, so the first argument is 5. Let's go through this execution in slow motion. Let's put 5 everywhere x is in the function definition:

add 5 = \y -> 5 + y

Okay, since there is nothing left to do here since nothing references what y is so we can't evaluate anything more, we return the value of the function add. The only thing here is the function definition "\y -> 5 + y" so we return that function as the return value of the function add. Let's replace the add function with its return value:

add 5 6
-- we return add 5 and we get:
(\y -> 5 + y) 6

Here we get the anoymous function with the value 6 being passed into it:

(\y -> 5 + y) 6
-- results in:
(\6 -> 5 + 6)
-- which results in:
(5 + 6)

The answer is 11!

Anna: The Day My Mother Butchered A McDonald’s Product

My favorite minivids: Marriage Proposal and The MATRIX!

Y Combinator is changing into Hacker News. It is going to focus on things of interest to hackers, and they are going to use a system and human editors to keep it good. Before the news site just focused on startup news.

This is great. Here's Paul Graham's announcement.

For awhile last week the book Lisp in Small Pieces was the best selling book on the Canada website, out selling Harry Potter. Currently Lisp in Small Pieces is number 3. The book usually sells at $50—$94.40, but last week on the Canada website, Amazon was selling it for $3.95 according to various posts on the web, like this one.

Tonight I asked people from IRC #haskell if haskell was good for writing compilers and interpreters, as I had gotten that idea. They told me this was very much true.

Here's some items on the web about compilers and interpreters written in Haskell:

I've been coming across a lot of interesting programming items on the web recently. Here are some of them:

Doug Bromley writes about Firebug, YSlow, and MySQL resources.

Babar K. Zafar has a really interesting list of Classic Texts in Computer Science.

Peter Norvig has a good article Teach Yourself Programming in Ten Years.

I noticed that Peter Norvig and Paul Graham both gave the textbook Structure and Interpretation of Computer Programs really good reviews on

Simon Peyton Jones recently did a couple videos about Haskell. Here's a post about it.

I started reading this tutorial Yet Another Haskell Tutorial, by Hal Daumé III, which is really good so far.

I reread Steve Yegge's post Math For Programmers.

More in my account.

Lisp comic


I spent most of tonight reading Slava Akhmechet's article Functional Programming For The Rest of Us. He's written some great articles on functional programming. I'm looking forward to spending most of tomorrow night reading more.