Replies: 1 comment 1 reply
-
I was thinking something along the lines. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I just found out about this project and I wanted to share some thoughts I had regarding the proposed serving size feature. The current proposal in the spec is good, but I think it could use some improvement.
Let's say I have an existing recipe that I want to rewrite in cooklang. Suppose that the recipe produces two servings, and requires 3/4 cups of flour. If I want to allow for proper ingredient scaling in cooklang, I would have to do a bit of math to make things work. For example:
INCORRECT
This would result in the recipe being doubled for a serving size of 2 compared to the original recipe.
CORRECT
I need to halve the quantity of flower (3/4 to 3/8) for the recipe to be properly scaled.
The current proposed spec introduces extra friction when writing recipes, because I would have to adjust every single ingredient quantity by dividing by the original serving size of my recipe.
Instead, I propose that all recipes have a default serving size. Perhaps it could be the first serving size specified (2 in the previous example). The cooklang parser should understand that all quantities in the recipe are for that default serving size, and for other serving sizes, it will do the math required. For example, if we chose a serving size of 4 instead of 2 (default), then the parser would know to scale by a factor of 4/(default) = 4/2 = 2.
Beta Was this translation helpful? Give feedback.
All reactions