r/Compilers • • 20d ago

How We Built TLX: A Hardware-Native GPU Compiler for Production ML at Scale

Thumbnail engineering.fb.com
9 Upvotes

r/Compilers • • 20d ago

Known Bits and Barrel Shifters

Thumbnail cfbolz.de
11 Upvotes

r/Compilers • • 19d ago

Trying to build a language with Python-like syntax but native AOT compilation

0 Upvotes

I am a 15 yo from India, I am new on Reddit so please interrupt me if I am going wrong. I am currently on a project to build a programming language with python-like syntax, rust-like memory safety, and C-like speed. I know that is a bit of a strange and difficult combo, but please, I have the plan, but just need a collaborator as I can't do it alone, if anyone's interested, please let me know.


r/Compilers • • 20d ago

Exploring Exponentially Many Programs at Once with E-Graphs

Thumbnail stng.substack.com
15 Upvotes

r/Compilers • • 20d ago

Pooka 0.1.0 — a small idea became a new BEAM language

7 Upvotes

Pooka started as a small idea and it slowly became a programming language.

Pooka is a statically typed language for the BEAM, with immutable classes, interfaces, pattern matching and actors. Its compiler is written in Gleam and compiles through Erlang abstract forms.

Version 0.1.0 is now released, with a standard library(as a separate HEX package), formatter, test runner(my favourite part) and documentation generator. It has spent enough time on my machine, so I thought it was time to let it wander onto yours.

It’s still early, and I’d love to hear your thoughts—or see what breaks when someone writes a program I didn’t prepare beforehand.

Pooka Github


r/Compilers • • 21d ago

Transitioning from backend SWE to compiler engineering. Any advice on projects and hiring?

47 Upvotes

Hey everyone,

I know this sub gets questions like this quite often, but there are a few specific things I've been struggling to find answers to.

I've been working towards a career in compiler engineering for the past few months through personal projects and self-study. For context, my background is 3 years of backend engineering at Dell (mostly ETL and internal tooling in C#/.NET), and I recently completed a master's focused on applied AI.

My main project is building an end-to-end x86-64 compiler from scratch in C++20. I've deliberately kept the source language simple (i64/bool types, functions, conditionals, loops, and recursion, but no pointers, structs, or complex types) so I can focus on the engineering and fundamentals of compiler construction rather than language features. I've finished the frontend (lexer, AST, recursive-descent parser, and semantic analysis, with unit tests for each component) and am currently working on IR. The plan is to eventually go through CFGs, dataflow analysis, optimizations, SSA, instruction selection, register allocation, and native x86-64 codegen.

GitHub: https://github.com/gloogie1/x86-64-native-compiler

While I've seen plenty of employers state that personal projects count as relevant experience, I've also come across compiler engineers saying that toy compilers generally aren't that impressive when evaluating candidates. So my first question is, what exactly separates a worthwhile compiler project from just another toy compiler in the eyes of employers? Is it primarily the complexity of the implementation, the engineering quality, or something else?

My second concern is that most compiler job postings I've come across mention LLVM and/or MLIR. I'm wondering how employers would view a compiler built entirely from scratch compared to projects built using those frameworks. When I started, I figured implementing everything myself would be a good way to understand how the different parts of a compiler actually work. Would it be better to see this project all the way through, or start getting experience with production compiler frameworks and open-source contributions sooner?

Finally, I'm also trying to understand some of the hiring barriers beyond just technical skills. A lot of compiler roles ask for relevant industry experience. Would my 3 years of general SWE experience help offset the lack of direct compiler experience, or would I effectively be considered an entry-level candidate?

I'm also applying internationally rather than limiting myself to one country, which means visa sponsorship would be a factor for many positions. I'm curious whether that makes breaking into an already specialized field significantly more difficult, particularly without previous work experience in compilers.

I'd really appreciate any insights from people working in the field, especially those who've been involved in hiring or have made a similar transition.

