[nodejs] Re: [ANN] node-xml-lite

2012-07-11 Thread Henri Gourvest
Le 10/07/2012 19:04, dhruvbird a écrit : Why not utf-8 It support UTF-8, I don't know why you think it doesn't do -- 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

[nodejs] Re: Error linking v8 while cross-compiling for Drobo FS

2012-07-11 Thread mscdex
On Jul 10, 11:24 pm, Jason Schmidt wrote: > Everything seems to build successfully up until the end of v8 Did you try the latest v0.8 branch from the node repo? The latest master branch? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-

[nodejs] Re: v0.8.* make failed under Linux x64

2012-07-11 Thread mscdex
On Jul 10, 11:30 pm, Mindon Feng wrote: > v0.6.19 make & install OK, but not v0.8 What commands did you issue when attempting to build? It should just be a matter of: ./configure && make You may want to perform a `make distclean` first to make sure you have all intermediate files out of the way

Re: [nodejs] New module : VarStream

2012-07-11 Thread Nicolas FROIDURE
Thank you for this suggestion. Do you know a project implementing node Streams from wich i could get inspiration ? I saw this on the official documentation : Stability: 2 - Unstable Will it often change ? Le mercredi 11 juillet 2012 08:19:00 UTC+2, Dominic a écrit : > > you should adapt this to

Re: [nodejs] New module : VarStream

2012-07-11 Thread Oliver Leics
On Wed, Jul 11, 2012 at 11:10 AM, Nicolas FROIDURE wrote: > Thank you for this suggestion. Do you know a project implementing node > Streams from wich i could get inspiration ? Not a direct answer to your question, but.. https://gist.github.com/2850882 Explains what you need to support .pipe ht

Re: [nodejs] Re: [ANN] node-xml-lite

2012-07-11 Thread Ryan Schmidt
On Jul 11, 2012, at 02:04, Henri Gourvest wrote: > Le 10/07/2012 19:04, dhruvbird a écrit : >> Why not utf-8 > It support UTF-8, I don't know why you think it doesn't do You are currently calling node-xml-lite an "XML ANSI/Unicode SAX parser". The "Unicode" portion of that description is redun

[nodejs] Re: [ANN] node-xml-lite

2012-07-11 Thread Henri Gourvest
I'd just suggest that you explain it as such at the beginning of your read me, and discard the "Unicode", "ANSI" or "ASCII" labels, since that's not what they convey. The first paragraph of your read me should be written to give users an understanding of what your module is for and to clearly d

[nodejs] [ANN] head_body_buffers

2012-07-11 Thread darcy
my first module for node. https://github.com/freedaxin/head_body_buffers Overview When transfer packets in network composed of a fixed length "head" and a variable length "body", the "data" event emitted by node socket probably not a complete packet, but part of several packets. This tool help

[nodejs] any easy way to support WeakMap in node

2012-07-11 Thread Yi Tan
Hi all, We need to use WeakMap ( https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/WeakMap) data structure in our node application. Currently the only way we've found to enable WeakMap is to replace the v8 in node by a custom build v8 with --enable-weakmap switch on. But I'm a

Re: [nodejs] any easy way to support WeakMap in node

2012-07-11 Thread Marak Squires
Would https://github.com/TooTallNate/node-weak help at all? On Wed, Jul 11, 2012 at 3:44 AM, Yi Tan wrote: > Hi all, > > We need to use WeakMap ( > https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/WeakMap) > data structure in our node application. > > Currently the only way w

Re: [nodejs] any easy way to support WeakMap in node

2012-07-11 Thread Arnout Kazemier
harmony functionality (including weak map) is exposed when you start up node with --harmony or more specifically --harmony_collections as flags On Wednesday, July 11, 2012 at 12:45 PM, Marak Squires wrote: > Would https://github.com/TooTallNate/node-weak help at all? > > On Wed, Jul 11, 2012 at

Re: [nodejs] any easy way to support WeakMap in node

