I don't think it's superior, it just has my preferred environment out of the box. Nice interface, up arrow gets the last executed command, runs in my browser (bonus for me). RIDE just feels "claustrophobic"
Btw, is it possible to have a second pane open in RIDE? For sending output there (instead of having one window for input & ouput). It'd possibly be nice to have an arbitrary amount of panes open on different threads too.
Actually yes, but that's not why I want it. It'd be nice to have an arbitrary amount of (possibly) related problems in view at once - at least for me. I usually define functions in projects that don't rely on but extend from the ideas of others
I don't mind it too much, but for example today I messed up an outer product and got loads of output in the log. It's not exactly unusable but I can feel my CPU struggling a bit a more every time I hit return on a new expression.
Either there, or (assuming you're not using RIDE 4.3 on macOS) in the environment variable area of the start screen, or as an normal system environment variable.
However, many prefer ⎕IO←0 and most use it at times (it is especially useful when dealing with number bases). If you don't know exactly what code will call what, it is wisest to localise ⎕IO (to whichever value) unless you're sure your code doesn't need it.
@FawnLocke Thank you so much for your report about TryAPL being slow. I managed to narrow it down to a bug in a member of dfns.dws and I've now added code to TryAPL so it patches that.
The code was trying to identify the naming of a dfn, so it looked for ←{ but caught the inner ⍺←{. I amended it to look no further than after the first {
Fun thing that since I can't change the dfns.dws that's included in the off-the-shelf docker container, I instead "hot-patch" the code by getting the code representation, running a regex replace on that, and re-fixing it.
the problem is not so much in 0-based systems (which computer scientists like) or 1-based systems (which mathematicians like). The real problem is with ⎕IO setting a mode. Your code behaves differently depending on the mode your system is in at the time, unless you reset the mode just before running your code. This aspect of APL is thus not purely functional, because there are contexts and side effects. I suppose that at this point ⎕IO is legacy and we have to live with it.
I suspect that zero-origin became more common when languages that implemented array indexing as exactly equivalent to pointer math came into wider use. When I first got involved in programming, C was not yet the "hot" language, and 1-origin was essentially assumed. I was exposed to APL before I was exposed to C, and ⎕IO was a novelty, one which I thought was interesting, but wasn't sure I saw the use for. I generally (and still do) code with ⎕IO being assumed as 1.
@KamilaSzewczyk I don't know (because I am an engineer, not a mathematician) but that is my perception. Search for the word "zero" on this page: en.wikipedia.org/wiki/Natural_number
Algol and Pascal also have 1-based arrays, though some Pascal dialects make that configurable. See also: en.wikipedia.org/wiki/…
According to that Wikipedia page, Edsger Dijkstra is responsible for pushing languages to be zero-based. https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html
@Adám I agree that Dijkstra's argument is not compelling. By my personal experience, C had a big influence on the zero-based approach. C was meant as a very efficient high-level (by the 70's standards) system programming language. Computers had to be very efficient in using memory, so arrays were just pointers and the PDP architecture had offsets and increments built into the hardware.
I agree with Alex. I don't think there are any strong arguments one way or another, nowadays it's just convenient to implement IO←0. ⎕DIV is much worse imo despite being less "harmful"
@AlexB I'm going to set up a website where people can rank them, and then we'll find a few finalists using Ranked Choice Voting. If there's a clear non-apple winner, we'll use that. If there's a clear apple-based winner, we'll use that until we get sued by Apple, bask in the publicity, then fall back to the next winning non-apple logo. Depending on outcome, we may need a second round to decide on variants of the winner.
For a lot of everyday practical problems, ⎕IO←1 is clearly superior, but for many things, especially those that involve (implicit) modulus arithmetic, ⎕IO←0 is a must.
@Adám my 2 cents on "apple" in the logo: I doubt that Apple Corp can do anything about this because APL's usage of the apple in the logo is probably very old. If anything, I don't know if this is good for APL, because people will associate the language with a company and/or get confused.
Nice @Adám! Should also something mentioned about identation (using tabs or spaces) and the position of { and } on seperate lines or not. And the use of whitelines? Or is it a custom around APL programmers to leave it to the programmer?