Skip to content

Comment on Conway's Game Of Life in one line of APL

Comments

"one line of APL"? He was coding for 7 minutes, on many lines...

edit: also my first time seeing APL, very neat stuff.

Most of it was just messing with APL's REPL to build up the less than 3 lines that actually mattered.

That's why I like languages with REPL-like functionality (Lisp, Python, Haskell, etc) so much. It makes for much faster debugging/development loop.

Whenever I code Java/C, I always end up using a tiny 'Testing' file (on the side of my real project) with lots of print statements that serves as a poor man's REPL. But it's still much slower.

> Most of it was just messing with APL's REPL to build up the less than 3 lines that actually mattered.

Fair enough, and good to know. It was a very cool demo, I just don't care for the "in one line" or "in fifteen minutes" nonsense.

Work is constant, effort varies (defining effort to be work (useful stuff) plus time wasted to get the work done). By this definition, work will take constant time. He just did a lot of work in one line, so it took quite a while to write that one line.

With different programming languages and different skill levels, you have a different amounts of "wasted time" to do the (constant) useful work.

The person doing the YouTube video wasted almost no time (a couple of typos). If I were to do it, I would have a lot of wasted effort since I never was very good at APL and time has not improved that.

Yeah, I'm not denigrating the video itself, just the title used here on HN (which does not appear on the youtube page).

Understood. My comment was an insight that occurred to me as a result of your comment. The insight is that programming "work" is very much like physics "work"

work = effort * distance

In physics, if you don't move something, you have done no work (even though you are sweating and out of breath). In programming, if all you do is write boilerplate stuff, you have not done any work because you have not advanced toward your goal.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.