2012-07-11 Thread Yi Tan
Thank you! I was wrong, --harmony_collections is a runtime flag, and we can use harmony collection in node now. No need to replace the V8 engine. than you and sorry to bother you guys. Regards, ty 2012/7/11 Arnout Kazemier > harmony functionality (including weak map) is exposed when you s

Re: [nodejs] Re: bus error building nodejs 0.8.2

2012-07-11 Thread Ben Noordhuis
On Wed, Jul 11, 2012 at 7:00 AM, JWagner wrote: > I am having the same issue. > mac osx 10.5.8 gcc 4.0.2 > I tried > ./configure --without-snapshot > make CFLAGS+=-O0 CXXFLAGS+=-O0 > make install// failed with 'make: *** [install] Bus error' Do you have the possibility to upgrade your

Re: [nodejs] Error linking v8 while cross-compiling for Drobo FS

2012-07-11 Thread Ben Noordhuis
On Wed, Jul 11, 2012 at 5:24 AM, Jason Schmidt wrote: > I have a 32-bit Ubuntu virtual machine following the instructions from > > http://www.droboports.com/setting-up-a-vm > > Everything seems to build successfully up until the end of v8 > > CXX(target) > /home/zannalov/code/node-v0.8.2/out/Rel

Re: [nodejs] Re: bus error building nodejs 0.8.2

2012-07-11 Thread Ryan Schmidt
On Jul 11, 2012, at 07:20, Ben Noordhuis wrote: > On Wed, Jul 11, 2012 at 7:00 AM, JWagner wrote: >> I am having the same issue. >> mac osx 10.5.8 gcc 4.0.2 >> I tried >> ./configure --without-snapshot >> make CFLAGS+=-O0 CXXFLAGS+=-O0 >> make install// failed with 'make: *** [instal

Re: [nodejs] Re: bus error building nodejs 0.8.2

2012-07-11 Thread Ben Noordhuis
On Wed, Jul 11, 2012 at 3:05 PM, Ryan Schmidt wrote: > > On Jul 11, 2012, at 07:20, Ben Noordhuis wrote: > >> On Wed, Jul 11, 2012 at 7:00 AM, JWagner wrote: >>> I am having the same issue. >>> mac osx 10.5.8 gcc 4.0.2 >>> I tried >>> ./configure --without-snapshot >>> make CFLAGS+=-O0 CXXFLAGS+=

[nodejs] Re: How to count concurrent requests to my server?

2012-07-11 Thread Domenic Denicola
Neither "end" nor "close" are ever emitted. * HttpServerResponse is a WritableStream which does not emit "end" events. * WritableStreams emit "close" events "when the underlying file descriptor has been closed," which doesn't seem applicable. * HttpServerResponses emit "close" events to indicate

Re: [nodejs] Re: How to count concurrent requests to my server?

2012-07-11 Thread Arnout Kazemier
Every server has an internal connections count.. See http://nodejs.org/api/net.html#net_server_connections On Wednesday, July 11, 2012 at 12:48 AM, mscdex wrote: > On Jul 10, 5:25 pm, Domenic Denicola (http://domenicdenicola.com)> > wrote: > > I am trying to create a mini dashboard for my serve

[nodejs] Robust Error Handling

2012-07-11 Thread idleman
Hi, In an asynchronous environment like node.js, can it be hard to handle errors, specially by the asynchronous nature of node.js. Exceptions is good for synchronous programming, but does not fit well into a more complex asynchronous environment. I have come up with a solution, and want your t

Re: [nodejs] Re: How to count concurrent requests to my server?

