[nodejs] Re: tokenize and parse sql where clause

2012-07-06 Thread tjholowaychuk
do you need to produce an ast? or just scan? this is typically the sort of pattern I use for lexers: https://gist.github.com/3058777 simplified as far as errors go etc of course On Jul 5, 6:27 pm, Alex wrote: > Good to know about Peg.js.  Overkill for what I needed here, but definitely > looks l

[nodejs] Re: Parallel Async Calls and Parallel Errors

2012-07-06 Thread Mariusz Nowak
You definitely should report with one error object, and you won't find function in Node.js API that returns more than one error. Most straightforward way would be to fail your function as soon as first error occurs, and report with that error. However if you'd like to have more complete solutio

[nodejs] Re: XML DOM Libraries

2012-07-06 Thread Mariusz Nowak
+1 All other language environments have neat XML DOM implementations, and Node.js still hasn't, I also strongly miss that. xmldom looks interesting. If you'll find any other good solutions let us know. On Friday, July 6, 2012 12:17:24 AM UTC+2, Alan Gutierrez wrote: > > I'd like to parse XM

[nodejs] Re: XML DOM Libraries

2012-07-06 Thread Mariusz Nowak
Other thing you may check is https://github.com/tmpvar/jsdom it's very popular but unfortunately it's not pure JavaScript. On Friday, July 6, 2012 12:17:24 AM UTC+2, Alan Gutierrez wrote: > > I'd like to parse XML and manipulate it on the server using W3C XML DOM, > so that > the code can be sh

[nodejs] nodejs.tchol.org YUM repo out of date?

2012-07-06 Thread Jules
The recommended pre-built package for CentOS (according to nodejs.org) is http://nodejs.tchol.org/ But these appear stuck on v0.6. Their mailing lists don't mention any upcoming upgrades Any ideas if this will happen, or when, or if there is a better repo that CentOS / RHEL/ AMZN users should

Re: [nodejs] node v0.8.1 - higher memory consumption?

2012-07-06 Thread chusi
Ok, i waited till ps showed around 50MB (still out-of-the box compiled node 0.8.1 without arguments) USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND nodejs 12655 0.0 2.4 731204 50528 pts/0Sl+ Jul05 0:13 node /opt/turntable/bin/hook_luncher.js --hook stats at

Re: [nodejs] nodejs.tchol.org YUM repo out of date?

2012-07-06 Thread Marak Squires
I'm pretty sure all Linux package managers automatically push 0-day updates for node the second a new version of node is released. Or maybe you have to compile from source. I always forget. On Fri, Jul 6, 2012 at 3:13 AM, Jules wrote: > The recommended pre-built package for CentOS (according t

Re: [nodejs] node v0.8.1 - higher memory consumption?

2012-07-06 Thread Vyacheslav Egorov
Yeah this does look like a fragmentation/lazyness issue. Heap has only 8MB of live data, but keeps 50mb reserved for old pointer space alone. This does not look bright. First thing I would recommend is to try and roll V8 forward for your build of node from 3.11.10.12 to 3.11.10.13 and remeasure.

[nodejs] Re: nodejs.tchol.org YUM repo out of date?

2012-07-06 Thread mscdex
On Jul 6, 6:13 am, Jules wrote: > Any ideas if this will happen, or when, or if there is a better repo that > CentOS / RHEL/ AMZN users should be using? FWIW on my CentOS machines I just build and install from source, it's simple, easy, and I always get the latest version that way. -- Job Board

[nodejs] createReadStream and readDir

2012-07-06 Thread Julian Gruber
Is it possible to create a readStream from readDir? I tried createReadStream('.') but directories are not supported there. Generally, is it possible to build on streams completely for control flow, having as few callbacks as possible? -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] createReadStream and readDir

2012-07-06 Thread Ben Noordhuis
On Fri, Jul 6, 2012 at 2:28 PM, Julian Gruber wrote: > Is it possible to create a readStream from readDir? I tried > createReadStream('.') but directories are not supported there. > > Generally, is it possible to build on streams completely for control flow, > having as few callbacks as possible?

Re: [nodejs] createReadStream and readDir

2012-07-06 Thread José F . Romaniello
I think this might work for you: https://github.com/isaacs/fstream/ El viernes, 6 de julio de 2012, Julian Gruber escribió: > Is it possible to create a readStream from readDir? I tried > createReadStream('.') but directories are not supported there. > > Generally, is it possible to build on stre

Re: [nodejs] createReadStream and readDir

2012-07-06 Thread José F . Romaniello
Yes, i think Fstream emits an Entry event per each file with the stat and also each Entry is an stream of the file El viernes, 6 de julio de 2012, Ben Noordhuis escribió: > On Fri, Jul 6, 2012 at 2:28 PM, Julian Gruber > > wrote: > > Is it possible to create a readStream from readDir? I tried > >

Re: [nodejs] Can node server handle large multiple users sending huge data simultaneously

