( Hailstone function in Rejoice )

n^7 @Hailstone
.#n .\n

done [n^2]/[n^2 done] [Halt]/done

@Parity
[a^2 Parity]/n^2
even [odd n]/[even n]
@Parity.A->N [n Parity.A->N]/a

[Even]/even [Odd]/odd

@Even ( n = n/2 )
[a Even]/n^2
@Even.A->N [n Even.A->N]/a
Hailstone

@Odd ( n = 3n + 1 )
[a^3 Odd]/n a
@Odd.A->N [n Odd.A->N]/a
Hailstone

@Halt

(cc @neauoire)

@andnull aye X) you're doing backflips already, meanwhile I'm eating putty..

red^2 blue^2 yellow^2
violet/[red blue]
green/[blue yellow]
orange/[red yellow]
black/[violet green orange]

🎨

@neauoire I did write a whole game in Vera for December Adventure 2024

One bottleneck became things like "your rules to check for the parity of a register is 40 rules deep, but there are 5 step. So, it's really 200 rules deep. But, it is also part of a hot-loop and takes 20,000 rules to finish".

Second issue was things like "rules submit all values in one transaction". So, you had to awkwardly spread actions over many rules to enforce sequence of individual steps.

December Adventure 2024

@andnull you've been contending with this limitations much more than I have I think, a lot of the languages you've explored since Vera looks like stabs at cutting across large rulesets like that.

The hailstone function works amazingly well 🙌

@neauoire haha, yeah, I push the rule oriented approach to very hard limits. So, I have been doodling ways to mix and match things.

@neauoire Also, doing a hailstone makes me feel like comparing Rejoice to Forth and (rule-oriented) FRACTRAN is a bit of a disservice to the language. It has fractrans encoding of counter machines but is farm more direct, and definitely doesn't feel like handling forth or any stack-based language. It has a rather unique feel where every operation can be made conditional.

Makes me think of the work down with Vinegar or Prowl (if you remember that one from UberPyro). I think the conditionality of everything in Rejoice is its stand out feature. I think a real moment for me with Rejoice was in writing done [n^2]/[n^2 done] [Halt]/done. Something there just wholely unique about it.

Languages

Languages at Cat's Eye Technologies

Cat's Eye Technologies
@neauoire Feels like I am stack shuffling control-flow itself instead of data.

@neauoire I think what really made it connect tho was the fact I originally wrote:

done [n^2 continue]/[n^2 done]
[Halt]/done []/continue

refactoring that to just

done [n^2]/[n^2 done] [Halt]/done

feels like a holdover from Factran just dropped way in my brain. I am so used to every condition needing a dual countercondition I just reflexively wrote ever rule in pairs (including my math operations).

@andnull Implemented a little program to print the binary value of a number:

n^92

[.1 B0]/n^128 .0 @B0
[.1 B1]/n^64 .0 @B1
[.1 B2]/n^32 .0 @B2
[.1 B3]/n^16 .0 @B3
.\s
[.1 B4]/n^8 .0 @B4
[.1 B5]/n^4 .0 @B5
[.1 B6]/n^2 .0 @B6
[.1 B7]/n .0 @B7

@neauoire 👀