
Conway's Game of Life in one line of APL - rbanffy
http://catpad.net/michael/apl/
======
cubey
Needing a multi-thousand line explanation in English for one line of source
code. Oh my.

<http://www.literateprogramming.com/>

"Let us change our traditional attitude to the construction of programs:
Instead of imagining that our main task is to instruct a computer what to do,
let us concentrate rather on explaining to human beings what we want a
computer to do."

~~~
michael_dorfman
That's a nice sentiment, but it doesn't really fit the case at hand. The
multi-thousand line explanation is only necessary for people who don't know
APL. Once you are fluent in the language, a one-liner like the one shown
requires very little explanation-- consider it the APL equivalent of the
Ruby/Rails "blog in 10 minutes" demo (especially if you avail yourself of the
7 minute video I linked to elsewhere in this discussion.)

Each glyph in APL represents a conceptual construct, so the language is quite
expressive of programmer intent--much moreso than many other languages I've
used.

~~~
code_duck
Its similar to the conciseness of Chinese vs. Romance languages. Chinese is
great if I know Chinese, but which would you rather learn from scratch -
Chinese or English? For human communication languages, it's generally agreed
upon that languages with countless glyphs are more difficult to learn than
languages with an alphabet.

------
forkandwait
We have inherited a bunch of "J" code at work (J is the ascii successor to
APL). While I can see the esoteric appeal, I think J/APL is at best a concept
language, useful for exploring a syntactical idea. The email list is full of
hobbyists going on about how they shaved three characters off of a ten
character program that calculates every other prime number... or whatever. The
other favorite topic is why APL is "mathematical" notation for computers, even
though you can't use it derive new theorems or simplify exposition.

If you ask me, APL was great in its day (1965-1985) because it was the only
language that natively handled vectors and matrixes, but once Matlab and S
came on the scene it immediately became an evolutionary dead-end.

Yuck.

~~~
Qz
My father uses J in financial investing. He makes a shit-ton of money.

~~~
burgerbrain
We know it's still used in certain niche markets, but that doesn't imply that
as a language it isn't a dead end.

------
michael_dorfman
This video does a nice job of explaining how to write a one-line Game of Life
in APL: <http://www.youtube.com/watch?v=a9xAKttWgP4>

------
burgerbrain
APL, the most esoteric non-esoteric programming language there is.

------
rbanffy
Also teaches a lesson to anyone who calls Perl a write-only language ;-)

------
orjan
So, now we know where Minesweeper comes from.

