3 ms·
APL-likes have been a fascination of mine for some years, but sadly at a distance. For those of you working in these languages, what do you use them /for/? Wh
by michaelcampbell 6y ago
APL-likes have been a fascination of mine for some years, but sadly at a distance. For those of you working in these languages, what do you use them /for/? What industries and/or kinds of applications do you write? Why are these languages used for them vs others?
I'm looking for some inspiration. (I think) I'd love to use one "for real"/"in anger" for something but are they too niche to use as CV/Resume enhancement?
- tom-thistime 6y agoI'm afraid this isn't a particularly good answer. Anyway I use Matlab, which I think shares some ideas with the APL-like languages. (Coders who already know they hate Matlab can skip to the paragraph labelled "Downside" below.) What's good about Matlab? Maybe the best comparison I've seen in a normal language would be LINQ in C#. If you've been writing (or reading) code that makes heavy use of LINQ, imagine re-implementing all that stuff using explicit loops with dummy indices and all the rest of that line noise. Yuck. Hard to write and worst of all hard to read. Matlab takes that further than LINQ does ... in certain directions. Basically stuff with arrays. I don't know whether the APL-likes take the same idea even further than Matlab, or just use short keywords. Downside: when your problem doesn't break down into array patterns that Matlab is good at, then Matlab stops being fun. At all. For stuff like that, where you really do need to supervise every line of C-ish code personally, something like Ruby or C# is way more fun. (Except if you're doing say EE or optical physics. Then Matlab's libraries are still a huge time saver.)
- gaze 6y agoI took some time and used APL to write a little query DSL for answering questions about a legacy C++ codebase. I had a collection of little tools that linked against clang and dumped out XML files containing various cuts of information of the codebase. I then borrowed some techniques form Aaron Hsu to do structural queries that joined these tables together in ways that gave me useful information about the codebase. It was alright. I don't think I was able to invest enough in APL to make it really stick but have the impression that if I did it could be very useful. Fwiw, Aaron Hsu is really the guy to follow for all things APL. He's also super nice and helpful and a model for anyone who wishes to represent a technology.
- scottlocklin 6y agoI use J for general signal processing/machine learning development. It allows for clear expression in terms of arrays. It's also decent infrastructure for talking to C libraries, and the database is quite powerful (it's fast and you can apply verbs directly to column groups). Downside for anything like this is lack of libraries. There's utility in knowing it in the same sense as knowing Lisp; makes you better at other languages. There's also social capital in that people who use and work on the APL family are a sort of "mafia" working on very interesting and lucrative problems (generally in quant finance).
- nprescott 6y agoI've been teaching myself J and dabbled in a few other APL-family languages before that (Klong and Dyalog's APL mostly). I don't have any specific goal in mind and have been doing it for fun more than anything -- I recently tried writing a minimal ray tracer[0] for example. I've been surprised at how much I liked writing it. J can be derided for being a "puzzle language"[1], which isn't entirely unfair, but I've found the paradigm of array programming carries over into more widely used languages and libraries ("Iverson ghost"[2]). I wouldn't bother learning to put it on a resume, I would try it out for fun. [0]: https://idle.nprescott.com/2020/ray-tracing-in-j.html https://idle.nprescott.com/2020/ray-tracing-in-j.html [1]: https://prog21.dadgum.com/219.html https://prog21.dadgum.com/219.html [2]: https://analyzethedatanotthedrivel.org/2018/03/31/numpy-another-iverson-ghost/ https://analyzethedatanotthedrivel.org/2018/03/31/numpy-anot...
- avmich 6y ago> For those of you working in these languages, what do you use them /for/? Sometimes, when the logic of a program is clear, J could be like a calculator for quickly getting a result. Actually, with J you're pretty soon at a point where you're refining the specification, not actually solving the problem (because solving is easy). There is a saying that an hour-long task APLer solves in 5 minutes and then spends the remaining 55 minutes refining the solution - and the problem - so they'd be clearer. At some point J feels easier than other tools and it does feel like a "tool for thought" - a shorter way between what you think and what the program does. There can be even shorter ways, I don't know.
- alfalfasprout 6y agoK is heavily used in finance (especially trading) since it's the language of KDB+ (a super fast time-series DB).