Closed cwervo closed 1 month ago
Note: works perfectly fine after running for a while/using a few programs on folk-cwe
at home, so I think we're good.
Cool -- I like how this looks even more than expected. Does this break all printed programs that use Commit? Can we do something with backward compatibility like we do with Display:: functions (and/or should we just do the find and replace on printed programs also?)?
Good point, when I get in later I'll write a deprecation Wish
maybe something like
When /something/ commits /x/ {
# maybe flash it like errors? or add a title?
}
I thought about moving warnDeprecated
into a shared file but the implementation for this deprecation is different enough (being in main.tcl
) that I don't think the abstraction is worth it right now.
I'll test this out on my home system too.
test to add ...
# V1:
# TODO: test this on folk-cwe, merge :-)
Commit { Claim $this has seen 0 committed boops }
Hold { Claim $this has seen 0 held boops }
Every time there is a committed boop & $this has seen /n/ committed boops {
Commit { Claim $this has seen [expr {$n + 1}] committed boops }
}
When the clock time is /t/ {
Commit {
Claim there is a committed boop
}
}
When $this has seen /n/ committed boops {
Wish $this has halo message "committed boops: $n"
}
held boops is increasing but committed boops aren't showing up at all
# V1:
# TODO: test this on folk-cwe, merge :-)
Commit { Claim $this has seen 0 committed boops }
Hold { Claim $this has seen 0 held boops }
Every time there is a committed boop & $this has seen /n/ committed boops {
Commit { Claim $this has seen [expr {$n + 1}] committed boops }
}
Every time there is a held boop & $this has seen /n/ held boops {
Hold { Claim $this has seen [expr {$n + 1}] held boops }
}
When the clock time is /t/ {
Commit {
Claim there is a committed boop
Claim there is a held boop
}
}
When $this has seen /n/ committed boops {
Wish $this has halo message "committed boops: $n"
puts "this has $n committed boops"
}
When $this has seen /n/ held boops {
Wish $this has halo message "held boops: $n"
}
Turns out this works! The bug was that Hold
and Commit
are literally equivalent so I had to add keys to them to not have them squash each other
# ================================
# V0: With halo messages
# ================================
Commit c { Claim $this has seen 0 committed boops }
Hold h { Claim $this has seen 0 held boops }
Every time there is a committed boop & $this has seen /n/ committed boops {
Commit c { Claim $this has seen [expr {$n + 1}] committed boops }
}
Every time there is a held boop & $this has seen /n/ held boops {
Hold h { Claim $this has seen [expr {$n + 1}] held boops }
}
When the clock time is /t/ {
Commit c {
Claim there is a committed boop
}
Hold h {
Claim there is a held boop
}
}
When $this has seen /n/ committed boops {
Wish $this has halo message " committed : $n"
puts "this has $n committed boops"
}
When $this has seen /n/ held boops {
Wish $this has halo message " held : $n"
puts "this has $n held boops"
}
Merging shortly
rg -i commit --glob '!vendor'
, ensuring it doesn't return any results. I have to double check that this runs well onfolk0
later, but I think this fulfills #52 :)