Show HN: LogicEmu – Online Logic Simulator
lodev.org
lodev.org
Nice companion is AllAboutCircuits online textbooks:
https://www.allaboutcircuits.com/textbook/digital/
Archive has the original Bell Labs manual from 1951, with some really beautiful logic gate diagrams
The Design Of Switching Circuits by William Keister, Alistair E Ritchie, Seth H. Washburn
Unsure if the simulation is decoupled from the display, but it gets a little slow in graphical mode in Firefox. Could be a really interesting WebAssembly optimization project.
Some browsers have no problem at all with so many little canvases, but in firefox it causes a slowdown.
A solution that will hopefully be faster is to make one big canvas instead of many little ones, and blit the cells on it every frame instead of using CSS visibility to swap between on and off states for each cell. Such rewrite of the rendering engine is a todo.
Canvas is another type of abstraction - and blitting to the screen is easier with it - so same applies.
I think even a game-like approach of using a single canvas and re-rendering the whole screen when something changes would be more efficient than manual DOM mutations.
It seems there are just simply too many elements generated for some of the examples.
It would probably be possible to draw an interactive version to a single canvas— but probably more complex on the development end.
---
Beyond that, it's awesome!
It runs faster for me in chrome and firefox in linux
As I work in tech, explaining tech works better to me than explaining non-tech stuff such as gardening or politics :-)
Is there same thing, but in Python?