Category Archives: Releases

CLasH: Haskell to VHDL compiler in AUR

CLaSH is a tool-chain/language to translate subsets of Haskell to synthesizable VHDL. Haskell modules (example) written in a hardware-oriented subset of Haskell are translated into VHDL by the library. That is, you can design hardware directly in Haskell, and generate hardware designs from GHCi.

The Hackage package is now available in AUR.

Amongst other things, it provides a “:vhdl” extension to the GHCi command line, allowing you to generate hardware designs from the GHCi prompt. For more information about CLaSH, see the examples, sources and documentation project page, and the demo from the Haskell Workshop last year:

Other hardware-related libraries in Haskell in AUR:

  • chalmers-lava2000 library: Hardware description library
  • clash library: CAES Language for Synchronous Hardware (CLaSH)
  • ForSyDe library: ForSyDe’s Haskell-embedded Domain Specific Language.
  • Wired library: Wire-aware hardware description
  • york-lava library: A library for digital circuit description.

Snap: A Really Fast Haskell Web Framework

The new Snap web framework for Haskell is now packaged for Arch Linux.

You can install it automagically with, e.g.:

$ sudo bauerbill
            --trusted-users arch-haskell
            --build-as $USER
            --noconfirm
            --aur
            -S haskell-snap-server

And dive into the quick start:

$ cd /tmp
$ mkdir site
$ cd site
$ snap init
$ cabal install
$ site 8000

Then visit http://localhost:8000/ to serve up your new web project.

Stand back! haskell-regex-tdfa reaches 1.0.0

Chris Kuklewicz announced, enthusiastically, the release of haskell-regex-tdfa 1.0. You can now get  the Arch Linux package for it here. Amongst the varied and many regex libs for Haskell regex-tdfa stands as being 100% Haskell (not a binding to a C library), and for its use in the Yi project.

To quote Chris on the 1.0 release:

I am proud of this release.
This is not just a bug fix release.
It is a serious improvement in the asymptotic running time.

The previous versions allowed bad combinations of pattern and searched text length to scale badly in the length of the text. Previously the worst case for text of length N was O(N^3).

The new worst case asymptotic runtime scaled as O(N).
There is never any backtracking.
And the worst case storage space is independent of N.

Good work, Chris, and thanks for all the regex packages.

hipmunk: 2D physics for Haskell

hipmunk is a nice Haskell binding to the 2D physics library, chipmunk. It’s now packaged up for Arch Linux, with demos:

Here’s a demo installing the packages from AUR and running the physics demo:

Functional reactive grapefruit

Grapefruit is a new suite of libraries for functional reactive-style GUIs layered on top of GTK (via gtk2hs), announced today. Besides being a modern FRP gui library, it notably uses arrow syntax to describe gui components.

Arrow syntax is a bit of a rarity in Haskell code:

    addA f g = proc x -> do
                    y <- f -< x
                    z <- g -< x
                    returnA -< y + z

Will build the computation:

All the components are packaged here for Arch Linux.

In other funky Haskell gui news, haskell-haha has also been released and packaged for Arch, and lets us do vector graphics in ascii in the terminal…. hell yeah!
Here’s a video of haha at work, and how to get it via cabal (yaourt also works fine):

LLVM bindings for Haskell

The Haskell bindings to LLVM have been updated in Arch. You can also use the Hackage package, or get it from darcs.

This version of the package appears to add some new safety via type-level library:

This library permits performing computations on the type-level. Type-level functions are implemented using functional dependencies of multi parameter type classes. To date, Booleans and Numerals (Naturals and Positives) are supported. With regard to Numerals, there is support for common arithmetic operations (addition, substraction, multiplication, division, exponientation, logarithm, maximum, comparison, GCD) over natural numbers (using a decimal representation to make compile-time errors friendlier).

Lennart Augustsson informs us that type-level is used in the llvm binding to

  • keep track statically of vector lengths
  • sure that they are a power of 2
  • making sure that zero and sign extension between integer types go from a smaller to a bigger type
  • making sure that bitcast is done between types of the same number of bits

For a rather stunning example of what you can do with the Haskell LLVM embeddings — something you won’t see anywhere else — check out Lennart Augustsson’s embedding of BASIC in Haskell as a DSL, which also generates very competitive native code via LLVM…

HDBC 2.0: industrial database bindings for Haskell

I’ve updated the John Goerzon’s HDBC bindings in AUR to HDBC 2.0, including the

  • sqlite
  • postgres
  • odbc

backends. Update with:

yaourt --aur -S haskell-hdbc

and pick your preferred backend.

HDBC’s new MySQL backend

The new mysql backend to the venerable HDBC Haskell database library, is now in Arch (as is HDBC). Read about HDBC in RWH.

Piet implementation for Arch

The initial release of piet, an implementation of the Piet programming language is now available as a package in AUR. The piet binary also ships with Language.Piet, an API to the interpreter.

An example session with the interpreter:

$ piet hello.png
Hello world!

Where the input file is the helloworld.piet program:

Here’s some Piet programs:

Piet is implemented in Haskell.

Open Source Haskell Releases and Growth

Hackage, Haskell’s central library achive site, went live 2 years ago during the 2007 Haskell Hackathon in Oxford.

Here we are two years later, on the verge of 1000 open source Haskell applications, libraries and tools (993 at the time of writing), all swinging around cabal and cabal-install.

Is the Haskell community getting any better at the production of code? To work this out, I made a 28 day sliding average of the daily releases to Hackage, and there’s a clear upwards trend. More people are releasing more Haskell than ever before:

Sliding average of Haskell releases

The two spikes correspond to the yearly GHC major releases, where a whole suite of libraries get updated.

We can break Hackage down by category too, to see what areas Haskell is being used in:

Half of all libraries (just over 500) are devoted to data structures, text handling and parsing, system interactions, control structures and abstractions, graphics, and development tools. Nothing terribly category-theoretic there :-)

Following closely are network, web, math, sound and database programming. (Breakdown of the top 30 categories).

The release of new code also mirrors the growth in community participation. Here, the growth in the Haskell IRC channel over the last 7 years:

It seems we’re seeing an obvious correlation between community input (new programmers) and output (project releases).

Join in: the lambdas are hot!