Skip to content
0:00 / 0:00

#apl#conway'sgameoflife#arrayprogramming

Conway's Game Of Life in APL

Dyalog

1.4K subscribers • 3 videos on Hallway

YouTube
  • Recommended by 12 people: 11 on Hacker News and 1 on Lobsters.
  • A classic. People kept recommending it from 2012 to 2023.
  • Made by the vendor. The company whose product it covers made or sponsored it.

Intermediate. Assumes working knowledge.

235K views17 years ago12 recommendations

Programming languagesFunctional programmingLanguage design and type systems

A step-by-step demonstration of implementing Conway's Game of Life in a single line of APL using array operations.

There is a "Game of Life" tutorial at tryapl.org, which allows you to step through the game of life expressions interactively. -------------------- Get Started Download the latest version of Dyalog, free for personal or non-commercial use: dyalog.com/downloads About Dyalog Ltd We are the creators of Dyalog APL, a powerful array-oriented programming language designed for concise, expressive problem solving. Our team is dedicated to its ongoing development and long-term maintenance, ensuring it continues to meet the evolving needs of our users. To support this, we provide a suite of development tools and environments that enable both Subject Matter Experts and IT professionals to rapidly turn complex ideas into robust, efficient software solutions. -------------------- Good places to start learning about APL are the Vector website (run by the British APL Association) vector.org.uk where there is a list of current APL books, the APL Wiki at aplwiki.com/ , and the Dyalog website dyalog.com which has links for obtaining a personal (non-commercial) licence for our APL interpreter if you like learning by doing :) There are also links to some forums and discussing groups on both sites where you will find people who know APL inside and out... You can also try APL online at tryapl.org/ Conway's Game Of Life in APL

Why it's here

12 people recommend this

What people say. Frequently shared as a mind-blowing demonstration of the power and expressiveness of array programming in APL.

sblomon Hacker News • Recommends

On “A Programming Language, now in HTML (50th anniversary)”

It has an incredible amount of elegant power for some things (see link to 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.

jbogganon Hacker News • Recommends

On “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: link to this video

sethrinon Hacker News • Recommends

On “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. link to this video Conway's Game of Life in some 50 characters of APL.

kragenon Hacker News • Recommends

On “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: link to 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…

Cactus2018on Hacker News • Recommends

On “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: link to this video Amazing game of life code!

dbremneron Lobsters • Recommends

Conway's Game Of Life in APL (2009)

rgiaron Hacker News • Recommends

On “Conway's Game of Life in One Line of APL (2007)”

For an infinitely more relaxing experience of life in APL, may I recommend: link to this video I've watched it many times but I still expect him to mention happy little trees :)

sp332on Hacker News • Recommends

On “Alan Kay on “What Made APL Programming So Revolutionary?””

I always liked this example: Conway's Game of Life in One Line of APL link to this video It's esoteric as one-liners tend to be, but I think it's a fascinating glimpse.

hhas01on Hacker News • Recommends

On “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: link to this video For all its mechanical advances over the last 40 years, it’s shocking how far our technology has regressed philosophically.

conoveron Hacker News • Recommends

On “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: link to this video

moonchildon Hacker News • Recommends

On “J Notation as a Tool of Thought”

> 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. Here1 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 life2 and sudoku3. > 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…

sgroveon Hacker News • Recommends

On “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!) link to this video

u/z500in r/ProgrammingLanguages • Mentions

On “Uiua: the most psychedelic programming language I have ever seen”

It does look ugly, but how many languages allow you to write Conway's game of life in one line?

u/iplaybass445in r/compsci • Mentions

On “What in your opinion is the most esoteric and difficult to learn language, tool or technology that sees serious use commercially?”

A fun related video, Conway's Game of Life in one line of APL.

Inaimathion Hacker News • Mentions

On “Omega programming language”

Heh. The traditional snippet associated with that argument is the Game of Life in APL. link to 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.

ThaddeusQuay2on Hacker News • Mentions

On “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 link to this video