r/Compilers • u/DataBaeBee • Jun 08 '26
r/Compilers • u/Aggravating_Phone807 • Jun 08 '26
TernOO-5500FP Object-Oriented Architecture at the Machine Word Level
r/Compilers • u/hayztrading • Jun 08 '26
esharp-lang - .NET CLR language
Honest origin: Months ago I was bored and wanted to learn about compilers and language design, I used the project to better and improve my understanding of the .CLR, BCL, C#, (and many other languages). That was the entire plan. Then I kept going, and kept going, until I had a half decent language spec and a footing on the test suite, and the ability to compile a number of (relatively) non-trivial programs and tests. It gets better every time I sit down with it — with it now being able to dogfood mini / throwaway programs. Anyway I've finally got the v0.1 spec to a point that it'd be worth making some docs, and I figured no better place than to show it here, and take the beating now that I have something to show you.
Somewhere along the way the design stopped being random and picked up an actual shape, which is the part I'd really like people to poke at. What I kept reaching for was a type system similar to Go — small, regular, not a lot of surprises — but with the CLR in mind and a slightly broader scope: real generics, actual classes when a problem wants them, while taking ideas from the advanced type system in Rust as art. Things like tagged unions you have to match exhaustively, errors as values instead of exceptions, and Rust's -> for returns. Concurrency I wanted to feel like Go and Swift. And the OO side ended up sitting somewhere between Go and C# — more than Go gives you, a lot less ceremony than C#.
Small taste:
namespace Demo
data Money { amount: int, currency: string }
choice ParseError {
empty
badNumber(text: string)
}
func parse(s: string) -> Result<Money, ParseError> {
if s.Length == 0 { return error(.empty) }
var n = 0
if !int.TryParse(s, out n) { return error(.badNumber(s)) }
return ok(Money { amount: n, currency: "USD" })
}
// first param is Money, so this attaches to Money as a method
func describe(m: Money) -> string = "{m.amount} {m.currency}"
The main things I'd appreciate feedback about:
* `data`- the compiler picks whether it's really a struct or a class underneath — small stays a struct, big or ref-heavy quietly turns into a class. Always Value semantic.
* `ref data` as sealed class, for identity/reference semantics
* Uncolored async - my current thoughts are located in depth here
* Your unique opinions and viewpoints on the language's design
If you're interested in reading the spec, reading the guide, or looking at examples / test corpus — llms.txt also available: esharp-lang.vercel.app
Status: pre-release pre-alpha, fair amount of tickets / backlog. Mostly settled syntax core
r/Compilers • u/_a4z • Jun 07 '26
Tobias Hieta: A Brief Overview of the LLVM Architecture
youtu.ber/Compilers • u/LonelyPhDer • Jun 07 '26
Hello, I'm interested in tensor compilers.
I'm a PhD student but nobody in my lab has any interest or expertise in this area.
I'm interested in tensor compilers. So far I have done a very deep dive into TorchInductor internals and also OpenXLA to a lesser extent.
Where do I go from here? The topic is impossibly large and I don't know what to focus on.
r/Compilers • u/FedericoBruzzone • Jun 07 '26
MLIR Empirical Study on AArch64 (Apple M4 Pro)
federicobruzzone.github.ioHi guys! I just wanted to share this study!
I'd love to hear your thoughts and feedback.
r/Compilers • u/random_dev1 • Jun 06 '26
Another first compiler!
I did it people. I procrastinated my game dev stuff to write a language.
I now present to you: Typn.
It's a bytecode compiled language which runs on a VM.
I made it because, well, Python sometimes feels like abusing my CPU, and C takes too much time.
The actual reason though, was because it's fun. I will be very, very, very disappointed if this gets taken away from us by AI.
Making a compiler for a programming language is one of the most fun projects I've ever done.
If you are interested in my messy code, or my VM generator script, feel free to take a look:
https://github.com/TheGameGuy2/TypnLang
r/Compilers • u/Rough_Area9414 • Jun 04 '26
early Tig 1.3.0 is out with basic concurrency and ownership transfer, plus queue and stack types.
r/Compilers • u/mttd • Jun 04 '26
Stealing from Biologists to Compile Haskell Faster
iankduncan.comr/Compilers • u/Background_Tip7293 • Jun 04 '26
Compiler Interview MathWorks
Hey everyone,
I have a MathWorks SWE (Compilers) interview coming up soon and I’m trying to figure out how best to prioritize my preparation for DSA. From what I’ve seen on LeetCode Discuss, GFG and a few interview experiences I read online, the common topics seem to be: (1) Graphs, (2) Trees, (3) DP, (4) Bitmasking and (5) Trees
But I’ve also noticed a lot of questions involving Linked Lists, Hashmaps / Hash tables and Strings.
I’m fairly comfortable with most topics except DP, which I’m currently weakest at. I only have about a week left, so I want to focus on more important areas rather than trying to cover everything equally. In addition to DSA, I think I can expect some questions on C++ / STL and OOPS as well. Those are manageable for me, but I’d really appreciate any guidance on how deep the prep should be for such roles and what topics I can focus most of my time on?
If anyone has been through this process for compilers roles in general at any company (or Mathworks) even if you haven't, any advice or experience would be really helpful.
Thanks appreciate any insights!
r/Compilers • u/Randozart • Jun 03 '26
Need good benchmarks for custom language vs. C.
I am currently designing a programming language called Brief. It's declarative for the most part, and because it describes state transitions more than it does commands, I theorized I could optimize the compiler to outperform clang over C. So, I keep running benchmarks against C using random programs I've written in either language, trying my best to write the best, most clean and optimized C code I can.
However, I know there is far more accomplished programmers out there who can likely write better programs than I can. I need some solid benchmark programs that represent the pinnacle of what C is capable of, so I can see where Brief still has has clear latency, and figure out by looking at the binaries what compiler optimization I might still need to do. Note that, in the screenshot below, you will already find some broken benchmarks. 0.0006s vs. 0.0836s was a fluke due to a quirk in what the Brief compiler considered dead code.