2012-07-11 Thread Domenic Denicola
Thank you! This is perfect. Still not sure exactly which events would be most accurate (maybe "connection" and the resulting socket's "close"?), but with this in hand I can just check the number of connections in a setInterval, which is good enough. On Wednesday, July 11, 2012 10:19:59 AM UTC-4

[nodejs] If you missed NodeConf check out our massive NodeConf recap!

2012-07-11 Thread NodeUp
isaacs, dshaw, visnup, substack, and mikeal recapped everything that happened at NodeConf on the latest NodeUp. Listen it here: http://www.nodeup.com/twentythree -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You r

Re: [nodejs] Re: Error linking v8 while cross-compiling for Drobo FS

2012-07-11 Thread Jason Schmidt
Thanks for the suggestion. I cloned the node repository and tried both of those branches. The master branch fails with: ../deps/openssl/openssl/crypto/bn/asm/x86_64-gcc.c: In function 'bn_mul_add_words': ../deps/openssl/openssl/crypto/bn/asm/x86_64-gcc.c:117: error: impossible constraint in 'asm'

Re: [nodejs] Error linking v8 while cross-compiling for Drobo FS

2012-07-11 Thread Jason Schmidt
Thanks for the make syntax for setting/adding-to the CC/CXX/CFLAGS variables. This is a lot easier approach than relying on the cross-compile environment variables or symlinking the tools. Unfortunately, the linking step fails at exactly the same place. It's as if it doesn't know where to find the

Re: [nodejs] Error linking v8 while cross-compiling for Drobo FS

2012-07-11 Thread Jason Schmidt
An additional bit of information: I hunted down and captured the exact command being run which is producing the errors. Maybe something is missing from it? flock /home/zannalov/code/node-v0.8.2/out/Release/linker.lock /usr/local/arm-2007q1/bin/arm-none-linux-gnueabi-g++ -pthread -rdynamic -o /hom

[nodejs] Re: How to count concurrent requests to my server?

2012-07-11 Thread mscdex
On Jul 11, 10:15 am, Domenic Denicola wrote: > Neither "end" nor "close" are ever emitted. Ok, then `request.connection.on('close', );` -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message be

Re: [nodejs] How to count concurrent requests to my server?

2012-07-11 Thread Ted Young
just to double check, are you actually calling response.end() in the example you are running? Ted On Jul 11, 2012, at 6:06 PM, mscdex wrote: > On Jul 11, 10:15 am, Domenic Denicola > wrote: >> Neither "end" nor "close" are ever emitted. > > Ok, then `request.connection.on('close', );` >

[nodejs] Compiling JS for Safe vm.runInNewContext()

2012-07-11 Thread Kevin O
We are working on an app where we want to give users the ability to upload JS scripts to process their data in our app. Insane, right? :) Well we are going to do it in a sane way or not do it at all. We understand the risks. I want to take raw JS input from the user, generate an AST, cleanse/

Re: [nodejs] Compiling JS for Safe vm.runInNewContext()

