News for hackers. Stuff that matters.
Re:Node.js Compiler – Compiling your Node.js application int... by icf80 on Friday May 05, 2017 @02:15AM (#14271466)
50 MB executable?
Re:Node.js Compiler – Compiling your Node.js application int... by mrweasel on Friday May 05, 2017 @02:42AM (#14271551)
Is that honestly a problem? Most Java applications I encounter is much larger than that.

50MB is nothing and if it enables you do have a single standalone binary that you're easily able to deploy I'd say it's worth the extra disk use.

Re:Node.js Compiler – Compiling your Node.js application int... by TheRealPomax on Friday May 05, 2017 @11:19AM (#14274051)
Depends, really. If the target is a common OS then having people install Node.js itself plus grabbing your application as a zip file that has the code and a few different files to act as soft executable (myapp.bat, myapp.app, etc) can be significantly smaller. 50MB is not "nothing" when it comes to asking people to download it (because someone still has to download that application, and way fewer people than you think have as nice an internet connection as you). It also means people have to download a _new_ 50MB executable when the app updates, so from an "on disk size", it's nothing only if this is the only node application someone will ever run. Otherwise this becomes bloat very fast. Like bundling a full JVM with every individual application instead of going "or download this much, much smaller thing when you already have java installed". I don't need eight copies of the JRE, in the same way I don't need eight compiled apps if I already have node.js -- but that's a consideration for people who make applications and are thinking of packaged distribution. Just because you can, doesn't mean you should. Or even "should only".
Re:Node.js Compiler – Compiling your Node.js application int... by h1d on Friday May 05, 2017 @04:41PM (#14276682)
You need to download the runtime at least once. If that 50MB is a problem, you can't use it in the first place.

Who likes to download Java on desktop anyway? It's absolutely the wrong way to distribute Electron apps.

It's so annoying for App developers that they have to ask what version of shared Electron the user has and install that for themselves and debug instead of just be done with it with the exact version developers tested and distributed.

Re:Node.js Compiler – Compiling your Node.js application int... by piaste on Friday May 05, 2017 @04:43AM (#14271984)
I thought that was a totally reasonable file size too, until I looked up Docker image sizes for node:

https://hub.docker.com/r/library/node/tags/

Regular images are ~260MB and "slim" images are 85MB, but Alpine-based images are a paltry 18MB.

So it seems something in the Node.js compiler is ballooning up the size of the code, by a factor of about three. I wonder what.

Re:Node.js Compiler – Compiling your Node.js application int... by tracker1 on Friday May 05, 2017 @08:01AM (#14272732)
It really depends on version of node, and the modules used. I'm more inclined to want to see what can be done as a minimal electron... or seeing electron go the adobe air route, and have a shared (continuous updating) base, but that could prove problematic as binary modules (namely sqlite) are common.
Re:Node.js Compiler – Compiling your Node.js application int... by mxvzr on Friday May 05, 2017 @11:12AM (#14273999)
AFAIK Alpine Linux is using musl which would explain the low binary size.
Re:Node.js Compiler – Compiling your Node.js application int... by est on Friday May 05, 2017 @02:27AM (#14271501)
There are quite a few minimalize Blink efforts. Like this one:

https://github.com/bloomberg/chromium.bb

https://github.com/weolar/miniblink49

The latter is around 9MB. The author is working on a electron wrapper.

Re:Node.js Compiler – Compiling your Node.js application int... by ComodoHacker on Friday May 05, 2017 @03:13AM (#14271662)
Does this project include Blink? Looks like not.
Re:Node.js Compiler – Compiling your Node.js application int... by est on Friday May 05, 2017 @04:40AM (#14271966)
It contains a stripped version of Blink with most of functions.
Re:Node.js Compiler – Compiling your Node.js application int... by dchest on Saturday May 06, 2017 @09:35AM (#14280161)
Blink is a rendering engine, V8 is a JavaScript engine. Node.js contains V8, but not Blink.
Re:Node.js Compiler – Compiling your Node.js application int... by est on Tuesday May 09, 2017 @01:14AM (#14297881)
It's a naming thing, it does include v8 to execute js.

Blink is a fork of webkit, by your logic, most softwares based on webkit can not execute javascript???

Re:Node.js Compiler – Compiling your Node.js application int... by dchest on Tuesday May 09, 2017 @06:32PM (#14304391)
No, Blink doesn't include V8, it's a separate project. WebKit consists of WebCore — layout engine, and JavaScriptCore — JavaScript engine. Google forked WebCore part of WebKit to create Blink. Before the fork it used a combination of WebCore and V8.

This information is readily available on, e.g. Wikipedia, so I'm not sure why you even try to argue about it.

Node.js doesn't include Blink, it only includes V8. Node.js Compiler doesn't include Blink into the build result — it includes Node.js.