TL;DR — My main questions:

  1. What makes a personal compiler project stand out to employers beyond being another toy compiler?
  2. How do employers value a compiler built from scratch compared to LLVM/MLIR-based projects or OSS contributions? Should I finish mine first or shift towards those frameworks sooner?
  3. How much does 3 YOE in general backend SWE count when applying for compiler roles without direct industry experience?
  4. How much of an additional barrier is applying internationally and needing visa sponsorship when trying to enter the field?

Thanks!


r/Compilers • • 21d ago

Make this forward pass as fast as possible

Thumbnail ianbarber.blog
2 Upvotes

r/Compilers • • 21d ago

Triton for MTIA: Bridging the Programming Model Gaps for Custom AI Accelerators

Thumbnail arxiv.org
5 Upvotes

r/Compilers • • 21d ago

Almide – a language I'm building to make AI-written code safer

0 Upvotes

Hi. I've been working on a language called Almide and wanted to show it here.

The motivation is simple. AI agents write a lot of my code now and I can't really read all of it anymore. I think that's going to be true for a lot of people soon. So I wanted a language where more of the safety comes from the compiler and less from somebody reviewing.

I think Rust is the language you'd want AI to write. But honestly I'm not a strong Rust programmer and I never got used to ownership. So in Almide you just don't write it. No ownership, no lifetimes, no free. The compiler infers it (Perceus style, the Koka approach). On native it generates Rust and lets Rust drop things, on Wasm it does reference counting.

type Order = { id: Int, items: List[String], total: Int }

fn large(orders: List[Order]) -> List[Order] =
  orders |> list.filter((o) => o.total > 500)

fn main() -> Unit = {
  let orders: List[Order] = [
    { id: 1, items: ["pen", "ink"], total: 260 },
    { id: 2, items: ["desk"], total: 900 },
  ]
  let big = large(orders)
  println("${list.len(orders)} orders, ${list.len(big)} large")
  for o in orders {
    println("${o.id}: ${list.join(o.items, ", ")}")
  }
}

orders gets passed to large() and then I use it again in the loop. In Rust I'd have to think about that. Here the compiler figures out whether it needs to copy or bump a refcount. The downside is you can't see where that happens.

Here's the part I actually care about. I don't trust my own compiler. I built it with AI agents, so why would I? So the rule is that the compiler doesn't get to grade its own work. Every time it builds Wasm it has to write down evidence of what it did, every place it shares or frees a value, every array index it checked. Then a separate program reads that, and if it doesn't add up there is no output file. You just get an error telling you the compiler has a bug.

And then I thought, ok, but the checker can have bugs too. So now there are four of them, built in different ways. Two come out of the Rocq proofs (the proof kernel itself and a checker generated from the proofs), one is hand-written Rust, and one opens the finished Wasm file and checks that the evidence is about instructions that are really in there. In CI the first three have to give the same answer on every test program. It has already caught a real miscompile in my compiler.

It is not done, I want to be clear about that. On your own machine only the Rust checker runs, the others are CI. Native builds don't have this check. The proofs cover the checker, not the whole compiler. And if your program is simply wrong none of this saves you. But I really think this is how it should work for code nobody reads.

It's pre-1.0 and has bugs. I used AI agents a lot to build the compiler itself. I don't have data showing agents write Almide better than Rust.

repo: https://github.com/almide/almide

playground: https://almide.github.io/playground/

If anyone has thoughts on the "you can't see the copies" problem I'd be glad to hear them.


r/Compilers • • 22d ago

projects for getting good at mlir (mid level, backend)

36 Upvotes

I'm an incoming intern at a startup that builds custom chips for AI inference. somehow (luckily!) I got matched to a team that works with MLIR. I have taken some courses related to compilers, briefly touched LLVM, and have basic familiarity with mid level compiler algorithms like SCCP, LICM, etc.

