News for hackers. Stuff that matters.
Re:Show HN: CookLang – Recipe Markup Language by xutopia on Tuesday October 26, 2021 @09:00AM (#28999813)
The only thing missing would be a substitute... for example "vinegar or lemon juice" is impossible to describe in the current language spec.
Re:Show HN: CookLang – Recipe Markup Language by splatcollision on Tuesday October 26, 2021 @10:55AM (#29001188)
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!

Re:Show HN: CookLang – Recipe Markup Language by dubadub on Tuesday October 26, 2021 @10:37AM (#29000967)
I'd suggest to open an issue for tracking in spec repo https://github.com/cooklang/spec, so people can discuss different options.
Re:Show HN: CookLang – Recipe Markup Language by gizdan on Tuesday October 26, 2021 @01:44PM (#29003565)
Lots missing really, you can add nutrition and scaling things to that list.
Re:Show HN: CookLang – Recipe Markup Language by dubadub on Tuesday October 26, 2021 @10:34AM (#29000928)
Good point, any idea how it could look like?
Re:Show HN: CookLang – Recipe Markup Language by vborovikov on Wednesday October 27, 2021 @12:26AM (#29009539)
How about

  [@raw organic cane sugar, @honey]{3%tbsp}
Here square brackets indicate that the ingredient will have variations separated by commas.
Re:Show HN: CookLang – Recipe Markup Language by dubadub on Sunday October 31, 2021 @03:57PM (#29059861)
Interesting idea, how about the case when quantity varies for different ingredient? For example 2 tbsp of raw organic cane sugar or 3 honey.
Re:Show HN: CookLang – Recipe Markup Language by quisnam on Wednesday October 27, 2021 @03:20PM (#29017822)
Good idea. I'd prefer the at sign in front of the brackets, though.

  @[sugar, honey]{3%tbsp}
It should be easier to parse and allows for brackets to be used elsewhere without escapes.