3 ms·
How is this different from debugging info? They should just use DWARF instead of reinventing the wheel.
by gumby 9y ago
How is this different from debugging info? They should just use DWARF instead of reinventing the wheel.
- johncolanduoni 9y agoHow would you map 90% of the things in DWARF (like stack variable addresses, structure memory layouts, and the honest-to-goodness VM that produces line mappings) to JavaScript? The problems they're solving don't look remotely similar even if you squint.
- colordrops 9y agoDo you also think that no other make-like systems should have been built?
- flukus 9y agoNot all, but most make-like systems are a waste and are basically just "make in $language" that don't do anything new or novel, the just give you a different syntax and set of functions to learn. So yes, I do think we'd be better off having a lingua franca build systems to use for every language rather than dozens of different ones.
- sametmax 9y ago"make in $language" is not a waste if sudendly you can "x install your framework" and get it without additional setup, and crossplateform. It's not a waste if you can leverage what your teams existing knowledge instead of learning the quirks and tricks of make. It's not a waste if you can use your existing tooling (editor plugins, debuggers, unit test frameworks...) to process your build files.
- matejn 9y agoI believe "x install your framework" is the job of a package manager, not a build tool. I don't see how your argument holds ground. If everyone used make, tooling would support it, and you wouldn't need to learn the "quirks and tricks" of a dozen other systems. The problem with make is that it's not portable, since it needs to call system specific binaries, like rm(1) vs del. There's also the BSD vs GNU divide. Other than that, a newfangled tool like gulp doesn't even have a clean one liner for copying one file to a different location with a different name. It's absurd.
- dahauns 9y ago>gulp doesn't even have a clean one liner for copying one file to a different location with a different name ?? gulp.src("srcfile") .pipe(rename("destfile")) .pipe(gulp.dest("destloc")); What's the problem?
- matejn 9y agoHow is that a one liner? Compare to: cp srcfile destloc/destfile Edit: In addition, the above gulp command reports success even if the file doesn't exist. If you want to check that, you need to import another library and expand the command with another pipe.
- flukus 9y agoWell it could be a one liner, but you're not wrong, the Unix tools are way more terse and we'll known than the random $language versions of make. A few of the .net ones (Nant, msbuild, psake) are ridiculously complicated to do something like sed for instance.
- openasocket 9y agoIt's very similar, but they wouldn't be able to "just use DWARF". Half the DWARF tables are devoted to byte sizes and where variables are stored in stack frame offsets or registers. It's not like you could fork libdwarf or whatever and magically get JS debugging, the effort required to change to the different scenario is enough that it's not worth the effort.
- the_mitsuhiko 9y agoI'm not so sure. I looked precisely into this (using DWARF for JavaScript) and the changes to make DWARF work in that environment are not any crazier than fixing sourcemaps. As it stands sourcemaps are pretty much useless for a wide range of issues that we have with them and attempts to fix them went nowhere.
- laichzeit0 9y agoHonest question, will any of this matter once we've gone full WASM? Will DWARF be a good option then? As I understand in the not too distant future, everyone that absolutely despises Javascript and the whole ecosystem it re-invented will be able to merrily go about their way using the old familiar tools and languages from yore when they can compile to wasm.
- johncolanduoni 9y agoThere's some significant complications, like the fact that most languages that compile to WebAssembly will need to use two stacks at certain times (including C/C++). In this respect WASM is in a similar situation to .NET and the JVM, which use their own debugging information formats for good reason. Considering this wouldn't make much of a dent in the work needed to get tools like gdb/lldb to work with WebAssembly engines I don't think it's likely to be the best path forward for WASM.
- coldtea 9y agoThat's because it's another domain. Wheels are not very useful on ships -- or dynamic languages based on JS.