TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

APL deserves its renaissance too (2018)

192 pointsby memorableover 2 years ago

40 comments

akavelover 2 years ago
The tutorial of the recently posted BQN variant of APL (<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33180842" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33180842</a>) is <i>super</i> approachable and written so nicely, that I couldn&#x27;t resist being drawn in - I <i>highly</i> recommend checking it if you&#x27;re even slightly &quot;APL-curious&quot;. The first part is at: <a href="https:&#x2F;&#x2F;mlochbaum.github.io&#x2F;BQN&#x2F;tutorial&#x2F;expression.html" rel="nofollow">https:&#x2F;&#x2F;mlochbaum.github.io&#x2F;BQN&#x2F;tutorial&#x2F;expression.html</a>
评论 #33642351 未加载
评论 #33647854 未加载
lokedhsover 2 years ago
There is a lot of development happening in the area of APL-insipred programming languages.<p>I&#x27;ve spent far too much time working on an APL dialect that allows you to combine APL with imperative structures at the same time. I really need to document it better though. <a href="https:&#x2F;&#x2F;aplwiki.com&#x2F;wiki&#x2F;KAP" rel="nofollow">https:&#x2F;&#x2F;aplwiki.com&#x2F;wiki&#x2F;KAP</a><p>Then there is April, which is a very neat version of APL that is implemented in Common Lisp. It allows you to miss Lisp arrays with APL arrays, giving you the best of both worlds. It&#x27;s very functional even now: <a href="https:&#x2F;&#x2F;github.com&#x2F;phantomics&#x2F;april" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;phantomics&#x2F;april</a><p>And of course, BQN is a new language that takes a lot of the good ideas from APL but also changes a lot of the symbols. It&#x27;s a very nice language: <a href="https:&#x2F;&#x2F;mlochbaum.github.io&#x2F;BQN&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mlochbaum.github.io&#x2F;BQN&#x2F;</a>
vindarelover 2 years ago
APL + Lisp = O_o<p><a href="https:&#x2F;&#x2F;github.com&#x2F;phantomics&#x2F;april&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;phantomics&#x2F;april&#x2F;</a> and yes it is used in production©!<p>&gt; What pushed the development of April really is that April is used by a hardware startup called Bloxl (of which I am the CTO). There are other users but Bloxl is the flagship application.<p><a href="https:&#x2F;&#x2F;www.arraycast.com&#x2F;episodes&#x2F;episode23-andrew-sengul" rel="nofollow">https:&#x2F;&#x2F;www.arraycast.com&#x2F;episodes&#x2F;episode23-andrew-sengul</a><p>Bloxl in use: <a href="https:&#x2F;&#x2F;user-images.githubusercontent.com&#x2F;3721004&#x2F;159686845-b562d37b-209c-49aa-a001-7115053cbe0c.png" rel="nofollow">https:&#x2F;&#x2F;user-images.githubusercontent.com&#x2F;3721004&#x2F;159686845-...</a> See also the ELS conference 2022.
评论 #33642033 未加载
petercooperover 2 years ago
The only time I see APL is each year during <i>Advent of Code</i> – <a href="https:&#x2F;&#x2F;adventofcode.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;adventofcode.com&#x2F;</a> – APL users always pop up and manage to solve the most complex of tasks with about ten symbols versus everyone else&#x27;s 50 lines of Python :-)
评论 #33639606 未加载
评论 #33639654 未加载
MarkusWandelover 2 years ago
APL is from an era where impressively functional code that looks like line noise (another obsolete concept) was considered heroic. Other examples of such code are text editing and text formatting macro languages. Recall that EMACS stands for &quot;Editor Macros&quot; because that was its original implementation.<p>Back then, computers were so limited relative to human capability that this was still a good thing. Those days have gone. The bizarre syntax of APL has had its day. Its powerful array manipulation primitives can easily be brought forward into a language with modern syntax, and haven&#x27;t they? In my company there is a lot of Matlab usage but I&#x27;m personally not knowledgeable.
评论 #33640132 未加载
评论 #33642099 未加载
评论 #33642131 未加载
评论 #33643557 未加载
评论 #33641820 未加载
kmstoutover 2 years ago
Suppose you have a couple graphs, represented by adjacency matrices (A and B) whose cells represent travel times or distances or some other notion of cost. Assuming their dimensions are compatible, and that the columns of A correspond to the same nodes as the rows of B, then<p><pre><code> A ⌊.+ B </code></pre> will produce a new adjacency matrix (call it C) where each c_ij is the minimum traversal cost from node i to node j. For example, if A represented driving times from all cities in NY state to all airports in NY, and B represented direct flight times from all NY airports to all CA airports, then our result would be the minimum travel time (ignoring parking and security) between any NY town and any CA airport.<p>The sequence `⌊.+` is an inner product chosen specifically to achieve this effect, with addition where multiplication would normally be, and ⌊ (min) where multiplication would normally be.<p>Notice that it took me longer to give this under-caffeinated explanation of what is going on than to write the code.
评论 #33641661 未加载
评论 #33639667 未加载
评论 #33638943 未加载
评论 #33646457 未加载
评论 #33638900 未加载
tgvover 2 years ago
Allow me to disagree. The page presents toy examples, and those are already unreadable. APL lacks data structures, modules, exception&#x2F;error handling and typing. Well, since almost everything is a matrix of floats, perhaps typing isn&#x27;t needed, but that idiom just deteriorates readability. You might think of it as a &quot;bc&quot; on steroids, but a rebirth for APL is uncalled for.
评论 #33639815 未加载
__rito__over 2 years ago
You can get everything there is in APL, plus no weird symbols in the J programming language.<p>&gt; <i>learning all the alien symbols is a one-time investment</i><p>No one time investment is needed if you want to learn J.<p>And yes, it does teach you to think in a new way. I am not kidding.<p>You can see the plethora of (mostly free) books available at the website [0].<p>Learning J has given me &quot;enlightenment&quot; at the same level <i>The Little Schemer</i> has given me.<p>(I don&#x27;t recommend APL to anyone as you need to learn and painstakingly slowly insert those symbols. If you want to learn array thinking, go straight to J. Why waste time and headspace with APL symbols?)<p>[0]: <a href="https:&#x2F;&#x2F;code.jsoftware.com&#x2F;wiki&#x2F;Books" rel="nofollow">https:&#x2F;&#x2F;code.jsoftware.com&#x2F;wiki&#x2F;Books</a>
评论 #33645506 未加载
评论 #33640020 未加载
评论 #33640126 未加载
nine_kover 2 years ago
«APL <i>has</i> flourished, as a DSL embedded in a language with excellent I&#x2F;O. It&#x27;s just got weird syntax and is called Numpy. Or Tensorflow. Or PyTorch...»<p>(<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17176147" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17176147</a> 4 years ago)
评论 #33648276 未加载
account-5over 2 years ago
I intend to learn an APL at some point. I&#x27;m an avid listener of the Array Cast podcast [0]. Can&#x27;t say I u derstand all of what they talk about but I definitely feel like APL has its place for number crunching.<p>[0] <a href="https:&#x2F;&#x2F;www.arraycast.com&#x2F;episodes" rel="nofollow">https:&#x2F;&#x2F;www.arraycast.com&#x2F;episodes</a>
pjmlpover 2 years ago
&gt; Even Haskell not only gained popularity on its own but deeply influenced F# and Scala.<p>The influences came from Standard ML and OCaml, primarly.<p>F# started its life as OCaml.NET.
claudiawernerover 2 years ago
APL looks like a lot of fun, and I&#x27;ve tried to get into learning it for a while, but it&#x27;s a shame that the most popular implementation is proprietary, and GNU APL is a dialect which is not as featureful and a separate dialect of APL unto itself, so it&#x27;s not as though you can write a reasonably sized APL program with Dyalog and then expect it to work in GNU APL.
评论 #33638779 未加载
评论 #33638934 未加载
评论 #33645254 未加载
shin_laoover 2 years ago
KDB+, using Q, is heavily inspired by APL. Great to look smart, might make you productive, horrible for cooperation, maintenance nightmares, heavy technical debt.<p>I&#x27;ll pass, but you do you.
评论 #33639787 未加载
评论 #33643658 未加载
bbanycover 2 years ago
I&#x27;ve dabbled in APL, and a couple of jobs ago I worked extensively in kdb&#x2F;q. I found it to be an immensely powerful tool in its natural environment of time-series processing, and extraordinarily painful to use outside that domain. Typically I&#x27;d write the core logic in q with a small wrapper in Java or Python to do string formatting and other tasks that kdb falls down on.<p>Which is fine. Not every language needs to do everything. Horses for courses.
nevesover 2 years ago
Fast.ai steals a lot of ideas from APL:<p><a href="https:&#x2F;&#x2F;forums.fast.ai&#x2F;t&#x2F;apl-array-programming&#x2F;97188" rel="nofollow">https:&#x2F;&#x2F;forums.fast.ai&#x2F;t&#x2F;apl-array-programming&#x2F;97188</a><p>I&#x27;ve programmed in APL last millennium. It is hell.
ameliusover 2 years ago
I love the keyboard. Wouldn&#x27;t it be nice if modern programmers had some more symbols at their disposal?
评论 #33639205 未加载
评论 #33639622 未加载
评论 #33642613 未加载
评论 #33638646 未加载
评论 #33644364 未加载
评论 #33638693 未加载
评论 #33638741 未加载
haolezover 2 years ago
Stop it! I have a lot of real work to do, but my urge to binge &quot;J for C Programmers&quot; is getting harder and harder to control :)
评论 #33652264 未加载
评论 #33652248 未加载
GnarfGnarfover 2 years ago
The practical working set of English is about 60,000 words. In theory, every word does not need to be more than four characters (26^4 = 456K).<p>But we don&#x27;t do that. Because the brain needs redundancy. Ditto source code.
评论 #33647359 未加载
smasher164over 2 years ago
I like Ivy&#x27;s[0] approach by using keywords instead of symbols. I feel like something like APL should either be embedded in some host language, be given lots of functionality for I&#x2F;O, or some static type system with rank polymorphism.<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;robpike&#x2F;ivy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;robpike&#x2F;ivy</a>
评论 #33656347 未加载
TurboHaskalover 2 years ago
Well, it won&#x27;t happen. The language is too weird and for a language these days to make it, it has to target the lowest common denominator of developers.<p>Let&#x27;s say you&#x27;re at work, and you casually mention to your team something about APL, ATS or Agda. How many were excited about it? How many did roll their eyes? Yeah, I thought so.
dncornholioover 2 years ago
Too much magic. I don&#x27;t feel any fulfilment from knowing quirks of a specific language that not many others know. A waste of time IMHO.<p>Is it still pretty cool? Yes I think so.
dangover 2 years ago
and has for a while:<p><i>APL deserves its renaissance too</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17173283" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17173283</a> - May 2018 (118 comments)<p>(Reposts are fine after a year or so - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;newsfaq.html" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;newsfaq.html</a> - especially about APL.)
skrugerover 2 years ago
There are a lot of comments of the type &quot;it&#x27;s unreadable&#x2F;write-only&#x2F;unmaintainable&quot; here. It&#x27;s a natural reaction; I know, I was there. It looks different. But readability is in the eyes of the beholder, not the language. I made this point in my APL book (<a href="https:&#x2F;&#x2F;xpqz.github.io&#x2F;learnapl" rel="nofollow">https:&#x2F;&#x2F;xpqz.github.io&#x2F;learnapl</a>) -- just because I can&#x27;t read Japanese does not make Japanese unreadable. Since I wrote that book, I&#x27;ve spent a few years immersing myself in APL, gradually rewriting thousands of lines of Python into APL, and it&#x27;s such a productivity boost. My code is an order of magnitude smaller. More, sometimes. Fast, too.<p>For the right use cases, it&#x27;s unbeatable. Sure, you probably wouldn&#x27;t want to write an OS kernel in it, but anything that reads a bunch of data, mashes it up, and spits out some result, APL is a hand-in-glove fit. And with modern SIMD processors, APL really screams.<p><a href="https:&#x2F;&#x2F;xpqz.github.io&#x2F;learnapl" rel="nofollow">https:&#x2F;&#x2F;xpqz.github.io&#x2F;learnapl</a><p><a href="https:&#x2F;&#x2F;xpqz.github.io&#x2F;cultivations" rel="nofollow">https:&#x2F;&#x2F;xpqz.github.io&#x2F;cultivations</a><p>Drop in on <a href="https:&#x2F;&#x2F;apl.chat" rel="nofollow">https:&#x2F;&#x2F;apl.chat</a> if you&#x27;re interested.
评论 #33640567 未加载
评论 #33640518 未加载
评论 #33640410 未加载
评论 #33640598 未加载
maxbondover 2 years ago
Is the adoption of matrix oriented languages like Mathematica or Octave not the APL renaissance?
adenozineover 2 years ago
What about using like a Wacom drawing tablet in order to interact with APL?<p>I&#x27;ve never tried any of the Iverson-verse languages but the non-ascii inputs seem daunting and cumbersome.
评论 #33638992 未加载
评论 #33638828 未加载
评论 #33667112 未加载
评论 #33641601 未加载
rdmover 2 years ago
That&#x27;s a cute writeup, but the author overlooked some important bits of history.<p>For example, the original use of APL (before it was called APL and before anyone had implemented it as a programming language -- the reason Iverson joined IBM) was to specify the IBM 370 machine architecture.<p>In other words, it was being used to document how the CPU worked. And it was impressively successful there, distilling a large body of documentation into 2 pages.<p>This reduction in cognitive load, describing machine structure, is what made it popular back then. And this is what motivated the effort to implement it as a programming language.<p>(Also, if I understand correctly, there&#x27;s also a relatively short and direct step from APL to the initial implementation of SQL.)
评论 #33667103 未加载
kuwozeover 2 years ago
it&#x27;s called q<p><a href="https:&#x2F;&#x2F;code.kx.com&#x2F;q&#x2F;" rel="nofollow">https:&#x2F;&#x2F;code.kx.com&#x2F;q&#x2F;</a>
评论 #33645825 未加载
评论 #33640052 未加载
tabtabover 2 years ago
There are implementations&#x2F;dialects of APL that use &quot;ASCII-friendly&quot; operation names. The &quot;J&quot; and &quot;K&quot; language are examples.
sudosysgenover 2 years ago
A lot of people in finance like to us q, an APL derivative with some more functional programming facilities, so in that sense it&#x27;s had a mini-renaissance.
mark-rover 2 years ago
I had to use APL once back in the 1970&#x27;s, because I needed the graphics capabilities of an IBM 5100. I managed, but it wasn&#x27;t a pleasant experience and I&#x27;ve felt no compulsion to repeat it.<p>I admit it was kind of cool to be able to operate on whole arrays at a time, but nowadays I can do that with Python&#x27;s numpy.
agumonkeyover 2 years ago
Aaron Hsu tried with some level of success.<p><a href="https:&#x2F;&#x2F;duckduckgo.com&#x2F;?q=aaron+hsu+apl&amp;t=ffab&amp;iax=videos&amp;ia=videos" rel="nofollow">https:&#x2F;&#x2F;duckduckgo.com&#x2F;?q=aaron+hsu+apl&amp;t=ffab&amp;iax=videos&amp;ia...</a>
andsoitisover 2 years ago
I particularly liked this principle from the article: &quot;learning all the alien symbols is a one-time investment, and expressiveness — the leverage you as a programmer gain — is for life.&quot;
sedatkover 2 years ago
APL feels like the ideal language for AI to write code with.
rbanffyover 2 years ago
Only with beam-spring keyboards, like the original.
liminalover 2 years ago
This is great. I just wish the page fixed the GoL equation at the top of the page so I didn&#x27;t need to keep scrolling back and forth.
robomartinover 2 years ago
No, it does not.<p>I used APL professionally for about ten years (early &#x27;80&#x27;s to early &#x27;90&#x27;s) for a range of applications spanning various business applications, industrial automation and DNA sequence analysis used in the Human Genome Project. The language is&#x2F;was fantastic. It truly is a tool for thought.<p>How about the funny symbols?<p>I see this type of comment all the time. If you think this way, you lack context. The notation is an important element of APL&#x27;s value proposition. You cannot understand this by watching an APL video on YouTube or running through a tutorial.<p>I equate it to something like using vim. People who have casual contact with it absolutely hate it. Those who commit and develop the skills and mental automation have a very different perspective. From that context, someone saying &quot;vim&#x27;s cryptic keyboard commands and states are horrible&quot; sounds, well, I&#x27;ll be kind, uninformed.<p>And yet, my first sentence implies I think APL does not deserve to exist. Which is it?<p>I firmly believe the future of advanced types of software engineering will require a form of notation in order to effectively communicate and describe computational solutions. What comes to mind is AI&#x2F;ML. I think APL needs to mutate and evolve into being the tool that is best-suited for solving complex AI&#x2F;ML problems. If this can happen, the notation will be critical and just as important as it is in mathematics or music.<p>I think the issue might be that we don&#x27;t yet know enough about this evolutionary stage of AI&#x2F;ML to understand what kind of programming notation we might need to invent. This isn&#x27;t well defined at all. For the most part, AI&#x2F;ML is exactly where it was in the 80&#x27;s and 90&#x27;s. We have faster computers with massive resources. Yet, if you go back to books on AI dating back to the 80&#x27;s you will be surprised to learn we haven&#x27;t really invented much in the last few decades.<p>This three volume set on my bookshelf is a good reference dating back to the early &#x27;80&#x27;s:<p><a href="https:&#x2F;&#x2F;www.sciencedirect.com&#x2F;book&#x2F;9780865760899&#x2F;the-handbook-of-artificial-intelligence" rel="nofollow">https:&#x2F;&#x2F;www.sciencedirect.com&#x2F;book&#x2F;9780865760899&#x2F;the-handboo...</a><p>In fact, if you read through it you&#x27;ll discover just how much was done in the &#x27;70&#x27;s and &#x27;60&#x27;s.<p>So, yes, I would not use or recommend APL for any modern project. It&#x27;s a liability from an ROI perspective. In addition to this, the pool of capable APL software engineers is microscopic. That is a huge problem. APL does not make business or technical sense and cannot compete with modern tools, their libraries and the large pool of capable programmers who can use them.
ninkendoover 2 years ago
I disagree. The terseness of APL is the worst part about it. Its arcane symbols are a close second.<p>I don&#x27;t want my programming language to be as terse as possible. I want it to be easy to read and maintain. I don&#x27;t see how APL is a step in the right direction at all, and IMO should just be relegated to the dustbin of history as a failed experiment.
评论 #33639676 未加载
评论 #33639149 未加载
评论 #33639840 未加载
评论 #33640378 未加载
评论 #33640181 未加载
评论 #33640208 未加载
评论 #33640603 未加载
ilytover 2 years ago
&gt; life←{↑1 ⍵∨.∧3 4=+&#x2F;,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}<p>Nope, it should be burned in fire.<p>&gt; Roughly 86% of all the fun you get from APL programming comes from the mysterious symbols and the magic behind them. It’s not that APL is alien to computers, it’s just the computers were alien to APL for quite a while.<p>That&#x27;s being <i>alien to humans</i> my dude. If understanding syntax is heaviest mental exercise in programming language it is unexcusably terrible. It should be considered torture to even require someone to read it.
评论 #33643286 未加载
评论 #33666069 未加载
评论 #33643331 未加载
diego_moitaover 2 years ago
APL died for the same reason Perl is fading: it is a write-only language.<p>Those symbols look cool. But they&#x27;re not very far away from Brainfuck.
评论 #33639293 未加载
评论 #33639183 未加载
评论 #33639746 未加载
评论 #33639136 未加载
评论 #33640624 未加载
KingLancelotover 2 years ago
Is the author insane?