Live data from Hacker News

The APL Source Code (2012)

computerhistory.org

31–40 of 61 posts

Re: The APL Source Code (2012)

#31
APL prevented me from getting into software for many years.

Back in the 80s I was an mainframe engineer at IBM. One of our customers (a bank?) was heavily into APL, and occasionally I would fix one of their keyboards.

(Sidenote: these were beautiful keyboards, and their keys were individually repairable. Also pleased to share my first mastodon link! https://mastodon.social/@hanshuebner/109412183054578487)

Watching people programming on these looked so intense and intimidating that I decided software wasn't for me, and it took years to find out today actually it was.

Re: The APL Source Code (2012)

#32
> Expressions in APL are evaluated right-to-left

I find it more natural to evaluate left-to-right, because that's the order we read things in. For example, to read a file and sort its lines (in D):

    auto sortedLines = File("file.txt").byLineCopy.array.sort;

Re: The APL Source Code (2012)

#33

> Expressions in APL are evaluated right-to-left I find it more natural to evaluate left-to-right, because that's the order we read things in. For example, to read a file and sort its lines (in D): auto sortedLines = File("file.txt").byLineCopy.array.sort;

I think it would be roughly like this:

  ↑ nget "file.txt"
Anyway I wouldn't want to munge strings in it, but that is not really its niche. Right-to-left can be nicer in different contexts, one is not really better or worse than the other.

Re: The APL Source Code (2012)

#35
post #27

Earlier quoted context omitted.

Lots of programming isn't math or logic, its shovelling data and manipulating strings. Is APL good at that?

If a string (or a file or whatever) is "just" an array (of bytes; characters, again: whatever), then yes.

If that means "you don't get much more than what C offers", then I'll take that as a no. I18N, Unicode, Regex, built-in string manipulation functions, character set conversions and efficient data structures are table stakes at this point.

Re: The APL Source Code (2012)

#36

I like APL (and k/j). Problem is, outside trading (and even there it's a niche), it is just not popular enough. This also because most people dismiss it as line noise / write only programming language; that's usually only people who never used it or used it briefly saying that. But it's hard to promote anything that has a reputation like that. What is a fairly interesting observation (more people have made it, includ…

Ironically, APL has won as a programming language. Look at the SIMD instruction set - it's APL!

Can you elaborate on that?

Re: The APL Source Code (2012)

#38

I like APL (and k/j). Problem is, outside trading (and even there it's a niche), it is just not popular enough. This also because most people dismiss it as line noise / write only programming language; that's usually only people who never used it or used it briefly saying that. But it's hard to promote anything that has a reputation like that. What is a fairly interesting observation (more people have made it, includ…

Lots of programming isn't math or logic, its shovelling data and manipulating strings. Is APL good at that?

[deleted]

Re: The APL Source Code (2012)

#39

> Expressions in APL are evaluated right-to-left I find it more natural to evaluate left-to-right, because that's the order we read things in. For example, to read a file and sort its lines (in D): auto sortedLines = File("file.txt").byLineCopy.array.sort;

Isn't the assignment operator evaluated last, though? I don't know of any language that would support "true" left to right evaluation, though it would be neat! I suppose it would look like:

File("file.txt").byLineCopy.array.sort = sortedLines;

...which by first blush, seems bananas, but if you were to read it as English, would make sense: "Load the file 'file.txt' into an array of lines, sort them, then assign it to sortedLines"

Re: The APL Source Code (2012)

#40
post #7
post #4

> But APL programs are often cryptic and hard to decode. Some have joked that it is a “write-only language” because even the author of a program might have trouble understanding it later. So the original Perl?

I actually find it way easier and shorter to review code I've written in J and APL, because it is so succinct and the symbols are well defined. Having to review something that is a paragraph or one page of code is much easier than following pages of other programming languages code. You can comment APL as you can in most PLs, and with the REPL-like dev environment, you can test pieces of code for verification quite i…

What are you using April for?
Post reply on HN