Published using Google Docs
notes: running a startup on haskell
Updated automatically every 5 minutes

Notes: Running a startup on haskell

this presentation was given at Strange Loop 2011 conference. here’s the video: http://www.infoq.com/presentations/Running-a-Startup-on-Haskell

Brial O’Sullivan is “CTO” of MailRank (“email productivity company”, 3 people) which was recently acquired by Facebook, for an undisclosed amount, in what appears to be a talent acquisition. O’Sullivan wrote Real World Haskell.

TL:DR (dustin opinion)

PG wrote (emphasis mine):

Most hackers I know have been disappointed by the ML family. Languages with static typing would be more suitable if programs were something you thought of in advance, and then merely translated into code. But that's not how programs get written.

The inability to have lists of mixed types is a particularly crippling restriction. It gets in the way of exploratory programming (it's convenient early on to represent everything as lists), and it means you can't have real macros.

http://www.paulgraham.com/lispfaq1.html

So, startups do lots of exploratory coding -- is a language like haskell going to slow them down? haskell forces you to have perfect code, and simply doesn’t let you use “quick hacks” -- it forces you to refactor and rethink your program.

Sometimes, you just want to hack in a quick fix, i speculate this happens all the time in a startup, because business concerns outweigh any long-term code maintenance concerns. sometimes you wanna say “man, if only i could sneak a database query in here in the guts of my security layer”, which in haskell could require rethinking your entire architecture so you don’t need type-checked access to IO-monad from a place 8 levels deep in the call stack, but in python you just do the one liner.

In my current experience writing Java enterprise apps on a strict schedule where we aren’t sure what the final solution is going to look like (exploratory coding), this happens all the time. maybe less so with haskell and a more expert team, but surprises happen.  

OSullivan didn’t directly address exploratory coding, but he did attribute the speed at which he produced code to both haskell and that he already had strong opinions about what the solutions should look like. I speculate O’Sullivan understood the architecture required by his problem domain well enough that he didn’t do any exploratory coding.

notes on the video

first 10 minutes: bio (nobody cares bud!). I’m browsing his github, they appear to have written a ridiculous amount of functionality in haskell for MailRank. lots of haskell wrappers for stuff -- they have written a lot of libraries from scratch that are “batteries included” in java and python. its interesting how much raw output they appear to have done.

his app has desktop client C#, cloud environment haskell

why haskell --

hiring:signal

hiring:noise -- just don’t be dumb. its a signal.

haskell -- daily rhythms

differences from other environments

architecture

datastore

ditched riak for MySQL.

network IO performance in GHC

json

other things he wrote

other tooling

Testing

how did it work out?

how about C# (their desktop client)? and how is that different than haskell?

C# types compared to haskell

concurrency in C#

shoudl you be using haskell -- it depends. here’s the criteria

haskell --

Q: why did they need C#? because integrating with existing dotnet app.

Q: why not F#? because its less established than C#, dotnet is new to him as a unix guy, he wanted to limit his risk. much more info on getting things working in C# than F#.

Q: reference materials -- his book, also Learn You A Haskell, also Programming in Haskell (more of an intro to programming)

Q: quickcheck -- does it rely on the type system? -- not necessarily -- its ported to erlang, which has no type system, and still useful.

Q: using anything from Cloud Haskell paper? -- “inter process communication facilities -- language transparent cross address space messaging” -- not useful to this problem, not even sure if its a good idea.