Readit News logoReadit News
vincent-toups · 7 years ago
"There are a number of features related to lambdas that are present in other APL interpreters but that are NOT implemented in GNU APL. This includes multiple statements, guards, lexical scoping, and probably more. "

The absence of lexical scope is a big wart for me. I'm fairly familiar with J, having used it to do some Bayesian inference for some projects at work, and I eventually concluded that the language family is malformed, in part because of the absence of lexical scoping.

Seems like Dyalog APL does have this feature, which makes me want to take a look at it.

triska · 7 years ago
A nice overview of a few interesting Dyalog extensions is Direct Functions in Dyalog APL:

https://www.dyalog.com/uploads/documents/Papers/dfns.pdf

For example, you can write {expr} to introduce a Direct Function (dfn), where expr is an APL expression in which α and ω represent, respectively, the left and right argument of the dfn.

Dfns also support local definitions, and recursion with ∇.

vincent-toups · 7 years ago
Looks neat. After using J for awhile I've come to dislike the who monad/dyad thing. It must be an old Lisper thing, but I wish there was just a regular argument list and all the arguments had the same semantics.

I know in J you can used an array of boxed objects to "simulate" "normal" function definitions except that you don't get the rank behavior for those argument lists. Nothing prevents a language from having "normal" functions and also being able to support rank on each argument.

SwellJoe · 7 years ago
Googling for APL examples is now complicated by Amazon squatting on the same acronym for "Alexa Presentation Language". That's frustrating, as I'm interested in understanding APL a bit better, but I learn from looking at and tinkering with code that does things I already kinda understand how to do in other languages/paradigms.

But, I did find APL Wiki which has a lot of good examples of code that does small comprehensible things. https://aplwiki.com/FrontPage

bin0 · 7 years ago
I'd give "-alexa -amazon -presentation" a shot; see if that helps. Also maybe add "-site:amazon.com" or "-site:*.amazon.com" (pretty sure that one works).
smittywerben · 7 years ago
Another AWS friendly word is Lambda. Even more annoying is they have bindings for a dozen languages. So you need "Java lambda" and you get "Java AWS Lambda". I need like a law library for code, one that remembers longer than 2013.
sizzzzlerz · 7 years ago
When I was a young lad, the ink on my EE degree still wet, I worked with an older gentleman with a PhD, who used APL on an exotic computer with what looked to me like Sanskrit symbols (or space alien, for all I knew) on the keys. He gave me a couple tutorials but I never could wrap my brain around it. I lost interest and hadn't heard anything about APL for decades until now.

I am curious how the symbols used in the language are mapped onto a standard keyboard. Also, does anyone use APL in battle or is it mostly an academic toy?

lelf · 7 years ago
> how the symbols used in the language are mapped onto a standard keyboard

It’s more-or-less standard mapping (across APL implementations)

  $ apl

        ]keyb
  US Keyboard Layout:

  ╔════╦════╦════╦════╦════╦════╦════╦════╦════╦════╦════╦════╦════╦═════════╗
  ║ ~  ║ !⌶ ║ @⍫ ║ #⍒ ║ $⍋ ║ %⌽ ║ ^⍉ ║ &⊖ ║ *⍟ ║ (⍱ ║ )⍲ ║ _! ║ +⌹ ║         ║
  ║ `◊ ║ 1¨ ║ 2¯ ║ 3< ║ 4≤ ║ 5= ║ 6≥ ║ 7> ║ 8≠ ║ 9∨ ║ 0∧ ║ -× ║ =÷ ║ BACKSP  ║
  ╠════╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦══════╣
  ║       ║ Q  ║ W⍹ ║ E⋸ ║ R  ║ T⍨ ║ Y¥ ║ U  ║ I⍸ ║ O⍥ ║ P⍣ ║ {⍞ ║ }⍬ ║  |⊣  ║
  ║  TAB  ║ q? ║ w⍵ ║ e∈ ║ r⍴ ║ t∼ ║ y↑ ║ u↓ ║ i⍳ ║ o○ ║ p⋆ ║ [← ║ ]→ ║  \⊢  ║
  ╠═══════╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩══════╣
  ║ (CAPS   ║ A⍶ ║ S  ║ D  ║ F  ║ G  ║ H  ║ J⍤ ║ K  ║ L⌷ ║ :≡ ║ "≢ ║         ║
  ║  LOCK)  ║ a⍺ ║ s⌈ ║ d⌊ ║ f_ ║ g∇ ║ h∆ ║ j∘ ║ k' ║ l⎕ ║ ;⍎ ║ '⍕ ║ RETURN  ║
  ╠═════════╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═════════╣
  ║             ║ Z  ║ Xχ ║ C¢ ║ V  ║ B£ ║ N  ║ M  ║ <⍪ ║ >⍙ ║ ?⍠ ║          ║
  ║  SHIFT      ║ z⊂ ║ x⊃ ║ c∩ ║ v∪ ║ b⊥ ║ n⊤ ║ m| ║ ,⍝ ║ .⍀ ║ /⌿ ║  SHIFT   ║
  ╚═════════════╩════╩════╩════╩════╩════╩════╩════╩════╩════╩════╩══════════╝

Vivtek · 7 years ago
Languages descended from APL are very popular among the financial engineering set.
xvilka · 7 years ago
Do you have any examples or links to confirm that?
coldtea · 7 years ago
They are used (K and such). "Very popular" they are not.
kd0amg · 7 years ago
For coding in APL, I just switch to an alternate keymapping (Dyalog has one available for free).
triska · 7 years ago
Wow, each of ⎕FFT, ⎕GTK and ⎕RE are substantial and impressive additions!

Thank you, and congratulations on the new release!

agumonkey · 7 years ago
slight digression, trying to find the repo source I went up https://lists.gnu.org/archive/html/info-gnu/2019-06/threads....

lots of releases, gnu is kicking hard

NikkiA · 7 years ago
End of the academic year, makes sense that you'd see a cluster of releases as people wrap-up their research projects and merge their code into various projects.
thomasfedb · 7 years ago
I first noticed APL when some mates used is as a trump card in code golf. I find it both intimidating and strangely beautiful.
Lt_Riza_Hawkeye · 7 years ago
APL can do some pretty cool stuff: http://0x0.st/scHG.webm
6thaccount2 · 7 years ago
I'd like to play with this as it is a free APL that I could use for work without paying a license (like Dyalog APL requires). J is another free array language, but it doesn't use the APL characters that I enjoy.

I've had a little trouble in the past getting it to install (this was version 1.7) on Ubuntu. Granted I've never been an expert at installing from source, but a more in-depth installation guide or YouTube tutorial would help some.

Thanks for doing this btw! I hope to eventually get to check this out!

lokedhs · 7 years ago
What did you have problems with? I wrote the Emacs integration for GNU APL that provides a decent environment for it. All you have to do is to compile and install GNU APL from source, followed by loading the Emacs Lisp code.

I created a video showing how it's used. Sorry for the poor quality. I originally planned to make a new one, but I have been working on different projects since then:

https://www.youtube.com/watch?v=yP4A5CKITnM

6thaccount2 · 7 years ago
Thanks for the video! I'll give it a go in a few days when I'm done with a work conference.

I tried following the provided instructions in the install guide a few months back and it didn't work out. I can't remember any useful information (sorry), but have a new Linux computer now that might work better. It seems like a pretty cool project! Thanks for all the work you put into it!

jacoblambda · 7 years ago
BTW the Dyalog license is free for a personal/non-commercial license. The process for getting it is a little weird but the dyalog variant is a pretty nice piece of kit.
6thaccount2 · 7 years ago
Oh I agree Dyalog is super nice and that it is free for personal/hobby use, but using it at work costs ~1k/year. I'm always a bit leery working with such systems when most software is now free. If your company already uses it, that's great and if they already have a site license it is essentially zero cost to use from your point. If you're that weird guy asking to use the heiroglyphics language...it can be a tough sell to management and IT.
yaantc · 7 years ago
There is a Debian package in the GNU archive, have you tried it instead? It works fine on Debian Buster so should be ok on a recent Ubuntu I guess (but not tested).
6thaccount2 · 7 years ago
I can try later. What would the command look like? I assume I have to add the package somehow first.
haolez · 7 years ago
If I pick up an array language to ramp up on 2019, should I start with APL or J? I know that both of them were created by the same person, and that J is supposed to be an evolution of APL’s approach, but I don’t know if it would make a difference to a beginner like me. I kind of like the weird charset :)
coliveira · 7 years ago
I think the open source version of J is more mature and has a larger community. It also has a lot of support packages that are not available for open source APL. If you are trying to write real-life projects, J seems to be a better option at this time.
6thaccount2 · 7 years ago
Dyalog APL or J. J is free and Dyalog APL is free for hobby stuff, but costs money to do commercial work.
SifJar · 7 years ago
Other options include q, used in a lot of banks and hedge funds, so plenty of opportunity to profit
delish · 7 years ago
I have a high opinion of GNU APL though I've never used it, from the discussion of GNU APL 1.7's release: https://news.ycombinator.com/item?id=13904688