Re: [nodejs] html5 video not working with node.js

2012-11-12 Thread Mark Hahn
> when I embed the video in the html file of node server

What do you mean by embed?  Surely you don't mean putting the video data in
an actual .html file.

On Mon, Nov 12, 2012 at 1:16 PM, Yash Girdhar 
wrote:
>
> I am trying to play a video using html5 video tag in chrome. when I play
the video in a different file, containing just the video tag, the video is
playing.but when I embed the video in the html file of node server, it is
not.
>
> The other functionalities of the node server are working as expected( I
have build an dynamic drawing board, and its working on the server).
>
> what can be the reason behind this?
>
> thank you
>
> --
> 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: trying to wrap my head around "promises" - async vs Q

2012-11-12 Thread Mark Hahn
> because you have to define named callback functions first.

No you don't.  I always name then in order ...

func1 = ->  do something; func2()

func2 = -> do something; func3()

func3 = -> do something

func1()

On Mon, Nov 12, 2012 at 2:48 PM, Andy  wrote:

> One of them problems even with this approach is that you write and read
> code backwards. It executes bottom to top because you have to define named
> callback functions first. I find it much more natural with promises because
> not only is your code organized, but it reads top to bottom and is MUCH
> easier to trace flow.
>
> On Monday, November 12, 2012 1:39:37 AM UTC-8, greelgorke wrote:
>>
>>
>> function execCB(err, stdout,stderr){
>> require('assert').ok(~stdout.**indexOf( this ))
>> }
>>
>> function lolAssert(){
>>   var forClojure = 'lol'
>>   require('child_process').exec(**'echo lol', execCB.bind(forClojure))
>> }
>>
>  --
> 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: trying to wrap my head around "promises" - async vs Q

2012-11-12 Thread Mark Hahn
Read the message before this.  I explained how it works in a forward way
with your preferred method of function definition.  That is what I always
use.

On Mon, Nov 12, 2012 at 3:46 PM, Andy  wrote:

>
>
>>
>> In JavaScript the order you define things doesn't matter.
>>
>
> It does if your function declaration style is var funcName = function() {
> }; which is the style I use. Personal preference obviously.
>
>>  --
> 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: trying to wrap my head around "promises" - async vs Q

2012-11-12 Thread Mark Hahn
P.S.  Coffeescript only supports that way of defining a function.

On Mon, Nov 12, 2012 at 3:51 PM, Mark Hahn  wrote:

> Read the message before this.  I explained how it works in a forward way
> with your preferred method of function definition.  That is what I always
> use.
>
>
> On Mon, Nov 12, 2012 at 3:46 PM, Andy  wrote:
>
>>
>>
>>>
>>> In JavaScript the order you define things doesn't matter.
>>>
>>
>> It does if your function declaration style is var funcName = function() {
>> }; which is the style I use. Personal preference obviously.
>>
>>>  --
>> 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] html5 video not working with node.js

2012-11-13 Thread Mark Hahn
BTW, serving files through node is slow and inefficient.  I would never
think to send big video files through the V8 engine.  Use nginx on the
front end, or another of several good options.

On Tue, Nov 13, 2012 at 2:00 AM, Yash Girdhar wrote:

>
> So, how can I serve the video in the same way as I am serving the file,
> i.e. defining a route for that.
> right now, I am just giving the path of the video in the src attribute of
> video tag
> On Tuesday, 13 November 2012 05:27:00 UTC+5:30, ryandesign wrote:
>>
>>
>> On Nov 12, 2012, at 16:32, Nathan Rajlich 
>> wrote:
>>
>> > Are you implementing the static file serving yourself?
>>
>> The only route defined in app.js is:
>>
>> app.get('/', function (req, res) {
>>   res.sendfile(__dirname + '/index.html');
>> });
>>
>> Therefore "/" is the only route that will be served. If you also want to
>> serve "/test.mp4", then you will need to define a route for that, or hook
>> up some static middleware as Nate said.
>>
>>
>>  --
> 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] fibers 0.5; say "no" callbacks (when it makes sense in your application)

2012-11-13 Thread Mark Hahn
> So, I don't see a point of argue there

Many, including myself, will argue.

On Tue, Nov 13, 2012 at 10:52 AM, Alexey Petrushin <
alexey.petrus...@gmail.com> wrote:

> I personally feel that Node.js has two completely different application
> areas:
>
> - High performant services when performance and simple stack is the key
> (like C, Erlang and so on).
> - End user applications - when code simplicity and development
> productivity is the key (Web Dev, RoR).
>
> They require different styles - callbacks for services, and fibers for
> applications. So, I don't see a point of argue there, both areas are
> important and both require attention.
>
> --
> 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: Where do you put the meat and potatoes code?

2012-11-23 Thread Mark Hahn
> As for sharing modules between client and server, I agree there isn't a
shared convention for this yet

I highly recommend using a library in the client to support the identical
modules used in the backend.  They  are quite easy to use.  Then get in the
habit of using modules everywhere including client-only code.


On Fri, Nov 23, 2012 at 6:12 AM, Jeff Schwartz wrote:

> You have to make sure when exposing app (or any object or value) via
> exports that it is initialized prior to being required by any other module.
> So in this case the routing module would break if it were required by
> server.js prior to app having been initialized. I use this technique a lot.
> It allows routing modules to act as controllers. Combined with common.js
> ability to modularize whole folders through index.js then allows
> encapsulating all your controllers in a structured manner. I wrote an
> article on this very subject which can be found at
> http://jefftschwartz.wordpress.com/2012/09/10/taming-those-unruly-routes/.
> This article was a follow up to another article which explores using
> folders for encapsulation in common.js and that article can be found at
> http://jefftschwartz.wordpress.com/2012/08/23/use-express-route-specific-middleware-to-access-mongodb/
> .
>
> --
> 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: Where do you put the meat and potatoes code?

2012-11-24 Thread Mark Hahn
By library I meant a single piece of code that runs in the client to load
and link modules such as Yabble .

I use commonJS modules, both public ones available on npm and elsewhere,
and my own private modules.  All code is in modules and many run on either
the server or the client.



On Sat, Nov 24, 2012 at 7:51 PM, netpoetica  wrote:

> Mark - could you elaborate a little more on that? It seems like in Node
> the words "exports" "modules" and "libraries" are all used somewhat
> interchangeably although I don't think people always mean them the way they
> are using them.
>
> When you say library, I almost start to think of npm and the modules in
> there, and I most certainly don't think you mean that, or that anyone would
> want my super-specific application code in NPM.
>
> When I think of a library, I think of an API like jQuery or a plugin like
> TouchSwipe for touch events. I'm just a bit unsure what you mean by library
> here
>
> Thanks a bunch
> -Keith
>
> --
> 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] JavaScript Control - lies and wizardry

2012-11-27 Thread Mark Hahn
Awesome work.  I have dreamed for years about a debugger that could step
backwards.

1) Can someone tell me what a sha (sp?) dictionary is?

2) It seems this would mainly be useful as a teaching tool because I don't
see how it could work with non-deterministic behavior such as io events.





On Mon, Nov 26, 2012 at 8:11 PM, Michael Bradley, Jr. <
michaelsbradle...@gmail.com> wrote:

> On November 15 at the Saint Louis JavaScript Meetup (STLJS), Perrin
> Westrich (a.k.a @CrytpicSwarm) presented an impressive demo of a "code
> walking" tool he's been developing, which leverages some source
> transformation wizardry of his own devising.
>
> The presentation was recorded and is now available online:
>
> http://vimeo.com/stljs/control
>
> Enjoy!
>
> I think he's planning to release the code on GitHub, but hasn't done so
> yet.
>
> The link to the video has also been posted on Hacker News:
>
> http://news.ycombinator.com/item?id=4835452
>
>  --
> 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] JavaScript Control - lies and wizardry

2012-11-27 Thread Mark Hahn
>  When you go backward what has already happened won't change.

Awesome.  So it is the answer to my dream of going backwards to see what
caused some state change.

Could this be used in a real app?  It seems the expansion of code would
slow things down too much to observe a real app's behavior.  Also the
memory usage of all the data-structures would be excessive in long running
apps.  Maybe there could be a trimmed down version that only keeps a finite
amount of history so the app could run forever?

I'm not knocking it.  It is useful in a zillion instances I can think of,
not just teaching.



On Tue, Nov 27, 2012 at 2:17 PM, Cryptic Swarm wrote:

> 1) Can someone tell me what a sha (sp?) dictionary is?
>
> Sha -> Hash.  In the video those were Sha1 hashes.
> Dictionary -> JavaScript Object
>
> Example:
> { '3b9e33965edbaf4094947aca1b8d59eacfd2ef47': { usefulInfo:123 },
>   '98cbccef9dd0f6f70a48baf03fdfb98fb0f70b4f': { moreInfo: 456 } }
>
>
> 2) It seems this would mainly be useful as a teaching tool because I don't
>> see how it could work with non-deterministic behavior such as io events.
>
>
> Yes, mainly useful for teaching/learning purposes, but not really because
> of io events.  Once something happens it, it happened.  The data-structures
> are immutable.   When you go backward what has already happened won't
> change.  However, when you go forward again you will potentially fork the
> computation tree (if going forward has a different side effect than
> previously).
>
> Example:
> var x = Math.random()
>
> --
> 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] JavaScript Control - lies and wizardry

2012-11-27 Thread Mark Hahn
Also, could you go backwards and then continue from the final state in
order to avoid forking the history?


On Tue, Nov 27, 2012 at 2:36 PM, Mark Hahn  wrote:

> >  When you go backward what has already happened won't change.
>
> Awesome.  So it is the answer to my dream of going backwards to see what
> caused some state change.
>
> Could this be used in a real app?  It seems the expansion of code would
> slow things down too much to observe a real app's behavior.  Also the
> memory usage of all the data-structures would be excessive in long running
> apps.  Maybe there could be a trimmed down version that only keeps a finite
> amount of history so the app could run forever?
>
> I'm not knocking it.  It is useful in a zillion instances I can think of,
> not just teaching.
>
>
>
> On Tue, Nov 27, 2012 at 2:17 PM, Cryptic Swarm wrote:
>
>> 1) Can someone tell me what a sha (sp?) dictionary is?
>>
>> Sha -> Hash.  In the video those were Sha1 hashes.
>> Dictionary -> JavaScript Object
>>
>> Example:
>> { '3b9e33965edbaf4094947aca1b8d59eacfd2ef47': { usefulInfo:123 },
>>   '98cbccef9dd0f6f70a48baf03fdfb98fb0f70b4f': { moreInfo: 456 } }
>>
>>
>> 2) It seems this would mainly be useful as a teaching tool because I
>>> don't see how it could work with non-deterministic behavior such as io
>>> events.
>>
>>
>> Yes, mainly useful for teaching/learning purposes, but not really because
>> of io events.  Once something happens it, it happened.  The data-structures
>> are immutable.   When you go backward what has already happened won't
>> change.  However, when you go forward again you will potentially fork the
>> computation tree (if going forward has a different side effect than
>> previously).
>>
>> Example:
>> var x = Math.random()
>>
>> --
>> 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] JavaScript Control - lies and wizardry

2012-11-27 Thread Mark Hahn
> Haven't worked on it since the presentation.

This seems valuable enough for you to get help.  I'd love to help with this
but I'm not available at the moment.  Some serious thinking about the
direction it should take  would be needed first.


On Tue, Nov 27, 2012 at 2:47 PM, Cryptic Swarm wrote:

>
>
> On Tue, Nov 27, 2012 at 4:38 PM, Mark Hahn  wrote:
>
>> Also, could you go backwards and then continue from the final state in
>> order to avoid forking the history?
>
> Yes
>
>
>
>> On Tue, Nov 27, 2012 at 2:36 PM, Mark Hahn  wrote:
>>
>>> >  When you go backward what has already happened won't change.
>>>
>>> Awesome.  So it is the answer to my dream of going backwards to see what
>>> caused some state change.
>>>
>> Hopefully :D Still working on some of the other parts, but currently
> individual scope objects can be go backwards.  Haven't worked on it since
> the presentation.  Funny how deadlines have a tendency of getting things
> done.
>
>
>>
>>> Could this be used in a real app?  It seems the expansion of code would
>>> slow things down too much to observe a real app's behavior.  Also the
>>> memory usage of all the data-structures would be excessive in long running
>>> apps.  Maybe there could be a trimmed down version that only keeps a finite
>>> amount of history so the app could run forever?
>>>
>> Intuition tells me using it in a real app would be a no-go. Won't know
> the full overhead till I try through :)
>
>
> --
> 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] Feature/Comparison Matrix for Node.js vs PHP

2012-11-28 Thread Mark Hahn
It would be like comparing apples and oranges.  Node.js is not a language
or template.  You need to compare javascript to the php language.

You should be aware that nodejs is lower-level.  You end up writing more,
and the async code requires a learning curve, but you have a lot more
freedom.  And of course node is much more powerful in terms of handling
zillions of connections at once.

I'm sure you will find tons of facts if you google "nodejs versus php".
 Or, better yet, study tutorials for each.


On Wed, Nov 28, 2012 at 3:46 PM, Sean  wrote:

> Hey all, has anyone found a good feature/comparison matrix between node.js
> vs php? We're trying to decide which way to go and there's a lot of
> emotional argument on either side but I can find little fact.
>
> Thanks in advance!
>
>
>  --
> 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: Debugging with node.js

2012-11-29 Thread Mark Hahn
>  if I browse to http://0.0.0.0:8080/debug?port=5858

You need to replace 0.0.0.0 with an ip address to your server.

-- 
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: Feature/Comparison Matrix for Node.js vs PHP

2012-11-29 Thread Mark Hahn
If you are just caching then nodejs is a much better solution.  For
that matter nginx may help or even replace node.

On Thu, Nov 29, 2012 at 10:36 AM, Sean  wrote:
> Thanks all, the context is a simple web app that exposes data points that
> will be served behind edge server caching. To be more specific I am
> comparing node.js to symfony for php. All of your answers so far have been
> helpful, thanks!
>
> On Wednesday, November 28, 2012 3:46:04 PM UTC-8, Sean wrote:
>>
>> Hey all, has anyone found a good feature/comparison matrix between node.js
>> vs php? We're trying to decide which way to go and there's a lot of
>> emotional argument on either side but I can find little fact.
>>
>> Thanks in advance!
>>
>>
> --
> 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] [ANN] Node module to access Basecamp JSON API

2012-12-03 Thread Mark Hahn
Basecamp

A nodejs module that wraps the Basecamp <http://37signals.com/> JSON api.

The Basecamp github project can be found
here<https://github.com/mark-hahn/basecamp>
.
 <https://github.com/mark-hahn/basecamp#features>Features

   - Supports new Basecamp JSON api (not old xml)
   - Built-in oauth2 support
   - Tools to link app to Basecamp account by visiting 37signals website
   - Supports all 57 api requests (GET, POST, and PUT)
   - Terminology, params, and command ops match api documentation
   - Data can be objects, streams, or files
   - Supports simultaneous multiple accounts

This module is working in my application but it needs a lot of testing
since I'm only using about 10 of the commands that relate to projects,
messages, attachments, and comments.  All commands are expected to work.

I sure could use some help finishing this up and getting it to beta.  It
needs unit tests which are going to be hard since I can't imagine mocking
the entire basecamp API.

