Skip to content

samtay/conway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

conway Build Status

A terminal interface for playing Conway's Game of Life

terminal-gif

This is just a pet project that I thought would be a good exercise in Haskell. The Game of Life is a cellular automaton with simple rules but emergent complexity - a quintessential complex system. The frontend leverages brick while the backend is supported by custom zipper types implementing comonads.

This codebase comes with a complementary article about the performance benefits of comonads.

installation

First get stack. Then

$ git clone https://github.com/samtay/conway.git
$ cd conway
$ stack build
# execute via stack
$ stack exec life
# alternatively, copy executable to ~/.local/bin
$ stack install life
$ life