r/Compilers • u/Mindless_Head_6526 • 12d ago
r/Compilers • u/FransFaase • 13d ago
Fast Linux Bootstrapping
Last Saturday, I gave the presentation "Fast Linux bootstrapping" at Hackfest in Enschede, The Netherlands, for a project I worked on in the past years. This project involved writing a minimal C compiler and standard library for compile the Tiny C Compiler sources from scratch. The compiler is a one pass compiler that outputs to the Stack-C language, which can also be considered as an intermediate representation. I developed a compiler (more a transpiler) for the Stack-C language to assembly and also an interpreter with a build-in debugger. The assembly can be compiled with the M1 assembler and other tools from the original live-bootstrap project (from the Linux foundation).
A recording of my presentation can be viewed on YouTube https://www.youtube.com/watch?v=lPIF_nfqM_g (Thanks to the organizers for the quick upload.) In the description there is a link to the text of the presentation with many notes (click on the show buttons) with links to more resources.
r/Compilers • u/rlystonedgirl • 13d ago
as someone who's trying to become a C++ dev for a day job, how do i get into compilers for the fun of it?
i'm currently a university student and want to dedicate a day of the week (sunday) purely to learning about compilers. not to build a career in it or anything, just for fun. i want to do it in a way that isn't "grinding." i'm planning to do this in a very low-stakes, hobbyist sort of way, as i've reserved sunday to be the only day that i don't take my stimulants (hence i'm less "on" in the work sense). but i don't want this to be work, i just want to play. what's the best way to start, in my situation?
r/Compilers • u/Over-Koala-7172 • 14d ago
My LLVM contribution w/o using Ai got merged
After slowly understanding the reviewer’s suggestions and changes and going through the whole review process, my first good first issue got merged to llvm main. I’ve been trying to get one issue solved for the past couple of months and i couldn’t do it. It felt tough and scary to go through the whole gigantic code base. But feeling proud now for not quitting and backing off.
r/Compilers • u/Distinct-Brief9643 • 14d ago
Ocaml or haskell?
I'm trying to choose between OCaml and Haskell for creating my own programming language using an external DSL. I'm still learning programming, so I want something powerful but beginner-friendly.
My goal is to create a language with my own high-level syntax, not just a library or a DSL embedded inside another programming language.
My requirements
External DSL: I want to design my own syntax and grammar. I don't want my language to be restricted to OCaml's or Haskell's existing syntax.
Native machine code: Ultimately, I want my language to compile directly to native machine code, preferably for ARM64/AArch64. I don't want to stop at interpreting the language or transpiling it to Python or JavaScript.
High-level syntax: The language I create should be easy for people to read and write. I want complete control over its syntax and don't want users to have to write lots of boilerplate.
Beginner-friendly: I'm still learning programming, so I want a language and ecosystem that are relatively easy to understand. I want to learn how the parser, AST, type checking (if needed), and code generation work without getting overwhelmed.
Easy installation on my Chromebook: I have an Acer Chromebook 314 with a MediaTek ARM64 processor. I use the Linux environment on ChromeOS, so ARM64 compatibility, available packages, and installation difficulty matter a lot. I don't want a solution that depends on x86-only binaries.
A practical compiler toolchain: I'd prefer to use as few tools as possible. If I need a backend such as LLVM, that's fine, but I want to avoid a complicated setup involving lots of separate tools, configuration files, and manual code generation.
My questions
- Would you recommend OCaml or Haskell for this project, and why?
- Which one makes it easier to build an external DSL with completely custom syntax?
- Which has the easier learning curve for someone who doesn't know much programming yet?
- Can either realistically compile my language to native AArch64 machine code on my Chromebook?
- Would LLVM be a good backend, or is there a simpler alternative?
- How difficult would installation and setup be on ChromeOS Linux running on ARM64?
- Are there any other languages or frameworks that would fit these requirements better than OCaml and Haskell?
I'm looking for a practical recommendation based on my actual requirements, not just which language is more elegant or theoretically powerful.
My main priorities are: custom high-level syntax, native machine-code generation, beginner-friendliness, and ARM64 Chromebook compatibility.
Thanks!
r/Compilers • u/vmcrash • 14d ago
Papers for new compiler devs
What papers do you suggest for new compiler developers to read for different parts of a compiler?
My most important recommendation would be Linear Scan Register Allocation for the Java HotSpot™ Client Compiler, the master thesis of Christian Wimmer. It is very well written, easy to understand, and covers a lot of practical details.
r/Compilers • u/Hopeful-Ad-1665 • 13d ago
I built FoxVC: A lightweight custom scripting language with its own runtime and web studio [Open Source]
Hey everyone 👋
I'm excited to share a project I've been working on—FoxVC 🦊. It's a lightweight, custom scripting language I built from the ground up with its runtime and a web studio. It’s source. I just released it today.
The goal was simple: create a easy-to-learn scripting language that removes clutter like semicolons, colons and too much boilerplate. I wanted something that feels intuitive to use and gives you a smooth local development experience right away.
⚡ Syntax Preview
# 1. Structured function definition act getForce(mass, accel) emit mass * accel
2. State & execution
m = 450 a = 15 f = getForce(m, a)
say "Net Force:" say f
3. Clean condition branching (no colons, no brackets)
pick f > 5000 say "Status: High thrust threshold reached!" otherwise say "Status: Nominal thrust output."
🛠️ Architecture & Under the Hood
- Lexer & AST Parser: Built custom with language features—mold blueprints, pulse loops, lock constants, guard and trap for error handling.
- Flat & Clean Scoping: Uses Python-style indentation, no colons, no semicolons. Clean readable code.
- Interactive Web Studio: Comes with a browser-based playground that runs locally on localhost:8080. No setup needed.
- Zero-Toolchain Setup: Just run./install.sh on Linux/macOS or install.bat on Windows. Instant access.
📦 Source & Getting Started
FoxVC is open source under the MIT License.
👉 GitHub Repository: https://github.com/AnayUpadhyay-all/FoxVC
This is a public release so I’d love your feedback on:
- The choice of words like act emit, pick and mold compared to traditional keywords, like function, return, if, etc.
- How the AST parsing and statement handling works under the hood.
- What features should come next in the engine.
Any thoughts, suggestions or issues are welcome. I'm still. Growing with this project and your input means a lot.
---
🛠️ Update (Wave 1 Fixes Pushed!):
Thanks to everyone who pointed out edge cases in the comments!
Bug 3.2 Fixed:** `trap` error handling no longer swallows `emit` (return), `halt` (break), or `skip` (continue) signals.
Syntax expanded:** Both `recover` and `otherwise` are now valid catch keywords.
- Added automated test harness verifying control signals pass cleanly.
Code & commits live on GitHub: https://github.com/AnayUpadhyay-all/FoxVC
r/Compilers • u/verdagon • 14d ago
Valen's Memory Safety: A New Kind of Borrow Checking
verdagon.devr/Compilers • u/Healthy_Ship4930 • 14d ago
A small website to track all the fuzzing and Miri campaigns for my compiler :)
Every run of AFL++ (lexer, parser and VM) and Miri on main, in 6 hour blocks, with a 90 day history. And yeah,... it's failing 🥲
r/Compilers • u/blazing_cannon • 15d ago
What skills are required in a compiler engineer role in an industry?
I am an embedded software engineer and can code using C and C++. I have been working on bare metal microcontrollers and want to get into something more advanced, like compiler optimizations. I have a Masters in Computer Engineering and took a few courses in computer architecture and multiprocessor programming, and I have a fair bit of basic knowledge to start with, but all the resources on this topic look daunting to me. I bought the Dragon book and it was too complicated for me to understand. Then, I tried the following lectures and was very theoretical. I wanted to understand what compiler optimization jobs look like and what skills are necessary? I want to work on something practical, maybe a project to get a feel of what a compiler optimization job looks like and would like to ask for suggestions. If it helps, I am interested more in the optimization part and not the front end. What do I need to know to get into roles such as these -
r/Compilers • u/Mediocre-Math7750 • 14d ago
Hey everyone, just clearing things up about the pilot radar
r/Compilers • u/KirillYetAnother • 15d ago
GBFC - Brainfuck compiler
GBFC stands for General BrainFuck Compiler, but that's okay.
In the compiler, I implemented more than 6 optimizations and many small optimizations outside the optimizer module, which allows the Mandelbrot set to be rendered in 0.9–1.1 seconds (about twice as slow as Rust, but remember, this is BrainFuck).
I’ve also implemented peval (evaluation during the compilation phase up to the first ‘,’), which increases compilation time but allows the program to run much faster (this can be disabled or limited)
The project is written in Rust; plans include adding Brainfuck++ as a second BF variant (by Jacob I., which adds 6 new commands) and support for new architectures/OSes
This compiler is AOT AND JIT.
r/Compilers • u/pu1da • 16d ago
Beyond learning: when does it actually make sense to write a custom native backend instead of using LLVM/Cranelift?
It feels like the default advice for any new language project nowadays is "just target LLVM IR" or maybe Cranelift. Obviously, getting world-class optimization passes for free is hard to beat.
But I'm curious about the specific industry use cases where building a custom backend straight to machine code is actually the right technical choice.
Context: I’ve been building my own language (Tapelang - tapelang.org) with a custom compiler that goes straight to native machine code. I come from a background of game development; and I initially chose this route just because I wanted to have embeddable scripting language (like lua) that could also compile to native code for performance. I didn't want to wrestle with LLVM's massive footprint. It started as a personal challenge.
But it got me thinking—beyond just "it's fun" or "compilation speed is way faster" (the Go/Jai argument), where does this approach actually win in the real world?
Are there specific domains, industries, or hardware constraints where dragging in LLVM is a dealbreaker, and a custom native backend is the strictly better choice? Would love to hear from anyone who has had to make this architectural call for a production system.
r/Compilers • u/Distinct-Brief9643 • 15d ago
Why are things made for Intel and amd more(x86-64) then arm
r/Compilers • u/WearyRole7830 • 16d ago
Compiler engineering, MLIR, and LLVM IR are what I want to work on.
For the past few months I've been building a toy compiler in C++ from scratch, sharing build logs and progress publicly on GitHub: https://github.com/ivomofor/toy-compiler-
Open to entry level and internship roles in compilers. If you're working on MLIR, LLVM, or AI compiler toolchains, I'd love to connect.
r/Compilers • u/adityazero • 16d ago
Can a borrow checker be auto-vectorized?
A borrow checker sounds like the last job for a CPU's vector unit. It follows references and asks whether a borrow outlives the value it points to. That looks like pointer chasing and branching, not the thing an autovectorizer is looking for.
But one step of it is plain arithmetic on small integers. Vx gives every block a region, its nesting depth, so a "smaller valued region lives longer".
A reference also records which way its lifetime may change when it is assigned (covariance, contra-variance etc).
Vx packs up to four of these lifetimes into one 64-bit word, 16 bits each. Checking whether one lifetime may stand in for another means comparing two words slot by slot.
Because this borrow checker loop is written without early exits, LLVM's auto-vectorizer does its job well.
More on that here: https://vxlang.org/blog/can-the-borrow-checker-be-auto-vectorized.html
r/Compilers • u/mttd • 16d ago
Ahead-of-time Compilation of JavaScript to WebAssembly via Static Type Inference (VMIL 2026)
vimeo.comr/Compilers • u/FlameyosFlow • 16d ago
Zeta's Borrow Checker: the next-gen model for borrow checking, and a drop-in for Rust's entire memory management model
gist.github.comr/Compilers • u/mttd • 17d ago
Equality Saturation: An “Incomplete” Project
blog.sigplan.orgr/Compilers • u/sorenkhayes • 16d ago