Am I expected to be able to run this in production on the backend, or do I still need to transpile and bundle? Do we expect the performance and memory overhead to be negligible. What would be the expectations on terms of added attack surface?
Right now, you should use Nub on the backend if you are relying on its augmentations. If you specifically want to disable Nub's augmentations (so you have a guarantee that your app/script will "just work" with regular Node, there's a couple ways to disable it. NODE_COMPAT=0 nub index.ts nub --node index.ts I'll investigate a `nub build` that would do the transpilation upfront and properly chunk/bundle a prod build. I…
Show HN: Nub – A Bun-like all-in-one toolkit for Node.js
51–60 of 85 posts
Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js
#52Very cool idea which makes a lot of sense. Bun provides more (eg db drivers) but the DX is certainly a big part of its appeal. For reference, the main author of Nub is Colin McDonnell who created Zod and even worked at Bun at some point.
Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js
#53Respect for embracing existing tech instead of rewriting a worse version of it. Wonder where we would be today if all alternative-building effort went to Node instead (with proper leadership).
You might remember the io.js fork of Node.js back in 2014. Node was stagnating, a bunch of people forked it into io.js, which eventually got merged back into Node and got it back on track. Or, going further back, CoffeeScript, a "fork" of JS that had its best ideas adopted back into ES5. A small scrappy team can prove out a good idea because failure is not a catastrophic risk to them. In short, forks are part of a he…
Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js
#54Earlier quoted context omitted.
You might remember the io.js fork of Node.js back in 2014. Node was stagnating, a bunch of people forked it into io.js, which eventually got merged back into Node and got it back on track. Or, going further back, CoffeeScript, a "fork" of JS that had its best ideas adopted back into ES5. A small scrappy team can prove out a good idea because failure is not a catastrophic risk to them. In short, forks are part of a he…
I almost called it "oi" but I'm not sure anyone would have gotten the joke :P
Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js
#55Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js
#56Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js
#57Earlier quoted context omitted.
Right now, you should use Nub on the backend if you are relying on its augmentations. If you specifically want to disable Nub's augmentations (so you have a guarantee that your app/script will "just work" with regular Node, there's a couple ways to disable it. NODE_COMPAT=0 nub index.ts nub --node index.ts I'll investigate a `nub build` that would do the transpilation upfront and properly chunk/bundle a prod build. I…
I'm seeing lots of bots/agents misusing backticks like this. It's because people are writing agent plans in markdown and the agent thinks it's appropriate everywhere. Maybe you shouldn't be running all your comment replies through Claude.
Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js
#58Earlier quoted context omitted.
Fundamentally you can't fix a lot of things with this approach. Simple example: Node is the only serious OSS software I know of that has no way to document its config (in the config file itself). It's moronic! The Node people just adopted JSON without a thought, and then refused to consider any alternatives (even "JSON with comments"). When an organization digs into bad decisions, the only way to fix them is to start…
Isn't this a problem contained to npm more than Node itself? I'm imagining pnpm or others being able to adopt a package.json file that allows comments, then, when actually publishing, ensuring the published package.json is regular JSON.
Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js
#59Hasn't Node been able to run TypeScript for a couple of versions? Why's the transpiler needed?
Re: Show HN: Nub – A Bun-like all-in-one toolkit for Node.js
#60Earlier quoted context omitted.
Fundamentally you can't fix a lot of things with this approach. Simple example: Node is the only serious OSS software I know of that has no way to document its config (in the config file itself). It's moronic! The Node people just adopted JSON without a thought, and then refused to consider any alternatives (even "JSON with comments"). When an organization digs into bad decisions, the only way to fix them is to start…
> Simple example: [package.json is JSON] Why can't you fix this while embracing existing tech? I can imagine monkeypatching Node & NPM to add support for JSONC or JSON5 or whatever in the same way that Nub adds various features via monkeypatching. Is there some architectural reason that can't work? You'd need `npm publish` to compile it down to plain JSON when publishing, but that seems like an okay compromise.