Joe Armstrong on multicore

Matthias Radestock wrote “Joe Armstrong, the inventor of Erlang, paid LShift a visit on Friday. He had kindly agreed to give a short talk to a few of my colleagues. We ended up cramming about twenty people into our meeting room, listening to Joe explain the implications of multicore CPU architectures for programming language design. There were lots…”

Too much mail is bad for you

Matthias Radestock wrote “We received a few reports from users of our Erlang-based RabbitMQ message broker who saw sharp decreases in throughput performance when putting the broker under heavy load. We subsequently reproduced these results in our lab. This is not what we expected to see - while some performance degradation is inevitable when running a system at its limits, we had carefully designed RabbitMQ to make such degradation are small and gradual. So clearly the system was behaving in ways we had not anticipated. We eventually tracked down the problem. The lesson is: if you make synchronous calls inside an Erlang process you’d better make sure its message queue is short.”

EC2 Latency

Matthias Radestock wrote “We want to use Amazon’s [Elastic Compute Cloud](http://aws.amazon.com/ec2) to run scalability tests, rather than buying/leasing lots of kit that we only need for a few hours every now and then. There are a few challenges though. The biggest is probably translating the results from the EC2 tests to the envisaged deployment scenarios. There are several…”

QuickChecking imperative code

Matthias Radestock wrote “[Haskell](http://www.haskell.org)'s [QuickCheck](http://www.cs.chalmers.se/~rjmh/QuickCheck/) is a very neat tool for automated testing. One specifies *properties* that one would like a program to satisfy, and *generators* for test data, usually involving some form of randomisation. QuickCheck then uses the generators to produce test cases and check the properties against them. The original QuickCheck was designed to test *purely functional* code only. However, the project I am working on contains a fair amount of imperative code, most of it performing operations on a database. Is it possible to employ QuickCheck for testing this code?”

Updateable views in PostgreSQL

Matthias Radestock wrote “In one of our projects I needed to do some processing on data stored in a PostgreSQL database. The data contains timestamps but the processing requires time to be represented as seconds since the epoch. What to do? Generally, date&time processing is major headache. There are just way too many opportunities to get things wrong.…”

Writing AJAX applications in Haskell

Matthias Radestock wrote “How easy is it to write an AJAX application in Haskell? Very easy indeed. Here’s a little example of an AJAX server that echoes JSON requests:     module Main where     import Data.Maybe (fromJust)     import JSON     import Network.NewCGI     jsonEcho :: CGI CGIResult     jsonEcho = do…”

Haskell typing weirdness (pt 0 of n+1)

Matthias Radestock wrote “I have been trying to get some real work done with [Haskell](http://www.haskell.org) – shock, horror! As part of that I am using the excellent [HaskellDB](http://haskelldb.sourceforge.net/) combinator library for type-safe and composable database operations. HaskellDB employs some advanced type constructs such as [phantom types](http://www.haskell.org/hawiki/PhantomTypes), which can result in rather complex types that make analyis of type…”

‘Code as Data’ != Closures

Matthias Radestock wrote “Today I googled for “code as data”. The first hit that came up was this, a tutorial on Groovy that cheerfully proclaims that what is meant by “code as data” is closures! No, no, NO!!!! “Code as data”, aka “code is data” signifies the ability to manipulate code, i.e. to construct and take apart programs.…”

Static analysis of Erlang communication

Matthias Radestock wrote “I had a brief email exchange with the developers of [Dialyzer](http://www.it.uu.se/research/group/hipe/dialyzer/), the static analyzer (some might call it a type checker) for [Erlang](http://www.erlang.org/) programs. Currently Dialyzer only performs analysis on the functional fragment of Erlang and I was enquiring whether to extend that to handle communication. That would allow the detection of basic input/output mismatches,…”

Pi Buffers

Matthias Radestock wrote “I was recently asked to code up a bi-directional unbounded buffer in the pi-calculus, i.e. a process parameterised by two names x,y that buffers all values received on x and y, and outputs them on y and x respectively. Here is what I came up with, in the syntax of MWB: agent Cell(c,v,n)    =…”

The Definitive Programming Language, Not

Matthias Radestock wrote “[Peter Van Roy](http://www.info.ucl.ac.be/~pvr/) recently claimed ([article](http://www.info.ucl.ac.be/people/PVR/flopsPVRarticle.pdf), [slides](http://www.info.ucl.ac.be/people/PVR/flopsPVRtalk.pdf)) that there are signs of a *Definitive Programming Language* emerging that, as he put it, gives > good solutions at its level of abstraction, allowing computer > science researchers to move on and work at higher levels. The argument is based on the observation that *four* languages, designed *independently* and for *different purposes* all arrived at the *same* layered language design of 1. strictly functional language at the core 2. deterministic concurrency (aka dataflow concurrency) 3. asynchronous message passing 4. global mutable state The claim is that the odds of this happening at random are the same as lightning striking in the same place four times and that instead we should consider this particular language structure as a definitive design that arises naturally and inevitably. Unfortunately these claims do not stand up to scrutiny. ”

Maude I/O

Matthias Radestock wrote “In my [continued experiments](/blog/2006/06/05/language-design-in-maude) with [Maude](http://maude.cs.uiuc.edu/) I have been investigating its I/O system and, more generally, how to integrate Maude with other systems and extend its built-in capabilities. Libraries are arguably Maude's weakest point. The standard libraries are very rudimentary. Furthermore, there is no FFI, so there is no easy way to hook in third party libraries. As we shall see, this is actually less of a problem than it may seem.”