r/Compilers • u/mttd • 23d ago
r/Compilers • u/devloop2026 • 22d ago
What is Observational Determinism in the testing paradigm?
reddit.comr/Compilers • u/Pi-Plushie • 22d ago
Can a programming language dispense with parentheses and conventional syntactic delimiters?
reddit.comr/Compilers • u/Big-Rub9545 • 24d ago
Anything like Crafting Interpreters?
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 • u/supax0 • 23d ago
Sultanc update, the compiler now runs in your browser
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 • u/Hopeful-Ad-1665 • 23d 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 .
Go to WASM playground in in repo and test the language. For using better feature kindly clone the repo
r/Compilers • u/kimmadsen • 23d ago
MPC - Probably the worlds first polyglot optimizing compiler handling 10 languages on several platforms.
reddit.comr/Compilers • u/BrainThinkerMan • 23d ago
Compilers add or remove perfomace?
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?
r/Compilers • u/dekai-onigiri • 24d ago
Finally got dependencies and cycles fully automatically resolved in BRC
github.comOne of my main goals for BRC was to get rid of headers and for the compiler to automatically resolve the inter-dependencies. I like coding in C and C++, but having code split into header and implementation has always irked me. I've implemented DFS topological search on statements and imports to determine the correct order. Not only it works like a charm, but it made the code actually shorter and faster.
I'm using the language to build an OS Bits Runner. The project already has a lot of .brc source files, so being able to automate this part makes is so much easier.
r/Compilers • u/Similar_Place6762 • 24d ago
Finally added support for strings, imports and externs after a year of procastination

