Entries Tagged ‘repa’:

Haskell Life With Repa Part 2: Parsing Framework

Conway's Life - Gunstar

Life Pattern - Gunstar

In the last post, we built a simulator for Conway’s Life in Haskell using repa and OpenGL. The initial life pattern in that implementation was hard coded. In this post, I’ll build a framework for parsing patterns from files.

Read the rest…

Tags: , ,

Comments (1)


Conway’s Life in Haskell with Repa and OpenGL

Conway's Life in Haskell

The final state after starting with the acorn pattern

Repa is a new library in Haskell for handling arrays. It has flexible indexing like the old array library, but supports parallel computation, stream fusion, and has a rich API like the vector library.

To learn how to use repa, I implemented Conway’s Life using repa for the simulation and OpenGL for the display. The complete code is available on BitBucket and builds on my GLFW-b boilterplate, so I’ll only discuss the interesting parts here. Don Stewart wrote a good introductory tutorial to repa that will fill in any gaps I leave in this post.

Read the rest…

Tags: , , , ,

Comments (1)