Re: [nodejs] Re: Spawned processes as transform streams

2013-06-13 Thread Andrey
Yes, I want upgrade it to streams2. Alternatively there should already be some way to compose proper stream2 duplex stream using existing Dominic Tarr modules (duplex/mux-demux/event-stream etc) On Friday, 14 June 2013 16:19:14 UTC+10, Marco Rogers wrote: > > > > > On Thu, Jun 13, 2013 at 11:14

[nodejs] Re: Passing variable to the command

2013-06-13 Thread Amit Kumar
Hey alex thanx for reply ..its works but still having problem ,, port is free as i want, by taking the variable, but throws exception and appium stop working automatically and again i need to press the "*launch"* button… and if i use "*exec*" in place of "*execFile"* problem is same but

[nodejs] Re: Passing variable to the command

2013-06-13 Thread Amit Kumar
On Thursday, 13 June 2013 17:49:03 UTC+5:30, Alex Kocharin wrote: > > > var execFile = require('child_process').execFile; > execFile('lsof', ['-t', '-i:'+portnumber], function(err, stdout, stderr) { >execFile('kill', [stdout], function(err, stdout, stderr) { > // ... >}); > }); > >

[nodejs] Re: How can a web service send both requested output and errors/warnings to the client

2013-06-13 Thread Jörg Eschmann
I would say your problem lies in your architecture. If you have a clearly structured service, the json object would be adequate. Generate the image and store it temporarly on your server. That is also good for caching, if users send the same request, you can easily check if the image is alread

Re: [nodejs] Re: Spawned processes as transform streams

2013-06-13 Thread Marco Rogers
On Thu, Jun 13, 2013 at 11:14 PM, Andrey wrote: > You can use https://github.com/sidorares/exec-stream > > var es = require('exec_stream'); var convert = es('imagemagick', > ['options']); rs.pipe(convert).pipe(ws); > > > This looks great. Do you have plans to upgrade it with the latest APIs? It'

[nodejs] Re: Spawned processes as transform streams

2013-06-13 Thread Andrey
You can use https://github.com/sidorares/exec-stream var es = require('exec_stream'); var convert = es('imagemagick', ['options']); rs.pipe(convert).pipe(ws); On Friday, 14 June 2013 11:23:08 UTC+10, ryandesign wrote: > > I understand that a process that I spawn with > require('child_process'

[nodejs] Re: Spawned processes as transform streams

2013-06-13 Thread Marco Rogers
You've got the right idea. But you're right that it can be difficult to work out the details. I've been giving talks on this recently, and I've got a repo that may help. Check out my example gzip stream. There are slides and other examples in there that may also be helpful. https://github.com/p

[nodejs] Re: How can a web service send both requested output and errors/warnings to the client

2013-06-13 Thread Alex Kocharin
Use "Warning" HTTP header. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html It's not a "custom http header", but a standard one. ;) On Friday, June 14, 2013 5:47:03 AM UTC+4, ryandesign wrote: > > I'm trying to figure out the best way to report non-fatal errors from a > nodejs web s

Re: [nodejs] How can a web service send both requested output and errors/warnings to the client

2013-06-13 Thread Aria Stewart
On Fri, Jun 14, 2013 at 09:09:33AM +0530, Hage Yaapa wrote: > What you are asking for is not recommended. Request should either be a > success or a failure. I concur here. Try to avoid 'warning' cases -- reduce the interface until there's only cases you're willing to handle separated from cases y

Re: [nodejs] How can a web service send both requested output and errors/warnings to the client

2013-06-13 Thread Hage Yaapa
What you are asking for is not recommended. Request should either be a success or a failure. On Fri, Jun 14, 2013 at 7:17 AM, Ryan Schmidt wrote: > I'm trying to figure out the best way to report non-fatal errors from a > nodejs web service to a browser while also delivering the requested content

Re: [nodejs] Logger in node js

2013-06-13 Thread Ryan Schmidt
On Jun 13, 2013, at 08:09, Cenk bircanoğlu wrote: > How can I log everything to a .log file in express nodejs. http://stackoverflow.com/questions/5489815/logging-in-express-js-to-a-output-file -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/

[nodejs] How can a web service send both requested output and errors/warnings to the client

2013-06-13 Thread Ryan Schmidt
I'm trying to figure out the best way to report non-fatal errors from a nodejs web service to a browser while also delivering the requested content. Suppose I have a web service that makes images, using input from the user, perhaps parameters in the URL. Let's say it renders a text message in a

[nodejs] Spawned processes as transform streams

2013-06-13 Thread Ryan Schmidt
I understand that a process that I spawn with require('child_process').spawn() *has* three streams: stdin, stdout, stderr. http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options But I've now read about require('stream').Transform and it feels like for ce

Re: [nodejs] Client raw socket connection using node.js net module

2013-06-13 Thread Hage Yaapa
The Node API is not available in the browser environment, so client.js won't work from the browser. Because of security concerns, files system and network access is very restricted from browsers. The closest you can get to what you want to achieve is to use socket.io - http://socket.io/. I am the

[nodejs] Re: node.js library for backing up your code and recovering it

2013-06-13 Thread Nik Martin
On Tuesday, June 11, 2013 1:36:46 PM UTC-5, Jared Wright wrote: > > I've been working on this module for a couple of days. If anyone has any > feedback & questions please respond. If you would like to make a pull > request or start an issue after using the code, you are more than welcome. > > I

[nodejs] Logging a response stream

2013-06-13 Thread Stewart Glass
Hello everyone, I'm currently experimenting with a setup that uses node CGI to call git-http-backend with a request and a response stream as params. However I'm running into some issues that are unfortunately not being captured in any of my logs. As a result I've been looking to improve my logg

Re: [nodejs] Re: Announcing JS-Git and related projects.

2013-06-13 Thread Tim Caswell
On Thu, Jun 13, 2013 at 4:54 PM, Alexey Petrushin < alexey.petrus...@gmail.com> wrote: > That's nice, thanks for your work Tim. > > You mentioned custom back-ends in documentation, is it possible to create > a back-end that will use AWS S3 or something similar as a storage? Maybe > with a subset o

[nodejs] Re: Show Me Your Blog

2013-06-13 Thread Alexey Petrushin
Blogs are too opinionated and narrow scoped, I found much more interesting stuff by following peoples on twitter. On Thursday, June 13, 2013 2:56:09 AM UTC+4, Alan Gutierrez wrote: > > I'd like to start to write a about the stuff I'm doing with Node.js. I'd > like to > make it as easy for you t

[nodejs] Re: Show Me Your Blog

2013-06-13 Thread Dave Whiteley
Hi, The NodeFly team posts Node.js news, article, tutorials, Node.js app or project profiles, a weekly round-up, and other tidbits on our blog, as well as updates for our monitoring agent. http://blog.nodefly.com We are always eager to share content as well, so feel free to drop a line with a

[nodejs] Re: Announcing JS-Git and related projects.

2013-06-13 Thread Alexey Petrushin
That's nice, thanks for your work Tim. You mentioned custom back-ends in documentation, is it possible to create a back-end that will use AWS S3 or something similar as a storage? Maybe with a subset of git functionality? On Thursday, June 13, 2013 11:54:14 PM UTC+4, Tim Caswell wrote: > > As s

Re: [nodejs] Announcing JS-Git and related projects.

2013-06-13 Thread Tim Caswell
On Thu, Jun 13, 2013 at 4:35 PM, Diogo Resende wrote: > +1 for all your work. It's always good to have people thinking about new > ways of developing and improving code. Even if it's not widely adopted, > it's good to have different paths to choose :) > > Thanks Diogo. And in case it wasn't clear

Re: [nodejs] Announcing JS-Git and related projects.

2013-06-13 Thread Diogo Resende
+1 for all your work. It's always good to have people thinking about new ways of developing and improving code. Even if it's not widely adopted, it's good to have different paths to choose :) -- Diogo Resende On Thursday, June 13, 2013 at 20:54 , Tim Caswell wrote: > As some of you know, and

Re: [nodejs] Re: Show Me Your Blog

2013-06-13 Thread David Worms
I write from time-to-time about Node.js and Hadoop, mostly in english (sometimes translated to french). d. -- -- 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

[nodejs] Re: Show Me Your Blog

2013-06-13 Thread Jimmy Guerrero
Hello, We post a variety of articles every week here: http://blog.strongloop.com/ They are a mix of how-tos, company news and node.js core development updates. Always, happy to host or cross-post content. -- Jimmy -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github

[nodejs] Node v0.8.25 (maintenance)

2013-06-13 Thread Isaac Schlueter
2013.06.13, Version 0.8.25 (maintenance) * npm: Upgrade to 1.2.30 * child_process: fix handle delivery (Ben Noordhuis) Source Code: http://nodejs.org/dist/v0.8.25/node-v0.8.25.tar.gz Macintosh Installer (Universal): http://nodejs.org/dist/v0.8.25/node-v0.8.25.pkg Windows Installer: http://nod

[nodejs] Announcing JS-Git and related projects.

2013-06-13 Thread Tim Caswell
As some of you know, and many of you do not, I've been spending the last few months working on implementing git in javascript. I started out with a small, but successful [kickstarter] that enabled me to quit my day job and work full time on JS-Git. Since then I've worked with others like Chris Di

[nodejs] [ANN] Suspend v0.2.0

2013-06-13 Thread jmar777
First off, thanks to all the ultra-early adopters for the amazing feedback after the initial release of suspend (https://github.com/jmar777/suspend). This is just a quick announcement that I've pushed v0.2.0 out, with the following notable enhancements: - Support for promises! - The `resume` ar

Re: [nodejs] Another question on write streams

2013-06-13 Thread // ravi
On Jun 13, 2013, at 2:45 PM, Isaac Schlueter wrote: > All the arguments are optional. Only the order matters. So, > actually, you can just do: > > stream.end(function() { 'finished' }) > > That function is just added as a listener on the "finish" event. > Thank you Isaac. I noticed I have a

[nodejs] Re: Show Me Your Blog

2013-06-13 Thread Matthew Page
Your posts on mongoose password authentication were very helpful. Thanks for those! FWIW here is my echo chamber: roboticsocks.com On Thursday, June 13, 2013 6:59:08 AM UTC-7, jmar777 wrote: > > I post occasionally on http://devsmash.com. Mostly Node.js, MongoDB, and > updates on side projects

Re: [nodejs] Another question on write streams

2013-06-13 Thread Isaac Schlueter
All the arguments are optional. Only the order matters. So, actually, you can just do: stream.end(function() { 'finished' }) That function is just added as a listener on the "finish" event. If you find a bug in the `bytesWritten` field, then please provide a test case. On Thu, Jun 13, 2013 at

[nodejs] Re: Node v0.10.11 (Stable)

2013-06-13 Thread Isaac Schlueter
Oh, also, I forgot to mention, this npm update makes npm way faster, because it fixes a lockfile bug. If you've been annoyed at how slow `npm publish` is, please do get this update. A v0.8 with the same npm update will be out shortly. On Thu, Jun 13, 2013 at 11:38 AM, Isaac Schlueter wrote: > T

[nodejs] Node v0.10.11 (Stable)

2013-06-13 Thread Isaac Schlueter
This release fixes the CLOSE_WAIT busy loop that users on older linux kernels have reported, as well as hangs in some situations using the socket.io library. 2013.06.13, Version 0.10.11 (Stable) * uv: upgrade to 0.10.11 * npm: Upgrade to 1.2.30 * openssl: add missing configuration pieces for M

[nodejs] Another question on write streams

2013-06-13 Thread // ravi
Howdy all, humour me another round. My question today: The writable.end() call takes three arguments: (1) chunk to write if any, (2) encoding, (3) callback for when all writing is done. Assuming there is nothing left to write, I am hoping it is okay to pass null, null to the first two argumen

Re: [nodejs] Output speed limit through socket.io (As in Mbps)

2013-06-13 Thread Scott Miller
So just to update, I'm able to push my transfer rate to ~850Mbps. I didn't realize it but the VM I was running node was only configured for ~2gigs memory and that seemed to have been my bottleneck thus far. So since my end goal is to build a bandwidth speedtest, my target client receiving

Re: [nodejs] Re: SSL3_GET_RECORD:decryption failed or bad record

2013-06-13 Thread Ben Noordhuis
On Wed, Jun 12, 2013 at 4:08 PM, mscdex wrote: > On Jun 12, 10:00 am, mscdex wrote: >> On Jun 12, 9:31 am, Matteo Collina wrote: >> >> > The error is something like: ---240:error:1408F119:SSL >> > routines:SSL3_GET_RECORD:decryption failed or bad record >> > mac:../deps/openssl/opens

[nodejs] Client raw socket connection using node.js net module

2013-06-13 Thread prerna . gupta
Hi All, I have successfully installed node.js on my Windows system We are trying to implement raw socket TCP/IP connection with server. After continuous search and development , i came across net module required by node.js which ultimately fulfill my requirement. Will net module also helps in

[nodejs] Re: SSL3_GET_RECORD:decryption failed or bad record

2013-06-13 Thread Kevin
I am having this same problem and it started about the same time. We are running node 0.8.9. It seems to crash one instance every 1 - 2 days. Any solution? On Wednesday, June 12, 2013 10:11:34 AM UTC-4, Matteo Collina wrote: > > > > Il giorno mercoledì 12 giugno 2013 15:00:44 UTC+1, mscdex ha sc

[nodejs] Logger in node js

2013-06-13 Thread Cenk bircanoğlu
How can I log everything to a .log file in express nodejs. -- -- 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

Re: [nodejs] modules & deploying non-production code e.g. (docs/examples/tests?)

2013-06-13 Thread IEEE
>>> npm packages contain too much garbage anyway. I'm talking about optional >>> dependencies. For example, AFAIR restify depend on a 5MB spdy library even >>> though very few people use spdy. So there's no point to try to save >>> diskspace I guess, 'cause nobody doing that anyway. >> I'm deplo

[nodejs] Re: modules & deploying non-production code e.g. (docs/examples/tests?)

2013-06-13 Thread Alex Kocharin
I'm sending a response back to mailing list 'cause I was being stupid and sent it to private... >> There is a good reason. If a github repository will cease to exist somehow, it ensures that docs and examples won't be lost. > npm shouldn't be considered a backup solution So what?...It's customar

[nodejs] Re: Show Me Your Blog

2013-06-13 Thread jmar777
I post occasionally on http://devsmash.com. Mostly Node.js, MongoDB, and updates on side projects. On Wednesday, June 12, 2013 6:56:09 PM UTC-4, Alan Gutierrez wrote: > > I'd like to start to write a about the stuff I'm doing with Node.js. I'd > like to > make it as easy for you to read as pos

Re: [nodejs] Re: Stream write/drain/etc

2013-06-13 Thread // ravi
On Jun 13, 2013, at 1:37 AM, mscdex wrote: > On Jun 12, 7:01 pm, // ravi wrote: > > If you continue to write() after write() returns false but before > 'drain' is emitted, the writes will be buffered in user memory (e.g. > an array) because the kernel buffer is too full. > >> My question: what

[nodejs] Re: What is your favorite editor, (using QtCreator)?

2013-06-13 Thread greelgorke
https://groups.google.com/forum/?fromgroups#!searchin/nodejs/editor Am Mittwoch, 12. Juni 2013 17:28:04 UTC+2 schrieb surgemcgee: > > So hasd anyone got the *perfect* editor for Nodejs? I find that Qt Creator > works really well but does not auto complete the built-in stuff. I wonder > if there

[nodejs] Re: What is your favorite editor, (using QtCreator)?

2013-06-13 Thread Alex Kocharin
vim On Wednesday, June 12, 2013 7:28:04 PM UTC+4, surgemcgee wrote: > > So hasd anyone got the *perfect* editor for Nodejs? I find that Qt Creator > works really well but does not auto complete the built-in stuff. I wonder > if there is anyone who is accomplishing this, e.g. res.wri [write, >

[nodejs] Re: Passing variable to the command

2013-06-13 Thread Alex Kocharin
var execFile = require('child_process').execFile; execFile('lsof', ['-t', '-i:'+portnumber], function(err, stdout, stderr) { execFile('kill', [stdout], function(err, stdout, stderr) { // ... }); }); I'm skipping error checks for readability, but obviously they should be present in a

Re: [nodejs] Re: What is your favorite editor, (using QtCreator)?

2013-06-13 Thread Alan Hoffmeister
What you guys think about WebStorm? -- Att, Alan Hoffmeister 2013/6/13 Floby : > My editor doesn't work. I work my editor ;) > > > On Wednesday, 12 June 2013 17:28:04 UTC+2, surgemcgee wrote: >> >> So hasd anyone got the *perfect* editor for Nodejs? I find that Qt Creator >> works really well but

[nodejs] Re: What is your favorite editor, (using QtCreator)?

2013-06-13 Thread Floby
My editor doesn't work. I work my editor ;) On Wednesday, 12 June 2013 17:28:04 UTC+2, surgemcgee wrote: > > So hasd anyone got the *perfect* editor for Nodejs? I find that Qt Creator > works really well but does not auto complete the built-in stuff. I wonder > if there is anyone who is accompli

Re: [nodejs] Libuv or HTTP Breakage from 0.10.7 to 0.10.8

2013-06-13 Thread Ben Noordhuis
On Thu, Jun 13, 2013 at 1:52 AM, Paul Bohm wrote: > Hey: > > https://gist.github.com/enki/5770116 > > Works in 0.10.5 - 0.10.7, but breaks in 0.10.8 - 0.10.10. > > Are libuv or http changes responsible? I know you've already figured it out (saw the issue on the bug tracker) but for posterity, v0.

[nodejs] Passing variable to the command

2013-06-13 Thread Amit Kumar
I need to to free a port by running a command kill `lsof -t -i:4723` from a node.js file my code is var sys = require('sys') var exec = require('child_process').exec; var child; child = exec("kill `lsof -t -i:4723`", function (error, stdout, stderr) { sys.print('stdout: '

[nodejs] Libuv or HTTP Breakage from 0.10.7 to 0.10.8

2013-06-13 Thread Paul Bohm
Hey: https://gist.github.com/enki/5770116 Works in 0.10.5 - 0.10.7, but breaks in 0.10.8 - 0.10.10. Are libuv or http changes responsible? -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this messag

[nodejs] Are you an expert coder? Help node-sqlite3 implement user defined functions!

2013-06-13 Thread Matthew Kastor
So, it seems like python, ruby, php, etc. have all exposed the ability to create user defined functions for SQLite. This makes it possible to define functions in the implementing program language and then call those functions in your SQL statements. A typical use case is in defining a REGEXP fu

[nodejs] Re: stream.Writable._write throws

2013-06-13 Thread Tim Oxley
further info on this topic: http://www.devthought.com/2011/12/22/a-string-is-not-an-error/ On Thursday, 13 June 2013 04:00:57 UTC+8, mscdex wrote: > > On Jun 12, 3:05 pm, Mario Gruber wrote: > > callback('foo failed due bar'); > > FWIW: you should pass actual Error objects and not str

Re: [nodejs] What is your favorite editor, (using QtCreator)?

2013-06-13 Thread Michal Kruk
I'm using IntelliJ with node plugin Pozdrawiam Michał Kruk On Wed, Jun 12, 2013 at 6:57 PM, Abhay Rana wrote: > Nide is a beautiful IDE for node.js > > -- > Abhay Rana > http://about.me/n3m0 > > > On Wed, Jun 12, 2013 at 10:15 PM, José F. Romaniello < > jfromani

Re: [nodejs] Re: JS or node? require("http://scripthost/myModule.js");

2013-06-13 Thread Joe Developer
As I remember the Nodules package manager by Kris Zyp handled dynamic resolution and retrieval at runtime. And it is obviously an invaluable approach for browser side incarnations. On Jun 13, 2013 11:29 AM, "dhruvbird" wrote: > > You could use https://github.com/dhruvbird/http-sync to emulate th

[nodejs] modules & deploying non-production code e.g. (docs/examples/tests?)

2013-06-13 Thread Tim Oxley
Is there a good reason we should be keeping docs/examples etc in published npm packages? While this stuff is sometimes useful in development, it would be fun if there was way to easily generate a slim node_modules folder for a deployment that is devoid of anything that isn't executable in a pro