14 ms·
Rob Pike explains why every programmer should know about the array languages
- bobterryo 3y agoRob Pike, co-creator of the Go language and UTF-8, tells us why every programmer should know about the array languages. Host: Conor Hoekstra Panel: Marshall Lochbaum, Adám Brudzewsky, Stephen Taylor and Bob Therriault.
- gumby 3y agoAnd then Pike begins by saying he doesn't know much about APL.
- juicypt 3y agoThat's really weird, since he did implement a calculator that uses a dialect of APL: https://aplwiki.com/wiki/Ivy https://aplwiki.com/wiki/Ivy
- medler 3y agoI think he’s sort of being humble and also admitting that he’s not a true expert. It’s clear he has more than a passing familiarity with APL.
- BasedAnon 3y agoit doesn't seem like he knows much about anything really
- corethree 3y agoI listened to this. He talks about language diversity but I never heard Rob Pike mention anything about Haskell or ML style languages and his opinions on that. He never commented on functional programming languages and the closest he gets to it is mentioning lisp. The design of Go feels almost as if he doesn't even know about those ML languages and it feels as if he doesn't like FP. Of course he probably does know about ML style languages. But I would be very interested to hear his take on it and his opinion of FP because I couldn't find anything from google. Anybody know of any links to writings/videos where he elucidates his viewpoints?
- darthrupert 3y agoIt's entirely possible for an expert programmer and pl designer to have never heard of ML-based languages or FP as a name for the concept.
- corethree 3y agoPossibly. It's wierd he's so enamored with apl which just seems to me like languages focused an algebra designed around arrays. Algebra based designs can be formed around many data structures and many languages generalize this concept like Haskell. With Haskell you can create your own algebraic DSL around arrays and anything else you can think of. It seems he's enamored with the specific array instance of algebra based designs and unaware of how it's only one specific case of a general concept.
- juliangoldsmith 3y agoAPL wasn't originally a programming language at all. Ken Iverson designed it as a mathematical notation to express and reason about computer algorithms. "Notation as a tool of thought," is how he thought about it. It was implemented as a programming language years after he created the notation in 1960. An APL-like Haskell DSL could be interesting, but to match APL's expressiveness you'd basically need to reimplement all of APL. For maximum generality, one could just skip both APL and Haskell and just use the lambda calculus. I found that a bit hard to work with, though. As far as Numpy and all, they are all directly descended from APL. The difference is that it takes 10 lines of Python to match 10 characters of APL. While the array languages' terseness can be excessive, doing it in Python is not very pleasant either. Anyway, here's somebody who knows more than I do talking about what they like about APL's successor, J: https://www.youtube.com/watch?v=RWYkx6-L04Q https://www.youtube.com/watch?v=RWYkx6-L04Q
- MrJohz 3y agoIs it? That seems like a very bold claim. MLs have been at the heart of a lot of language development for the last few decades, both as research languages for various concepts, but also practically: OCaml is fairly famous as a language to write programming languages in. FP isn't something wild and niche, it's discussed fairly regularly even amongst users of mainstream programming languages. Even Go has an FP library now, coming out of IBM of all places. I don't think you can attribute this to ignorance, because it's very clear that Pike is not ignorant of programming language design - even if you disagree with his decisions, he has had tremendous success at implementing his vision. To me it speaks more of disinterest - FP doesn't seem to really register on his radar as a useful mine of PL ideas. That's fine, although I agree with the previous poster that it's ironic to be such a proponent if APL, and yet have such a blind spot to another very fascinating area of his field.
- medler 3y ago> whenever something APL related comes up on Hacker News, it's always in the form of arcana you'll laugh at rather than fascinating work being being done by very smart people. I find that offensive, but I'm not going to push back on that. I don't talk on Hacker News. But I've seen a lot of interesting things being posted about it, and the comments are always almost universally, like: "what the hell is that for?". And not understanding that that language was once the best interactive language out there, and in many ways still is. And there's some phenomenal stuff being done with it. But it's hived off somehow from most of the rest of the computing world in a way that, for instance, Lisp (which is, I think, an almost contemporaneous language; Lisp was a little earlier, but similar) ... Lisp is sort of part of the universe of programming that people understand. They'll laugh at it, but they understand it, and they know what to do with it. And APL is something altogether different. I think that's a shame. I will admit my interest in learning APL has been piqued. Though I do find it odd that they never once mention the most popular array programming language of all time, MATLAB
- 7thaccount 3y agoProbably because Matlab is basically an imperative scripting language with a bunch of array features bolted on. It's been pretty successful for numerous reasons although there is definitely a lot i dislike like the crazy high costs (you pay $$$ for the language environment, $$$ for the libraries that you want, and $$$ if you want to create a standalone executable). However, it's worth it to a lot of scientists for valid reasons. APL is a lot cooler as a language, but is missing a lot of built-ins that Matlab has for numerical computing. The APL community would just tell you to write a few lines of code to implement what you need rather than call out to a massive black-box function. It's certainly a better approach if you have the time/ability, but I often don't. More recently, Dyalog Apl and Kdb+ (the two big commercial Apl or Apl-derived languages) have support to use Python libraries if you need that.
- jiggawatts 3y agoSyntax matters. Sure, you can learn to read and write what superficially looks like line noise, but the market has spoken: very few people want to. Look at the success of Tensorflow and PyTorch. They’re also tensor / array programming systems. They’re wildly popular, with at least two orders of magnitude more users each than all array languages put together. The difference is that they’re built on top of Python, which is famously user-friendly in its syntax. More importantly: they were parallel and GPU-accelerated from the beginning. What’s the point of an array-based language if it’s slower and harder to write than the equivalent in mainstream languages!? Their current niche of “quants analysing time-series data” is tiny and shrinking all the time. There was even a chap here advocating the speed and terseness of his preferred array-based language. Meanwhile the equivalent in Rust was something like a thousand times faster and not much longer! Array-based languages have been infected by a particular style largely unique to certain types of mathematicians: brevity over clarity, obscure syntax over English, idioms instead of identifiers, etc… They’ll never be popular while they remain purposefully niche, appealing only to the type of developer that uses single-character file names: https://news.ycombinator.com/item?id=31363844 https://news.ycombinator.com/item?id=31363844
- spit2wind 3y agoI wish the licensing of APLs were more free. Yes, GNU APL exists and related languages like J are free. However, if you want the APL symbol set your choices are few: GNU APL, Dyalog, or one-man hobby projects. As far as I can tell, GNU APL is more of a historical time capsule than a practical development language. The array language community seems friendly and exceedingly competent. It also appears to have a strong "get it done" attitude which prioritizes engineering over freedom. The community is tightly entwined with proprietary software. I can't bring myself to invest the time to meaningfully learn APL because it's hard to see it as a real investment—the community doesn't own its contributions. It looks like trading dollars for arcade tokens.
- lokedhs 3y agoWhile I am the author of one of those one-man projects, I would like to point your attention towards BQN. It started as a one-man project, but isn't anymore. As much as I would like people to look at my implementation, if you want to play around with something more complete, and also uses symbols in the same way APL does, then BQN is the one to look at.
- takeAfence 3y agoI second the recommendation for BQN. You know, there's a reason why there's so many "one-man hobby project" implementations of, say, APL. It's actually not that hard! If you're willing to spend a week (yes, a week), you can have your own barebones implementation of APL. And from there, it's really sort of your playground, which is neat. Thought of a cool idea? Implement it! Obviously, most people won't want to do this, investing time (even if it's not that much) in something they don't really even have any experience invested in. But it's an easier option than you might expect.
- RetroTechie 3y agoShouldn't hurt most programmers to look at problems from a different angle. Or at least allow their brains to re-wire into considering other programming styles. But that holds for other paradigms too: https://madhadron.com/programming/seven_ur_languages.html https://madhadron.com/programming/seven_ur_languages.html