Scratch's define blocks can execute outside the fr...
# present-company
t
Scratch's define blocks can execute outside the frame ticks, so with
define
recursion, you can do generative placement in a single tick.
🍰 3
j
this is giving strong p5.js editor vibes. I'm not familiar with Scratch, sounds like tail recursion lets you loop without triggering multiple ticks?
I'm used to doing this kind of trick in Observable to avoid triggering reactive updates for transient DOM stuff
t
oh u should try scratch https://scratch.mit.edu/ its for teaching programming and is seriously well thought out. Its like 20 years old. But it felt restrictive (when I tried it 20 years ago). "The
define
block was introduced to Scratch on May 9, 2013". I feel like I did not know about the define block though because it does provide some level ob abstraction and now I realize it also lets you hack the runtime tick behaviour that was preventing "make a clone" instantiation primitive be able to setup a level coz the execution thread was stepped. You can dodge the steps with creative combinations of defines, where you have to use tail recursion to loop at zero tick speed. Scratch's "repeat until" idiomatic control flow doesn't run a zero tick speed. I've got better at Scratch coz I am teaching a nephew and, in reality, he is teaching me.
❤️ 3
w
The concurrency model in Scratch is pretty neat. Somehow simple and intuitive. I'm sure it has nasty semantics, but I haven't dug in to find them.