Hacker News new | ask | show | jobs
by mcdonje 1088 days ago
Putting ingredients inline is interesting. I think I actually see the sense in it. As a reader, I want the ingredients list at the top, but as a writer, I'll think about ingredients as I write the instructions. So, doing it this way potentially saves on jumping back and forth between the instructions and the list, which almost feels like boilerplate.

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.

3 comments

Hello! My website CookTime handles recipes with sections (I call them components). Check out this macaron recipe: https://letscooktime.com/Recipes/Details?id=8a67c391-ddcc-4d...

The benefits are that you get distinct ingredient lists for each component but they get aggregated when you create a grocery list.

Check out the discussion from last year here: https://news.ycombinator.com/item?id=31201528

Thanks. I can't figure out how to look at the markdown. I made an account figuring that'd let me edit (so I can view), but the protections apparently have another level.

So, are the components different files? That'd definitely help if there's a component that applies to several recipes, like a sauce or crust. However, it could make things more complicated than some would like if they're working on a smaller project, like a reference notebook or a family cookbook.

Power vs simplicity is often a balancing act.

> I made an account figuring that'd let me edit (so I can view), but the protections apparently have another level.

Thanks for making an account! You can only edit you own recipes, but I (the admin) can edit any recipe. I guess you tried to edit a recipe you liked, would you like a "Copy and Edit Recipe" feature?

> So, are the components different files?

Components are what CookTime recipes are made of. A recipe has at least one component, and if necessary the author can add additional components to indicate different ingredient quantities for different components. I have thought about having re-usable components across recipes, I just haven't given thought to how to design the UX for it. Glad to hear that someone else would find it useful, I think I'll reprioritize this.

> I can't figure out how to look at the markdown.

In CookTime there isn't a simple textual representation of a recipe (unless you count the big JSON object the browser sends over the wire.). The backend is a relational database of recipes, components, ingredient requirements, nutrition data, etc...

> Power vs simplicity is often a balancing act.

100%, my primary user is my mother-in-law and I have to be extra careful to make everything easy to use for an enthusiastic retiree.

Since you seem to know this space. I'm interested in something people must be working on. I want something that is ingredient property oriented. Examples would be starch, antihistamine, and cultural usage.

The idea would be a recipe generator the uses taste profiles, food textures, but has no standard ingredients. If one only had taro root for flour all recipes would sub that in...

I'm not aware of a specific service to do what you're describing. The closest I can think of is IBM's Watson demo for recipe creation[1].

Can you tell me more about what you're looking for? CookTime's recipe object modeling is very flexible, maybe I can make what you're looking for in a generic way.

[1] - https://researcher.watson.ibm.com/researcher/view_group.php?...

I will check out Watson. I'm really just looking to tag ingredients. I could always create my own tag standards for the what I'm curious about.

I have read through this thread to try to make myself more articulate. I guess I'm thinking of it as an ingredient centered approach. The recipe is secondary to whatever is available. The idea would be the ingredients would have tags for properties. The properties would be the nutritional content, cultural references, mouth feel, taste profile, allergens, ...

The combining of ingredients might have less to do with recipes and more to do with necessities and circumstances.

The flour example is probably the most illustrative. Many grains and roots can be used as flour. If one was using taro root flour all recipes would just accommodate that substitution.

This is an interesting and complicated set of problems. It's similar to problems in the LLM & social network spaces. You have several dimensions, like recipes, ingredients, nutrition, cultural context, etc, and you have gradients to help determine recommendations, which points to a graph DB. But you also have rules when it comes to substitutions (not every substitution is appropriate for every situation), and you might have rules on other dimensions as well. That points to a layer of business logic. But to serve recommendations performantly, you might want to run rules upon writes or on a schedule to persist the results to the DB. Either that or do some sophisticated caching.
I knew I was asking in the right place. The good news is…

The idea is not commercial in nature

The system wouldn’t need to be exhaustive. The data that is already in databases would probably suffice to get started.

The system would be tailored and refined by individuals and groups.

There would be a mechanical turk aspect for graphing/validating “recipes”.

Thanks for commenting.

This seems like the fallacy of a lot of software development. Make the one time task of writing easier while making the many many multiple more times act of reading/comprehending/using harder.

Why?

Why would the reading be harder?
Because every recipe is written with the ingredients first, so you can get the ingredients ready and confirm you have the complete requirements easily.
I presume that with Cooklang, the compiler will automatically extract the list of ingredients and add it to the front.
Yes, but that makes the plaintext difficult to parse. I'll stick to Markdown.
If you have them inline, you may or may not want them separately as well. The benefit of the separate listing is that it's the total amount required. Inline, you might have 1 egg being added first, and one egg being added last.

Sure, since it's markup you could sum them to two eggs in an auto generated ingredient list, but for a general text format recipe, I'd like to see the egg in 3 places. In the ingredient list it must show "2 eggs" and then on two different locations in the recipe it will say "add 1 egg".

I agree with that, but if there is an ingredient used in multiple components, then that should be handled separately so you know you need 200g flour for the crust and 100g for the crumble topping. The shopping list or overall ingredient list needs to know you need 300g, but the ingredients list for each component needs to know what you need just for that component so you don't accidentally throw 300g flour into the crumble.

So, I think the primary disconnect I had was that I thought this was a spec for a recipe, but it's actually a spec for a component of a recipe, or an entire recipe that only has one component. The CookTime person replied to me and showed how the spec can be used in a component paradigm, which makes it much more usable.

https://news.ycombinator.com/item?id=36501915