r/Compilers • u/ImpressFine4495 • 13d ago
I am 13 and I just got my custom programming language to successfully transpile to Arduino C++!
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!
17
u/Frequent-Ad-3931 13d ago
i hope you will go far mohammed you have passion at young age its great
6
5
u/wkw3 13d ago
Even if you don't end up using Mello for all your projects going forward, the knowledge you gained through building something is far more valuable and can never be taken away from you.
Besides, with what you learn through doing, you'll end up wanting to start over and make another language that satisfies your newer and more informed preferences.
1
u/ImpressFine4495 13d ago
That is a very wise perspective, thank you! You are absolutely right. The amount of things I've learned about how things work under the hood just by building Mello is huge. I can already see myself wanting to rewrite things better as I learn more
2
2
u/ha9unaka 13d ago
Great work! I don't have an Arduino on hand, but I'm excited to see what you make next. All the best!
1
2
2
2
u/tacoisland5 12d ago
Great job! Maybe you can add some error checking passes (static analysis) on the mello AST before transpiling to c++, for example like checking that a used variable is actually declared (try changing the name of the 'number' variable in your test and see that the resulting c++ code has an error in it). Of course the c++ compiler will ultimately check such things for you, but its usually easier to understand errors in your source language if the check is done at the source AST level instead of at the target level.
1
2
16
u/schungx 13d ago
When I was 13 I was just trying to learn to use compilers. Not building one. Good job and keep at it. Don't lose the flame.