-- 
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] A simple implementation of fs.write(fd, buffer, offset, length, position, [callback])

2012-12-03 Thread Mark Hahn
Your code is html.  fs.write is javascript that runs on the server.
What are you trying to do?

On Mon, Dec 3, 2012 at 10:06 AM, Network Individual
 wrote:
> I have a text file with three html elements.
>
> 
> lorem ipsum
> 
>
> 
> ghhj
> 
>
> 
> wywygy
> 
>
> Can i use the function
>
> fs.write(fd, buffer, offset, length, position, [callback])
>
>
>
> to write before before article id=1 or after article id=3 or anywhere i want
> to?.
>
> --
> 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] What's the default value for buffer

2012-12-07 Thread Mark Hahn
I would guess the rule is that there is no rule.

On Fri, Dec 7, 2012 at 6:13 PM, Goddy Zhao  wrote:
> var buf = new Buffer[1];
> console.log(buf[0]);
>
> The above code will print a random value of buf[0], anyone know why the
> default value of a buffer element is not 0 but a random one, and what's the
> rule of the value?
>
> --
> 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 do you speed up file sending in json format

2012-12-08 Thread Mark Hahn
That makes no sense.  A file is a file.  The contents of the file
should not affect the speed it is sent.

On Sat, Dec 8, 2012 at 8:43 PM, Ket  wrote:
> Hello,
>
> I found that the speed of file sending through node.js in a jason format has
> been reduced dramatically.
>
> Anyone know how to speed this thing up. My file sending speed is virtually
> real time without json. But with it, file receiving is almost 4 minute delay
> in the other end.
>
> Thank you,
>
> --
> 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 do you speed up file sending in json format

2012-12-08 Thread Mark Hahn
>  But through web server the speed reduced dramatically.

Once again you don't make sense.  Why is node slow in a web server?
That is what node was designed for.

You are just making random statements instead of referring to facts or
even anything logical.

-- 
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] Running NodeJs inside JVM

2012-12-10 Thread Mark Hahn
Lua is the king of embedded languages.  Give it a try.

On Mon, Dec 10, 2012 at 10:36 AM, prashant pandey
 wrote:
> Hi Alan,
>
> thanks for your time.
> Let me tell bit more about the use-case. I want to run the nodeJs program
> inside OSGi (equinox). For that matter I would need a plugin bundle of
> NodeJs library to be loaded inside OSGi. Is there a way to that?
>
> Thanks,
> Prashant
>
> On Sunday, December 9, 2012 2:31:30 AM UTC+5:30, Alan Gutierrez wrote:
>>
>> Excellent guidance from everyone. I wanted to add...
>>
>> Just run node as a child process of your JVM application. The node
>> executable is small and easy to redistribute. Node now runs in as many
>> places as the JVM. I find that the promise of write once, run everywhere
>> is easier to realize with Node.js than with Java.
>>
>> --
>> Alan Gutierrez - @bigeasy
>>
>> On 12/7/12 7:14 PM, Rick Waldron wrote:
>> > I believe Nashorn purports to be a Node compatible JS engine on the JVM
>> >
>> >
>> > https://oracleus.activeevents.com/connect/sessionDetail.ww?SESSION_ID=6661&tclass=popup
>> >
>> > http://www.theregister.co.uk/2012/11/27/project_nashorn_server_javascript/
>> >
>> > http://www.oracle.com/javaone/lad-en/session-presentations/clientside/24821-enok-1439095.pdf
>> > (in case it's not obvious, this one is a pdf)
>> >
>> > Rick
>> >
>> >
>> >
>> >
>> > On Fri, Dec 7, 2012 at 5:03 PM, Ilya Dmitrichenko
>> > mailto:errorde...@gmail.com>> wrote:
>> >
>> > Yeah, you should also checkout vert.x (http://vertx.io/)
>> >
>> >
>> > On 7 December 2012 21:57, Forrest L Norvell > > > wrote:
>> >
>> > On Fri, Dec 7, 2012 at 11:03 AM, prashant pandey
>> > mailto:prashan...@gmail.com>>
>> > wrote:
>> >
>> > I want to know has anyone tried to run NodeJs inside JVM? Or
>> > is there any specific approach we need to employ to get this
>> > done?
>> >
>> >
>> > Since Node is only partly the JavaScript code of the standard
>> > library and predominantly the compiled native code of V8 and
>> > libuv, embedding Node in a JVM is likely to be quite a
>> > challenge. Is there a reason you can't just use straight Node,
>> > or alternately can't use something like Ringo with Nitro?
>>
> --
> 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] Running NodeJs inside JVM

2012-12-10 Thread Mark Hahn
A programming language similar to JS.  Google it.  Home page is here:
http://www.lua.org/ List of tutorials is here:
http://lua-users.org/wiki/TutorialDirectory  A framework that
duplicates node in lua is here:  https://github.com/ignacio/luanode

It was designed for embedding.  The interpreter is actually just a
shell that embeds it.  It is highly regarded.


On Mon, Dec 10, 2012 at 10:48 AM, prashant pandey
 wrote:
> Lua

-- 
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] Request for Feedback: asyncscript

2012-12-11 Thread Mark Hahn
Welcome to the community of async library authors.  I wrote one when I
started node.  There is no better way to learn the ins and outs of
async programming.

I switched back to straight async code as did many other authors.  It
is like learning how to ride a bicycle.  All the hell goes away and
simple code flows out.

On Tue, Dec 11, 2012 at 10:02 AM, Jonathan Dickinson
 wrote:
> Oh wow. That's awesome: I had no idea that these projects existed. The
> approach with the defer keyword is incredibly interesting (I assume the
> existence of some promise library, like JQuery or node-promise). For what
> it's worth I set out to avoid heavy dependence on the stack: it seems that
> after some brief testing Iced and Tame are quite resilient to this.
>
> They are compiled really differently to mine: just take a look at the
> comparative output.
>
> Some criticisms:
>
> Iced can't compile this: await (await test(baz, defer), defer)
> Not surprising, it could be seen as ambiguous, but this is currently
> compiling (and running) locally for me: await test(await baz(), await
> blaz());
> Tame doesn't deal with exceptions too well. Likely because their compilation
> technique is very different to mine (maybe because they make 'typical'
> continuations, or, because they don't use promises). I can't tell if Iced
> does.
> After some searching I couldn't tell if either of them have sourcemap
> support.
>
> I'm not convinced I should continue with asyncscript though. Those are
> pedantic criticisms at best (except for the sourcemap: Iced results in
> pretty hard to debug code - which I am sure will be supported eventually).
>
> Thanks for the heads-up.
>
> On Tuesday, 11 December 2012 17:59:03 UTC+2, Forrest L Norvell wrote:
>>
>> From a brief look, this looks very similar to the model used by TameJS or
>> Iced CoffeeScript, both of which use an approach rooted in await / deferred
>> semantics and AST parsing and rewriting. Are you aware of those projects? If
>> so, how is your approach different? Also, aside from slightly terser syntax,
>> what does this approach offer over promises, which don't require a
>> preprocessing step?
>>
>> I don't intend to sound dismissive or hostile, but there are a massive
>> number of flow control libraries for JS / Node, and a considerable amount of
>> this list's history tied up in arguing their relative merits, which is part
>> of the reason why Node has such a minimal / primitive model for dealing with
>> continuations in the first place. New flow control tools are unlikely to see
>> much uptake unless they bring something significant and new (that justifies
>> the time taken to learn them and the cost of maintaining code that looks
>> different from more idiomatic JS) to the table.
>>
>> F
>>
>> On Monday, December 10, 2012, Jonathan Dickinson wrote:
>>>
>>> Hi All,
>>>
>>> I just started my first foray into javascript beyond the usual minimal
>>> glue I was used with browsers. After looking at some node tutorials the
>>> first thing I noticed was the CPS hell (honestly, no way in hell I am
>>> dealing with that ;)). I present an extremely rough draft of asyncscript; it
>>> modelled after (black-box) looking at how C# implements its async.
>>> https://github.com/jcdickinson/asyncscript
>>>
>>> The metacompiler first takes an AST (lightly modified acorn.js) and turns
>>> in into IR. The IR basically adds blocks and closures to the AST, so you
>>> essentially land up with:
>>>
>>> Closure
>>>
>>> Block1
>>>
>>> AST
>>>
>>> Block2
>>>
>>> AST
>>>
>>> Block3
>>>
>>> AST
>>> Closure
>>>
>>> ...
>>>
>>> AST
>>>
>>> Blocks are breaks in real execution (read: continuations - although I
>>> will also need to [ab]use them for branching constructs in the presence of
>>> the async keyword). The IR is then passed off to a few transformation stages
>>> (async, if, &&/||, while, for - of which only async is implemented). So for
>>> example, the async transform will create a split in the block (resulting in
>>> two blocks) at the statement containing the async keyword.
>>>
>>> Closure (async)
>>>
>>> Block1
>>>
>>> AST that was in Block1 before await
>>> await
>>>
>>> Block2
>>>
>>> grab async result
>>> AST that was in Block1 after await
>>>
>>> Finally the IR is turned into JS. Due to the lack of a goto statement in
>>> JS I needed to implement 'transitioning' blocks (if, and other
>>> non-continuation branches) as a while loop:
>>>
>>> var state = 0;
>>> while(true) {
>>>   switch(state) {
>>>case 0:
>>> blar();
>>> state = 1; // Effectively a goto
>>> break;
>>>case 1:
>>> baz();
>>> return;
>>>   }
>>> }
>>>
>>> Yes, it's ugly, but I would rather have ugly code than bloating the call
>>> stack (please, does anyone has any better ideas how to do this without
>>> wasting stack space?). 'sequencing' blocks simply return out of the function
>>> after registering the continuation. So at the end of the day you get:
>>>
>>> asyncscript:
>>> var username = "jimbob";
>>> var sett

[nodejs] [ANN} New Basecamp API wrapper

2012-12-14 Thread Mark Hahn
Announcing a new Basecamp (37signals) API wrapper for node. Basecamp
has a very large API and this module gives complete support, including
oauth2 integration.  The following is the beginning of the README file
...



Features

Supports new Basecamp JSON api (not old xml)
Built-in oauth2 support
Tools to link app to Basecamp account by visiting 37signals website
Supports all 57 api requests (GET, POST, and PUT)
Terminology, params, and command ops match api documentation
Data can be objects, streams, or files
Supports simultaneous multiple accounts

Status Alpha

It is complete and currently usable, but it has not been used in
production yet and there are no unit tests. Many commands (those
relating to accounts, projects, messages, and comments) have been
verified to work ...

get_projects
get_projects_archived
create_project
create_attachment
get_project
get_accesses
get_topics
get_message
create_message
create_comment

The rest of the commands are expected to work. A command table was
translated directly from the API docs and the commands that have been
verified to work use that table.

TODO ...

Tests
Add coding examples to this readme
Convenience functions for common commands
Support express/connect for linking accounts callback

I could use some help. Tests will be hard since we can't easily mock
the Basecamp api. I don't know express so someone else is going to
have to add that.

-- 
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: [ANN} New Basecamp API wrapper

2012-12-14 Thread Mark Hahn
I forgot to mention the link:  https://github.com/mark-hahn/basecamp

I would never make it in marketing.

On Fri, Dec 14, 2012 at 11:06 AM, Mark Hahn  wrote:
> Announcing a new Basecamp (37signals) API wrapper for node. Basecamp
> has a very large API and this module gives complete support, including
> oauth2 integration.  The following is the beginning of the README file
> ...
>
> 
>
> Features
>
> Supports new Basecamp JSON api (not old xml)
> Built-in oauth2 support
> Tools to link app to Basecamp account by visiting 37signals website
> Supports all 57 api requests (GET, POST, and PUT)
> Terminology, params, and command ops match api documentation
> Data can be objects, streams, or files
> Supports simultaneous multiple accounts
>
> Status Alpha
>
> It is complete and currently usable, but it has not been used in
> production yet and there are no unit tests. Many commands (those
> relating to accounts, projects, messages, and comments) have been
> verified to work ...
>
> get_projects
> get_projects_archived
> create_project
> create_attachment
> get_project
> get_accesses
> get_topics
> get_message
> create_message
> create_comment
>
> The rest of the commands are expected to work. A command table was
> translated directly from the API docs and the commands that have been
> verified to work use that table.
>
> TODO ...
>
> Tests
> Add coding examples to this readme
> Convenience functions for common commands
> Support express/connect for linking accounts callback
>
> I could use some help. Tests will be hard since we can't easily mock
> the Basecamp api. I don't know express so someone else is going to
> have to add that.

-- 
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] Advice when using streams, pipe and waiting for metadata

2012-12-14 Thread Mark Hahn
fellated?

On Fri, Dec 14, 2012 at 3:29 PM, Paul Connolley
 wrote:
> fellated

-- 
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] Maybe of interest: Why we need a NodeJS application server or: writing boilerplate code considered harmful

2012-12-15 Thread Mark Hahn
I'm sure many would appreciate such a comprehensive large framework.
I and many others in the node community would not.

One characteristic of the node "philosophy" is freedom.  The freedom
to plug existing small modules together like a lego set.  The freedom
to easily write our own modules.  The freedom to swap out modules for
others as better ones come along.  The freedom to make our
architecture unique while not writing code from scratch or even using
boilerplate.

If I had to live within the constraints of J2EE or ROR or even
Express, I would find another job.  My architecture migrates quickly
from project to project with each one more awesome than the last.  Any
existing framework would be outdated within a year as far as I am
concerned.

It is a new world..

On Sat, Dec 15, 2012 at 2:13 AM, Angel Java Lopez  wrote:
> Hi people!
>
> Panyasan, very interesting... but I don't see the need of most of your
> items. Maybe you want not an "application server" (ooops I still
> remember J2EE... argg... ;-) but an "opinionated web framework" (like Ruby
> on Rails wo/model code generation) (in the comments to your post, Geddy was
> mentioned).
>
> Let's review:
>
> It should also not force a different programming model on developers (like
> Opa or Meteor), but let you code in plain old asynchronous javascript. No
> to-javascript-compilation (except optionally). No magic. Just the right
> tools.
> It exists. Node.js + Javascript ;-)
>
> It should have an integrated API for client and server.
> Can you elaborate this?
>
> It should provide a static HTTP server, REST routing, and bidirectional,
> realtime messaging and broadcasting (such as Socket.io).
> Then require('socket.io'); Why "static" for HTTP server? There is middleware
> for Connect/Express. REST routing: it's not my area, but there are some
> modules.
>
> It should offer async startup/plugin/configuration system like
> Cloud9′sArchitect.
> Easy one (maybe some boilerplate for async support), or someone writing it
> as a module, then require it;
>
> It should provide an out-of-the box system and API for user & group
> management, registration, access control, Password storage/retrieval/update
> etc, preferrably with a set of built-in templates that can be used for
> managing the most generic configuration tasks. With this, a pluggable system
> to use third-party authentication providers.
> ??? A bit: invoicing to users included, paypal system, etc. ;-) Ok, again,
> it could be resolved with a module.
>
> It should also provide an integrated system of data modeling and
> persistence. I really do not care about database technology. I simply want
> to store, edit and retrieve my model data.
> I work in many technologies, and all these or not needed, or provided by a
> library and tools.
>
> t could also have a toolset that would allow you to deploy your application
> instantly to a cloud provider such as Heroku or Nodejitsu.
> Again, Node.js
>
> Sorry if it sounds harsh, I don't manage English expressions and variants,
> it's not my mother tongue. But IMNSHO, we don't need all that, unless you
> like Ruby on Rails and alike (maybe Geddy).
>
> Other opinions?
>
> I think that that is the key point of your post: RoR-like or not (Node.js
> community (or part of community) actually "prefers" Sinatra-like).
> "Application Server" term confused me. In my jargon, it's related to things
> where the business logic, application resides, exposed to many kind of
> clients (web, desktop, no web, whatever the future will bring to us,
> etc) SAP uses that term too, a la J2EE (sorry for mention it again ;-)
>
> Angel "Java" Lopez
> @ajlopez
> gh:ajlopez
>
> On Fri, Dec 14, 2012 at 10:51 AM, panyasan  wrote:
>>
>> This is not strictly a technical question on node, so please excuse if
>> this is the wrong forum, but if you're interested, I'd like to hear your
>> opinions on the following blog post:
>>
>>
>> http://panyasan.wordpress.com/2012/12/10/why-we-need-a-nodejs-application-server-or-writing-boilerplate-considered-harmful
>>
>>
>> --
>> 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=

