News for hackers. Stuff that matters.
Re:Parcel: Fast, zero configuration web application bundler by cjhanks on Tuesday July 17, 2018 @01:53AM (#17547587)
The code looks nice, I hope it has helped you in your life.

But frankly, if a JavaScript developer ever really wants to solve the problem... Learn enough C++ to write the equivalent code that compiles 6.5M in 0.1 seconds (assuming a nice HD).

Re:Parcel: Fast, zero configuration web application bundler by nemothekid on Tuesday July 17, 2018 @01:55AM (#17547594)
C++ doesn't even compile 6.5M of C++ in .1 seconds.
Re:Parcel: Fast, zero configuration web application bundler by cjhanks on Tuesday July 17, 2018 @02:13AM (#17547664)
If you do absolutely zero instruction optimization or re-ordering. Literally mapping the BNF grammar to a syntax tree capable of simple syntactic reduction... I would be surprised if it did not lag behind disk read speeds.

Traversing that tree to remove unambiguous dead branches seems pretty clear. Perhaps if you get into a tricky manipulation between strings and syntax you could add a little runtime...

Re:Parcel: Fast, zero configuration web application bundler by yzmtf2008 on Tuesday July 17, 2018 @02:17AM (#17547679)
If you do absolutely zero instruction optimization or re-ordering, JavaScript takes 0 seconds to compile, and you can use almost-complete feature set of ES6. /s

Come on man, that's beyond the point. Just because JavaScript needs to be compiled, doesn't mean it has a worse experience than compiling C++.

Re:Parcel: Fast, zero configuration web application bundler by cjhanks on Tuesday July 17, 2018 @02:23AM (#17547706)
Instruction optimization is procedure of measuring expected CPU latency given the expected current state to identify which instruction set transition is optimal for the CPU. It would not be applicable to JavaScript unless I missed something.

Instruction ordering is largely bound to instruction pipelining and the estimation of CPU instruction transitioning to reduce latency. Given that V8 uses some degree of virtual indirection... I don't think that's possible in JavaScript.

Re:Parcel: Fast, zero configuration web application bundler by rydel on Tuesday July 17, 2018 @02:10AM (#17547655)
This is fine argument. Although I work primarily in JS, I don’t think that this is the tool for any job. There are lot of nice tools in JS out there. While using single tool written in JS it might be not looks slow, but when you must use multiple of them in day to day work it start be a problem. To sum up: I don’t think JS was designed to build such tools. Although it is very nice language to write in, it is not so efficient in runtime.
Re:Parcel: Fast, zero configuration web application bundler by cjhanks on Tuesday July 17, 2018 @02:16AM (#17547675)
I agree.
Re:Parcel: Fast, zero configuration web application bundler by voltagex_ on Tuesday July 17, 2018 @01:58AM (#17547606)
Do you know enough C++ to try that? I'd be really interested to see the results - I'm not sure language is the bottleneck.
Re:Parcel: Fast, zero configuration web application bundler by cjhanks on Tuesday July 17, 2018 @02:17AM (#17547682)
Yes.
Re:Parcel: Fast, zero configuration web application bundler by tomnipotent on Tuesday July 17, 2018 @02:03AM (#17547626)
Oh no! One language has a build process and toolchain... We should clearly throw everything else out and just use this one hammer for everything! /s

Believe it or not, some people have problems in domains with contexts that have nothing to do with yours and the things they come up with are equally valid solutions.

Re:Parcel: Fast, zero configuration web application bundler by cjhanks on Tuesday July 17, 2018 @02:16AM (#17547672)
It is not a question of C++ being better than JavaScript or vice-versa in some esoteric sense.

Compiling code from C++ to WASM is counter-productive if the native JavaScript is fine. It's just that native languages seem to perform quite a bit better in the domains of graph construction, graph optimization, and even basic string manipulation.

Re:Parcel: Fast, zero configuration web application bundler by tomnipotent on Tuesday July 17, 2018 @02:26AM (#17547721)
> Compiling code from C++ to WASM is counter-productive

When did WASM come into the picture? I use Parcel because my time is valuable and I don't want to master the arcane arts of modern JS build toolchains but I still NEED to benefit from them if I'm to run a successful business and make sure my investors get their money back and a language I can deliver plain text over HTTP/S that runs performantly across billions of devices that I can modify on the fly is beyond valuable.

> native languages

C++ isn't going to help me deliver my product to my customers in any measurable way that influences the outcome of our relationship. JavaScript, frankly, does - the less time my organization spends writing code, the less we have to charge for things to make up for that margin impact.

[dead]
Re:Parcel: Fast, zero configuration web application bundler by tomnipotent on Tuesday July 17, 2018 @02:46AM (#17547804)
You brought up C++ & WASM in a post where it made absolutely NO contextual sense so you could shit on someones work and I'm the one with comprehension issues? Grow up.
Re:Parcel: Fast, zero configuration web application bundler by modernerd on Tuesday July 17, 2018 @02:50AM (#17547820)
Others feel the same.

Fastpack is a binary JS bundler written in OCaml:

http://fastpack.io/

It’s new and missing some features (http://fastpack.io/docs/get-started.html ), but already faster than Webpack / Parcel. It also supports Webpack loaders.

Re:Parcel: Fast, zero configuration web application bundler by Hurtak on Tuesday July 17, 2018 @03:08AM (#17547892)
So it is 3 times faster than Webpack, ATM it does not seem worth to be switching to this. Also the Parcel comparison seems wrong (maybe they are using too old version of Parcel?), see Parcels own benchmarks https://github.com/parcel-bundler/parcel#benchmarks