High-performance Tree Wrangling, the APL Way // Aaron Hsu // Dyalog '18
Why Hacker News recommends it
HN recommends it as a striking example of high-performance tree handling with array programming.
What it is
Aaron Hsu shows how to manipulate and transform tree data in APL using arrays and inverted tables instead of pointers. He claims much smaller code, better performance and easier parallelisation.
Recommended by 3 HN commenters across 3 different months, 2019 to 2021.
What Hacker News said
Recommends kadblas · 2019-06 · on “Why I think Haskell is the best general purpose language as of June 22 2019”
Qualification: I was introduced to FP a number of years ago and have finally reached a point where I feel that I have a deep understanding of FP in general. In my mind, Haskell is the "best" language out there ("best" in that it provides the best overall gain when all tradeoffs are considered). I'm no longer confident that Haskell is the "best" language anymore. I was recently introduced to a language that might be even better than Haskell: Dyalog APL. ( [LINK] ). Try it out yourself ( [LINK] ) To explain why, I recommend watching Aaron Hsu's videos on Dyalog APL: - Does APL need a Type System? ( [LINK] ) - This is actually a very interesting question that is more nuanced than upon first gla
Recommends snaky · 2020-01 · on “Language as an intellectual tool: From hieroglyphics to APL (1991)”
I had this feeling exactly listening (great, as everything Aaron does) presentation about manipulation and transformation of trees in APL, [this video]
Recommends jodrellblank · 2021-06 · on “Zig 0.8.0 Release Notes”
> " his saves on allocations, saves on total memory usage " Co-Dfns is Aaron Hsu's project, and he has a talk[1] on a compiler implemented in a nano-pass style, once in Racket, once in Chez Scheme[2] and once in Dyalog APL, each using CPU and GPU. For compiling an AST with ~16 million nodes, he gives benchmark figures that Dyalog APL takes 64MB RAM to hold it, Racket takes 1051MB and Chez Scheme takes 1485MB. His provocative statement for the talk is "pointers are the refined sugar of programming". The APL version is 1/50th of the lines of code[4], runs typically 9x faster on the CPU, 50x-200x faster on the GPU, despite being interpreted by Dyalog vs compiled Scheme. There are benchmarks whe