Re: [nodejs] preferred license for node modules?

2012-12-15 Thread Mark Hahn
> but I live near Berkeley, so that's why I use BSD instead of MIT.

A joke, right?

On Sat, Dec 15, 2012 at 9:48 AM, Isaac Schlueter  wrote:
> but I live near Berkeley, so
> that's why I use BSD instead of MIT.

-- 
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] Maybe of interest: Why we need a NodeJS application server or: writing boilerplate code considered harmful

2012-12-15 Thread Mark Hahn
As I said, many would appreciate it.

The reason I wrote the long diatribe was because I believe
node/javascript offers a unique base for the freedoms I mention.  If
the community as a whole adopted something and all the new useful
modules required it, that would be a great shame.

It would hinder forward architecture progress like ROR did.  ROR can't
come close to the architecture features I'm using now.   And you seem
to be asking for an ROR equivalent for node. That would slow down the
awesome progress node has been enabling.

In other words, be careful what you ask for.  You just might get 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] Maybe of interest: Why we need a NodeJS application server or: writing boilerplate code considered harmful

2012-12-15 Thread Mark Hahn
Clarification:  I said: "you seem to be asking for an ROR equivalent
for node".  I didn't mean your new framework would have the old
features of ROR.  I just meant that no matter how modern your new
architecture would be, it would become stale quickly in the fast-paced
world that node enables.

On Sat, Dec 15, 2012 at 11:53 AM, Mark Hahn  wrote:
> you seem
> to be asking for an ROR equivalent for 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


[nodejs] best distributed multi-writer, single-reader store?

2012-12-17 Thread Mark Hahn
I have an app where many servers will need to write to a store but
only one server will be reading the store.  The data will be somewhat
transitory so an in-memory store might make sense.

I checked out redis but the docs only talk about one master and many
slaves, which is the opposite of what I need.

I know I can code it myself, but I will need to write data from
different servers and browsers and having a mature messaging/store
solution would be really nice.

Any suggestions?

-- 
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] best distributed multi-writer, single-reader store?

2012-12-18 Thread Mark Hahn
You mean like rabbitMQ?  I've been checking into that.  From what I've
found out so far it would be easier to just use socket.io.

I guess there is such a thing as a stupid question after all.

-- 
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] best distributed multi-writer, single-reader store?

2012-12-18 Thread Mark Hahn
@Ciprian, et. al.  Thanks very much for the detailed list.  I have
investigated about half of those and will look into the others.

I apologize if I repeat myself but here are my detailed requirements ...

0) Installable with npm
1) Very high bandwidth, my app can use as much as you give it
2) Multi-writers, including browsers and other servers
3) One reader on a single server
4) No channels are needed, my data encapsulates any addressing
5) Ordered data delivery would be nice but I could handle order
problems in my code
6) Reliable delivery would be nice not not critical.  End use of data
is data-mining to be read by humans and I can show the human an
indication data is missing.  It would make my app look bad though.

The solutions I have studied seem to be overkill for my needs
(rabbitMQ) or more complex enterprise solutions that I'd not want each
user to have to install.

So unless any of the other solutions mentioned fill the bill, I will
proceed with rolling my own using socket.io and homemade storage.

P.S.  I have discovered 3 or 4 messaging-related projects at apache.
That is weird.


On Tue, Dec 18, 2012 at 7:17 AM, Chad Engler  wrote:
> Do it in IndexedDB so it can translate to the browser :P
>
> -Chad
>
> -Original Message-
> From: nodejs@googlegroups.com [mailto:nodejs@googlegroups.com] On Behalf
> Of Ciprian Dorin Craciun
> Sent: Tuesday, December 18, 2012 6:44 AM
> To: nodejs@googlegroups.com
> Subject: Re: [nodejs] best distributed multi-writer, single-reader
> store?
>
> On Tue, Dec 18, 2012 at 2:24 AM, Mark Hahn  wrote:
>> I have an app where many servers will need to write to a store but
>> only one server will be reading the store.  The data will be somewhat
>> transitory so an in-memory store might make sense.
>
> Do you need the "store" to be distributed or a single instance might
> work? What is the expected load (messages per second, message size,
> total connections, etc.?) What do you use it for (general pointers).
>
> If you are interested in message queues there are a few options, all
> with tradeoffs:
> * http://www.rabbitmq.com/ -- implements AMQP, maybe the most mature
> and complex (or flexible) solution;
> * https://github.com/robey/kestrel (used by Twitter?) -- implements
> a memcache-based protocol (thus usable from almost any programming
> language via a memcache client library);
> * https://github.com/bitly/nsq (used by BitLy) -- implements a
> custom memcache-like protocol;
> * a dozen others (see
> http://wiki.volution.ro/Mosaic/Notes/Solutions#Message_queues for some
> that I've tried to "categorize");
>
> But you could also use something based on a embedded database like
> BerkeleyDB, LevelDB, etc. Maybe look at TokyoDB which has both a
> memcache-based or HTTP-based access protocol.
>
> Hope it helps,
> Ciprian.
>
> --
> 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] best distributed multi-writer, single-reader store?

2012-12-18 Thread Mark Hahn
You analysis is spot-on.  Thx.

>  If your browser clients are new enough browsers,

Yes.  Only developers will use the tool so chrome will be preferred.

-- 
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] best distributed multi-writer, single-reader store?

2012-12-18 Thread Mark Hahn
@Ciprian

Thx.  I will definitely check out zeromq.

On Tue, Dec 18, 2012 at 1:54 PM, Mark Hahn  wrote:
> You analysis is spot-on.  Thx.
>
>>  If your browser clients are new enough browsers,
>
> Yes.  Only developers will use the tool so chrome will be preferred.

-- 
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 do node.js handle database transactions?

2012-12-19 Thread Mark Hahn
>  I wonder why there is no one care about it.

I will assume you aren't a troll. I would think that almost all couch
users know about ACID and use Couch understanding the trade-offs.
CouchDB has distributed features that would not be possible with
transactions.  If transactions are necessary for your application then
choose a DB with transactions.

On Wed, Dec 19, 2012 at 7:37 PM, Jake Verbaten  wrote:
> Transactions are trivial when supported by your database engine.
>
> Like [levelup's .batch()][1]
>
> var ops = [
> { type: 'del', key: 'father' }
>   , { type: 'put', key: 'name', value: 'Yuri Irsenovich Kim' }
>   , { type: 'put', key: 'dob', value: '16 February 1941' }
>   , { type: 'put', key: 'spouse', value: 'Kim Young-sook' }
>   , { type: 'put', key: 'occupation', value: 'Clown' }
> ]
>
> db.batch(ops, function (err) {
>   if (err) return console.log('Ooops!', err)
>   console.log('Great success dear leader!')
> })
>
> If your database driver doesn't give you a sensible clean api then just
> write one.
>
> If your database doesn't support transactions then your screwed.
>
>   [1]: https://github.com/rvagg/node-levelup#batch
>
>
> On Wed, Dec 19, 2012 at 7:01 PM, Charlie Circle  wrote:
>>
>> For serious web applications, transaction is crucial.
>>
>> But node's asynchronous nature do not obey transaction rule,  I wonder why
>> there is no one care about it.
>>
>> In synchronous applications, you start your transaction, and do database
>> operation step by step, when done, just commit it.
>>
>> While in node, you must start transaction a place, and commit it in a
>> callback chain in a  deep level.
>>
>> But it's not the worst thing, because node  share a single connection in a
>> process,  we can not sure which  operation is in what transaction, so all
>> messed must.
>>
>> I've seen a solution in npm, which let you execute database operation in
>> sequence, let us go back to synchronous age, not so scalable, right?
>>
>> Is there any new idea?
>>
>> --
>> 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] How do node.js handle database transactions?

2012-12-19 Thread Mark Hahn
Duh.  My bad.

I read my couch messages inline with my node messages.  I didn't check
the list and I assumed this was on the couch list, where it would
appear to be trolling.

Sorry to all  (and to all good night).

On Wed, Dec 19, 2012 at 8:26 PM, Ted Young  wrote:
> Mark I'm guessing he's talking about mysql, not couch.  It's true that you
> can't run multiple simultaneous transactions over one mysql connection.  But
> that's a mysql connection in any language, not just node (unless I'm missed
> something).  Not a node-mysql expert, but your choices are:
>
> a) create a connection per request
> b) create a connection pool, for example with node-pool, and acquire and
> release a connection on each request
>
>
> Ted
>
> On Dec 19, 2012, at 7:44 PM, Mark Hahn  wrote:
>
> I wonder why there is no one care about it.
>
>
> I will assume you aren't a troll. I would think that almost all couch
> users know about ACID and use Couch understanding the trade-offs.
> CouchDB has distributed features that would not be possible with
> transactions.  If transactions are necessary for your application then
> choose a DB with transactions.
>
> On Wed, Dec 19, 2012 at 7:37 PM, Jake Verbaten  wrote:
>
> Transactions are trivial when supported by your database engine.
>
> Like [levelup's .batch()][1]
>
> var ops = [
>{ type: 'del', key: 'father' }
>  , { type: 'put', key: 'name', value: 'Yuri Irsenovich Kim' }
>  , { type: 'put', key: 'dob', value: '16 February 1941' }
>  , { type: 'put', key: 'spouse', value: 'Kim Young-sook' }
>  , { type: 'put', key: 'occupation', value: 'Clown' }
> ]
>
> db.batch(ops, function (err) {
>  if (err) return console.log('Ooops!', err)
>  console.log('Great success dear leader!')
> })
>
> If your database driver doesn't give you a sensible clean api then just
> write one.
>
> If your database doesn't support transactions then your screwed.
>
>  [1]: https://github.com/rvagg/node-levelup#batch
>
>
>
> On Wed, Dec 19, 2012 at 7:01 PM, Charlie Circle  wrote:
>
>
> For serious web applications, transaction is crucial.
>
> But node's asynchronous nature do not obey transaction rule,  I wonder why
> there is no one care about it.
>
> In synchronous applications, you start your transaction, and do database
> operation step by step, when done, just commit it.
>
> While in node, you must start transaction a place, and commit it in a
> callback chain in a  deep level.
>
> But it's not the worst thing, because node  share a single connection in a
> process,  we can not sure which  operation is in what transaction, so all
> messed must.
>
> I've seen a solution in npm, which let you execute database operation in
> sequence, let us go back to synchronous age, not so scalable, right?
>
> Is there any new idea?
>
>
> --
> 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 t

[nodejs] state of weak refs/maps?

2012-12-21 Thread Mark Hahn
I've run into a need for both weak refs and maps in my new app.  I
need these in node and in a browser (which can be limited to chrome).

node-weak looks good for the node ref solution.  I know weak-maps are
in V8, but are they supported in node?

I'd also appreciate any comments on the state of weak refs/maps in
chrome.  I know maps are supported with a command-line switch but I
can't find anything about refs.

-- 
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] state of weak refs/maps?

2012-12-21 Thread Mark Hahn
Do you mean for ECMAScript?  I don't think it will ever have weak refs
because of the confidentiality problem.

On Fri, Dec 21, 2012 at 4:45 PM, Rick Waldron  wrote:
> I asked Nathan Rajlich to write up a spec draft for WeakRefs based on
> node-weak, but I havent heard anything back... maybe he's listening here?
>
> Rick
>
>
> On Fri, Dec 21, 2012 at 4:07 PM, Mark Hahn  wrote:
>>
>> I've run into a need for both weak refs and maps in my new app.  I
>> need these in node and in a browser (which can be limited to chrome).
>>
>> node-weak looks good for the node ref solution.  I know weak-maps are
>> in V8, but are they supported in node?
>>
>> I'd also appreciate any comments on the state of weak refs/maps in
>> chrome.  I know maps are supported with a command-line switch but I
>> can't find anything about refs.
>>
>> --
>> 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] state of weak refs/maps?

2012-12-21 Thread Mark Hahn
Thanks (everyone).

On Fri, Dec 21, 2012 at 6:44 PM, Jake Verbaten  wrote:
> npm docs weakmap

-- 
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] state of weak refs/maps?

2012-12-22 Thread Mark Hahn
The confidentiality problem is impossible to fix in weak refs and the
impression I got from reading all that stuff was that it is considered
a real problem.  My impression could be wrong.

Does any other part of ECMAScript have that same problem?  If so then
it could be argued that it doesn't matter because the cat is out of
the bag.


On Sat, Dec 22, 2012 at 2:44 PM, Rick Waldron  wrote:
> confidentiality problem

-- 
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] state of weak refs/maps?

2012-12-22 Thread Mark Hahn
>  most use cases would be addressed within this restriction.

It would work for me.  That does sound promising.  I was not creative 
enough to think of a way to solve it so I jumped to the conclusion it was 
impossible.

On Saturday, December 22, 2012 3:04:35 PM UTC-8, MarkM wrote:
>
>
>
>
> On Sat, Dec 22, 2012 at 2:50 PM, Mark Hahn 
> > wrote:
>
>> The confidentiality problem is impossible to fix in weak refs
>
>
> For the record, I do not think it is impossible to fix, and I never stated 
> otherwise. 
>
> An approach we have talked about that I find promising (though I don't 
> know if it ever made it into any meeting notes) is to identify a weak ref 
> with the realm (set of globals) its makeWeakRef came from. Only if the 
> object the weak ref points to is in the same realm does it point weakly. 
> Otherwise, the weak ref points strongly. This prevents weak refs from 
> leaking gc drop info cross-realm. I believe most use cases would be 
> addressed within this restriction.
>
>  
>
>> and the
>> impression I got from reading all that stuff was that it is considered
>> a real problem.  My impression could be wrong.
>>
>> Does any other part of ECMAScript have that same problem?  If so then
>> it could be argued that it doesn't matter because the cat is out of
>> the bag.
>>
>>
>> On Sat, Dec 22, 2012 at 2:44 PM, Rick Waldron 
>> > 
>> wrote:
>> > confidentiality problem
>>
>> --
>> 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
>>
>
>
>
> -- 
> Text by me above is hereby placed in the public domain
>
>   Cheers,
>   --MarkM 
>

-- 
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] Load Html file.

2012-12-25 Thread Mark Hahn
That would work if you want to send out that one file no matter what
request comes in.  I doubt that is what you want to do.