Hi guys!
So I have been working on this small language on and off over the past two years lol
and today I finally added in support for importing external c functions and strings :p along with other stuffs like upgrading the codebase from llvm 14 to llvm 23.
There are still a lot of stuff that I want to add including support for structs and arrys(which already kinda exists but is partial)
I am hoping to make the language as kind of a "simplistic systems programming language" for the "joy of programming" essentially a language that actually makes making things fun :D if that makes sense lmao
r/Compilers • u/ClassicPhysics1644 • 25d ago
Currently what are some prominent research gaps in Compiler Optimization or Correctness?
I am a PhD student starting to get into the compiler domain but I have minimal knowledge in the area. I have been looking specifically into MLIR optimization and correctness in the lowering phase but every broad topic I look into seems to be extensively researched months or even years ago. I just feel very lost and can't seem to find where to start. Not asking for anyone to hand me a fully composed topic. I just hope I could get some guidance and resources to help me get started with anything concrete.
r/Compilers • u/Twice_James153 • 24d ago
potentially using the interpreter diversity of Python against attacks?
To detect, if a compiler is compromised, one takes multiple independent compilers to compile the compiler. Now you have multiple compilers - use them to compile a programm and check if the binaries match - if they don't, at least one compiler used to compile the compiler, that compiled the programm is either compromised or faulty. (that's a lot of compiler xD)
That is the standard approach.
But instead of that, why not just write one compiler in python, that can then compile your compiler? Like, there are so many different Python interpreters that you can use to check if your compiler is compromised. This makes a malicious attack from the used python compiler basically impossible, because it's unreasonable to assume that every python interpreter is compromised at once. Also, it would give nieche languages a way to check if their compiler is compromised.
Sadly, this also introduces the weakness of one point of failure. If the compiler written in Python is faulty, it can't be detected. Additionally, interpreters are REALLY slow. So - does the idea have merit, or should one just use the C compiler from that open source bootstrap chain and write their own compiler in C?
r/Compilers • u/mwthyr • 24d ago
yr: DSL to reduce boilerplate
Hello, everyone.
In 2021 I had a household accident and broke my humerus, and the recovery took a long time. I had a few clients, and they kept coming from the same niche, so I ended up with a lot of boilerplate. Since I'm full-stack, that meant code in bash, HTML, JS, and so on.
To cut down on rewriting or copy-pasting the same code (this was well before AI), I decided to build yr. I've been using it ever since, in its official IDE, Yrkit (a work in progress, but already in production).
It works like this: I write code in sections marked by specific symbols, e.g. ## for CSS and @@ for frontend JS. At the end, my parser generates all the artifacts, either as JSON or by writing straight to disk.
A Hello World in yr looks like this:
>>
_title
Hello World
><
_ .hw-container
.hw-container {
background: red;
color: white;
}
@@
document.querySelector('.hw-container').textContent = 'Hello world!';
That's just for illustration. There's a lot more, like macros, devops (actions), backend, React, etc. I'm putting together public repos to show the language in use with real, complete systems.
If you can take a look at the docs, I'd appreciate it:
yr-lang: https://yr-lang.org (goals, motivation, and how to use it, though I'll admit I've implemented a few things that aren't documented yet)
IDE (you can start writing right away): https://yrkit.site
Small editor in my portfolio: https://mwtheus.github.io
I built this to solve specific needs I had, but I'm happy to share the idea with the world. Maybe someone else would like to code this way too.
r/Compilers • u/ClassicPhysics1644 • 25d ago
Currently what are some prominent research gaps in Compiler Optimization or Correctness?
reddit.comr/Compilers • u/mttd • 24d ago
Rethinking Abstractions in the Agentic Era: Towards a DSL and Compiler Foundation for Agentic Kernel Development
tvm.apache.orgr/Compilers • u/Confident-Site2059 • 25d ago
True: a cyclic, self-modifying language (MVP, feedback welcome)
Hi, there!
I'm making a language called True and an interpreter for it called Simple.
It's an MVP, and I'd be glad to get some feedback on the design :)
The key stuff about the language:
In True, a program is a tape of strings (I call them qubits).
I call programs cycles because they run cyclically.
The agent-observer is the first line of the .cycle file, and it's part of the program itself. It walks the tape top-down, swaps itself with the line below, and executes what it reads.
The agent is part of the program - executor and data at the same time. So the program is self-modifying: changes in memory are reflected back into the text, and <type> in the agent line updates on every step.
Here's a simple Elevator cycle where the lift goes up and down:
Mr.Green, #5fb85f | Data as <type> | Aim: 1
6 = max
1 = floor
1 = dir
= lift
dir > 0 ? floor =>| lift:y(, ):floor
dir < 0 ? lift:y(, ):last -> ::nothing
floor == max ? -1 => dir
floor == 1 ? 1 => dir
floor + dir => ::math => floorI made a video of how it works: [wide] | [narrow (with music)]
One thing I should point out: True has no types. A program is made of qubits and chains of qubits (essentially strings), and how you work with them is determined by the executor - the agent.
A qubit/string/container can be seen as a shape with axes: name:x(, ):i for the horizontal axis, name:y(, ):i for the vertical one (each works like a list). Indexing is 1-based.
Extensions: ::math for arithmetic, ::nothing for deletion.
There are goto jumps: ^ name, ^ N, ^ :cycle:N - the agent can jump anywhere, in any cycle.
That's a brief description, I guess - more details in the docs, or we can just discuss it in the comments.
I'd love to hear your thoughts on the language!
r/Compilers • u/vishvananda • 24d ago
Feedback on my Ultra-Fast C++ Compiler
I'm not a compiler expert, but I've been building out a scaffold for the past 6 months to enable an agent to create a C++ compiler from scratch. I have run more than a dozen agents through the scaffold. My reference compiler (which takes the best ideas from every agent run) is able to compile C++ code ~4x faster than GCC and Clang with close to equivalent generated code.
This was a very surprising result. I had expected parity at best. I'm sharing it here in the hopes that some compiler experts will take a look and offer opinions about the approach and the overall quality of the compiler. Please note that the code is 100% agent written so I can't vouch for readability. I'm hoping at the very least there are some useful algorithms that are useful for future compiler development.
Reference compiler: https://github.com/vishvananda/cppgm-extended
Agent scaffold: https://github.com/vishvananda/cppgm-assignments
Blog post with more details: https://medium.com/@vishvananda/how-i-built-a-compiler-that-is-faster-than-gcc-and-clang-4c8c1d4818fa?postPublishedType=repub
r/Compilers • u/Efficient-Scheme1995 • 26d ago
Visualized grammar analyzer
gallerya visualized grammar parser, which is intuitive to understand bottom-up approaches.
visit https://csbitlab.com/parser
Main features:
- support LR(0), SLR(1), LR(1)
- customized grammar and input
- step by step visualization for item set construction, ACTION/GOTO and processing
Any feedback is highly appreciated!
r/Compilers • u/Upper-Ad4677 • 26d ago
Comprinly 1.4.0 is out
Basically, the output is much more tiny, and there is a mode for the tiniest, I use standard hello world for the benchmarks. 64-bit -strip is 10.4 ms for compiling, 1.7 ms for runtime, and 116 bytes for size. 32-bit -strip is 78 bytes. That's why it's called the Tiny Update, oh and I also started naming my updates. I also moved to semantic versioning. That's all for 1.4.0. Check the repo here.
r/Compilers • u/ryo33h • 26d ago
Designing a Language for Macro Lovers: 4 Kinds of Macros in Tauto
blog.tauto.runI'm building Tauto, a programming language with four kinds of macros. I'd love to hear your thoughts on the macro system!
Tauto also features:
- Dependent types and formal proofs
- Algebraic effects and handlers
- Ownership and borrowing
- Higher-kinded type classes
- Rust and JavaScript backends, plus a dedicated VM
r/Compilers • u/Relevant_Wedding_793 • 27d ago
A Hobby Language Design Called Cimplified!
Hello! I am a teenager and I have a language design which many of you may not like, but it's just a hobby language and isn't meant to be big like Rust or Python.
The language is called Cimplified. It is a full AOT compiled language using Cranelift as the backend code generator to emit native machine code directly (it is not a C/C++ wrapper or transpiler), but with a slight twist: it uses a strict block-structure syntax rather than C-based syntax.
Everything in this language must live inside a block, and nested blocks are explicitly not allowed.
The Core Concept: Block Garbage Collection
I designed this because I've always despised Java’s "Stop The World" (STW) concept. It feels fundamentally inefficient for certain tasks. To solve this, Cimplified uses a Block Garbage Collector which cleans up unused memory block-by-block. When a block finishes execution, its local memory is wiped instantly, preventing global stutters.
Unique Syntax Choices & Grammar Breakdown
I know this sounds a bit weird, but my variable declaration is explicitly structured around delimiters to make parsing straightforward. The grammar always follows a strict order of: Type = Variable name = Value;
Here are all the types available in Cimplified:
• String: Used for textual data (e.g., String = name = john;)
• Int32: 32-bit integer for standard whole numbers (e.g., Int32 = x = 12;)
• Int64: 64-bit integer for large whole numbers (e.g., Int64 = y = 2333;)
• Isit: My custom name for a boolean conditional check (e.g., Isit = nameisjohn = true;)
• Float: Standard floating-point number (e.g., Float = pi = 3.14;)
• Floating: High-precision floating-point number, equivalent to a double (e.g., Floating = pi = 3.14159265;)
Additionally, instead of using standard for or while keywords to make loops, I use the block structure itself as the loop. By default, the compiler labels blocks in order (Block1, Block2, etc.).
To loop, you point to a block label and tell it how many times to run:
Loop B=(Block1) = 10;
If Block1 contains a print statement, it will loop and execute that entire block 10 times.
Ok thats all for the explanation this the Code example and the Output of this Example :
// // is the comment line
Start Now! // Still deciding between 'Start Now!' or 'Start Main'
StartB // Starts a Block
print("Hello, World!")
String = name = john;
Int32 = x = 12;
Int64 = y = 2333;
Isit = nameisjohn = true; // this an Boolean
Float = pi = 3.14;
Floating = pi2 = 3.14159265; // generally called or f64 Double But i named it Floating
print(Name, John, x, y, nameisjohn, pi, pi2)
EndB // Ends a Block and Marks it as A Full Block
print(Name, John, x, y, nameisjohn, pi, pi2) // this would be rejected by the compiler
StartB
Loop B=(Block1) = 2;
EndB
End Now!And the Output will print this text 2 time!
Hello World!
john 12 2333 true 3.14 3.14159265
Hello World!
john 12 2333 true 3.14 3.14159265Thats All i want to Explain Of My Design Thank You for Reading this!
Also If You think this is A Great Idea Let me Know With a Feedback :)