4 ms·
Would this be any different than debugging code currently written in a language that compiles to asm? For example, people debug C code, compiled to asm, on the
by kevinwang 10y ago
Would this be any different than debugging code currently written in a language that compiles to asm? For example, people debug C code, compiled to asm, on their computers. Would it be different to debug C code, compiled to webassembly, in a browser?
Although I can't disagree that debugging js directly in browser tools is a nice experience.
- dccoolgai 10y agoPretend you don't have the C code, though - only the WASM binary... because I know it's hard for all of the Rockstartup Cowboys on HN to imagine being a quotidian schmuck like me... I am the guy - like probably most devs - who comes in after the Rockstar hangover to clean up and maintain the mess. Pretend the relationship with the initial developers went sour (as is often the case)... and you're left with this steaming pile of binary WASM. Now what? Seems like these guys making WASM never thought of me or the others in the silent majority of "poor schmucks" ..or just wrote that off entirely with a modicum of lip service in the form of "but we'll have a text version of Assembly you can burn your eyes with" and that's what I find so troubling about the whole thing. Now I have to learn how to read and debug assembly (which I did in College...but honestly, man).
- todd3834 10y agoIn this scenario you are going to have to maintain the binary code without having the original source code that generated it? My understanding is that you would maintain the cleaner non binary version, am I understanding this wrong?
- corysama 10y agoI'm having a hard time following your example. Relating it back to traditional web dev, it sounds like you've experienced developers leaving your team, taking the original JS/Coffeescript/whatever source with them and leaving you with the Closure Compiler minified JS to move forward with the project. Is that something that actually happens? That sounds like grounds for an IP lawsuit. Because that's equivalent to what you are describing in your WASM hangover example.
- dccoolgai 10y agoSometimes you don't even want the Coffeescript after you look at it... sometimes it's a friend of a friend and it should be a lawsuit, but they don't have the money or time and they just need someone to unscrew their situation as best and quickly as possible. If nothing like that ever happened to you... well I hope it never does, friend.
- coldtea 10y agoYeah, and sometimes a dog eats your homework. Back on earth though, all those things don't make sense, and are so rare as to be statistically insignificant. In any case, not a valid argument to make against a new language/delivery format, any more than "what if someone drops it off some building and kills passers by" is an argument against pianos. >If nothing like that ever happened to you... well I hope it never does, friend. And if something like that ever happened to you, then maybe consider it an outlier experience, and don't extrapolate on that? It's like an airplane accident survivor going on about how flights should be banned.
- jfbastien 10y agoWe're quotidian schmucks as well. We've thought about you :) I mostly write C and C++ code, and if someone tries to give me hand-written assembly they better have a good reason (and sometimes they do!). Same goes for wasm: it's meant as a compiler target, not something humans write by hand. That's no different from all the compile-to-JS languages, asm.js, or any assembly. Sure Joe Schmuck can still get stuck with angry assembly, but we haven't made the world a worst place in that respect. And I'd argue wasm is making the world better in many other ways. :-)
- fizzbatter 10y agoYea i'm quite lost. It sounds like the complaint is that this person only has a binary.. but that is exactly the same as every other language. If some company works with C# making GUI apps and then leaves on a deal, and the only thing left is a binary of the app.. no source code.. no sane person is going to touch that. Same thing for WASM. Though, there is a text spec, but ignoring that of course. Even for an "open web", if the OP's argument is that many individuals are leaving without source code, and all he/she is left with is to copy the minified javascript from the page and abstract meaning from that non-commented non-formatted and non-named code.. holy hell, i would not want to have OPs job. Especially if that is a common occurrence. Give me the source code. I don't care if it's C or Javascript or HTML. Is this unreasonable?
- douche 10y agoWith C#, as long as you don't go out of your way to run it through an obfuscator, you can generally decompile the bytecode into something that is pretty trivial to understand. I do this all the time with poorly documented Microsoft SDKs.
- azakai 10y agoThe web is different than other platforms, though. It has a culture of people viewing source and tinkering. Minification etc. limit that, but do not eliminate it. And the web is a medium for transmitting and running other people's code on your machine in a safe way, and that includes not just sandboxing but also being able to inspect it. It's important that the wasm text format be as readable as possible, to continue these traditions, even if wasm is a compiler target.
- mozumder 10y agoWut? Why would you not have the source code to your site that you're debugging?
- coldtea 10y ago>Pretend the relationship with the initial developers went sour (as is often the case)... and you're left with this steaming pile of binary WASM Yeah, hardly a real world use case. And if a company ever has it, this would point that they have far bigger problems than being left without the source code for their service...
- sctb 10y ago> Rockstartup Cowboys on HN This isn't conducive to a civil discussion on the subject. Please don't.