alt.hn

3/8/2026 at 6:18:40 PM

I made a programming language with M&Ms

https://mufeedvh.com/posts/i-made-a-programming-language-with-mnms/

by tosh

3/8/2026 at 9:47:37 PM

Author of this silly project here!

Sharing a bit of backstory on why I decided to work on this; Firstly, “for fun” but primarily because I felt like I started losing the childlike wonder/whimsy I once had with programming.

So I started this new hobby where I ask myself “can I hack on this?” upon getting/seeing something.

For instance, I got this new Aula F75 keyboard (really good keyboard for the price btw, it sounds good too!) and it only has dedicated control software for Windows. So I downloaded the driver files, software executable, and manual sheet and reverse engineered the full protocol/packets and rebuilt it for my Mac. Then played snake with the backlights. Fun.

Anywho, happy to see my blog on the front page. Would love to hear if anyones going through something similar or working on silly little projects! :)

by mufeedvh

3/9/2026 at 2:09:00 AM

Great post, thanks for sharing it!

When I saw the title, I thought of Lambda Calculus[0] and SKI combinators[1]. Given that there are "only six useful colors", I wonder if M&Ms could be used to implement them.

0 - https://en.wikipedia.org/wiki/Lambda_calculus

1 - https://en.wikipedia.org/wiki/SKI_combinator_calculus

by AdieuToLogic

3/9/2026 at 5:16:04 AM

Funny you mention that, because yes, a combinator-style encoding is probably a cleaner fit for the “only six colors constraint than my stack machine. I hacked together a tiny SKI-flavored M&M reducer as a proof of concept: B=S, G=K, R=I, Y=(, O=), and N... is a free atom, so `B G G NNN` reduces to `a2`.

Gist: https://gist.github.com/mufeedvh/db930a423fdce8c1d8e495c7a3f...

by mufeedvh

3/9/2026 at 12:54:46 AM

Fun project! I had a similar project a while back, but my medium of choice was the Uno card game. I called it UnoScript [1] and it had similar mechanisms as color was an important factor. I also ended with a stack as the main part of the language, where different colors/combinations of cards could read from/modify the stack. Interesting how similar constraints can lead to some similar design choices!

[1](https://github.com/berlinquin/UnoScript)

by berlinquin

3/9/2026 at 3:49:33 AM

This makes the world a better place. I got a little oxytocin hit just from the thought that somewhere on this world, someone is working on this problem. Now I'll be kinder to old ladies and give those poor puppies a pass.

by pkaral

3/8/2026 at 10:14:40 PM

Does this work with real candy?

by chocochunks

3/9/2026 at 1:08:51 AM

Yes! Just make sure to take a photo on a plain white surface is all.

With:

  uv run mnm decompile path/to/photo.png --mode photo

by mufeedvh

3/8/2026 at 7:46:48 PM

It’s funny until one guy spills his bag of M&M’s and accidentally deletes the production database.

by bronlund

3/8/2026 at 10:50:24 PM

Wanted to fix this bug but I ran out of green M&M's

by ramon156

3/9/2026 at 7:33:26 AM

Will read this later, but in the meantime, if you're into “physical programming”, check out efghij: https://esolangs.org/wiki/Efghij

by Timwi

3/8/2026 at 10:28:48 PM

What color is your function?

by amelius

3/9/2026 at 1:56:00 AM

That's one language that doesn't need an external IDE for syntax highlighting.

by spaqin

3/8/2026 at 9:52:09 PM

It's all fun and games until some fat bastard like me decides he wants a snack. Incidentally, which flavor? Asking for a friend.

by bigstrat2003

3/9/2026 at 3:43:01 AM

This is what HN is all about

by swaraj

3/9/2026 at 7:30:06 AM

Thank you.Awesome project!

Unfortunately I think you have given my kids one more hard to refuse reason to get more candy: I need more storage.

by MASNeo

3/9/2026 at 10:07:35 AM

I can't see it explained, why/where is 000000 defined as newline?

by xnorswap

3/9/2026 at 12:27:17 PM

Looking forward to the first LLM&M coding agent

by rhoopr

3/9/2026 at 1:11:58 AM

it actually sounds like a fun idea, but i have one question. do you think a lightweight CNN trained on synthetic candy layouts would outperform the deterministic decoder for messy real world photos?

by filozopdasha

3/9/2026 at 4:35:18 AM

Yes, for messy real-world photos a lightweight CNN would probably outperform the deterministic decoder, but I’d still use it in a hybrid pipeline with classic CV for blob detection and deterministic logic for reconstructing the actual program.

by mufeedvh

3/9/2026 at 8:00:45 AM

oh man the program just melted in my mouth

by Surac

3/9/2026 at 1:10:22 PM

but can it run Doom?

by tapeloop

3/9/2026 at 5:33:12 AM

this is so cool!

by nathaah3

3/9/2026 at 6:00:39 AM

thank you! :)

