I made a programming language with M&Ms
SMRTR summary
A spilled packet of GEMS candy falling into an arrow pattern on the floor sparked an unusual programming project: MNM Lang, where source code is literally written as arrangements of six colored candies.
Developer Mufeed VH built a complete programming language where blue candies represent control flow, green handles variables, yellow does math, orange manages input/output, brown deals with labels, and red handles logic operations. The number of candies in each cluster determines the specific instruction or value.
The system compiles text code into actual PNG images of candy arrangements, then can reverse the process to decode programs from photos. To solve the problem of encoding text with candy, strings are stored separately in JSON files while the visual candy layout handles program structure.
The language runs real programs including factorial calculations and FizzBuzz, complete with loops, conditionals, and variables. AI image generation created the candy sprites, which get normalized through a processing pipeline to ensure consistent decoding from photos.
The project includes a browser playground where users can edit code, see the candy visualization, and run programs immediately. As the creator puts it: "It really does look like a programming language you could pour out of a bag."
SMRTR provides this summary for quick context. The original article belongs to Hacker News.
Read the original article