Live data from Hacker News

APL deserves its renaissance too

wordsandbuttons.online

71–80 of 123 posts

Re: APL deserves its renaissance too

#71
I have used and loved apl\11 and its successors for many years.

It could not be compiled on 64-bit machines, because of some ancient programming practices that were used throughout the code.

I took some time to update apl\11 so that it compiles and runs on modern machines.

Did a few other things as well, such as replacing linear algorithms in the symbol table code with O(logN) algorithms.

I would refer to this project as "heirloom software". It is touchingly old-fashioned in some ways, a bit dusty, and still fully serviceable.

It is a bit like owning and flying an Ercoupe. A bit quirky, an ongoing effort of love, but a joy to fly.

Edit your apl with vim, run apl files like scripts from the shell, pipe inputs and outputs, copy an APL binary or build it anywhere with a C compiler, run it immediately and conveniently.

My take on the 'funny characters problem' was to go with touch typing, and stick with ASCII. If you can write APL with your eyes closed, you can use APL-touchtype. "rho" is "R", "iota" is "I", etc. Trig is "O". Log is "O@*". (APL-touchtype uses "@" instead of backspace, and with that trivial substitution, all of the APL overstrikes become APL-touchtype ascii.)

It is ABSOLUTELY a work-in-progress, but anyone who wants to is welcome to give it a try:

    https://github.com/gregfjohnson/aplette

Re: APL deserves its renaissance too

#72
post #50

