[Syntax] Support for loops and repetitions #10

Open
opened 2026-07-17 23:12:14 +02:00 by abiwab · 0 comments
abiwab commented 2026-07-17 23:12:14 +02:00 (Migrated from codeberg.org)

Context

Some cooking processes require repeating a sequence of actions multiple times.

Use Cases

Beyond the classic lamination/folding for puff pastry ([Repeat x3] Fold, turn. Rest ~&{30 min}.), this syntax is necessary for:

  • Basting a roast every 15 minutes while in the oven.
  • Stirring a risotto or a simmering sauce at regular intervals.
  • Repeated resting and kneading cycles for sourdough bread.

Goal and Impact

Create a dedicated syntax for repeated actions. The main impact is that the analyzer and the Gantt timeline must be able to multiply the actual time of the step by the number of iterations, ensuring the overall recipe time is not undercounted.

I'm still hesitating on whether this really is a useful syntax addition or if it is too niche ?

### Context Some cooking processes require repeating a sequence of actions multiple times. ### Use Cases Beyond the classic lamination/folding for puff pastry (`[Repeat x3] Fold, turn. Rest ~&{30 min}.`), this syntax is necessary for: - Basting a roast every 15 minutes while in the oven. - Stirring a risotto or a simmering sauce at regular intervals. - Repeated resting and kneading cycles for sourdough bread. ### Goal and Impact Create a dedicated syntax for repeated actions. The main impact is that the analyzer and the Gantt timeline must be able to multiply the actual time of the step by the number of iterations, ensuring the overall recipe time is not undercounted. I'm still hesitating on whether this really is a useful syntax addition or if it is too niche ?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gram-lang/gram#10
No description provided.