News for hackers. Stuff that matters.
Re:How I made a game played in Notepad by glitchc on Thursday May 28, 2020 @10:51AM (#23337959)
> An experienced Javascript programmer should have no trouble reading and understanding the general idea of C code.

Sigh, how I wish that were generally true.

Re:How I made a game played in Notepad by umvi on Thursday May 28, 2020 @10:55AM (#23338006)
Does JavaScript even have a concept of stack vs heap? Seems like someone who has only used pure JS would be missing a lot of fundamental knowledge on how C works.
Re:How I made a game played in Notepad by Kagerjay on Thursday May 28, 2020 @11:59AM (#23338804)
Javascript sort of does

Stack - the event loop uses this for handling callback executions

Heap - memory addresses for objects. For instance if you copy over an array of objects, you are copying the pointers to those memory addresses inside the array. Also memory leaks to some extent with eventListeners especially when you use a framework like React

Re:How I made a game played in Notepad by tyingq on Thursday May 28, 2020 @11:46AM (#23338654)
For the narrow purpose of the change the author made, his statement fits.

if (this || that) {dosomething();}

Is mostly identical in JS and C.

Re:How I made a game played in Notepad by throwaway_pdp09 on Thursday May 28, 2020 @11:02AM (#23338108)
Not really AFAIK. it's GC'd so you do as you please and it sorts it out.