News for hackers. Stuff that matters.
Re:GNU APL 1.8 by vincent-toups on Sunday June 23, 2019 @12:35PM (#20256691)
"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.

Re:GNU APL 1.8 by triska on Sunday June 23, 2019 @01:09PM (#20256980)
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 ∇.

Re:GNU APL 1.8 by vincent-toups on Sunday June 23, 2019 @01:43PM (#20257279)
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.

Re:GNU APL 1.8 by SwellJoe on Sunday June 23, 2019 @05:15PM (#20258722)
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

Re:GNU APL 1.8 by bin0 on Sunday June 23, 2019 @05:36PM (#20258822)
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).
Re:GNU APL 1.8 by smittywerben on Monday June 24, 2019 @06:55AM (#20262151)
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.
Re:GNU APL 1.8 by sizzzzlerz on Sunday June 23, 2019 @12:04PM (#20256468)
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?

Re:GNU APL 1.8 by lelf on Sunday June 23, 2019 @04:07PM (#20258346)
> 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   ║
  ╚═════════════╩════╩════╩════╩════╩════╩════╩════╩════╩════╩════╩══════════╝
Re:GNU APL 1.8 by Vivtek on Sunday June 23, 2019 @12:11PM (#20256510)
Languages descended from APL are very popular among the financial engineering set.
Re:GNU APL 1.8 by xvilka on Sunday June 23, 2019 @01:17PM (#20257049)
Do you have any examples or links to confirm that?
Re:GNU APL 1.8 by risubramanian on Sunday June 23, 2019 @01:27PM (#20257145)
Check out K, Q, and KDB
Re:GNU APL 1.8 by andylynch on Sunday June 23, 2019 @01:30PM (#20257172)
Parent is almost certainly referring to KDB https://kx.com/
Re:GNU APL 1.8 by jjtheblunt on Sunday June 23, 2019 @02:02PM (#20257446)
look up arthur whitney and kx.com, and their Q language for their kdb+ database. Various opensource versions are active.
Re:GNU APL 1.8 by Volt on Monday June 24, 2019 @07:21PM (#20269562)
There's no open source version of kdb+.
Re:GNU APL 1.8 by frostburg on Sunday June 23, 2019 @01:29PM (#20257169)
A similar language is used for kdb+.
Re:GNU APL 1.8 by coldtea on Sunday June 23, 2019 @02:10PM (#20257521)
They are used (K and such). "Very popular" they are not.
Re:GNU APL 1.8 by ncmncm on Sunday June 23, 2019 @02:48PM (#20257809)
I visited a top floor of Goldman Sachs in the early 90s. They were using J, a dialect of APL. They still had those dumb little Bloomberg cube terminals on their desks, with the angry-fruit-salad colors scheme.

Nowadays it's in a window, but it looks the same. I don't know if they still use J, or K, but anyway not in real-time. That happens on FPGAs in a rack where traders once roamed.

But while APL cannot be said to be very popular, the most popular "time-series database" used in finance is published by APL fananics.

Re:GNU APL 1.8 by achamayou on Sunday June 23, 2019 @04:00PM (#20258311)
No they don't, GS strats have overwhelmingly used Slang/SecDB for many years now.
Re:GNU APL 1.8 by ncmncm on Monday June 24, 2019 @11:37AM (#20264585)
I have had no contact with GS for 25 years, but KDB is unaccountably popular in other places on the Street.

The specialized time-series database lost much of its reason to exist when disk seek times went to zero. Nowadays you stage onto an SSD, and spool to rotating storage later, if at all.

Re:GNU APL 1.8 by achamayou on Monday June 24, 2019 @03:33PM (#20267519)
They vastly exaggerate their popularity, helped by the lack of publicly available information. The number of quants writing q is dwarfed by those writing Python, Scala or even Slang.

First Derivatives’ revenue last FY was ~200m and their pre-tax profit is ~17m. To say that they are unaccountably popular on the Street is quite an overstatement.

Re:GNU APL 1.8 by ncmncm on Monday June 24, 2019 @09:44PM (#20270460)
Last time I went interviewing, I found places who admitted using it. $200M revenue is nothing to sneeze at, for strictly optional infrastructural software.
Re:GNU APL 1.8 by scottlocklin on Sunday June 23, 2019 @07:40PM (#20259454)
I guess first derivatives just flushed 100 million bucks down the toilet then. Maybe you should send Conlon an email.
Re:GNU APL 1.8 by coldtea on Monday June 24, 2019 @04:02AM (#20261407)
Or maybe people should learn not to extrapolate from anecdotes and outliers, as if what a single company does means anything for a huge sector...
Re:GNU APL 1.8 by kd0amg on Sunday June 23, 2019 @01:02PM (#20256913)
For coding in APL, I just switch to an alternate keymapping (Dyalog has one available for free).
Re:GNU APL 1.8 by triska on Sunday June 23, 2019 @11:04AM (#20256002)
Wow, each of ⎕FFT, ⎕GTK and ⎕RE are substantial and impressive additions!

Thank you, and congratulations on the new release!

Re:GNU APL 1.8 by agumonkey on Sunday June 23, 2019 @11:09AM (#20256049)
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

Re:GNU APL 1.8 by NikkiA on Sunday June 23, 2019 @12:38PM (#20256725)
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.
Re:GNU APL 1.8 by thomasfedb on Sunday June 23, 2019 @10:55AM (#20255937)
I first noticed APL when some mates used is as a trump card in code golf. I find it both intimidating and strangely beautiful.
Re:GNU APL 1.8 by Lt_Riza_Hawkeye on Sunday June 23, 2019 @09:18PM (#20259822)
APL can do some pretty cool stuff: http://0x0.st/scHG.webm
Re:GNU APL 1.8 by 6thaccount2 on Sunday June 23, 2019 @10:54AM (#20255929)
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!

Re:GNU APL 1.8 by lokedhs on Monday June 24, 2019 @02:23AM (#20260962)
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

Re:GNU APL 1.8 by 6thaccount2 on Monday June 24, 2019 @05:36AM (#20261804)
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!

Re:GNU APL 1.8 by jacoblambda on Sunday June 23, 2019 @10:59AM (#20255961)
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.
Re:GNU APL 1.8 by 6thaccount2 on Sunday June 23, 2019 @11:13AM (#20256080)
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.
Re:GNU APL 1.8 by kgwgk on Sunday June 23, 2019 @12:15PM (#20256542)
> most software is now free

Is it?

Re:GNU APL 1.8 by 6thaccount2 on Sunday June 23, 2019 @12:42PM (#20256755)
Language wise yes. Sorry if I wasn't clear.

C# => Free; Java => Free; Common Lisp => SBCL is Free; Python => Free; Ruby => Free; C => Free; C++ => Free; Rust => Free; Haskell => Free; JavaScript => Free; Smalltalk => Pharo is Free; Perl => Free; Forth => GForth is Free; Fortran => GFortran is Free; Kotlin => Free; Scala => Free; Clojure => Free;

Now there are some paid languages like Wolfram Mathematica, Allegro Common Lisp, Lispworks Common Lisp, Delphi Pascal, Dyalog APL, IBM Fortran and some languages with paid tools like Visual Studio for .NET and the Ultimate Jetbrains IDEA IDE for Java/Kotlin/Scala. Clojure has the paid "Cursive" IDE to go with the Jetbrains IDE. However, you can use other Free IDEs to go with most paid tools (Ex: you can use several alternative IDEs for C# and Emacs for Clojure). Also, the "paid" languages are fairly niche in comparison to the free ones at the top. How many people do you know writing Dyalog APL, IBM Fortran, Delphi, and Lisp works programs? How many people do you know writing C#, JavaScript, Java, C, and Python?

If we're just talking about software in general, then yes there is a TON of expensive and closed source programs and I don't expect that to change anytime soon.

Re:GNU APL 1.8 by hermitdev on Sunday June 23, 2019 @12:59PM (#20256882)
All of the Visual Studio supported languages are accessible for free with the Community editions. The paid versions give you more advanced features for understanding, debugging or profiling. You can see the differences at [0]. Personally, I use VS2019 Professional at work, VS2019 Community at home. I don't really miss the extra Professional features at home, but I do wish I had some of the Enterprise features at work.

[0] https://visualstudio.microsoft.com/vs/compare/

Re:GNU APL 1.8 by 6thaccount2 on Sunday June 23, 2019 @01:10PM (#20256991)
That is kind of my whole point though. I'm not working on open source software or at a tiny company, so it isn't free. I'm not sure if I could commercially use it as a solo dev either. Most community editions aren't much better than a trial license in that regard. Let me know if I misunderstand though. I'm not the best at license stuff.
Re:GNU APL 1.8 by hermitdev on Monday June 24, 2019 @09:07PM (#20270256)
> I'm not sure if I could commercially use it as a solo dev either.

Yes, you can. There's no restriction on using the Community edition of Visual Studio for commercial products. I think there may have been initially when MS offered a free edition (initially called Express), and SQL Server express, now Compact edition, has some limitations like only one concurrent connection, and I think a 1 GB DB size limit.

There's also VS Code, which is completely free and has great support for a lot of languages through extensions.

Edit: should note, too, that thw .Net compilers have shipped with the .Net Framework since v1.0. So, technically, you dont even need Visual Studio to build a .Net app. Likewise for C++, MS has included their optimizing compiler with the Windows SDK, I think since WinXP, may have been more recent. You dont get a friendly debugger (youd need to us WinDbG) or IDE experience, but you can build.

Re:GNU APL 1.8 by kgwgk on Sunday June 23, 2019 @01:06PM (#20256948)
Fair enough, thanks.
Re:GNU APL 1.8 by kbenson on Sunday June 23, 2019 @12:42PM (#20256759)
I think there's a good chance for any company paying a developer to write something that a good chunk of their software includes free and open source stuff,especially if you include cloud resources. Even Azure is pretty heavy on Linux, and other Microsoft technologies have gone free (if not also open source) in an effort to retain mindshare. Java is free, C# is free, eclipse is free, many, many libraries and tools are free.

At this point its probably easier to list the non-free things in the average stack or development pipeline than the free things.

Re:GNU APL 1.8 by 6thaccount2 on Sunday June 23, 2019 @01:14PM (#20257022)
I think you've said it best. Yes there is now more free in most given setups than non-free.

I contrast this with when you paid for your compiler and all tools in most cases.

Re:GNU APL 1.8 by yaantc on Sunday June 23, 2019 @01:02PM (#20256911)
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).
Re:GNU APL 1.8 by 6thaccount2 on Sunday June 23, 2019 @01:08PM (#20256971)
I can try later. What would the command look like? I assume I have to add the package somehow first.
Re:GNU APL 1.8 by Avshalom on Sunday June 23, 2019 @03:26PM (#20258108)
sudo apt install ./package (you have to write it like a file address or it ttys to download it)
Re:GNU APL 1.8 by 6thaccount2 on Monday June 24, 2019 @06:14AM (#20261950)
It would be that on Debian that already has the package (maybe Ubuntu does as well as they're similar). If not I suppose I'll figure out how to add it to my package manager first.
Re:GNU APL 1.8 by Avshalom on Monday June 24, 2019 @12:30PM (#20265295)
no, if you download the package that still works. you have to format the package name as a filepath instead of just the name so you have to use that ./ in front of it (assuming you're in the same directory) but that's all the more it needs.
Re:GNU APL 1.8 by haolez on Sunday June 23, 2019 @11:51AM (#20256358)
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 :)
Re:GNU APL 1.8 by coliveira on Sunday June 23, 2019 @12:05PM (#20256475)
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.
Re:GNU APL 1.8 by 6thaccount2 on Sunday June 23, 2019 @02:07PM (#20257496)
Dyalog APL or J. J is free and Dyalog APL is free for hobby stuff, but costs money to do commercial work.
Re:GNU APL 1.8 by SifJar on Sunday June 23, 2019 @12:03PM (#20256464)
Other options include q, used in a lot of banks and hedge funds, so plenty of opportunity to profit
Re:GNU APL 1.8 by delish on Sunday June 23, 2019 @10:48AM (#20255883)
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
Re:GNU APL 1.8 by garyrob on Sunday June 23, 2019 @06:33PM (#20259132)
I did my Senior Project for my B.A. in math in APL back in 1978 because it was the only language I had available to me on a functioning machine. I loved it, because it was infinitely more concise than writing in System 360 assembly, which was the only other language I had taught myself! I particularly enjoyed writing entire programs for class in one line, which was frequently doable in APL. The problem was that that capability encouraged you to write "write-only code". It was very easy to write, but... :) Never used APL again, and now care a lot about readability, but I certainly look back at that time fondly!
Re:GNU APL 1.8 by devbat8712 on Sunday June 23, 2019 @03:48PM (#20258241)
The creator of APL was actually originally from my town. Unfortunately that's the only interesting thing about my town.

Cool language though, the use of symbols as keywords is... Interesting, but a neat idea

Re:GNU APL 1.8 by beagle3 on Tuesday June 25, 2019 @03:51AM (#20271980)
iKe+oK is a processing-like environment that runs in the browser based on K, which is an APL dialect: http://johnearnest.github.io/ok/ike/ike.html?gist=149c2eafcf... is a fun example, and is a good example of how compact and expressive K (and APL and the rest of this family) is.