Hacker News new | ask | show | jobs
by kelas 246 days ago
oh, gosh. sorry for your loss.

if you don't mind me asking, do you also remember the day when you wrote some non-trivial program in any language and it "worked" the first time, whatever that means (i presume "correctly")? what was the language? are you sure you've made a full recovery from that shock as well?

on a serious note, APL (and, by proxy, its descendants) invented REPL (dubbed "dialogue approach") long before the people who coined "REPL" even came to be. When that happened, C lanugage wasn't around either. Fortran was, granted, and sure enough it "worked" every time. you didn't even have to try, just punch it up on a punchcard, stick it in, wait a while. done. flawless.

on a closing note: writing correct programs takes skill and happens in iterations. the faster you can iterate, the faster you can justify your money's worth. the less you type, the more you think. less code less bug.

does that help?

2 comments

What I mean by "worked" in this context is compiled/parsed[1] without error and had correct behaviour when executed.

I have been programming professionally for about 30 years at this point, so it has happened to me literally hundreds of times at this point in at least 10 other languages- in fact in some languages (especially Haskell and Rust) I would say it's the norm for me rather than the exception to have the code work correctly if it passes compilation (which is sort of the point of strict type systems obviously).

It literally only ever happened the one time in kdb which is why I remember it so vividly and not in those other languages.

I have no idea why you thought your closing note might help, but sure.

[1] Depending on language obviously.

>on a serious note, APL (and, by proxy, its descendants) invented REPL (dubbed "dialogue approach") long before the people who coined "REPL" even came to be.

While I have enjoyed learning array languages, and think they are still underrated, Wikipedia seems to disagree with this statement above.

According to wikiepdia, REPL seems to have been coined after Iverson created his notation, but before the first APL was ever written.

https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93prin...

> seems to disagree

no, actually i think Wikipedia got it right:

  "The 1974 Maclisp reference manual by David A. Moon attests "Read-eval-print loop" on page 89, but does not use the acronym REPL.[7]
  Since at least the 1980s, the abbreviations REP Loop and REPL are attested in the context of Scheme.[8][9]"

The first APL interpreter was implemented on System/360 in 1965. Iverson got a Turing in 1979.
> In 1964, the expression READ-EVAL-PRINT cycle is used by L. Peter Deutsch and Edmund Berkeley for an implementation of Lisp on the PDP-1.

If you're arguing that "Read-Eval-Print cycle" doesn't count as REPL, then it pretty strongly undercuts your argument that "dialog approach" is.

And 1964 predates APL implementation.

> If you're arguing that "Read-Eval-Print cycle" doesn't count as REPL, then it pretty strongly undercuts your argument that "dialog approach".

no, thankfully, it doesn't, and here's why. as i elucidated above, PDP-1 was indeed a revolutionary "el cheapo" computer, which DEC managed to ship over 50 units of. it gave birth to hacker culture, just because it had to be hacked with all kinds of peg legs in order to be useful. now, to the point:

1. PDP-1 is mostly remembered for Spacewar!, a groundbreaking space combat game invented by a dude who also coincidentally invented large parts of LISP while on IBM payroll.

2. APL, after its debut in 1965-1966, had its first official application to teach formal methods in systems design at NASA Goddard Center.

My point should be obvious, but just in case:

in our line of work (between sessions on Hacker News) we are sometimes faced with the concept of "production" (usually on Friday afternoons). this idea really matters. it makes all the difference between fooling around and the real deal.

therefore, as it must follow, and as i mentioned much earlier, APL was and remains the very first real REPL system, although they didn't really use that terminology. all i meant is that in 21st century people take Chrome's devconsole, ipython, node, zsh for granted. with completions, hints, all that.

(in APL'esque family, by the way, there's hardly anything to hint or auto-complete. mathematics doesn't work that way. by the way, not coincidentally, one of the most successful modern descendants of APL is called Wolfram Mathematica)

are we on the same page?

ok, you have a point there. all 53 PDP-1s were "cheap" computers compared to IBM stuff (only $1M, adjusted) and used paper drum instead of punch cards. that was a nightmare to deal with, so people were buying IBM M typewriters to punch stuff in. Although Deutsch and Berkeley's LISP was in large part a copycat of IBM's LISP, people were indeed typing in LISP expressions in a REPL'ish manner. But if you ever saw a line of LISP, you can imagine what kind of "REPL" that was. "Miss one paren" comes to mind :)

APL\360 used a much more advanced selectric with a dedicated typeball, was designed for a machine of a totally different class, and could not be compared to literally kilometers of paper containing mostly mistyped parentheses. it was TRULY terse, expressive and interactive.

but yeah, PDP-1 hackers technically got there first - they had no choice :) check this out:

https://s3data.computerhistory.org/pdp-1/DEC.pdp_1.1964.1026...

6-7 Input and Output, System Operation is where the READ-EVAL-PRINT is indeed mentioned. but if you read the entire paragraph, and the next one ("if the system drops dead" lol) you'll agree that PDP-1 "REPL" was hell on earth, at the very end of the manual there are some really juicy REPL expressions :)

LISP was a torture compared to short and powerful APL notation.

less code less bug.