Re: [nodejs] How to start with node.js ?

2012-10-29 Thread Mayur
Thank you all for giving your suggestions..!! On Thursday, October 4, 2012 1:58:41 PM UTC+5:30, Diogo Resende wrote: If you're a bit familiar with js in general, I would advise you to read the documentation pages. It's not that big and you'll get a picture of what you can do with the core.

Re: [nodejs] announce node-httpp - run HTTP over UDP(HTTPP) with Node.js

2012-10-29 Thread tom
Making HTTPP as module or rewrite it in pure JS is a plan. Best regards tom On Sunday, October 28, 2012 1:00:42 AM UTC+8, Nathan Rajlich wrote: Sounds pretty cool. How come you did it as a fork of node rather than an external module? On Sat, Oct 27, 2012 at 5:45 AM, tom

Re: [nodejs] announce node-httpp - run HTTP over UDP(HTTPP) with Node.js

2012-10-29 Thread Dean Mao
hopefully it's a big plan then... I don't think i'm going to recompile node just to try this out :-P On Mon, Oct 29, 2012 at 1:03 AM, tom zs68j...@gmail.com wrote: Making HTTPP as module or rewrite it in pure JS is a plan. Best regards tom On Sunday, October 28, 2012 1:00:42 AM UTC+8,

Re: [nodejs] Abort Trap 6

2012-10-29 Thread Karl Böhlmark
I haven't yet researched this further however I'd like to add that I think this started happening when I added file watcher functionality, so that adds to the suspicion that it is a bug in fs.watch/watchFile. I'll get a backtrace. On Wednesday, October 24, 2012 4:31:37 PM UTC+2, Ben Noordhuis

Re: [nodejs] Re: Sample code to add basic authentication to node http server

2012-10-29 Thread Dan Milon
Express middlewares are called in the order you define them. The static middleware will call the next middleware only if it failed serving the static resource. You need basicAuth before static. danmilon. On 10/29/2012 12:41 AM, gng wrote: Hi all, Sorry to appear dumb about this, but no

Re: [nodejs] Abort Trap 6

2012-10-29 Thread Ben Noordhuis
On Mon, Oct 29, 2012 at 10:33 AM, Karl Böhlmark karl.bohlm...@gmail.com wrote: I haven't yet researched this further however I'd like to add that I think this started happening when I added file watcher functionality, so that adds to the suspicion that it is a bug in fs.watch/watchFile. I'll

Re: [nodejs] Pass an int to a node.js addon

2012-10-29 Thread Ben Noordhuis
On Sun, Oct 28, 2012 at 4:52 AM, NodeNinja aeon6f...@gmail.com wrote: Ben, Thanks for the code snippet is an array of pointers also created in the same style? Depends on what you mean by 'pointer'. JS the language doesn't have a concept of pointers. V8 lets you store pointers with

Re: [nodejs] Writing 500kb of JSON

2012-10-29 Thread Ben Noordhuis
On Sun, Oct 28, 2012 at 4:02 AM, P. Douglas Reeder reeder...@gmail.com wrote: One of the things my app needs to do is write a large JSON file to disk. Currently, it's implemented naively: writeStream = fs.createWriteStream(process.cwd() + /staticRoot/album.json, {encoding: utf8});

Re: [nodejs] ArrayBuffer / Buffer Objects in C++ Addons

2012-10-29 Thread Ben Noordhuis
On Sat, Oct 27, 2012 at 9:55 PM, Henri Tuhola henri.tuh...@gmail.com wrote: I'd need to pass some binary data out of an addon, but node.js addon documentation doesn't seem to cover it. This is what I'm working on: https://github.com/cheery/node-video node-video needs the buffer objects to

Re: [nodejs] Re: build a node addon on windows for linux

2012-10-29 Thread Ben Noordhuis
On Mon, Oct 29, 2012 at 4:30 AM, NodeNinja aeon6f...@gmail.com wrote: On Sunday, October 28, 2012 11:07:48 PM UTC+5:30, mscdex wrote: On Oct 28, 1:15 pm, NodeNinja aeon6f...@gmail.com wrote: and was wondering if there was anyway to target multiple platforms? Sure, you can target multiple

Re: [nodejs] Re: An idea how to probably improve Date.now() (new Date, etc.) speed.

2012-10-29 Thread Ben Noordhuis
On Mon, Oct 29, 2012 at 6:15 AM, Alexey Kupershtokh alexey.kupersht...@gmail.com wrote: I've found an extreme solution: I upgraded ubuntu from Ubuntu 12.04.1 LTS \n \l; Linux wnote 3.2.0-33-generic-pae #52-Ubuntu SMP Thu Oct 18 16:39:21 UTC 2012 i686 i686 i386 GNU/Linux to Ubuntu 12.10 \n

Re: [nodejs] Re: failing to get decent profiles with prof_lazy and profiler module

2012-10-29 Thread Ben Noordhuis
On Sat, Oct 27, 2012 at 4:23 AM, Andrew Spyker awspy...@gmail.com wrote: Attached is a third zip of logs based on both patches (and using --log). I assume the logs help you validate which ticks are coming back as unresolved. The second patch doesn't seem to help much more than the first.

Re: [nodejs] Abort Trap 6

2012-10-29 Thread Dean Mao
That isn't necessarily true. I got those Trap Abort exceptions for my own native extension module only when I used the fs module. There's probably something in the fs module that causes bugs like these to pop up more, but when I fixed my bug properly, using fs did not cause any issues. My guess

Re: [nodejs] Server-to-Server Communication

