For all people who doesn't know about this - it's a logic simulator inspired by Logisim, written in rust with egui
This post is about the rewrite which you can find in https://github.com/Ved-s/cuprous/tree/rewrite
Old post about the old version here: #1140876288773603438
I decided to rewrite it since first, i started it very early in my rust learning, so new code should be better, also, hopefully, better structurized.
Second, it had fundamental stuff that i didn't like in the end. For example, internally circuits are represented with at least 2 structs - one for rendering its preview and handling its placement and creation, second for doing actual logic. Also, since i wanted updates to be backwards compatible i had to write some hacks around that, which could be easily solved if I considered that in the first place.
Third reason is that it couldn't simulate complex circuits that rely on consistency, for example, a binary counter circuit will start giving wrong results after some time and the problem was that each circuit board could operate in only one of two modes - Random event ordering, which makes stuff that depends on randomness and inconsistency possible (latches), or Ordered events, which removed all randomness from the simulation but also made latches impossible to make, since they'll never settle in a stable state.
Also what i couldn't implement some stuff that i wanted due to UI style that cuprous uses - single view of the board with overlays on top, this made impossible to make multi-view UI without duplicating existing elements.
Cuprous is using #1288243173126049892 for its savestates and copystates
Currently the rewrite doesn't have a website version, the one at https://ved-s.github.io/cuprous/ is still the old version
I'll update this post with progress (when i remember to)
Updated on <t:1775964230>