2012-07-06 Thread Ket
Thanks, much appreciated. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegrou

Re: [nodejs] createReadStream and readDir

2012-07-06 Thread Julian Gruber
Are record oriented streams against node-stream's philosophy? On Friday, July 6, 2012 2:52:05 PM UTC+2, Ben Noordhuis wrote: > > On Fri, Jul 6, 2012 at 2:28 PM, Julian Gruber > wrote: > > Is it possible to create a readStream from readDir? I tried > > createReadStream('.') but directories are

Re: [nodejs] createReadStream and readDir

2012-07-06 Thread Julian Gruber
Thanks, that looks perfect! On Friday, July 6, 2012 2:55:26 PM UTC+2, José F. Romaniello wrote: > > Yes, i think Fstream emits an Entry event per each file with the stat and > also each Entry is an stream of the file > > El viernes, 6 de julio de 2012, Ben Noordhuis escribió: > >> On Fri, Jul 6,

[nodejs] Is there an Apache module for connecting node.js similar to mod_jk?

2012-07-06 Thread Andrew Leer
When connecting Apache Tomcat web-apps to an existing Apache website, mod_jk can be loaded to give a web application a virtual directory within Apache. (also here: http://bit.ly/Ma3ZlV) Are there any similar modules for connecting node.js to Apache? -- Job Board: http://jobs.nodejs.org/ P

[nodejs] Re: Node.js - Rate limit exceeded when consuming friends/ids

2012-07-06 Thread Brandon Benvie
I think maybe you should stop consuming friends and take a good hard look at what horrific things you've been doing. Cannibalism is frowned upon, much more so when it's your own tribe. > > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-Lis

Re: [nodejs] createReadStream and readDir

2012-07-06 Thread Tim Caswell
I implemented a streaming readdir for vfs that stats each file and streams data events with objects as values. I use this encoder to convert the object events to json bytes. Also this stream supports pause and resume so that it can be piped with proper backpressure. https://github.com/c9/vfs/blo

[nodejs] Segmentation fault

2012-07-06 Thread jdeighan
I'm getting a segmentation fault trying to "make" Node v0.8.1 from source. OS is Slackware linux 13.37. I simply downloaded the tar.gz file, expanded it, cd'd to the node directory, ran ./configure, then make as instructed in the book "Hands-on Node.js". I used 'su' to become root and did all this

Re: [nodejs] Segmentation fault

2012-07-06 Thread Ben Noordhuis
On Fri, Jul 6, 2012 at 6:06 PM, jdeighan wrote: > I'm getting a segmentation fault trying to "make" Node v0.8.1 from > source. OS is Slackware linux 13.37. I simply downloaded the tar.gz > file, expanded it, cd'd to the node directory, ran ./configure, then > make as instructed in the book "Hands-

Re: [nodejs] Segmentation fault

2012-07-06 Thread John Deighan
I would be glad to, but I don't know how to retrieve it (I just downloaded what I used from nodejs.org/dist). If you can send me command lines to use to retrieve the HEAD code, I'll give it a try, and post the results to Google Groups so others know the solution. On 7/6/2012 12:16 PM, Ben Noor

Re: [nodejs] Segmentation fault

2012-07-06 Thread Ryan Schmidt
On Jul 6, 2012, at 11:29, John Deighan wrote: > I would be glad to, but I don't know how to retrieve it (I just downloaded > what I used from nodejs.org/dist). If you can send me command lines to use to > retrieve the HEAD code, I'll give it a try, and post the results to Google > Groups so oth

[nodejs] Re: MMO game node balancing multi servers

2012-07-06 Thread Peter Holdsworth
I am developing a poker server to support circa 100,000 concurrent players using node.js socket.io and redis. My node servers are split between multiple front-end socket servers and multiple back-end game servers. Game servers support pools of poker tables. When a player is playing at a table, me

[nodejs] node 0.8.1 - EADDRINUSE on unix sockets

2012-07-06 Thread AJ ONeal
0.8.1 leaves stale sockets behind on exit and refuses to reconnect to them on startup. Is this a bugfix or a bug? AJ ONeal -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are sub

Re: [nodejs] best practice for defining an interface

2012-07-06 Thread Jeff Barczewski
A friend of mine, Ken Sipe, once said (regarding statically typed languages and compile-time error checking) that compiling is very much like running an initial set of tests (that the compiler created instead of the developer). Taking that idea one step forward, it is certainly good to create a

Re: [nodejs] Re: So I built a node module. Now what?

2012-07-06 Thread Jeff Barczewski
@sahal could you provide some sugar for this, so it is easier to do? It is becoming more and more common to write node modules that are also wrapped in functions (for AMD or browser support), so it would be great if this were easier to access. On Saturday, 30 June 2012 05:07:52 UTC-5, sahal w

Re: [nodejs] Re: nodeconf videos?

2012-07-06 Thread Mikeal Rogers
We spent a lot more time and money on the videos this year. It will take some time to edit them but they will go up. One problem we had was that the HDMI capture device totally shit the bed. This means that for the "live coding" portions of videos we're going to have to make a rough cut, send i

Re: [nodejs] best practice for defining an interface

2012-07-06 Thread José F . Romaniello
I have seen a lot of tests in node packages like these here: https://github.com/flatiron/winston/blob/master/test/winston-test.js#L24 assert.isObject, assert.isFunction, etc I see this as a common practice and i think it is a way to define an interface close to what a compiler in an static langu

Re: [nodejs] Re: nodeconf videos?

2012-07-06 Thread Duncan Gmail
Looking forward to it. mrdnk On 6 Jul 2012, at 19:06, Mikeal Rogers wrote: > We spent a lot more time and money on the videos this year. It will take some > time to edit them but they will go up. > > One problem we had was that the HDMI capture device totally shit the bed. > This means that

Re: [nodejs] best practice for defining an interface

2012-07-06 Thread Jeff Barczewski
Sure, how you test is a big part of making it useful. It really depends on what you are testing or how complicated it is, but rather than simply testing whether properties exist as a type, you might test functionality in use. For instance, with a stream, the stream tests would actually test al

[nodejs] stream.pause with tcp

2012-07-06 Thread Dan Milon
Hello, I have a node tcp service that accepts json messages (custom protocol) and does some async operations with these data (db queries) My problem is that the clients may send in messages too fast, that i cant consume them at that rate. Ideally, i should be able to ask the clients to lower

Re: [nodejs] node 0.8.1 - EADDRINUSE on unix sockets

2012-07-06 Thread Dan Shaw
This is a know issue and has been closed as won't fix: https://github.com/joyent/node/issues/3540 Workaround: https://gist.github.com/9f93cdcd3a77b9142e51 We've deployed this change at Voxer. Daniel Shaw @dshaw On Fri, Jul 6, 2012 at 10:17 AM, AJ ONeal wrote: > 0.8.1 leaves stale sockets behi

[nodejs] Re: Parallel Async Calls and Parallel Errors

2012-07-06 Thread Bruno Jouhier
+1 The callback should always be invoked exactly once. So either you call it when you get the first error, or you call it at the end with an error object that encapsulates all the errors. Whether you want to stop at the first error, or gather all of them is another story. In most cases, your f

Re: [nodejs] node v0.8.1 - higher memory consumption?

2012-07-06 Thread chusi
yes, you were right. i the update and now it looks much better! thanks for your help! On Friday, July 6, 2012 1:05:36 PM UTC+2, Vyacheslav Egorov wrote: > > Yeah this does look like a fragmentation/lazyness issue. > > Heap has only 8MB of live data, but keeps 50mb reserved for old > pointer spac

[nodejs] Re: stream.pause with tcp

2012-07-06 Thread mscdex
On Jul 6, 2:46 pm, Dan Milon wrote: > I was thinking of using stream.pause on the connections, but i am not > sure how this works internally. Does it just buffer the data in memory, > or using some tcp protocol pause? AFAIK only the http/https modules will internally buffer any data that makes it

[nodejs] [ANN] keypress: Make any Node ReadableStream emit "keypress" events

2012-07-06 Thread Nathan Rajlich
I've been noticing a lot of people upset about the fact that the semantics of the undocumented "keypress" event had changed in node v0.8.x. The solution: the "keypress" module[0] up on npm. This module acts as backwards-compatible polyfill, while offering to be the "official" module to use for you

[nodejs] dnode with express

2012-07-06 Thread Mark Volkmann
I have an example of using dnode with express that worked about nine months ago, but doesn't seem to work now. Here's the server part. I think the part that changed is the last line where is hook up the dnode server to the express server. Is there a new way to do that now? var dnode = require('dno

[nodejs] Re: best practice for defining an interface

2012-07-06 Thread Alexey Petrushin
Write executable specification is a good option. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send ema

[nodejs] Node x64 on Windows -- any advantages?

2012-07-06 Thread Glenn Scott
I see there's an x64 Node executable built for Windows: http://nodejs.org/dist/v0.8.1/x64/node-v0.8.1-x64.msi Are there any advantages to running that x64 build if you're just running fairly vanilla web apps? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joy

Re: [nodejs] Re: best practice for defining an interface

2012-07-06 Thread Dominic Tarr
interfaces are really only a tiny aspect of code correctness. especially in evented programming, it's often essential that say, a function callsback eventually, and only once. for a Stream, or a more generic event emitter, it may be necessary to assert that things happen in a particular order. I'm

[nodejs] Re: Node x64 on Windows -- any advantages?

2012-07-06 Thread Domenic Denicola
FWIW All the native modules I've tried fail to compile when using x64, so there's that as a *dis*advantage. On Saturday, July 7, 2012 12:53:49 AM UTC-4, Glenn Scott wrote: > > I see there's an x64 Node executable built for Windows: > http://nodejs.org/dist/v0.8.1/x64/node-v0.8.1-x64.msi > > A