to have a successful internship, I need to be able to get things done. I need to try building my own passes for experience, learn how to break problems down, and thoroughly engage with the problem space. all of these things will help me ask good questions.

my previous internships were in backend web development. that felt more straightforward, and more tangible (the request works, we hit some SLA, etc). compilers feel more abstract and more intimidating. because of this, I have often procrastinated preparing for fear of looking like a beginner, but that can't happen anymore.

so, I would like your advice on engaging with compilers. I don't just want to read a textbook (i have a tendency to do that), I need to get things done and iterate.

in the interest of iterating fast and learning, I'd like to know - what are the highest ROI projects that I can do? I was lurking and someone suggested "What about getting into FPGA and write your own CPU for using as a target?".

and for the mid-level or backend compiler engineers here, if you could do it all over again, what would you do differently? how would you change your roadmap and what kind of ways to engage with material (maybe with a mentor, or something) would you leverage that maybe aren't obvious?


r/Compilers • • 21d ago

I built a niche compiler for PLCs, IEC 61131-3 to LLVM IR to machine code

Thumbnail github.com
0 Upvotes

Believing strongly that the closed source status quo of industrial PLCs sucks, I went ahead and rolled my own compiler and runtime. With OOP features and everything.

It supports online change, a uniquely PLC type feature where the runtime swaps program code on the fly with updates while keeping all the memory space as it was. It's done without impacting real time performance. PLCs run cyclically, so between one cycle and the next, GOT pointer is swapped out.

It's effectively a soft PLC running on any commodity hardware, with PREEMPT_RT it even has good enough performance to run motion control. On windows and mac the RT performance is less impressive, but still better than any old userland app. On Linux EtherCAT IO is supported for truly realtime control, that is the expected runtime environment. Win/Mac is planned more of a development and test environment. It has VS Code integration, debugging, test suites etc.

Notably, I went ahead and made some validations in Lean 4. The basic transformation path is modeled and sound, rust implementation is tested against lean vectors. A small kernel of most critical parts is proven eqvuivalent to it's lean model. There is more work to be done in that direction, i think there is value there.

Actually the biggest question on the compiler side is not even about the compiler itself, that does what it needs to do. But about making it AI friendly. Structured Text is not something AI would have all that much training data on, even less my specific flavor of it. So forcing AI to rawdog text files to generate code is probably going to be painful more often than not. But I have heard of some clever ideas where compiler basically gives MCP that can directly edit/insert AST nodes, lookup from symbol table and so on. And basically gives AI a more token efficient and somewhat foolproofed edit surface of the code. Has anyone played around with that sort of thing and what were the results?


r/Compilers • • 22d ago

I've been developing an experimental systems programming language called Yukinary (YKN) — looking for technical feedback

12 Upvotes

Hi everyone,

I've been working on an experimental systems programming language called Yukinary (YKN) as a personal learning and development project. I've recently published version 1.0.0 and would appreciate feedback from people interested in compiler design, programming language architecture, and low-level development.

Some of the ideas I'm experimenting with:

  • Custom compiler and code generation: YKN generates PE32+ binaries for Windows and ELF64 binaries for Linux without relying on LLVM or an external C runtime.
  • Self-hosting: The compiler is capable of compiling its own source code.
  • Multilingual syntax: Keywords can be written in several natural languages, including Turkish, English, French, Russian, Japanese, Chinese, and Korean.
  • Memory management: The language aims to avoid garbage collection and explore compile-time memory safety analysis.
  • Experimental features: I've also been experimenting with a --self-heal mode for detecting and repairing certain syntax errors, as well as lightweight embedded BitNet-based models.

I'm particularly interested in getting feedback on a few things:

  1. What are your thoughts on generating machine code directly rather than relying on LLVM?
  2. Does supporting multiple natural languages for keywords make sense from a language design perspective?
  3. What potential problems do you see with this compiler architecture?
  4. Are there any design decisions you would approach differently?

