News for hackers. Stuff that matters.
Re:Show HN: LogicEmu – Online Logic Simulator by indescions_2018 on Wednesday June 06, 2018 @08:19AM (#17246391)
Definitely could have used this back in school ;)

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

https://archive.org/details/TheDesignOfSwitchingCircuits

Re:Show HN: LogicEmu – Online Logic Simulator by mmastrac on Tuesday June 05, 2018 @06:48PM (#17242777)
This is insanely cool. Props to the author. I can see myself using this for sketching some personal projects up.

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.

Re:Show HN: LogicEmu – Online Logic Simulator by jmatjs on Tuesday June 05, 2018 @07:06PM (#17242897)
The rendering slowness is probably because every cell is rendered as an individual little HTML5 canvas (two, one for off state and one for on state).

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.

Re:Show HN: LogicEmu – Online Logic Simulator by 52-6F-62 on Tuesday June 05, 2018 @10:20PM (#17243896)
I was having the same problem using Chrome.

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!

Re:Show HN: LogicEmu – Online Logic Simulator by jmatjs on Wednesday June 06, 2018 @08:35PM (#17252335)
It's now updated with a new faster renderer (one big canvas instead of many little ones), does it feel any faster now? Thanks!
Re:Show HN: LogicEmu – Online Logic Simulator by mmastrac on Wednesday June 06, 2018 @10:25PM (#17252774)
Way better. Thanks!
Re:Show HN: LogicEmu – Online Logic Simulator by 52-6F-62 on Thursday June 07, 2018 @11:49AM (#17256921)
WAY faster!
Re:Show HN: LogicEmu – Online Logic Simulator by abritinthebay on Tuesday June 05, 2018 @08:24PM (#17243388)
Any reason for not using canvas or some kind of framework like Vue/preact/etc?
Re:Show HN: LogicEmu – Online Logic Simulator by kroltan on Wednesday June 06, 2018 @12:13PM (#17248330)
The problem here is not a lack of framework, but the overkill usage of elements.

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.

Re:Show HN: LogicEmu – Online Logic Simulator by JustSomeNobody on Wednesday June 06, 2018 @08:02AM (#17246266)
Not the OP but maybe because they wrote it in what they know and actually shipped.
Re:Show HN: LogicEmu – Online Logic Simulator by uuu8728dw8d8d on Wednesday June 06, 2018 @02:55AM (#17244902)
Snarky comments will be ignored. ╭∩╮⎛○⏜⏟〤○⎞╭∩╮
Re:Show HN: LogicEmu – Online Logic Simulator by abritinthebay on Wednesday June 06, 2018 @04:22PM (#17250778)
Wasn't snark, Mr Hostility. DOM manipulation is a very expensive operation and is abstracted by a lot of useful libraries - was wondering if there was a specific reason to not use them.

Canvas is another type of abstraction - and blitting to the screen is easier with it - so same applies.

Re:Show HN: LogicEmu – Online Logic Simulator by jmatjs on Wednesday June 06, 2018 @08:35PM (#17252332)
It's now updated with a new faster renderer (one big canvas instead of many little ones), does it feel any faster now? Thanks for trying

It runs faster for me in chrome and firefox in linux

Re:Show HN: LogicEmu – Online Logic Simulator by awillshire on Wednesday June 06, 2018 @03:22AM (#17245005)
This is way cool! I've recently been trying to explain this stuff to my 14 year old and now I don't have to! This would be a great learning resource for kids studying STEM. Many thanks! :)
Re:Show HN: LogicEmu – Online Logic Simulator by yitchelle on Wednesday June 06, 2018 @10:29AM (#17247409)
Among many other things with them, explaining stuff to my kids is one of the best way I have found to connect with them.

As I work in tech, explaining tech works better to me than explaining non-tech stuff such as gardening or politics :-)

Re:Show HN: LogicEmu – Online Logic Simulator by leetbulb on Tuesday June 05, 2018 @11:24PM (#17244139)
I just spent the past few hours going through the tutorials. Amazing work!
Re:Show HN: LogicEmu – Online Logic Simulator by dandr01d on Wednesday June 06, 2018 @01:02AM (#17244474)
I agree! Well written and informative. Props to the author!
Re:Show HN: LogicEmu – Online Logic Simulator by app4soft on Wednesday June 06, 2018 @09:28AM (#17246965)
> This online logic simulator requires JavaScript to run and JavaScript is disabled in your browser.

Is there same thing, but in Python?

Re:Show HN: LogicEmu – Online Logic Simulator by kroltan on Wednesday June 06, 2018 @12:14PM (#17248337)
No, but there's one in Java, called "LogiSim" [1], and works offline.

[1]: http://www.cburch.com/logisim

Re:Show HN: LogicEmu – Online Logic Simulator by satu0king on Thursday June 07, 2018 @04:48AM (#17254302)
Or circuitVerse