Array Languages: R vs. APL (2023)
jcarroll.com.au
Array Languages: R vs. APL (2023)
1–10 of 68 posts
Re: Array Languages: R vs. APL (2023)
#2I've looked briefly at R and found the syntax and semantics to be less than stellar. Obviously there's going to be some bias in that sentiment due me not generally doing "array programming", but I don't believe the things that irked me were entirely as a result of that.
The more annoying stuff for R is entirely second hand. As far as I can tell R (or at least R studio) maintains implicit state between runs which means you can get to a position where the same code works on some runs, and then not on later runs. My friend was having to do a lot of bioinformatics processing (many of the libraries for this are in R) and was constantly fighting to have code she wrote to process the data or produce charts (publications in bioinformatics have an acceptance bias for "looks like it came from R" that is similar to what CS [used to?] have for gnu plot). But you could run the same scripts on the same input and have it fail where previously it worked. This is before you deal with inter-version compatibility problems which also seemed frequent.
What was irksome to me looking at a lot of the stuff that were doing is that it was fundamentally mostly basic scripting stuff you could do in other languages trivially (and more cleanly imo) but there were a bunch of functions (builtin or from libraries?) that did the work, but those functions weren't in R, so the claims that R was "necessary" seemed fairly bogus to me.
[1] https://en.wikipedia.org/wiki/APL_(programming_language)#/me...
Re: Array Languages: R vs. APL (2023)
#3I personally think APL is wonderful simply because of the original APL specific keyboard [1] I've looked briefly at R and found the syntax and semantics to be less than stellar. Obviously there's going to be some bias in that sentiment due me not generally doing "array programming", but I don't believe the things that irked me were entirely as a result of that. The more annoying stuff for R is entirely second hand. A…
> [R/RStudio] maintains implicit state between runs...
That can be turned off and is, in fact, widely recommended to not keep one's workspace between runs. > This is before you deal with inter-version compatibility problems which also seemed frequent.
Yeah, that can be a problem with libraries (as it is with python dependencies). It really afflicts long-running projects. R has taken a cue from the python world there. renv the best way (IMHO) to maintain a reproduceable environment in R (https://rstudio.github.io/renv/articles/renv.html).R is nicely cogent in syntax and largely "just works" once you accept its idiosyncrasies.
Re: Array Languages: R vs. APL (2023)
#4An alternative test for this hypothesis might have been using the language J, which is an array language based on APL and by the designer of APL but only using ASCII characters.
Re: Array Languages: R vs. APL (2023)
#5I think software engineers often get turned off by the weird idiosyncrasies of R, but there are surprisingly unique (arguably helpful) language features most people don't notice. Possibly because most of the learning material is data-science focused and so it doesn't emphasize the bonkers language features that R has.
Re: Array Languages: R vs. APL (2023)
#6Re: Array Languages: R vs. APL (2023)
#7I had been wanting to sign up for exercism, and I love APL, so this was a good nudge. However, I'm browsing the language tracks, and I don't see APL. I see this post is from July 2023—has the APL track been removed since then? Or am I just looking in the wrong place?
> APL isn’t on the list of [Exercism] languages but I’ve seen it in codegolf (codegolf.stackexchange.com) solutions often enough that it seemed worth a look.
Re: Array Languages: R vs. APL (2023)
#8I had been wanting to sign up for exercism, and I love APL, so this was a good nudge. However, I'm browsing the language tracks, and I don't see APL. I see this post is from July 2023—has the APL track been removed since then? Or am I just looking in the wrong place?
From the post: > APL isn’t on the list of [Exercism] languages but I’ve seen it in codegolf (codegolf.stackexchange.com) solutions often enough that it seemed worth a look.
Re: Array Languages: R vs. APL (2023)
#9I personally think APL is wonderful simply because of the original APL specific keyboard [1] I've looked briefly at R and found the syntax and semantics to be less than stellar. Obviously there's going to be some bias in that sentiment due me not generally doing "array programming", but I don't believe the things that irked me were entirely as a result of that. The more annoying stuff for R is entirely second hand. A…
R is VERY VERY good at handling tabular data. Python can get kind of close with Pandas but IMO, it's still more awkward than base R data frames and way worse than data.table.
R also has a lot of built-ins geared for statistics and built by statisticians. If you're do it statistics there's value in not having to find a library or libraries that do that.
Re: Array Languages: R vs. APL (2023)
#10> "So, would APL be “readable” if I was more familiar with it? Let’s find out!" An alternative test for this hypothesis might have been using the language J, which is an array language based on APL and by the designer of APL but only using ASCII characters.
Well, at its core R is a Lisp (specifically, Scheme) but with a more traditional syntax (infixed operators, function calls, etc). And it’s fair to say the adoption of R has, indeed, been more widespread than that of Lisp.