On Tue, Dec 25, 2012 at 7:40 AM, Rodrigo Fonseca  wrote:
> Hey guys,
>   I'm doing a app 100% MVC with locomotive, i have one layout file that load
> another files just to put the content, it's a small app, but very good
> app... So, i want to know, the best way to load a html file, i google it and
> found this solution:
>
> var http = require('http'),
> fs = require('fs');
>
>
> fs.readFile('./index.html', function (err, html) {
> if (err) {
> throw err;
> }
> http.createServer(function(request, response) {
> response.writeHeader(200, {"Content-Type": "text/html"});
> response.write(html);
> response.end();
> }).listen(8000);
> });
>
>
>  What do you guys think??
>
> --
> 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] Inconsistent method names?

2012-12-27 Thread Mark Hahn
Why not also allow readDir?  It would cause no harm to do so.

This isn't node, but what also bugs me is typeof and instanceof.  I
cringe every time I type them.


On Thu, Dec 27, 2012 at 11:47 AM, David Habereder
 wrote:
> That clears that up. Thanks.
>
> Am Donnerstag, 27. Dezember 2012 20:36:30 UTC+1 schrieb Matt Sergeant:
>>
>> I think you'll likely find where it isn't the case (such as readdir) the
>> name comes from the POSIX function name. There's no readfile function in
>> POSIX, but there is readdir(). The only other case seems to be readlink,
>> which is the same issue.
>>
>> http://linux.die.net/man/2/readdir
>> http://linux.die.net/man/2/readlink
>>
>>
>> On Thu, Dec 27, 2012 at 1:02 PM, David Habereder 
>> wrote:
>>>
>>> Hi,
>>>
>>> I am quite new to node.js.
>>>
>>> As far as I can see the method names aren't very consistent. Take the
>>> methods from File System for example: http://nodejs.org/api/fs.html
>>> It is ".readFile" (Camelcase)
>>> But it is ".readdir" (all lowercase)
>>>
>>> There are a few more such cases where I don't see a pattern when
>>> camelcase is used and when not.
>>>
>>> You could say that this is absolutely irrelevant and you would be right.
>>> But it annoys me :-(
>>> And it reminds me of PHP syntax garbage.
>>>
>>> Is there any interest in getting all method names either camelcase or
>>> lowercase, or will this just stay as is?
>>>
>>> ~dave
>>>
>>> --
>>> 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
>>
>>
> --
> 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] Inconsistent method names?

2012-12-27 Thread Mark Hahn
It just occurred to me that I can do fs.readDir = fs.readdir.  Will
this apply to fs in every module?  A normal module only has one copy.
Is there only one instance of fs?

If it does work then I'll make a module that fixes all of these.  It
won't break anything.

On Thu, Dec 27, 2012 at 12:13 PM, Mark Hahn  wrote:
> Why not also allow readDir?  It would cause no harm to do so.
>
> This isn't node, but what also bugs me is typeof and instanceof.  I
> cringe every time I type them.
>
>
> On Thu, Dec 27, 2012 at 11:47 AM, David Habereder
>  wrote:
>> That clears that up. Thanks.
>>
>> Am Donnerstag, 27. Dezember 2012 20:36:30 UTC+1 schrieb Matt Sergeant:
>>>
>>> I think you'll likely find where it isn't the case (such as readdir) the
>>> name comes from the POSIX function name. There's no readfile function in
>>> POSIX, but there is readdir(). The only other case seems to be readlink,
>>> which is the same issue.
>>>
>>> http://linux.die.net/man/2/readdir
>>> http://linux.die.net/man/2/readlink
>>>
>>>
>>> On Thu, Dec 27, 2012 at 1:02 PM, David Habereder 
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am quite new to node.js.
>>>>
>>>> As far as I can see the method names aren't very consistent. Take the
>>>> methods from File System for example: http://nodejs.org/api/fs.html
>>>> It is ".readFile" (Camelcase)
>>>> But it is ".readdir" (all lowercase)
>>>>
>>>> There are a few more such cases where I don't see a pattern when
>>>> camelcase is used and when not.
>>>>
>>>> You could say that this is absolutely irrelevant and you would be right.
>>>> But it annoys me :-(
>>>> And it reminds me of PHP syntax garbage.
>>>>
>>>> Is there any interest in getting all method names either camelcase or
>>>> lowercase, or will this just stay as is?
>>>>
>>>> ~dave
>>>>
>>>> --
>>>> 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
>>>
>>>
>> --
>> 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] Inconsistent method names?

2012-12-27 Thread Mark Hahn
>  what sort of program scenarios you've found yourself in where instanceof was 
> the "go to" solution

I use typeof a lot, but instanceof not so often.  I sometimes use
instanceof Array when I don't have a helper around for that.

I've just started a module for use in node and the client that "fixes"
these as much as possible.  It is annoying when I get an error just
because of lack of camelCasing.  My mind isn't good at remembering
minor things.

Does anyone know how I could fix typeof in node?  I can see how to do
it in the client.  Luckily I'm using coffeescript so making typeOf a
function will be used like `typeOf x` and it will look the same as
typeof `x`.

> Completely irrelevant to the discussion...

What is irrelevant?

On Thu, Dec 27, 2012 at 1:06 PM, Rick Waldron  wrote:
> Inline...
>
>
> On Thursday, December 27, 2012, Mark Hahn wrote:
>>
>> Why not also allow readDir?  It would cause no harm to do so.
>>
>> This isn't node, but what also bugs me is typeof and instanceof.  I
>> cringe every time I type them.
>
>
> Completely irrelevant to the discussion... but you have my attention now—I'm
> curious to know what sort of program scenarios you've found yourself in
> where instanceof was the "go to" solution (but painful to use?), aside from
> useful type checking (types as in "object types", not as in "data-types").
> If you want to know if x has Foo constructor in its prototype chain,
> instanceof has you covered.
>
> Rick
>
>
>>
>>
>>
>> On Thu, Dec 27, 2012 at 11:47 AM, David Habereder
>>  wrote:
>> > That clears that up. Thanks.
>> >
>> > Am Donnerstag, 27. Dezember 2012 20:36:30 UTC+1 schrieb Matt Sergeant:
>> >>
>> >> I think you'll likely find where it isn't the case (such as readdir)
>> >> the
>> >> name comes from the POSIX function name. There's no readfile function
>> >> in
>> >> POSIX, but there is readdir(). The only other case seems to be
>> >> readlink,
>> >> which is the same issue.
>> >>
>> >> http://linux.die.net/man/2/readdir
>> >> http://linux.die.net/man/2/readlink
>> >>
>> >>
>> >> On Thu, Dec 27, 2012 at 1:02 PM, David Habereder 
>> >> wrote:
>> >>>
>> >>> Hi,
>> >>>
>> >>> I am quite new to node.js.
>> >>>
>> >>> As far as I can see the method names aren't very consistent. Take the
>> >>> methods from File System for example: http://nodejs.org/api/fs.html
>> >>> It is ".readFile" (Camelcase)
>> >>> But it is ".readdir" (all lowercase)
>> >>>
>> >>> There are a few more such cases where I don't see a pattern when
>> >>> camelcase is used and when not.
>> >>>
>> >>> You could say that this is absolutely irrelevant and you would be
>> >>> right.
>> >>> But it annoys me :-(
>> >>> And it reminds me of PHP syntax garbage.
>> >>>
>> >>> Is there any interest in getting all method names either camelcase or
>> >>> lowercase, or will this just stay as is?
>> >>>
>> >>> ~dave
>> >>>
>> >>> --
>> >>> 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
>> >>
>> >>
>> > --
>> > 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
>> > 

Re: [nodejs] Inconsistent method names?

2012-12-27 Thread Mark Hahn
> fs.prototype.readDir = function() { return fs.prototype.readdir.apply(this, 
> arguments); }

What is the advantage of this over `fs.readDir = fs.readdir;` ?
fs.readdir doesn't use `this`, does it?  And doesn't `fs.readdir` get
the same function as `fs.prototype.readdir`?

On Thu, Dec 27, 2012 at 1:32 PM, Mark Hahn  wrote:
>>  what sort of program scenarios you've found yourself in where instanceof 
>> was the "go to" solution
>
> I use typeof a lot, but instanceof not so often.  I sometimes use
> instanceof Array when I don't have a helper around for that.
>
> I've just started a module for use in node and the client that "fixes"
> these as much as possible.  It is annoying when I get an error just
> because of lack of camelCasing.  My mind isn't good at remembering
> minor things.
>
> Does anyone know how I could fix typeof in node?  I can see how to do
> it in the client.  Luckily I'm using coffeescript so making typeOf a
> function will be used like `typeOf x` and it will look the same as
> typeof `x`.
>
>> Completely irrelevant to the discussion...
>
> What is irrelevant?
>
> On Thu, Dec 27, 2012 at 1:06 PM, Rick Waldron  wrote:
>> Inline...
>>
>>
>> On Thursday, December 27, 2012, Mark Hahn wrote:
>>>
>>> Why not also allow readDir?  It would cause no harm to do so.
>>>
>>> This isn't node, but what also bugs me is typeof and instanceof.  I
>>> cringe every time I type them.
>>
>>
>> Completely irrelevant to the discussion... but you have my attention now—I'm
>> curious to know what sort of program scenarios you've found yourself in
>> where instanceof was the "go to" solution (but painful to use?), aside from
>> useful type checking (types as in "object types", not as in "data-types").
>> If you want to know if x has Foo constructor in its prototype chain,
>> instanceof has you covered.
>>
>> Rick
>>
>>
>>>
>>>
>>>
>>> On Thu, Dec 27, 2012 at 11:47 AM, David Habereder
>>>  wrote:
>>> > That clears that up. Thanks.
>>> >
>>> > Am Donnerstag, 27. Dezember 2012 20:36:30 UTC+1 schrieb Matt Sergeant:
>>> >>
>>> >> I think you'll likely find where it isn't the case (such as readdir)
>>> >> the
>>> >> name comes from the POSIX function name. There's no readfile function
>>> >> in
>>> >> POSIX, but there is readdir(). The only other case seems to be
>>> >> readlink,
>>> >> which is the same issue.
>>> >>
>>> >> http://linux.die.net/man/2/readdir
>>> >> http://linux.die.net/man/2/readlink
>>> >>
>>> >>
>>> >> On Thu, Dec 27, 2012 at 1:02 PM, David Habereder 
>>> >> wrote:
>>> >>>
>>> >>> Hi,
>>> >>>
>>> >>> I am quite new to node.js.
>>> >>>
>>> >>> As far as I can see the method names aren't very consistent. Take the
>>> >>> methods from File System for example: http://nodejs.org/api/fs.html
>>> >>> It is ".readFile" (Camelcase)
>>> >>> But it is ".readdir" (all lowercase)
>>> >>>
>>> >>> There are a few more such cases where I don't see a pattern when
>>> >>> camelcase is used and when not.
>>> >>>
>>> >>> You could say that this is absolutely irrelevant and you would be
>>> >>> right.
>>> >>> But it annoys me :-(
>>> >>> And it reminds me of PHP syntax garbage.
>>> >>>
>>> >>> Is there any interest in getting all method names either camelcase or
>>> >>> lowercase, or will this just stay as is?
>>> >>>
>>> >>> ~dave
>>> >>>
>>> >>> --
>>> >>> 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
>&

Re: [nodejs]

2012-12-28 Thread Mark Hahn
Does anyone know what these are?  I innocently clicked on it and the
browser flashed and took me to a random site locally here in my town.
Did I pick up a virus?

On Thu, Dec 27, 2012 at 11:40 PM, Paul Carey  wrote:
>   http://daking.cl/wp-content/themes/twentyeleven/gmm.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

-- 
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] new concept for structured asynchronous programming

2012-12-28 Thread Mark Hahn
I find it very interesting as I have always liked data-flow.

My main concern is that the processing of the analysis, particularly
the func.toString(), is going to slow down function execution by
orders of magnitude.

Also, there still seems to be a lot of boilerplate and the semantics
seem somewhat overwhelming for the simple end result.

>From an academic standpoint it is fascinating, but I cannot see using
it in everyday code.

On Thu, Dec 27, 2012 at 5:03 PM, Alex ("Tatumizer")  wrote:
> I'm trying to come up with a better concept for asynchronous programming. My
> first library (mesh.js) was an attempt to use a promising line of attack,
> but it introduced a lot of boilerplate, which no one liked (myself
> included)..
>
> After a lot of head-scratching, I found the way to eliminate all boilerplate
> and syntactic noise, and eventually came up with completely new design -much
> simpler one, and much more powerful: just two functions and their
> combinations do the job in most practical cases. I renamed the concept to
> "circuit" - it's a better name for this device.
>
> https://github.com/tatumizer/circuit/blob/master/README.md
>
> At this stage, it's a design doc only, specifically targeting nodejs. I
> think the concept of circuit could simplify nodejs programming..
> What is equally important that it uses all existing nodejs conventions and
> interfaces AS IS: no code generation, no wrappers, no conversions of f(x,y)
> into fubar(f,x,y) or anything - just pure nodejs code.
>
> I would be very interested to know opinions (even negative opinions) to
> improve design and find  potential flaws.
>
> Thanks,
> Alex
>
> --
> 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] Separation of requests within a node process

2012-12-28 Thread Mark Hahn
I don't see how there could be any other state visible.  How would you
find it other than through the req and res objects?  They are the only
things given to you.


On Thu, Dec 27, 2012 at 2:55 PM,   wrote:
> Hi,
>
> I expect there is something written on this already, and I'd be happy to be
> pointed to it.  I haven't figured out what search keywords to use.
>
> As I understand it, a nodejs process may be dealing with multiple requests
> concurrently.  In an http scenario, user 1's request/response objects may be
> inactive - perhaps waiting for a DBMS query to complete - when user 2's http
> request is received.  These are not handled by independent, synchronous
> threads, but some sort of state/session data/objects/handles are kept
> separate for user 1's request and user 2's request - otherwise node would
> not know which TCP connection should get the query results, etc.
>
> So is everything related to each request encapsulated with the
> request/response objects or object instances?  Or is there other "state"
> related stuff  that is visible somewhere?
>
> thanks
>
> Martin
>
> --
> 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] Link spam

2012-12-28 Thread Mark Hahn
I'm disappointed that google let that through.  I guess they do a
pretty good job of filtering these overall.

On Fri, Dec 28, 2012 at 12:32 PM, Harald Hanche-Olsen
 wrote:
> [Mark Hahn  (2012-12-28 20:18:17 UTC)]
>
>> Does anyone know what these are?
>
> Clearly, that was link spam.
>
>> I innocently clicked on it and the
>> browser flashed and took me to a random site locally here in my town.
>> Did I pick up a virus?
>
> I don't know; not really inclined to check in detail. But if you
> download the link with curl or a similar tool, you'll see a few lines
> of HTML with a meta http-equiv="refresh" pointing to what seems like a
> marketing website.
>
> My guess: Harmless, though annoying. But if you're worried about
> malware, running a scan with your favourite malware scanner is never a
> bad idea.
>
> - Harald

-- 
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 do you work with decimal numbers so that the precision problem of floats is under control?

2012-12-28 Thread Mark Hahn
If you are talking about money, then there is no problem.  The
existing js resolution of integers is more money than the universe
will ever have total.