I'm aware that this is still an experimental project, and I'm not claiming it is production-ready. I'm mainly interested in understanding its architectural strengths, weaknesses, and areas that need improvement.

For anyone interested in looking at the implementation, the source code and documentation are available here:

GitHub: https://github.com/ykncode/yukinary

Thanks for reading. I'd genuinely appreciate any technical criticism or suggestions.


r/Compilers • • 22d ago

An alternative, allocation-free exception handling model designed for low-latency systems and kernels

Thumbnail jamsilva.github.io
24 Upvotes

Hi everyone! In the post, I talk a bit about current implementations of exception handling and then I present a new one that I designed for my own programming language and could be used in places where exceptions usually have to be disabled, like kernels. Let me know your thoughts :)


r/Compilers • • 23d ago

What should compile-time code be allowed to do?

Thumbnail reddit.com
5 Upvotes

r/Compilers • • 22d ago

Crossport: A meson build system Crossfile generator

2 Upvotes

Crossport is a lightweight,Fast, and embeddable Crossfile generator for The meson build system.

Crossport aims to solve writing Crossfiles for meson Manually.

Crossport can be used in shell scripts.

Crossport features:

- A binary less than 1 MB.

- Every language meson supports

- Every OS meson supports

- A great manual

- Lightning Fast Generation

- Less boilerplate


r/Compilers • • 24d ago

SSA-based Register Allocation for Intel GPUs - Alyssa Rosenzweig, XDC 2026

Thumbnail youtube.com
38 Upvotes

r/Compilers • • 23d ago

What is Observational Determinism in the testing paradigm?

Thumbnail reddit.com
3 Upvotes

r/Compilers • • 23d ago

Can a programming language dispense with parentheses and conventional syntactic delimiters?

Thumbnail reddit.com
0 Upvotes

r/Compilers • • 25d ago

Anything like Crafting Interpreters?

95 Upvotes

I’m looking to see if there are any books (or other sources, like articles/pages) similar to Crafting Interpreters but for compilers instead, i.e., instructing you clearly on how to implement each stage of a basic compiler.

It doesn’t need to be as clear or direct by giving you every line of code or such, but clear and instructional such that someone can follow along. Would also be very helpful if (assuming it includes code) it uses a modern or popular language (so I don’t have to dissect ML or Forth code).

I’ve come across some books that advertise this but in reality compile to bytecode with a VM (so still an interpreter in a sense), but I’m looking for books focused on actual native code compilers (at least down to the IR stage).

Edit: clarification.


r/Compilers • • 24d ago

Sultanc update, the compiler now runs in your browser

1 Upvotes

A while ago I posted SultanC, an Arabic first system language that can be written in English. Back then it ran on macos and Linux only.

The compiler now builds for Wasm32-wasi

Cross compilation to Windows, Android, FreeBSD, RISC-V, ARM and more.

The compiler now builds for Wasm32-wasi, which powers playground, check, compile and run SultanC with nothing installed.

Try it: https://sultan-language.github.io/playground/
Source: https://github.com/sultan-language/sultanc

Feedback is very welcome, especially anything confusing for someone who doesn’t read Arabic.


r/Compilers • • 24d ago

I have completed the first foxvc V1.0.0 with engine version of v0.6.0 it is completely done it faster , reliable and actually gonna compete with languages like python and lua but One thing is needed is you all . So plz visit it once - https://github.com/AnayUpadhyay-all/FoxVC .

0 Upvotes

Go to WASM playground in in repo and test the language. For using better feature kindly clone the repo


r/Compilers • • 24d ago

MPC - Probably the worlds first polyglot optimizing compiler handling 10 languages on several platforms.

Thumbnail reddit.com
0 Upvotes

r/Compilers • • 24d ago

Compilers add or remove perfomace?

2 Upvotes

isnt it that compilers change the code, as in not only transferring it into machine language, but before that changing the structure of the code. so how would one attempt to make performant code if the compiler changes sed code that i tried to make performant?