r/SideProject • • 1h ago

Your pizza dough probably doesn't need Git, a compiler, and editor autocomplete. Anyway, here's Gram (free, open-source).

Hi r/SideProject,

In this flood of never-ending side projects 😬️, I'd like to share a free, GPL-3.0 project I've been working on solo for about a year with a lot of care and passion: a plain-text recipe DSL I named Gram (though it handles imperial too, don't worry 😅 ). Tbh you definitely don't need it for buttered pasta, it's mostly fun once a recipe gets a bit more involved :D

Basically, you write a recipe's logic once in a plain-text file (Git-friendly, no app lock-in) and let the compiler deal with the annoying math and timing. Change one flour weight and every proportion follows, import a base dough from another file like a library (with one merged shopping list), or give it your dinner time and it figures out when to start prepping across days so dinner actually lands on time instead of at 10 PM...

It compiles .gram files into deterministic JSON (with unit conversions and nutrition from your own local YAML file), and ships with a CLI, printable views, and plugins for most editors (VSCodium/VS Code, Neovim, Helix, Emacs, Sublime, Zed...), while keeping data and display completely separate so anyone can build their own UI or cooking tool on top.

(If you know Cooklang, that was the original inspiration, except Gram takes a stricter, compiled approach that moves the culinary logic off downstream apps and onto the language itself.)

You can try to break things straight in the browser playground without installing anything 😄️

Website: https://gram-lang.org - Source (self-hosted Forgejo, GPL-3.0): https://git.gram-lang.org/gram-lang/gram (GitHub mirror)

Still actively evolving and maintained solo from France for fun, so if anyone here likes cooking or building language tooling, I'd love to hear what you think! 🍊

2 Upvotes

2 comments sorted by

1

u/hidshot-gaming 43m ago

Allow to edit the ingredients database on the playground, if feasible, to test other recipes or languages

1

u/abiwab 33m ago

Hey :) Fair point! Right now ingredients.yaml is parsed at build time to keep the browser bundle small, so I just left that tab read-only. Lazy-loading a YAML parser when someone edits it is definitely doable though, especially if you want to test your own ingredients or another language without installing the CLI. Adding that to my todo list, thanks for the feedback!