On Fri, Dec 28, 2012 at 2:01 PM, Rick Waldron  wrote:
> Just curious, what is the input type of your form's input field? If it's
> "text", then the value doesn't start life as a number anyway—it's just a
> string.
>
> Also, what sort of calculations are you expecting to do?
>
> Rick
>
> On Friday, December 28, 2012, José F. Romaniello wrote:
>>
>> this a weakness of javascript, there is no decimal type. but as Kevin
>> pointed out there are several libraries.
>>
>> One of the most complete I have seen so far is BigNumber (in npm is
>> bignumber.js):
>>
>> https://github.com/MikeMcl/bignumber.js
>>
>> I have never used though
>>
>>
>> 2012/12/28 Kevin Purnelle 
>>>
>>> Hello,
>>>
>>> I am building my first app with nodeJS and I am very excited about
>>> everything I have been learning with nodejs until now.
>>> My concerns are about numbers, which can't be represented precisely with
>>> the current specs for floating point numbers in js (not only js, I know)
>>> In that application I have to handle money, so calculations and storage
>>> of these values must be error free.
>>>
>>> The app is built with AngularJS, nodeJS (with express) and Mongodb
>>>
>>> Could anybody indicates how to handle numbers: from the time when the
>>> user fills the form to the time when the value is stored into the database
>>> and then, presented again to the user?
>>>
>>> So far, I've read that people advise to store money values as integers
>>> (so, stored in cents) but I would like to know if somebody has already faced
>>> that problem and how it was solved.
>>>
>>> Thank you :)
>>>
>>> --
>>> 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] Re: convention for publishing modules requiring --harmony?

2012-12-29 Thread Mark Hahn
> you could throw an error on require if a global for w/e you need is not 
> present?

That is not a solution.  That would be as bad as throwing an error if
they hadn't required a needed module themselves.

I happen to need this also in my new app.

-- 
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] new concept for structured asynchronous programming

2012-12-29 Thread Mark Hahn
> Imagine writing program consisting of 300 async calls

My app currently has several thousand such calls.

>  If nodejs team believes current solutions are optimal

There is no optimal solution.  If there were one everyone would jump on it.

I think it is great that you developed an interesting approach to the async
problem.  I think every programmer new to node should write an async
library.  I wrote such a library and I learned a lot, not just about
programming node, but about the nature of async code.  I used it for a
while.

Over the last several years I have found it easier and easier to just use
"boilerplate" as you described it.  Here are some examples ...

*Linear code ...
*
doThing1 = ->
blah blah blah
doThing2()

doThing2 = ->
blah blah blah
done()

doThing1()


*Looping ...*

angryBirds = [bird1, bird2, bird3]
do flingOneBird = ->
if not (bird = angryBirds.shift()) then done(); return
bird.fling()
flingOneBird()

I have used this boilerplate so many times that I can type it without
thinking.  It has also become very easy to read.  I don't think it is hard
for others to read, but I may be wrong.

-- 
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: new concept for structured asynchronous programming

2012-12-30 Thread Mark Hahn
>   you have to handle "err" return code in each line. Doubles the amount
of code

I don't know what you mean "for each line".  The line `x=2` can't throw an
error.  I find I have to do a line like this after each call with a
possible error callback ...

  if err then log "module bird: fling failed for bird: ', bird.name;
return err

I just looked at some random code files from my app and here are the
results for several files ...

file1: 63 lines, 1 err line
file2: 291 lines, 12 err lines
file3: 42 lines, 4 err lines

So it ranges from 2% to 10% of the lines in my code.  Even if my selection
of random files were accidentally biased, the results will not be near the
50% you claimed.  Your eyesight is really bad if those err lines make the
forest hard to see.

BTW, some very famous language designers at Google are forcing everyone to
use this error handling technique in the new GO language.

>  in the proposed optimal solution

Once again you are talking about this mythical *optimal* solution.  What
solution are you talking about?  There is no such thing. Handing async
callbacks is inherently hard and I doubt there will ever be a magic fix.

A lot of people would like this magic fix but it ain't gonna happen.  Get
over 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] Inconsistent method names?

2012-12-30 Thread Mark Hahn
> how many people will be upset that the fs lib isn't ever going to
change its naming conventions.

We aren't asking for a change.  We are asking for a harmless addition.  It
will break nothing and cause no grief.  If you take a vote then everyone
who has them memorized, and doesn't care about those who don't, will vote
against the addition.

-- 
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 do you work with decimal numbers so that the precision problem of floats is under control?

2012-12-30 Thread Mark Hahn
Use `sellingPrice = (buyingPrice * x ).toFixed(2)`

On Sun, Dec 30, 2012 at 1:35 PM, Kevin Purnelle wrote:

> sellingPrice = buyingPrice * x

-- 
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 revive a dead npm module?

2012-12-31 Thread Mark Hahn
Isn't the answer always "fork it"?


On Mon, Dec 31, 2012 at 5:57 AM, Arunoda Susiripala <
arunoda.susirip...@gmail.com> wrote:

> This might help - https://npmjs.org/doc/disputes.html
>
>
> On Mon, Dec 31, 2012 at 6:48 PM, toranb  wrote:
>
>> A few months back I took on a dependency of what appeared to be an active
>> npm module (phantomjs-node)
>>
>> But since then it's become clear that the maintainer is anything but.
>> I've even asked him to hand over the module to someone that is willing to
>> maintain it. But without even so much as a comment the project appears to
>> be stuck in limbo.
>>
>> https://github.com/sgentle/phantomjs-node/issues/57
>>
>> The issue above was opened a month ago with no reply and I'm curious what
>> the community can do to help take back this well named but now dead npm
>> module
>>
>> Thank you in advance
>>
>> --
>> 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
>>
>
>
>
> --
> Arunoda Susiripala
>
> @arunoda 
>  https://github.com/arunoda
> http://www.linkedin.com/in/arunoda
>
> --
> 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 do you work with decimal numbers so that the precision problem of floats is under control?

2012-12-31 Thread Mark Hahn
Just chain using all floats and use toFixed at the end.  Floating points
have all the resolution you need.  It doesn't hurt for 0.04 to hang
around during the intermediate calculations.

-- 
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] Inconsistent method names?

2012-12-31 Thread Mark Hahn
> without having to also remember a list of function aliases.

The whole point is to reduce memory needs.  I don't see how it could
require anyone to remember anything new.  It would "just work".  As far as
confusion goes, just bury the alias info in fine print in the docs.

CouchDB does this.  You can use startKey or startkey.  They did this
because they started with startkey which confused many, including me.  They
didn't even document 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] convention for publishing modules requiring --harmony?

2012-12-31 Thread Mark Hahn
Has anyone found problems with weakmap?  My application uses it and it
works so far for me. It would be a serious problem if I couldn't use it.


On Mon, Dec 31, 2012 at 8:39 AM, Rick Waldron wrote:

>
>
> On Monday, December 31, 2012, Domenic Denicola wrote:
>
>> On Sunday, December 30, 2012 4:40:19 PM UTC-5, Rick Waldron wrote:
>>
>>>
>>> On Sunday, December 30, 2012, Tristan Slominski wrote:
>>>
 RE: "No one should use --harmony today anyway.."

 I didn't see block-scoped "let" in es6-shim (pretty sure that's
 impossible to shim without compilation, right?), so although you make a
 good case for some things, availability of "let" and "WeakMap" is pretty
 compelling in --harmony. For the things it can address/shim, es6-shim looks
 like a good solution.
>>>
>>>
>>> Ugh
>>> Again, everything I said _still_ stands: the semantics of let are still
>>> incomplete (temporal dead zone discussion) and there is a serious backward
>>> compatible syntax issue yet to be resolved (let is not reserved and let
>>> destructuring is ambiguous with dereferenced let identifiers).
>>>
>>
>> +1. Additionally, `let` is not bound correctly in loop block heads with
>> --harmony; in ES6 for (let x; ;) or for (let x in y) will create a fresh
>> per-loop binding. This is a rather serious semantic change, so yet another
>> reason for Rick's warning.
>>
>> Also, just tested this because I had a suspicion it might be the case:
>> the semantics and syntax for `const` are quite borked, with no errors
>> thrown on assignment and no syntax errors upon uninitialized const
>> declarations (i.e. `const x;` instead of `const x = 10;`).
>>
>
> Nice find—are there bugs filed?
>
> Rick
>
>
>
>>  --
>> 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] How do you work with decimal numbers so that the precision problem of floats is under control?

2012-12-31 Thread Mark Hahn
In general you can think of js numbers as integers or floats, assuming you
need less than the 56 bits of resolution.  A common misconception is that
floating point numbers have some sort of built-in inaccuracy.  It took me a
while to quit worrying about it.

I even send numbers to jquery/DOM with things like the .004 present.
 It wastes some characters when serializing but that isn't a big problem in
the overall scheme of things.


On Mon, Dec 31, 2012 at 9:52 AM, Kevin Purnelle wrote:

> Ok thank you, this was my real concern, if repeated imprecision
> in operations could lead to inconsistency after some time. :)
>
> On Monday, 31 December 2012 18:35:41 UTC+1, Mark Hahn wrote:
>>
>> Just chain using all floats and use toFixed at the end.  Floating points
>> have all the resolution you need.  It doesn't hurt for 0.04 to hang
>> around during the intermediate calculations.
>>
>  --
> 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: What Editor do you use?

2012-12-31 Thread Mark Hahn
+1 for webstorm.  It's git support is outstanding.  I also like transparent
ssh linkage to servers including changes made externally. Like any
closed-source product it has a few more bugs here and there, but the
features outweigh the problems.

For years I changed editors every six months, including eclipse, netbeans,
and sublime text 2.  I've stuck with webstorm for over a year now.  I only
paid $30 when it was on sale.


On Mon, Dec 31, 2012 at 12:43 PM, Brian Link  wrote:

> I use Sublime Text 2, but we have an ex-Java developer on our team who
> really loves Webstorm http://www.jetbrains.com/webstorm/.
>
> On Monday, December 31, 2012 7:07:23 AM UTC-8, Rodrigo Fonseca wrote:
>>
>>  I'm trying to use netbeans, but when i try to put a "ejs" file, the
>> netbeans doesn't recognize it, so i'm using textMate, but i really i want
>> to use the netbeans. I'm on Mac, there is any other editor?
>
>  --
> 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: How to revive a dead npm module?

2013-01-01 Thread Mark Hahn
> It would be good if npm have some better procedures for that, like allow
to retake the name,

God forbid that we run out of names.


On Tue, Jan 1, 2013 at 7:20 AM, Arunoda Susiripala <
arunoda.susirip...@gmail.com> wrote:

> And I would like to know that how many modules have been resolved like
> this?
>
>
> On Tue, Jan 1, 2013 at 8:36 PM, Mariusz Nowak  wrote:
>
>> I guess that about 50% of projects in npm reflect such state.
>>
>> It would be good if npm have some better procedures for that, like allow
>> to retake the name, and give rights to publish greater versions.
>>
>> On Monday, December 31, 2012 2:18:31 PM UTC+1, toranb wrote:
>>>
>>> A few months back I took on a dependency of what appeared to be an
>>> active npm module (phantomjs-node)
>>>
>>> But since then it's become clear that the maintainer is anything but.
>>> I've even asked him to hand over the module to someone that is willing to
>>> maintain it. But without even so much as a comment the project appears to
>>> be stuck in limbo.
>>>
>>> https://github.com/sgentle/**phantomjs-node/issues/57
>>>
>>> The issue above was opened a month ago with no reply and I'm curious
>>> what the community can do to help take back this well named but now dead
>>> npm module
>>>
>>> Thank you in advance
>>>
>>  --
>> 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
>>
>
>
>
> --
> Arunoda Susiripala
>
> @arunoda 
>  https://github.com/arunoda
> http://www.linkedin.com/in/arunoda
>
> --
> 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] I need your help desperately for increase my streaming speed

2013-01-07 Thread Mark Hahn
> The server-side is processed by node.js

Are you passing video data through nodejs?  That would be a mistake as
nodejs is really slow at handling large amounts of binary data.  It would
be much faster to use something like nginx.

My app hosts static files through nginx and video directly from Amazon S3.

-- 
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] I need your help desperately for increase my streaming speed

2013-01-07 Thread Mark Hahn
> Anyone here insist that node is super fast.

I don't think many node users say that.  Node is efficient and can serve a
lot of simultaneous connections.  A JS interpreter cannot compete with
efficient C++ code for hauling data.

>  Is it faster than node.js

Nginx and node are each fast for their own purposes.  Nginx is fast at
serving static data and node is fast at serving dynamic pages/data and
low-level connection-handling.  They go well together with nginx proxying
in front of node.  This is a common configuration.

Both are asynchronous-based with event loops.  Nginx is simpler to use for
simple serving than node is.  IMHO, nginx should replace apache web server.

However, I highly recommend letting some other service like S3 or
cloudfront serve video files.  It will save you headaches dealing with all
that data.

-- 
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] I need your help desperately for increase my streaming speed

2013-01-07 Thread Mark Hahn
For anyone reading this thread, I should mention that nginx does not
support websockets.  That caused me some headaches.


On Mon, Jan 7, 2013 at 10:36 PM, Mark Hahn  wrote:

> > Anyone here insist that node is super fast.
>
> I don't think many node users say that.  Node is efficient and can serve a
> lot of simultaneous connections.  A JS interpreter cannot compete with
> efficient C++ code for hauling data.
>
> >  Is it faster than node.js
>
> Nginx and node are each fast for their own purposes.  Nginx is fast at
> serving static data and node is fast at serving dynamic pages/data and
> low-level connection-handling.  They go well together with nginx proxying
> in front of node.  This is a common configuration.
>
> Both are asynchronous-based with event loops.  Nginx is simpler to use for
> simple serving than node is.  IMHO, nginx should replace apache web server.
>
> However, I highly recommend letting some other service like S3 or
> cloudfront serve video files.  It will save you headaches dealing with all
> that data.
>
>
>
>

-- 
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] I need your help desperately for increase my streaming speed

2013-01-08 Thread Mark Hahn
> I heard some people send data in chunks. Is this possible to make it
faster?

I don't remember details right now.  Someone else will have to help you.

I don't think flash does anything special to serve video.  It just serves a
file.

On Mon, Jan 7, 2013 at 10:58 PM, Ket Nonting  wrote:

> I heard some people send data in chunks. Is this possible to make it
> faster?

-- 
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: I need your help desperately for increase my streaming speed

2013-01-08 Thread Mark Hahn
Sorry, I didn't catch the usage of P2P.  That is a horse of a different
color.


On Tue, Jan 8, 2013 at 2:09 PM, Adam Malcontenti-Wilson  wrote:

