
GNU APL 1.0 - lelf
http://www.gnu.org/software/apl/
======
beagle3
APL is very nice. If you find it interesting, there are two descendants:

J, which drops the special characters in favor of ASCII, and tries to retain
(and improve on) APL's elegance with respect to math.

K drops the special characters and a lot of the data structures, functions,
operators and syntax, and tries to be as pragmatic as possible (including
speed).

K programs tend to be 30-50% shorter than the equivalent J or APL program, and
much faster than APL (although comparable to J).

If you prefer Ada or Pascal to C, or Haskell to OCaml, you'll like APL or J
better.

If you prefer C's shorthand to Ada's verbosity, and OCaml's pragmatism to
Haskell's purity, you'll like K better.

I like K better.

~~~
robomartin
> J, which drops the special characters in favor of ASCII, > K drops the
> special characters and a lot of

I've covered this at length before [0][1][2][3].

Calling J and K improvements over APL because they do away with APL's symbolic
notation (which is a powerful tool for thought) is like saying that
transliterating an orchestral score into randomly chosen ASCII characters is
an improvement. Let's take the whole note and represent it with an "o", a half
note will be ".", eight is ",", sixteenth is "`" and so on. Let's also ASCII-
fy all other elements of the notation. Slurs could be a grouping of the above
characters between parenthesis, like this "(o,,,,````````..). I could go on.

It's ridiculous.

Musical notation is a fantastic tool for the expression of, well, music and if
you know it well, it is one of the tools you use to think about your music.
You can read it, write it, sing and imagine the music in your mind, all from
this notation. APL is the same. If you know it. If you don't take the time to
master musical notation it is either gibberish to you or it is really thick
and dense, almost impenetrable and decidedly useless as a tool for thought.
The same is true of a language like APL.

J came at a time when doing custom notation was difficult. In the early days
you had to use specialized terminals (as in real terminals, not terminal
emulation software) and go as far as installing custom ROMs in graphics cards
in order to be able to display the custom font. In that context it is easy to
imagine someone thinking that ASCII-fying APL was a good idea. And, in the
process, rip out the most important tool in APL: the power of notation.

I'll have to play with GNU APL. I am glad to see this happen. Not necessarily
thrilled that it is written in C++. This could open the door to exponential
gains in programmer productivity [4] for writing web applications. As I
mentioned in [1] there's a huge list of evolutionary changes that could really
take the APL concept to a whole new level. Who knows, maybe this is the start
of a comeback of sorts.

