Hacker News new | past | comments | ask | show | jobs | submit login
GNU APL 1.3 (gnu.org)
122 points by lelf on March 29, 2014 | hide | past | favorite | 40 comments

About Ken Iverson, author of APL, who was at age 84, working on J when hit by a fatal stroke:

Ken didn’t get tenure at Harvard. He did his five years as an assistant professor and the Faculty decided not to put him up for promotion. I asked him what went wrong and he said, “Well, the Dean called me in and said, ‘the trouble is, you haven’t published anything but the one little book’”.

The one little book later got [him] the Turing Award.:


If you're interested in getting a taste of APL while keeping in ASCII, you might want to check out the J programming language. Ken Iverson (the creator of APL) had a hand in its development. J implements most APL operators and is sometimes known as its successor, along with K and Q.

Get started here: http://www.jsoftware.com/help/learning/contents.htm

This family of languages really leads to a new way of thinking, evident in the J incunabulum (the C interpreter that started J, purportedly written in one afternoon) [1]. The code looks really dense and borderline gibberish at first glance, but I found it very expressive after a good read.

[1]: http://www.jsoftware.com/jwiki/Essays/Incunabulum

Tracy Harms did a talk at Strange Loop about J: http://www.infoq.com/presentations/j-language

J was my intro to functional programming back in college.


Our professor was heavily involved in the parallelism parts of J (or so I remember). I can't say I enjoyed the class, nor did anyone else in our department. J is fun when you're taking the average of an array:

    avg=: +/ % #
Not so much when you use it to build a rudimentary CMS.

Whenever APL and it's ilk are discussed I tend to wonder, other than project Euler, what are good "little problems" to start getting your feet wet?

I decided once to write a C preprocessor in a clean C. Some weeks and 5000 lines of code later, I had many features of it done except functional macro resolution. By that time I've got substantially tired with manual memory management. So I shelved the project.

Then I started learning J, and after some time decided to implement a project in it. After some months I've got working an LR parser generator. I've got so impressed with J convenience - the whole thing was about 700 lines, majority of that was comments and I was writing really simple J, as I was just learning it. You can check out some preliminary notes about parser generator building (only the beginning of the process) here - http://www.jsoftware.com/jwiki/AlexMikhailov/Parsing .

I think J could be much better - by certain criteria - suited for many real projects. And I have other examples as well.

Thanks for the comment! I'll have a look at the link.

Most business school problems (e.g. linear programming) are easily translatable.

I liked redoing my machine learning homework in J.

That code is pretty well messed up, but it is straightforward. For anyone that wants to read it just be aware that it uses old style parameter type declarations.

My favorite example of APL: https://www.youtube.com/watch?v=a9xAKttWgP4

It's official. I am a total gumby. There are minds out there that are to mine as the entire city of New York is to a house brick and half a bagel. And they're all using APL.

I'm quite amazed how the author has not made any mistake in the presentation. I wonder if using APL leads to a different state of mind where tool is out of your way or was it simply a well rehearsed demo?

My prof also writes complex APL code live and I've never seen a program he made that didn't run or had a bug. He has a I ❤ APL sticker on his laptop. And he is a god damn genius, we can't compare us to him in absolutely no, no way. It doesn't lead to a different state of mind, that guy was already born a genius a little like rainman, but without the downsides.

He switched to J after I showed him that a few years ago and is ever happy since. He told me that he paid about 2000bucks for his APL compiler back then.

It does. I programmed in an APL 'derivative' (Q) for a while, it's quite easy to get the hang of it. The problem is that it's write only.


Kona is free and would give people a flavour of this style of programming (minus the database tools).


J is mentioned by another poster below (EDIT)

Grandparent post: if you are half a bagel and a housebrick, this stuff makes me feel like a few grains of sand and a peanut.

I suspect it was mostly the later. ;)

Nonetheless, because array programming requires unorthodox input and is sufficiently different than popular paradigms, authors typically write slower which may explain the deliberateness.

