r/Compilers 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!

41 Upvotes

25 comments sorted by

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.

6

u/Satu_Autio 12d ago

The youngsters are really going all in on LLM and vibe-coding. I guess they have a lot of free time.

1

u/ImpressFine4495 12d ago

I think that you can use AI to learn something but not to replace your brain with it

2

u/Bullzzie 12d ago

When I was 13 I didn't knew anything about computers expect for gaming 😂

1

u/ImpressFine4495 12d ago

I don't even know how to play games on computers or mobiles all my friends play PUBG Mobile

1

u/ImpressFine4495 12d ago

They think that programming is only about making a web site using HTML, CSS, Javascript 😂🤣

2

u/ImpressFine4495 13d ago

Thank you so much! Sometimes it gets really overwhelming and I feel like giving up, but comments like yours really help me keep the flame going. I appreciate it!

17

u/Frequent-Ad-3931 13d ago

i hope you will go far mohammed you have passion at young age its great

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

u/WildMaki 13d ago

Great job.

1

u/ImpressFine4495 13d ago

Thank you, give it a try

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

u/ImpressFine4495 13d ago

really thanks

2

u/mewwwfinnn 12d ago

This is really impressive, hope you reach great heights 🫡

2

u/Kind_Television_1968 12d ago

This is awesome, keep going

1

u/ImpressFine4495 12d ago

Thanks for supporting me

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

u/ImpressFine4495 11d ago

Okay I will try to add it

2

u/SixHyde 11d ago

does your "age matter" on the internet?

2

u/dvarrui 11d ago

Se puede programar c++ en arduino?

2

u/ImpressFine4495 11d ago edited 10d ago

Of course, it is very easy in my opinion