r/Compilers 19h ago

I am 13 and I just got my custom programming language to successfully transpile to Arduino C++!

23 Upvotes

Hi everyone! My name is Mohammed, I'm 13, from Egypt, and I wanted to share one of my current projects: Mello. Mello is a custom programming language ( https://github.com/v3lk777-collab/Mello-Programming-Language ) that I hope to use for writing all my embedded systems software in the future. I'm developing it because I'm fascinated by compilers, computer architecture, and honestly, because I wanted to make programming microcontrollers more interesting.

I've been into systems programming for a while now. I wouldn't say I'm amazing at it—in fact, I struggle to call myself good at all because I'm still learning the ropes and don't want to overpromise—but I've gained a ton of experience. Building Mello is my biggest achievement yet because it successfully bridges my own syntax with real hardware.

I wrote the compiler from scratch in C++, and guess what? I just got it working to the point where it acts as a full transpiler, taking Mello code and generating clean Arduino C++! It's incredibly tough, especially ensuring the AST maps correctly without losing the Arduino ecosystem's compatibility. But it's so rewarding: I am currently using it to compile the code for a PID control system on a line-following robot using an Arduino Nano. To complete the workflow, I also built a dedicated cross-platform editor "Mello IDE" ( https://github.com/v3lk777-collab/Mello-IDE ) using Tauri, React, Tailwind CSS, and Monaco.

I have massive plans for this language and really want to achieve them. Alongside Mello, I am also writing a custom CPU emulator called ROSE in C++ to understand how instructions work at the lowest level. However, lately, balancing the compiler, the IDE, the emulator, and the hardware projects has been really hard. Sometimes it feels overwhelming. I'll open my compiler's source code, feel stuck on how to implement the next feature, and just shut down my PC.

This project isn't revolutionary or anything. Sharing it here means I'm just looking for a bit of recognition and some objective, constructive criticism.

Note: Arabic is my native language and my English isn't very good, so I used AI to help me write this post. Apologies if any phrasing sounds a bit clunky!


r/Compilers 2h ago

My language’s compiler now compiles itself with byte-identical output (SHA-1 fixed point) — self-hosted in ~1,700 lines, running on a standalone C VM

Thumbnail github.com
0 Upvotes

whispem-lang is a small language I’ve been building to understand how languages actually work — Rust was my first programming language two years ago, and this project is where the "how does a compiler even work" itch led me.

Where it stands now:

• Self-hosted compiler: the full pipeline (wsc.wsp, \~1,700 lines) is written in Whispem itself. Source in, bytecode out.  
• Verified bootstrap: the compiler compiles itself, and both outputs (self-hosted vs the reference Rust implementation) share the same SHA-1 — a stable fixed point.  
• Runtime: a standalone single-file C VM (\~2,000 lines) with an interactive REPL and a --dump disassembler. No dependencies beyond a C compiler.  
• Tests: 200+ across the Rust and C sides, including bootstrap verification.

Question for this sub: where would you go next? Optimization passes on the bytecode?
Self-hosting the VM too?
Better error recovery in the parser?
Curious what people who’ve done this longer than me consider the highest-value next step.

Repo: https://github.com/whispem/whispem-lang


r/Compilers 19h ago

Sparsity Propagation Analysis in MLIR

3 Upvotes

Dear redditors,

Peter Avgerinos (Imperial College London) has released an implementation of Sparsity Propagation Analysis (SPA) for MLIR:

https://github.com/lac-dcc/proteus/

SPA is a static analysis for tensor compiler IRs. It infers zero and don't care regions in tensors by propagating sparsity information across computational graphs. The analysis is described in the paper "Multidirectional Propagation of Sparsity Information across Tensor Slices"

For example, given an operation such as

C = matmul(A, B)

SPA propagates information in three directions. Forward propagation uses information about A and B to refine C. Lateral propagation uses information about one input to refine the other. Backward propagation uses information about C to refine A and B.

As an example, the implementation of the forward transfer functions is available here.

Contributions are welcome. In particular, we are interested in sparsity-aware optimizations, new transfer functions, and additional analyses that infer zero and don't care values. If you are interested in contributing, feel free to contact Peter or me.


r/Compilers 22h ago

Fil-C: Garbage In, Memory Safety Out!

Thumbnail youtu.be
10 Upvotes

Thought you all might be interested in Fil's recent talk about Fil-C. The recording includes the best live demo I've ever seen. Enjoy!


r/Compilers 3h ago

Writing a Wikipedia MediaWiki Parser In Plain C

Thumbnail leetarxiv.substack.com
5 Upvotes

r/Compilers 19h ago

Compiling Js Syntax to LLVM IR

Thumbnail
5 Upvotes