If I want to do a workout that consists of N sets of M repeats w/ 30s rest & an additional rest between sets… is there a notation I can use in the workout builder? Like using additional hierarchy, brackets or parenthesis, etc?
<engineer speak>
It seems to me that intuitively… implementing something YAML-like may make sense. I’ve written a few DSLs, but those circumstances were only due to a set of specific business needs that couldn’t be satisfied with a subset of another standard.I guess I’m asking what might be the most elegant approach to supporting nested loops as the workout instruction text gets parsed and converted to an array?
</engineer speak>
One is just, nest them hierarchically, and let the visual diagram inform the user as to how it works.
3x
* 4x
** Run uphill 2m Z4-Z6 (311-513w) power=3s intensity=interval
** Press Lap downhill 0.12mi 0.12mi Z2 (191-256w) intensity=recovery
* Rest 3m Z1 intensity=rest
I should note that adding an additional layer of hierarchy currently has some unexpected behaviors.
and if I indent the 2m interval further like so
3x
* 4x
*** Run uphill 2m Z4-Z6 (311-513w) power=3s intensity=interval
** Press Lap downhill 0.12mi 0.12mi Z2 (191-256w) intensity=recovery
* Rest 3m Z1 intensity=rest
it renders this way, which I find totally curious.