2012-10-29 Thread Tim Caswell
Internally at cloud9, we use the smith protocol. It's based on the same idea of dnode, but has restricted abilities so that it can be leak-proof using normal javascript (dnode requires --harmony to prevent leaks) and very fast. We usually use the protocol over msgpack + tcp between servers (or

Re: [nodejs] Re: An idea how to probably improve Date.now() (new Date, etc.) speed.

2012-10-29 Thread Alexey Kupershtokh
Did you mean command strace -c -e gettimeofday,clock_gettime node 3.js ? Old (on a more powerful desktop pc): PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 13220 wicked20 0 2104 508 428 S 66 0.0 7:46.70 strace 13221 wicked20 0

Re: [nodejs] announce node-httpp - run HTTP over UDP(HTTPP) with Node.js

2012-10-29 Thread Nathan Rajlich
Tom, it is do-able (albeit undocumented) to hook into *which* stream the Node http module uses. See my node-icecast Client class[0] for an example. You should be able to return one of your udt streams in the createConnection function and then the core http module would use that. This way you can

Re: [nodejs] Server-to-Server Communication

2012-10-29 Thread Adam Crabtree
We use Schoon's Shuttle at RedRobot, and it's been working out perfectly as a drop-in replacement for hook.io with dramatic performance increases. It uses msgpack and 0mq. Definitely check it out if you're wanting to go the 0mq route. Otherwise, Engine.io looks promising, though I've never used

[nodejs] Re: Binding to IPv4/IPv6

2012-10-29 Thread Trevor Norris
Just deployed the '::' on an EC2 instance; which doesn't have access to the world via IPv6. The service responded normally. So I would say that on machines that support IPv6, '::' is a better solution than '0.0.0.0'. What does anyone else think? On Saturday, October 27, 2012 2:59:41 PM UTC-7,

[nodejs] Any way of determining what ./configure options were used for a particular node binary?

2012-10-29 Thread Mike
Given a node binary, any easy way of determining what options were passed to ./configure when the binary was built? Background: I just cross compiled node.js (v0.8.14) for the Raspberry Pi and was surprised to find the binary was 5X larger (after being stripped). I just wondering about the size

Re: [nodejs] Any way of determining what ./configure options were used for a particular node binary?

2012-10-29 Thread Ben Noordhuis
On Mon, Oct 29, 2012 at 7:21 PM, Mike mike.hatal...@gmail.com wrote: Given a node binary, any easy way of determining what options were passed to ./configure when the binary was built? Yes, for certain values of 'easy'. $ node -pe process.config { target_defaults: { cflags: [],

Re: [nodejs] Any way of determining what ./configure options were used for a particular node binary?

2012-10-29 Thread Nathan Rajlich
If you mean 5mb larger than the one in the Raspbian repository then I'd guess it's cause they're linking to a shared OpenSSL and zlib (maybe even V8), whereas when you compile it manually those get statically linked to the node binary (resulting in a larger size due to the additional symbols). On

[nodejs] [ANN] passbookster: An iOS passbook generation library

2012-10-29 Thread Dan Milon
I'd like to announce Passbookster. Passbookster allows you to create iOS passbook passes. It provides both a stream and callback API. Great care has been taken on performance. Node crypto module does not currently support PKCS#7 signing, so openssl is spawned internally, but a PR to add this

Re: [nodejs] Re: failing to get decent profiles with prof_lazy and profiler module

2012-10-29 Thread Andrew Spyker
Ben, Thanks for driving this. To likely confirm what you already know, I did the following and it worked. I profiled without lazy start (--prof) and put a call to new Date().toGMTString() right where I would have called profiler.resume(). I did this knowing that toGMTString isn't called at

Re: [nodejs] How to start with node.js ?

2012-10-29 Thread Yoshihiro Kikuchi
I'd recommend two ebooks for you. One is 'Smashing Node.js', which is the best (I think) book for beginners. This book covers wide area in Node. The other is 'Node.js in Action' if you want to use Express framework to develop web applications. This book has not released yet but you can get

Re: [nodejs] announce node-httpp - run HTTP over UDP(HTTPP) with Node.js

2012-10-29 Thread tom
I will distribute the binary release for easy usage in short term. best regards Tom On Monday, October 29, 2012 4:19:41 PM UTC+8, Dean Mao wrote: hopefully it's a big plan then... I don't think i'm going to recompile node just to try this out :-P On Mon, Oct 29, 2012 at 1:03 AM, tom

Re: [nodejs] announce node-httpp - run HTTP over UDP(HTTPP) with Node.js

2012-10-29 Thread Nathan Rajlich
Dude, -1. Nobody wants an unnecessary fork of node. Extract the code so it can be used as a proper external module and I guarantee you'll get more adoption. On Mon, Oct 29, 2012 at 4:45 PM, tom zs68j...@gmail.com wrote: I will distribute the binary release for easy usage in short term. best

[nodejs] Observable Properties

2012-10-29 Thread Azer Koçulu
Hi All, I've created a new JS library for defining properties that can be subscribed for updates and can interact with eachother. Check it here; https://github.com/azer/ak47 Readme contains many examples. Here is another one: var user = ak47({ name: 'joe', 'birthdate': 21 }); user.name()

Re: [nodejs] Re: build a node addon on windows for linux

2012-10-29 Thread NodeNinja
No. You need to run the node-gyp configure/build cycle once for each platform that you target. Here is how you approximately would script that on a UNIX system: That was great news Ben, Since I am doing this on a Windows system What cross compiler would you recommend to target