Re: [nodejs] Re: Is it a good idea for me to learn node.js?
Rails is a framework on top of Ruby. So you can't compare Rails to Node.JS. You can do CRUD with Node.JS. You can do in Nodejs everything that can be done in Ruby. Only the default paradigm is different. One is synchronous, blocking and the other is asynchronous, non-blocking by default. You can use libraries like EventMachine for nonblocking I/O in Ruby, but that also means you need to write your own libraries for HTTP, TCP, File I/O, Database wrappers etc (There are many available now like em-http-request, em-websocket etc). The reason to use NodeJS is the fact that its Javascript and all the modules written for Node are inherently asynchronous, non-blocking. If you want Rails in Node.JS you have Geddyhttp://geddyjs.org/features.html. Geddy http://geddyjs.org/features.html is an MVC framework. On Thu, Aug 30, 2012 at 10:45 AM, ANIKET KADAM aniketkadam1...@gmail.comwrote: is said that in many blogs that = rails is suitable for *Traditional web app* so Please tell me why* node.js* with *espress.js* is not suitable for *Traditional app* with has lot of CRUD things. or is node.js is just meant for Real time app On Thu, Aug 30, 2012 at 4:19 AM, Diogo Resende drese...@thinkdigital.ptwrote: Yes. Node is just a javascript environment with a usable async API. Express is on top of Node. Stick with JavaScript, learn the basis, play with it in the browser if you like, you can use jQuery if you want, just stick with JS. After that, jump to Node and read the entire docs, it's not that big. -- Diogo Resende On Wednesday, August 29, 2012 at 21:50 , ANIKET KADAM wrote: did one should master javascript for learning node.js and express.js On Thu, Aug 30, 2012 at 2:18 AM, Sugarstack mjadob...@gmail.com wrote: Using coffeescript requires you to understand the JavaScript it generates and how/why it generates it that way I would not use it until you are comfortable with js first. -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Looking for a good xml parser in stream mode
A protocol using xml, socket stream first time I recieve root foo= 2nd time I recieve adsfblabl 3rd time I recieve a/rootroot Then I should get a xml root foo=asdfblabla/root , and left root waiting for new coming data. Any good module to do that? -- Best regards, 桂林 (Gui Lin) guileen@twitter https://twitter.com/#!/guileen 桂糊涂@weibo http://weibo.com/guileen guileen@github https://github.com/guileen -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Re: Is it a good idea for me to learn node.js?
is node with express is suitable for building large apps like ecommerce site or real estae portal On Thu, Aug 30, 2012 at 11:32 AM, Shripad K assortmentofso...@gmail.comwrote: Rails is a framework on top of Ruby. So you can't compare Rails to Node.JS. You can do CRUD with Node.JS. You can do in Nodejs everything that can be done in Ruby. Only the default paradigm is different. One is synchronous, blocking and the other is asynchronous, non-blocking by default. You can use libraries like EventMachine for nonblocking I/O in Ruby, but that also means you need to write your own libraries for HTTP, TCP, File I/O, Database wrappers etc (There are many available now like em-http-request, em-websocket etc). The reason to use NodeJS is the fact that its Javascript and all the modules written for Node are inherently asynchronous, non-blocking. If you want Rails in Node.JS you have Geddyhttp://geddyjs.org/features.html. Geddy http://geddyjs.org/features.html is an MVC framework. On Thu, Aug 30, 2012 at 10:45 AM, ANIKET KADAM aniketkadam1...@gmail.comwrote: is said that in many blogs that = rails is suitable for *Traditional web app* so Please tell me why* node.js* with *espress.js* is not suitable for *Traditional app* with has lot of CRUD things. or is node.js is just meant for Real time app On Thu, Aug 30, 2012 at 4:19 AM, Diogo Resende drese...@thinkdigital.ptwrote: Yes. Node is just a javascript environment with a usable async API. Express is on top of Node. Stick with JavaScript, learn the basis, play with it in the browser if you like, you can use jQuery if you want, just stick with JS. After that, jump to Node and read the entire docs, it's not that big. -- Diogo Resende On Wednesday, August 29, 2012 at 21:50 , ANIKET KADAM wrote: did one should master javascript for learning node.js and express.js On Thu, Aug 30, 2012 at 2:18 AM, Sugarstack mjadob...@gmail.com wrote: Using coffeescript requires you to understand the JavaScript it generates and how/why it generates it that way I would not use it until you are comfortable with js first. -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Looking for a good xml parser in stream mode
On Thu, Aug 30, 2012 at 02:05:21PM +0800, jason.桂林 wrote: A protocol using xml, socket stream first time I recieve root foo= 2nd time I recieve adsfblabl 3rd time I recieve a/rootroot Then I should get a xml root foo=asdfblabla/root , and left root waiting for new coming data. Any good module to do that? Still hoping someone makes an streaming Xpath module for Ltx, which seems to be the fastest streaming xml module out there: https://npmjs.org/package/ltx There's an existing xpath module but it's not streaming based: https://npmjs.org/package/ltx-xpath -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Looking for a good xml parser in stream mode
Try saxjs (github.com/isaacs/sax-js) Streaming path expressions? :) if you want an ee that emit on a path expression just create that module using a sax based parser Sent from my iPhone On Aug 30, 2012, at 7:37 AM, rektide rekt...@voodoowarez.com wrote: On Thu, Aug 30, 2012 at 02:05:21PM +0800, jason.桂林 wrote: A protocol using xml, socket stream first time I recieve root foo= 2nd time I recieve adsfblabl 3rd time I recieve a/rootroot Then I should get a xml root foo=asdfblabla/root , and left root waiting for new coming data. Any good module to do that? Still hoping someone makes an streaming Xpath module for Ltx, which seems to be the fastest streaming xml module out there: https://npmjs.org/package/ltx There's an existing xpath module but it's not streaming based: https://npmjs.org/package/ltx-xpath -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] [Ann] UglifyJS 2.0
Yeah I understand the purpose of maintaining comments; I've actually written a lot of source-to-source transformations myself. The reason I ask is that I always found it cumbersome to stick non-AST information on the AST itself. For instance, for /* this is my loop */ (/* this is my initializer */ var ii = 0 /* there it is! */;;). I tortured myself for a long time messing with maintaining comments and whitespace when I found that the solution is actually implicit in the token start/end positions. If you're rendering the AST to string and you've got the source tokens attached to each node, you can just look at the original source string to find the comments and whitespace. Like I said, you should check out the fibers transformation in Streamline. It does a source-to-source transformation while maintaining *all* non-semantic source data (whitespace comments). The other solution I've seen is to maintain a lastDocBlock variable in your tokenizer state. Then when the parser parses a function, you just attach `lastDocBlock` to the node that way. That's a pretty simple and easy to implement solution and it handles concerns about maintaining copyright information, but it won't maintain whitespace or esoteric comments which is desirable in many situations. On Wed, Aug 29, 2012 at 8:07 PM, Scott Taylor sc...@railsnewbie.com wrote: Obviously it depends what you are trying to do. Usually compiled programming languages strip them out in the tokenizer; for source to source translations sometimes you want to keep them in (for instance a header with copyright notice when compressing or *all* of them in a case like mine) Best Scott On Aug 29, 2012, at 2:27 PM, Marcel Laverdet mar...@laverdet.com wrote: Just curious why you need the comments in the AST at all? If you've got the start position length of every token in the AST (much easier to do) you implicitly have the comments as well. The fiber engine in Streamline ( https://github.com/Sage/streamlinejs/blob/master/lib/fibers/transform.js) does this with really good results. On Wed, Aug 29, 2012 at 8:37 AM, Mihai Călin Bazon mihai.ba...@gmail.comwrote: Well, the code generator doesn't yet have an option to keep comments, but I can add it easily; the harder part was having them in the AST, and that's done. What exactly are you trying to achieve? My understanding is that you compile Lisp to JS (cool!), do you want to be able to do the reverse transform? If so, perhaps a better idea is to generate a source map. (not sure what you need to do though, just guessing) Cheers, -Mihai On Wed, Aug 29, 2012 at 1:52 PM, Scott Taylor sc...@railsnewbie.com wrote: Wonderful! I've been working on a project that is sort of like parenscript - but much more of a straight javascript in lisp/scheme clothes with a define-syntax macro system. https://github.com/smtlaissezfaire/loop I've been hacking on the 1x source of uglify to translate javascript into a lispy type system (and back) - but inline comments have been a cause of concern. Where is the 2.x source at this point? Cheers, Scott On Aug 28, 2012, at 12:56 PM, Mihai Călin Bazon wrote: On Tue, Aug 28, 2012 at 5:33 AM, Scott Taylor sc...@railsnewbie.com wrote: Very cool. What comments in the AST are you going to preserve? The new AST is able to store all comments, and the compressor and code generator will be able to keep most of them. However, I suspect that in general people will only need to store copyright notices, and those usually start with some special marker like /*!. It'll be easy to add a configuration option to keep such comments, as long as they're not in code that's going to be dropped (for example dead code, like, code that follows a return, throw, break or continue statement). Cheers, -- Mihai Bazon, http://mihai.bazon.net/blog -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- Mihai Bazon, http://mihai.bazon.net/blog -- Job Board: http://jobs.nodejs.org/ Posting guidelines:
[nodejs] HTTP Server Throttling
I've been working on a web server framework of my own using a cluster of workers sharing a single listener. The documentation for clusters just says that workers workers sharing a listener will just automagically throttle themselves, but I find that unacceptable. I want to be able to tell a listener in one of the workers to not accept new connections until I unblock it. I have found only one way of doing this and it's much less than satisfactory. You can call the close method on the server which will stop the server from accepting new connections, but the only way to restart it is to create a new server! This works, but a) it's creating a new server instance when all I really want to do is allow new connections to be accepted again, and b) I'm not sure how the backlog works in a node HTTP server. Is there a way to tell how large the backlog is? is there some way to just configure the maximum number of concurrent connections per listener? Is the backlog shared across all of the shared listeners in all of the workers? Is there documentation somewhere on the underlying implementation? -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Restricted static files
Hi, i'm working on an Express application that has to type of static content (image, css, js ecc): private and public. For public there're not problems, but for private i'm looking for a solutions, these file must be read only by authenticated user. For now i'm trying to get all from filesystem with fs library, but i'm looking for simply solutions. Have you some suggestions to solve this problem? Thanks for your time. Best regards. -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Nodejs Restify and Express
Hi Dan, Thanks for the reply. This means if I will use them both required in the same file will not work right? only when they are in separate file and using different port. On Monday, August 27, 2012 9:09:45 PM UTC+8, Dan Milon wrote: You mean both on the same process? Yeah as long as its a different port. If you are asking which one to choose, for an (rest) API server, its not an easy answer. I first tried restify, but it didnt compute etags out of the box which i found strange for a rest API server. Plus i did not make use of all the extra headers it enforces. I did not make a performance comparison, but found express to work better out of the box for my needs. But you will have to write your own error catcher middleware. danmilon. On 08/27/2012 03:53 PM, almarjin wrote: Hi, I'd like to know if Restify and Express will both work on Nodejs. Thanks, -- 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 nod...@googlegroups.comjavascript: To unsubscribe from this group, send email to nodejs+un...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Re: Async: When it is usefull?
In JavaScript you most of the time don't really have a choice whether to make something async or sync. When there are only synchronous operations in a function there is no purpose in using callbacks. However when you use async operations like I/O you have to use callbacks. The things is that callbacks are only relevant for functions that give the main thread free to other operations and wait for something external to happen. On Wednesday, August 29, 2012 3:47:35 PM UTC+2, Markus Lanz wrote: Greetings, I am asking myself when async ist usefull and when not. Is it just usefull when I got I/O or should I even make every code in my project async with callback methods? -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Nodejs Restify and Express
File does not matter. Port matters. On 08/30/2012 10:33 AM, almarjin wrote: Hi Dan, Thanks for the reply. This means if I will use them both required in the same file will not work right? only when they are in separate file and using different port. On Monday, August 27, 2012 9:09:45 PM UTC+8, Dan Milon wrote: You mean both on the same process? Yeah as long as its a different port. If you are asking which one to choose, for an (rest) API server, its not an easy answer. I first tried restify, but it didnt compute etags out of the box which i found strange for a rest API server. Plus i did not make use of all the extra headers it enforces. I did not make a performance comparison, but found express to work better out of the box for my needs. But you will have to write your own error catcher middleware. danmilon. On 08/27/2012 03:53 PM, almarjin wrote: Hi, I'd like to know if Restify and Express will both work on Nodejs. Thanks, -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-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 nod...@googlegroups.com javascript: To unsubscribe from this group, send email to nodejs+un...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Re: Restricted static files
You could try such an approach: https://gist.github.com/3524676 On Thursday, August 30, 2012 2:10:47 AM UTC-5, AndDM wrote: Hi, i'm working on an Express application that has to type of static content (image, css, js ecc): private and public. For public there're not problems, but for private i'm looking for a solutions, these file must be read only by authenticated user. For now i'm trying to get all from filesystem with fs library, but i'm looking for simply solutions. Have you some suggestions to solve this problem? Thanks for your time. Best regards. -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Do you know any password entropy/strength library.
Hi, I need one that works both in the server and the client. Regards, Pedro -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] src/unix/stream.c:383: uv__write: Assertion `fd_to_send = 0' failed
Also error below is occurred: node ../src/stream_wrap.cc:259: static void node::StreamWrap::OnReadCommon(uv_stream_t*, intptr_t, uv_buf_t, uv_handle_type): Assertion `r == 0' failed. Anybody knowns how to resolve this? -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] problem with socket.io
hi people I try to use socket.io but I have this error XMLHttpRequest cannot load http://localhost:7070/socket.io/1/?t=1346294690161. Origin null is not allowed by Access-Control-Allow-Origin. this is my code: server.js var io = require('socket.io').listen(7070); io.sockets.on(connection, function arranque(cliente){ cliente.on(nuevoMensaje, function emitir(dato){ io.sockets.emit(MensajeDesdeServidor, dato ); console.log(mensaje de un cliente + dato) }); }); client: script src=http://localhost:7070/socket.io/socket.io.js;/script $(document).on('ready', function(){ var websocket = new io.connect(http://localhost;, {port: 7070}); //websocket.on(nombreDesdeServidor, function(datoServidor){ // $(#formulario label).text(Acaba de entrar + datoServidor); //}); }); if you can help me, thanks -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Re: Image manipulation with node.js
I'm using http://aheckmann.github.com/gm/ and it works great for image manipulation. I've tried one other library that was written to use imagemagick and it was pretty buggy. I have run across https://github.com/LearnBoost/node-canvas which might be more what you're looking for... -Dave On Wednesday, August 29, 2012 10:06:26 AM UTC-4, Parag P wrote: You can try Imagemagick which can seamlessly triggered using any programming language. On Saturday, June 12, 2010 7:57:24 AM UTC+5:30, tracker1 wrote: Is anyone working on an image library for use with node? Perhaps using the canvas API, or similar with an export/save to optimized png jpeg? -- Michael J. Ryan - http://tracker1.info/ ... FRA #094: Females and finances don't mix. -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] src/unix/stream.c:383: uv__write: Assertion `fd_to_send = 0' failed
On Thu, Aug 30, 2012 at 5:49 AM, Aleafs zhangx...@gmail.com wrote: Also error below is occurred: node ../src/stream_wrap.cc:259: static void node::StreamWrap::OnReadCommon(uv_stream_t*, intptr_t, uv_buf_t, uv_handle_type): Assertion `r == 0' failed. Anybody knowns how to resolve this? Upgrading to v0.8.8 should fix it. -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] problem with socket.io
My guess is that you are directly opening your HTML file from the file system in a browser instead of via a localhost URL. I think you need an HTTP server that works with Socket.IO and serves your static HTML file. You can use Express or Strata for that. I can send you an example of setting that up if you need it. --- R. Mark Volkmann Object Computing, Inc. On Aug 30, 2012, at 6:49 AM, Claudio Alvarado caa.zerob...@gmail.com wrote: hi people I try to use socket.io but I have this error XMLHttpRequest cannot load http://localhost:7070/socket.io/1/?t=1346294690161. Origin null is not allowed by Access-Control-Allow-Origin. this is my code: server.js var io = require('socket.io').listen(7070); io.sockets.on(connection, function arranque(cliente){ cliente.on(nuevoMensaje, function emitir(dato){ io.sockets.emit(MensajeDesdeServidor, dato ); console.log(mensaje de un cliente + dato) }); }); client: script src=http://localhost:7070/socket.io/socket.io.js;/script $(document).on('ready', function(){ var websocket = new io.connect(http://localhost;, {port: 7070}); //websocket.on(nombreDesdeServidor, function(datoServidor){ // $(#formulario label).text(Acaba de entrar + datoServidor); //}); }); if you can help me, thanks -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Re: Restricted static files
Hi, really thanks, i'm trying with this, but it seems that have problems with rendering, for jpg it tells me that have errors and for style and html i've enconding errors too. [image: The image “https://localhost:10443/static/private/img.jpg” cannot be displayed because it contains errors.] Have you some suggestions? [image: The image “https://localhost:10443/static/private/img.jpg” cannot be displayed because it contains errors.]Thanks for your time. Best regards On Thursday, August 30, 2012 11:17:21 AM UTC+2, Weltschmerz wrote: You could try such an approach: https://gist.github.com/3524676 On Thursday, August 30, 2012 2:10:47 AM UTC-5, AndDM wrote: Hi, i'm working on an Express application that has to type of static content (image, css, js ecc): private and public. For public there're not problems, but for private i'm looking for a solutions, these file must be read only by authenticated user. For now i'm trying to get all from filesystem with fs library, but i'm looking for simply solutions. Have you some suggestions to solve this problem? Thanks for your time. Best regards. -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Base64 image is empty
Hey guys, I don't know if i can post this question in here, but nobody else could answer me in other forums :( my problem is the following: I'm trying to give the img tag the source of a base64 address which i already tested here: http://www.base64online.com/image_base64.php and on this page it returns a picture. But on my site there is nothing, only a blank image. I tested it in every browser. Have you any idea? Greetz Manner -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Working on Avro for Node
Hi everybody, I justed wanted to say that I am starting to work on an open source library for Avro serialization format support in Node.js. If you are interested in Avro for Node.js, I would love to hear from you. Please post any questions or suggestions you may have here, or use the Github facilities at https://github.com/manuel/avronode The project is in a very early phase (e.g. I don't even know yet if it will use C++ or JS), so all feedback is appreciated. Best regards, Manuel Simoni -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Flask-like routing for node.js
Hello node.js users I have created a lightweight routing library that uses the powerful syntax of Flask(python web framework) for declaring routes. The syntax is clean and extensible through custom parameter parsers. It can be used as a node.js application or connect/express middleware. The project is hosted at https://github.com/tarruda/node-flask-router. Any feedback is appreciated :) Best regards. -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] How cluster master pass data to workers ondata listener
Hi guys, I need your help As how node cluster module works, the workers works like normal Socket Server, also it can listen to a public port, and handle the data client pass it. I have couple question about cluster. 1. listening The master process listen at the public port, but what those workers with the code `listen(port)` does? did the worker listen at somewhere, or it just a fake listen? 2. receive data If I am not misunderstanding, the data from client is send to the master process, and the master process send an internalMessage like worker.send(data), if so, the worker should handle data at process.on('message',..) but not socket.on('data', ...), so we have to change our workers code not like what cluster module did. I notice there is a method called cluster._getServer, which would give the worker a `handle` object which set to `socket._handle`. 3. send data back to client When send to client, the worker process should send data to master process, we need call `process.send` to the master process, and the master send data back to client. I know few thing about multi-process binding on a same port. -- Best regards, 桂林 (Gui Lin) guileen@twitter https://twitter.com/#!/guileen 桂糊涂@weibo http://weibo.com/guileen guileen@github https://github.com/guileen -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Re: Restricted static files
This works for me: https://gist.github.com/3524676 On Thursday, August 30, 2012 8:16:12 AM UTC-5, AndDM wrote: Hi, really thanks, i'm trying with this, but it seems that have problems with rendering, for jpg it tells me that have errors and for style and html i've enconding errors too. [image: The image “https://localhost:10443/static/private/img.jpg” cannot be displayed because it contains errors.] Have you some suggestions? [image: The image “https://localhost:10443/static/private/img.jpg” cannot be displayed because it contains errors.]Thanks for your time. Best regards On Thursday, August 30, 2012 11:17:21 AM UTC+2, Weltschmerz wrote: You could try such an approach: https://gist.github.com/3524676 On Thursday, August 30, 2012 2:10:47 AM UTC-5, AndDM wrote: Hi, i'm working on an Express application that has to type of static content (image, css, js ecc): private and public. For public there're not problems, but for private i'm looking for a solutions, these file must be read only by authenticated user. For now i'm trying to get all from filesystem with fs library, but i'm looking for simply solutions. Have you some suggestions to solve this problem? Thanks for your time. Best regards. -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Feature poll: Do you use the clientError event?
4 On Thu, Aug 30, 2012 at 12:12 AM, Shigeki Ohtsu oh...@iij.ad.jp wrote: clientError on http.Server 2.5(I've never used before) clientError on https.Server 2(I sometimes used for debug) I think that clientError on https.Server is valuable to check SSL errors as $node https_server2.js ssl server listening on 8443 clientError: TLS session renegotiation attack detected. clientError: TLS session renegotiation attack detected. clientError: 3077781248:error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_srvr.c:589: refs. http://nodejs.org/api/tls.html#tls_client_initiated_renegotiation_attack_mitigation (2012/08/30 8:07), Isaac Schlueter wrote: Do you use the clientError event? Please choose one: 1. Yes, I use it all the time. Please don't change it ever, thank you. 2. I don't use it, but I'm aware of it, and I think I might someday. 3. I don't use it, and I think it's stupid. 4. The what now event? Thanks. -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Re: Restricted static files
A quick and dirty way is to wrap express.static middleware. You can try something like: app.use(function(req, res, next){ // do authentication if(authorized){ express.static(/private)(req, res, next); } else { next(); } On Thu, Aug 30, 2012 at 9:16 AM, AndDM anddima...@gmail.com wrote: Hi, really thanks, i'm trying with this, but it seems that have problems with rendering, for jpg it tells me that have errors and for style and html i've enconding errors too. [image: The image “https://localhost:10443/static/private/img.jpg” cannot be displayed because it contains errors.] Have you some suggestions? [image: The image “https://localhost:10443/static/private/img.jpg” cannot be displayed because it contains errors.]Thanks for your time. Best regards On Thursday, August 30, 2012 11:17:21 AM UTC+2, Weltschmerz wrote: You could try such an approach: https://gist.github.com/**3524676 https://gist.github.com/3524676 On Thursday, August 30, 2012 2:10:47 AM UTC-5, AndDM wrote: Hi, i'm working on an Express application that has to type of static content (image, css, js ecc): private and public. For public there're not problems, but for private i'm looking for a solutions, these file must be read only by authenticated user. For now i'm trying to get all from filesystem with fs library, but i'm looking for simply solutions. Have you some suggestions to solve this problem? Thanks for your time. Best regards. -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] How cluster master pass data to workers ondata listener
Hi 桂林: Nice to see a Chinese in the maillist. From what I read, children processes do I/O directly, not through the master. Ribao Wei On Thu, Aug 30, 2012 at 9:58 AM, jason.桂林 guil...@gmail.com wrote: Hi guys, I need your help As how node cluster module works, the workers works like normal Socket Server, also it can listen to a public port, and handle the data client pass it. I have couple question about cluster. 1. listening The master process listen at the public port, but what those workers with the code `listen(port)` does? did the worker listen at somewhere, or it just a fake listen? 2. receive data If I am not misunderstanding, the data from client is send to the master process, and the master process send an internalMessage like worker.send(data), if so, the worker should handle data at process.on('message',..) but not socket.on('data', ...), so we have to change our workers code not like what cluster module did. I notice there is a method called cluster._getServer, which would give the worker a `handle` object which set to `socket._handle`. 3. send data back to client When send to client, the worker process should send data to master process, we need call `process.send` to the master process, and the master send data back to client. I know few thing about multi-process binding on a same port. -- Best regards, 桂林 (Gui Lin) guileen@twitter https://twitter.com/#!/guileen 桂糊涂@weibo http://weibo.com/guileen guileen@github https://github.com/guileen -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] How to use soap client over HTTPS with a self-signed certificate?
On Thu, Aug 30, 2012 at 4:33 PM, Eric e...@craftti.com.br wrote: Hi Guys, My node.js app needs to tal with a webservice using soap over HTTPS connection but using his own SSL certificate (self-signed certificate). In other languages like java all I need to do is import the PEM file into the JRE keystore to make it trusted, and when the soap clients communicate with the webservice everything goes fine. I can't seem to figure out however how should I do this in node.js. Where is the keystore used by node.js? Take a look at the documentation for https.request() and tls.connect(). You pass the certificate in an options object, e.g. var options = url.parse('https://example.com/'); options.cert = fs.readFileSync('example.pem'); var req = https.request(options, cb); -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] How to use soap client over HTTPS with a self-signed certificate?
Don't forget to specify an agent of explicitly set agent = false. If you don't the global agent will be used and your certificate will be ignored. There's a note about that behavior in http://nodejs.org/api/https.html#https_https_request_options_callback but I recently overlooked that and it took me a while to figure out what was going wrong. On Thu, Aug 30, 2012 at 12:42 PM, Ben Noordhuis i...@bnoordhuis.nl wrote: On Thu, Aug 30, 2012 at 4:33 PM, Eric e...@craftti.com.br wrote: Hi Guys, My node.js app needs to tal with a webservice using soap over HTTPS connection but using his own SSL certificate (self-signed certificate). In other languages like java all I need to do is import the PEM file into the JRE keystore to make it trusted, and when the soap clients communicate with the webservice everything goes fine. I can't seem to figure out however how should I do this in node.js. Where is the keystore used by node.js? Take a look at the documentation for https.request() and tls.connect(). You pass the certificate in an options object, e.g. var options = url.parse('https://example.com/'); options.cert = fs.readFileSync('example.pem'); var req = https.request(options, cb); -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Re: node-waf cross compilation, creating a *.node file which is created under ubuntu and run in ARM processoe
I removed the static from all the places from the above code, and i still get the same error.Also do you mean NODE_SET_METHOD, since i am using NODE_MODULE to call init function. On Thursday, August 30, 2012 4:54:21 AM UTC-7, Ben Noordhuis wrote: On Thu, Aug 30, 2012 at 1:59 AM, Pavi manic...@gmail.com javascript: wrote: Hi Ben, I removed the static from all the places from the above code, and i still get the same error. Also do you mean NODE_SET_METHOD, since i am using NODE_MODULE to call init function. Sorry, for some reason my mail reader didn't show the last two lines of your email. What does `nm yourmodule.node | grep -E 'init|_module'` print? -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Re: node-waf cross compilation, creating a *.node file which is created under ubuntu and run in ARM processoe
Hi Skyler, For some reason i am not able to view your mess , it just shows 4 --. Can you please reply back. On Wednesday, August 29, 2012 6:23:30 PM UTC-7, Skyler Brungardt wrote: 4 -- Skyler Brungardt On Wednesday, August 29, 2012 at 11:51, Pavi wrote: Hi, I shifted to gyp, and wrote binding.gyp, but still when i copy over the *.node file to Hardware which is successfully created in my ubuntu cause me the following error, *[11893.676924] Alignment trap: not handling instruction e1923f9f at [0fc4]* *[11893.686520] Unhandled fault: alignment exception (0x011) at 0x0001ba4d * *Illegal instruction* * * Please find below my Binding.gyp code, { 'targets' : [ { 'target_name': 'hu', 'type': 'shared_library', 'sourcess': [ 'NJSAQ.cc' ], 'include_dirs': ['/home/pavincoll/Desktop/ARMRFS3/usr/include', '/home/pavincoll/Desktop/ARMRFS3/usr/include/alsa', '/home/pavincoll/Desktop/ARMRFS3/usr/include/curl', '/opt/tooling/mvista/MV_20110822/symphony-ivi-2.6.34/tools/tools/arm-gnueabi/arm-montavista-linux-gnueabi/target-toolchain/arm-montavista-linux-gnueabi/libc/usr/bin' , '/home/pavincoll/Desktop/ARMRFS3/usr/lib', '/home/pavincoll/workspace/aqstub/src'], 'link_settings': { 'libraries': ['/usr/local/lib/libaqARM.so', '/usr/local/lib/libsqARM_1.so', '/usr/local/lib/libspARM.so'] } } ] } Pavi On Tuesday, August 28, 2012 3:40:24 PM UTC-7, mscdex wrote: On Aug 28, 6:34 pm, Pavi pavinc...@gmail.com wrote: Please find below the code of wscript: First thing you should do is switch to gyp. -- 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 nod...@googlegroups.com javascript: To unsubscribe from this group, send email to nodejs+un...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Re: node-waf cross compilation, creating a *.node file which is created under ubuntu and run in ARM processoe
Hi Pavi, That's a mail-reader fail. That was meant for another thread. Kindly disregard! :-) -- Skyler Brungardt On Thursday, August 30, 2012 at 10:33 AM, Pavi wrote: Hi Skyler, For some reason i am not able to view your mess , it just shows 4 --. Can you please reply back. On Wednesday, August 29, 2012 6:23:30 PM UTC-7, Skyler Brungardt wrote: 4 -- Skyler Brungardt On Wednesday, August 29, 2012 at 11:51, Pavi wrote: Hi, I shifted to gyp, and wrote binding.gyp, but still when i copy over the *.node file to Hardware which is successfully created in my ubuntu cause me the following error, [11893.676924] Alignment trap: not handling instruction e1923f9f at [0fc4] [11893.686520] Unhandled fault: alignment exception (0x011) at 0x0001ba4d Illegal instruction Please find below my Binding.gyp code, { 'targets' : [ { 'target_name': 'hu', 'type': 'shared_library', 'sourcess': [ 'NJSAQ.cc (http://NJSAQ.cc)' ], 'include_dirs': ['/home/pavincoll/Desktop/ARMRFS3/usr/include', '/home/pavincoll/Desktop/ARMRFS3/usr/include/alsa', '/home/pavincoll/Desktop/ARMRFS3/usr/include/curl', '/opt/tooling/mvista/MV_20110822/symphony-ivi-2.6.34/tools/tools/arm-gnueabi/arm-montavista-linux-gnueabi/target-toolchain/arm-montavista-linux-gnueabi/libc/usr/bin' , '/home/pavincoll/Desktop/ARMRFS3/usr/lib', '/home/pavincoll/workspace/aqstub/src'], 'link_settings': { 'libraries': ['/usr/local/lib/libaqARM.so', '/usr/local/lib/libsqARM_1.so', '/usr/local/lib/libspARM.so'] } } ] } Pavi On Tuesday, August 28, 2012 3:40:24 PM UTC-7, mscdex wrote: On Aug 28, 6:34 pm, Pavi pavinc...@gmail.com wrote: Please find below the code of wscript: First thing you should do is switch to gyp. -- 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 nod...@googlegroups.com (javascript:) To unsubscribe from this group, send email to nodejs+un...@googlegroups.com (javascript:) For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com (mailto:nodejs@googlegroups.com) To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com (mailto:nodejs+unsubscr...@googlegroups.com) For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] [Ann] UglifyJS 2.0
Well, the good news is that I'm maintaining both start/end tokens in all AST nodes, and inside tokens I maintain line/col/pos/endpos too. And on top of this, there's a comments_before array in all tokens which tell what comments were found before that token (though that's not so useful for perfect reconstitution of whitespace). Cheers, -M. On Thu, Aug 30, 2012 at 10:03 AM, Marcel Laverdet mar...@laverdet.com wrote: Yeah I understand the purpose of maintaining comments; I've actually written a lot of source-to-source transformations myself. The reason I ask is that I always found it cumbersome to stick non-AST information on the AST itself. For instance, for /* this is my loop */ (/* this is my initializer */ var ii = 0 /* there it is! */;;). I tortured myself for a long time messing with maintaining comments and whitespace when I found that the solution is actually implicit in the token start/end positions. If you're rendering the AST to string and you've got the source tokens attached to each node, you can just look at the original source string to find the comments and whitespace. Like I said, you should check out the fibers transformation in Streamline. It does a source-to-source transformation while maintaining *all* non-semantic source data (whitespace comments). The other solution I've seen is to maintain a lastDocBlock variable in your tokenizer state. Then when the parser parses a function, you just attach `lastDocBlock` to the node that way. That's a pretty simple and easy to implement solution and it handles concerns about maintaining copyright information, but it won't maintain whitespace or esoteric comments which is desirable in many situations. On Wed, Aug 29, 2012 at 8:07 PM, Scott Taylor sc...@railsnewbie.com wrote: Obviously it depends what you are trying to do. Usually compiled programming languages strip them out in the tokenizer; for source to source translations sometimes you want to keep them in (for instance a header with copyright notice when compressing or *all* of them in a case like mine) Best Scott On Aug 29, 2012, at 2:27 PM, Marcel Laverdet mar...@laverdet.com wrote: Just curious why you need the comments in the AST at all? If you've got the start position length of every token in the AST (much easier to do) you implicitly have the comments as well. The fiber engine in Streamline (https://github.com/Sage/streamlinejs/blob/master/lib/fibers/transform.js) does this with really good results. On Wed, Aug 29, 2012 at 8:37 AM, Mihai Călin Bazon mihai.ba...@gmail.com wrote: Well, the code generator doesn't yet have an option to keep comments, but I can add it easily; the harder part was having them in the AST, and that's done. What exactly are you trying to achieve? My understanding is that you compile Lisp to JS (cool!), do you want to be able to do the reverse transform? If so, perhaps a better idea is to generate a source map. (not sure what you need to do though, just guessing) Cheers, -Mihai On Wed, Aug 29, 2012 at 1:52 PM, Scott Taylor sc...@railsnewbie.com wrote: Wonderful! I've been working on a project that is sort of like parenscript - but much more of a straight javascript in lisp/scheme clothes with a define-syntax macro system. https://github.com/smtlaissezfaire/loop I've been hacking on the 1x source of uglify to translate javascript into a lispy type system (and back) - but inline comments have been a cause of concern. Where is the 2.x source at this point? Cheers, Scott On Aug 28, 2012, at 12:56 PM, Mihai Călin Bazon wrote: On Tue, Aug 28, 2012 at 5:33 AM, Scott Taylor sc...@railsnewbie.com wrote: Very cool. What comments in the AST are you going to preserve? The new AST is able to store all comments, and the compressor and code generator will be able to keep most of them. However, I suspect that in general people will only need to store copyright notices, and those usually start with some special marker like /*!. It'll be easy to add a configuration option to keep such comments, as long as they're not in code that's going to be dropped (for example dead code, like, code that follows a return, throw, break or continue statement). Cheers, -- Mihai Bazon, http://mihai.bazon.net/blog -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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
Re: [nodejs] [Ann] UglifyJS 2.0
Out of topic, but you gave me the clues. Do you know where i can read up about AST trees for javascript? Thanks a ton, danmilon. On 08/30/2012 12:27 AM, Marcel Laverdet wrote: Just curious why you need the comments in the AST at all? If you've got the start position length of every token in the AST (much easier to do) you implicitly have the comments as well. The fiber engine in Streamline (https://github.com/Sage/streamlinejs/blob/master/lib/fibers/transform.js) does this with really good results. On Wed, Aug 29, 2012 at 8:37 AM, Mihai Călin Bazon mihai.ba...@gmail.com mailto:mihai.ba...@gmail.com wrote: Well, the code generator doesn't yet have an option to keep comments, but I can add it easily; the harder part was having them in the AST, and that's done. What exactly are you trying to achieve? My understanding is that you compile Lisp to JS (cool!), do you want to be able to do the reverse transform? If so, perhaps a better idea is to generate a source map. (not sure what you need to do though, just guessing) Cheers, -Mihai On Wed, Aug 29, 2012 at 1:52 PM, Scott Taylor sc...@railsnewbie.com mailto:sc...@railsnewbie.com wrote: Wonderful! I've been working on a project that is sort of like parenscript - but much more of a straight javascript in lisp/scheme clothes with a define-syntax macro system. https://github.com/smtlaissezfaire/loop I've been hacking on the 1x source of uglify to translate javascript into a lispy type system (and back) - but inline comments have been a cause of concern. Where is the 2.x source at this point? Cheers, Scott On Aug 28, 2012, at 12:56 PM, Mihai Călin Bazon wrote: On Tue, Aug 28, 2012 at 5:33 AM, Scott Taylor sc...@railsnewbie.com mailto:sc...@railsnewbie.com wrote: Very cool. What comments in the AST are you going to preserve? The new AST is able to store all comments, and the compressor and code generator will be able to keep most of them. However, I suspect that in general people will only need to store copyright notices, and those usually start with some special marker like /*!. It'll be easy to add a configuration option to keep such comments, as long as they're not in code that's going to be dropped (for example dead code, like, code that follows a return, throw, break or continue statement). Cheers, -- Mihai Bazon, http://mihai.bazon.net/blog -- 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@googlegroups.com mailto:nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com mailto:nodejs%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com mailto:nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com mailto:nodejs%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- Mihai Bazon, http://mihai.bazon.net/blog -- 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@googlegroups.com mailto:nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com mailto:nodejs%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received
[nodejs] WARNING: ev_unref is deprecated, use uv_unref
Hi I get, WARNING: ev_unref is deprecated, use uv_unref Warning when i try to run my Java script. I tried to changed my *.cc file as below from, ev_unref(EV_DEFAULR_UC) To, uv_async_t h; uv_async_init(uv_default_loop(), h, NULL); uv_unref((uv_handle_t*)h); But this once throws segmentation fault,And also trying as below from, ev_unref(EV_DEFAULR_UC) To, uv_unref(uv_default_loop()); Throws compilation error. Please let me know how to use uv_unref uv_ref with Default handler Pavi -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] node, buffers and realloc
Apologize if this is a old-issue but, why Buffer has its size static? Why don't use realloc to resize its capacity? I have done a addon of resized buffers and it works perfectly 8-| grettings. -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] Re: Feature poll: Do you use the clientError event?
4 On Wednesday, 29 August 2012 16:07:23 UTC-7, Isaac Schlueter wrote: Do you use the clientError event? Please choose one: 1. Yes, I use it all the time. Please don't change it ever, thank you. 2. I don't use it, but I'm aware of it, and I think I might someday. 3. I don't use it, and I think it's stupid. 4. The what now event? Thanks. -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] node, buffers and realloc
On Thu, Aug 30, 2012 at 11:12 PM, Seiji Sam Lee seijisam...@gmail.com wrote: Apologize if this is a old-issue but, why Buffer has its size static? Why don't use realloc to resize its capacity? Because bad things would happen if the code below was legal: var buf = new Buffer(1024); fs.read(fd, buf, buf.length, cb); buf.resize(32); -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] How cluster master pass data to workers ondata listener
nice to meet you too. all workers listen to the same address, why no problem like address already bind. why i care about how it works because the i need dispatch connection to workers manually, and the connections need communication, you know like a chat server, A send message to B but they are not on the same process. 在 2012-8-30 晚上11:34,ribao wei riba...@gmail.com写道: Hi 桂林: Nice to see a Chinese in the maillist. From what I read, children processes do I/O directly, not through the master. Ribao Wei On Thu, Aug 30, 2012 at 9:58 AM, jason.桂林 guil...@gmail.com wrote: Hi guys, I need your help As how node cluster module works, the workers works like normal Socket Server, also it can listen to a public port, and handle the data client pass it. I have couple question about cluster. 1. listening The master process listen at the public port, but what those workers with the code `listen(port)` does? did the worker listen at somewhere, or it just a fake listen? 2. receive data If I am not misunderstanding, the data from client is send to the master process, and the master process send an internalMessage like worker.send(data), if so, the worker should handle data at process.on('message',..) but not socket.on('data', ...), so we have to change our workers code not like what cluster module did. I notice there is a method called cluster._getServer, which would give the worker a `handle` object which set to `socket._handle`. 3. send data back to client When send to client, the worker process should send data to master process, we need call `process.send` to the master process, and the master send data back to client. I know few thing about multi-process binding on a same port. -- Best regards, 桂林 (Gui Lin) guileen@twitter https://twitter.com/#!/guileen 桂糊涂@weibo http://weibo.com/guileen guileen@github https://github.com/guileen -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Node summer camp ticket for free
I realize that the ticket mentioned in this thread is probably already taken, but free free to ping me at @ryanj if anyone hears of another spot opening up. I'd love to be able to attend! On Tuesday, August 28, 2012 7:22:57 AM UTC-7, codepilot Account wrote: Let me know if you hear anything. On Aug 28, 2012 12:45 AM, Rob Ashton roba...@codeofrob.comjavascript: wrote: I'm afraid it has gone already (pending a response from Mikeal) Sorry! Rob On Tue, Aug 28, 2012 at 12:19 AM, codepilot Account code...@gmail.comjavascript: wrote: What info do you need? On Mon, Aug 27, 2012 at 9:49 AM, codepilot Account code...@gmail.comjavascript: wrote: Can I have it? On Mon, Aug 27, 2012 at 4:49 AM, Rob Ashton roba...@codeofrob.comjavascript: wrote: So, As much as I really wanted to meet up with everybody again and play some foursquare, drink some beer and chill in the sunshine, my schedule isn't going to allow me to get out to the states for the time required. If anybody in the area wants my ticket, wasn't able to buy one in the first case and can actually make it (I don't want my space going to waste), my ticket is going for *free*, you just need to be the first to reply to this e-mail so we can exchange details and I can pass the relevant info back to Mikeal. Cheers, Rob Ashton http://twitter.com/robashton -- 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 nod...@googlegroups.comjavascript: To unsubscribe from this group, send email to nodejs+un...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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 nod...@googlegroups.comjavascript: To unsubscribe from this group, send email to nodejs+un...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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 nod...@googlegroups.comjavascript: To unsubscribe from this group, send email to nodejs+un...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
[nodejs] How is the cache supposed to work
Hi all I am doing an investigation which relates to the npm cache. I though I understood how the cache worked, but Iam seeing behavior in recent builds that is different than what I expected. It may be however that I am misunderstanding how the cache is used. I have not walked the code yet (which I can do if necessary) but I assumed there's enough folks here that are familiar. My current understanding / expectation 1. If a module is retrieved from the npm registry it will be stored in the cache. 2. If I manually call 'npm cache add on a module it will add it to the cache such that when retrieved the cached version is used. 3. If I retrieve that module either directly via npm install or via being specified in an app/module package.json then it will be retrieved from the cache. This includes native modules - My assumption here is that if I specify a version explicitly that does not match what is in the cache it will be downloaded - If I don't specify a version it will use whatever is in the cache. - If I specify a range and the version in the cache matches the range then it will be used. I appreciate any clarification you can give. Thanks all Glenn -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
Re: [nodejs] Base64 image is empty
On Aug 30, 2012, at 08:21, Manner wrote: my problem is the following: I'm trying to give the img tag the source of a base64 address which i already tested here: http://www.base64online.com/image_base64.php and on this page it returns a picture. But on my site there is nothing, only a blank image. I tested it in every browser. Have you any idea? Probably not without a lot more information from you. Can you provide the code in question—the HTML code produced, and/or the (JavaScript?) code that produced it? Or the URL to your site where we can see the problem for ourselves? -- 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@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en