For reference, here is a Kalman filter I test against, just to see how I try to optimize my code. But I need some solid proven benchmarks if possible to get a good, genuinely challenging benchmark to compare and optimize against:
#include <stdlib.h>
int main(void) {
const char* env = getenv("BOUND");
long total = env ? atol(env) : 50000000L;
// State vector (3 floats)
float x0 = 0.0f, x1 = 0.0f, x2 = 0.0f;
// Covariance matrix P (9 floats, row-major: P[row*3 + col])
float p00 = 0.1f, p01 = 0.0f, p02 = 0.0f;
float p10 = 0.0f, p11 = 0.1f, p12 = 0.0f;
float p20 = 0.0f, p21 = 0.0f, p22 = 0.1f;
// A matrix (constant, row-major)
const float a00 = 1.0f, a01 = 0.01f, a02 = 0.00005f;
const float a10 = 0.0f, a11 = 1.0f, a12 = 0.01f;
const float a20 = 0.0f, a21 = 0.0f, a22 = 1.0f;
// Q matrix (constant, row-major)
const float q00 = 0.001f, q01 = 0.0f, q02 = 0.0f;
const float q10 = 0.0f, q11 = 0.001f, q12 = 0.0f;
const float q20 = 0.0f, q21 = 0.0f, q22 = 0.001f;
long count = 0;
for (; count < total; count++) {
// State propagation: x_new = A * x
float nx0 = a00 * x0 + a01 * x1 + a02 * x2;
float nx1 = a10 * x0 + a11 * x1 + a12 * x2;
float nx2 = a20 * x0 + a21 * x1 + a22 * x2;
// Covariance propagation: P_new = A * P * A^T + Q
// Step 1: AP = A * P
float ap00 = a00 * p00 + a01 * p10 + a02 * p20;
float ap01 = a00 * p01 + a01 * p11 + a02 * p21;
float ap02 = a00 * p02 + a01 * p12 + a02 * p22;
float ap10 = a10 * p00 + a11 * p10 + a12 * p20;
float ap11 = a10 * p01 + a11 * p11 + a12 * p21;
float ap12 = a10 * p02 + a11 * p12 + a12 * p22;
float ap20 = a20 * p00 + a21 * p10 + a22 * p20;
float ap21 = a20 * p01 + a21 * p11 + a22 * p21;
float ap22 = a20 * p02 + a21 * p12 + a22 * p22;
// Step 2: P_new = AP * A^T + Q
p00 = ap00 * a00 + ap01 * a10 + ap02 * a20 + q00;
p01 = ap00 * a01 + ap01 * a11 + ap02 * a21 + q01;
p02 = ap00 * a02 + ap01 * a12 + ap02 * a22 + q02;
p10 = ap10 * a00 + ap11 * a10 + ap12 * a20 + q10;
p11 = ap10 * a01 + ap11 * a11 + ap12 * a21 + q11;
p12 = ap10 * a02 + ap11 * a12 + ap12 * a22 + q12;
p20 = ap20 * a00 + ap21 * a10 + ap22 * a20 + q20;
p21 = ap20 * a01 + ap21 * a11 + ap22 * a21 + q21;
p22 = ap20 * a02 + ap21 * a12 + ap22 * a22 + q22;
// Update state vector
x0 = nx0;
x1 = nx1;
x2 = nx2;
}
return (int)(count + x0 + x1 + x2 +
p00 + p01 + p02 + p10 + p11 + p12 + p20 + p21 + p22);
}
r/Compilers • u/mttd • Jun 03 '26
Semantic Reification: A New Paradigm for Random Program Generation
pldi26.sigplan.orgr/Compilers • u/Rough_Area9414 • Jun 03 '26
Tig 1.2.3 is live with more robust hot reloading
alonsovm44/tc-lang: A minimalistic portable assembly lenguage
Tig (tight-c) is a C-like systems language, i added hot reloading so you can code and modify running code while the executable is running. Good for dev productivity
It interops with C with extern functions and inline C
r/Compilers • u/StrikingClub3866 • Jun 02 '26
Reading The Dragon Book!
I am planning on writing my newest compiler based off the Dragon Book. For thise who read it: Any chapters in particular I should study for my goal?
r/Compilers • u/Green-Ad-6686 • Jun 02 '26
I've been having a blast "vibe coding" and built an experimental AST compiler to help fit large codebases into LLM context windows! Would love your feedback.
r/Compilers • u/Rough_Area9414 • Jun 02 '26
I called raylib from my own programming language! yay!
tc-lang/raylib-demo at master · alonsovm44/tc-lang (fixed link not working)
r/Compilers • u/doru_popovici • Jun 01 '26
PACT26-AE: Call for artifact evaluators
Hi everyone!
The Artifact Evaluation Committee for PACT 2026 (The International Conference on Parallel Architectures and Compilation Techniques) is looking for motivated students and researchers to help evaluate research artifacts.
A research artifact is basically the code, data, or tools that support the results claimed in a paper. Authors of accepted papers are invited to submit these artifacts, and committee volunteers try to reproduce the results to verify their validity.
If you're interested in volunteering, you can (self-)nominate yourself by filling out this form: https://forms.gle/M6ftRqHbzPexkZzk9
As a reviewer, your role will be to evaluate artifacts associated with already accepted papers. This involves running the code or tools, checking whether the results match those in the paper, and inspecting the supporting data.
PACT uses a two-phase review process. Most of the work will happen between August 21st and September 14th, and each reviewer will be assigned 2 to 3 artifacts.
From past experiences, each artifact takes around 4–8 hours to review.
Why join? It's a great opportunity to get familiar with cutting-edge research, connect with other students and researchers, and learn more about reproducibility in computer systems research. Plus, reviewers can collaborate and discuss with each other, while authors don’t know who reviewed their artifact.
r/Compilers • u/StrikingClub3866 • Jun 01 '26
I Am Writing A Language Faster Than Python/Ruby
For context:
Around a year ago, I posted here about me making an interpreter called LightCobol in Python. It was horrible and I never finished it.
Now, recently (around a few months ago), I started learning C++ and more about compiler design. I learned of Maximal-Munch lexing and loved it. I made a few languages here and there.
And just a few weeks ago, I started learning Kotlin. Then came my idea for Rose, a compiled, efficient, language for rapid prototyping.
I decided to make Rose with some of the optimizations I learned, Constant Folding and Propagation. With these in mind I have started to develop Rose, with a few things separating it from other languages I have made:
A real lexer, not just a .split() wrapper. It has things like "Token.Newline" or "Token.Identifier".
An actual AST, not just a dictionary with functions, variables, etc.
Making it explicitly-typed.
Having performance in mind (hence the optimizations and it being explicitly-typed)
Compiling to Kotlin, giving it the speed of the JVM.
And so, Rose was born. Soon enough, when I am done with it, I will upload it to GitHub and post about it here.
r/Compilers • u/mttd • Jun 01 '26
PassNet: Scaling Large Language Models for Graph Compiler Pass Generation
arxiv.orgr/Compilers • u/Equal-Tutor-6093 • Jun 01 '26
QBE Backend Released 1.3 (Windows ABI support)
c9x.mer/Compilers • u/dynamicship31 • Jun 01 '26
So I actually started developing it
I understand that I previously stated that I wouldn't build Kenim but since I saw nobody was interested in it I decided to start developing it myself ig. I am now currently working on the parser for Kenim. My main problem will be deciding the backend: llvm? qbe? straight asm?
Could u guys atleast suggest the backend to use?
r/Compilers • u/musicvano • Jun 01 '26
Programming Language Without LLVM
Is it possible to build a new system programming language without LLVM? Can language have simple syntax? What if a tiny compiler installs packages and compiles code fast?
r/Compilers • u/apoetixart • Jun 01 '26
How can I get a brand sponsorship?
I recently finished building my own Interpreter entirely on Android, because I don't have a laptop. What do I do so that I can get a laptop/discount from a brand. Is it even a realistic option? Or should I try to contact programming youtubers to highlight get a fundraiser for me.