Live data from Hacker News

Cooklang – Recipe Markup Language

cooklang.org

31–40 of 112 posts

Re: Cooklang – Recipe Markup Language

#31
post #22
post #15

Earlier quoted context omitted.

I just pour it right out of the container I store it in and don't have trouble with clumping. Life is easier and cleaner without packing flour.

> Weight vs volume measurements This is as un-winnable a debate as vi vs emacs. The world is full of both kinds of people. Any attempt on the part of the format to dictate one or the other approach will simply reduce the use of the format. As firmly convinced as you are of the rightness of your position, there is at least an equal number of equally committed champions of the other position, regardless of which positi…

Baking experts seem to be almost universally on the side of mass. It's more divided outside baking (though mostly breaks down along American/everyone else lines). It's really compelling to support both because recipes are legacy systems. I make the dinner rolls I make because my grandma makes them that way, and that's what my family likes. I can and have converted it to mass, because I can measure flour faster that way.

But the amount specified in any unit is an approximation. How much flour that dough needs is dependent on how much moisture is in that dough. That's different in different kitchens, with different flours, at different times of year. My grandma specified five cups of flour, plus more for working the dough, so it will always take more than that. The thing I like isn't five cups of flour, or 600 grams, it's whatever is necessary to achieve the right dough. 600g is a better approximation, because it's more consistent. But ultimately if you want to learn to cook something the way someone else does, you need a lot of qualitative instruction in addition to the quantitative

Re: Cooklang – Recipe Markup Language

#32
post #22
post #15

Earlier quoted context omitted.

I just pour it right out of the container I store it in and don't have trouble with clumping. Life is easier and cleaner without packing flour.

> Weight vs volume measurements This is as un-winnable a debate as vi vs emacs. The world is full of both kinds of people. Any attempt on the part of the format to dictate one or the other approach will simply reduce the use of the format. As firmly convinced as you are of the rightness of your position, there is at least an equal number of equally committed champions of the other position, regardless of which positi…

Nah, cooking/baking is chemistry and recipes are about faithfully reproducing the reactions as specified. This comes down to reproducibility and reliability which comes down to quality of the ingredients, ease of using the technique, and skill of the person doing it.

And the metric that is most reproducible for liquid or dry ingredients is weight, because it can preserve ratios. That's why professional bakeries, baristas, and chefs don't measure their ingredients by volume since it's inaccurate even for the most skilled technicians. Just like your pharmacist isn't measuring dosage by volume without known and precise densities.

For example I don't think it matters if you measure oil or water by volume since that's rather easy to do. That said, if you want to preserve ratios with the rest of your ingredients you better be doing it by weight or else you won't be faithfully following the recipe.

This is not a subjective comparison. If a recipe is only specified by volume it cannot be followed accurately. Similarly if you want to design your own, you need a notepad to track ratios by weight.

Re: Cooklang – Recipe Markup Language

#33
A feature I think would be helpful would be a reverse shopping list (for lack of a better term) where you can say 'I have ingredients a, b, c... list what recipes do I have all or ≥ n% the ingredients for?'

I shall poke around the cli code.

Re: Cooklang – Recipe Markup Language

#34
post #4

> Slowly add @milk{4%cup} [- TODO change units to litres -], keep mixing 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…

Baking is very suited to ratios, cooking less so. Bakers commonly talk about percent hydration, which is how much water there is compared to the flour.

I started using ratios for seasonings and sauces and then using taste to add it to the meat/veggies/whatever as needed and it's been very good at recreating 'good' recipes. So I wouldn't discount it. But it definitely has a bunch more skill because you're playing with more variables than baking.

Re: Cooklang – Recipe Markup Language

#36
post #5

Some of the syntax seems...suboptimal. 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}.

Surely there are thousands and thousands of units?

Or do you think the software should only support English?

