Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Then if I understand you correctly, you are in favor of a spec for something like asm.js?

Yes. Imagine I'm writing an "asm.js" backend for a debugger, coupled with toolchain support for DWARF. To tell you the truth, I'm not even sure where I'd start, since it's not like the spec exposes a VM or a virtual machine state -- but if it did, I'd need the spec for that.

> But perhaps the problem you see is that you worry the same asm.js code will be slow or fast depending on the browser? Not sure I follow you, please correct me if not.

That's part of it. Without a spec, I can't really rely on remotely equivalent performance, but that's hardly the only toolchain issue.



asm.js is just JavaScript, it isn't a new VM with exposed low-level binary details. You wouldn't need to use DWARF or write your own low-level debugger integration. You can debug code on it of course, the right approach would be to use the JS debuggers that all web browsers now have, with SourceMaps support.

The goal with asm.js is to get the same level of performance as native code, or very close to it. But it isn't a new VM like PNaCl, it runs in an existing JS VM like all JavaScript does. That means it can use existing JS debugging, profiling, etc.


> You can debug code on it of course, the right approach would be to use the JS debuggers that all web browsers now have, with SourceMaps support.

That's not really a replacement for a real language and architecture-(VM or otherwise)-aware debugger.

> That means it can use existing JS debugging, profiling, etc.

Which is a problem, because all of that stuff is awful compared to the state of the art of modern desktop and mobile tooling.


Matter of opinion, I actually prefer to debug C-compiled-to-JS than C-compiled-to-native these days. Mainly because I can script debugging procedures directly in the JS source and just run them.

But sure, if you prefer gdb or such, then the web platform is not going to be a perfect match for you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: