[HN Gopher] Show HN: CookLang - Recipe Markup Language
       ___________________________________________________________________
        
       Show HN: CookLang - Recipe Markup Language
        
       Author : dubadub
       Score  : 355 points
       Date   : 2021-10-26 07:11 UTC (15 hours ago)
        
 (HTM) web link (cooklang.org)
 (TXT) w3m dump (cooklang.org)
        
       | schleck8 wrote:
       | No support for Windows and Android?
        
         | dubadub wrote:
         | This release is MVP, to test the waters. If people like the
         | project we will definitely continue to expand to other
         | platforms. I'm not 100% sure but it might work on windows in
         | WSL already.
        
           | supercheetah wrote:
           | I'm betting you could probably get away with just using MSYS
           | to compile it for Windows
        
             | supercheetah wrote:
             | Ah, nevermind. I just noticed you're using Swift.
        
         | leetrout wrote:
         | Maybe due to the Swift toolchain and what is easiest to get
         | working first? (I have never used Swift)
        
           | dubadub wrote:
           | You can try to run precompiled Linux binary, it's statically
           | linked so doesn't have any dependencies (almost).
           | 
           | Edit. Here is installation instructions
           | https://github.com/cooklang/CookCLI#installation
        
       | garrickvanburen wrote:
       | http://beerxml.com/
        
       | martinskou wrote:
       | Looks nice.
       | 
       | Now if we just had a good Markup Language for webdesign...
        
       | SergeAx wrote:
       | Another TWO recipe markup standards:
       | 
       | http://microformats.org/wiki/hrecipe
       | 
       | https://schema.org/Recipe
       | 
       | Mandatory xkcd link: https://xkcd.com/927/
        
         | wds wrote:
         | hRecipe looks like it's just HTML/entirely web-based, and
         | Schema seems like it covers way more than it reasonably should.
         | I personally think CookLang is the better of these, even this
         | early on.
        
           | madrox wrote:
           | hRecipe is over 10 years old, and the point of microformats
           | is to extract semantic data from HTML. It's not really
           | solving the same problem as CookLang in the way HTML and JSON
           | aren't solving the same thing.
           | 
           | While I don't know much about the history of Recipe in
           | Schema, I find "covers way more than it reasonably should" to
           | be an odd criticism of a format. I usually find it to be a
           | mark of schema maturity. All concepts behind data formats
           | have more complexity than an initial investigation would
           | uncover (see also: Falsehoods Programmers Believe About
           | Names[1]). If anything, it leads me to believe CookLang has a
           | ways to go.
           | 
           | 1: https://www.kalzumeus.com/2010/06/17/falsehoods-
           | programmers-...
        
       | jimmyed wrote:
       | Holy cow, I seemed like a fun little project until I saw the
       | android AND iOS apps! Some folks don't know when to stop, or
       | maybe that's most of us ..
        
       | schmorptron wrote:
       | This looks awesome! I wonder how difficult it would be to
       | integrate it with Gnome Recipes?[0] The interface is really nice
       | and even automatically makes shopping lists for you based on
       | recipes and intended servings you selected.
       | 
       | [0]https://wiki.gnome.org/Apps/Recipes
        
       | thih9 wrote:
       | > Set oven to max temperature
       | 
       | This instruction in the Neapolitan Pizza recipe got me
       | interested. Surely there is an upper limit?
       | 
       | Turns out the Wikipedia article about oven temperatures [1] has a
       | dedicated entry:
       | 
       | > Neapolitan pizza: 905degF (485degC)
       | 
       | Which is way more than I expected. I guess this justifies the
       | "set oven to max".
       | 
       | [1]: https://en.m.wikipedia.org/wiki/Oven_temperatures
        
         | Kylekramer wrote:
         | People will hack their ovens to run cleaning cycles without
         | locking for pizza making purpose.
        
           | stewx wrote:
           | Note: this will significantly reduce the life of your oven.
           | The self-cleaning cycle is torture for the oven components.
           | They are not really built to withstand the heat.
        
         | fastball wrote:
         | Basically the reason there are pizza ovens is because they get
         | way hotter than a normal oven.
        
       | igorrek wrote:
       | I admire this effort and wish you a lot of success with it.
       | 
       | I see three main problems:
       | 
       | 1) tech people probably do not cook much and more order/eat out,
       | so it is hard for me to imagine chefs/grandmas/not-tech-savvy
       | people using it;
       | 
       | 2) main problem for people cooking/experimenting is to decide
       | what exactly to cook - and here you would usually go for
       | something proven (e.g a cook-book or a website)
       | 
       | 3) there is a reason not everyone can be a good recipe developer,
       | because it takes a lot of experience and knowledge and you cannot
       | really copy/paste and publish from existing pages/books. I am not
       | sure if I would try a random "forked" recipe.
       | 
       | Good luck, I am interested in what comes out of it!
        
         | JustSomeNobody wrote:
         | I don't believe number one to be true at all (anecdotally).
         | Every place I have worked, there's been cook-offs and
         | engineering takes that challenge seriously.
        
       | JustSomeNobody wrote:
       | This looks really cool. But...[0]
       | 
       | I've tried a number of recipe apps, etc. and I got to tell you,
       | most are just work. The worst are the ones that make you use a
       | GUI with dropdowns for things like teaspoons or tablespoons.
       | 
       | I use a wiki. I can cut and paste a recipe into it. I don't even
       | really care much about markup; I can read it just fine. I can
       | access them from laptop, iPad, etc just fine and I don't have to
       | have the software installed on everything.
       | 
       | [0] I know this isn't an app, it's markup, and like I said, looks
       | really cool. Just seems like it would be more work than just
       | using a wiki.
        
       | miguelrochefort wrote:
       | It would be great if CookLang was compatible with, and compilable
       | to, Schema.org's Recipe schemas [0].
       | 
       | Here's an interesting discussion on the subject of ingredient
       | quantities [1].
       | 
       | [0] https://schema.org/Recipe
       | 
       | [1] https://github.com/schemaorg/schemaorg/issues/882
        
         | mekkkkkk wrote:
         | Just out of curiosity, is there any interop that you'd
         | personally benefit from? I'm unfamiliar with schema.org's more
         | ephemeral schemas and how commonly they are used.
        
         | peter_retief wrote:
         | I have tried the schema recipe schema but it was too complex
         | for me. CookLang looks promising in that it might be simpler.
         | 
         | I cook and I write code but never at the same time :)
        
         | dubadub wrote:
         | Good idea, thank you for sharing
        
       | mysterydip wrote:
       | What's the markup for "unrelated long-winded story because I
       | wanted to be a writer"? :) Great idea, and I agree with another
       | commenter that a github-style recipe sharing/forking system would
       | be a good addition.
        
         | kevinmchugh wrote:
         | The intro serves a couple purposes. It ensured the text of the
         | recipe was "below the jump" on RSS readers, so the audience had
         | to go to the original sites (and see ads). It helps detect and
         | trap plagiarists - it's copywritable, while a recipe isn't. But
         | it also contextualizes the recipe. It's really important for me
         | to understand if I'm seeing an easy weeknight favorite or a
         | labor-of-love Sunday meal.
         | 
         | Beyond just looking at the timing, I want to know how a cook
         | thinks about the dish. If you open cookbooks, the intro spiel
         | is common, and I often find it more helpful than the actual
         | text of the recipe. There's a million places I can read a
         | recipe for pad Thai, but Andy Ricker and Leela Punyaratabandhu
         | have some deep insight that is very valuable.
         | 
         | Certainly some authors are crappy writers and don't add value
         | here - I don't follow those people. Googling for recipes will
         | turn those people up too often.
        
         | BasilPH wrote:
         | I heard that the long-winded stories also serve to make the
         | text longer for SEO purposes. i could imagine that it makes you
         | stay longer on the page, because you look for the recipe. Also,
         | more text equals more opportunities to insert ads.
        
         | rexpop wrote:
         | This is an unnecessarily harsh characterization. Recipe writers
         | are constrained by economics, just like the rest of us. It's
         | dismaying to see such cruel mockery on an industry forum. You
         | may also want to look into Fundamental Attribution Error:
         | recipe writers are "flawed", in your mind, but do you judge
         | yourself so harshly? Likely, not. You probably excuse your own
         | misbehavior as compelled by transient circumstance.
        
       | Master_Odin wrote:
       | One thing that doesn't look possible from the spec is supporting
       | recipes with multiple discrete parts. An immediate example for me
       | would be I made a fish dish that had an optional salsa to put on
       | top. I substituted the salsa for something else, so given a
       | recipe, it would be nice to see "here are ingredients for the
       | fish, here are the ingredients for salsa", and that they don't go
       | into a unified singular count of ingredients.
        
       | culpable_pickle wrote:
       | I was actually thinking about my wishlist for recipe apps the
       | other day. Some key features:
       | 
       | 1. Split up ingredients into more parts.
       | 
       | 2 tbsp ground black pepper is actually: Quantity: 2 tbsp
       | Ingredient: Black Pepper Preparation: Ground
       | 
       | 2 finely chopped scallions, just the white parts Quantity: 2
       | Ingredient: Scallions Preparation: Finely Chopped Note: Just the
       | white parts
       | 
       | Often you'll have apps (like plan to eat) that adds the
       | preparation to the ingredient and makes shopping lists much
       | harder to manage
       | 
       | 2. Ingredient replacements. Often you'll see recipes calling for
       | one ingredient and then has "You can replace this with x and y".
       | It would be extremely nice to have this programmatically
       | available. I know if I can't find scallions, I can replace it
       | with garlic and onions.
       | 
       | 3. Variants. Often I have the same core recipe in my recipe book
       | with just different variants. Meringue cookies with different
       | flavors. 90% of the recipe is all the same, but it's duplicated a
       | dozen times for a dozen specific flavor add-ins. It would be
       | extremely nice to have this somehow programatically available, so
       | I can have the base recipe and all the variants with a reused
       | core :)
        
         | mtlynch wrote:
         | > _Split up ingredients into more parts._
         | 
         | I wrote a service called Zestful that does exactly this.[0]
         | 
         | It's an interesting problem. It's hard to train an ML system on
         | the distinction between a preparation instruction like "finely
         | chopped" and a note like, "just the white parts." My system
         | treats "just the white parts" as a preparation instruction, but
         | it throws away as irrelevant things like, "My favorite brand of
         | black pepper is Smith's Fine Peppers." But I've looked at
         | thousands of ingredients, and there are lots of wacky edge
         | cases.
         | 
         | I created the service by adapting an open source project the NY
         | Times published and then abandoned.[1] They were trying to
         | index all of their old recipes for what would eventually become
         | cooking.nytimes.com. Their repo felt very experimental and
         | half-baked, so it was interesting to turn it into a production
         | service. I wrote about the process of creating the service on
         | my blog.[2]
         | 
         | [0] https://zestfuldata.com/demo
         | 
         | [1] https://open.blogs.nytimes.com/2015/04/09/extracting-
         | structu...
         | 
         | [2] https://mtlynch.io/resurrecting-1/
        
         | rustyminnow wrote:
         | Agreed - I've always wished recipes would have two ingredients
         | lists: one for shopping and one for prep. Like some recipes
         | will call for half a cup of diced onions... So do I buy one
         | onion or two? And recipes that spread ingredient prep
         | throughout the steps make it a pain if you want to prep up
         | front. Having a semantic list of ingredients means you could
         | display them in whichever format is more helpful in the moment.
         | 
         | My other gripe is when recipes tell you to prep 4 tbsp of an
         | ingredient but aren't clear that you only use 3 in an early
         | step and are supposed to save the other 1 tbsp for an end step.
         | Not sure how this could be programmatically solved though
        
           | tenaciousDaniel wrote:
           | The amounts could just be tied to the steps. So maybe step 2
           | is to add 3 tbsp of ingredientX, and step 5 is to add 1 tbsp
           | of ingredientX. So programmatically, the ingredients list
           | would be the cumulative amounts of all ingredients described
           | in each step, which would be 4 tbsp ingredientX.
        
             | rustyminnow wrote:
             | Aha! Yes!
             | 
             | Now that I've tried it, that seems to be exactly how
             | CookLang does it. Though it would be nice if there was a
             | sort of asterisk or note in the ingredients list that
             | indicated the quantity is split between steps
             | 
             | ... Or you know I could just learn to read the instructions
             | carefully and not dump the whole bowl of garlic in at once.
             | That'd help too.
        
       | bwindsor wrote:
       | I've been working on a stove safety/smart cooking device which is
       | based on the temperature of your pan [0]. There are a small
       | number of recipes which it currently works with [1]. To do this
       | we defined a JSON format for recipes [2] but if we could use
       | something similar to the text format used by CookLang that would
       | be amazing, as it's much easier to write than JSON and could also
       | be automatically rendered into a web page. Currently we are
       | writing it twice - once in JSON for the cooking app, and once in
       | human readable form.
       | 
       | [0] https://mypippa.me/ [1] https://recipes.mypippa.me/ [2]
       | https://recipes.mypippa.me/schemas/cookMLSchema3.0.json
        
         | jll29 wrote:
         | Actually, if one defined an XML or SGML DTD, you could inter-
         | weave text and mark up seamlessly without having to create yet
         | another markup language; another reason to standardize is not
         | having to write readers/writers/converters again and again.
         | 
         | Buy @red pepper{2}.
         | 
         | versus
         | 
         | <recipe> Buy <ingredient amount="2">red
         | pepper</ingredient>.</recipe>
         | 
         | For the latter, standard tools like xmlwf or any good Web
         | browsers built-in XML viewer already exist and work right away.
         | 
         | In any case, double maintenance of JSON and human-readable text
         | will eventually lead to inconsistencies.
        
         | CraigJPerry wrote:
         | Ha! This is one of the best ideas I've seen on HN.
         | 
         | Just the safety thing alone has me hooked.
        
         | DavidPeiffer wrote:
         | I'd be interested in a paired device to interrupt the energy
         | source to the stove. If danger is imminent and the operator
         | hasn't responded in a certain timeframe, a connected valve
         | would turn the gas supply off or a switch would trigger the
         | electricity to turn off.
         | 
         | Growing up we had a sensor in the oven go out, causing the
         | cookies to catch on fire inside the oven. We also had a control
         | board on a Whirlpool dishwasher start smoking ~15 years ago.
         | There was a class action lawsuit against Whirlpool, but we
         | didn't have any documentation that showed the model and serial
         | number of the unit, so we couldn't get the typical "$20 credit
         | for your next appliance purchase" or whatever the compensation
         | was.
         | 
         | In both cases, flipping the electricity off at the breaker
         | prevented further damage.
        
           | bwindsor wrote:
           | Thanks for the suggestion! We did consider the idea of making
           | it automatically cut the energy source. However at the
           | moment, the install steps are: receive it in the post, pull
           | out the battery tab, and stick it on your stove splashback
           | with a strong sticky pad. Almost anybody can do it
           | themselves. As soon as you need to cut the electricity/gas it
           | requires a qualified engineer to go in and install it, making
           | the install cost an order of magnitude larger. So this
           | wouldn't be a part of the core product.
           | 
           | As an optional paired peripheral, it's a good idea, and
           | perhaps we will look into it further if the main product has
           | some success. If individuals consider it a valuable addition
           | then they could pay to have it installed. A secondary
           | drawback would be reduced battery life on the device, as it
           | would be continuously paired over Bluetooth whenever the
           | stove is in use - usually it is just passively advertising in
           | case you are trying to connect through the phone app.
           | 
           | In terms of saving lives, the automatic cut-off would make a
           | relatively small difference - fire department stats (on smoke
           | alarms) show that having a loud beeping alarm is extremely
           | effective at attracting attention and is enough for the user
           | to go and turn it off manually, or to get out of harm's way
           | if things have turned bad. Where the automatic cut-off would
           | help is in reducing the chance of the house being damaged by
           | smoke or fire when the user is out of range.
        
         | smashed wrote:
         | The newsletter pop-up made your site unusable on mobile. Hard
         | to close, and then it kept coming back. Obnoxious and rage
         | inducing. I hate your product now.
        
           | bwindsor wrote:
           | I'd be interested if there's research showing whether a one-
           | off popup gives more signups or more annoyance. The marketing
           | people seem to think it's better to have it there.
           | 
           | I agree it's hard to close, I'll see if I can do something
           | about that. It shouldn't keep coming back once closed, which
           | browser are you using? Although it does come back if you
           | refresh the page. I might be able to do something about that
           | as well.
        
             | culpable_pickle wrote:
             | Personally, those popups are an immediate close tab for me.
             | If you have no confidence in my wanting to sign up for your
             | news letter after I've seen your content, I don't want to
             | bother with your content at all.
        
             | tomerv wrote:
             | I just noticed that this kind of pop-up appearing is a
             | trigger for me to close the page. I immediately get the
             | feeling that I got the basic idea of that page.
        
       | defanor wrote:
       | This reminds me of RDF recipe ontologies (as they can be used
       | with RDFa: e.g., schema.org's Recipe[1] and the food ontology[2],
       | and there are/were dedicated spiders to search those, such as
       | openrecipes[3]), but with a custom syntax; might be nice to
       | define mappings to/from those, for compatibility. Though
       | unfortunately the larger open recipe databases I saw online tend
       | to use custom (sometimes XML-based, at least) formats/structures,
       | so there's nothing quite readily usable (that I'm aware of) as a
       | result.
       | 
       | [1] https://schema.org/Recipe
       | 
       | [2] https://www.bbc.co.uk/ontologies/fo
       | 
       | [3] https://github.com/fictivekin/openrecipes
        
       | roetlich wrote:
       | Looks super good! I love the planned feature for adjusting
       | servings. Converting units would probably be another cool
       | feature.
        
         | fartcannon wrote:
         | Yeah, mix and match types because some of use are in silly
         | countries that use mixed units.
        
       | pintxo wrote:
       | This looks really fantastic.
       | 
       | Is anyone working on let's name it CookHub already? So
       | essentially GitHub for receipts. The nerd in me wants to fork
       | receipts and share my small adaptations to the community.
        
         | imjared wrote:
         | There was a project a while ago that did this for tacos but it
         | seems to have fallen by the wayside. (Or the catalog is
         | complete)
         | 
         | https://github.com/sinker/tacofancy
        
         | dmitriid wrote:
         | https://based.cooking/
        
         | CornCobs wrote:
         | Fantastic idea! Another benefit I can think of having such a
         | repository combined with this markup language is powerful
         | semantic searches - filtering by sets of ingredients, and
         | perhaps adding the ability to add tags to the recipes
        
           | dubadub wrote:
           | certainly!
        
         | 2muchcoffeeman wrote:
         | I'm not sure you'd want to fork it like version control does.
         | If someone makes a variation that is not a correction, you'd
         | want to have that easily available on the main repo with a link
         | back to the original.
        
           | captn3m0 wrote:
           | https://www.cinc.kitchen/info/features lets you fork recipes.
           | forkthekitchen.com (now dead) was another similar effort. So
           | did diy.soylent.com (now dead as well).
        
         | pelagicAustral wrote:
         | FatHub: https://sr.ht/~martijnbraam/fathub.org/
        
           | Zababa wrote:
           | Ingredients seem to form a tree but I think a DAG would be
           | more appropriate.
        
         | dubadub wrote:
         | Yeah, the same here :-). We created a placeholder repo
         | https://github.com/cooklang/recipes, but it still subject to
         | workout structure and probably it makes sense to standardise
         | units in some way.
        
         | d--b wrote:
         | That would be pretty cool. It would already work in github, but
         | yeah a dedicated site would probably be better ;-). I'm afraid
         | that the intersection of people interesting in cooking and
         | people who know how source control works is likely pretty niche
         | 
         | The other problem I have with community cooking websites is
         | that usually people always underestimate the cooking time and
         | that's annoying as hell. Like people would say you need to cook
         | onions for 10 minutes, while onions take close to 25 minutes to
         | be cooked. On the French website marmiton, it was so ubiquitous
         | that they have moderators come in and fix people's recipes.
         | 
         | Edit: see https://slate.com/human-interest/2012/05/how-to-cook-
         | onions-...
        
           | 2muchcoffeeman wrote:
           | That's to caramelise onions. Cooking onions through takes a
           | few minutes. Plenty of instances where you don't want to
           | caramelise onions.
        
           | rkangel wrote:
           | My issue with recipe timings is that even if you cook things
           | for as long as it says, the overall time to cook the recipe
           | is always very "optimistic". I assume the issue is some
           | combination of marketing and the fact that the test cook was
           | done by a professional chef who can dice 10 onions in a
           | minute.
        
             | phonypc wrote:
             | I very much doubt that most recipe timings actually involve
             | a timed test cook at all. They're just guesstimates.
        
             | dkarl wrote:
             | Ingredient prep is intentionally left out of recipe
             | timings. In theory, this lets everybody adapt the recipe
             | timing to themselves, because only you know if you can chop
             | two onions in three minutes or thirty seconds, but as with
             | the Doomsday Device in Doctor Strangelove, it's worse than
             | useless if nobody knows about it. "Why didn't you tell the
             | world?"
        
             | 2muchcoffeeman wrote:
             | I imagine it's done that way because people don't
             | necessarily know what to look for when cooking something.
             | If some one doesn't know how to cook steak, you can't tell
             | them "cook till medium rare". So we start trying to come up
             | with proxies.
        
           | davidjytang wrote:
           | How do we specify "cook until translucent"?
        
             | culpable_pickle wrote:
             | I believe the term is usually "Sweat the onion"
        
           | pintxo wrote:
           | Just another reason to allow easy forking ;-)
        
           | fiedzia wrote:
           | > people would say you need to cook onions for 10 minutes,
           | while onions take close to 25 minutes to be cooked
           | 
           | It's up to recipe author to define what they cook and how. If
           | you think 25 min is better, fork it.
        
             | egeozcan wrote:
             | Or report the bug, which should probably have another name
             | in this context.
        
         | soperj wrote:
         | I'm building something with that functionality currently at
         | https://www.reciped.io/, I've turned the search off until it's
         | actually ready to go, but you can see what a recipe would look
         | like here: https://www.reciped.io/recipes/mushroom-and-onion-
         | pizza/
         | 
         | Doesn't use recipe-lang though, just uses markdown.
        
       | pintxo wrote:
       | Also, any plans on how to convert between units?
        
         | dubadub wrote:
         | Not yet solid, but there are ideas. For example, define units
         | config in a way like that: "1l | 1000 ml | ...". The first
         | value will be a preferred one and everything else will be
         | converted. What do you think?
        
           | pintxo wrote:
           | Might be the only viable way, as conversion factors are
           | ingredient specific (e.g. Milk/Flour, Cups vs Liter/Grams)
        
             | rkangel wrote:
             | The language parser has the information to know what
             | ingredient the unit is for though, so you could build a
             | database of those conversions.
        
       | dmitriid wrote:
       | Every recipe (and recipe language) must include links to
       | descriptions of ingredients and/or alternatives.
       | 
       | I have no idea what a "medium victorian spring spruce potato is"
       | or whatever it is you're using. In Sweden we have only two kinds:
       | hard and soft. Same goes for basically everything else :)
        
         | Moru wrote:
         | In north Sweden we have also only two kinds of potatoes. One is
         | called Mandelpotatis, and then we have all the rest that noone
         | buys.
         | 
         | Seriously, if you don't like potatoes or think it's boring, try
         | Mandelpotatis (if you can find it, it likes sandy, not very
         | nutrious earth to grow or it will get sick and die :-)
         | 
         | I have been thinking of a way of writing my recepies so I can
         | process them into a database some day for easier search. I
         | realised I would never have the energy to actually do it so I'm
         | just switching to markdown and running a static webcompiler on
         | them to output html with search function in javascript and
         | upload to github. Works better than expected and have
         | everything I need.
        
         | Zababa wrote:
         | A way to do this would be to start with a list of
         | ingredients/techniques, and have a "dependency checker" that
         | checks that every ingredient/technique is either in the list,
         | or explained elsewhere. This way, the base would be explicit,
         | and you can easily track explanations.
        
         | jfk13 wrote:
         | > In Sweden we have only two kinds: hard and soft.
         | 
         | I'm not sure where you get this idea. Even a basic supermarket
         | like ICA knows more than that: https://www.ica.se/icas-egna-
         | varor/produkter/icas-potatis/
        
           | dmitriid wrote:
           | > I'm not sure where you get this idea.
           | 
           | From the potatoes that are immediately visible on display.
           | You have large stands with two types of potatoes that you can
           | pick and weigh yourself (sometimes three, the difference
           | isn't obvious). Then you have a bunch of 3kg-5kg packs of
           | washed potatoes of two kinds: fast and mjolig.
           | 
           | And possibly there are one or two packs of other kinds? Maybe
           | those 3-5 kilo packs have different types of potatoes in
           | them? But those are never clearly marked.
           | 
           | And then you arrive at a recipe, and it calls for russet
           | potatoes or dutch cream potatoes or some other potato. What
           | the hell are those? :)
           | 
           | Anyway, potatoes were just to illustrate the idea. I've had
           | the same issues with rice, vegetables, even spices sometimes.
        
         | phonypc wrote:
         | Hard/soft presumably corresponds to the waxy/floury
         | categorization Anglo countries often use. It shouldn't be hard
         | to find which category a given variety of potato better fits
         | into.
        
           | dmitriid wrote:
           | What about "creamy Dutch potato"? :)
        
             | phonypc wrote:
             | Looks to be floury/soft.
        
         | dubadub wrote:
         | That was the motivation. I had the same problem that recipes
         | from the apps aren't localised to local produce. Also sometimes
         | I want to cut corners and do thing easier. I should be able to
         | apply agile and maintain my recipes in my way :-)
        
       | otherflavors wrote:
       | https://www.wedesoft.de/software/2020/07/07/mealmaster/
        
       | donatj wrote:
       | I'm hopeful for some other parser implementations to crop up. It
       | would be pretty neat to be able to build this into my personal
       | note taking app.
        
       | ajot wrote:
       | This looks very good! I hope Kookbook [0] (which I use without
       | too much hassle) implements it.
       | 
       | [0] https://github.com/KDE/kookbook
        
         | dubadub wrote:
         | Nice! I wasn't aware of that project. It has very similar idea.
         | In cookcli there's a small web server too. It's not fancy or
         | very developed, but allows to check the recipe or manage
         | shopping list
        
       | tomlong wrote:
       | Yesterday a friend remarked to me she had lost a recipe for
       | something or other and I resolved to start recording some I use,
       | I was thinking of something like MD/Obsidian but this looks
       | really good.
       | 
       | Great to have the iOS app, an easily convertable human readable
       | and writable format and hang on to your own data.
       | 
       | Going to give this a good look over today. Might think about an
       | Obsidian plugin as well.
        
       | xutopia wrote:
       | The only thing missing would be a substitute... for example
       | "vinegar or lemon juice" is impossible to describe in the current
       | language spec.
        
         | dubadub wrote:
         | I'd suggest to open an issue for tracking in spec repo
         | https://github.com/cooklang/spec, so people can discuss
         | different options.
        
         | gizdan wrote:
         | Lots missing really, you can add nutrition and scaling things
         | to that list.
        
         | dubadub wrote:
         | Good point, any idea how it could look like?
        
         | splatcollision wrote:
         | You could be inspired by the link reference syntax from
         | markdown, and use the following where subs are possible:
         | 
         | add @acid{1%tsp} to @milk{1%cup} to create acidulated milk
         | 
         | [acid]{lemon juice|apple cider vinegar}
         | 
         | Anyway great spec and language!
        
       | ltr_ wrote:
       | interesting language, didn't have the time to read the
       | details/spec but, what i found most difficult when reading
       | recipes on the internet that the ingredient names change
       | dramatically between countries(event with the same spoken
       | language), does this language attempt tackle that problem? also
       | it would be nice to have alternatives for some ingredients.
        
       | brigandish wrote:
       | I like it, a lot. However, the syntax for linking steps to
       | pictures should be rethought, IMO, what if an image already has
       | numbers in its filename? Could get confusing very quickly.
       | 
       | Still, I think I'll try this out!
        
         | dubadub wrote:
         | Agree, this was a last-minute hack. If you have an idea how to
         | rethink this you can share one in a spec repo issues if you
         | don't mind https://github.com/cooklang/spec. Thanks!
        
       | [deleted]
        
       | weakty wrote:
       | This is interesting. A year or two ago I tried creating my own
       | web application [1] for cataloguing recipes. It involved creating
       | a parser in Elm [2] that could handle JSON generated by org mode
       | files (where I stored the recipes). It was far too convoluted -
       | but it gave me some of the features that I wanted - simple pages
       | with recipes, with hover-to-see-quantities, as well as a cooking
       | timer. If I was to do it again, I might investigate using
       | something like cooklang to see if I can get the same
       | functionality out of it.
       | 
       | [1] https://arisgarden.theiceshelf.com/recipe/sweet-potato-
       | gnocc... [2]https://github.com/theiceshelf/arisgarden/blob/master
       | /src/Pa...
        
       | hardmath123 wrote:
       | You might also like this little book, "Computational Cooking,"
       | which is also, in a way, a meditation on the language of recipes.
       | http://diyhpl.us/~bryan/papers2/CompCook.html
        
         | dubadub wrote:
         | Great book, thanks for sharing!
        
       | majkinetor wrote:
       | OMG nice. Small DSLs like this are wonderful.
       | 
       | A question. How do I connect images to recipes. I usually have
       | multiple for single recipe. It would be nice to have some keyword
       | for that and/or configured location...
       | 
       | On iOS app there is a picture for example, how is it represented
       | in the .cook file ? I see Adding Pictures section but it says it
       | should live in the same directory ? Any option to specify that
       | differently as in your seed all files will be in the single
       | folder and there will be mess on file system. I would for
       | instance prefer to have a folder per recipe with cook file and
       | images.
        
       | pstuart wrote:
       | Brings to mind the recipe structures here:
       | http://www.cookingforengineers.com/
        
       | Riverheart wrote:
       | This just a hobby project or will this evolve into a commercial
       | offering?
        
       | amir734jj wrote:
       | What did you use for lexer and parser?? I couldn't find it on the
       | GitHub front page/source code.
        
         | dubadub wrote:
         | The parser is hand-made
         | https://github.com/cooklang/CookInSwift. I was reading a book
         | "Crafting Interpreters" by Robert Nystrom (fantastic and
         | atmospheric book!) and was eager to try it myself.
        
       | schleck8 wrote:
       | The website isn't linked on the Github repo yet
        
       | bjt2n3904 wrote:
       | I have to ask why ingredients with spaces are
       | 
       | @salt and pepper{}
       | 
       | Instead of
       | 
       | @{salt and pepper}
       | 
       | The latter seems far easier to parse.
        
       | dusted wrote:
       | I suggest replacing % with a space between the amount and unit.
       | 
       | @potatoes {1 kg} is a bit easier on the eyes
        
         | mekkkkkk wrote:
         | Having an explicit delimiter allows for whitespace in either
         | amount or unit. I suppose that's the reason. Can't seem to come
         | up with an example for that on the fly though.
        
         | dubadub wrote:
         | I agree, I thought about that. I expect that it can be some
         | cases when either ingredients or units have spaces. And the
         | problem is that I can't come up with a solid counter example.
         | Something like @coriander{2%small batches}... You can open an
         | issue in a spec repo so people can discuss
         | https://github.com/cooklang/spec.
        
           | gizdan wrote:
           | Maybe using an underscore might make sense? i.e. {2_small
           | batches}?
        
       | tristor wrote:
       | What is wrong with microformats2? I've been using hRecipe on my
       | personal website for awhile.
        
       | philsnow wrote:
       | When reading a recipe I always end up mentally translating the
       | prose / steps into a DAG, but I don't have enough short term
       | memory to keep the DAG in my head so I'm constantly re-compiling
       | as I'm working.
       | 
       | When I write my own recipes (on index cards or whatever), I
       | explicitly create the graph to make it easier to follow. Of all
       | the links in this thread, the "Computerized Cooking" one most
       | closely models my ideal setup, but I don't love the RxOL
       | language. Maybe I'll make an s-exp version of it that exports
       | diagrams someday.
        
       | jsilence wrote:
       | Skimmed the comments expecting an Emacs mode for it.
        
       ___________________________________________________________________
       (page generated 2021-10-26 23:02 UTC)