4 ms·
Decades ago, I read an article in Byte magazine discussing various implementations of GoL. The article ended with an implementation in one line of APL. What a
by JoeDaDude 2y ago
Decades ago, I read an article in Byte magazine discussing various implementations of GoL. The article ended with an implementation in one line of APL. What are the chances you (or anyone) still has that article, and that one line program?
- dvgrn 2y agoHeh -- "if you need more than one line of APL you do not fully understand your problem". https://news.ycombinator.com/item?id=1041500 People have done similar things in all kinds of languages by now: https://codegolf.stackexchange.com/questions/3434/shortest-game-of-life
- kirubakaran 2y agolife←{⊃1 ⍵ ∨ .∧ 3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
- ptrott2017 2y agoand if you want some additional explanation: https://aplwiki.com/wiki/Conway%27s_Game_of_Life https://aplwiki.com/wiki/Conway%27s_Game_of_Life
- RBerenguel 2y agoThis video constructs a GoL in APL (not one liner). It is quite understandable even if you don’t know APL (I had just started tinkering with APL when I first found it I think): https://m.youtube.com/watch?v=a9xAKttWgP4 https://m.youtube.com/watch?v=a9xAKttWgP4 In case somebody is curious to see how it might look like.