News for hackers. Stuff that matters.
Re:Node-APL: APL interpreter written in JavaScript by chrispsn on Saturday February 17, 2018 @08:01PM (#16403789)
The original has more recent commits:

https://github.com/ngn/apl

Re:Node-APL: APL interpreter written in JavaScript by bryanrasmussen on Sunday February 18, 2018 @03:55PM (#16408546)
Sorry, I was looking for Node APL connections, had scrolled down to the readme and gotten overly excited. Realized it was a fork past the edit window. Anyway to get it changed to the original once edit window is gone?
Re:Node-APL: APL interpreter written in JavaScript by tomsmeding on Sunday February 18, 2018 @06:18AM (#16405523)
Why does this HN entry even have the fork, if it doesn't have commits that ngn/apl doesn't have?
Re:Node-APL: APL interpreter written in JavaScript by OtterCoder on Sunday February 18, 2018 @02:30AM (#16404923)
I can faintly understand the usefulness of this in a browser context, but why would you ever run APL over node... Very cool learning project though.
Re:Node-APL: APL interpreter written in JavaScript by erikkonstas on Sunday February 18, 2018 @07:15AM (#16405676)
Well, having an online APL interpreter means there's no need to download one for basic stuff. Also, most APL interpreters are only for non-commercial use (with a price for commercial use) or not at all free. The only two totally free interpreters I know of are NARS2000 and GNU APL. Last, but not least, ngn/apl has some features other variants don't, for example monadic/dyadic function combination (⍠ operator) and monadic/dyadic D-function combination (one D-function containing ; to separate the monadic and dyadic functions), as well as explicit returns (⍫ function, only usable in D-functions) and infinity (¯ and ∞ literals, as well as their negatives ¯¯ and ¯∞).
Re:Node-APL: APL interpreter written in JavaScript by dasmoth on Saturday February 17, 2018 @09:19PM (#16404053)
There’s also a JavaScript impl of K, one of the ASCII APL-like languages:

https://github.com/JohnEarnest/ok

Re:Node-APL: APL interpreter written in JavaScript by JohnSz on Saturday February 17, 2018 @07:30PM (#16403689)
A blast from the past. Amazing language for math. My friends and I tried to write entire programs as one line of code, something possible in APL.
Re:Node-APL: APL interpreter written in JavaScript by jonahx on Saturday February 17, 2018 @11:02PM (#16404375)
I would love to see a js interpreter for J.
Re:Node-APL: APL interpreter written in JavaScript by kaoD on Sunday February 18, 2018 @02:57AM (#16404976)
What I would love to see, for my day to day use, is a language which borrows the good ideas from array languages and applies them in a 21st century context.[0]

Which I guess pretty much boils down to more powerful operators that work on arrays and can be ranked (and a few other niceties like native complex numbers).

For me J is not much more than a very powerful calculator that I end up never using. And it's a shame because it has great ideas.

[0] I have not used APL or K extensively but I tried learning J about 3 or 4 times in my life and I always leave (and forget) it just because of its obtuse syntax (read: forks, hooks, verb trains and other point-free intricacies) and unmaintainable obsession with terseness (so much that I've been told the correct way of using J is to not be terse at all).

Re:Node-APL: APL interpreter written in JavaScript by jonahx on Sunday February 18, 2018 @11:11AM (#16406676)
I haven't used it much, but I believe the numpy library (I know, not a language) sort of fits the bill of "a language which borrows the good ideas from array languages and applies them in a 21st century context". In any case, I know they've taken a lot of the ideas -- not sure how well they've made use of them.

As for J, I disagree that it's "not much more than a very powerful calculator" -- it's backed by a deep computational paradigm, and is closer to a work of art than any other language I've seen. The power arising from the small selection of interacting primitives, the harmony of combinators built directly into the syntax, the metaphor with natural language, and much more. It's also somehow more fun and satisfying to solve problems in J than other languages.

That said, it is by far the most difficult programming language I've ever learned. I'd say it took a year of part-time tinkering before it started to click, and I'm still not an expert. But the effort was worth it just for the lesson of how different things can be.

Re:Node-APL: APL interpreter written in JavaScript by Avshalom on Saturday February 17, 2018 @08:06PM (#16403810)
>> non-zero index origin (⎕IO)

eeeh, that's kind of an issue. A lot of apl assumes ⎕IO←1

Re:Node-APL: APL interpreter written in JavaScript by throwaway7645 on Saturday February 17, 2018 @10:52PM (#16404354)
I ran into this recently myself. The default implementation is 1 based, but a lot of APL users override it to 0, so that trips up a lot of beginners.