> If your using WebRTC P2P for streaming the video, the slow streaming
> very well may be client-side, as it relies on each peer having enough
> upload bandwidth to each other peer. The only reason your server would
> be involved in the slowing down of streaming is if you were piping the
> video through the websocket connection, which would likely be slow
> over the internet depending on how you serialise the data.
>
> On Tue, Jan 8, 2013 at 7:35 PM, Ket  wrote:
> > Thank you for suggestion.
> >
> > Hope the details below would help.
> >
> > The hosting is A2Hosting, a vps package, based in Michigan. I know it's
> not
> > powerful but I plan to upgrade over time.
> >
> > The node.js package is provided by Joyent on Github here:
> > https://github.com/joyent/node
> >
> > The websocket package provides by Worlize on Github here:
> > https://github.com/Worlize/WebSocket-Node
> >
> > And for the WebRTC script, I just simply turn HTML5Rocks.com upside down
> to
> > sift out the codes.
> >
> > My initial intention is to use between friends and a small number of my
> > clients and may expand if it works out so well.
> >
> > Thank you,
> >
> >
> > On Tuesday, January 8, 2013 2:41:31 PM UTC+7, Marco Rogers wrote:
> >>
> >> From your link, it looks like you want to do live streaming to a dynamic
> >> list of recipients. That is a large topic, and "use nodejs" doesn't
> begin to
> >> cover it. Voxer does live audio streaming with node and they have a
> large
> >> system and use many many servers. So I'd think real hard about standing
> up
> >> something simple and expecting it to hold up in production.
> >>
> >> But you didn't ask that. You asked why it's slow on your web host.
> You'll
> >> have to provide more information about what web host you're using, your
> app
> >> architecture, and what "slow" means in order for someone to help you out
> >> with that.
> >>
> >> Good luck
> >> :Marco
> >>
> > --
> > 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
>
>
>
> --
> Adam Malcontenti-Wilson
>
> --
> 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] Is it possible to build a multi-user image gallery in node.js?

2013-01-09 Thread Mark Hahn
I have an app that does almost the same thing and node has been good for it.

> and a small thumbnail displayed once each picture has been uploaded.

BTW: In html5 you can display the thumbnail instantly instead of waiting
for upload.  In my app you can drag images in or select from a picker, the
image appears immediately, an overlay over the image shows progress and the
image doesn't change when progress is finished.  You can also rename the
image while uploading.

-- 
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] Convincing team to use Node

2013-01-09 Thread Mark Hahn
>  Do we have metrics on that?

Anecdotal evidence:   I have had several recruiters try to hire me away
since I became active in node community.  This could mean there is a
shortage.  It probably means node coders cost more.



On Wed, Jan 9, 2013 at 7:04 AM, Ben Noordhuis  wrote:

> On Wed, Jan 9, 2013 at 8:01 AM, David Jacobs  wrote:
> > Hey guys,
> >
> > I would love to convince my new company to build our platform using
> Nodejs
> > as our server-side language. Node is a possibility for our small team,
> but a
> > few questions will have to be answered before I can convince everyone
> that
> > it's worth using:
> >
> > 1. Would it be harder to hire if we built our apps with Node? (We're a
> > startup in the Bay Area.) More specifically: Hiring for people who know
> > about or already love Node seems like a nice filter for talent, but is it
> > too stringent of a filter? What percentage of the community wants to code
> > using Node professionally but isn't right now? Do we have metrics on
> that?
> >
> > 2. What are good examples of complex domains that have been tackled with
> > Node web apps and API layers?
> >
> > 3. What major road blocks have teams discovered at the edges of Node?
> >
> > What other tips do you have for convincing an employer that the language
> > makes good business sense?
> >
> > Best,
> > David
>
> It would help if you told us what you're building.  As with all
> technologies, node.js is great for some things and not so great for
> other things.
>
> --
> 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] Dependency based asynchronous flow

2013-01-09 Thread Mark Hahn
Can it handle loops?


On Wed, Jan 9, 2013 at 1:13 PM, Tom  wrote:

> Hi everyone,
>
> I've created a simple library for asynchronous flow, based on specifying
> dependencies. I implemented it using a dependency graph and LiveScript.
> Except that it doesn't form one list of dependencies in order, it forms a
> list of beginning and exit nodes, and executes everything in between
> in parallel where needed by defining dependencies.
>
> I'm aiming to cut away as much code as possible by the use of .flow(), but
> also allow you to use the Graph and Node classes/functions when needing
> more expressiveness (e.g. reuse of nodes in different graphs, generating
> graphs, etc).
>
> https://github.com/Industrial/graphflow
>
> Any input would be greatly appreciated, as this is my first release on npm
> :-)
>
> Cheers,
>
> Tom Wieland
>
> --
> 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] Dependency based asynchronous flow

2013-01-09 Thread Mark Hahn
there is no such thing as a new idea.  Whenever you investigate patents the
harder you look the more you can go back in time.


On Wed, Jan 9, 2013 at 4:06 PM, Tatumizer  wrote:

> I came up with same idea 25 years ago while writing simulations in queuing
> theory. There was a language back then called Ratfor (Rational Fortran) - I
> used it on Russian "version" of PDP-11.
>
> I started learning javascript 2 years ago, and was surprised that this
> simple idea is not in mainstream.
>
> Recently I learned that the concept of "circuit" as acyclic graph of gates
> is one of the well-known ideas in complexity theory (the one that deals
> with P vs NP and other esoteric stuff).
> http://en.wikipedia.org/wiki/Circuit_complexity
>
> Anyway, it's an old concept, I think every one will sooner or later come
> up with same idea given same problem.
>
> And it's really good for simulations in queuing theory! :)
>
>
>  --
> 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: Dependency based asynchronous flow

2013-01-10 Thread Mark Hahn
> I don't like having my threads hijacked

You must not have been following this forum for very long.  Every month or
two someone posts something about an async library and then a flame war
erupts.  Some threads have gone into hundreds of posts.  Someone always
suggests to ban these threads or start a new forum.  This is a *very*
opinionated topic.  You didn't realize what a mine field you were stepping
into.  Check out some old threads.


On Thu, Jan 10, 2013 at 1:25 PM, Eldar  wrote:

> I am sorry, I true didn't want to say "Oh, you lib is crap, I don't
> respect" and don't have that in mind. But you requested feedback and were
> pointed to other libs with similar idea. The best thing is to grap some
> useful ideas from them if there are such. BTW, why do you need feedback?
> The best feedback is your app and your users.
>
>
> On Friday, January 11, 2013 1:09:01 AM UTC+4, Tom Wieland wrote:
>
>> I don't like having my threads hijacked.
>>
>> Use mine because it's better? Oh you are where I was years ago?
>>
>> Too bad this isn't a forum, because I'd request a thread lock.
>>
>> I'll just continue with my project, and leave the 'real' work to the 'big
>> boys'.
>>
>> I'm sure this doesn't leave a great impression of me but neither does it
>> of the mailing list. I guess this is what happens when communities get big.
>>
>> I'll move discussion of graphflow to github.
>>
>>
>> On Thu, Jan 10, 2013 at 7:04 PM, Eldar  wrote:
>>
>>> nope, that's wrong
>>>
>>>
>>> On Thursday, January 10, 2013 9:28:40 PM UTC+4, Tatumizer wrote:

 @eldar: sure, any honest person prefers his own lib :)

>>>  --
>>> 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
>>>
>>
>>  --
> 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] npm install newline unexpected error

2013-01-16 Thread Mark Hahn
i'm trying to install the npm package using a command I found several
places and it isn't working.  I looked all over the npmjs.org site for
install instructions with no luck.  Googling doesn't work because I get
nothing but the "npm install" instruction.

 curl http://npmjs.org/install.sh | sudo sh
  % Total% Received % Xferd  Average Speed   TimeTime Time
 Current
 Dload  Upload   Total   SpentLeft
 Speed
100850850 0266  0 --:--:-- --:--:-- --:--:--
 1062
sh: 2: Syntax error: newline unexpected

What am I doing wrong?

-- 
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: npm install newline unexpected error

2013-01-16 Thread Mark Hahn
Oh, it's ubuntu 12.05.


On Wed, Jan 16, 2013 at 3:13 PM, Mark Hahn  wrote:

> i'm trying to install the npm package using a command I found several
> places and it isn't working.  I looked all over the npmjs.org site for
> install instructions with no luck.  Googling doesn't work because I get
> nothing but the "npm install" instruction.
>
>  curl http://npmjs.org/install.sh | sudo sh
>   % Total% Received % Xferd  Average Speed   TimeTime Time
>  Current
>  Dload  Upload   Total   SpentLeft
>  Speed
> 100850850 0266  0 --:--:-- --:--:-- --:--:--
>  1062
> sh: 2: Syntax error: newline unexpected
>
> What am I doing wrong?
>

-- 
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: npm install newline unexpected error

2013-01-16 Thread Mark Hahn
Duh, i looked in the sh script and it says to use https.  This process
needs to be somehow fixed for idiots like me.  So the new command is ...

  curl https://npmjs.org/install.sh | sudo sh


On Wed, Jan 16, 2013 at 3:13 PM, Mark Hahn  wrote:

> Oh, it's ubuntu 12.05.
>
>
> On Wed, Jan 16, 2013 at 3:13 PM, Mark Hahn  wrote:
>
>> i'm trying to install the npm package using a command I found several
>> places and it isn't working.  I looked all over the npmjs.org site for
>> install instructions with no luck.  Googling doesn't work because I get
>> nothing but the "npm install" instruction.
>>
>>  curl http://npmjs.org/install.sh | sudo sh
>>   % Total% Received % Xferd  Average Speed   TimeTime Time
>>  Current
>>  Dload  Upload   Total   SpentLeft
>>  Speed
>> 100850850 0266  0 --:--:-- --:--:-- --:--:--
>>  1062
>> sh: 2: Syntax error: newline unexpected
>>
>> What am I doing wrong?
>>
>
>

-- 
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: [ANN] eventflow - Add asynchronous abilities to your EventEmitters

2013-01-16 Thread Mark Hahn
The problem with using things for purposes not intended, or designed for,
may work great.  The problem is that in the future they may change.  No one
is going to worry about supporting an odd use like this.



On Wed, Jan 16, 2013 at 4:35 PM, Katsumoto  wrote:

> четверг, 17 января 2013 г., 2:09:28 UTC+2 пользователь Alan Hoffmeister
> написал:
>
>> Well, I think Jake was talking about queuing the callbacks and waiting
>> for the event to return back and fire those callbacks. This is a pattern
>> that I try to avoid inside Node.js because of the potential memory leaking
>> probability.
>>
>> This is quite different, the method you talk about allow only to run list
> of handlers you know. Is easy to handle with async[series || parallel ||
> waterfall].
> But this approach allow to fire an event and listeners that you've even
> didn't know about may do they work async and callback so app could run his
> next step.
>
>
>> What if something went wrong and the event never "ping back"? Your
>> callback will stay there ocuping memory.
>>
>> The same we could talk about any other mistake, same thing goes if
> someone does something wrong...
>
>
>> --
>> Att,
>> Alan Hoffmeister
>>
>>
>> 2013/1/16 Katsumoto 
>>
>>> What abuse or problem could be here if this is normal async flow, event
>>> handler could return error as first argument.
>>>
>>> среда, 16 января 2013 г., 8:54:31 UTC+2 пользователь Raynos написал:

 You guys realize that using events to effectively call a series of
 functions in parallel or series is abuse of the event emitter right.

 What your doing there is RPC over events. RPC is best done with
 something like functions or methods

 If an event handler can error you need to put down your EventEmitter
 and think about your code and how to structure it.


 On Tue, Jan 15, 2013 at 2:48 PM, Brian Link  wrote:

