Live data from Hacker News

The tragedy of running an old Node project

abdisalan.com

141–150 of 412 posts

Re: The tragedy of running an old Node project

#142
post #85

i could not tell from the article whether this was a site with a backend using node.js or if it was just a frontend depending on node.js for the build tools. for the latter i get around the problem by avoiding build tools altogether. i use a frontend framework that i can load directly into the browser, and use without needing any tools to manage dependencies. the benefit from that is that it will ensure that my site…

I've been experimenting recently, with quite some success, with having a 'libs.js' file that pulls in and re-exports everything external I want, and providing a script that applies 'bun build' to just that.

I haven't yet decided if/how I want to include a prebuilt version of it in the repo, I *think* I may go the approach of having a commit that modifies libs.js and/or the lockfile and then an immediately following one that commits an updated prebuild ... oh, huh, actually, I should probably also consider doing those two commits on a branch, then forcing a merge commit so they land on master atomically but it's easy to tease out the human changes and the regen changes by poking inside said merge commit ... yeah, like I say, still thinking about exactly how to do this, don't mind me.

Also for even simpler cases I've been using the preact-htm prebuild directly, since htm gives a lit-style html() tagged literal consuming function that can produce vnodes for preact so I can mess around without needing something that understands jsx between my editor and my browser window.

vue's component system is IIRC noticeably less nice to work with if you don't have a compile step, but it's still pretty nice even without that so please don't think I'm trying to dissuade you here :)

Re: The tragedy of running an old Node project

#144
post #96

Earlier quoted context omitted.

...until the node version you locked can't be downloaded anymore, or hasn't ever existed for your CPU arch.

I see you too had to run node v14(? my memory fails me somewhat) on Apple Silicon hardware...

shivers

Re: The tragedy of running an old Node project

#145

> node-gyp We're in ... let's call it a transitional period at work. I've got something like a dozen versions of node being managed by asdf. And in half of the projects I work on regularly, I consistently get warnings about this particular project failing to build. One day, I'll actually look up what it actually is, and what it does, and why it's being built, but is apparently optional.

It's basically a set of tools to make building native modules easier, that said modules then use to deal with their binding to C/C++/etc. code.

Everybody complains about it, and understandably so, but if it didn't exist you'd probably instead have one set of potential similar problems *per* native module which has a good chance of not actually being better overall.

The counterargument is, I guess, "well, only people who can write their own high quality build setup in-tree should be writing things that bind to external code," and I do sometimes dream of that, but it's not hard to see the downsides of living in *that* world instead either.

Re: The tragedy of running an old Node project

#146

Earlier quoted context omitted.

I truly believe some flavour of "Javascript Classic" (some future state of JS before some big shift in syntax/mass migration to something else), C and x86 instructions will follow humanity for the rest of time. There will be javascript somewhere aboard the interstellar spaceships of the future, and we will still complain about it.

JavaScript will be killed off by WebAssembly. Zombie JavaScript will be reduced to being glue code and then not even that.

JavaScript will be killed off by webassembly for about 5 years now

Re: The tragedy of running an old Node project

#147
post #146

Earlier quoted context omitted.

JavaScript will be killed off by WebAssembly. Zombie JavaScript will be reduced to being glue code and then not even that.

JavaScript will be killed off by webassembly for about 5 years now

The difference lately is the number of tools that are now in place for WebAssembly development and the new extensions to WebAssembly (WasmGC, Memory64, etc.).

Despite 28 years of effort at optimization, JavaScript is outperformed by WebAssembly. There's not much coming back from that:

https://jordaneldredge.com/blog/speeding-up-winamps-music-vi...

https://www.amazon.science/blog/how-prime-video-updates-its-...

https://web.dev/case-studies/google-sheets-wasmgc

Re: The tragedy of running an old Node project

#148

The tragedy of running an̶ ̶o̶l̶d̶ Node project.

On the one hand, it's not that terrible and most *of* the terrible is from people making silly choices.

On the other hand, there's a reason I regularly get annoyed enough at it to call it nope.js.

On the gripping hand, I mostly write perl, which argues for a different but unique set of masochistic tendencies on my part.

(you just have to remember that what 'perl' *really* stands for is 'Perenially Eclectic Rubbish Lister' and then you will have appropriate expectations and can settle back and have fun ;)

Re: The tragedy of running an old Node project

#149
post #136
post #23

> time to run it after not touching it for 4 years > Two hours of my life gone... Two hours of work after 4 years sounds ... perfectly acceptable? And it would have run perfectly right away if the node version was specified, so a good learning, too This feels like making a mountain out of a mole hill

I would love the author to test and old java/maven project. Node is a paradise compared to that stack.

The only problems I've run into are related to certain package repos that went offline. So you have to track down suitable versions of certain packages on other repos.

OTOH with Node I always find myself in dependency hell with dealing with old projects.

Re: The tragedy of running an old Node project

#150
post #92

Good old node-gyp. I have absolutely no idea what it even is but it has been giving me errors for what feels like a decade. Mostly via front end build stuff from various projects I have worked on

Same. One day I'll find out what it is.

if you want to know, it's a fork of google gyp, which is a C/C++ project/build system generator. I.e. it's a bit similar to CMAKE, a tool to describe native code projects and what needs to be built in order to make executables and dlls.

It's a python codebase, largely abandoned by google. They used to use it for building Chrome.

Post reply on HN