by mufeedvh

3/8/2026 at 7:35:28 PM

This is AI slop but mildly amusing. Brainfuck did it first.

by owyn

3/8/2026 at 10:51:17 PM

Which part made you conclude there's AI involved?

by ramon156

3/9/2026 at 1:39:34 AM

the bold section headers and bullet points. but who cares. i don't.

by owyn

3/9/2026 at 2:58:17 AM

I literally write like the article on similar write ups, where do you think the AI's learned to write this way from.

I really don't get the AI vibes from the actual writing of it

by 306bobby

3/9/2026 at 6:38:54 AM

It gave me strong vibes too. It’s the writing style. I’ve seen OpenAI write just like this. Doesn’t mean it’s bad. There’s a few other markers. Note “silly” in quotes and over use if that word. Once would be enough. But also this is very very typical. The bolting and short quite direct and a bit repetitive statements “it absolutely does not solve “dumped a bag of candy on a messy kitchen table and took a dramatic iPhone shot.”

Real example programs are where the joke becomes a language I didn’t want this to stop at “hello world with candy colors.”” The over use of quoting. The bold. It’s not like a human wouldn’t write this. But it’s unusual for a human to do this imho. All the same - it feels novel. And at the end of the day it’s a neat idea. It’s just we enter this new brave world where things written like this give you the ick. “Where do the ai learn this from?” Well I wouldn’t mind betting the author asked it to be written in a hn style post.

by willwade

3/9/2026 at 7:40:52 AM

Please re-read your comment and tell me you're not grasping at straws just to accuse someone of using AI to write.

by Timwi

3/9/2026 at 3:55:31 PM

Yeah, the execution is stronger than the idea and design choices as well, which suggests heavy AI support

by sdwr

3/9/2026 at 2:00:47 PM

You have a problem. I would suggest thinking about it.

by NetMageSCW

3/9/2026 at 7:42:45 AM

Are you serious? We can't make headers bold or use bullet points anymore without people like you instantly calling it AI slop?

by Timwi

3/9/2026 at 7:12:15 AM

Not really the same, but made me think of this classic xkcd: https://xkcd.com/505/

by MostlyStable

3/9/2026 at 12:11:56 AM

Am I allowed to use the term psychopath in the most loving, even inspired, way?

by avatardeejay

3/9/2026 at 1:12:28 AM

Psychopath implies lack of empathy so I don't think that's quite the word you want. You could maybe repurpose "psychotic" though!

by dang

3/9/2026 at 2:54:19 AM

Maybe lack of M&Mpathy?

by phyzix5761

3/9/2026 at 1:31:43 AM

“ As it turned out, there is nothing special about psychopaths when it comes to understanding or feeling empathy with others. ”

https://www.psychologytoday.com/us/blog/fulfillment-at-any-a...

But maybe it is like so often more about the contradictory definitions of “empathy”, and capability vs. willingness.

by 47282847

3/9/2026 at 5:54:58 AM

That's interesting! But confusing as well. The test they reference (https://en.wikipedia.org/wiki/Psychopathy_Checklist) includes lack of empathy. Are they saying that this criterion could be dropped from the test with no effect on the classification?

by dang

3/9/2026 at 4:34:42 AM

How I understand the article, is that they understand why others act in certain ways, they know the mechanism of empathy, but nothing here confirms that they are empathetic themselves. I think this article's conclusion is misleading.

by efilife

3/9/2026 at 9:41:58 PM

There are many different definitions of what empathy means or how it “feels”. Do you (literally) feel the pain you’re inflicting on somebody else, do you know about it cognitively but not feel it, and how does any of it influence your actions.

by 47282847