Re:Node v9.4.0
by rf15 on Wednesday January 10, 2018 @11:42AM
(#16116428)
I'm always impressed by some of the optimisations they find: 0aa403b649 improves readDouble/readFloat in buffers by 200-800% simply by...moving the code to plain javascript binary operations instead of the C++ runtime.
Re:Node v9.4.0
by koolba on Wednesday January 10, 2018 @12:11PM
(#16116691)
You can run any Linux binary you'd like if you bundle it yourself. Just use the built-in node runtime as a shim to run your process. It doesn't have to be newer node version Node either ... you can use it to run any standalone executable.
Re:Node v9.4.0
by appdrag on Wednesday January 10, 2018 @12:22PM
(#16116829)
So this mean having a multi megabytes zip for the function instead of 1kb with a native runtime, this also affect cold start loading time of the lambda function ...
Re:Node v9.4.0
by Shoothe on Wednesday January 10, 2018 @01:39PM
(#16117603)
Does this really affect the cold start? Even if you use the native runtime it still is running in a separate container and you need to start the node process anyway. (Honest question, didn't measure it).
Re:Node v9.4.0
by k__ on Wednesday January 10, 2018 @04:02PM
(#16119038)
True.
I read that someone builds a Reason/OCaml library with Node.js like API that compiles to native binaries, but uses OCaml standard libary functions in the background, which could probably get much smaller than Node.js.
Re:Node v9.4.0
by johnsonjo on Wednesday January 10, 2018 @02:19PM
(#16117985)
I'm still awaiting async iterables [1] in Node.js. It's not part of ECMAScript yet, but I'm still excited for it. Chrome 63 and v8 6.3 enables async iterables, but this Node.js version (v9.4) uses v8 6.2 so no async iterables yet. Does anyone know whether a version of Node sticks with the same version of v8 throughout? So, is there any chance that a node version 9 will have v8 greater than 6.2?
Re:Node v9.4.0
by WorldMaker on Wednesday January 10, 2018 @03:40PM
(#16118850)
I believe that Node has been treating v8 upgrades as semver major breaking changes as it changes the ABI for native extensions, even though there are enough mitigating tools these days that most native extensions don't break on v8 upgrades.
Re:Node v9.4.0
by vijaybritto on Wednesday January 10, 2018 @12:24PM
(#16116854)
I hope they release a cross platform installation script or binary that can manage multiple versions like nvm(doesn't work on windows). Hmm, since I'm learning Go now this might be a good exercise.
Nobody really cares if your 1 call is 20x slower though. Much better to make it 2x faster when there's 100 calls
[1] https://cloud.google.com/functions/docs/concepts/exec
The size would definitely be affected.
I read that someone builds a Reason/OCaml library with Node.js like API that compiles to native binaries, but uses OCaml standard libary functions in the background, which could probably get much smaller than Node.js.
[1]: https://github.com/tc39/proposal-async-iteration
https://chocolatey.org/
Maybe it's just me, but every upgrade corrupts the global node_modules.
You could try using something like nvm which has a command to migrate your old global modules.
nvm install node --reinstall-packages-from=node
https://github.com/tj/n/pull/475/files
I guess nvm is better, needs some polishing, though (error prone for scripted usage, because of unpredictable exit > 0 behavior.
https://github.com/creationix/nvm
or maybe WebWorker Threads for API compatible framework: https://www.npmjs.com/package/webworker-threads