News for hackers. Stuff that matters.
Re:Calls between JavaScript and WebAssembly are finally fast by rayiner on Monday October 08, 2018 @01:06PM (#18169174)
Don’t get me wrong this is a great article. But I found the analogy with the people and pieces of paper a bit hard to read. (The analogy with the people made me think the author was talking about some sort of prototype delegation chain, https://giamir.com/alternative-patterns-in-JS-OLOO-style, rather than nested function calls.) Who is clicking on this but doesn’t know what a stack frame is?
Re:Calls between JavaScript and WebAssembly are finally fast by kbenson on Monday October 08, 2018 @01:16PM (#18169258)
> Who is clicking on this but doesn’t know what a stack frame is?

JS developers that don't have experience in lower level languages or some CS concepts. In other words, probably a good portion of the expected audience given it's about JS and possible improvements, and is likely to trickle into the news sources to cater to those people.

Re:Calls between JavaScript and WebAssembly are finally fast by btown on Monday October 08, 2018 @04:56PM (#18171244)
Notably, with the advent of things like Unity that compile to WebAssembly, people could be programming frequent communications between WebAssembly and JS, without ever having learned a low-level language involving pointers (which would be the situation in which one would learn about stack frames).
Re:Calls between JavaScript and WebAssembly are finally fast by tomjakubowski on Monday October 08, 2018 @02:12PM (#18169827)
It's funny, I know about stacks, call stacks, and call stack frames. And yet the analogy to a literal stack of papers with information written on each one still gave me something new to chew on. (For some reason, I never actually thought to visualize like... a physical stack of data before.)
Re:Calls between JavaScript and WebAssembly are finally fast by DonHopkins on Monday October 08, 2018 @05:27PM (#18171471)
I made a visual programming and debugging environment for PostScript, a stack based language, that let you perform "direct stack manipulation" by dragging object up and down and on and off of a "spike" stack that impaled the little tabs sticking out of objects.

https://medium.com/@donhopkins/the-shape-of-psiber-space-oct...

Re:Calls between JavaScript and WebAssembly are finally fast by rhencke on Monday October 08, 2018 @07:27PM (#18172189)
As someone who spent a few years having to debug PostScript with pstack and GhostScript running in a fixed-size command-prompt window in the 2010-ish timeframe... this looks futuristic even today.

Was the idea with the direct stack manipulation dragging you describe to provide visual analogues to PostScript commands like roll/pop/etc?

Re:Calls between JavaScript and WebAssembly are finally fast by DonHopkins on Monday October 08, 2018 @10:30PM (#18172918)
That's right -- you could rearrange their vertical order to manipulate their place on the stack, or you could lift them off of the stack and let them float by themselves, just to have a visual reference you can click on, drag and drop into other objects, etc.

It was very dangerous since you were editing the live data structures of the window system! The most complicated program I used it to debug was itself.

It was integrated with NeWS's multithreaded debugger, so when some process hit a bug or a breakpoint, you could "enter" the process and see what was on its stack, peek and poke at the objects, rearrange the stack and edit the objects, then send it on its way.

Since PostScript is homoiconic like Lisp, code and objects are made of arrays and dictionaries, which you could visually browse, edit, and execute. Very much inspired by Smalltalk, but with a twist of Lisp and FORTH!

Re:Calls between JavaScript and WebAssembly are finally fast by pcwalton on Monday October 08, 2018 @02:35PM (#18170052)
> Who is clicking on this but doesn’t know what a stack frame is?

The primary target audience is Web developers interested in new technologies. I'd wager most of them don't know what a stack frame is and would appreciate the explanation.

Re:Calls between JavaScript and WebAssembly are finally fast by sandyarmstrong on Monday October 08, 2018 @01:14PM (#18169239)
> Who is clicking on this but doesn’t know what a stack frame is?

Probably a lot of JavaScript developers who started in web land and are only now starting to be exposed to the underlying architecture.

Re:Calls between JavaScript and WebAssembly are finally fast by tracker1 on Monday October 08, 2018 @02:51PM (#18170202)
The majority of developers who work in scripted or higher level languages like C# or Java. For the most part, you don't have to think about them (even in C#/Java interop with C/C++, it's usually a non-issue).
Re:Calls between JavaScript and WebAssembly are finally fast by zmw on Monday October 08, 2018 @04:01PM (#18170816)
IMO developers who work in scripted or higher level languages and never inspected a call stack have a serious problem (unless they write perfect code that works on the first attempt 100% of the time and never have to debug). I mean, printf debugging is okay, but at some point, preferably early on, you’re expected to graduate out of that (not throwing it out completely, but rather, learn a better way for more complex situations). Plus the fact that most scripting languages throw stack traces all the time.
Re:Calls between JavaScript and WebAssembly are finally fast by nicoburns on Tuesday October 09, 2018 @08:51AM (#18175474)
Right, but the fact that this actually corresponds to memory layout and the consequences of that aren't something that are obvious just from a stack trace.
Re:Calls between JavaScript and WebAssembly are finally fast by tracker1 on Monday October 08, 2018 @05:12PM (#18171349)
I'm not casting judgement in either direction.. merely stating that it's a given.
Re:Calls between JavaScript and WebAssembly are finally fast by irrational on Monday October 08, 2018 @02:33PM (#18170030)
>Who is clicking on this but doesn’t know what a stack frame is?

99% of all the JS developers I've ever met?

Re:Calls between JavaScript and WebAssembly are finally fast by pteredactyl on Monday October 08, 2018 @02:49PM (#18170179)
Feeling insecure?
Re:Calls between JavaScript and WebAssembly are finally fast by LandR on Tuesday October 09, 2018 @04:08AM (#18174122)
He's not wrong IME.
Re:Calls between JavaScript and WebAssembly are finally fast by golergka on Monday October 08, 2018 @02:44PM (#18170144)
I hire C# developers, and most of candidates, even with a couple of years of experience, have no idea about how stack works.
Re:Calls between JavaScript and WebAssembly are finally fast by Waterluvian on Monday October 08, 2018 @03:32PM (#18170576)
A _lot_ of developers who have graduated to the next layer, who can focus even more on building stuff without worrying about implementation details.
Re:Calls between JavaScript and WebAssembly are finally fast by rch on Monday October 08, 2018 @06:09PM (#18171756)
Yeah, I stopped reading when I got to the cartoons. It's interesting to me that it's well received generally though -- I can appreciate that it might be helpful.