News for hackers. Stuff that matters.
Re:Pika/web: Web Apps Without the Bundler by pier25 on Tuesday March 19, 2019 @06:04PM (#19436520)
I've said before and I'll say it again, we wouldn't be in this mess if we had a decent standard library and language to begin with.
Re:Pika/web: Web Apps Without the Bundler by preommr on Tuesday March 19, 2019 @08:32PM (#19437670)
The way it seems to work with JS is that the community develops a bunch of stuff and the best rises to the top. This then influences the official language spec. ES6 basically made a lot of the popular tools redundant because it was heavily inspired by them.

This is so incredibly important because the main development of the language is so poorly handled.

Re:Pika/web: Web Apps Without the Bundler by andreareina on Wednesday March 20, 2019 @11:58AM (#19443475)
And despite adding arrow functions, async/await, modules etc. we still don't have sprintf and a Math.round that can specify the number of places to round to.

I think that modern javascript is pretty good and I'm grateful for the syntax extensions that have effected that, but the standard library is crying out for some love.

Re:Pika/web: Web Apps Without the Bundler by rtfeldman on Tuesday March 19, 2019 @08:23PM (#19437618)
> a decent standard library and language

This is what a lot of people love about Elm: it's a lovely language with a first-rate standard library.

The Elm ecosystem is smaller than the JS ecosystem, but of course that's a hard requirement of a nicer foundation.

More info: https://elm-lang.org

Re:Pika/web: Web Apps Without the Bundler by toastal on Wednesday March 20, 2019 @01:40AM (#19439327)
Elm still needs `andMap` for `<*>`/`apply` on basically all core packages though.
Re:Pika/web: Web Apps Without the Bundler by h1d on Tuesday March 19, 2019 @07:42PM (#19437359)
Agree. JS standard library has been very immature and was so slow to improve as it was primarily targeted for browser and people thought that wasn't the place to do complicated stuff, not even md5.

I still have some array helper methods just to shuffle array or randomly pick one.

I think it's time to put everything in future JS.

Re:Pika/web: Web Apps Without the Bundler by zdragnar on Tuesday March 19, 2019 @06:29PM (#19436732)
We had several other languages once upon a time, but all were proprietary and most only worked through plugins. All were eventally removed from default installs in browsers due to awful security and mobile performance.
Re:Pika/web: Web Apps Without the Bundler by pier25 on Tuesday March 19, 2019 @07:28PM (#19437266)
I was a Flash dev for some 10 years and I can count with one hand the number of third party libraries I regularly used.

I don't disagree about the security issues, mobile performance, and energy consumption though, but as a dev I preferred the experience of writing AS3 apps by a long shot.

Re:Pika/web: Web Apps Without the Bundler by jnbiche on Tuesday March 19, 2019 @09:37PM (#19438066)
> if we had a decent standard library and language to begin with.

I use compile to JS languages when I can, but not sure what now you'd want for a frontend JavaScript standard library beyond what's available in ES6.

Re:Pika/web: Web Apps Without the Bundler by pier25 on Wednesday March 20, 2019 @11:12AM (#19442963)
Optional static types, enums, data binding, reactive primitive, etc.

Yeah TS has many of those, but TS is not JS and it introduces new problems.

Re:Pika/web: Web Apps Without the Bundler by est on Tuesday March 19, 2019 @10:09PM (#19438242)
js should not be used in web "app" to begin with.

Not every god damn webpage has to be as complicated as Gmail.

Re:Pika/web: Web Apps Without the Bundler by Scarbutt on Tuesday March 19, 2019 @09:38PM (#19438072)
JS standard library is npm, it has weaknesses but it is its biggest strength IMO.
Re:Pika/web: Web Apps Without the Bundler by inimino on Tuesday March 19, 2019 @09:59PM (#19438181)
A standard library should be well-documented, well-maintained, and trusted because it comes from a known source. This is everything npm is not.
Re:Pika/web: Web Apps Without the Bundler by Scarbutt on Tuesday March 19, 2019 @10:10PM (#19438253)
Library rot is a well known thing in the python/ruby/java/php std libs, although I always hear good things about Go's std lib, they had the advantage of a fresh start and have the resources to keep the std lib well maintained.