Node.js v0.8.0 [stable] is out
51–60 of 60 posts
Re: Node.js v0.8.0 [stable] is out
#52Earlier quoted context omitted.
The node.js buildpack has good instructions for how to upgrade it yourself if needed: https://github.com/heroku/heroku-buildpack-nodejs (and the buildpack docs are now public since Heroku's Cedar stack became the official default)
I meant when will they update it so that you can use the new version of Node without hacking the buildpack. >To change the vendored binaries for Node.js, NPM, and SCons, use the helper scripts in the support/ subdirectory. You'll need an S3-enabled AWS account and a bucket to store your binaries in. I don't want to mess with that, I'd rather wait for Heroku to update so I can change one line in my package.json.
Re: Node.js v0.8.0 [stable] is out
#53Does anybody know which optimization was added to V8 to improve the throughput by so much?
String (unicode) benchmark throughput was definitely greatly affected by improvements in string handling (both internal operations and writing then out of V8 heap through the API; V8 also reintroduced string slices to avoid copying of characters for long substrings).
Other notable things on the compiler front: V8 has switched to a new counting profiler from statistical one, and now makes slightly different optimization decisions. There were improvements in functions inlining (including inlining of constructors). There was some cleanup in invocation sequences for functions and we enabled type feedback for function calls through local variables on x64 (which opened the door to all optimizations that were dormant at such callsites: e.g. inlining or direct calls).
Other notable things in the runtime: new GC has landed and was tweaked for quite some time. Unboxing of double arrays and tracking of smi-arrays (should not affect node.js though).
I think the only way to see which changes in V8 resulted in throughput boosts is to get per-V8-revision measurements.
Re: Node.js v0.8.0 [stable] is out
#54This looks incredible. Congrats to node core on this milestone! I really appreciate how laser-focused you guys are on code consistency across the board. Looking forward to trying out the cluster and domain modules in strata!
The domain module looks fantastic: http://nodejs.org/api/domain.html "Domains provide a way to handle multiple different IO operations as a single group. If any of the event emitters or callbacks registered to a domain emit an error event, or throw an error, then the domain object will be notified, rather than losing the context of the error in the process.on('uncaughtException') handler, or causing the program to ex…
After scanning the rest of the docs I get the impression that domains are weak containers for resource cleanup (not just IO), paired with an error handling context.
Re: Node.js v0.8.0 [stable] is out
#55"Aleph is a Clojure framework for asynchronous communication, built on top of Netty and Lamina."
Re: Node.js v0.8.0 [stable] is out
#56Re: Node.js v0.8.0 [stable] is out
#57Re: Node.js v0.8.0 [stable] is out
#58Congrats on the release! I'd love to take this opportunity to dive into Node, but I have yet to stumble accross an effective way of organizing medium to large Node projects. What tools do you guys/gals use?
Node is still young, and for its primary use case (multiuser/messaging-oriented apps) it seems like the actual LoC stays pretty low. However, here are some things I've picked up in my studies that seemed to make sense to me as an Express user. Keep in mind I'm still a relative nodenoob, so take this with a grain of salt..
- Keep the actual 'route code' (i.e., code that handles your end points) in a folder, named by the function: i.e., routes/login.js
- The overall route map (i.e., app.get()) lives in the main app.js file or routes/index.js
- Use underscore.js where possible; this raises the cognitive level of your code and its become a 'standard part' of Javascript to some degree. Unfortunately the Node repl treats _ as a special value, so you can't really test with it there. Kinda sucks..
- Use config.js to contain database settings, default port, middleware settings, etc.
- Develop the more complicated parts of your code in libs/. Think of them as open source components; keep them generic and disconnected from your app itself. This increases reusability (obviously) and testability. I think it creates better code overall. Some people even npm the core "hard parts" of their code! This is a really interesting and freeing strategy.
Re: Node.js v0.8.0 [stable] is out
#59If you want to play with this new version but also have code running on older versions that hasn't been completely ported yet, I recommend using nave to manage your node versions. After you `npm install -g nave` you can just `nave install 0.8.0` to get node 0.8 then type `nave use 0.8.0` to start using it! https://github.com/isaacs/nave