totes
Playing around with multiset rewriting today using Tote. Here are some small sequences I made during work breaks hehe.
tally
A very simple tally counter. You can use the evaluation buttons to increment and decrement.
rocket
A rocket launch sequence, made possible with direction setters.
Note: this sequence breaks if run in reverse. The rocket descends but it burns the countdown.
counter
A rabbit counter that resets at 10 rabbits. I think the rules could be reduced but I’m just not seeing it right now.
eye
I made an eye that follows a ball controlled with Devine’s controller setup.
I couldn’t find enough emojis and Unicode characters to include a code section like in the demos above so here’s an image of the rules instead. Additionally, the demo files are included for you to download and play with.
The ball is controlled by the arrow buttons which spawn in invisible arrows oriented in horizontal and vertical stacks from the upper-left corner of the “bag”—for simplicity, let’s call these coordinates. The axis rules are basically doing two things: serving as controllers that update coordinates and replacing the current eyeball symbol.
The first 3 rules are special in that they update coordinates but they keep the eyeball locked in its current state. They are also dependent on the placement of the eyeball, so if you decide to move it, you have to update these rules accordingly.
There are 8 eye sprites for each cardinal and intercardinal directions, hence the need for so many rules. But maybe it’s possible to reduce them to an even smaller set. Devine has an idea of using offset counters but I couldn’t get it to work so I’ll leave it to you, dear reader, as a challenge.
Added on
impressions
It’s quite fun actually. The mechanics are deceptively simple — declare a list of rules, the first matching rule from the top is applied, and start again from the top. However, I’m having a bit of a difficult time thinking with these constraints. Meanwhile, there’s people already doing impressive things with it like this and this. I take one lunch break and Devine made a controller and I’m like…it’s that simple‽
rewrite the way you think → to rewrite
to rewrite → rewrite the way you think
Kinda reminds me of Conway’s Game of Life and how people were finding all of these different patterns like beehives, gliders, and pulsars. I think we could and should compile something like that for rewriting (if it doesn’t already exist).
Anyway, I’ll continue updating this page with more things I try.
resources
- Rewriting, XXIIVV by
Devine Lu Linvega
Oh and speaking of totes, bring a tote bag when you go grocery shopping. Ditch the plastic bags.
—josh