53 ms·
Node.js 0.2.0 released
- kennu 16y agoFinally, a (hopefully) frozen API for 0.2.x! I hope Ubuntu 10.10 Maverick gets a stable 0.2.x version of Node.
- jdub 16y agoIf you want to keep track of hot, fresh node-y goodness independently of the Ubuntu release cycle (as I do), then please enjoy my nodejs PPA builds. They're built for lucid, but run fine on maverick, and like everything else in that PPA, are used in production (thus I have an incentive to maintain them well). https://launchpad.net/~jdub/+archive/ppa Enjoy! (Note: I build a static version of node built against the internal copy of libraries it ships, rather than the dynamic build used by the main Debian and Ubuntu node packages. I really only do this to avoid maintaining those libraries in my PPA as well, and ryah keeps up with their updates anyway.)
- fortes 16y agoThanks for doing this. Any idea if they'll ever make it into the official reps? I've avoided installing much from PPA (never sure about security / stability there), but this may break my habit.
- deleted 16y ago[deleted]
- pornel 16y agoSo the API with ASCII as the default encoding is frozen :(
- simonw 16y agoI got the impression that was a performance trade-off. UTF-8 decoding/encoding isn't free.
- morphir 16y agolet's see.. ascii is 4 bit. UTF8 is 8 bit. Is this really an issue on todays computers?
- mhansen 16y agoASCII is 7-bit (encoded in 8 bits - the high bit is ignored) and UTF-8 takes 8 bits for most characters, but can take 16+ bits for some characters. Node is built for massive scalability on applications that (mostly) pass text from one source to another. Thus, having to convert the encoding of every string that passes through node can be a bottlenck. Felixge has a good writeup of this: http://debuggable.com/posts/streaming-utf-8-with-node-js:4bf28e8b-a290-432f-a222-11c1cbdd56cb http://debuggable.com/posts/streaming-utf-8-with-node-js:4bf...
- pmjordan 16y agoUTF-8 takes 8 bits for most characters It should be noted that "most" here presumably means "most characters in an average English or western/central European language text" as out of the ~2^21 (~2 million) Unicode code points, only 128 are represented using 8 bits in UTF-8.
- pornel 16y agoIt doesn't matter. Whenever ASCII is an option, UTF-8 is optimal too. ASCII is not an option for languages other than average English with poor typography and inability to deal with foreign names and addresses (e.g. LinkedIn made horrible mistake of using Latin1 initially. I still have contacts with &xxxx; visible in their names). I think node.js should use UTF-8 by default, and require users to consciously switch bottleneck parts of their apps to ASCII.
- pmjordan 16y agoI wasn't stating my opinion in my last post, just facts/clarifications. But yes, I agree that UTF-8 would be a better default than ASCII unless someone provides hard evidence that encoding/decoding is a severe performance bottleneck in most real applications. (even then, I'd default to the "correct", not the fastest)
- grantj 16y agoWhich part of the API has ASCII as the default encoding? From the v0.2.0 docs it seems like Buffer objects default to utf8.
- pornel 16y agoRequest, response and streams default to ASCII, e.g. response.write(chunk, encoding='ascii')
- grantj 16y agoThat should really be in big red text in the docs considering it actually destroys bits. The api also seems inconsistent wrt net.Stream writes are encoded in ASCII but plain writable streams default to utf8: stream.write(string, encoding='utf8', [fd])
- ryah 16y agodocs are wrong, it defaults to utf8
- chopsueyar 16y agoWhat types of projects have you used node.js with?
- spahl 16y agoA lot of projects where I would have used python twisted (http://twistedmatrix.com http://twistedmatrix.com) in the past, I now use node.js. It's all projects where I need to connect different protocols together. Like amqp & websockets for example.
- tomggb 16y agoNothing like a big release days before Node Knockout! I can't wait, either way.