Re: [nodejs] Alleviating pressure on dependencies, the registry, and the module system

2013-10-26 Thread Alex Kocharin
I don't use shrinkwrap, instead I copy an entire folder from staging to production currently, and it works reasonably well. Anyway, if a library has a certain bug in version X, and it is fixed in version X+1, you have basically the same chance to have an some kind of an issue with it.

[nodejs] Re: Node.js high level API needed

2013-10-26 Thread Dennis Leukhin
суббота, 26 октября 2013 г., 2:52:55 UTC+3 пользователь Martin K. Schröder написал: In node, the higher level apis are created by the users (by combining existing modules into a larger project). And if anyone ever say that async io has to go, then I'm going to shoot that person

[nodejs] Re: Error handling: current state of affairs?

2013-10-26 Thread Benjamin Zuill-Smith
Would others agree from what has been discussed in this thread that the best approach is to use domains and try/catch? I am looking to prevent my express server from erroring out. It seems like try/catch will allow a domain to continue running and thus I can still respond to a user request,

[nodejs] Re: Error handling: current state of affairs?

2013-10-26 Thread Alex Kocharin
There's no such thing as best approach. It's a decision a developer has to make, and the decision should be based on a particular reasons, not on other people's opinions about what the best is. As far as I can see, the most common approach right now is just trying to catch all common errors

[nodejs] Crashing process on FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory

2013-10-26 Thread Vivek Goel
Hi, I have faced one issue, In stderr there was one log having message FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory But process didn't crashed. It was running. If it was fatal error , it should have been crashed right ? If yes, what could be the cause that it

Re: [nodejs] Chef-like tool powered by node.js?

2013-10-26 Thread Bruno Jouhier
Thanks to all. My review list is growing. My main use case is building setups by updating source trees from git, launching compilers (sometimes on remote machines because I need binaries for several OSes), downloading stuff from internet, etc. I did not really need all the power of Chef for

Re: [nodejs] Crashing process on FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory

2013-10-26 Thread Fedor Indutny
Hi! Could it be that it was dumping a core file, and thus hanging (because there was a lot of memory to dump)? What's your `ulimit -c`? On Sat, Oct 26, 2013 at 5:44 PM, Vivek Goel goelvivek2...@gmail.com wrote: Hi, I have faced one issue, In stderr there was one log having message FATAL

[nodejs] Re: application/vnd.api+json - IANA specification for the json api

2013-10-26 Thread Austin William Wright
That's not just any JSON document, but one with a particular well-defined structure to expose hyperlinks. It appears to be Yet Another Hypermedia JSON Format. On Friday, October 25, 2013 6:44:58 AM UTC-7, Gagle wrote: This may be of your interest, IANA approved the mime type of a json api:

[nodejs] Re: Error handling: current state of affairs?

2013-10-26 Thread Bruno Jouhier
You will have difficulties getting an agreement on a best approach. If you want something simple and robust, you may want to take a look the tools that let you write code in sync style. Most of them (all the ones based on fibers and generators, some of the CPS transforms) give you try/catch

Re: [nodejs] Re: Does not accept mesage from REDIS?

2013-10-26 Thread Brian Di Palma
What I meant was use const everywhere except where you intend to mutate the value/reference. I did not mean that the semantics of the two are the same, but that you should use const as much as you can and fall back to let where you can't. On Fri, Oct 25, 2013 at 10:42 PM, Rick Waldron

Re: [nodejs] Crashing process on FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory

2013-10-26 Thread Vivek Goel
I have ulimit set at unlimited. regards Vivek Goel On Sat, Oct 26, 2013 at 7:45 PM, Fedor Indutny fe...@indutny.com wrote: Hi! Could it be that it was dumping a core file, and thus hanging (because there was a lot of memory to dump)? What's your `ulimit -c`? On Sat, Oct 26, 2013 at

Re: [nodejs] Crashing process on FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory

2013-10-26 Thread Fedor Indutny
That basically means, that core dumps are enabled and the process isn't crashing, because OS is dumping data to disk. You should try setting it to 0, or waiting for dump to end. On Sat, Oct 26, 2013 at 9:38 PM, Vivek Goel goelvivek2...@gmail.com wrote: I have ulimit set at unlimited.

[nodejs] Re: Error handling: current state of affairs?

2013-10-26 Thread spion
I'll mention Promises, which give you async versions of try/catch/finally[1] and: - don't require code transformation - don't require new language features - don't require domains or native code (so they work in all browsers too) - provide an easy way to manage/dispose of resources [2] (which

[nodejs] the streams read method

2013-10-26 Thread Dave Clements
Hey guys, I've read up on previous posts, but I'm still left scratching my head a little when it comes to the finer details of the additional streams superset. In particular, the docs says of the read method : If size bytes are not available, then it will return null. [1] This isn't what

[nodejs] Pipe multiple read streams to single write stream?

2013-10-26 Thread Jan Van Ryswyck
Hi all, I am playing around with streams V2 and I was wondering whether it is possible to get the following example working somehow: // // Reading stuff // var ReadingStuff = function() { this._data = [1, 2, 3, 4, 5]; stream.Readable.call(this); }; util.inherits(ReadingStuff,

[nodejs] WebSql and opendatabase

2013-10-26 Thread Robert Steckroth
Now, this makes for easy application development. Now we can connect application local storage to the server without changing code styles and object structures. Also, testing can be done in Gecko based desktop browsers. Indurate openDatabase. A standard WebSql library.

[nodejs] Re: Pipe multiple read streams to single write stream?

2013-10-26 Thread Jonathan Ong
the read stream #1 will end the write stream when it is done. you don't want want that to happen. you'll want to `writingStuff.end()` yourself (not specifically this case, but in general, since the read stream #1 could take longer than #2): reader1.pipe(writer, {end: false})

[nodejs] Re: Pipe multiple read streams to single write stream?

2013-10-26 Thread Jonathan Ong
crap. that is terrible. don't use next tick. i wish i could edit the post. do this: reader1.once('end', function () { reader2.pipe(writer) }) reader1.pipe(writer, {end: false}) the difference is that the read streams will pipe consecutively. if you want them to pipe concurrently, you'll have

[nodejs] Spawn child process with stdout stderr going to the same file

2013-10-26 Thread Tim Cuthbertson
I want to spawn a child process and have *all* output go to the same file. I tried this: var fs = require('fs'), childProcess = require('child_process'); var output = fs.openSync('/tmp/output.log', 'w'); childProcess.spawn('bash', ['-c', 'echo STOUT; echo STDERR 2; echo DONE;'],

[nodejs] Re: the streams read method

2013-10-26 Thread mscdex
On Saturday, October 26, 2013 4:42:33 PM UTC-4, Dave Clements wrote: For my use case this behaviour is preferred, but I'm wondering why its not acting like the docs say, or am I misunderstanding something? The docs do need to be updated to note this. The reason is that if the stream is

Re: [nodejs] Spawn child process with stdout stderr going to the same file

2013-10-26 Thread Robert Steckroth
Well, not to be all let me tell ya, but if your will.. I would not use bash as a specified shell. 1. The users login shell which owns the script should be used. 2. This needs to be written in bash and called as a script. 3. DONE is a bash namespace Logs should be used instead. On Sat, Oct 26,

Re: [nodejs] Spawn child process with stdout stderr going to the same file

2013-10-26 Thread Tim Cuthbertson
I probably should clarified that I'm not actually running this silly inline bash script in my real code - that was to generate some sample output. My real application is running executable scripts (python, mostly). On Sunday, October 27, 2013 1:17:14 PM UTC+11, surgemcgee wrote: Well, not to