News for hackers. Stuff that matters.
Re:Snowpack: Build a web application without a bundler by gtmb on Wednesday January 08, 2020 @06:16PM (#21996841)
The joys of the javascript ecosystem: (1) creating complex solutions for problems no one has or (2) creating complex solutions to fix the problem of complex solutions that didn't need to exist in the first place

It is an endless loop.

The first dot-com bubble resource wastefulness was spending so much money on networking gear. Every one had oversized expensive Cisco gear.

This dot-com bubble resource wastefulness is so many hundreds of thousands of engineering hours devoted to mega super over engineered Javascript solutions.

Re:Snowpack: Build a web application without a bundler by rictic on Wednesday January 08, 2020 @06:43PM (#21997007)
I get framework and tooling fatigue, but it seems misaimed here. This project is an attempt at minimizing complexity, not adding onto it. There's a fundamental problem with writing JS for the browser: how do you expresses your dependencies?

jquery-era code solved this by just putting the dependencies in the README of a project (e.g. "this project requires jQuery and jQuery UI version 3! load them before loading this script!"). It worked, but it was error prone and manual.

More recent code has solved it by writing code that used abstract specifiers, like require('jquery'), which meant that you needed to use a complicated and often hyperconfigurable bundler to run in the browser (because the browser can't go searching the filesystem to figure out where the code for the 'jquery' package is)

With ES modules we're almost there, browsers can import files now, but they still need a bit of additional info to tell them how to resolve underspecified modules like 'jquery' (as opposed to './utils.js' which they can handle with no problem). You can write your code with fully specified imports, but the difficulty is that that code doesn't travel well, e.g. if you write `import '../node_modules/jquery/jquery.js'` that won't work if someone uses your package as a library, because jquery.js will actually be at '../jquery/jquery.js' because your package lives in the node_modules directory.

Re:Snowpack: Build a web application without a bundler by core-questions on Wednesday January 08, 2020 @07:04PM (#21997145)
> how do you expresses your dependencies?

because literally just putting them in a folder somehow became insufficient for any number of reasons, some of which seem to have to do with JS's lack of an include() function like every other interpreted language has had since forever

like, how about i don't need 20,000 dependancies, and just use an application stack that includes normal things like trimming a string

Re:Snowpack: Build a web application without a bundler by ratww on Wednesday January 08, 2020 @08:34PM (#21997665)
> some of which seem to have to do with JS's lack of an include() function

This has been solved by ES Modules, which is already in all major browsers. Only IE is lagging behind (but there are polyfills).

Re:Snowpack: Build a web application without a bundler by doublerabbit on Wednesday January 08, 2020 @07:21PM (#21997266)
> how do you expresses your dependencies?

By writing all code from scratch so that it doesn’t require any dependence’s from aging frameworks.

If everyone wrote their own kits then the web would be a more of a mature place.

Downvoted without any reasons? The web once before didn’t rely on frameworks.

PHPNuke wasn’t a framework.

PHPBB wasn’t a framework.

E107 wasn’t a framework.

If you wanted something. you coded it yourself.

/shrug

maybe it’s just me that feels the web is now polluted with Mb’s of wasted code. And even now it’s seen as bad practise not to use framework.

Re:Snowpack: Build a web application without a bundler by meritt on Wednesday January 08, 2020 @06:24PM (#21996882)
> devoted to mega super over engineered Javascript solutions

Hey now, let's not discount the rise and fall of NoSQL, reinventing of data analysis except using python and spark cause SQL is too boring, or discovering linear regressions using a fleet of GPUs under the banner of Machine Learning!

It'll be nice when people get back to solving real business problems.

Re:Snowpack: Build a web application without a bundler by bmiller2 on Wednesday January 08, 2020 @06:28PM (#21996913)
Fall of NOSQL?
Re:Snowpack: Build a web application without a bundler by djsumdog on Wednesday January 08, 2020 @06:34PM (#21996966)
Is your shop still using it? Most NoSQL systems I've seen in the wild are pretty much just used as a caching store .. fancy Reddis really. All the big shops I've worked at still use Postgres for persistant storage. If they need speed; they'll add Elastic Search or Spark and have indexing services to make sure they stay up to date.
Re:Snowpack: Build a web application without a bundler by vosper on Wednesday January 08, 2020 @06:48PM (#21997032)
I think there are probably quite a lot of production Mongo databases out there from companies founded around the peak of the (bootcamp-driven) NoSQL hype train.

No one's bragging about it, probably everyone regrets it, and most companies will never practically be able to get off it (because, when your data is an unstructured mess it's a huge project to try and figure out how to get to structure, not to mention maintaining consistency during the migration. And you have that home-grown "relational" layer someone wrote for Mongo when they realised that they really did have relational data after all, and which is now coupled to everything...)

(If you thought I was describing the primary database at my day job, well...)

Re:Snowpack: Build a web application without a bundler by ComputerGuru on Wednesday January 08, 2020 @07:57PM (#21997469)
Most companies that adopted MongoDB at peak NoSQL either failed or were forced to switch to a better option (NoSQL or otherwise): that was a steaming pile of crap that couldn’t be trusted with data. The people behind it were concerned with marketing and going viral and succeeded at just that, it’s only recently that the money and time has been put into making the product itself actually any good.
Re:Snowpack: Build a web application without a bundler by vosper on Wednesday January 08, 2020 @08:43PM (#21997706)
Then perhaps we really are an outlier. That'd be nice: fewer people than I thought toiling under the yoke of a crappy database.

The post-IPO success of Mongodb Inc, and Amazon's recent roll out of their own compatible hosted solution makes me suspect not, though.

Re:Snowpack: Build a web application without a bundler by ComputerGuru on Thursday January 09, 2020 @12:06PM (#22003009)
Perhaps I was a little too optimistic ;)
Re:Snowpack: Build a web application without a bundler by quickthrower2 on Wednesday January 08, 2020 @09:19PM (#21997928)
It’s not sexy but we use both Azure table storage and Amazon Redshift and they are nosql in my book.
Re:Snowpack: Build a web application without a bundler by meritt on Thursday January 09, 2020 @12:36PM (#22003397)
Redshift is a columnar MPP fork of postgres, definitely not NoSQL. Do you mean DynamoDB?
Re:Snowpack: Build a web application without a bundler by simonw on Wednesday January 08, 2020 @06:34PM (#21996963)
I feel like many experienced developers I know have gone back to defaulting to SQL databases again, because it turns out the trade-offs of NoSQL (schema-free, horizontally-scaled-but-eventually-consistent etc) weren't worth the trade-offs.
Re:Snowpack: Build a web application without a bundler by wongarsu on Wednesday January 08, 2020 @06:22PM (#21996867)
But if it's the right tool for a FAANG company surely it must be the right tool for my use-case /s