[0]
[https://news.ycombinator.com/item?id=6116911](https://news.ycombinator.com/item?id=6116911)

[1]
[https://news.ycombinator.com/item?id=6117346](https://news.ycombinator.com/item?id=6117346)

[2]
[https://news.ycombinator.com/item?id=6119314](https://news.ycombinator.com/item?id=6119314)

[3]
[https://news.ycombinator.com/item?id=6119221](https://news.ycombinator.com/item?id=6119221)

[4] An experienced, capable and well-rounded APL programmer can easily do the
job of five to ten programmers in C-like languages. The productivity gains are
hard to believe until you've experienced both ends of the scale yourself. As
an experienced C programmer I could never even hope to produce code fast and
accurately enough to keep up with what I could do in APL with just a few lines
of code. It's not about coding speed but rather the speed at which ideas can
be translated into working solutions.

~~~
Lobachevsky
When it comes to notation, there is always a tradeoff. The question is, what's
worse?

In my meager opinion, APL was plagued with acceptance problems from the very
beginning. Note that acceptance is a very personal thing, free of such diverse
distractions as logic, reason, the right thing, and so on. Having used APL for
nearly 40 years and having made a decent living with it for nearly 35 of them,
looking back, a significant fraction of my projects could be called "APL
Exit". Whether it was a customer leaving a timesharing service for something
cheaper, or a corporate mission to migrate to a different, allegedly standard,
technology, APL was being replaced by something else. The language was thought
to be declining, dying, no longer taught in university, not commonly known,
and so on.

Arguably, two items which didn't help APL's acceptance were the usage of
strange and Greek symbols (of which there were five?) and an order of
execution which contravened that which was learned in third grade. This is not
to say that they were worse, just not accepted. Nor is it to say that J, K,
and Q's notation is better or worse - that is largely a matter of personal
taste and maybe technical upbringing. Maybe a thoughtfully ASCII-
transliterated APL where the scheme did not play second fiddle to the
"genuine" APL characters (APLUM and STSC APL Plus PC come to mind) would have
boosted the acceptance level to the point where APL would still be growing. A
large user community vs. a better notation? What's worse?

Back to GNU APL, I'm very pleased to see that this finally happened, and
really do hope that this is a start of a great comeback.

PS: I am happy that GNU APL is not written in Java.

~~~
gruseom
Thanks for this excellent comment. I hope you stick around; we need more
contributions from experience around here.

Since you worked with APL so intensively for so long, would you care to
describe what you think is good about it? And how it differs from more
familiar approaches? (Apart, of course, from charset and order of operations.)

~~~
Lobachevsky
I started learning APL (it was a cut down APL\360 with 32K workspaces) in the
mid 1970s. My first language was Fortran. When I started with APL shortly
afterwards, at first I thought it was a sort of continuation of array studies.

What's good about it?

\- APL lends itself well to a kind of incremental learning. You don't need to
know that much to get started solving problems. Learn as you go, the learning
curve is as steep as you want it to be. No hurdles, just a consistent slope.

\- APL abstracts away a lot of the mindless tedium of conventional
programming. Having said that, there are rewards (like execution speed) for
programming in something like C. Speed is sometimes less important these days
than it was in the mainframe days

\- APL is an excellent prototyping environment. You can concentrate on getting
the right answer and understanding what you are doing, then later, moving the
solution to the standard, approved language of your choice.

\- APL lends itself to the construction of simple DSLs (Domain-Specific
Languages). What is lost in flexibility is made up in ease.

\- APL itself is an excellent learning tool for quickly learning the domain
area you are working in. As it encourages interactive, exploratory programming
(as does J, K, Q, R, S, Matlab, and so on) learning the domain area (i.e.
Physics, Finance, linear algebra, writing a parser, etc.) can be much easier
and fun.

I had a passion for APL which continues even today - I could not muster any
such passion for say Java.

------
rrreese
>GNU APL is made up of about 50,000 lines of C++ code

A GNU project in C++, isn't this unusual?

EDIT: Today the GNU Coding standards says [1]:

"When you want to use a language that gets compiled and runs at high speed,
the best language to use is C. C++ is ok too, but please don’t make heavy use
of templates. So is Java, if you compile it."

Using the WayBack Machine to 2004 [2]:

"When you want to use a language that gets compiled and runs at high speed,
the best language to use is C. Using another language is like using a non-
standard feature: it will cause trouble for users. Even if GCC supports the
other language, users may find it inconvenient to have to install the compiler
for that other language in order to build your program. For example, if you
write your program in C++, people will have to install the GNU C++ compiler in
order to compile your program.

C has one other advantage over C++ and other compiled languages: more people
know C, so more people will find it easy to read and modify the program if it
is written in C.

So in general it is much better to use C, rather than the comparable
alternatives."

[1]
[http://www.gnu.org/prep/standards/standards.html](http://www.gnu.org/prep/standards/standards.html)

[2]
[http://web.archive.org/web/20041010060657/http://www.gnu.org...](http://web.archive.org/web/20041010060657/http://www.gnu.org/prep/standards/standards.html)

~~~
brokenparser
Back in 2004, trying to compile C++ with g++ was like trying to skin a cat
with a toothpick. It just gets really tedious after a while.

~~~
dllthomas
Maybe C++ written against other compilers... I never had any problems working
on (large-ish, not huge) C++ code bases written against g++ (and making good
use of definitively C++ features like templates).

------
lelf

      life←{                                  ⍝ John Conway's "Game of Life".
          ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵  ⍝ Expression for next generation.
      }
    

[http://www.youtube.com/watch?v=a9xAKttWgP4](http://www.youtube.com/watch?v=a9xAKttWgP4)

~~~
gtani
my first programming job (as in 12-14 hours/day) was mostly IBM APL2, some C
and fortran (we often built parallel models that had to tie out to the penny).
That's actually pretty idiomatic (doesn't use any language extensions from
STSC, Sharp or IBM) but, um, I can't understand it.

BTW, the last time i checked (the 90s?), the only decent book for learning APL
was Polivka/Pakin, but doesn't seem readily available

[http://www.amazon.com/s/ref=nb_sb_noss_1?url=search-
alias%3D...](http://www.amazon.com/s/ref=nb_sb_noss_1?url=search-
alias%3Daps&field-keywords=apl+programming&rh=i%3Aaps%2Ck%3Aapl+programming)

~~~
protomyth
Is this the book? [http://www.amazon.com/P-L-Prentice-Hall-automatic-
computatio...](http://www.amazon.com/P-L-Prentice-Hall-automatic-
computation/dp/0130388858/ref=sr_1_1_title_0_main?s=books&ie=UTF8&qid=1380308221&sr=1-1&keywords=0130388858)
or this [http://www.amazon.com/Edition-Polivka-Raymond-published-
Pren...](http://www.amazon.com/Edition-Polivka-Raymond-published-
Prentice/dp/B008DM6Z1K)

~~~
gtani
it's the first one, I think, mine had a red cover.

------
julienchastang
I would really like to see an APL interpreter on an iPad or tablet device.
Running APL on such devices where virtual keyboards can be customized would an
interesting possibility for dealing with the APL glyphs. If only I had the
time… Also +1 for ngn APL.

~~~
cabacon
I mean, the J Software app is basically that, although J instead of APL. The
terseness makes for a pretty good programming environment despite the slow
input speed of the virtual keyboard. You don't get the unicode APL
customisation you're talking about, but it's pretty close.

------
cromwellian
When I first read the title, I thought it was some new license they were
announcing. ;-)

~~~
samatman
I parsed this as a 1.0 release of the Affero General Public License. The GNU
AGPL, rather than GNU APL. Easy mistake to make.

~~~
wslh
I made the same comment! it's how the "acronym brain" works.

------
lelf
Release announcement [http://lists.gnu.org/archive/html/info-
gnu/2013-09/msg00014....](http://lists.gnu.org/archive/html/info-
gnu/2013-09/msg00014.html)

| Hello,

| I am happy to announce that, after a few years of development, GNU APL 1.0
has been released.

| APL is an ancient programming language.

| GNU APL has the latest and greatest features (nested arrays, complex
numbers, shared variables) and is intended to be a full implementation of the
ISO standard 13751 "Programming Language APL, Extended".

------
terminalcommand
APL looks like an interesting language. I am not very good at math, but the
APL keyboard looks exciting, rather than frightening.

[http://en.wikipedia.org/wiki/File:APL-
keybd2.svg](http://en.wikipedia.org/wiki/File:APL-keybd2.svg)

~~~
Posibyte
APL was one of those languages they shown us in college to be "A terrible
thing, so be grateful for new languages like C."

Looking at APL here, it actually looks really interesting.

~~~
beagle3
> "A terrible thing, so be grateful for new languages like C."

While a common sentiment, it has about as much merit as saying: "look at those
japanese characters. You can't read them, therefore japanese is a terrible
thing".

------
antirez
I didn't tried too hard, but for 5 minutes I tried to find who is the author
and failed. It is not good that GNU does not put some emphasis on people
writing the software, I just see "GNU" everywhere and a citation of Stallman
in the front page. Credit is due and is an important part of free software.

~~~
verroq
His name is in the man page (in the source, did you look there?).

Also if you read this whole thread before commenting, you would have seen the
project's very recent announcement on the GNU mailing list.

[http://lists.gnu.org/archive/html/info-
gnu/2013-09/msg00014....](http://lists.gnu.org/archive/html/info-
gnu/2013-09/msg00014.html)

No, Stallman isn't trying to steal Juergen Sauermann's work.

------
shaunxcode
for anyone interested in "modern APL" check out
[https://github.com/ngn/apl/](https://github.com/ngn/apl/) runs in
node/browser and has good interop functionality so you can use APL where it
makes sense.

~~~
imsofuture
Or [https://github.com/openj/core](https://github.com/openj/core) \-- the
GPL'd source to J. It's definitely not written in javascript, but you can use
ASCII!

------
useful
I use APL daily because our production codebase is based on it and we are
(thankfully) phasing it out. Imo, it's a giant calculator and has no place in
production code

------
wslh
Initially I thought it was new license! just after looking at the comments I
realized it was about the language.

------
tokenrove
Someone needs to start a twitter account that tweets APL one-liners (or tell
me about it, if it already exists).

~~~
TheZenPsycho
and a browser extension that executes them in place.

------
fafner
Is there no public version control (git, bzr, svn, cvs, hg, whatever) for this
or am I blind?

~~~
tjr
[http://savannah.gnu.org/projects/apl](http://savannah.gnu.org/projects/apl)

~~~
fafner
Thanks. Should probably be linked to on the homepage though...

