Even though NodeJS is largely responsible for my career, NPM has given me more trauma than my messed up childhood.
Imagine you're a new programmer, you're working on a brand new app to show to all your friends. But you want to add a new dependency, it doesn't like all the other dependencies, cool you say I'll just update them. Next thing you know absolutely nothing works, Babel is screaming at you.
No worries, you'll figure something out. Next thing you know you're staring at open git issues where basic things literally don't work. Expo for example has an open issue where a default new react native project just won't build for Android .
It's like no one cares half the time, and in that case the solution isn't even in the node ecosystem, it's somewhere in the Android ecosystem. It's duct tape all the way down. But this can also inspire confidence if a billion dollar project can ship non-functional templates, then why do I have imposter syndrome when my side projects don't work half the time!
This is a problem for Node, but it isn't a problem for Rust. You don't need any dependencies to 'like' other dependencies. You can have all the versions at the same time and nothing breaks.
Certainly nodejs and npm getting out of hand was a wakeup call for me, about 15 years ago.
I started to view it has a personal failure when I brought in that first dependency, which meant needing all of the packaging and organization just to use that first package.json, rather than just having plain js loaded from a script tag.
I have a side project right now where I tried my hardest to use anything aside from NodeJS.
Even though it's just for my personal consumption, and I doubt more than five or six people will ever see it, I ended up having to use NodeJS and HTML because it's simply the best solution.
Imagine an alternate timeline where Google decided to offer other languages as first class citizens in the browser. Could you imagine Golang or Dart. No compiling down to JS, just running natively.
Mozilla (Eich) wrote JS, and specifically Microsoft wrote the XMLHttpRequest, which allowed Google to exist.
And supposedly WASM is to be that thing, so any language can compile down to it. Hasn't totally worked out I guess. A browser would have to take the leap to be WASM-only, and compile even JS to it.
I'm doing backend work mostly right now. If I start some other project, I'll probably try using htmx and tailwindcss as my two js script tags, and the rest will be controlled from the backend.
See https://x.com/BrendanEich/status/1260733952160985089. Google, especially with the antitrust trouble they are in, is not going to try for an "ActiveX redux" act here. They definitively renounced trying to ram Dart into the Web standards here:
See https://news.ycombinator.com/item?id=42838110 (downthread). Polyglot VMs are hard to pull off and always have a _primum inter pares_ (C# for .NET, Java for the JVM, JS for the JS+wasm "Web VM").
Your simple to learn programming language is what took me from a broke college dropout to six figures in about 3 years.
It's the first programming language that actually stuck with me, even though one of the senior developers at my first salaried job actively hated it. He was an old Java guy though.
Do you feel that JavaScript is always a capable tool for the job?
At a lot of companies, at least when I started programming 10 or 12 years ago, we'd have a bunch of front-end people who are nifty with JavaScript and just tell them to write NodeJS server code.
JavaScript is still my go to language when I just need to get something done. With Python a close second. C# has it's place for larger projects ( as well as stable employment).
I'm actually a bit excited for WASM. For a good while you had companies shipping plugins to extend the browser, first Adobe with flash, and then unity with their Unity Web plugin. Which lasted about 2 years before they started building native web builds.
Now everything is compiling straight to JS or JS+WASM.
JS is not the hammer for all nails, but ubiquity means it will be used to pound in screws and bolts more than it ought to be.
I fire up Node but also Python from command line; Wolfram Alpha in browser.
Wasm was the victor in old plugin vs. integrated PNaCl style VM vs. polyglot VM battles. JS VMs (ubiquitous again, and see write barrier cost of poly-GC vs. mono-GC down the page in my linked comment) rather more easily became polyglot via WebAssembly as second syntax low enough to target from other languages' compilers.
Still more to do on the Wasm roadmap. Always more to do...
Hypothetically if Microsoft threw enough money at it, could they get C# to work natively in the browser ?
Or does WASM make this unnecessary?
I actually really like Flutter Web, Google has done an amazing job with it. I built a small game for a friend, but it's not as customizable as an actual website coded in JavaScript.
It appears they've taken a hybrid approach where you get both a JavaScript and a Wasm build.
I feel like Unity in particular has really pushed the limits of what you can do in a browser. For example, I have a simple 3D game that performs just as well as the android build.
As far as making a small game, it's very easy to get someone to open a link. The browser sandboxes every and protects you.
It's near impossible to convince someone to download a binary, with good reason.
One last question. Do you consider yourself to be a Computer Science pioneer ? Your literally responsible for the foundations of the modern web!
It's unlikely to be a money problem (nor Microsoft cares that much about .NET to do so). WASM also makes it pretty much irrelevant. Current Mono-WASM solution works decently enough but is far from perfect. Hopefully NativeAOT-LLVM project gets released in the next couple of versions as it improves the performance and bundle size massively.
Right, wasm is the low energy path. IMO you should think about this problem-space of the Web as an evolutionary system, with costs weighting all the paths through a graph from current state to future state.
MS throwing money at C# native VM (the CLR? Silverlight's DLR? lol) as second VM in browsers, with separate GCs bridged, incurring the write barrier overhead that I cited already? In all browsers, not just the ones MS can bribe to do the considerable work? No.
C# compiled to WebAssembly? One GC, all good, perhaps some warm evolution is on order, but it is an incremental cost.
Even though NodeJS is largely responsible for my career, NPM has given me more trauma than my messed up childhood.
Imagine you're a new programmer, you're working on a brand new app to show to all your friends. But you want to add a new dependency, it doesn't like all the other dependencies, cool you say I'll just update them. Next thing you know absolutely nothing works, Babel is screaming at you.
No worries, you'll figure something out. Next thing you know you're staring at open git issues where basic things literally don't work. Expo for example has an open issue where a default new react native project just won't build for Android .
It's like no one cares half the time, and in that case the solution isn't even in the node ecosystem, it's somewhere in the Android ecosystem. It's duct tape all the way down. But this can also inspire confidence if a billion dollar project can ship non-functional templates, then why do I have imposter syndrome when my side projects don't work half the time!