Hacker News new | past | comments | ask | show | jobs | submit login
Try APL in your browser (tryapl.org)
54 points by adamnemecek on June 24, 2015 | hide | past | favorite | 27 comments



While we wait for the site to come back up please enjoy this amazing video showing Conway's Game of Life in APL: https://www.youtube.com/watch?v=a9xAKttWgP4


As far as I understand, the owners of the tryapl.org site also produced the linked YouTube video (the company is Dyalog LTD).

http://www.dyalog.com/

(The "Try APL on-line" http://tryapl.org/ is linked from the Quick Links there)

For anybody who didn't read any APL tutorial and who doesn't want to follow it step-by-step now, the video is a good introduction.

Even shorter introduction is the program that prints the multiplication table, the picture from their site:

http://www.dyalog.com/uploads/images/homepage/TimesTablesW.p...

The whole program is on the left, the output on the right.

Thanks jboggan.


That's it, I'm learning APL once I've figured out cl.


That was amazing, thanks.


What a pity this is down. If anyone wants to do the legwork of arranging it with the people who run the site, we could give this story a second run at the front page some day it might hold up better. Alternatively, if anyone at tryapl.org sees this, email us at hn@ycombinator.com and we'll try to help.

Sadly yet amusingly, the same thing happened before: https://news.ycombinator.com/item?id=4090097.


In the meantime, the Wikipedia article has a pretty interesting history of the language:

https://en.wikipedia.org/wiki/APL_(programming_language)

I got into APL for a while at Caltech in 1969, a year after I started programming. After the more verbose languages I'd learned (BASIC, Algol 60, and a couple of assemblers), it was fun to see how much could be done with so little code.

We had one of the IBM 2741 Selectric terminals with the APL keyboard and typeball, which made editing code a lot easier!

https://en.wikipedia.org/wiki/IBM_2741#/media/File:IBM2741.J...


This reminds me: I seem to recall that some years back, there was a research programming language announced here on hn. One of the distinctive features was that they used (unicode) symbols for the source. I wasn't aware of APL (and APL keyboards) at the time -- so didn't make the connection.

I think it was much newer, and more similar perhaps to haskell with latex for syntax, than APL. I remember the language was hosted in a trac[1] instance, and I believe it was a research project from a major US college, maybe Cornell?

Does anyone have any idea what I might be (almost) remembering?

I've tried searching, but I don't think it was a "show hn:", and either way, looking through all programming languages submitted to hn is a bit of a daunting task...

[1] trac.edgewall.org


Probably fortress[1] though the original website is sort of dead now.

[1] https://en.wikipedia.org/wiki/Fortress_%28programming_langua...


A podcast interview with Guy Steele wherein Steele talks extensively about Fortress.

http://www.se-radio.net/2006/11/episode-36-interview-guy-ste...


That might very well be it, thank you!


There is a Javascipt emulation available here. Its gnuapl and not Dyalog APL http://baruchel.hd.free.fr/apps/apl/


I had to check if 0÷0 = 1 in the light of an earlier thread which discussed the rationale for making 0%0 = 0 in the J language, successor to APL.

https://news.ycombinator.com/item?id=9750742

From the article in the above link:

>"The reason for wanting a definition for zero divided by zero is given by Falkoff and Iverson in The Design of APL as "it was deemed desirable to avoid an error trap in this case."

I think that both decisions are crazy. Any calculation that leads to division by zero is indicative of a conceptual problem, and the user should be alerted to this by an explicit declaration of error, not silent failure. I guess that this is mitigated by the fact that the languages are intended to be used interactively by individuals who know what they are doing.

As an alternative to the expensive, proprietary implementations of APL, one can also try NARS2000, which is a free, open-source, ISO/IEC 13751 Extended APL.

http://www.nars2000.org/


I find that division by zero usually satisfies some edge condition in practice, as you are usually dealing with lists of numbers in APL, and it doesn't really come up that often.

gnuapl is also FOSS :)


But which is preferable 0 or 1? Maybe something in between, or maybe even something surprising like -1/12? Which choice will lead to the least error in the long run?

NARS2000 comes with a pretty IDE.


If you like APL, you might like one of its cousins, K.

I've written a (buggy, incomplete!) K interpreter I call oK which similarly runs in your browser: https://github.com/JohnEarnest/ok

Here's a nice little program which calculates terms of the "look-and-say" number sequence:

http://johnearnest.github.io/ok/index.html?run=%2010%7B%2C%2...

And another rather infamous example program:

http://johnearnest.github.io/ok/index.html?run=%20%7B(x%3B%2...


I'd say, if you like APL, if you grok APL, you will not like J, K or anything that does away with the beauty and power of notation as a tool for thought.


Do J and K really do away with notation as a tool of thought?

I don't know much J, but my understanding of K is that it simply maps APL's functionality onto ASCII - and imo this transformation doesn't impact notation, especially once you have spent a decent amount of time reading it.


Two quick comments. One, there's been a lot of primitives added since I knew APL some decades ago, some of which would be rather hard to type with a 2741 selectric (equals underbar slash?), and some like jot-dieresis and tilde-dieresis where I think they were just really bored one night and trying to think up the silliest possible overstrikes. Two, how do you get rid of the "pop-up APL keyboard" once you pop it up? Hint: you don't need it, click the Primer tab and you can enter symbols from there.


To get rid of the keyboard, just hit the "APL Keyboard" button again.


It seems like they weren't ready for HN traffic.


Shoulda written it in Go.


Touch screens on mobile devices offer a potential workaround for the friction created by APL's special keys. There's even a keyboard already out in the wild:

https://play.google.com/store/apps/details?id=gemesys.keybrd...


although weirdly hard to find

https://play.google.com/store/apps/details?id=com.athoraya.a...

is a much better, modern, apl keyboard


It's down (tried from 2 countries)


Still is.


Neat project for a interesting programming language. I like it.


1) Replace keycaps 2) Replace software key map 3) Profit!!!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: