
My First “Conway's Game of Life” Program in Tribute to John Conway - core_dumped
https://github.com/Barkerprooks/conways-game-of-life.git
======
aprinsen
Seems we've all been busy. I made a simple browser version. [https://animate-
object.github.io/life](https://animate-object.github.io/life).

Life was one of my first introductions to programming in school. Mr. Conway
also a strong impression on me through his interviews with Numberphile, which
I'd recommend, not so much for their mathematical content, but for the very
human portrait of a genius in his later years.

~~~
JoeAltmaier
Mine was on a PDP-11 in assembly language, displayed on an oscilloscope
screen. Back in college, in a device-control lab class. A great program to
form the core of any kind of project - assembler, web, device, whatever! I
recommend it.

------
ljvmiranda
I once wrote a framework for simulating GoL in Python:
[https://github.com/ljvmiranda921/seagull](https://github.com/ljvmiranda921/seagull)

I names it Seagull because “Conway’s Game of Life” => CGoL, lol so playful.

The day before Conway passed, I was playing with some procedural art from
cellular automata: [https://cellular-sprites.herokuapp.com](https://cellular-
sprites.herokuapp.com)

Everything felt surreal the morning I read the news

------
pcmonk
Very cool. One of my formative programming experiences was learning the
"hashlife" algorithm, which lets you do very large maps and zoom forward
millions of iterations very quickly.

[https://www.drdobbs.com/jvm/an-algorithm-for-compressing-
spa...](https://www.drdobbs.com/jvm/an-algorithm-for-compressing-space-
and-t/184406478)

------
DonaldFisk
I learned, from Hackers by Steven Levy, of Bill Gosper's work on Life at the
MIT AI Lab. Apparently they had two versions of Life running on a PDP-10
there, under the ITS operating system. Gosper wrote his in TECO (a programming
language used to edit text), and another in MIDAS, written by Mike Speciner.
But ITS no longer ran, and the Life programs appear to have been been lost.

Some time afterwards, there was a project to resurrect ITS, which I got
involved in. After it was up and running, initially on the SIMH simulator, and
later more stably on Ken Harrenstien's klh10 emulator, I wrote a new version
of Life for it in MIDAS (PDP-10) assembly language, which is now located at
[http://www.fmjlang.co.uk/its/life.txt](http://www.fmjlang.co.uk/its/life.txt)

This drew the attention of Dan Weinreb, who provided some information on the
original AI Lab version:
[https://web.archive.org/web/20050209065438/http://lispmeiste...](https://web.archive.org/web/20050209065438/http://lispmeister.com/blog/alife/index.html)

------
anonytrary
Good work! Highly recommend adding a gif of a few seconds of your game in your
README so people can enjoy this without having to build and run it.

~~~
slavik81
Do you have any recommendations on how to do that? I tried to make a gif for
my project a month or two ago by capturing my terminal output in ttyrec, then
using ttygif to turn it into an animated image. However, ttygif ultimately
passes things off to ImageMagick convert, which would run until my computer
ran out of memory and then crash.

I tried using ffmpeg to create a video instead of a gif, but I struggled
getting it to correctly reproduce my colours and I couldn't figure out how to
handle the occasional variation in time between frames in my capture.

~~~
slavik81
Following up on this, I was inspired to try again. I decided to give APNG
tools a shot, as it seems that APNG support is pretty good these days[1]. It
was straightforward to build apngasm[2] and ttygif[3] from their GitHub
sources on Ubuntu. I modified ttygif to generate a command for apngasm rather
than for convert, and found that it could easily handle my data.

Unfortunately, apngasm does not seem to handle gamma correctly, resulting in
more muted colours in the output APNG than in the input PNGs. If I can find
the time, I'll fix that up and open-source the various tweaks I made. My
current results are[4][5], though I may update those images as I improve them.

On a related note, it seems that it's no longer possible to remove the window
decorations from gnome-terminal on Ubuntu 19.10, which is unfortunate for
ttygif captures. I switched to my Ubuntu 18.04 machine to do a capture without
the window border.

[1]: [https://caniuse.com/#feat=apng](https://caniuse.com/#feat=apng) [2]:
[https://github.com/apngasm/apngasm](https://github.com/apngasm/apngasm) [3]:
[https://github.com/icholy/ttygif](https://github.com/icholy/ttygif) [4]:
[https://slerp.xyz/demos/ascii-euler/block.png](https://slerp.xyz/demos/ascii-
euler/block.png) [5]: [https://slerp.xyz/demos/ascii-
euler/waterfall.png](https://slerp.xyz/demos/ascii-euler/waterfall.png)

~~~
slavik81
One final update, I think part of the colour problem was actually because the
Ubuntu terminal is slightly transparent by default, and different alpha
blending resulted in slightly different colours.

------
schwartzworld
I made one of these too!

[https://letter-press.netlify.app/liff/](https://letter-
press.netlify.app/liff/)

[https://github.com/schwartzworld/letterpress/tree/master/lif...](https://github.com/schwartzworld/letterpress/tree/master/liff)

------
mconigliaro
I made one of these recently too. Mine allows you to simulate many different
kinds of 2D cellular automata, but Conway's Game of Life is the default.

[https://github.com/mconigliaro/cellular_automata](https://github.com/mconigliaro/cellular_automata)

------
fortran77
I like writing life in new programming languages as a sort of non-trivial
"Hello World". It was the first program I wrote when I was first learned
CUDA/C++ back in 2008 and was a great teaching example.

I remember it being the first thing I wrote in Turbo Pascal for the IBM PC
back in 1984 or so.

------
manaskarekar
Here's mine in C++ and SFML. I enjoyed this so much! It's basic, but I recall
spending hours playing with various seeds.

[https://github.com/manaskarekar/dendron](https://github.com/manaskarekar/dendron)

Demo seeded with an R-Pentonimo:
[https://www.youtube.com/watch?v=B3P-LnrXE3k](https://www.youtube.com/watch?v=B3P-LnrXE3k)

------
BZH314
Here is our Twitch Plays implementation:
[https://www.twitch.tv/bzh314](https://www.twitch.tv/bzh314)

It supports RLEs [1] so you can quickly create some known shapes or test your
own.

Crash course on RLEs:

b=dead, o=alive, $=new line

This is the RLE of xkcd's tribute to John Conway [2]:

2b3o$2bobo$2bobo$3bo$ob3o$bobobo$3bo2bo$2bobo$2bobo!

You can discover plenty of patterns with their RLEs on the Life Wiki [3]

Twitch Plays Conway's Game Of Life has a database of hundreds of patterns.

To learn patterns here's a 40-minute video you can quickly go through:
[https://www.youtube.com/watch?v=u4XgALyX6w8](https://www.youtube.com/watch?v=u4XgALyX6w8)

For instance you can make a Sir Robin [4] at the origin this way:

!SirRobin 0.0

or the xkcd pattern:

!xkcd 0.0

We also added our own twist, with color rules that lead to the Epic Toy Store
Pixel Art [5] and Epic Masterpiece Pixel Art Decoration [6]

\---

[1]
[http://www.conwaylife.com/wiki/Run_Length_Encoded](http://www.conwaylife.com/wiki/Run_Length_Encoded)

[2] [https://xkcd.com/2293/](https://xkcd.com/2293/)

[3]
[https://www.conwaylife.com/wiki/Main_Page](https://www.conwaylife.com/wiki/Main_Page)

[4]
[https://www.conwaylife.com/wiki/Sir_Robin](https://www.conwaylife.com/wiki/Sir_Robin)

[5]
[https://www.youtube.com/watch?v=JH5RzNnamW0](https://www.youtube.com/watch?v=JH5RzNnamW0)

[6]
[https://www.youtube.com/watch?v=RKxKac5YHag](https://www.youtube.com/watch?v=RKxKac5YHag)

------
bcl
Here's the one I've been playing around with, written in go with the SDL2
library - [https://github.com/bcl/sdl2-life](https://github.com/bcl/sdl2-life)

------
misja111
That was one of the first programs I wrote when I had my first computer, back
in 1985. Before that I was already fascinated by Game of Life and there was no
other way than to write out every generation by hand ..

------
smabie
Why are there function definitions in header files? Really the only reason to
do this is if you are distributing a "header-only" library.

~~~
core_dumped
It honestly bothered me at first too, but now that your comment isn't [dead] I
can finally reply and say it was because I was too lazy and didn't want to
write extra code / bash script for it. It works perfectly fine with just a
header file, and isn't dissimilar to something an early year University
student would write, which is definitely the caliber of this project.

