Comment by seanhunter

4 months ago

At one time I briefly spent a bunch of time learning kdb/q. I remember one particular day when I wrote a non-trivial program and it worked first time. I was so shocked I thought I must have suffered some kind of brain aneurism or something.

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?

  • 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.

      3 replies →