2012-07-11 Thread Angel Java Lopez
I presented a project (idea, no code yet) that needs that feature, too. Game server (as a service?) that accepts logic code from game tenants. Another project needs something like this (it's like https://github.com/ryanb/ruby-warrior/ ) So, thanks for the question, and for any answer! Angel "Jav

Re: [nodejs] Compiling JS for Safe vm.runInNewContext()

2012-07-11 Thread Marcel Laverdet
Look at Google Caja, this does exactly what you describe. It's a very complicated problem. On Wednesday, July 11, 2012, Angel Java Lopez wrote: > I presented a project (idea, no code yet) that needs that feature, too. > > Game server (as a service?) that accepts logic code from game tenants. > An

Re: [nodejs] New module : VarStream

2012-07-11 Thread Dan Bornstein
On Wed, Jul 11, 2012 at 2:10 AM, Nicolas FROIDURE wrote: > Thank you for this suggestion. Do you know a project implementing node > Streams from wich i could get inspiration ? I've been working on a module called pipette , which contains a few straightforwardly

[nodejs] Inherit Versus Pipe

2012-07-11 Thread Alan Gutierrez
When you use spawn, is there any substantial difference between piping the spawned program stdout to the console and inheriting the parents stdout? I know that tty.istty will return false for the stdout of the child. What other behaviors will change? -- Alan Gutierrez - http://twitter.com/bigeasy

Re: [nodejs] Inherit Versus Pipe

2012-07-11 Thread Tim Caswell
If there are errors and the child process crashes, then using child.stderr.pipe(process.stderr, {end:false}) won't always show the stack trace that blew up the child. However, sharing the parent's stderr using customFds will since stderr in the child is then sync. On Wed, Jul 11, 2012 at 1:02 PM,

Re: [nodejs] Compiling JS for Safe vm.runInNewContext()

2012-07-11 Thread Vyacheslav Egorov
Even Caja does not try to deal with infinite loops I think. They only deal (very successfully though) with information/capabilities leaks and related attacks. -- Vyacheslav Egorov On Wed, Jul 11, 2012 at 7:17 PM, Marcel Laverdet wrote: > Look at Google Caja, this does exactly what you describe.

Re: [nodejs] Compiling JS for Safe vm.runInNewContext()

2012-07-11 Thread Kevin O
Thanks for the suggestion. Caja does seem like it's pretty robust but maybe more than I need. Plus, I would have to call out to a service every time I compile or re-implement the whole thing in node to use it. Neither is really an option, unfortunately. On Wednesday, 11 July 2012 13:17:23 UTC-4

Re: [nodejs] Bug with mocha + Step + node.js?

2012-07-11 Thread Tim Caswell
As I responded on github, step catches exceptions and routes them to the next step as an "err" argument. It's your responsibility to check this argument in all steps and handle it. On Tue, Jul 10, 2012 at 4:03 PM, Thijs Vermeir wrote: > Hi, > > I think I run into a bug with mocha, step and node.

[nodejs] Re: Compiling JS for Safe vm.runInNewContext()

2012-07-11 Thread Jeff Barczewski
https://github.com/tjanczuk/haiku-http is an interesting project that tries to provide a restartable/killable sandbox for running your code in node.js This could help in dealing with bad code and even infinite loops. I have not tried to use it yet, but flagged it as something I would look into

[nodejs] Re: Robust Error Handling

2012-07-11 Thread Jeff Barczewski
@idleman, I didn't go through in detail what you have illustrated here or how you plan to implement, but wanted you to maybe backup a step and discuss what your value proposition for this project is beyond what the new Node.js domains brings to the table. Any robust error handling solution nee

Re: [nodejs] Compiling JS for Safe vm.runInNewContext()

2012-07-11 Thread Mark S. Miller
[+google-caja-discuss] On Wed, Jul 11, 2012 at 11:24 AM, Kevin O wrote: > Thanks for the suggestion. Caja does seem like it's pretty robust but > maybe more than I need. Plus, I would have to call out to a service every > time I compile or re-implement the whole thing in node to use it. Neither

Re: [nodejs] Compiling JS for Safe vm.runInNewContext()

2012-07-11 Thread Mark S. Miller
On Wed, Jul 11, 2012 at 12:05 PM, Mark S. Miller wrote: > [+google-caja-discuss] > > On Wed, Jul 11, 2012 at 11:24 AM, Kevin O wrote: > > Thanks for the suggestion. Caja does seem like it's pretty robust but >> maybe more than I need. Plus, I would have to call out to a service every >> time I c

[nodejs] Re: Compiling JS for Safe vm.runInNewContext()

2012-07-11 Thread Jasvir Nagra
Missed the group reply. Hi Kevin, Specifically if you know you're in a ES5-strict mode compliant js engine, like a modern V8 to use this, load caja.js and initialize caja as follows: caja.initialize({ forceES5Mode: true }); caja.load(undefined /* if you don't need a dom */, caja.policy.net.ALL

[nodejs] how to put results of mysql query into an output buffer

2012-07-11 Thread Alex Tian
Hello everyone, I am trying to test nodejs with mysql, I think due to its non-blocking nature. I have a difficult time to add the query result into a output buffer (var output in following code). Can anybody point me some way? Thanks, Alex var mysql = require('db-mysql'); var db = new m

[nodejs] Re: v0.8.* make failed under Linux x64

2012-07-11 Thread Michael Smith
Hi there! So, I'm not Mindon Feng, but I'm running into the same problem. I'm running an antiquated version of SLES with python 2.7.3 compiled from gzipped tarball. Below is the results of my running make distclean followed by ./configure && make. ~/node-v0.8.2 # make distclean rm -rf out rm -

[nodejs] Re: v0.8.* make failed under Linux x64

2012-07-11 Thread Michael Smith
I also had the same problem with 0.7.12. Commands and output are below. ~/node-v0.7.12 # ./configure { 'target_defaults': { 'cflags': [], 'default_configuration': 'Release', 'defines': [], 'include_dirs': [],

Re: [nodejs] Error linking v8 while cross-compiling for Drobo FS

2012-07-11 Thread Ben Noordhuis
On Wed, Jul 11, 2012 at 5:46 PM, Jason Schmidt wrote: > An additional bit of information: I hunted down and captured the exact > command being run which is producing the errors. Maybe something is missing > from it? > > flock /home/zannalov/code/node-v0.8.2/out/Release/linker.lock > /usr/local/arm

Re: [nodejs] Re: v0.8.* make failed under Linux x64

2012-07-11 Thread Ben Noordhuis
On Wed, Jul 11, 2012 at 10:05 PM, Michael Smith wrote: > Hi there! > > So, I'm not Mindon Feng, but I'm running into the same problem. I'm running > an antiquated version of SLES with python 2.7.3 compiled from gzipped > tarball. Below is the results of my running make distclean followed by > ./co

[nodejs] Analytics for node.js

2012-07-11 Thread Gustavo Machado
Hi, Does anyone know of any analytics modules for node.js web servers? More specifically to analyze the traffic on an expressjs application. Thanks, Gus -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received th

Re: [nodejs] Re: v0.8.* make failed under Linux x64

2012-07-11 Thread Michael Smith
Hello again! On Wednesday, July 11, 2012 1:41:11 PM UTC-7, Ben Noordhuis wrote: > > > > That's the whole output? What happens when you edit common.gypi and > set v8_postmortem_support to false? > So I did as you asked and got a somewhat different error. Now it seems to be missing snapshot.cc.

[nodejs] Re: how to put results of mysql query into an output buffer

2012-07-11 Thread Eric S
On Wednesday, July 11, 2012 10:23:55 AM UTC-7, Alex Tian wrote: > > Hello everyone, > > I am trying to test nodejs with mysql, I think due to its non-blocking > nature. I have a difficult time to add the query result into a output > buffer (var output in following code). Can anybody point me s

Re: [nodejs] Re: v0.8.* make failed under Linux x64

2012-07-11 Thread Ben Noordhuis
On Wed, Jul 11, 2012 at 11:08 PM, Michael Smith wrote: > So I did as you asked and got a somewhat different error. Now it seems to be > missing snapshot.cc. (note: this is still 0.8.2) > > ./configure && make > { 'target_defaults': { 'cflags': [], >'default_configuration':

Re: [nodejs] Compiling JS for Safe vm.runInNewContext()

2012-07-11 Thread Marcel Laverdet
"Too robust" is not a thing. This is a problem that is very complex. As mentioned in later replies by the Caja team and others since node is using a very modern version of v8 you can run Caja with minimal translations that are all done in pure-JS. With regards to infinite loops you've got another

Re: [nodejs] Re: v0.8.* make failed under Linux x64

2012-07-11 Thread Michael Smith
On Wednesday, July 11, 2012 2:48:05 PM UTC-7, Ben Noordhuis wrote: > > > > It seems the overarching theme with your machine is that generating > code or post-processing object files somehow doesn't work (both > debug-support.o and snapshot.o are the result of actions that do > that). > > What h

[nodejs] Re: Robust Error Handling

2012-07-11 Thread idleman
Thank you, for your response. There exists a major problem with the current domain module today in my opinion. In a synchronous control flow was try/catch invented for be able to skip for checking for errors everywhere. Instead assume everything went OK and if some error happen, just throw awa

Re: [nodejs] Analytics for node.js

2012-07-11 Thread Nuno Job
Hi Gustavo, Can you explain why google analytics (or such) is not what you are looking for? That would help understand what you are looking to track, Thank you, Nuno On Wed, Jul 11, 2012 at 9:41 PM, Gustavo Machado wrote: > > Thanks, > Gus > -- Job Board: http://jobs.nodejs.org/ Posting guid

Re: [nodejs] Re: v0.8.* make failed under Linux x64

2012-07-11 Thread Ben Noordhuis
On Thu, Jul 12, 2012 at 12:46 AM, Michael Smith wrote: > On Wednesday, July 11, 2012 2:48:05 PM UTC-7, Ben Noordhuis wrote: >> >> It seems the overarching theme with your machine is that generating >> code or post-processing object files somehow doesn't work (both >> debug-support.o and snapshot.o

Re: [nodejs] Error linking v8 while cross-compiling for Drobo FS

2012-07-11 Thread Jason Schmidt
It was set to "arm-none-linux-gnueabi". I've tried both "armv5t" and "armv5te" (still getting the original linking error in both cases). When I tried to set it to just "arm", however, I got an error message at configure time: zannalov@droboBuild32:~/code/node-v0.8.2$ ./configure --dest-cpu=arm

Re: [nodejs] Error linking v8 while cross-compiling for Drobo FS

2012-07-11 Thread Ben Noordhuis
On Thu, Jul 12, 2012 at 2:40 AM, Jason Schmidt wrote: > It was set to "arm-none-linux-gnueabi". I've tried both "armv5t" and > "armv5te" (still getting the original linking error in both cases). When I > tried to set it to just "arm", however, I got an error message at configure > time: Yes, it n

Re: [nodejs] Error linking v8 while cross-compiling for Drobo FS

2012-07-11 Thread Jason Schmidt
Should I use -march=armv5te or just -march=arm on the make line? On Wednesday, July 11, 2012 8:49:11 PM UTC-4, Ben Noordhuis wrote: > > On Thu, Jul 12, 2012 at 2:40 AM, Jason Schmidt wrote: > > It was set to "arm-none-linux-gnueabi". I've tried both "armv5t" and > > "armv5te" (still getting the

Re: [nodejs] Error linking v8 while cross-compiling for Drobo FS

2012-07-11 Thread Ben Noordhuis
On Thu, Jul 12, 2012 at 2:53 AM, Jason Schmidt wrote: > Should I use -march=armv5te or just -march=arm on the make line? Sorry, I'm being unclear. :-) Use -march=armv5te on the command line, that tells gcc what arch to compile for. Set target_arch to "arm", that's for general bookkeeping of the

Re: [nodejs] Error linking v8 while cross-compiling for Drobo FS

2012-07-11 Thread Jason Schmidt
It's quite alright. I tried it the way you described first, suspecting that was the right approach (after all, I can always clean and build again if I'm wrong) and {drum-roll} It linked successfully! Thank you very, very, very much! Now to install and test it on the Drobo. If all goes well, I'l

Re: [nodejs] Error linking v8 while cross-compiling for Drobo FS

2012-07-11 Thread Jason Schmidt
I ran into another problem, but was able to solve it. The installer.js file called by "make install" expects to use the built copy of node to run the installer, but the built copy is for the target architecture, not the build machine, so it wouldn't run. Just in case anyone wants to know the eas

[nodejs] node-gyp build leaves .node file in different dirs on different platforms?

2012-07-11 Thread Andrew Paprocki
I'm building the same module on Linux, OSX, and Windows using 0.8.2 and the resulting module is left here: Linux: build/Release/lib.target/x.node OSX & Win: build/Release/x.node Am I missing something here or is this a bug? If one is requiring the .node from js, how are you supposed to require

[nodejs] Re: node-gyp build leaves .node file in different dirs on different platforms?

2012-07-11 Thread mscdex
On Jul 12, 12:02 am, Andrew Paprocki wrote: > I'm building the same module on Linux, OSX, and Windows using 0.8.2 and the > resulting module is left here: > > Linux: build/Release/lib.target/x.node > OSX & Win: build/Release/x.node FWIW I always get `build/Release/foo.node` on at least Linux and