I tried my hand at making a calculator with this; managed to make one that could do addition, subtraction, multiplication, and integer division with both positive and negative numbers. There doesn't seem to be a good way to share programs (rulesets?) made with this, so I stitched some screenshots together to show it all in an image. I changed four of the symbols into the four operators for convenience.
First operand is a quantity of triangles, second operand is a quantity of diamonds (black for positive, white for negative). You perform an operation by placing an operator symbol in the bag with the operands and evaluate until it stops.
The ruleset takes up all 48 rule slots. I imagine the same functionality could probably be done with less rules and less symbols, but it's hard to keep track of it all and not have it interfere with itself so I didn't bother. I'm proud of it nonetheless.
Yeah, I was thinking about something like that at first. I also considered representing the numbers with actual digits, but I realized that'd get difficult with the bag being unordered and all. Maybe someone will figure out a way to do it.
Super cool. An obvious next step would be to make an import and export function so we can share things we've created (by which I mean smarter people can share and I can try them out).
Yes! At the moment, Save/load works only if you use the tote.rom in a uxn emulator, we're still working on implementing the file system in a way that will work well with itchio :)
I’m going to be honest, I have no idea how to read what you’ve posted in these comments. Is this something that would make sense if I wasn’t in the itch emulator?
Related question: do any of the symbols have inherent meaning or functions? It looks like two of them are the same symbol as as the “run operation” and “undo” buttons, but when I use them they seem to operate exactly like any other symbol.
Edit: I read the longer guide on Pocket Rewriting, and it looks like there are some additional functions I need to play with and understand. Still, some additional clarification on the notation system used here would be appreciated.
Thanks for your questions, I'll expand on the docs.
do any of the symbols have inherent meaning or functions?
They don't, there's really just two things in multiset rewriting, rules and symbols.
It looks like two of them are the same symbol as as the “run operation” and “undo” buttons, but when I use them they seem to operate exactly like any other symbol.
That's just so you can customize them :)
Still, some additional clarification on the notation system used here would be appreciated.
A line starting with :: indicates a rule, symbols are just names that could be shapes in tote, the caret(>) indicates the start of the right-hand side of the rule, that's it :)
Above are the rules for the subtraction operation, now if I put some things in the bag(8-3):
And press evaluation a few times, I get the result 5:
Amazing, thanks for typing all that out! That makes perfect sense.
BTW, there appears to be a glitch in the browser version. If you set the rule to "runs on timer" and add the necessary ingredients, it seems to run twice. So setting the first default rule to "timer" and adding a triangle and circle results in two squares instead of one.
:: x y gth > gth
:: x gth > true
:: gth > false
:: x y lth > lth
:: y lth > true
:: lth > false
:: x y equ > equ
:: x equ > false
:: y equ > false
:: equ > true
:: x y neq > neq
:: x neq > true
:: y neq > true
:: neq > false
:: x y and > true
:: x and > false
:: y and > false
:: and > false
:: x y or > true
:: x or > true
:: y or > true
:: or > false
:: x y xor > false
:: x xor > true
:: y xor > true
:: xor > false
:: true not > false
:: false not > true
← Return to uxn emulator
Comments
Log in with itch.io to leave a comment.
I tried my hand at making a calculator with this; managed to make one that could do addition, subtraction, multiplication, and integer division with both positive and negative numbers. There doesn't seem to be a good way to share programs (rulesets?) made with this, so I stitched some screenshots together to show it all in an image. I changed four of the symbols into the four operators for convenience.
First operand is a quantity of triangles, second operand is a quantity of diamonds (black for positive, white for negative). You perform an operation by placing an operator symbol in the bag with the operands and evaluate until it stops.
The ruleset takes up all 48 rule slots. I imagine the same functionality could probably be done with less rules and less symbols, but it's hard to keep track of it all and not have it interfere with itself so I didn't bother. I'm proud of it nonetheless.
Very cool! I was thinking of a way to make a calculator using the placement of symbols that could act as buttons.
I think that might be possible using the default symbol locations, but I suppose the extra rules for buttons would make it run out of space.
Yeah, I was thinking about something like that at first. I also considered representing the numbers with actual digits, but I realized that'd get difficult with the bag being unordered and all. Maybe someone will figure out a way to do it.
Wow! The calculator is excellent :)
Now, if you organize your symbols in the right order, it's possible, here's how I did it for fizzbuzz
Super cool. An obvious next step would be to make an import and export function so we can share things we've created (by which I mean smarter people can share and I can try them out).
Yes! At the moment, Save/load works only if you use the tote.rom in a uxn emulator, we're still working on implementing the file system in a way that will work well with itchio :)
Wondering how to do arithmetic? Here's how to get the difference between two numbers:
I’m going to be honest, I have no idea how to read what you’ve posted in these comments. Is this something that would make sense if I wasn’t in the itch emulator?
Related question: do any of the symbols have inherent meaning or functions? It looks like two of them are the same symbol as as the “run operation” and “undo” buttons, but when I use them they seem to operate exactly like any other symbol.
Edit: I read the longer guide on Pocket Rewriting, and it looks like there are some additional functions I need to play with and understand. Still, some additional clarification on the notation system used here would be appreciated.
Thanks for your questions, I'll expand on the docs.
They don't, there's really just two things in multiset rewriting, rules and symbols.
That's just so you can customize them :)
A line starting with :: indicates a rule, symbols are just names that could be shapes in tote, the caret(>) indicates the start of the right-hand side of the rule, that's it :)
Above are the rules for the subtraction operation, now if I put some things in the bag(8-3):
And press evaluation a few times, I get the result 5:
Amazing, thanks for typing all that out! That makes perfect sense.
BTW, there appears to be a glitch in the browser version. If you set the rule to "runs on timer" and add the necessary ingredients, it seems to run twice. So setting the first default rule to "timer" and adding a triangle and circle results in two squares instead of one.
Here are some logic operations:
Here are some logic gates: