Live data from Hacker News

APL deserves its renaissance too

wordsandbuttons.online

91–100 of 123 posts

Re: APL deserves its renaissance too

#91
post #39

noob question: how do I paste those symbols in say Notepad++?

I'm more worried about how to type them with a standard QWERTY keyboard.

When I used the Dyalog APL free trial on Windows it installed a new keyboard mapping as part of the process. I think the keymapping is also on their site. It uninstalled as well I think when I was finished and uninstalled.

Re: APL deserves its renaissance too

#92
post #60

Earlier quoted context omitted.

You'd have to essentially embed a slow unoptimized APL in it which you can do. Add that to the fact that P6 is already slow at the moment would be an issue. Also, unlike APL, your P6 APL operators would probably be only known to you. It would definitely work though.

Unicode has APL characters, so create the operators using them. If there is a conflict with an existing feature you could always create a Slang. A Slang is a module that changes the parser. (It could be argued that with this feature all programming languages are a subset of Perl 6)

I've heard that quote, but realistically, that would be a huge project to write an efficient APL in P6 and as I already said, the performance wouldn't make you happy.

Re: APL deserves its renaissance too

#93
post #65

Earlier quoted context omitted.

To be fair, ownning an iPad Pro, I can say first hand that the handwriting recognition possible with the stylus is actually quite remarkable and a great improvement from the old palm-pilot days.

With that new interface, could you see yourself jotting down a "sentence" of APL that maybe you think of in a meeting or something? I mainly am interested in apl as a notation, there's a certain lispy zen to a language that unifies notation and code into the same thing. Maybe there are better handwriting notations to explore for what I'm thinking.

> With that new interface, could you see yourself jotting down a "sentence" of APL that maybe you think of in a meeting or something?

If you've got an Android device you could give MyScript Calculator a go, if writing APL was as easy as writing equations on that app then it would be a lovely experience.

Re: APL deserves its renaissance too

#94
post #79

Earlier quoted context omitted.

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.

Parenthesis are paired and have their usual function of groupoing. You are correct about brackets and braces though. Personally I do think J is often hard to read, but not because of the unbalanced brackets and braces.

Re: APL deserves its renaissance too

#95
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.

Also, another argument for this notation, is that you condense patterns to be very close to one another. Notice in Java and C# when you start using language features that support something like 'fluent' notation where you just append operators and the data 'flows' through. Eventually you'll start seeing obvious improvements, for instance a 'map' followed by a 'concat' might be better off as a 'collect'. APL and J focus on the idea of making very high level things accessible with symbols, and since the underlying structure is always an array, it's easier to judge what things are doing and when the operations can combine. What's more, once you combine them, you give clues to the compiler about your intent, and often further optimizations can be done.

It reminds me a bit of SQL Databases, in that the more indexes and constraints you add, the more the query execution can draw from to change the route a calc takes in order to try and do it more efficiently.

Re: APL deserves its renaissance too

#96
post #2

I will support this, but only if IBM brings back the beam-spring keyboard.

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

Yeah, he's speaking of the Model F variant of keyboards from IBM rather than the Model M (the better known buckling spring variant). There are a ton of Model F's online for sale because they're not natively compatible with regular computer and thus need an adapter (I believe), and they're just not as widely known.

Also the Model F is a monstrous beast of a keyboard, that would make even a regular model M seem compact.

I just want an industrial (gray) Model M Space Saver. I'd get one but I still need to think of a good argument to use with my wife over a $600 keyboard...

Re: APL deserves its renaissance too

#97
post #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,…

Incidentally, I wouldn't be shocked if you reached out to Aaron Hsu and he actually helped you. I sent him a related email and found him to be extremely cordial and informative.

Re: APL deserves its renaissance too

#98

APL looks like the best programming language I've ever seen. I wish it could be extended with SQL and web-service mappings to input-output data conveniently and to use functions written in other languages (like C and Python) for acceleration and rapid logic prototyping.

Not exactly what you want, but you may want to check out F# type providers..

Re: APL deserves its renaissance too

#99
post #65

Earlier quoted context omitted.

To be fair, ownning an iPad Pro, I can say first hand that the handwriting recognition possible with the stylus is actually quite remarkable and a great improvement from the old palm-pilot days.

With that new interface, could you see yourself jotting down a "sentence" of APL that maybe you think of in a meeting or something? I mainly am interested in apl as a notation, there's a certain lispy zen to a language that unifies notation and code into the same thing. Maybe there are better handwriting notations to explore for what I'm thinking.

https://www.sacrideo.us/paper-is-dead-long-live-paper-progra...

I think one thing to consider would be actually using paper. The terseness means you don't really pay a 'retyping' penalty.

Re: APL deserves its renaissance too

#100
post #79

Earlier quoted context omitted.

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.

No, parens are parens, used for grouping. The rest is true, though: brackets `[`, `]` are essentially two flavors of identity function (dyadic) and `{`, `}` are indexing operators (not sure I remember right, but I think `(<1;2) { A` would be `A[1][2]` in more common languages).
Post reply on HN