TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Thinking about recipe formats more than anyone should

130 pointsby caleb_thompson7 months ago

35 comments

chuckl6 months ago
Just finished my own overthinking of recipe structures. I figure that a recipe is more or less an upside-down tree!<p>Where you start with a list of all the nodes (ingredients)<p>Have a n:1 relationship with the next series of nodes (steps)<p>until you finish at a single node (the dish you&#x27;re trying to make)<p>So instead of having a separate chunk of &quot;here&#x27;s my ingredients&quot; and &quot;let me repeat the ingredients and one by one instruction until the end&quot; I figure you can display the upside-down tree to convey more information with less words.<p>An example being <a href="https:&#x2F;&#x2F;cookbook.cstebbins.com&#x2F;recipe&#x2F;bul-koki" rel="nofollow">https:&#x2F;&#x2F;cookbook.cstebbins.com&#x2F;recipe&#x2F;bul-koki</a><p>With the underlying tree structure looking like <a href="https:&#x2F;&#x2F;assets.cstebbins.com&#x2F;cookbook&#x2F;images&#x2F;bulkokiTree.png" rel="nofollow">https:&#x2F;&#x2F;assets.cstebbins.com&#x2F;cookbook&#x2F;images&#x2F;bulkokiTree.png</a>
评论 #42123151 未加载
评论 #42122057 未加载
评论 #42127162 未加载
评论 #42123128 未加载
评论 #42121793 未加载
评论 #42125039 未加载
评论 #42188104 未加载
评论 #42121814 未加载
评论 #42126410 未加载
评论 #42125394 未加载
评论 #42127128 未加载
评论 #42122027 未加载
评论 #42121590 未加载
评论 #42123284 未加载
评论 #42121605 未加载
JoshMandel6 months ago
I find &quot;higher level&quot; format issues to be of greater concern. These are issues like: is the recipe structured in a way that makes the prep&#x2F;process flow clear, makes it obvious when a certain ingredient needs to be prepped but divided into multiple parts for use in different stages, or when different stages lead to products that are combined and subsequent poisons in the workflow?<p>A recent example: I really like the Hainanese chicken recipe at <a href="https:&#x2F;&#x2F;www.google.com&#x2F;amp&#x2F;s&#x2F;amp.theguardian.com&#x2F;food&#x2F;article&#x2F;2024&#x2F;may&#x2F;11&#x2F;yotam-ottolenghi-five-ingredient-or-thereabouts-recipes-chicken-rice-spring-onion-broad-beans" rel="nofollow">https:&#x2F;&#x2F;www.google.com&#x2F;amp&#x2F;s&#x2F;amp.theguardian.com&#x2F;food&#x2F;articl...</a> ... But I find it very hard to follow in this format.<p>Using o1-preview to restructure it, I get something that I find much easier to follow during my cooking workflow: <a href="https:&#x2F;&#x2F;chatgpt.com&#x2F;share&#x2F;6733e594-df28-8009-ac80-d5dabd1ae01b" rel="nofollow">https:&#x2F;&#x2F;chatgpt.com&#x2F;share&#x2F;6733e594-df28-8009-ac80-d5dabd1ae0...</a><p>But getting from a well-written recipe to structured data is now pretty straightforward... if&#x2F;when you need structure data.
评论 #42125987 未加载
评论 #42121502 未加载
评论 #42128338 未加载
numlocked6 months ago
Many years ago I experimented with making recipes into Gantt charts. For more complex recipes this proved incredibly useful. I spent some time trying to automate turning some of the recipe formats into Gantts, but it was pretty cumbersome. I&#x27;ll bet a good LLM would make this achievable now.<p>For an example, here&#x27;s a gantt chart for Beef Bourguignon:<p><a href="https:&#x2F;&#x2F;ibb.co&#x2F;c3TVTnX" rel="nofollow">https:&#x2F;&#x2F;ibb.co&#x2F;c3TVTnX</a><p>Note that when I print it on a (physical) recipe card, I have the &#x27;prose&#x27; instructions underneath.<p>I still think this is a pretty good idea, and I still use the cards for this recipe, and Beef Wellington.
评论 #42122222 未加载
评论 #42121572 未加载
评论 #42123547 未加载
评论 #42121758 未加载
MartijnBraam6 months ago
I&#x27;ve also spend a bit of time thinking about recipe formats because I wanted to write down some recipes for my website. Ended up making a custom yaml-based format after looking at the available options and after a while scrapped that again to make a new toml-based format to make it a bit easier to write.<p>The format is pretty well demonstrated at <a href="https:&#x2F;&#x2F;git.sr.ht&#x2F;~martijnbraam&#x2F;fathub-data&#x2F;tree&#x2F;master&#x2F;item&#x2F;en&#x2F;recipes&#x2F;indonesian&#x2F;main&#x2F;mie-goreng.toml" rel="nofollow">https:&#x2F;&#x2F;git.sr.ht&#x2F;~martijnbraam&#x2F;fathub-data&#x2F;tree&#x2F;master&#x2F;item...</a> which renders to <a href="https:&#x2F;&#x2F;fathub.org&#x2F;en&#x2F;recipe&#x2F;indonesian&#x2F;main&#x2F;mie-goreng.html" rel="nofollow">https:&#x2F;&#x2F;fathub.org&#x2F;en&#x2F;recipe&#x2F;indonesian&#x2F;main&#x2F;mie-goreng.html</a><p>Some notable features is a mini DSL to refer to ingredients in the instruction text and also have parse-able times and temperatures so on the frontend it&#x27;s easy to switch units with javascript. This is combined with a simple database of ingredient IDs which contains (translated) names and for some of them the density so you can swap the recipe between volume and weight measurements.
telebell6 months ago
Here&#x27;s my favorite format, which my sister and I made. It doesn&#x27;t work well for all recipes, but it does for lots of them. Minimizes words, easier to visualize steps.<p><a href="https:&#x2F;&#x2F;imgur.com&#x2F;a&#x2F;RDO6j6H" rel="nofollow">https:&#x2F;&#x2F;imgur.com&#x2F;a&#x2F;RDO6j6H</a>
评论 #42125254 未加载
1propionyl6 months ago
The replies to this post are, unfortunately, very indicative of the negative side of the &quot;(pseudo-)engineering mindset&quot;, which is rather close to the model-constructing mindset inherited from economics (reductionism, hiding any variety incurred by real world complexity, etc).<p>I don&#x27;t see very many people here who seem to really have done a lot of cooking, consider it a serious hobby or profession, etc.<p>None of these proposals pass the smell test as being able to capture anything beyond the most basic of recipes.
评论 #42121982 未加载
评论 #42125957 未加载
评论 #42133198 未加载
评论 #42128619 未加载
somethingsome6 months ago
It seems written by someone that does not cook, it is missing a lot of informations!<p>In particular, the cooking time is completely useless without the heat power and the kind of pan, and conversions between pans
评论 #42128874 未加载
adt2bt6 months ago
I’ve recently been caught up on noodling on the combinatorics of cooking food. I wonder if a structured recipe format would be helpful to explore the ‘solution space’ of any given dish.<p>For example, think of all the decisions required to specify a curry dish:<p>How do you cut&#x2F;mash your garlic and ginger and onions? (If you even add all of those ingredients)<p>Do you use whole or ground spices? What about for each spice? Cardamom pods or ground cardamom?<p>Do you toast each spice?<p>How long do you cook your onions?<p>And so on. Eventually you get to an absolutely gigantic amount of options that all generate a somewhat similar dish, but with key sensory differences. They may all be ‘chicken tikka masala’ but I’d argue you’d have a very different eating experience across that decision spectrum.<p>I think this may also play (specifically for Indians) into the idea that moms is best. It’s probably because mom’s is universally unique and you crave that nostalgia.
评论 #42127250 未加载
njtransit6 months ago
Perhaps it’s just me, but I’ve cooked recipes off of 50 year old, grease stained index cards written in barely legible cursive, whose ink has all but rubbed entirely away. And it was fine. Worrying about recipe format is like trying to improve reading as a technology. The state of the art is both really simple and really old. It’s hard to mess up (format-wise, recipe content can definitely suck) and it’s hard to improve.<p>Much more important to me: is the listed cooking time of onions accurate.
评论 #42128711 未加载
Finnucane7 months ago
A nice demonstration of how JSON is a stupid way to manage complex text documents.<p>It is not clear why that would be better than an xml-type arrangement like<p>&lt;step&gt;cut your &lt;ing&gt;apple&lt;&#x2F;ing&gt; into slices&lt;step&gt;<p>Or even just plain text.
评论 #42121289 未加载
评论 #42121036 未加载
评论 #42068352 未加载
23july20246 months ago
There actually is the BatchML stardardized recipe format, even if it&#x27;s a different kind of recipes I&#x27;m talking about. ISA-88 recipes for describing pharma&#x2F;chemical batch production processes.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;MESAInternational&#x2F;B2MML-BatchML">https:&#x2F;&#x2F;github.com&#x2F;MESAInternational&#x2F;B2MML-BatchML</a>
buescher6 months ago
This hurts a little to read. Think about the use cases for recipes:<p>- Shopping<p>- Scaling up&#x2F;Scaling down<p>- Finding ratios of key ingredients when you&#x27;re looking at multiple recipes to figure out a dish or what&#x27;s wrong with the last recipe you tried<p>- Mise en place, which is conventionally omitted except in very detailed recipes<p>- Planning cooktimes<p>- The actual cooking process<p>And as a home cook, I&#x27;m not personally experienced with commercial use cases, but there&#x27;s even more there: costing servings, menu planning, mise across several dishes with common ingredients, etc. Having seen some commercial recipes, pros will frequently use very simple lists of ingredients and just a few notes on technique. Bakers will use baker&#x27;s percentages.<p>The weird &quot;cooking for people who insist on modeling the world in complicated categories&quot; format doesn&#x27;t support these very well, but it sure helps with &quot;is grinding the whole spices a substep of combining the spice mixture?&quot;.
评论 #42128120 未加载
_randyr6 months ago
I&#x27;ve also been thinking entirely too much about a good recipe structure.<p>For now I&#x27;ve ended up on ingredients being more or less recipes themselves, and recipes being recursive (as in, recipes use other recipes to create new recipes). Some recipes you can either buy &amp; make yourself. For example, sweet soy sauce: easy enough to make but you could also just buy it in the store. The resulting structure is basically:<p><pre><code> Recipe: directions: rich text storageInstructions: rich text prepTime: minutes cookTime: minutes priceEstimateperServing: money ingredients: RecipeIngredient[] &#x2F;&#x2F; other fields (e.g. tags, id, name, slug, purchaseableAt, nutrients, etc) RecipeIngredient: recipeId: reference to recipe ingredientId: reference to recipe as well &#x2F;&#x2F; Allows grouping ingredients (e.g. &quot;sauce&quot;, although the sauce could be a recipe of its own instead) group: string | null </code></pre> There&#x27;s some challenges with this though:<p>- If you have a shopping list, how do you determine in a complex recipe which &quot;recipes&quot; you&#x27;ll purchase and which you&#x27;ll make from scratch (UX issue)<p>- Some recipes may have alternatives instead (for example: if allergic to X, substitute with Y)<p>- It puts a lot of burden on the recipe writer.<p>- Some recipes don&#x27;t scale linearly with just the ingredients, but perhaps also the cookware (baking a cake for example). Cooklang docs talk about this as well.<p>Scaling of recipes could be done with a measurement-aware type. Something similar to frinklang[0] for example.<p>[0]: <a href="https:&#x2F;&#x2F;frinklang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;frinklang.org&#x2F;</a>
LarryMade26 months ago
This is something I get (better ways at storing and using information.<p>I like the of a list of ingredients with the quantity in the top and then repeated in the steps (if no quantity is mentioned in the steps its implied the whole ingredient is used). This makes sense in that you may need to have on hand 3 tbs of butter but 2 get melted and mixed in step 3, and 1 is used to grease the pan in step 5.<p>The next dimension would be a language&#x2F;glossary of preparation terms (slice apple - how? radially or into x thickness sheets?) This would be helpful for those without any clue on common actions and maybe later for automation. Though cooking is way more an art than just a set of steps and standard unit quantities.<p>With a glossary you could search for recipes that use grated apples or recipes that use a food processor, or don&#x27;t use an oven, etc.<p>Good &quot;food for thought&quot; :-D
DavidPeiffer6 months ago
Since people are posting their respective recipe formats, I&#x27;ll throw in one created by a friend from college. I haven&#x27;t tried any recipes in this format, but the color coding of processing&#x2F;ingredient blocks to the vertical time axis and clear listing of how ingredients get processed together are appealing.<p>I&#x27;ve had multiple recipes on common recipe sites in which, mid-cooking I&#x27;ve realized were missing steps, didn&#x27;t mention reserving a portion for later, or some elements were not impacted by the serving size multiplier. A diagram of some sort could help me reduce my error rate.<p><a href="http:&#x2F;&#x2F;torfinseth.wpengine.com&#x2F;wp-content&#x2F;uploads&#x2F;2016&#x2F;07&#x2F;Bulgogi.png" rel="nofollow">http:&#x2F;&#x2F;torfinseth.wpengine.com&#x2F;wp-content&#x2F;uploads&#x2F;2016&#x2F;07&#x2F;Bu...</a>
评论 #42125294 未加载
woile6 months ago
Nice, I have also created a language for recipe based on cook-lang (I didn&#x27;t use cook-lang because I was not convinced by the syntax). The language is called recipe-lang[0] and it powers <a href="https:&#x2F;&#x2F;www.reciperium.com" rel="nofollow">https:&#x2F;&#x2F;www.reciperium.com</a><p>Check it out, I&#x27;ve open sourced as well a syntax highlight for vscode, a cli for the terminal, a tutorial and a playground, and the wasm modules.<p>I use the language for more than food recipes, see: <a href="https:&#x2F;&#x2F;www.reciperium.com&#x2F;woile&#x2F;garlic-tea-for-plants" rel="nofollow">https:&#x2F;&#x2F;www.reciperium.com&#x2F;woile&#x2F;garlic-tea-for-plants</a><p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;reciperium&#x2F;recipe-lang">https:&#x2F;&#x2F;github.com&#x2F;reciperium&#x2F;recipe-lang</a>
评论 #42126610 未加载
dmje6 months ago
I&#x27;m entirely in the &quot;make it easy&quot; camp. I&#x27;d rather spend more time gathering, cooking and eating recipes than developing an over-complex schema which I have to think about all the time. I found this [0] which converts markdown and just keep my recipes in Obsidian with a simple ChronoSync to periodically upload stuff to the family recipe website. I did dabble with a scraper that turns web recipes into this same markdown format which is quite fun but really just simple as possible is the way for me!<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;jeffThompson&#x2F;Recipes">https:&#x2F;&#x2F;github.com&#x2F;jeffThompson&#x2F;Recipes</a>
eternityforest6 months ago
Cooklang seems pretty much perfect for every use case I can think of.<p>I would probably prefer a more generic syntax if I were doing it from scratch, but then I&#x27;d just wind up with HTML and it wouldn&#x27;t be as good for recipes.<p>I could see a more structured approach being useful if you were following one step at a time on a tablet, so maybe that scales better to more complicated recipes?<p>Most of the stuff I cook is simple enough it all fits on one screenful anyway, on the rare occasion I even use a recipe at all, so I&#x27;m not quite sure what the best approach is to cover very complex recipes.
jancsika6 months ago
Should include a field for how much the person documenting the recipe loves&#x2F;loved the cook.<p>Then I can search by &quot;love&quot; field &lt;= 0 and get the best recipes. Because let&#x27;s face it-- everything with the highest love field is really being documented for the documenter. But if it&#x27;s zero (or even better, negative), that&#x27;s likely to be a good recipe.<p>Imagine: &quot;I hated that guy sooo much, but damned if he didn&#x27;t make the best potatoes au gratin.&quot; That&#x27;s a recipe I want to try.
ahnick6 months ago
IMHO for mostly text data where you need a bit of custom formatting(e.g. cooking recipes) I would probably choose to go with AsciiDoc and then just adapt a rendering engine to make it look pretty. This way you get all the tooling and learnings that AsciiDoc has accumulated over the years and avoid having to spend time on a DSL and edge case detection that inventing a new standard will require.
评论 #42121966 未加载
stevage6 months ago
Recipes are a pretty interesting case because they&#x27;re right on the edge between text with a bit of markup, and data with a lot of text.
paulmooreparks6 months ago
Interesting... this kind of codifies what I usually have ChatGPT do with recipes I find. I have it standardise the measurements (I like a mix of weights in grams and volumes in Imperial; sue me), give me a list of utensils and containers, what order I need to have those implements in, and an estimate of time required in each phase of the recipe.
dbg314156 months ago
Google does a really good job of this.<p>Allows for videos too. Sauces and Main Dishes in the same recipe. It’s comprehensive.<p><a href="https:&#x2F;&#x2F;developers.google.com&#x2F;search&#x2F;docs&#x2F;appearance&#x2F;structured-data&#x2F;recipe" rel="nofollow">https:&#x2F;&#x2F;developers.google.com&#x2F;search&#x2F;docs&#x2F;appearance&#x2F;structu...</a>
tunesmith6 months ago
Recipes are DAGs, not trees or lists.
评论 #42123837 未加载
Ekaros6 months ago
Thinking of good recipe format I think there are quite a many things that could or maybe should be included. Like ratios, maybe minimum and maximum scaling. Portition size, both as main meal or as side. And then total use of ingredient if used in multiple steps.
fouc6 months ago
Here&#x27;s an idea. A recipe is ultimately a checklist. It&#x27;s essentially a multi-flow checklist with parts that need to be done sequentially and other parts that can be done in parallel.<p>So if we had a checklist format, we could easily derive a recipe format from that.
irrational6 months ago
What about the table format used by <a href="https:&#x2F;&#x2F;www.cookingforengineers.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.cookingforengineers.com&#x2F;</a> ?<p>Though, tables in markdown are not so easy to read unless you put effort into formatting the data.
评论 #42125267 未加载
Terr_6 months ago
Only a short step now until BPEL: Bakery Process Execution Language.
jsmith996 months ago
cooklang is very nice but not all parsers seem willing to display comments or metadata. Eg there are two plugins for obsidian but neither seems willing to display the recipe description or anything else that isn’t a step.<p>You might also want to consider why you want your recipes to be machine readable. I loved the idea in theory but unless you’ve integrated this with your smart larder&#x2F;fridge or something it might not be useful.
memset6 months ago
I run <a href="https:&#x2F;&#x2F;www.plainoldrecipe.com" rel="nofollow">https:&#x2F;&#x2F;www.plainoldrecipe.com</a><p>Had no idea about some of these other formats!
lbeckman3146 months ago
Tangentially related:<p><a href="https:&#x2F;&#x2F;esolangs.org&#x2F;wiki&#x2F;Chef" rel="nofollow">https:&#x2F;&#x2F;esolangs.org&#x2F;wiki&#x2F;Chef</a>
mattdesl6 months ago
With latest LLMs I feel there is less and less need to be structured about authoring recipes.<p>I now jot down rough notes in Obsidian when I make a meal I like, and let AI re-format it if I want to share the full recipe with somebody. This also lets me control the output: if I’m sending the recipe to somebody who is new to cooking, I might ask for a more detailed output than if they were only interested in my flavour combinations or specific techniques.
评论 #42123653 未加载
评论 #42121599 未加载
bastloing6 months ago
Another technique would be from the Microsoft engineers that made the book series Modernist Cuisine.
danielovichdk6 months ago
Recipes should be handled like love and fights. Feelings. Understanding of the non-understandable. Emotional to the smell. Adventures to the mouth. Travelling with it. Close your eyes and let it flow from the tongue, dream of where you are with that taste.<p>Cooking is more like life than mixing things. There is a hidden magic to it. It&#x27;s the closest thing to magic next to programming.<p>Exactly like programming. It can get to you and will swallow you whole if you let it.<p>Go eat now. Eat well. Sleep well. Love well. That is the essence of a good life.
aceix6 months ago
interesting one. cooking for engineers :)
评论 #42126102 未加载