News for hackers. Stuff that matters.
Re:Parcel: Fast, zero configuration web application bundler by bradknowles on Tuesday July 17, 2018 @02:02AM (#17547618)
IMO, the fact that 1726 modules is a “reasonable” number for a web app is a clear indication that there is something seriously wrong with this process.
Re:Parcel: Fast, zero configuration web application bundler by borplk on Tuesday July 17, 2018 @04:16AM (#17548139)
Another factor contributing to this being the norm is the fact that web applications are always under pressure to count the bytes over the wire so there's a tendency to break things up into smaller chunks. Otherwise people would be moaning about large files.
Re:Parcel: Fast, zero configuration web application bundler by yoz-y on Tuesday July 17, 2018 @02:23AM (#17547707)
I think the JavaScript ecosystem needs something akin to Boost. I do not like using Boost in C++, however the way their libraries are built and integrated into standard is awesome.
Re:Parcel: Fast, zero configuration web application bundler by jwdunne on Tuesday July 17, 2018 @02:47AM (#17547810)
Yeah, I agree. "Tiny modules" is a thing in JS i.e there are people, influential developers, that champion the existence of modules like "left-pad", "is-positive-zero", etc. The idea is that "npm is the stdlib" but its not a very good one when your node_modules folder is always 1000+ large.

This is one of a few tiring patterns in the JS ecosystem. The other is "you should be using grunt", "should be using gulp", "nooo just use NPM scripts". Ok so now our package manager is a task runner too despite the insistence on "tiny modules that do one thing well coz Unix!"

Now we have webpack. That isn't tiny but is. Its not a build tool. It's a build platform. How do you extend it? Yep. Tiny modules. In the configuration. Zero conf? Maybe for a 0 dependency tiny module. Then when they introduce a major version that breaks pretty much every plugin, the response? "That is what we call a fixed mindset. We want a growth mindset".

I wouldn't mind if the package management solution was built with tiny, one-big-lib in mind. I wouldn't mind if the ecosystem didn't contradict itself so much. Its just tiring.

Re:Parcel: Fast, zero configuration web application bundler by alex_suzuki on Tuesday July 17, 2018 @02:33AM (#17547757)
Wasn't that jQuery?
Re:Parcel: Fast, zero configuration web application bundler by yoz-y on Tuesday July 17, 2018 @02:47AM (#17547805)
Yes, kind of, however jQuery is more geared towards the frontend whereas many of the packages pulled in now are for backend or general use (your zero-pads and moment and whatnot)
Re:Parcel: Fast, zero configuration web application bundler by tomnipotent on Tuesday July 17, 2018 @02:42AM (#17547791)
That was more like it's C++98 moment.
Re:Parcel: Fast, zero configuration web application bundler by crooked-v on Tuesday July 17, 2018 @02:25AM (#17547719)
That's the result of JS lacking anything resembling a standard library. Just look at how long it took just for Object.entries to make its way into the language.
Re:Parcel: Fast, zero configuration web application bundler by nostalgeek on Tuesday July 17, 2018 @03:03AM (#17547876)
This is both an education issue and a std lib issue. There is no need for packages such as "is-number" or "is-odd" when the language already provides the facilities it check if a value is a number or is even/odd, yet these packages are downloaded a thousand times a a day because they are dependencies in this or that popular package.

For some the first reflex is to add a dependency instead of spending 5 minutes thinking of simple solutions for their use case. But the latter isn't restricted to the node ecosystem.

The avalanche of useless modules profits mainly to NPM, a for profit organisation operating a closed source package repository which imposed itself on the node project in dubious ways. Even nodejs creator regrets it.