ELI – A System for Programming with Arrays
fastarray.appspot.com
fastarray.appspot.com
The following is an example of quite readable ELI with only a handful of symbols:
c,[1.5]32+1.8*c<-$_10+5**!10
It's not bad, but when all you have is ASCII, dense notation will inevitably look like line noise.APL's graphical notation was one of its original inventions, but custom keyboards weren't a viable solution in the PC era... But today the situation is different again. High-DPI displays and touch screens are becoming standard.
Would it be possible to reinvent APL notation to take advantage of high-res graphics and natural input methods? I'd love to see a tablet-only reinvention of APL that doesn't have a keyboard at all, just a number pad and painted gestures.
Mostly true, but there are languages which are completely useless without becoming proficient with them. In my experience Forth and J are such languages: you can "learn about" them, but you won't really understand them without using them for some time. So I suspect APL, K, Q and Eli here are similar; the question is what will I gain from becoming proficient with one of them or alternatively is it worth becoming proficient in one of them if I'm already proficient with another.
Most text editors operate text substitutions (like "<-" turning to "←" automatically), so ASCII doesn't seem inevitable anymore (and I believe it's even truthier with virtual keyboards).
I worked in a company where APL used to be very strong (large french truck manufacturer) and they even had lots of programs written in Scheme for assembly-line optimisations in the late 90s. Most of those have been rewritten (should I say... painfully rewritten, and now buggy) in Java in 2005.
I feel like APL/CLisps/etc. were the right solutions but developers/managers were/are scared when they saw some of the mathematical/proof concepts they had to use, and were afraid of when they learned about them at the university.
It wasn't because of scared management. It was because they were paying for language knowledge not business knowledge. What replaced it, mostly C++ and Python, had better tooling and a wider pool of subject expertise to draw from.
Imagine you're handed a tablet that shows such a program. At first glance it's a unique calligraphic image, but when you know the language you can also parse the data flow and manipulated types intuitively upon seeing the shapes. And since it's a dynamic digital document, you could zoom in, isolate parts, or even run "live coding" style experiments to see what the painting actually does.
For what I know, Hangul "glyphs" provide consistent encoding (see also: http://en.wikipedia.org/wiki/Featural_alphabet).
In Japanese Kanji the "elements" (Radicals, or Bushu, see here: http://en.wikipedia.org/wiki/Radical_%28Chinese_characters%2...) do _often_ work as semantic indicators (see for example Radical 85: http://en.wikipedia.org/wiki/Radical_85 which usually implies some connection with water or other liquids) but the connection may be obscure, or even look random - as an example (among hundreds) see 淋 where the radical for water, followed by two "tree" radicals means: "lonely, deserted, abandoned".
Something like "this large brushy swoop here is the part where all those matrices on the left are reduced, and then on the right we have these leafy things that map them into coordinates"...
revs = dot(dirichlet(alpha, NUM_SAMPLES), rev_by_category)
Net result - this draws NUM_SAMPLES dirichlet vectors, dots them with the rev_by_category vector, and generates a list of NUM_SAMPLES of the corresponding random variable.Or:
total_variation = var(data.flatten())
first_axis_var = var(mean(data, axis=0))
second_axis_var = var(mean(data, axis=1))
From what I understand, this is definitely idiomatic J translated to Python. In general, idiomatic numpy code will always be array oriented since that's (until recently) the only way to shell out to C.So from what I can tell, APL isn't dead. It's just spelled out in easy to read executable pseudocode.
I'd really like to bring this functionality to our web apps, but it seems HTTP interface and external APIs are not available in these implementations. How can you use ELi, or any APL, with a web app?
ELI site is down at the moment, but I read couple of their docs through google cache. There is support of compiling into C, but what about support for C interface? Or HTTP out of the box?
Hanfeng Chen
There are lot of recommended books about a selection of languages regarded as more powerful/expressive/safer than the mainstream, but there's not so much good information about APL, I don't think. Every now and then, I hear different people give a hint about APL's power (not too noisily though... as if they did not want to completely give away the secret :).
I keep wondering what problems are good fit for it. From far it doesn't look like a general purpose PL. To my untrained eyes it looks like some sort of query language that you can somehow bend into doing other things (in the same vein you can use SQL to render the Mandelbrot set [1] :).
And then there's the whole clones/successors/spin offs situation. If I were to learn APL today, I wouldn't even know were to start. ELI looks like a good candidate.
--
I hope to draw some idead from it (I'm triying to build a relational language)
I am now very comfortable with J, and I am checking out ELI for comparison. I like the idea of the compiler, however, in J the math routines are very fast, well-crafted c libraries, so the interpreter is very fast with results.