by SethKinast on 6/27/23, 11:32 PM with 108 comments
by duped on 6/28/23, 1:03 AM
No! Handle units! @milk{4%cup} should be trivially convertible to liters and configured by the user. For harder conversions (volume to mass) keeping a list of ingredients and their densities (configurable of course) would be extremely useful.
On that subject, being able to specify a recipe in terms of ratios and then automatically convert it to scale would be a super power that I can't beat by hand.
For example when I bake I do everything by weight and have all the recipes I like written out by hand with unit conversions. Because measuring by volume isn't easier in 2023 than placing your mixing bowl on a kitchen scale and balancing everything to the mass of your butter and eggs.
by rpearl on 6/28/23, 12:28 AM
To use cooklang, it appears that I have to rewrite recipes to include ingredients inline. No other recipes tend to use this style, because it is harder to read.
If I write recipes in cooklang, the plain text of the recipes is harder to understand without tools that speak cooklang, forcing me to use the tools to get an understandable format. The output of the CLI tool seems like a better format than the format itself!
by Kalabasa on 6/28/23, 2:34 AM
Then finally you reach the footer and click on https://github.com/cooklang, then you see it has a bunch of cooklang libraries, e.g., TypeScript, python, C, etc.!
It even has a VSCode syntax highlighting package!
I appreciate the comprehensiveness of the project. It’s more than a markup language, cooklang seems to be an entire ecosystem.
by scrps on 6/28/23, 3:42 AM
I shall poke around the cli code.
by NoMoreNicksLeft on 6/28/23, 5:50 AM
I could add metadata tags that would indicate just what the dish was (entree, or a fancy breakfast/brunch, or a desert, etc), but since there's nothing like a standard tag if anyone else gets the file those tags are mostly worthless (their software won't be able to sort a bunch of recipes into the correct categories).
There's no way to indicate how many times the recipe has been verified (apparently the vast majority of online recipes are made-up bullshit that even the author hasn't bothered to cook even once).
Even pictures... I might want more than one non-step picture for the recipe.
Naming convention is whacked out. This works for 5 recipe files in a folder. What happens when I have 80,000? Or 2.1 million? r/datahoarder would be disappointed. How many different pot roast recipes is that? Is it only eight dozen, or is it more like 900? Are they all just numbered, 1 through n?
Hell, there are some classic recipes that are seasonal. They want not just "chicken eggs" but "spring chicken eggs" as opposed to summer or fall. How do I filter those out so I don't see them in November?
by mcdonje on 6/28/23, 1:35 AM
However, if you want to make shopping list annotations, then you're doing that extra work anyway. In a separate file? It'd be cool if the spec allowed for doing an ingredients list with annotations at the top of the recipe if the writer so chooses. The current syntax works, but not for all people/scenarios.
How would I do recipes with sections? For instance: https://www.kingarthurbaking.com/recipes/fast-summer-berry-p...
Note the ingredient sections; crust, filling, topping. Note the step numbers. Note the link to another recipe. Note the step section titles that are represented here in bold and which don't perfectly match with the ingredient sections. Note the footnotes at the end.
Not sure how I'd do most of those things with this markdown spec.
by soperj on 6/28/23, 4:48 AM
[0] - www.reciped.io
by Niksko on 6/28/23, 4:30 AM
EDIT: It has an obsidian plugin, though the last release was 2 years ago: https://github.com/deathau/cooklang-obsidian
by 22c on 6/28/23, 12:33 AM
I'd probably find myself less motivated to simply type something out to recipe.txt vs. manage all this but CookCLI does open up some interesting possibilities.
The first thing that came to mind would be that it'd be cool if CookCLI could "halve" recipes automatically. Say you had a recipe for 12 muffins but you only wanted to make 6 or 4, it could automatically divide those quantities and spit out a new recipe or shopping list.
Another cool CLI feature would be unit conversion; converting things like fluid ounces, or cups into ml.
My other piece of feedback is the overloading of {} for ending multi-word ingredient seems a bit off. It's more syntax but I'd still rather have something dedicated for that purpose eg. @(ground black pepper)
by jkellermann on 6/28/23, 2:37 PM
Some years ago, I came across a recepie as flowchart graph. This idea appealed to me instantaneously, because a picture to me is a thousand times better than a lettersoup. Especially when I'm not constantly reading the text, but have to check the pots and pans regularly.
I think this markup language could be used as input for an engine that generates nice recepie graphs.
And then an integration into the tandori.dev application?
by brisketbbq on 6/28/23, 6:04 PM
I write them in markdown and use fossil's webserver to be able to access them while in the kitchen. If I need to see ingridents while i'm out, i activate my tailscale VPN on my phone and browse to the fossil webserver.
Thankfully i'm not the only one who has oven-engineered a simple solution.
by yonrg on 6/29/23, 8:34 AM
I wrote them with pen and paper. Recently I experimented with the mermaid extension for markdown. It has its drawbacks but works.
by armanboyaci on 6/28/23, 2:52 AM
https://buttondown.email/hillelwayne/archive/edge-case-poiso...
by fn-mote on 6/28/23, 1:33 AM
This is walking the line of laziness (why don't I just look them up myself), but it sounds great.
Maybe I can combine the web server with a customized GNU units.
I don't love the % either.
Fun stuff, nice creation!
by macocha on 6/28/23, 11:55 AM
There's something quite simple and elegant about them.
by dang on 6/28/23, 11:39 AM
Show HN: CookLang – Recipe Markup Language - https://news.ycombinator.com/item?id=28997309 - Oct 2021 (146 comments)
by lucasban on 6/28/23, 4:00 AM
by stevage on 6/28/23, 1:11 AM
For instance, why is the % required? There aren't that many units; surely {0.5 kg} can automatically be parsed, rather than requiring {0.5%kg}.
by brisketbbq on 6/28/23, 6:07 PM
Show me all the recipes that use the oven, sous vide, grill, smoker, etc.