HackerTubewatch
Surprise me
Frame from Conway's Game Of Life in APL Plays via YouTube's privacy-enhanced embed

Conway's Game Of Life in APL

3 videos recommended on HN
YouTube
11 HN users recommended this demo10 months2010–2024 score 12.5
Years with an HN recommendation, 2007–2026

Recommended whenever APL or array languages come up as the quickest way to see why the paradigm is so striking.

A short Dyalog demonstration building Conway's Game of Life in a single line of APL, step by step. It shows how array operations replace loops.

“Try watching this video; it will only take you 8 minutes” (HN, 2019)

5 strong recommendations · 6 recommendations · 9 citations · Demos · intro

20 Hacker News comments

From the HN archive; up to 20 kept per video, favoring different commenters. Recommendations first.

@sblom Apr 2012 Strongly recommends
on HN thread A Programming Language, now in HTML (50th anniversary)
Read more
It has an incredible amount of elegant power for some things (see [this video] if you want to immediately fall in love). But I've found that trying to use it for most things just isn't worthwhile. It feels like cheating every time I have to escape from its array programming core to the more familiar flow control structures that only came along in later versions of APL. I think it makes a good puzzle language (i.e. the fun comes from figuring out _how_ to say something rather that just raw getting stuff done), but unfortunately, it's even more of a puzzle to figure out how code that someone else wrote works. For full context: I've spent more time using J than APL itself.
Shows APL's elegant power in Game of Life.
@jboggan Jun 2015 Strongly recommends
on HN thread Try APL in your browser
While we wait for the site to come back up please enjoy this amazing video showing Conway's Game of Life in APL: [this video]
Amazing demonstration of Game of Life in APL.
@sethrin Jul 2018 Strongly recommends
on HN thread APL at Its Core
The following video is probably reasonably well known, and I wish that I had a more intelligent commentary than to say that it blows my mind, but it does I think bear out the point of expressivity rather well. [this video] Conway's Game of Life in some 50 characters of APL.
Mind-blowing expressivity: Game of Life in about 50 characters.
@kragen Oct 2019 Strongly recommends
on HN thread Loopless Programming
Read more
Try watching this video; it will only take you 8 minutes, but within 3 minutes you should have an idea of why array languages are different from having an ndarray library available in Rust or having typeclasses in Haskell: [this video] After you watch that you will of course suspect that APL and other array languages like J are a sort of DSL for things like numerical linear algebra, which is of course what Numpy and Octave are. (Even though the Game of Life isn't linear algebra, it's very clearly matrix-based, so it doesn't seem that far off.) Dyalog has posted some other videos demonstrating the use of their proprietary APL for different things, but I think a more interesting one is [link] , by J inventor Roger Hui. This is an hour and a half, but it demonstrates some approaches to reducing different problems to multidimensional arrays, of pointers ("boxes") in some cases. This ought to be enough to convince you that there's an alien kind of thinking here, quite different from the Haskell and Rust approaches, that can be applied to a wide variety of problems. Now, I'm not Stevan Apter, so I'm not going to try to convince you that this alien kind of thinking is better . But it's clearly different , and different ways of thinking work best in different situations.
Short video showing why array languages think differently.
@rgiar Oct 2015 Recommends
on HN thread Conway's Game of Life in One Line of APL (2007)
For an infinitely more relaxing experience of life in APL, may I recommend: [this video] I've watched it many times but I still expect him to mention happy little trees :)
Relaxing, Bob Ross-like walk through Life in APL.
@hhas01 Aug 2019 Recommends
on HN thread A+, the Programming Language of Morgan Stanley
I think the key to understanding APL is realizing that it’s not built for Programmers; it’s built for Mathematicians. Here’s a fine half-hour introduction to APL in action: [link] 1:00-2:00 is the motivation for APL—or any DSL—in a nutshell. (“conversational computing”, “users who are [not] professional programmers”) Or, if you’re happy to sit back and see math magic happen: [this video] For all its mechanical advances over the last 40 years, it’s shocking how far our technology has regressed philosophically.
APL doing math magic in Game of Life.
@conover Dec 2019 Recommends
on HN thread Klong: a Simple Array Language
APL (and I assume J) uses a large range of special graphic symbols as part of its syntax, which can be difficult to internalize for folks coming from other languages. It can be easily construed as mysterious or magical lettering (arcane rune). My favorite video to illustrate this is Conway's Game of Life written in APL: [this video]
Illustrates APL's arcane-looking symbols in action.
@moonchild Aug 2020 Recommends
on HN thread J Notation as a Tool of Thought
Read more
> My point was that general programming usually looks more like writing the sorting algorithm than simply calling it. Thus, I would be more interested in seeing real examples of how the properties of J allow you to write algorithms more concisely or otherwise better. Ah - I see. Here[1] is quicksort in j. John scholes's videos are excellent and very illustrative, though they deal with apl rather than j; conway's game of life[2] and sudoku[3]. > The article showed how J solves some mathematical problems with built in functions or their built-in modifiers. But in general programming, you won't find a function that does exactly what you wanted, maybe with a little adverb. You'll usually have to write that function yourself, to describe how it works in terms of some of those pre-existing functions. Right. This is true, but you generally stay much closer to the builtins in j than you do in other language. > Note that your second example could be expressed as something like > x.OrderBy(y => y[1]) > In C#, assuming x is int[N][M]. I understand that J's version can work with many other shapes of X, but that is hard to appreciate without seeing example of how that comes in handy when writing some other (hopefully well known) algorithm. Right; you mentioned sort predicates, so I was giving an example of a way in which you could sort according to another relation. My point is: being able to change the layout of your data so easily can obviate sort predicates. (Though I do think a sort a
Scholes's APL videos on Life and sudoku are illustrative.
@sgrove Jul 2021 Recommends
on HN thread Jelly: a recreational programming language inspired by J
Seems then you'll probably dislike apl - here's the full implementation of Conway's Game of Life in 53 characters: life ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵} And the explanatory video behind it (quite approachable!) [this video]
Approachable explanation of the 53-character Life implementation.

Citations, criticism and jokes

@Inaimathi Dec 2010 Cites it
on HN thread Omega programming language
Heh. The traditional snippet associated with that argument is the Game of Life in APL. [this video] And yes, this is specifically why I opted to redefine "power" in my post; the standard definition leaves out some points that I've found to be essential.
Game of Life in APL as the classic snippet.
@ThaddeusQuay2 Aug 2011 Cites it
on HN thread Programming languages that make you think differently
"Notation as a Tool of Thought" by Kenneth E. Iverson in his 1979 ACM Turing Award Lecture. [link] "Language as an Intellectual Tool: From Hieroglyphics to APL" by Donald B. McIntyre in IBM Systems Journal Vol.30, No.4 1991, p.554-581. [link] Conway's Game of Life in one line of APL [link] Conway's Game Of Life in APL [this video]
Listed among APL resources.
@ianbishop Jun 2012 Cites it
on HN thread Why APL Is Still Cool
I've always found APL really intriguing. A professor of mine told me about how one of his students used to be able to solve ACM competition problems incredibly fast by simply not having to type very much. There are some insane videos on youtube of people solving problems in APL [1]. But, you know - it's write once, read.. never again. [1] [this video]
Example of impressive APL problem-solving videos.
@lelf Sep 2013 Cites it
on HN thread GNU APL 1.0
life←{ ⍝ John Conway's "Game of Life". ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ ⍝ Expression for next generation. } [this video]
Posts the APL Game of Life code alongside the video.
@a4isms May 2022 Cites it
on HN thread Perl, the first postmodern computer language (1999)
I’m adding SNOBOL to my list of modernist languages. “Everything is pattern-matching” fits the modernist ethos. On the other hand, what about APL? Although the syntax looks just as much like line noise as Perl’s syntax, it is actually a very elegant language. Is APL also a modernist language? [this video]
Cited as example of an elegant, line-noise-like language.
@prezjordan Sep 2022 Cites it
on HN thread Ask HN: What's the best source code you've read?
Contrarian answer: Conway's Game of Life in Dyalog APL [this video] It feels like the logical end state of "clever" code, for better or for worse. Or, alternatively, what happens when a standard library is gigantic but each keyword is 1-2 characters.
Offered as contrarian best source code, the end state of clever code.
@robomartin Sep 2022 Cites it
on HN thread Volvo is using Rust for its in-vehicle software
Read more
> that you consider a failure It isn't a failure. It simply isn't optimal. Just my opinion, of course. Which means I could be very wrong. > "the pointer returned by this function must be freed by the caller" or "the pointer returned by this function must NEVER be freed by the caller." Those two are examples of bad programming. Both constraints are almost guaranteed to create, at a minimum, an unmanageable mess and, at worst, very dangerous software (think embedded controller for a robot or a rocket). While I have not looked, I would be very surprised if something like that existed in the Linux codebase, which is C. > that doesn't mean C has to be the absolute last systems language ever in the history of computing. I don't think I have suggested this at all in this conversation. My position is very simple: Don't blame the language for bad programming. This is rarely the problem. The fact that someone can cause a mess using pointers does not mean pointers are the problem. They simply don't know what they are doing. The Linux codebase uses pointers everywhere, right? Is it a mess? No. Maybe that's because they are using the language correctly. I am also not saying that all work in evolving programming languages should stop because C is perfect. Not the case I have made at all. What I will say is that --again, my opinion-- quite a few of the modern paradigms are complete nonsense in support of lazy programmers. The question to ask might be something like: Would you have been able
Linked incidentally in a long C versus modern languages argument.
@drbaba Oct 2023 Cites it
on HN thread Dyalog APL Keyboard Layouts
There is also the J language [1], which I understand to be a GPL reimplementation of APL. Since they went with pure ASCII, you presumably have to hold down modifier keys less. I never used either language, so can’t comment on how useful they are. But I’ve always been fascinated with APL as an idea, especially after watching this [2] person implement Game of Life as a compact one-liner in APL! (With that compact code, maybe you press modifiers less overall than when writing more traditional/verbose languages?) [1]: [link] [2]: [this video]
Fascination with APL from Game of Life one-liner.
@bear8642 Jun 2024 Cites it
on HN thread Why "Structure and Interpretation of Computer Programs" matters (2011)
Would you prefer something like this numpy then? def life(x): y = np.array([np.roll(x, -1), np.roll(x, 0),np.roll(x, 1)]) y = np.array([np.roll(y, -1, 1), np.roll(y, 0, 1),np.roll(y, 1, 1)]) z = y.sum(1).sum(0) a = np.array([3 == z, 4==z]) c = np.logical_and(np.array([np.ones(x.shape), x]), a) return np.logical_or(c[0], c[1]) Video of Scholes building up the life APL expression can be seen here: [this video]
Shows Scholes building up the Life APL expression.

Video list and Hacker News comment labels from HackerTube (prompted by @karpathy), released under ODC-By 1.0, built on the open-index/hacker-news archive. Hacker News data is provided by Y Combinator; comments remain the work of their authors. Video titles, channel names and thumbnails belong to their creators and are shown via YouTube. HackerTube Watch is an unofficial edition. Data export of 2026-10-31.

Keyboard shortcuts

/
Search
j k
Next / previous video
r
Surprise me
l
Like (video page)
w
Watch later (video page)
?
This help
Esc
Close