Love it, too. I used the vector-recurse-eval trick for drawing a Mandelbrot set in APL (Gnu APL, specifically)

Very interesting. I didn't know a GNU APL existed. Looks like it's a quite recent, from-scratch implementation mainly by one author, with its first release only a few months ago, in September 2013: http://lists.gnu.org/archive/html/info-gnu/2013-09/msg00014....

The author, Jürgen Sauermann, doesn't seem to have a web-presence; would be curious what else he's up to, besides singlehandedly launching a new APL implementation. Is it a hobby project? Motivated by an existing APL codebase? Part of a research project? He must have quite some experience with APL, since he wrote a PhD thesis on a parallel APL system 25 years ago: http://genealogy.math.ndsu.nodak.edu/id.php?id=63307

Just in case anyone is interested, Unicomp is still selling APL-keyboards and keys (for Model-Ms). http://pckeyboard.com

You can try GNU APL 1.3 with my online compiled-to-javascript version (I used emscripten for compiling it): http://baruchel.hd.free.fr/apps/apl/i/

The page is customizable with 5 colours: try http://baruchel.hd.free.fr/apps/apl/i/#c=0000001E2C3363A209F... (you will probably need to force reloading the page) or http://baruchel.hd.free.fr/apps/apl/i/#c=4E525D687389ECEAEDF...

(choice of 5 colors from Adobe Kuler website).

Am I the only one who thought they just released an updated version of a license?

That's what I was thinking (confused) until I read your comment...

So does this require special a keyboard ? How does inputting those special symbols work. Are APL's typically JITed ?

You can use a standard keyboard, if you learn the mapping or get key caps. http://www.rexswain.com/aplkeyb.gif

> Are APL's typically JITed ?


APL and vim have a similar outlook in that they both give their users a set of simple, easy to apply, and composable functions, that can then be used, in the hands of experts, to manipulate their underlying data structures with awesome suppleness.

Watching the vid linked by gfosco I was wondering this myself. It is an interesting comparison.

At first I thought this was referring to the Affero Public License, and thus was extremely confused.

This would be cool if you weren't required to be a build tools dojo to use it. Windows binary please! Complete working stand alone binary. Then it might make an impact.

They distribute a 32-bit .exe of APL that should run under Cygwin. ftp://ftp.gnu.org/gnu/apl/apl.exe

Hmmm, I just looked up Cygwin to see what it is and what I learned is that the barrier to using GNU APL is too high for me with the time and knowledge I have available. I'll bet that's true for a whole lot of other people that would otherwise benefit from APL.

I just hope that someone outside of GNU APL with the ability to make a normal Windows install package isn't as enamored with Windows barriers and would like to see APL proceed. And I hope the GNU license restrictions allow for that.

May be you can be interested in learning J? jsoftware.com has a nice installer for it, very few dependencies, small package. And I believe Ken Iverson thought J could be more logical than APL - in some aspects, which were learned while developing APL.

Core GNU seems to often be quite passive-aggressive about its Windows support.

I think it's part of their philosophy. They don't want to encourage people to use a non-free operating system.

edit: also, supporting windows is a lot of additional work

> also, supporting windows is a lot of additional work

Yeah, GNU tools are generally written to assume a Unix-like environment. As a result it's relatively easy to port them to anything Unix-like (the BSDs, OS X, etc.). On Windows, Cygwin provides a Unix-like environment, so it's relatively easy to port things to there as well. But to making things work on "native" Windows requires a bunch of Windows-specific porting. That isn't impossible (e.g. GNU Octave has a Windows port), but it requires there being Windows developers interested in volunteering to do it.

I also think it's because of their philosophy. We now have VirtualBox, Cygwin, etc. So I think it's OK to keep this philosophy.

Also Microsoft isn't doing themselves any favors by not supporting C99 in MSVC, though 2013 is supposed to be much closer.

Windows seems to be quite passive-aggressive about designing everything to require its own proprietary components.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact