[nodejs] Re: Passing parameters in http.request module ?

2013-11-21 Thread Kevin Kragenbrink
If by 'parameters' you mean 'query parameters', you pass them as a part of 
the path (e.g. path : /baz?foo=bar)

On Wednesday, November 20, 2013 11:07:36 AM UTC-8, Ashutosh Das wrote:

 How to pass parameters in  http.request module ?

 In the document I cant find parameter option .


-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send 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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Re: Passing parameters in http.request module ?

2013-11-21 Thread Ashutosh Das
Thanks  :)


On Thu, Nov 21, 2013 at 9:45 AM, Kevin Kragenbrink ke...@writh.net wrote:

 If by 'parameters' you mean 'query parameters', you pass them as a part of
 the path (e.g. path : /baz?foo=bar)


 On Wednesday, November 20, 2013 11:07:36 AM UTC-8, Ashutosh Das wrote:

 How to pass parameters in  http.request module ?

 In the document I cant find parameter option .

  --
 --
 Job Board: http://jobs.nodejs.org/
 Posting guidelines:
 https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
 You received this message because you are subscribed to the Google
 Groups nodejs group.
 To post to this group, send 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

 ---
 You received this message because you are subscribed to a topic in the
 Google Groups nodejs group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/nodejs/znfDuYpMpx0/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] [module] npm-auto-dep new tool for managing dependencies

2013-11-21 Thread OhJeez
Hi,
I just published new tool for managing module dependencies, have a peek 
here:
https://github.com/OhJeez/npm-auto-dep

It differs from the ones already available, that it is interactive. You can 
modify version spec, ignore some dependencies, tell npm to get that one 
module from github etc.

It works by greping module sources (so Linux/Unix only), then some simple 
regexp heuristics to guess if given require is of external module. It asks 
user what to do with every module it finds, and then changes dependencies 
in package.json as needed (after confirmation).

If it proves to be in anyway popular I would consider adding these:

   - Removing dependencies (now they can be only added or changed)
   - Better git repository handling (hash revision specifying, custom 
   repositories)
   - Managing of devDependencies
   - Moving deps between production and dev

Feel welcomed to drop an issue on github if something is working not as 
expected or if you would like to see a new feature! (including those above)

Cheers

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Re: how to create a singleton

2013-11-21 Thread Kamil Leszczuk
 For example, if I have a module for emailing with a send() method on it,
I don't have it export a constructor; I have it export an object.  That
object might maintain some state or it might not.  When the module is
subsequently require()'d, it will have any state that it has accumulated
since.

For.most of the time, that's unnecessary - multiple require() calls for the
same module return same, cached module, so you can store state just by
using local variables in that module.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Re: how to create a singleton

2013-11-21 Thread Reza Razavipour
this I get the jist of the conversation but my Javascript skills, less than 
2 months, does not allow me to be able to code this up.
Also, as a starter in the new language the last thing I want to do is to 
miss out on the language correct way of things and force lets say the Java 
way of doing things in JS.

Can you show me a skeleton of such function and a tiny consumer of that? 
The reason I say that is the fact that all of the examples are all done in 
the same JS file and not setup as module and when I try to change to a 
module and a consumer, I run into syntax problems and 

I do not understand the difference between a class exporting an object as 
opposed to a constructor


Thank you so much for showing me the correct way
On Thursday, November 21, 2013 7:37:32 AM UTC-8, Kamil Leszczuk wrote:

 Aah, nevermind then, I misunerstood ;)
 21 lis 2013 16:36 Gregg Caines gr...@caines.ca javascript: 
 napisał(a):

 Yeah... that's what I'm saying :)

 G


 On Thu, Nov 21, 2013 at 7:33 AM, Kamil Leszczuk 
 kami...@gmail.comjavascript:
  wrote:

  For example, if I have a module for emailing with a send() method on 
 it, I don't have it export a constructor; I have it export an object.  That 
 object might maintain some state or it might not.  When the module is 
 subsequently require()'d, it will have any state that it has accumulated 
 since.

 For.most of the time, that's unnecessary - multiple require() calls for 
 the same module return same, cached module, so you can store state just by 
 using local variables in that module.
  
 -- 
 -- 
 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
  
 --- 
 You received this message because you are subscribed to a topic in the 
 Google Groups nodejs group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/nodejs/GmUto9AN47U/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 nodejs+un...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.


  -- 
 -- 
 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
  
 --- 
 You received this message because you are subscribed to the Google Groups 
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to nodejs+un...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Re: need help: readable stream flowing mode on Windows

2013-11-21 Thread mscdex
On Wednesday, November 20, 2013 2:03:00 PM UTC-5, Laurent Fortin wrote:

 Shouldn't the readable stream be in flowing mode after resuming?


IIRC flowing mode is for streams2. By calling resume() here you are 
switching to old mode (streams1), so flowing is not set/used.

On Wednesday, November 20, 2013 2:15:11 PM UTC-5, Laurent Fortin wrote:

 Also, after doing:

 readable.pipe( process.stdout );

 the 'pipes' property inside the readable._readableState object is still 
 === null ...


This is also correct. Again when switching to old mode, the pipe() 
implementation is changed[1] to the (streams1) pipe() from stream.js which 
has no knowledge of _readableState. Therefore .pipes, .pipesCount, etc. are 
not modified.


[1] https://github.com/joyent/node/blob/v0.10/lib/_stream_readable.js#L738

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Node v0.11.9 (Unstable)

2013-11-21 Thread mscdex
On Thursday, November 21, 2013 9:33:18 AM UTC-5, Matt Sergeant wrote:


 On Wed, Nov 20, 2013 at 7:46 PM, Timothy J Fontaine 
 tjfon...@gmail.comjavascript:
  wrote:

 * build: make v8 use random seed for hash tables (Ben Noordhuis)


 Is this a fix for an algorithmic complexity attack like this: 
 http://blog.booking.com/hardening-perls-hash-function.html ?


IIRC the change was made because v8 had previously been using a random seed 
by default but they recently changed that upstream.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Node v0.11.9 (Unstable)

2013-11-21 Thread Matt
On Wed, Nov 20, 2013 at 7:46 PM, Timothy J Fontaine tjfonta...@gmail.comwrote:

 * build: make v8 use random seed for hash tables (Ben Noordhuis)


Is this a fix for an algorithmic complexity attack like this:
http://blog.booking.com/hardening-perls-hash-function.html ?

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Cachemere - Server side file caching engine which efficiently serves static files (keeps the preprocessed/gzipped version in cache so no need to recompress).

2013-11-21 Thread Jon
This is a tool I wrote which helps create efficient Node.js file servers 
and it also offers an auto-updating cache layer.
It caches preprocessed, gzipped file contents and also handles ETags by 
default for client-side caching.
It automatically updates the preprocessed, gzipped content whenever a 
cached file changes on the file system so you don't have to manually 
invalidate the cache or wait for a timeout.

Looking for feedback and contributors.

https://github.com/topcloud/cachemere

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Node.js ODM for Couchbase

2013-11-21 Thread Brett Lawson
Hi,

I have been working on building a simple to use ODM for Node.js and 
Couchbase and am looking for suggestions and trying to gauge how much 
interest exists for such a tool.

https://github.com/brett19/node-ottoman


Currently it supports quite a few things, here is an example:

var User = Ottoman.model('User', {
  'username': 'string',
  'name': 'string',
  'email': 'string'}, {
  bucket: new couchbase.Connection({})});
var test = new User();test.username = 'brett19';test.name = 'Brett 
Lawson';test.email = 'bret...@test.com';
Ottoman.save(test, function(err) {
  if (err) throw err;

  MyModel.findById(test._id, function(err, obj) {
if (err) throw err;

console.log(obj.name);
// Brett Lawson
  });});


Cheers, Brett

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Paul Serby talking at the LXJS conference about his decision on switching to Node.JS http://bit.ly/18SjKrd

2013-11-21 Thread Matt
On Thu, Nov 21, 2013 at 6:20 AM, Jenny Davis jenny.da...@clock.co.ukwrote:

 Paul details the problems he the tech team had been experiencing with PHP,
 and therefore why he decided to switch to Node.js.


People may also be interested in a talk I gave at the Toronto Node.JS
meetup this week on switching from Rails to Node:
http://www.slideshare.net/MattSergeant/rails2-node

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Re: how to create a singleton

2013-11-21 Thread Gregg Caines
The singleton pattern is actually unnecessary in most languages outside of 
java, including javascript.  You should be wary of any javascript book that 
tries to teach you singletons at all.  Many of those gang of four patterns 
simply don't translate outside of java and c++ (eg if you want to implement 
command, strategy, or factory patterns, you should really first check out 
javascript's first class functions.).

So how do you achieve the same effect in javascript?  In the browser, you 
have globals.  If you want just one instance of a thing, create it, and set 
it to a global variable.  You can use that global variable everywhere.  (If 
you're thinking but global variables are bad!, I mostly agree.  This is 
one of the reasons that the singleton itself is actually considered an 
anti-pattern by many.

In node, the module system is a global namespace that can maintain state, 
so that's the appropriate way to achieve the same effect.  I do this in 
node applications all the time.  For example, if I have a module for 
emailing with a send() method on it, I don't have it export a constructor; 
I have it export an object.  That object might maintain some state or it 
might not.  When the module is subsequently require()'d, it will have any 
state that it has accumulated since.

All of this is a bit hairy because we're talking about global state (which 
is the main impetus for singletons, when you get right down to it).  
Whatever you decide to do though, keep in mind that writing idiomatic code 
in any language means using the features of that language, and not 
translating java/C++ idioms into it.  It will be an extremely rare 
javascripter that will want to work on your code if you've got singletons 
in it.

G



On Monday, November 18, 2013 3:38:09 PM UTC-8, Reza Razavipour wrote:

 A newbie question...

 I have an app that connects and reuses the same connection to a remote 
 database and a connection to a remote soap server.
 I want to implement a singleton pattern for each of these. I am used to 
 doing that in C++ and Java but want to know what the standard 
 implementation for a Singleton pattern is in node.js.

 Any recommendations or references.




-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Re: how to create a singleton

2013-11-21 Thread Rick Waldron
I recommend being wary of any broad generalizations about programming
patterns :P

Rick


On Thu, Nov 21, 2013 at 7:13 AM, Gregg Caines cai...@gmail.com wrote:

 The singleton pattern is actually unnecessary in most languages outside of
 java, including javascript.  You should be wary of any javascript book that
 tries to teach you singletons at all.  Many of those gang of four patterns
 simply don't translate outside of java and c++ (eg if you want to implement
 command, strategy, or factory patterns, you should really first check out
 javascript's first class functions.).

 So how do you achieve the same effect in javascript?  In the browser, you
 have globals.  If you want just one instance of a thing, create it, and set
 it to a global variable.  You can use that global variable everywhere.  (If
 you're thinking but global variables are bad!, I mostly agree.  This is
 one of the reasons that the singleton itself is actually considered an
 anti-pattern by many.

 In node, the module system is a global namespace that can maintain state,
 so that's the appropriate way to achieve the same effect.  I do this in
 node applications all the time.  For example, if I have a module for
 emailing with a send() method on it, I don't have it export a constructor;
 I have it export an object.  That object might maintain some state or it
 might not.  When the module is subsequently require()'d, it will have any
 state that it has accumulated since.

 All of this is a bit hairy because we're talking about global state (which
 is the main impetus for singletons, when you get right down to it).
 Whatever you decide to do though, keep in mind that writing idiomatic code
 in any language means using the features of that language, and not
 translating java/C++ idioms into it.  It will be an extremely rare
 javascripter that will want to work on your code if you've got singletons
 in it.

 G




 On Monday, November 18, 2013 3:38:09 PM UTC-8, Reza Razavipour wrote:

 A newbie question...

 I have an app that connects and reuses the same connection to a remote
 database and a connection to a remote soap server.
 I want to implement a singleton pattern for each of these. I am used to
 doing that in C++ and Java but want to know what the standard
 implementation for a Singleton pattern is in node.js.

 Any recommendations or references.


  --
 --
 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

 ---
 You received this message because you are subscribed to the Google Groups
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Re: need help: readable stream flowing mode on Windows

2013-11-21 Thread Laurent Fortin
That makes lots of sense...


My Linux Ubuntu environment has nodejs v0.11.8 installed on it, which has 
streams3 api with flowing / non flowing mode.

My Windows environment has v0.10.22 ...


Thanks mscdex !!



On Thursday, 21 November 2013 10:22:15 UTC-5, mscdex wrote:

 On Wednesday, November 20, 2013 2:03:00 PM UTC-5, Laurent Fortin wrote:

 Shouldn't the readable stream be in flowing mode after resuming?


 IIRC flowing mode is for streams2. By calling resume() here you are 
 switching to old mode (streams1), so flowing is not set/used.

 On Wednesday, November 20, 2013 2:15:11 PM UTC-5, Laurent Fortin wrote:

 Also, after doing:

 readable.pipe( process.stdout );

 the 'pipes' property inside the readable._readableState object is still 
 === null ...


 This is also correct. Again when switching to old mode, the pipe() 
 implementation is changed[1] to the (streams1) pipe() from stream.js which 
 has no knowledge of _readableState. Therefore .pipes, .pipesCount, etc. are 
 not modified.


 [1] https://github.com/joyent/node/blob/v0.10/lib/_stream_readable.js#L738


-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Cachemere - Server side file caching engine which efficiently serves static files (keeps the preprocessed/gzipped version in cache so no need to recompress).

2013-11-21 Thread Mikeal Rogers
You might want to have a look at jaws

https://github.com/mikeal/jaws

You also probably want to start storing this stuff in isaacs' LRU.

https://github.com/isaacs/node-lru-cache

-Mikeal

On Nov 21, 2013, at 3:06PM, Jon flashth...@gmail.com wrote:

 This is a tool I wrote which helps create efficient Node.js file servers and 
 it also offers an auto-updating cache layer.
 It caches preprocessed, gzipped file contents and also handles ETags by 
 default for client-side caching.
 It automatically updates the preprocessed, gzipped content whenever a cached 
 file changes on the file system so you don't have to manually invalidate the 
 cache or wait for a timeout.
 
 Looking for feedback and contributors.
 
 https://github.com/topcloud/cachemere
 
 -- 
 -- 
 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
  
 --- 
 You received this message because you are subscribed to the Google Groups 
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Re: how to create a singleton

2013-11-21 Thread Reza Razavipour
Ok so this is the way i have it constructed... SoapClient is my module and 
I want it to be used as a singleton, i.e. if it is initialized, it just 
returns the connection, or SoapClient.instance...

var SoapClient = function() {

 var soap = require('soap');
 this.init = function (){
 var url = http://172.31.19.39/MgmtServer.wsdl;;
 var endPoint = https://172.31.19.39:9088;;
 var options = {};
 options.endpoint = endPoint;
 soap.createClient(url, options, function(err, result) {
 if (err) {
 console.log('soap client create failed ' + err);
 return;
 }
 console.log('init is called ready');
 SoapClient.instance = result;
 SoapClient.instance.setSecurity(new soap.BasicAuthSecurity(
 'admin-priv', 'password'));
 });
 };
 };
 SoapClient.getInstance  = function () {
 if (SoapClient.instance) {
 return SoapClient.instance;
 }
 new SoapClient().init();
 return SoapClient.instance;
 };
 SoapClient.instance = null;
 module.exports = SoapClient;

 
Thoughts

On Thursday, November 21, 2013 8:34:14 AM UTC-8, Reza Razavipour wrote:

 this I get the jist of the conversation but my Javascript skills, less 
 than 2 months, does not allow me to be able to code this up.
 Also, as a starter in the new language the last thing I want to do is to 
 miss out on the language correct way of things and force lets say the Java 
 way of doing things in JS.

 Can you show me a skeleton of such function and a tiny consumer of that? 
 The reason I say that is the fact that all of the examples are all done in 
 the same JS file and not setup as module and when I try to change to a 
 module and a consumer, I run into syntax problems and 

 I do not understand the difference between a class exporting an object as 
 opposed to a constructor


 Thank you so much for showing me the correct way
 On Thursday, November 21, 2013 7:37:32 AM UTC-8, Kamil Leszczuk wrote:

 Aah, nevermind then, I misunerstood ;)
 21 lis 2013 16:36 Gregg Caines gr...@caines.ca napisał(a):

 Yeah... that's what I'm saying :)

 G


 On Thu, Nov 21, 2013 at 7:33 AM, Kamil Leszczuk kami...@gmail.comwrote:

  For example, if I have a module for emailing with a send() method on 
 it, I don't have it export a constructor; I have it export an object.  
 That 
 object might maintain some state or it might not.  When the module is 
 subsequently require()'d, it will have any state that it has accumulated 
 since.

 For.most of the time, that's unnecessary - multiple require() calls for 
 the same module return same, cached module, so you can store state just by 
 using local variables in that module.
  
 -- 
 -- 
 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
 To unsubscribe from this group, send email to
 nodejs+un...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en
  
 --- 
 You received this message because you are subscribed to a topic in the 
 Google Groups nodejs group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/nodejs/GmUto9AN47U/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 nodejs+un...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


  -- 
 -- 
 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
 To unsubscribe from this group, send email to
 nodejs+un...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/nodejs?hl=en?hl=en
  
 --- 
 You received this message because you are subscribed to the Google 
 Groups nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to nodejs+un...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] file upload module with progress

2013-11-21 Thread Mark Hahn
Check out https://github.com/blueimp/jQuery-File-Upload.  I use it for node
uploading and it is awesome.  Shows great progress bars and will even show
thumbnail before upload starts.  Supports drag-and-drop.


On Thu, Nov 21, 2013 at 11:38 AM, Mark Hahn m...@reevuit.com wrote:

 Any uploader will work.  There are some great jquery-based ones.


 On Thu, Nov 21, 2013 at 1:54 AM, Jarrad Salmon jamhead...@gmail.comwrote:

 Hi

 I am looking for a client side module to upload files to my server via
 post.
 I thought this would be really easy to find but seems to be more
 difficult than I first imagined.

 I have found a couple of modules that do the uploading ok, such as:
 https://github.com/Topface/multiparter

 The issue is their is no progress event for the upload (i am uploading
 large files that can take upto 30mins to upload).
 A couple of posts mentioned I should be able to listen for the 'data'
 event on the readStream but in all my test cases the pipe never pauses so
 the data event finishes as soon as the file is read from my hard drive and
 not when it is uploaded.

 The other library I tried was: https://github.com/felixge/node-form-data but
 I had the same issue with the progress event.

 I am using node-webkit to build this application,

 --
 --
 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

 ---
 You received this message because you are subscribed to the Google Groups
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Node.JS for sysadmin scripting or non-web stuff - books, guides, examples?

2013-11-21 Thread Victor Hooi
Hi,

I'm curious on people's experiences with using Node.JS for sys-admin 
scripts or non-Web glue stuff - i.e. the sorts of things you might use Perl 
or Python for (e.g. log parsing, manipulating config files etc.)

Is Node.JS suitable for these things?

Are there any books or guides out there on these sorts of things? (Most of 
the books I've seen are geared to Node.JS purely as a web app language).

Or any detailed examples people have posted up of what they use it for?

Cheers,
Victor

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Node.JS for sysadmin scripting or non-web stuff - books, guides, examples?

2013-11-21 Thread Tim Smart
Grunt.js is a great place to start: http://gruntjs.com/

On Thu, Nov 21, 2013 at 05:23:59PM -0800, Victor Hooi wrote:
 Hi,
 
 I'm curious on people's experiences with using Node.JS for sys-admin 
 scripts or non-Web glue stuff - i.e. the sorts of things you might use Perl 
 or Python for (e.g. log parsing, manipulating config files etc.)
 
 Is Node.JS suitable for these things?
 
 Are there any books or guides out there on these sorts of things? (Most of 
 the books I've seen are geared to Node.JS purely as a web app language).
 
 Or any detailed examples people have posted up of what they use it for?
 
 Cheers,
 Victor
 
 -- 
 -- 
 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
 
 --- 
 You received this message because you are subscribed to the Google Groups 
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


signature.sig
Description: Digital Signature


Re: [nodejs] Re: how to create a singleton

2013-11-21 Thread Kamil Leszczuk
Aah, nevermind then, I misunerstood ;)
21 lis 2013 16:36 Gregg Caines gr...@caines.ca napisał(a):

 Yeah... that's what I'm saying :)

 G


 On Thu, Nov 21, 2013 at 7:33 AM, Kamil Leszczuk kamit...@gmail.comwrote:

  For example, if I have a module for emailing with a send() method on
 it, I don't have it export a constructor; I have it export an object.  That
 object might maintain some state or it might not.  When the module is
 subsequently require()'d, it will have any state that it has accumulated
 since.

 For.most of the time, that's unnecessary - multiple require() calls for
 the same module return same, cached module, so you can store state just by
 using local variables in that module.

 --
 --
 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

 ---
 You received this message because you are subscribed to a topic in the
 Google Groups nodejs group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/nodejs/GmUto9AN47U/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


  --
 --
 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

 ---
 You received this message because you are subscribed to the Google Groups
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Node.JS for sysadmin scripting or non-web stuff - books, guides, examples?

2013-11-21 Thread Andre Contreras
I've used in my company to make a tiny web hosting panel, it is working
very well.


2013/11/21 Tim Smart t...@fostle.com

 Grunt.js is a great place to start: http://gruntjs.com/

 On Thu, Nov 21, 2013 at 05:23:59PM -0800, Victor Hooi wrote:
  Hi,
 
  I'm curious on people's experiences with using Node.JS for sys-admin
  scripts or non-Web glue stuff - i.e. the sorts of things you might use
 Perl
  or Python for (e.g. log parsing, manipulating config files etc.)
 
  Is Node.JS suitable for these things?
 
  Are there any books or guides out there on these sorts of things? (Most
 of
  the books I've seen are geared to Node.JS purely as a web app language).
 
  Or any detailed examples people have posted up of what they use it for?
 
  Cheers,
  Victor
 
  --
  --
  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
 
  ---
  You received this message because you are subscribed to the Google
 Groups nodejs group.
  To unsubscribe from this group and stop receiving emails from it, send
 an email to nodejs+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/groups/opt_out.


-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[nodejs] Re: need help: readable stream flowing mode on Windows

2013-11-21 Thread Laurent Fortin
Hi Floby,

Thanks for your answer.

Yep, I know about the stream api.

I just need to access readable._readableState object properties for 
developing my module.



On Thursday, 21 November 2013 04:31:23 UTC-5, Floby wrote:

 I believe you should `push()` at some point.

 On Wednesday, 20 November 2013 20:03:00 UTC+1, Laurent Fortin wrote:

 Hi,


 I am currently working on a small toolkit module for handling data 
 streams (for the streams2 API).
 https://github.com/lfortin/node-stream-tk


 However I am getting a strange behavior on Windows.


 I am trying this in the REPL on the Windows platform:


 var readable = new stream.Readable( );
 readable._read = function( ) { }; // just implement a _read method
 readable.resume( );

 readable._readableState.flowing; // -- still equals 'false' even after 
 resume( ) ...


 Shouldn't the readable stream be in flowing mode after resuming?


 This was attempted using node v0.10.22.


 Please advise,


 Thanks in advance,


 -Laurent



-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Re: how to create a singleton

2013-11-21 Thread Gregg Caines
Yeah... that's what I'm saying :)

G


On Thu, Nov 21, 2013 at 7:33 AM, Kamil Leszczuk kamit...@gmail.com wrote:

  For example, if I have a module for emailing with a send() method on it,
 I don't have it export a constructor; I have it export an object.  That
 object might maintain some state or it might not.  When the module is
 subsequently require()'d, it will have any state that it has accumulated
 since.

 For.most of the time, that's unnecessary - multiple require() calls for
 the same module return same, cached module, so you can store state just by
 using local variables in that module.

 --
 --
 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

 ---
 You received this message because you are subscribed to a topic in the
 Google Groups nodejs group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/nodejs/GmUto9AN47U/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Node v0.11.9 (Unstable)

2013-11-21 Thread Alex Kocharin
On Thursday, November 21, 2013 7:26:16 PM UTC+4, mscdex wrote:

 On Thursday, November 21, 2013 9:33:18 AM UTC-5, Matt Sergeant wrote:


 On Wed, Nov 20, 2013 at 7:46 PM, Timothy J Fontaine 
 tjfon...@gmail.comwrote:

 * build: make v8 use random seed for hash tables (Ben Noordhuis)


 Is this a fix for an algorithmic complexity attack like this: 
 http://blog.booking.com/hardening-perls-hash-function.htmlhttp://www.google.com/url?q=http%3A%2F%2Fblog.booking.com%2Fhardening-perls-hash-function.htmlsa=Dsntz=1usg=AFQjCNEtUIo60iuV4ZdbcHOT---gszFqMQ?


 IIRC the change was made because v8 had previously been using a random 
 seed by default but they recently changed that upstream.


Yep, starting from this commit - https://github.com/v8/v8/commit/4bc70e8 - 
v8 is now using a random seed, which is equal to 314159265. Apparently, 
this number was carefully calculated by google quantum supercomputers and 
guaranteed to be random (see also http://xkcd.com/221/)

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] file upload module with progress

2013-11-21 Thread Mark Hahn
Any uploader will work.  There are some great jquery-based ones.


On Thu, Nov 21, 2013 at 1:54 AM, Jarrad Salmon jamhead...@gmail.com wrote:

 Hi

 I am looking for a client side module to upload files to my server via
 post.
 I thought this would be really easy to find but seems to be more difficult
 than I first imagined.

 I have found a couple of modules that do the uploading ok, such as:
 https://github.com/Topface/multiparter

 The issue is their is no progress event for the upload (i am uploading
 large files that can take upto 30mins to upload).
 A couple of posts mentioned I should be able to listen for the 'data'
 event on the readStream but in all my test cases the pipe never pauses so
 the data event finishes as soon as the file is read from my hard drive and
 not when it is uploaded.

 The other library I tried was: https://github.com/felixge/node-form-data but
 I had the same issue with the progress event.

 I am using node-webkit to build this application,

 --
 --
 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

 ---
 You received this message because you are subscribed to the Google Groups
 nodejs group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to nodejs+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [nodejs] Node.JS for sysadmin scripting or non-web stuff - books, guides, examples?

2013-11-21 Thread // ravi
On Nov 21, 2013, at 8:23 PM, Victor Hooi victorh...@gmail.com wrote:
 
 I'm curious on people's experiences with using Node.JS for sys-admin scripts 
 or non-Web glue stuff - i.e. the sorts of things you might use Perl or Python 
 for (e.g. log parsing, manipulating config files etc.)
 
 Is Node.JS suitable for these things?
 

Sure, JavaScript is a capable and feature-rich *high-level* language. NodeJS 
provides decent access to OS facilities, and NPM is a reliable source of 
additional functionality (even if it is no CPAN, or not yet CPAN). But I’d say, 
stepping strictly into personal opinion or preference territory, JavaScript (or 
Python for that matter) will never be as comfortable for sys-admin tasks as 
Perl. If having to carry the cognitive load of thorough-going async for 
inherently synchronous activities does not tax you, then the lack of Perl’s 
terse and intuitive (for a Unix-head) syntax for things like file test (-f, -l, 
etc), pipes (“|”), regular expressions, program execution (``), etc, might. 
Even if they do, it might be a small price to pay *if* the rest of your code is 
JavaScript/NodeJS.


 Are there any books or guides out there on these sorts of things? (Most of 
 the books I've seen are geared to Node.JS purely as a web app language).
 
 Or any detailed examples people have posted up of what they use it for?


Sorry, I do not know of any.

—ravi


-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
nodejs group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.