[Haskell-cafe] Game of life in haskell.

Serguey Zefirov sergueyz at gmail.com
Tue Feb 2 10:48:45 EST 2010


2010/2/2 Lyndon Maydwell <maydwell at gmail.com>:
> Hi Cafe.
>
> I've made a basic game of life implementation with Haskell and OpenGL:
> https://github.com/sordina/Life/
>
> I'm intending to improve the performance, and add more advanced
> features, but I thought I'd get some feedback first. Can anyone see a
> way to make this code more idiomatic, or any optimizations I might
> have missed?

Arrays are not fully "idiomatic" for Haskell as they are hard to
update functionally.

Also, their use incurs quadratic update cost for simple scene with two
gliders that fly in different directions.

So I advice you to use Data.Map.Map and Data.Set.Set data structures.

How? It's an easy question. ;)


More information about the Haskell-Cafe mailing list