J seems to have its fans ( http://www.jsoftware.com/ and https://en.wikipedia.org/wiki/J_%28programming_language%29 ) and uses ascii instead of all the different symbols. Some of the code CAN be quite terse (and cryptic) like quicksort=: (($:@( #[)) ({~ ?@#)) ^: (1 I spent a small amount of time learning the basics a while ago, but never really used it for anything. But it was interesting and I'd have to spend a lot…

> quicksort=: (($:@( #[)) ({~ ?@#)) ^: (1 Please, no. Glyphs / characters are not a scarce or constrained resource in software development. The major resource constraint is developer time spent writing, reading and debugging code. APL (and its descendants) are specifically designed to make these challenges far more difficult than they need to be.

Funny that you should say that. APL was designed to be easy to read, like how mathematicians can look at an equation and immediately get a feel for it.

"Notation as a Tool of Thought": http://www.jsoftware.com/papers/tot.htm

Re: APL deserves its renaissance too

#73

Neat little tribute article. APL will not be reborn. If that was going to happen, this century's embrace of analytics and linear-algebra-rich machine learning would have propelled the upswell. It didn't and it won't. Why? It's not the symbols. Not the keyboard. Nor the learning curve. Nor the lack of standardization, libraries, or GPU support. These are collateral damage, not primary drivers. APL will not flourish be…

If you think about it, a decent stack is composed of languages. That's currently already often true, e.g. the use of IDL languages like protobuf/flatbuffers. Some languages offer integrated idl like Kotlin (data classes). Another example is html, where the UI is described using a dsl to specify elements and CSS for layout & appearance. This fact caused me to think: should stack also not be made of other languages? Is…

The ML family (SML, Ocaml, F#) is also pretty good with the mixture of functional and imperative constructs.

Having a part of the program known to be pure at compile-time, but another part effectful is something you see in the language F* (http://fstar-lang.org) - here you get monads, dependent types, a proof system, and the ML module system neatly packed into a general-purpose programming language.

Not as widely popular as O'Caml, F# or Haskell, but both as practical as Ocaml and as researchy as Haskell.

Also there's a free tutorial/book on the website.

Re: APL deserves its renaissance too

#74

Earlier quoted context omitted.

If you think about it, a decent stack is composed of languages. That's currently already often true, e.g. the use of IDL languages like protobuf/flatbuffers. Some languages offer integrated idl like Kotlin (data classes). Another example is html, where the UI is described using a dsl to specify elements and CSS for layout & appearance. This fact caused me to think: should stack also not be made of other languages? Is…

C# kinda does have a data querying language built right in with LINQ query expressions, although they seem to have rather fallen out of favor.

Indeed. But you can still write functional style data querying languages using LINQ extension methods. IMO, LINQ based DB querying is revolutionary in terms of the flexibility and capabilities it provides. For complex Relational DB querying it's pretty great.

I tend to write raw SQL using Dapper these days, because hey, scalability and such, but for business apps and non-cloud apps, EF and other LINQ-based DB tools are great.

Re: APL deserves its renaissance too

#75
post #56

No, it does not. I used APL professioally for about ten years back in the 80's. I love the language. It is incredibly powerful. Once you internalize it's like playing the piano, you don't think about the mechanics you play music. However, the language did not stand the test of time for far more important issues than the inconvenience of the character set and the keyboard. And, no, J is not a successor to APL, even th…

> Finding qualified programmers and having access to libraries so you don't reinvent the wheel. Lots of niche languages have the same problem, notably lisp, but it doesn't do to say they aren't popular for those reasons. It's circular reasoning. Languages get those things by being popular. They get popular by having those things. Every current "popular" language with good libraries and a large userbase started with n…

Weren't some of APL-related languages, to keep it on topic, like A+ and K created at or on contract with a large company?

Re: APL deserves its renaissance too

#77
post #45

Earlier quoted context omitted.

The beam-spring keyboards are still being made - someone bought the patents, tooling, and supplies from IBM and their main supplier, 22 years ago and has been making them ever since. http://www.pckeyboard.com/page/category/UKBD

They even sell an APL keycap set: http://www.pckeyboard.com/page/product/USAPLSET

These guys are pretty amazing. I can't recommend their keyboards enough.

Re: APL deserves its renaissance too

#78
post #42

Earlier quoted context omitted.

I like your take, and Haskell is an apt comparison in this sense. Another sense in which i think APL is... un-competitive is that its strengths (terse, mathematical, matrix-centered) are the easy parts of programming, i.e. the parts that are the most objectively quantifiable and verifiable (you just use math). Accounting for numbers is trivial, accounting for human factors is a proverb.

I agree that Haskell is a good comparison. I think matrices and math are too closely focused on in array languages (and dismissals of array languages), though. For fun I'm writing a "spreadsheet programming language" that borrows a little from array languages, and I think there's useful stuff to take away from them. They make you focus on the data, and the transformations you want to effect on the data. They make you…

I'm not massively keen on the former (IMO having to write .map etc helps you get a better "feel" for what parts will have the biggest impact on performance), but the latter looks an awful lot like lenses, which are pretty great.

Of course, a lens is really just a pair of functions in disguise, so it wouldn't prevent you from sorting my more complex functions if needed.

Re: APL deserves its renaissance too

#79
post #46

Earlier quoted context omitted.

If you lose the symbols you lose the terse nature of the language, which as far as I can tell seems to be one of the most alluring parts of the language (the author of the blog post shows game of life as essentially a one-liner).

Did you read any J programs? It is just as terse as APL. (Probably K is pretty terse too, but I won't comment on it as I only know J.)

In J, the parens, brackets and braces aren't balanced because those 6 symbols, i.e. `(`, `)`, `[`, `]`, `{` and `}`, are used as standalone symbols for other syntactic stuff, making J code very hard to read.

Re: APL deserves its renaissance too

#80
I remember being floored by APL few months ago when I learned about co-dnfs and watched the stream by Aaron Hsu [1] with quotes like "This code is perfectly readable, it just isn't in English".

Thing is, when I was thinking about trying it, I never figured out a good toy project. Like, when I wanted to try anything else, most of the time I would know I would be able to cobble together a web-service. Haskell, Erlang, even Prolog.

I understand co-dnfs to be self-hosting, so maybe a toy programming language?

[1] https://www.youtube.com/watch?v=gcUWTa16Jc0

Post reply on HN