Skip to content
0:00 / 0:00

#apl#co-dfns#parallelcompilers

Co-dfns Live Stream: Compiler Design and Architecture

Aaron Hsu (arcfide)

475 subscribers • 1 video on Hallway

YouTube
  • Recommended by 4 people: 3 on Hacker News and 1 on Lobsters.
  • A classic. People kept recommending it from 2017 to 2024.
  • Presented by Aaron Hsu, creator of Co-dfns
  • Linked in the descriptionarcfide/Co-dfns

Advanced. Deep dive for people who know the field.

20K views9 years ago4 recommendations

Programming languagesSystems programmingCompilers and interpretersConcurrency and parallelismFunctional programming

Aaron Hsu explains the architecture, design history, and dense aesthetic of Co-dfns, his parallel compiler written in APL.

Welcome to the live stream discussing all things Co-dfns. I'll be talking about the architecture, design history, and overall aesthetic of the compiler today. Hacker News Q/A thread: news.ycombinator.com/item?id=13638086 The second Hacker News AMA: news.ycombinator.com/item?id=13797797 Hacker News Originating Thread: news.ycombinator.com/item?id=13565743 GitHub repository for the compiler: github.com/arcfide/Co-dfns

Why it's here

4 people recommend this

What people say. Highly recommended for its mind-expanding look at array programming, semantic density, and writing a compiler in APL.

Nadyaon Hacker News • Recommends

On “Common combinators in JavaScript”

What use is Chinese for someone who doesn't read Chinese? The S combinator written like that is perfectly legible and fine for someone who is already familiar with the S Combinator. I don't see the problem there and I don't already grok the S Combinator. I do appreciate writing code under the assumption people working on the code would have some level of prerequisite knowledge. I'm sure you'd get a kick out of Co-dfns 0. But once you learn to "speak" APL programming it makes a lot more sense. I'd highly recommend, if you have the time, to listen to the author explaining the code for the compiler 1. 0 link 1 link to this video / HN discussion: link

Nadyaon Hacker News • Recommends

On “Jelly: a recreational programming language inspired by J”

One of the most memorable and interesting things I've ever seen on HN was an AMA from the creator of the Co-dfns parallel APL compiler. Here is co-dfns 0 and the AMA by the creator 1. The video may give you some insight and at the very least may be extremely interesting to hear the APL code explained (jump to around 13:30 for the beginning of the explanation behind the structure + what the compiler is doing). He explains it very well - it's quite easy to follow along. 0 link 1 link to this video

refseton Hacker News • Recommends

On “Thinking in an array language”

Nothing has ever convinced me about the potential for array languages in practice quite like watching Aaron Hsu describe how he develops his parallel APL compiler 0 using two Notepad.exe windows side-by-side: link to this video He has also written many comments (arcfide on HN) about this stuff before, e.g. discussing "semantic density" 1 > The compiler is designed so that I can see as much as possible with as little indirection as possible, so that when I see a piece of code I not only know how it works in complete detail, but how it connects to the world around it, and every single dependency related to it in basically one single half screen full of code (usually much less than that) without any j…

Nadyaon Hacker News • Recommends

On “APL Demonstration (1975) [video]”

I thought the same about APL until arcfide made a video about codfns a few years back. Was eye opening. link to this video

a-salehon Hacker News • Recommends

On “APL deserves its renaissance too”

I remember being floored by APL few months ago when I learned about co-dnfs and watched the stream by Aaron Hsu 1 with quotes like "This code is perfectly readable, it just isn't in English". Thing is, when I was thinking about trying it, I never figured out a good toy project. Like, when I wanted to try anything else, most of the time I would know I would be able to cobble together a web-service. Haskell, Erlang, even Prolog. I understand co-dnfs to be self-hosting, so maybe a toy programming language? 1 link to this video

varjagon Lobsters • Recommends

Explaining 750 line compiler+runtime designed to GPU self-host APL

u/Ford_Oin r/ProgrammingLanguages • Mentions

On “A GPU|CPU hosted compiler written in 17 lines of APL.”

…al compiler **by orders of magnitude in memory usage and run time** at all data sizes and achieves this performance on both interpreted and compiled platforms across CPU and GPU hardware using a single source code for both architectures and no hardware-specific annotations or code. There is also very educative presentation of the compiler in this link to this video. The code is hosted in this github repository. ----- (I am in no way affiliated with the project.)…

9214on Hacker News • Mentions

On “The 80/24 Rule”

Old Forths with block-based I/O used 64/16 (so that definition takes ≤ 4096 bytes and fits into disk block). Makes no sense in the modern world of course, but, in the context of block editors, it creates a development environment where making complex and bloaty word definitions is actively discouraged -- an idea that Aaron Hsu briefly mentions in his APL talks 1. 1: link to this video

sctbon Hacker News • Mentions

On “Modernizing Compiler Design for Carbon Toolchain [video]”

Thanks for the link! I just found the one I was thinking of, which is older but perhaps goes into more detail: link to this video .

tom_on Hacker News • Mentions

On “Learning to read Arthur Whitney's C to become smart (2024)”

Possibly related(ish): video about co-dfns, prompted by a previous HN thread (links in video summary), not written in C but put together in a similarly dense style: link to this video