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.
That's what I'm currently using, but I think a gif/video would work better for my program. My recording is supposed to run at ~10fps and the asciinema web player can't keep up. I get less than 1fps on the first play-through, and it dips as low as 2fps on subsequent plays.
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.
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.
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.
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.
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.
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.
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.
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
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 ..
24 comments
[ 682 ms ] story [ 118 ms ] threadI 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.
Or Loom -> MP4 -> ezgif
There's a lack of good GIF making tools
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 [2]: https://github.com/apngasm/apngasm [3]: https://github.com/icholy/ttygif [4]: https://slerp.xyz/demos/ascii-euler/block.png [5]: https://slerp.xyz/demos/ascii-euler/waterfall.png
[link redacted]
https://www.drdobbs.com/jvm/an-algorithm-for-compressing-spa...
I remember it being the first thing I wrote in Turbo Pascal for the IBM PC back in 1984 or so.
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.
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
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...
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
Everything felt surreal the morning I read the news
https://github.com/manaskarekar/dendron
Demo seeded with an R-Pentonimo: https://www.youtube.com/watch?v=B3P-LnrXE3k
https://letter-press.netlify.app/liff/
https://github.com/schwartzworld/letterpress/tree/master/lif...
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
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
[2] https://xkcd.com/2293/
[3] https://www.conwaylife.com/wiki/Main_Page
[4] https://www.conwaylife.com/wiki/Sir_Robin
[5] https://www.youtube.com/watch?v=JH5RzNnamW0
[6] https://www.youtube.com/watch?v=RKxKac5YHag