Building a Programming Language Where M&M Candy Grids Represent Executable Code
By
tosh
Hot, fresh, and worth queueing round the block for.
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 pulledWhat 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.
You might also wanna read
A Formal Proof That Jira Is Turing-Complete via Minsky Machine Implementation
This article provides a formal proof that Jira (Atlassian's project-tracking tool) is Turing-complete by demonstrating how to build a Minsky
A Formal Proof That Jira Is Turing-Complete via Minsky Machine Implementation
This article provides a formal proof that Jira (Atlassian's project-tracking tool) is Turing-complete by demonstrating how to build a Minsky
How Shamir's Secret Sharing Algorithm Enables Threshold Cryptography
This article explains Adi Shamir's Secret Sharing algorithm, a cryptographic method published in 1979 that splits a secret into multiple pie
The History of Pipes, Forks, and Zombies in Unix Systems
This article discusses the history and concept of pipes in Unix systems, focusing on Doug McIlroy's original vision of coupling programs lik
Demystifying Floating Point Numbers: An Interactive Guide
An in-depth technical blog post that demystifies floating point numbers, explaining their internal representation and behavior. The author i
Survey of Fast Hyperbolic Tangent Approximation Techniques for Neural Networks and Audio Processing
This article surveys various mathematical approximation techniques for the hyperbolic tangent (tanh) function, focusing on computational eff
