Posted in haskell on February 6th, 2008 6 Comments »
Here’s a simple program I wrote on a whim tonight, to take a very basic look at GHC’s low-level threading performance.
module Main where
import Control.Applicative
import Control.Concurrent.MVar
import Control.Concurrent
import Data.Time
import System.Environment
main = do
mv <- newEmptyMVar
start <- getCurrentTime
loop mv =<< read . head <$> getArgs
[...]
Posted in haskell on February 6th, 2008 3 Comments »
Applicative functors are gorgeous and versatile creatures, but as is common in Haskell, they lack a little in documentation. The paper that Conor and Ross wrote introducing them is good, but dense. What if we were to skip all the scene-setting kerfuffle, and plunge into using them by example?
I won’t attempt to describe what applicative [...]
Posted in haskell on January 17th, 2008 3 Comments »
Tired of imperative programmers kicking sand in your face? Send some cut-out lambdas and a postal order for 5 frobs to haskell.org, and we’ll send you a handy-dandy poster of those famous superheroes, the Monad Squad!
State helps functional programmers cross the imperative street!
Identity can blend in anywhere!
Writer never forgets a detail!
Cont can travel through time!
List [...]
Posted in haskell on January 6th, 2008 1 Comment »
POPL 08 takes place next week, so San Francisco will be flooded with an army of burly and menacing programming language researchers and type theorists. Kids, don’t say you haven’t been warned.
On Wednesday evening, January 9, Phil Wadler will be repeating for the public his talk “Well-typed programs can’t be blamed”, based on joint work [...]
Posted in haskell, open source on January 3rd, 2008 No Comments »
I’ve spent a bit of time over the past few days putting together some LLVM bindings for Haskell, based on Gordon Henriksen’s C bindings.
(If you don’t know what LLVM is, it’s a wonderful toybox of compiler components, from a complete toolchain supporting multiple architectures through a set of well-defined APIs and intermediate representation file formats [...]
Posted in haskell on December 26th, 2007 10 Comments »
Every language’s standard library has its weak spots. In C, for example, the stdio functions don’t have a consistent notion of where the FILE * belongs in the argument list. For fwrite, it goes at the end; for fseek, it’s at the beginning. This makes it harder to abstract away the details of the API. [...]
Posted in haskell on November 26th, 2007 No Comments »
If you use Fedora 8, GHC 6.8.1 will be in the stable repository within 24 hours or so. I’ve also pushed a compatible build of gtk2hs 0.9.12.1 to the stable repository.
Posted in haskell, linux on November 9th, 2007 1 Comment »
Upgrading my laptop from F-7 to F-8 yesterday was painless, so I’ve been able to verify that the latest version of GHC works smoothly. I’ve pushed the built packages to the F-8 testing repository, and will bump them to release in about a week.
If you’re feeling impatient, you can download the final RPMs from the [...]
Posted in haskell, open source on October 16th, 2007 5 Comments »
This evening, I’ll be speaking at the peculiar but fun Ignite SF. My talk is notionally about functional programming, but it’s really about imposing constraints on yourself, and what you can get out of it.
Posted in haskell on October 9th, 2007 3 Comments »
When debugging or profiling Haskell code, it’s common practice to pepper it with cost centre annotations, often called SCC (for strongly connected component set cost centre) annotations. If you compile a program using ghc -prof -auto-all, this causes all of the top-level names in every module you compile to automatically be annotated with their names, [...]