5 ms·
Yeah, I use https://github.com/nvm-sh/nvm https://github.com/nvm-sh/nvm
by dbmikus 4y ago
Yeah, I use https://github.com/nvm-sh/nvm https://github.com/nvm-sh/nvm
- amalgamated_inc 4y ago`asdf` allows this for all languages, not just Node, one stop shop. That said, yea, the JS ecosystem is literal cancer.
- seanw444 4y agoI find it hilarious that JS was basically invented overnight, and ever since, it's just been layers of hodgepodge added and held together with hot glue to make it all work. And now it's the most popular programming language in the world, even outside of its original intended domain. How we got ourselves here, I don't know.
- krapp 4y agoIt was the first programming language available to the general public that was easy enough for the public to use without a CS education - and it running on the web made it ubiquitous. Then SV happened, and the web became Serious Business. Then Node.js happened and Javascript became Serious Business, and with that came the byzantine horror of complexity necessary to get a toy scripting language invented in a week to replace every enterprise programming language in existence because managers could toss a rock out of their office window and it would bounce off of three web devs before hitting the ground.
- Sohcahtoa82 4y ago> It was the first programming language available to the general public that was easy enough for the public to use without a CS education - and it running on the web made it ubiquitous. BASIC would like a word. Heck, even Python came 4 years before JS.
- krapp 4y agoJavascript was still easier to use and more readily available than either of those.
- Sohcahtoa82 4y agoDebatable. I find JavaScript's type system to be horrendous and bug prone. I'd rather operations between two types that don't make sense (like dividing an Array by an Object) to throw an explicit error than to just do some unpredictable shit that causes a subtle bug. Also, BASIC is probably the easiest language to learn, though this is mostly because it lacks capabilities that create complexities. It's a completely obsolete language.
- amalgamated_inc 4y agoProbably a generational thing. I learned BASIC, but when I was a kid, I had not internet, no phone, and no browser. Nowadays everyone has 10 JavaScript interpreters in every device, so it's much more accessible than finding out about and installing BASIC. BASIC also lost all relevance in terms of actually being useful (if it ever had it), whereas JS is the bee's knees.
- ElectricalUnion 4y ago> Also, COBOL is probably the easiest language to learn, is mostly Just English. /s FTFY.
- WorldMaker 4y agoMost programming languages have underwhelming origin stories and are evolutionary hodgepodges held together with hot glue. The most likely opposite to "basically invented overnight" is "designed by committee", and is that much preferable? Origin stories aren't the end of the story either. Humble origins aside, JS has had many of the best minds in many of the largest companies contribute all sorts of feature work and performance efforts across a span of decades. How many languages can claim that many eyeballs and that diverse a set of language developers and engine writers? Sure, a lot of it looks like a hodgepodge, especially with its mandatory, deep respect for backward compatibility, because no one wants to break an old website. But show me the language with any respect for backward compatibility that doesn't look like a hodgepodge? Core systems languages like C and C++ started out as intentional hodgepodges. Their macro system was originally its own, different, language brought in from another existing project for some temporary duty, and now enshrined in the language as a forever feature. Hodgepodges are how languages are built and evolved. That's how we got ourselves here: the natural way. Every programming language on the planet is its own beautiful house of cards, built piece at a time. Don't just look down on JS because it went "mainstream".
- PaulHoule 4y agoCommon Lisp and Java were two of the first languages designed by adults and they broke those trends.
- amalgamated_inc 4y agoI've never used CL but heard it's very "design by committee." Java is worse than JS. So yea, maybe hodge podge is actually the best option we have.
- WorldMaker 4y agoYeah, the "Common" in Common Lisp comes from committee. Lisp itself was a "basically designed overnight" language that became an incredibly popular hodge podge of a million snowflake variants and then eventually two competing attempts to standardize and clean up the hodge podge happened: Scheme (to my understanding a BFDL-like situation of a strong figure building anew, with few backwards compatibility cares) and Common Lisp (a standards committee and then some, with a bunch of backwards compatibility shenanigans to sort out). (ETA: I am a fan of Common Lisp, for what that is worth, if this sounds too critical. It's a very nice language. Some of what has made it nice was a massive committee and standards effort, very similar to the way JS has continued to evolve under TC-39 stewardship.) Also yeah, my impression of Java was that it was very design-by-committee.
- 8note 4y agoThere is something really special about that cancer. It's the only language I've written in where no matter what code I'm writing, I can always think "this could be fully generalized and spun out into a package"
- salawat 4y agoYou're going to have to wipe out package-lock.json or whatever your lockfile is and recompute from scratch. I tend to squirrel away a backup just in case whenever I touch JS dependencies because I've been bitten by yarn/npm/pnpm bs too many times. Also make sure you wipeout all your node_modules, plus your yarn/pnpm cache. Technically, you should only do dependency manipulation sith p?npm|yarn add|remove, to get lockfile recalculation, but depending on version of those tools there are so many quirks you have to watch out for. I always approach any library upgrade as a potential disaster that'll result in me having to nuke my entire node setup for that project and rebuild it from the ground up or last known good state. I never had the kinds of problems I have with JS with any other bloody languages and their respective build tools.
- kavaruka 4y agoThis is an old issue; the ecosystem has changed. Now, using the "engine" and "packageManager" properties in "package.json", you can bind your project to a particular runtime version and package manager.
- pwdisswordfish9 4y ago> I never had the kinds of problems I have with JS with any other bloody languages and their respective build tools. lmao
- salawat 4y agoThe tools in question are npm (Node Package Manager) pnpm being a modified version thereof that adds a compression/content addressible store mechanism to speed things up in a development configuration. Or Yarn ...which is yet another dependency management solution cum build tool, which is Maven/Gradle like. Depending on version though there are so many quirks. Both are "staples" of any enterprise scale project I've run into. I don't have an issue with nodeJS or JS per se. It's the ecosystem and enterprise tooling. I still cannot for certain say those damn build tools don't muck things up in horribly subtle ways, and the experience of debugging the average horrible nest of every dependency known to man has comsumed entirely too much of my life, and the experience overcoming that learning curve I still can't say with confidence wasn't somewhat deleterious to my personal sanity. I can do it trivially now; and I can appreciate the things you can build with it when doing it correctly. The depth of hole you can quickly end up in though is not to be underestimated. That and nigh every JS developer I've run into who says they are proficient knows nothing about really debugging it, or hasn't read the core library docs and really means they can use one framework or another. ...Bar like 3. Who you never want to bother, because they are usually handling issues way more important/wide-ranging that warrant their attention than hand-holding you through learning how it actually works.