> Very cool.  I've been loving this pattern. Bright minds ...
>
>
> On Tuesday, January 15, 2013 2:35:31 PM UTC-8, Katsumoto wrote:
>>
>> I'm using the same flow for almost a year in my framework.
>> Here is my lightweight implementation: https://github.com/Shogun147/*
>> *Katana/blob/master/lib/**bootstrap.js#L1-L40
>>
>  --
> 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
>

  --
>>> 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
>>>
>>
>>  --
> 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: Waiting for an async operation to end?

2013-01-17 Thread Mark Hahn
You could use a counter to know when the last one has ended.  That is what
I do.


On Thu, Jan 17, 2013 at 10:21 PM, Jean-Michel Hiver wrote:

>
> Le vendredi 18 janvier 2013 05:43:19 UTC+4, snoj a écrit :
>>
>> Is there some reason you can't use the "end" event? (I'm assuming you are
>> using 
>> https://github.com/Gagle/Node-**BufferedReader
>> )
>
>
> Hello,
>
> The thing is that I want to load multiple files... thus i need some kind
> of "end" event once all the files have been read.
>
> Any ideas?
>
> Cheers
> JM
>
> --
> 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] Version 0.9.7 (Unstable)

2013-01-18 Thread Mark Hahn
I'm curious about something.  What would be the disadvantage to enabling
harmony by default in node?

I and at least one other have a problem in that we have a module which
requires harmony and there is no way to enable it from npm.



On Fri, Jan 18, 2013 at 11:51 AM, Isaac Schlueter  wrote:

> 2013.01.18, Version 0.9.7 (Unstable)
>
> * V8: Upgrade to 3.15.11.7
>
> * npm: Upgrade to 1.2.2
>
> * punycode: Upgrade to 1.2.0 (Mathias Bynens)
>
> * repl: make built-in modules available by default (Felix Böhm)
>
> * windows: add support for '_Total' perf counters (Scott Blomquist)
>
> * cluster: make --prof work for workers (Ben Noordhuis)
>
> * child_process: do not keep list of sent sockets (Fedor Indutny)
>
> * tls: Follow RFC6125 more strictly (Fedor Indutny)
>
> * buffer: floating point read/write improvements (Trevor Norris)
>
> * TypedArrays: Improve dataview perf without endian param (Dean McNamee)
>
> * module: assert require() called with a non-empty string (Felix Böhm,
> James Campos)
>
> * stdio: Set readable/writable flags properly (isaacs)
>
> * stream: Properly handle large reads from push-streams (isaacs)
>
>
> Source Code: http://nodejs.org/dist/v0.9.7/node-v0.9.7.tar.gz
>
> Macintosh Installer (Universal):
> http://nodejs.org/dist/v0.9.7/node-v0.9.7.pkg
>
> Windows Installer: http://nodejs.org/dist/v0.9.7/node-v0.9.7-x86.msi
>
> Windows x64 Installer:
> http://nodejs.org/dist/v0.9.7/x64/node-v0.9.7-x64.msi
>
> Windows x64 Files: http://nodejs.org/dist/v0.9.7/x64/
>
> Linux 32-bit Binary:
> http://nodejs.org/dist/v0.9.7/node-v0.9.7-linux-x86.tar.gz
>
> Linux 64-bit Binary:
> http://nodejs.org/dist/v0.9.7/node-v0.9.7-linux-x64.tar.gz
>
> Solaris 32-bit Binary:
> http://nodejs.org/dist/v0.9.7/node-v0.9.7-sunos-x86.tar.gz
>
> Solaris 64-bit Binary:
> http://nodejs.org/dist/v0.9.7/node-v0.9.7-sunos-x64.tar.gz
>
> Other release files: http://nodejs.org/dist/v0.9.7/
>
> Website: http://nodejs.org/docs/v0.9.7/
>
> Documentation: http://nodejs.org/docs/v0.9.7/api/
>
> Shasums:
>
> ```
> fa5771999205beae787e56bbffa3be3c496dbb3e  node-v0.9.7-darwin-x64.tar.gz
> 3790a0323e82598d9286470a3ca8b079b25d815c  node-v0.9.7-darwin-x86.tar.gz
> 70da0da05a2d76dfba389b413112aa1c31289114  node-v0.9.7-linux-x64.tar.gz
> b7448f020820302a6c648744a9ba4b6e1979fbf8  node-v0.9.7-linux-x86.tar.gz
> a0148c804c37ecbcfd4039213e469ba2757b6125  node-v0.9.7-sunos-x64.tar.gz
> 121cd6fe2fbab0ca20644256914433bfa02ca6c4  node-v0.9.7-sunos-x86.tar.gz
> 8938d57fc9cff896bb13901a43b5cff989785a23  node-v0.9.7-x86.msi
> 23b86861de7c6111311f869c722431cf84d93761  node-v0.9.7.pkg
> 527a86ee094f7ed77967eda3dff4b2aff3f29384  node-v0.9.7.tar.gz
> 5231f327979f900d4ba927f2e63e67635001268c  node.exe
> 6a78465d3f6e34aab82a529839c522abbab715ac  node.exp
> d814bd0733ba22a3cd9c086d34c68706d6c77663  node.lib
> 5c9df4dcf16c9baafce9b6982907ada586e878a2  node.pdb
> f49f1e0706ef38facba45af75cfdf44678b21f5a  x64/node-v0.9.7-x64.msi
> 13f9ee5c81b89bf77c5bfe46993905de4e3384d7  x64/node.exe
> 3f9c67381a7f2b3fc2f6c14b66036dde02de2820  x64/node.exp
> cac98eebe21aeb05741a2fec6e2c7eaf5bb111a6  x64/node.lib
> 563932b95c08ebdb923358cd8b68ee17ac7ad781  x64/node.pdb
> ```
>
> --
> 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] Version 0.9.7 (Unstable)

2013-01-18 Thread Mark Hahn
On Fri, Jan 18, 2013 at 12:10 PM, Isaac Schlueter  wrote:

> Probably not telling you anything you don't already
> know.
>

You over-estimate me.  :-)

-- 
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] a pakage that exports few modules

2013-01-24 Thread Mark Hahn
tl;dr

Skimming over this thread I don't see anyone jumping on listas'/austin's
bandwagon.  I, for one, certainly agree with Isaac's arguments.  I also
think he has been very nice in putting in so much effort in replying to
such a stupid concern.

In short, +1 for Isaac's arguments.


On Thu, Jan 24, 2013 at 9:19 AM, Austin William Wright <
diamondma...@users.sourceforge.net> wrote:

>
> On Wednesday, January 23, 2013 9:04:52 PM UTC-7, Isaac Schlueter wrote:
>>
>> On Wed, Jan 23, 2013 at 7:30 PM, Austin William Wright
>>  wrote:
>> > ...
>>
>> Look, here's the bottom: The module system is locked.  We're not
>> interested in changing it.  The source is open, so you can go nuts on
>> it if you'd like.  Your feelings about node's module system are rare,
>> and not shared by the development team, or a significant fraction of
>> users.
>>
>> We don't destabilize node-core for vocal minorities.
>>
>
> Absolutely not: If something is wrong, you change it and increment the
> major version number. That's not "destabilizing" in any sense of the word,
> that's improving functionality, and telling people that you broke
> reverse compatibility in doing so.
>
> There's nothing "vocal minorities" about cross-platform coding. Most
> people won't use 'crypto'. Does that make them a vocal minority? Most
> people won't use 'domain'. Does that make them a vocal minority? Most
> people won't be affected by any of the bugs being filed from now on, but we
> still regard those as important. But ill-defined require() is just as much
> a bug as any of those.
>
> The story of the growth of Node.js is getting support and functionality
> out for as many people as possible. You don't regard if it's going to be a
> "majority" or not, you regard if it's *profitable at the margin*.
>
>
>> > Right now I'm stuck at convincing people that pragmatism isn't good.
>>
>> That's confusing.  Why are you here if you don't think pragmatism is a
>> good thing?  Node is all about pragmatism.
>>
>
> When you say "pragmatism" I hear "I don't understand the the system works
> together well enough to understand the consequences of my actions." That
> there are no facts, no fixed laws of logic, no certainty, no objectivity.
> It is the antithesis of semantics and objectivity. And it is not an
> appropriate design strategy for any software system.
>
> --
> 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] Fujitsu's new proprietary protocol claiming 30x speed of TCP

2013-01-31 Thread Mark Hahn
In order to be faster by 30X, the current tcp would have to only be using
3% of the bandwidth.  Kind of ridiculous.


On Wed, Jan 30, 2013 at 8:23 PM, Thomas Shinnick  wrote:

> To the extent that it sounds like a broad claim to solve the world's
> problems, yes.  It really is aimed towards congested networks.  Note the
> qualification "in a low-quality communications environment".  Apparently
> there's been such research ongoing for many years, and elsewhere.  So, more
> "ain't our company great" BS than marketing BS.  That is, only the internal
> people are going to be impressed...?
>
>
> On Wednesday, January 30, 2013 9:51:12 PM UTC-6, Luke Arduini wrote:
>>
>> Looks like marketing bs
>>
>> On Wednesday, January 30, 2013, Tristan Slominski wrote:
>>
>>> Came across this. Seems the Node.js community would care about it, if
>>> nothing else, for situational awareness:
>>>
>>> http://www.fujitsu.com/global/**news/pr/archives/month/2013/**
>>> 20130129-02.html
>>>
>>> The problem, of course, is that it's proprietary.
>>>
>>> Fujitsu Laboratories has succeeded at a software-only approach,
 developing: 1) A new protocol that incorporates an efficient proprietarily
 developed retransmission method based on user datagram protocol 
 (UDP)(2
 ), an optimized way to deliver streaming media able to reduce latency
 resulting from data retransmission when packet loss occurs; 2) Control
 technology that addresses the problem of UDP transmissions consuming excess
 bandwidth by performing a real-time measurement of available network
 bandwidth and securing an optimal amount of communications bandwidth
 without overwhelming TCP's share of the bandwidth; and 3) Technology that,
 by employing the new protocol, makes it possible to easily speed up
 existing TCP applications without having to modify them.
>>>
>>>  --
>>> --
>>> 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+unsubscribe@**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+unsubscribe@**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] Re: Re - How to add new row to existing document in couchDB Database .

2013-01-31 Thread Mark Hahn
I have an update handler that I use for all updates.  You just send the
change to the handler and it reads the doc, updates it, and writes it back,
all in one http request.  I can even update items nested in objects and
arrays using a syntax like "/a/b/c":"newValue".  I also support deleting
fields at any level by having a magic value of "__delete__me__".


On Thu, Jan 31, 2013 at 7:30 AM, Bradley Meck wrote:

> GET the document from CouchDB, change the row appropriately, PUT it back
> to CouchDB. All using HTTP. CouchDB will complain about merge problems if
> the _rev field does not match, if so, retry.
>
> --
> --
> 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: Re - How to add new row to existing document in couchDB Database .

2013-01-31 Thread Mark Hahn
> I'd be happy if I were wrong

Then smile.  I've been using it for a year.


On Thu, Jan 31, 2013 at 2:43 PM, Michael Jackson wrote:

> I'd be happy if I were wrong, but I don't believe it's possible to do all
> that with one HTTP request in CouchDB. The read and the write require at
> least two requests, a GET and a PUT as Bradley suggests...
>
> --
> Michael Jackson
> @mjackson
>
>
> On Thu, Jan 31, 2013 at 1:48 PM, Mark Hahn  wrote:
>
>> I have an update handler that I use for all updates.  You just send the
>> change to the handler and it reads the doc, updates it, and writes it back,
>> all in one http request.  I can even update items nested in objects and
>> arrays using a syntax like "/a/b/c":"newValue".  I also support deleting
>> fields at any level by having a magic value of "__delete__me__".
>>
>>
>> On Thu, Jan 31, 2013 at 7:30 AM, Bradley Meck wrote:
>>
>>> GET the document from CouchDB, change the row appropriately, PUT it back
>>> to CouchDB. All using HTTP. CouchDB will complain about merge problems if
>>> the _rev field does not match, if so, retry.
>>>
>>> --
>>> --
>>> 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.
>>
>>
>>
>
>  --
> --
> 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: Re - How to add new row to existing document in couchDB Database .

2013-01-31 Thread Mark Hahn
BTW, I am only talking about updates, which is what the OP asked about.
 The doc must already exist.


On Thu, Jan 31, 2013 at 2:55 PM, Mark Hahn  wrote:

> > I'd be happy if I were wrong
>
> Then smile.  I've been using it for a year.
>
>
> On Thu, Jan 31, 2013 at 2:43 PM, Michael Jackson wrote:
>
>> I'd be happy if I were wrong, but I don't believe it's possible to do all
>> that with one HTTP request in CouchDB. The read and the write require at
>> least two requests, a GET and a PUT as Bradley suggests...
>>
>> --
>> Michael Jackson
>> @mjackson
>>
>>
>> On Thu, Jan 31, 2013 at 1:48 PM, Mark Hahn  wrote:
>>
>>> I have an update handler that I use for all updates.  You just send the
>>> change to the handler and it reads the doc, updates it, and writes it back,
>>> all in one http request.  I can even update items nested in objects and
>>> arrays using a syntax like "/a/b/c":"newValue".  I also support deleting
>>> fields at any level by having a magic value of "__delete__me__".
>>>
>>>
>>> On Thu, Jan 31, 2013 at 7:30 AM, Bradley Meck wrote:
>>>
>>>> GET the document from CouchDB, change the row appropriately, PUT it
>>>> back to CouchDB. All using HTTP. CouchDB will complain about merge problems
>>>> if the _rev field does not match, if so, retry.
>>>>
>>>> --
>>>> --
>>>> 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.
>>>
>>>
>>>
>>
>>  --
>> --
>> 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: Re - How to add new row to existing document in couchDB Database .

2013-01-31 Thread Mark Hahn
Here is the update handler.  As you can see it does what I claimed.  Enjoy
...

update: (doc, req) ->
postData = JSON.parse req.body
 if doc
for k, v of postData
hash = doc
 if k[0] is '/'
parts = k.split '/'
for part in parts[1..-2] then hash = (hash[part] ?= {})
 k = parts[-1..-1][0]
if v is '__delete__me__' then delete hash[k]
else hash[k] = v
 [doc, JSON.stringify {doc, status: 'updated'}]
else
[null, JSON.stringify status: 'nodoc']



On Thu, Jan 31, 2013 at 2:57 PM, Mark Hahn  wrote:

> BTW, I am only talking about updates, which is what the OP asked about.
>  The doc must already exist.
>
>
> On Thu, Jan 31, 2013 at 2:55 PM, Mark Hahn  wrote:
>
>> > I'd be happy if I were wrong
>>
>> Then smile.  I've been using it for a year.
>>
>>
>> On Thu, Jan 31, 2013 at 2:43 PM, Michael Jackson wrote:
>>
>>> I'd be happy if I were wrong, but I don't believe it's possible to do
>>> all that with one HTTP request in CouchDB. The read and the write require
>>> at least two requests, a GET and a PUT as Bradley suggests...
>>>
>>> --
>>> Michael Jackson
>>> @mjackson
>>>
>>>
>>> On Thu, Jan 31, 2013 at 1:48 PM, Mark Hahn  wrote:
>>>
>>>> I have an update handler that I use for all updates.  You just send the
>>>> change to the handler and it reads the doc, updates it, and writes it back,
>>>> all in one http request.  I can even update items nested in objects and
>>>> arrays using a syntax like "/a/b/c":"newValue".  I also support deleting
>>>> fields at any level by having a magic value of "__delete__me__".
>>>>
>>>>
>>>> On Thu, Jan 31, 2013 at 7:30 AM, Bradley Meck 
>>>> wrote:
>>>>
>>>>> GET the document from CouchDB, change the row appropriately, PUT it
>>>>> back to CouchDB. All using HTTP. CouchDB will complain about merge 
>>>>> problems
>>>>> if the _rev field does not match, if so, retry.
>>>>>
>>>>> --
>>>>> --
>>>>> 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.
>>>>
>>>>
>>>>
>>>
>>>  --
>>> --
>>> 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 

Re: [nodejs] Re: Re - How to add new row to existing document in couchDB Database .

2013-01-31 Thread Mark Hahn
The doc argument comes from couch, not me.  The req is what I provide.
 Check the update handler docs.

Again, I can upgrade or delete any set of isolated fields, even nested,
with one http request.  The doc only needs to exist in the DB, not my app.


On Thu, Jan 31, 2013 at 4:55 PM, Michael Jackson wrote:

> Thanks for sharing. :) I had assumed that the OP didn't still have the
> original document hanging around in memory, as your "doc" argument
> suggests. Hence the need to GET it before updating.
>
> --
> Michael Jackson
> @mjackson
>
>
> On Thu, Jan 31, 2013 at 3:06 PM, Mark Hahn  wrote:
>
>> Here is the update handler.  As you can see it does what I claimed.
>>  Enjoy ...
>>
>> update: (doc, req) ->
>> postData = JSON.parse req.body
>>  if doc
>> for k, v of postData
>> hash = doc
>>  if k[0] is '/'
>> parts = k.split '/'
>> for part in parts[1..-2] then hash = (hash[part] ?= {})
>>  k = parts[-1..-1][0]
>> if v is '__delete__me__' then delete hash[k]
>> else hash[k] = v
>>  [doc, JSON.stringify {doc, status: 'updated'}]
>> else
>> [null, JSON.stringify status: 'nodoc']
>>
>>
>>
>> On Thu, Jan 31, 2013 at 2:57 PM, Mark Hahn  wrote:
>>
>>> BTW, I am only talking about updates, which is what the OP asked about.
>>>  The doc must already exist.
>>>
>>>
>>> On Thu, Jan 31, 2013 at 2:55 PM, Mark Hahn  wrote:
>>>
>>>> > I'd be happy if I were wrong
>>>>
>>>> Then smile.  I've been using it for a year.
>>>>
>>>>
>>>> On Thu, Jan 31, 2013 at 2:43 PM, Michael Jackson 
>>>> wrote:
>>>>
>>>>> I'd be happy if I were wrong, but I don't believe it's possible to do
>>>>> all that with one HTTP request in CouchDB. The read and the write require
>>>>> at least two requests, a GET and a PUT as Bradley suggests...
>>>>>
>>>>> --
>>>>> Michael Jackson
>>>>> @mjackson
>>>>>
>>>>>
>>>>> On Thu, Jan 31, 2013 at 1:48 PM, Mark Hahn  wrote:
>>>>>
>>>>>> I have an update handler that I use for all updates.  You just send
>>>>>> the change to the handler and it reads the doc, updates it, and writes it
>>>>>> back, all in one http request.  I can even update items nested in objects
>>>>>> and arrays using a syntax like "/a/b/c":"newValue".  I also support
>>>>>> deleting fields at any level by having a magic value of "__delete__me__".
>>>>>>
>>>>>>
>>>>>> On Thu, Jan 31, 2013 at 7:30 AM, Bradley Meck >>>>> > wrote:
>>>>>>
>>>>>>> GET the document from CouchDB, change the row appropriately, PUT it
>>>>>>> back to CouchDB. All using HTTP. CouchDB will complain about merge 
>>>>>>> problems
>>>>>>> if the _rev field does not match, if so, retry.
>>>>>>>
>>>>>>> --
>>>>>>> --
>>>>>>> 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

Re: [nodejs] patch discussion: speed up socket write and callback significantly

2013-01-31 Thread Mark Hahn
That sounds good.

>  if data size is less than system socket buffer ... write() is indeed
nonblock,

The old method is also non-blocking. I think you meant to say it is sync
instead of async.

Some people complain if you don't know whether a callback is going to be
async or sync.  But I believe code should be written so it doesn't matter.



On Thu, Jan 31, 2013 at 7:41 PM, darcy  wrote:

> In current version of node, socket write is always 'async', which creates
> some write contexts, put it into queue, and get it out when write data
> finished, and call the callback. But for socket write, if data size is less
> than system socket buffer(which can be modified by
> /proc/sys/net/core/wmem_max), write() is indeed nonblock, and all async
> work can be saved, than the performance of write+callback will be improve
> significantly.
>
> I've forked and made a patch:
>
> https://github.com/freedaxin/node/commit/dba71315bf229b7815c08188ef88097bfbf43135
>
> I added a benchmark(benchmark/net_rw.js), and the time consumption
> decreased by about 20%.
>
> It doesn't change the user api, but StreamWrap::WriteBuffer() returns a
> Number if all data has been written.
>
> I have run `make jslint test`, found two problems, and changed the test
> code.
> 1. In /test/simple/test-debugger-repl.js, one of the child processes
> always does not exit, I didn't found the reason, and changed the finish
> cleanup behaviours, and passed the test. But I still don't know what's the
> problem.
>
> 2. In /test/simple/test-tcp-wrap-listen.js, because I changed the return
> value of StreamWrap::WriteBuffer(), so the test should be modified.
>
> It's still not a perfect patch, add such a sync feature to async node is
> somehow incompatible with the code logic. And I've noticed that the stream
> related code is not stable yet, so if this patch is acceptable, more
> imporvements can be made later.
>
> btw: windows version has not been changed yet.
>
> issue link:
> https://github.com/joyent/node/issues/4699
>
>  --
> --
> 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 add new row to existing document in couchDB Database .

2013-02-01 Thread Mark Hahn
+1 for nano.  It is simple and just works.


On Fri, Feb 1, 2013 at 1:30 AM, Nuno Job  wrote:

> Hi,
>
> If you want to use CouchDB read the book first. It takes 2 days, and then
> you get it, and then you don't loose time figuring it out forever. It is
> the simplest programming book you have ever read (http://guide.couchdb.org
> )
>
> I wrote a blog post about "updating" documents, if you are interested:
>
> *
> http://writings.nunojob.com/2012/07/How-To-Update-A-Document-With-Nano-The-CouchDB-Client-for-Node.js.html
>
> I would use a library to access CouchDB: cradle, nano, whatever you fancy.
> These are more used and have fixed strange bugs, plus if you are a beginner
> its probably a good idea to stay away from internals first UNLESS the
> intent is to learn them. If that's the case and you have the time, then go
> ahead and write your own. Check out on npm how to publish it.
>
> Happy hacking,
> Nuno
>
> Thanks,
> Nuno
>
> --
> --
> 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] drex - [dynamic require() extension]

2013-02-01 Thread Mark Hahn
I'm not sure how this could work.  When switching modules, your app will
mostly link to the old module. I don't see how the app could switch to the
new module without restart.

Example:

mod = require './mod'
mod.foo bar

How would the mod variable get the new module?

 Also, you would have to be lucky to have your old module and new module be
compatible.


On Thu, Jan 31, 2013 at 1:26 PM, Yury Bogomolsky  wrote:

> https://github.com/yuryb/drex
>
> drex is watching a module for updates and cleanly re-requires the module
> after the update. New code is being require()d as if the new code is a
> totally different module, so require.cache is not a problem.
>
> var drex = require('drex');
> ... node code node code node code ...
> // here goes my frea[ky/quently updated] piece of code, which lives in a js 
> file called mucode.js:drex.require('./mucode.js', function(mucode){
>   // at this point my mucode.js has been require()d, just like this:
>   // var mucode = require('./mucode.js');
>   // the code of the required module is the LATEST UPDATE TO mucode.js
>   mucode.muNewFunc();  });
>
>  --
> --
> 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] patch discussion: speed up socket write and callback significantly

2013-02-01 Thread Mark Hahn
One would assume that there is some other async code happening.  You have
to get your data from somewhere and that somewhere is usually async.


On Fri, Feb 1, 2013 at 3:50 AM, Ben Noordhuis  wrote:

> On Fri, Feb 1, 2013 at 9:42 AM, darcy  wrote:
> > Yes, I mean write+callback can be sync in some cases.
> > If the callback should be promised to be async, we can use
> > process.nextTick(cb.bind(this)) in Socket._write().
> > But I think in userland it's not important whether write callback is
> sync or
> > async. And in current implement callback is also sync if some error
> occurs.
>
> The callback should always be asynchronous (i.e. run on the next
> tick), or you introduce the risk of stack overflows.
>
> Consider this code:
>
>   var conn = net.connect(/* ... */, function() {
> function write() { conn.write('PING', write) }
> write();
>   });
>
> If the network connection is fast enough that the write always
> succeeds and the callback is synchronous, you'll overflow the call
> stack in seconds flat.
>
> --
> --
> 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: What happens to hook.io?

