HackerTube

Conway's Game Of Life in APL

Dyalog11 HN recommenders · recommended in 10 months, 2010–2024
YouTube
demo · intro · evergreen · 2010–2024 on HN

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.

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

12 comments from Hacker News

@Cactus20182020-08 · in “A look at the J language: the fine line between genius and insanity (2012)”

> Here's a video that really illustrates the power of this paradigm: ▶ this video Amazing game of life code!

Strongly recommends View on HN
@kragen2019-10 · in “Loopless Programming”

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.

Strongly recommends View on HN
@sethrin2018-07 · in “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.

Strongly recommends View on HN
@jboggan2015-06 · in “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

Strongly recommends View on HN
@sblom2012-04 · in “A Programming Language, now in HTML (50th anniversary)”

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.

Strongly recommends View on HN