A Vietnamese recipe will often use "gr" for grams (even though SI says that's not correct but what are you going to do?). A Japanese recipe will say something like "1/2パック". And so on.

Any time a recipe says something like "a dash", "a pinch", "a handful", "half can", "a dollop", "a generous pour", "to taste", or "extra large eggs" -- all things that are extremely in real world recipes -- it will be written in the local language.

I don't think the markup language intends every single measurement to be converted into laboratory measures using only official abbreviations, which feels unnecessarily restrictive.

Re: Cooklang – Recipe Markup Language

#37
post #3

This is interesting though perhaps a bit over-engineered. 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 automaticall…

> 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. The problem is that scaling recipes doesn't work this way, particularly for baking. Some ingredients don't scale linearly, cooking and mixing time…

I didn't want to go into the details but I know that ingredients don't always scale linearly, but sometimes they do.

A recipe for 6 baked potatoes could probably be halved linearly, a recipe for pancakes could also probably be halved as well.

Re: Cooklang – Recipe Markup Language

#38
post #33

A feature I think would be helpful would be a reverse shopping list (for lack of a better term) where you can say 'I have ingredients a, b, c... list what recipes do I have all or ≥ n% the ingredients for?' I shall poke around the cli code.

I just added multi-ingredient keyword search across all of your recipes to Umami (https://www.umami.recipes). If you’re on iOS, I’d recommend checking it out!

Re: Cooklang – Recipe Markup Language

#39
post #4

> Slowly add @milk{4%cup} [- TODO change units to litres -], keep mixing 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…

> 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. Eh, I've tried both and I have to disagree. Pouring milk or oil may be easier with the scale because you have very precise control over the flow rate, but for flour and other dry goods it's far easier to scoop, scrape, and dump a cup than it is to add a bit…

No, it is not easier to use a cup to scoop. You are very unlikely to be able to consistently get the same amount. Instead you get variable amounts based on how much you packed it, the humidity, and the grind of the flour.

For liquids you don't have precise control over the flow rate so it isn't easier to do over the scale. Although depending on the circumstances it is because you don't have to worry about spillage.

Re: Cooklang – Recipe Markup Language

#40
post #8

Earlier quoted context omitted.

> 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. I don't understand. Recipes absolutely include ingredients inline, because unless your recipe is a single ingredient you would need to mention the name of the ingredients that step uses. The option to include measurements with the ingredient is also importa…

What he's saying is that it's easier to have the ingredients in a list at the bottom/top instead of strewn around the text. Yes the tools can generate the list but you need the tools. Or read the entire text to parse out the list yourself. Sure some recipes require the same ingredient in different steps. Why optimize for an edge case and making the default case harder? It's solved "take half the butter..." and "with…

> What he's saying is that it's easier to have the ingredients in a list at the bottom/top instead of strewn around the text.

I understand that part. What I'm questioning is how does including an ingredient list also eliminate the need to include the ingredients inline? I don't even know how you'd make a recipe that doesn't say the ingredient names inline.

> Yes the tools can generate the list but you need the tools.

That's kind of the entire point of markup languages though. You define a clear schema that a tool can process to generate a clean or convenient document out of. This is true for pretty much any markup language. If that's an issue for some reason then you can just use plaintext.

> Sure some recipes require the same ingredient in different steps. Why optimize for an edge case and making the default case harder? It's solved "take half the butter..." and "with 100g of the sugar... Pour the rest of the sugar..." works well for the 2% of recipes you need this in.

Begging the question of whether this is actually an edge case. I'd argue it's not. This case covers a huge number of the recipes I use, including simple ones like bread recipes.

I'd also argue that this makes the "default case" easier, as you only need to focus on writing the actual steps involved. You're not going to get any typos or mismatches between your ingredient list and the instructions. That's especially a benefit if you're editing those recipes down the line, which is what I presume the typos in my older cookbooks have.

An argument could be made that it makes reading the markup annoying, but I need to reiterate that markup is primarily for writing.

Post reply on HN