2013-02-06 Thread Mark Hahn
I can't tell from the docs what this is used for.  Can you explain?


On Wed, Feb 6, 2013 at 2:07 AM, Marak Squires wrote:

> Featuring the all new resource engine!
>
> https://github.com/bigcompany/resource
>
> And no one is allowed to use it, especially Stan and Kyle.
>
> On Wed, Feb 6, 2013 at 7:58 AM, Eric Muyser  wrote:
>
>> Reverse psychology
>>
>>
>> On Tue, Feb 5, 2013 at 9:29 PM, Harald Hanche-Olsen 
>> wrote:
>>
>>> [Angel Java Lopez  (2013-02-05 11:31:00 UTC)]
>>>
>>> > Ummm... Marak, can you elaborate?
>>>
>>> It's becoming quite clear that he won't.
>>> So let's stop badgering him about it and move on.
>>>
>>> - Harald
>>>
>>> --
>>> --
>>> 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.
>>
>>
>>
>
>  --
> --
> 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] http/ https server on same port

2013-02-06 Thread Mark Hahn
Use https.createServer


On Wed, Feb 6, 2013 at 11:26 AM, Alex Kocharin  wrote:

>
> In order to do that you can create a tcp server (net module) and listen
> for any requests on a port. If it is plaintext request it's http, otherwise
> it's https. Simple enough.
>
> You can even put ssh server on the same port if you aren't so scary of a
> witchcraft :)
>
> So, the general idea is to create three servers, http, https and net. Net
> server would receive all connections and proxy them to others. I've done
> that using three different ports (1 external, 2 internal), but I'm quite
> sure you can simulate connection to a http(s) server internally without
> binding it to a port. Maybe it's "request" event I don't know, you can look
> in node.js source code how it can be done.
>
> --
> // alex
>
>
> 06.02.2013, 23:05, "V'Raj Kanwade" :
>
> I am building a proxy server which needs to listen for both http and https
> proxy on same port.
>
> http.createServer does not call response handler for https traffic.
>
> So I created the server using net.createServer. The question I have is,
> how can I leverage the http functionality once I have the input request?
>
> For eg. when I see the start of request is GET http://nodejs.org/HTTP/1.1, I 
> want to convert it into a http request so that the headers etc
> are parsed accordingly and if the request starts with CONNECT, I can
> implement my own tunneling?
>
>
> --
> --
> 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.
>
>
>

-- 
-- 
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: What happens to hook.io?

2013-02-07 Thread Mark Hahn
Do you realize how insulting that is?


On Wed, Feb 6, 2013 at 10:17 PM, Marak Squires wrote:

> I'm not the one who posted the link to BIg and started asking questions.
>
> On Thu, Feb 7, 2013 at 11:41 AM, Ruben Tan  wrote:
>
>> In this case, should we just lock this thread or delete it, since no
>> further discussion is necessary, and the current context has nothing to do
>> with the original question?
>>
>> --
>> --
>> 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.
>
>
>

-- 
-- 
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] Dependency-driven asynchronous request processing?

2013-02-09 Thread Mark Hahn
FWIW I have done several sites without using any framework.  I find routing
and other functions they provide to be trivial to implement.  Also I put in
features they don't have like websocket support, etc.  You can use plugins
intended for those frameworks with your own code.

In general I don't like being told how to organize my code.  I would never
be able to use rails.


On Fri, Feb 8, 2013 at 3:41 PM, Mikhail Zabaluev  wrote:

> Hi,
>
> I have created a website using Express, like perhaps most of the people
> who do their first project on Node.js.
> I find it a simple and convenient stack for basic and moderately complex
> websites.
> However, I'm curious to learn of ways to use Express, or any other
> frameworks that don't have the following limitations:
>
> 1. The middleware chains are invoked strictly sequentially and are not
> very flexible. There are ways to add path-specific middleware, but there
> doesn't appear to be a convenient way to alter the processing sequence
> based on per-request conditions. My use case: I don't want to request a
> potentially expensive connection to the persistent data store, or even
> invoke bodyParser etc., if the user is not logged in accordingly to the
> session (stored in Redis), and therefore the request is to be served an
> invariable file or redirected. My current solution is a wrapper function
> that checks a condition and passes control to the wrapped middleware or
> bypasses it, depending on the result.
>
> 2. Dependencies between middleware functions are implicit, and resolved by
> the use order: you've got to know that cookieParser has to be invoked
> before session, instead of the session middleware declaring it as a
> dependency so that it's invoked automatically in the correct order, or not
> invoked at all if session and any other dependent middleware stages were
> not used for this request, as suggested in point 1.
>
> 3. Connect-style middleware does not have a good place to pass
> intermediate results except hanging them off request or response objects,
> which can result in property name conflicts.
>
> Basically, I'd love to find something that marries Express-style process
> stage composition with the declarative control flow approach of async.auto,
> while being more lightweight and elegant than Shepherd or Plan.
>
> Regards,
>   Mikhail
>
> --
> --
> 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] Trivial stream.Transform Attempt

2013-02-10 Thread Mark Hahn
In my experience the quickest way to find a bug is to post a question.
 Then when it's impossible to remove the question the solution will appear,
leaving me to feel foolish.


On Sun, Feb 10, 2013 at 9:59 PM, rektide  wrote:

> That was super fun! I'd neglected to call stream.Transform's constructor
> when I derived from
> it. Everything appears to be working fine now, I think. The nop branch
> reflects this change.
>
> Thanks, & please pardon the interruption.
>
> O Mon, Feb 11, 2013 at 12:52:37AM -0500, rektide wrote:
> > Hello hello lovely Node-js people-
> >
> > I'm trying to implement a very simple stream.Transform, but I appear to
> be doing something
> > wrong! Please help me figure out how to get going with stream.Transform!
> >
> > My utterly trivial sample code is at-
> > https://github.com/rektide/arclamp2/blob/nop/src/ClarinetStream.js
> >
> > It's essentially-
> > function clarinetStream(){return this}
> > util.inherit(clarinetStream, stream.Transform)
> > clarinetStream.prototype._transform=
> function(chunk,outFn,callback){callback()}
> >
> > When I try to run my sample (which can be done via `npm test`), I get
> this stack trace-
> > _stream_writable.js:129
> >   if (state.ended) {
> >^
> > TypeError: Cannot read property 'ended' of undefined
> > at ClarinetStream.Writable.write (_stream_writable.js:129:12)
> > at write (_stream_readable.js:481:24)
> > at flow (_stream_readable.js:491:7)
> > at ReadStream.pipeOnReadable (_stream_readable.js:523:5)
> > at ReadStream.EventEmitter.emit (events.js:91:17)
> > at emitReadable (_stream_readable.js:343:10)
> > at onread (_stream_readable.js:288:7)
> > at ReadableState.onread (_stream_readable.js:64:5)
> > at onread (fs.js:1509:5)
> > at Object.wrapper [as oncomplete] (fs.js:419:17)
> >
> >
> > I had been attempting to use a 0.9.9-pre vintage build, and am now
> locked & loaded with the
> > latest trunk work. I've looked around some of Node's lib/_stream_* impl,
> but thusfar I don't
> > have a good registration on what's going on, what I could be doing wrong.
> >
> > Any help getting a sample stream.Transform running would be much
> appreciated!!
> > -rektide de la faye
> >
> > --
> > --
> > 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.
>
>
>

-- 
-- 
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: Query on ImageMagick

2013-02-12 Thread Mark Hahn
I use the identify command to get the image metadata.


On Tue, Feb 12, 2013 at 3:04 AM, greelgorke  wrote:

> check the err object in your callback for im and check the third param
> which is stderr. if stdout is null then probably an error is occurred
>
> Am Dienstag, 12. Februar 2013 09:46:02 UTC+1 schrieb Rakesh Kumar:
>
>> I am using image urls in my nodejs server directly to fetch images. what
>> i want is to create thumbnails of the images and show it in the browser.
>> The problem i am facing is with imagemagick. stdout is showing null values.
>> How to get data of resized image?
>> Below is the code i am implementing. urls are defined in an global array.
>>
>> http.createServer(function(**req,res){
>> var i=1;
>> var buf='';
>> request({url:url[i], encoding: null}, function (err, response, body) {
>>  if (!err && response.statusCode == 200) {
>> im.resize({
>> srcData: body,
>>  width: 50,
>> }, function(err, stdout) {
>> res.writeHead(200,{"Content-**type":"text/html"});
>>  res.write(stdout.toString('**base64'));
>> res.write('');
>> });
>> }
>> });
>> }).listen(1337,'127.0.0.1');
>>
>  --
> --
> 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] NodeJS analysis for suitability

2013-02-14 Thread Mark Hahn
On a side note, I just read the fully-loaded article and it dismisses
node's cluster module this way ...

 quote 

Approach 4: Use node’s cluster module!

NodeJS 0.6.x and up offer a cluster module which allows for the creation of
processes which “share a listening socket” to balance load across some
number of child processes.
What if you were to combine cluster with one of the approaches described
above?

The resultant design would inherit the shortcomings of synchronous or
internally threaded solutions: which are not responsive and lack grace.

Simply spinning new application instances is not always the right answer.

 end quote 

This seems unfounded.  Why don't extra processes help?  He makes the claim
it's no better but doesn't explain why.  I've used multiple processes in
the past and it worked great.
.

-- 
-- 
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: which are the big applications running on node.js

2013-02-14 Thread Mark Hahn
Closed source tends to be bigger monolithic solutions.  My proprietary app
has about 35,000 lines of coffescript (equivalent to 50K lines of JS).  It
uses websockets, background video processing, RPC, pubsub, etc.  I can't
imagine having developed it in anything other than Node.


On Thu, Feb 14, 2013 at 9:38 AM, Matt  wrote:

> Not sure what big projects you're expecting that are going to be open
> source. But Craigslist uses Haraka as their mail server, which is open
> source, though I'm sure they have closed source plugins.
>
>
> On Thu, Feb 14, 2013 at 12:26 PM, Daniel Morilha wrote:
>
>>
>> On Thu, Feb 14, 2013 at 9:25 AM, Austin William Wright <
>> diamondma...@users.sourceforge.net> wrote:
>>
>>> Preferably projects with published source code. "Big company X uses
>>> Node.js" is nice, but doesn't demonstrate very much.
>>
>>
>> good point!
>>
>>
>>
>> --
>> Daniel Morilha (dmori...@gmail.com)
>>
>> --
>> --
>> 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.
>
>
>

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




  1   2   3   4   5   6   7   >