Stream: beginners

Topic: compiler internals documents


view this post on Zulip dank (Mar 08 2023 at 20:17):

i've recently started diving nose deep into the compiler internals, specifically mono ir layouts and stuff
reading the source code has been beneficial, but to understand some of the deeper non obvious abstractions i often need to ask ayaz etc
i haven't seen much published docs on these subjects besides https://github.com/roc-lang/roc/blob/main/crates/compiler/solve/docs/ambient_lambda_set_specialization.md
is there any curated list of past drafts or something somewhere i can look at?

view this post on Zulip Nick Hallstrom (Mar 08 2023 at 23:59):

I would LOVE more compiler docs. I really would love to start contributing, but just diving into the code has been pretty overwhelming to someone who has never done compiler work before. Something like this but for Roc would be amazing

view this post on Zulip Anton (Mar 10 2023 at 07:38):

I think it would also be valuable to be able to log the output of every "compiler stage". It requires less effort than thorough docs, stays up to date, and I expect it to be great for learning and debugging.

view this post on Zulip Anton (Mar 10 2023 at 07:40):

To help understand the compiler Luke also made some awesome diagrams.

view this post on Zulip Anton (Mar 10 2023 at 08:04):

I once built an interactive graph visualization for complex machine learning pipelines where you could click things to get more detailed info. I believe that something very similar would work well for the compiler. There's an opportunity here to significantly improve our productivity and onboarding.

view this post on Zulip Ayaz Hafiz (Mar 10 2023 at 14:06):

I can write some more compiler docs summarizing the whole pipeline and the key bits. I'll have some free time lat this weekend to do so. Will follow up here when it's available to check whether it's helpful or maybe people want more insight.

view this post on Zulip Ayaz Hafiz (Mar 13 2023 at 14:09):

I started a document here: https://github.com/roc-lang/roc/pull/5130. Please feel free to leave comments on what sections would be useful/would not be, or add to it.

view this post on Zulip Job van der Zwan (Mar 13 2023 at 14:48):

Tangent: me and my Dutch brain: "why is someone thanking Anton for the work Ayaz is doing?"
image.png

view this post on Zulip Anton (Mar 13 2023 at 14:49):

Hehe, I get it, I'm from Belgium btw

view this post on Zulip dank (Mar 13 2023 at 14:52):

lol

view this post on Zulip Luke Boswell (Mar 13 2023 at 21:43):

Thank you @Ayaz Hafiz, I found this helpful. I like this style/format.

view this post on Zulip Uttam Narsu (Mar 15 2023 at 18:30):

There's a nice write up of the Austral compiler at: https://borretti.me/article/design-austral-compiler


Last updated: Jul 05 2025 at 12:14 UTC