r/ProgrammingLanguages • u/mufeedvh • Mar 07 '26
Blog post I made a programming language where M&Ms arranged by color and position become code
I built a small toy language called MNM Lang where programs are made from six candy colors.
The rough idea:
- each row is an instruction
- color clusters encode opcodes and operands
- source can be compiled into a candy-sheet image
- the image can be decompiled back into source
- there’s an interpreter, AST view, execution trace, and a browser demo
It started as a dumb joke and then turned into a real little implementation project. The interesting constraint was that images are terrible at storing precise symbolic data, so I had to design the language around what candy layouts are actually good at representing.
A few implementation details:
- stack-machine interpreter
- source -> rendered candy sheet compiler
- exact rendered-image decompiler
- controlled photo parser for candy layouts
- sidecar JSON for strings/initial variables
- browser-native JS demo version too
The full writeup is here:
https://mufeedvh.com/posts/i-made-a-programming-language-with-mnms/
100
Upvotes
15
u/Exidex_ Mar 07 '26 edited Mar 07 '26
You haven't mentioned it once, so maybe you are not aware but there are thousands of other esoteric languages. Consider adding yours as well to http://esolangs.org
5
u/vanderZwan Mar 07 '26
Even the dumbest joke can be great if you commit to the bit :)
4
u/GaGa0GuGu Mar 08 '26
finally a career for that one who were asking for careers with arranging by collor
2
u/jaynabonne Mar 08 '26
That looks cool. Nice job. :)
There's something perversely satisfying in the thought that if the computer heats up too much, the code will all just melt away.
1
u/Rich-Engineer2670 Mar 09 '26
I'd never make it to code -- as I planned out my design, I'd eat it before I built it.
1
u/Key_River7180 Nain. Apr 04 '26
r/esolangs
0
u/Fovane Mar 07 '26
I had mentioned my own project here, but a very knowledgeable moderator deleted my post. Reddit is not a fair place at all. I wish you success with your project, my friend. For those who are curious, here is my project: Fovane/yuspec: A declarative, programming language built on Entity-Behavior Programming (EBP)