All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Building a Programming Language Where M&M Candy Grids Represent Executable Code

By

tosh

2mo ago· 12 min readen

Summary

The article describes the creation of a unique programming language where programs are represented as physical arrangements of M&M candies on a grid. The author built a complete system including a renderer, photo decoder, abstract syntax tree (AST) parser, and execution trace functionality. The language treats candy patterns as executable code, with different colors and positions representing different operations and data. The article includes an interactive interpreter embedded within the post, allowing readers to experiment with the candy-based programming concept.

Key quotes

· 5 pulled
What if a little pile of M&Ms on a table was a real program?
I mean literally. Imagine you arrange M&M-like candies into a specific pattern, that pattern is executable code.
I built a tiny programming language where programs are candy grids, complete with a renderer, photo decoder, AST tree, and execution trace.
It all started when...
Alright story time. Featuring inline interactive interpreter embedded right inside this post.
Snippet from the RSS feed
I built a tiny programming language where programs are candy grids, complete with a renderer, photo decoder, AST tree, and execution trace.

You might also wanna read