I cannot believe we haven’t found this yet. It’s so simple!
I’ve known how to make for loops for ages lol.
You use a counter with a trigger that decrements it. Make that trigger trigger itself and voila!
To make it repeatable, use symmetric counters for N, but make the second counter’s increment and decrement be mediated (is that the right word?) through triggers. And then you have to do other stuff. This is what I’m tackling in counter copying.
There’s an idea called conservation of data. This means that we cannot copy the original data from one counter to another without erasing it. Idk how to prove or disprove it. Even with increasing one counter by 2 while decreasing the other by one, you’ll still get this bc you need to get back to the original state, which you lost. To fix that, you add a mediated symmetric counter, which I talked about above. But then, you’ll have to subtract that back and you get 2 counters with the data and one without.
So basically, a counter system cannot copy data over without erasing it from another counter. Idk how to prove or disprove this, but I’ve gotten some progress with this.
Disclaimer: I don’t know if this is true.
Basically, this ties into not being able to repeat this for loop bc you can’t get that data back.
you mean like find
different things to decrement it with or decrement it by
It says in the post to treat that as N.
If it’s ok to use Text instead of a counter you can use a set up like this.
The counter is updating N and the text is linked to T(they must start the same) then you can use this to update both
Why didn’t you say that before lol
Also, why do you need symmetric counters? Why can’t you just use a checker and property to fling the signal back?
And @awesomeT43, the point of this is (I believe) to use counters instead of blocks. Blocks are a lot easier to handle.
This also works, by having a repeater decrement both counters and give the bottom a target value of 0 and use a wire to stop the repeater when it hits it’s target value. Then all you have to do is start the reapeter and it will calculate.
Use a triggerloop
It’s actually much easier to use a repeater in this instance because it’s far more complicated to make triggers able to activate multiple times. With the repeater you just need to start it and it’ll run.
Triggerloop:
This is what it looks like with triggers
But memory efficiency
I’m willing to bet money that can be simplified.
I wouldn’t doubt that it can’t. Everything can be simplified, even just by one change.
What?
The repeater is the simplified version.
It’s for making the for loop repeatable. I just thought it was common knowledge, so I didn’t say anything about it.