Haskell vs. Erlang, Reloaded

The goal of my project was to be able to thoroughly test a poker server using poker bots. Each poker bot was to to excercise different parts of the server by talking the poker protocol consisting of 150+ binary messages. The poker server itself is written in C++ and runs on Windows....

This app is all about binary IO, thousands of threads/processes and easy serialization. All I ever wanted to do was send packets back and forth, analyze them and have thousands of poker bots running on my machine doing same. Lofty but simple goal :-). Little did I know!

Erlang and Haskell compared... Want to know the conclusion?

I was able to finish the Erlang version 10 times faster and with 1/2 the code. Even if I cut the 10-11 weeks spent on the Haskell version in half to account for the learning curve, I would still come out way ahead with Erlang.

I am sure you'll find a lot to disagree with in this article...

Haskell is not not ML

Haskell is not not ML. Ben Rudiak-Gould, Alan Mycroft, and Simon Peyton Jones. European Symposium on Programming 2006 (ESOP'06).

We present a typed calculus IL ("intermediate language") which supports the embedding of ML-like (strict, eager) and Haskell-like (non-strict, lazy) languages, without favoring either. IL's type system includes negation (continuations), but not implication (function arrow). Within IL we find that lifted sums and products can be represented as the double negation of their unlifted counterparts. We exhibit a compilation function from IL to AM --- an abstract von Neumann machine --- which maps values of ordinary and doubly negated types to heap structures resembling those found in practical implementations of languages in the ML and Haskell families. Finally, we show that a small variation in the design of AM allows us to treat any ML value as a Haskell value at runtime without cost, and project a Haskell value onto an ML type with only the cost of a Haskell deepSeq. This suggests that IL and AM may be useful as a compilation and execution model for a new language which combines the best features of strict and non-strict functional programming.

The authors start from the claim that most of the differences between SML and Haskell are independent of evaluation order. Is it possible, they wonder, to design a hybrid language which in some way abstracts over possible evaluation orders?

This papers leaves the language design for future work, and concentrates on the implementation costs. The results seem positive, so one hopes this project will mature and end the civil war between lazy and eager functional programming...

More information on this project is likely to appear here.

Dr Jekyll and Mr C

The Jekyll Programming Language

Jekyll is a high level programming language that can be translated
both to and from human readable, human editable C. Not only can the
C version of a file be generated from the Jekyll version, but the
Jekyll version can be generated from the C version. By being inter-
convertible with C, Jekyll removes the need for companies to take the
risk of moving their projects to a new language. A program can be ported
to Jekyll one file at a time, or one programmer at a time. If the Jekyll
compiler ceases to be available, or a tool doesn’t support Jekyll, or a
programmer doesn’t understand Jekyll, this is not a problem as one can
just use the C code. Jekyll enhances C with many high level features,
including safety, generic types, stack allocated lambda expressions,
and type classes. All features have been carefully designed so that they
map elegantly to and from C.

It allows statically resolved generics as well as dynamic dispatch. Too
bad about the C-like syntax ;-)

Lambda the ultimate peer review

Here you can find some amazing(!) peer reviews of a few famous papers (by Dijkstra, Turing, etc.).

Wadler's Blog: Penn, PADL, POPL, and Plan-X

I spent 5-15 January visiting U Penn and attending PADL, POPL, and Plan-X in Charleston, SC...

Interesting trip report.

I encourage you to lure Philip into a LtU discussion...

Modeling Genome Evolution with a DSEL for Probabilistic Programming sounds interesting, I'll have to look it up.

And talking about possible applications for Links, doesn't building a Google-Web Services APIs-AJAX DSL sound like a cool application for Links? Think about it as the easiest way to program an AJAX applications based on web services APIs, and automatically integrated into the Google universe (think Google maps etc.) If anyone from Google is reading this - this might be a cool "20 percent time" project... I won't go on since I am sure you can all imagine the possibilities (e.g., think about it is a scripting language for writing widgets for a future incarnation of a "Google Pack").