Re: [nodejs] Re: How does round-robin clustering work in Node?

2013-11-22 Thread Marco Rogers
I have a naive question here. If cluster doesn't know if the worker is busy, what happens when a new connection comes in and it is still busy? Do requests queue at each worker? What behavior should be expected if you're using round robin with lots of busy workers? I'm thinking of the Heroku

Re: [nodejs] How to prevent disasters caused by the callback getting called multiple times?

2013-10-02 Thread Marco Rogers
I like this pattern for making nice utilities available on the function prototype. IMO it's the safest proto to modify. It would be handy in modules that do other specific function-wrapping things, like memoizing, currying, throttling, etc. This opinion is probably ripe for sparking nerd

Re: [nodejs] How to prevent disasters caused by the callback getting called multiple times?

2013-10-01 Thread Marco Rogers
This is the more insidious bug in my mind, because things just hang. Requests randomly time out. It sucks. On Tuesday, October 1, 2013 1:09:28 PM UTC-7, Mark Hahn wrote: I'm seeing those bugs much more frequently than I'd like to. Me too. And I also see the opposite where I don't remember

[nodejs] Re: nodejs framework

2013-09-23 Thread Marco Rogers
You could check out geddyjs http://geddyjs.org/. It's a framework more akin to rails. It doesn't have explicit rest support right now. But it has nice data models built in, and it's pretty easy to set up controllers for basic rest support. On Saturday, September 21, 2013 6:02:16 AM UTC-7,

[nodejs] git dependency of dependeny not installed in deep node_modules

2013-07-11 Thread Marco Rogers
Assuming the C dependency is the same or compatible version between A and B, then this is working as expected. npm knows how to resolve recursive dependencies such that they are not duplicated. If A and B depended on different versions of C, then you would be both of those as you originally

Re: [nodejs] npm link in deployment

2013-07-10 Thread Marco Rogers
@greelgorke is right that npm link is meant for development and not deployment. But I think I understand your problem. You have a single module repo, myLib, that you want to share between projects. I assume it's an internally developed module and not suitable for publishing to the public npm

[nodejs] Sessions

2013-07-10 Thread Marco Rogers
Why don't you describe your troubles with socket.io sessions. Maybe someone can help with that. :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

[nodejs] Node.js and harmony proxies

2013-06-22 Thread Marco Rogers
If you want to try out proxies, check out this repo. Tom has implemented a polyfill of the newer direct proxies by using the old non-standard ones in v8. It should give you an idea of how they behave. https://github.com/tvcutsem/harmony-reflect This worked in nodejs when I was poking around

[nodejs] Re: Easiest Way to Slurp a GET

2013-06-18 Thread Marco Rogers
No there's nothing built into core for this. The core apis actually want to encourage streaming and it's generally considered the more efficient pattern. There are lots of modules like the one you found that make it easy to accumulate the streamed data chunks. If you are making an http calls,

[nodejs] Re: Spawned processes as transform streams

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

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

2013-06-14 Thread Marco Rogers
this topic, visit https://groups.google.com/d/topic/nodejs/sbvdxC6i5Yw/unsubscribe. To unsubscribe from this group and all its topics, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Marco Rogers marco.rog

Re: [nodejs] Module naming

2013-05-28 Thread Marco Rogers
, visit https://groups.google.com/groups/opt_out. -- Marco Rogers marco.rog...@gmail.com | https://twitter.com/polotek Life is ten percent what happens to you and ninety percent how you respond to it. - Lou Holtz -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https

Re: [nodejs] Module naming

2013-05-25 Thread Marco Rogers
It's not clear from this thread what you want exactly. You want to name your modules whatever you want, not use namespaces, have them on npm, and also avoid name collision? How exactly do you see that working? :Marco On Saturday, May 25, 2013 11:06:28 AM UTC-7, stagas wrote: 2013/5/25 Alex

[nodejs] Re: Node + Angular + MongoDB

2013-04-27 Thread Marco Rogers
This is a pretty comprehensive list. I can't imagine you'd walk into any community with such a specific list and get a ready-made solution. Maybe java, but who wants to do that? ;) That said, you should check out geddy. It's a framework that leans more towards batteries included and convention

Re: [nodejs] Streams writev API

2013-04-25 Thread Marco Rogers
/opt_out. -- Marco Rogers marco.rog...@gmail.com | https://twitter.com/polotek Life is ten percent what happens to you and ninety percent how you respond to it. - Lou Holtz -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting

Re: [nodejs] Re: Streams writev API

2013-04-24 Thread Marco Rogers
I've been trying to follow this thread, but there's a lot here. I apologize in advance if I'm retreading anything that's already been said. I have a simple question first. Are you considering having both the flexible cork/uncork api and also putting a nice api on top of it with C/D option?

Re: [nodejs] Re: Streams writev API

2013-04-24 Thread Marco Rogers
+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Marco Rogers marco.rog...@gmail.com | https://twitter.com/polotek Life is ten percent what happens to you and ninety percent how you respond to it. - Lou Holtz -- -- Job Board: http

Re: [nodejs] Re: Streams writev API

2013-04-24 Thread Marco Rogers
of uncorking automatically when you call .end() solves most of that hazard. So getting some perspective on the use cases might be helpful here. The primary use case is the http-tcp interaction, and saving syscalls in web sites. On Wed, Apr 24, 2013 at 5:12 PM, Marco Rogers marco

[nodejs] Re: limitation with new streams

2013-03-29 Thread Marco Rogers
I'm not sure why this stopped working. But I'm also not sure why you would expect pushing no data to do something. Don't get me wrong, I understand the argument. I just don't know which behavior really makes the most sense. There's an argument that the new behavior is better. :Marco On

[nodejs] Re: Hookit: for all your core IO hooking needs

2013-03-28 Thread Marco Rogers
Nice. On Thursday, March 28, 2013 5:12:26 PM UTC-7, Adam Crabtree wrote: There are a lot of gotchas to wrapping core IO functions like done trycatch, long-stack-traces, longjohn and other modules, especially with EventEmitter. It's easier to get it wrong than it is to get it right. So, I

Re: [nodejs] Re: New Streams confusion

2013-03-25 Thread Marco Rogers
:32 AM UTC-4, Marco Rogers wrote: @Nathan's response is right. Creating a writable stream is preferable in most cases. But I wanted to add a little context to that. If you're dealing with a base readable stream, it's just pushing chunks of data at you off

Re: [nodejs] Re: New Streams confusion

2013-03-25 Thread Marco Rogers
to frame my understanding and help me convey it to other people. :Marco On Mon, Mar 25, 2013 at 2:23 PM, Dean Landolt d...@deanlandolt.com wrote: On Mon, Mar 25, 2013 at 5:01 PM, Marco Rogers marco.rog...@gmail.comwrote: I haven't experimented with streams2 as much as I should have. But I

Re: [nodejs] Re: New Streams confusion

2013-03-25 Thread Marco Rogers
keep sequence of events under control? Anyway, thanks Node team, I'm very impressed! On Wednesday, March 20, 2013 4:45:32 AM UTC-4, Marco Rogers wrote: @Nathan's response is right. Creating a writable stream is preferable in most cases. But I wanted to add

Re: [nodejs] Re: New Streams confusion

2013-03-25 Thread Marco Rogers
of this is a little hard to get our heads around but i always got the feeling that only about 10 people really understood all of old streams. -Mikeal On Mar 25, 2013, at 2:40PM, Marco Rogers marco.rog...@gmail.com wrote: I'm more and more convinced that need to go back and read all

[nodejs] Re: New Streams confusion

2013-03-20 Thread Marco Rogers
On Monday, March 18, 2013 11:06:48 AM UTC-7, Sigurgeir Jonsson wrote: The new streams have excellent support for high/low watermarks and auto-pausing/resuming, but the documentation confuses me a little... particularly the read method. When I read the new docs for the first time I was

[nodejs] Re: New Streams confusion

2013-03-20 Thread Marco Rogers
@Nathan's response is right. Creating a writable stream is preferable in most cases. But I wanted to add a little context to that. If you're dealing with a base readable stream, it's just pushing chunks of data at you off the wire. Your first task is to collect those chunks into meaningful

[nodejs] Re: Suggestion for the implementation of util.inherits()

2013-03-07 Thread Marco Rogers
Your problem is way simpler than this (though a little tough to explain). The problem in your example is that you are creating a dynamic object based on the AsLinker constructor before you have finished setting up the constructor. See my comments on your example. // Pull in your dependencies

Re: [nodejs] Re: I need your help desperately for increase my streaming speed

2013-01-08 Thread Marco Rogers
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

Re: [nodejs] Convention to preemptively break out of a domain/action?

2013-01-07 Thread Marco Rogers
Condition style is always available as an option. But in the types of situations you're describing, where you actually want to end the execution early, you end up using condition style because abort style does not exist. That's the case with array.forEach, and it's one of the reasons array.some

[nodejs] Re: I need your help desperately for increase my streaming speed

2013-01-07 Thread Marco Rogers
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

[nodejs] Re: Checking node_modules into git

2012-12-27 Thread Marco Rogers
Here's the article I wrote on checking in modules as well. I haven't really tried shrinkwrap, but it sounds like there are enough differences between the two approaches that you should explore both and see which one suits your needs best. I would employ shrinkwrap on a project where the deploy

Re: [nodejs] Re: Should stream.pipe forward errors?

2012-11-29 Thread Marco Rogers
://groups.google.com/group/nodejs?hl=en?hl=en -- Marco Rogers marco.rog...@gmail.com | https://twitter.com/polotek Life is ten percent what happens to you and ninety percent how you respond to it. - Lou Holtz -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki

[nodejs] Re: Should stream.pipe forward errors?

2012-11-28 Thread Marco Rogers
Yeah I wish there was a better story for this. It's easy to forward errors. It could become difficult to determine in what context the error was thrown. :Marco On Wednesday, November 28, 2012 9:10:51 AM UTC-8, Jeff Barczewski wrote: I was recently testing some stream piping like rstream

Re: [nodejs] Feature/Comparison Matrix for Node.js vs PHP

2012-11-28 Thread Marco Rogers
@Mark It's not really apples and oranges in this case. More so than other languages used for building applications, PHP can't really be separated from all the built-in stuff that comes with it. It becomes more of a platform, like node. There are a lot of significant differences, but those

[nodejs] Re: Where do you put the meat and potatoes code?

2012-11-22 Thread Marco Rogers
One thing you may be missing is that requiring a module multiple times does not load multiple version of it. Modules are cached after the first time they are required, so you get the same reference every time. So one answer to your question is that people re-use modules by requiring them in

Re: [nodejs] Re: Question about threads in node.js

2012-11-07 Thread Marco Rogers
It took me a while to get a good conceptual understanding of the node async networking layer (I still don't have a concrete understanding). I just did a quick search around and didn't really find anything. I think it's really interesting and instructive to get a handle on how different OSes

[nodejs] Re: Broken string data chunks in http ?

2012-10-17 Thread Marco Rogers
I tend to agree with the OP. If node supports strings, they should be valid strings. The name setEncoding implies that we plan to respect that encoding. Anything else is surprising. I think we're all sympathetic to the perf arguments. But that's something that can be worked on. I'd like to see

[nodejs] Re: Broken string data chunks in http ?

2012-10-17 Thread Marco Rogers
Turns out I was full of shit here. Sorry for helping stir things up without doing my homework. https://github.com/joyent/node/issues/4160#issuecomment-9553750 :Marco On Wednesday, October 17, 2012 9:19:34 PM UTC-7, Marco Rogers wrote: I tend to agree with the OP. If node supports strings

[nodejs] Re: Threading, and Dogmatisms.

2012-09-17 Thread Marco Rogers
Do you guys wonder why there is a collective groan when you show up? Especially considering how difficult it is for a group of geographically remote people to convey a collective groan in a written medium ;) Threads-a-go-go lives exactly where it should; in userland where anyone who wants to

Re: [nodejs] Re: Threading, and Dogmatisms.

2012-09-17 Thread Marco Rogers
, at September 17, 20123:08 PM, Jorge jo...@jorgechamorro.com wrote: On 17/09/2012, at 12:04, Marco Rogers wrote: Do you guys wonder why there is a collective groan when you show up? Especially considering how difficult it is for a group of geographically remote people to convey a collective groan

Re: [nodejs] Re: Threading, and Dogmatisms.

2012-09-17 Thread Marco Rogers
the experimentation phase, and that is decidedly where node is at. -Mikeal On Sep 17, 2012, at September 17, 20124:25 PM, Marco Rogers marco@gmail.com javascript: wrote: I admit to willingly participating in this because I was off today and had nothing better to do. :) I don't think

[nodejs] Re: Threading, and Dogmatisms.

2012-09-16 Thread Marco Rogers
Your link is being weird for some reason. Here's a better url. https://github.com/hut78/troop.js On Sunday, September 16, 2012 4:54:24 PM UTC-7, Kevin Jones wrote: Just thought I would add from experience of building a threaded version of node. The process.* problem does not really exist if

[nodejs] Re: persistent connections

2012-09-16 Thread Marco Rogers
It depends on the module and what it's doing. Can you point to it and give some more info about your use case? :Marco On Sunday, September 16, 2012 1:59:02 PM UTC-7, Mike Nichols wrote: I am using a module which uses a net.createConnection (for redis) per stream instance. This would seem

Re: [nodejs] Re: persistent connections

2012-09-16 Thread Marco Rogers
stream.redis.write(Redis.parse([ 'select', this.db ])) return stream On Sunday, September 16, 2012 7:45:46 PM UTC-5, Marco Rogers wrote: It depends on the module and what it's doing. Can you point to it and give some more info about your use case? :Marco On Sunday, September 16, 2012 1:59

Re: [nodejs] Re: persistent connections

2012-09-16 Thread Marco Rogers
answer whether creating a connection each time is too expensive, or whether I should cache connections for reuse. On Sunday, September 16, 2012 9:09:58 PM UTC-5, Marco Rogers wrote: You can definitely get into trouble if you plan to create lots of these steam objects. node_redis and other

Re: [nodejs] Re: Crockford : Ynode : I would fork node.js

2012-09-15 Thread Marco Rogers
I'd change lots of things. But it's probably a good idea that I'm not in charge. Ditto Crockford. :Marco On Saturday, September 15, 2012 7:42:45 PM UTC-7, Mark Hahn wrote: I would like to see a fork of node. What would you change? On Sat, Sep 15, 2012 at 6:35 PM, Tim Dickinson

[nodejs] Re: Nested domains or How do I leave a domain

2012-09-15 Thread Marco Rogers
Don't know if you were at Node Summercamp, but we talked a lot about domains. It's clear that there's lots of confusion about the semantics. I've got some of the same questions. I had planned on finally sitting down to explore them tomorrow. I can tell you that domains *are* nested. When you

[nodejs] Re: Feature poll: Do you use the clientError event?

2012-08-29 Thread Marco Rogers
2.5. Never used it. :Marco On Wednesday, August 29, 2012 4:07:23 PM UTC-7, Isaac Schlueter wrote: Do you use the clientError event? Please choose one: 1. Yes, I use it all the time. Please don't change it ever, thank you. 2. I don't use it, but I'm aware of it, and I think I might

[nodejs] Backwards compatibility for node 0.8

2012-08-11 Thread Marco Rogers
that enable backwards compatibility like the buffer-compat I mentioned above. And then maybe collect those into a node-0.8-compat that folks can pull into their modules as an easy way to try and support older environments. That may not be feasible. But it's an idea. Thanks :Marco -- Marco Rogers

[nodejs] Nodejs / Google Feed API

2012-07-17 Thread Marco Rogers
It looks like you want to use the google jsapi in the server in node. I think you'll have a hard time because that library assumes a browser DOM environment. You can't just use it as is. But that's not your only problem here. chunk.google.load doesn't make any sense. It sounds like you may

Re: [nodejs] Re: Should i use node?

2012-06-24 Thread Marco Rogers
To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en -- Marco Rogers marco.rog...@gmail.com | https://twitter.com/polotek Life is ten percent what happens to you and ninety

Re: [nodejs] Should i use node?

2012-06-24 Thread marco . rogers
Recommended by a majority of your community peers that you respect. And yes that is a vague and fuzzy definition. It should be because there's no prescription here. We're just talking about a rough priority list that tries to reflect the prevailing trends. Or at least that's what I've been

[nodejs] Re: Should i use node?

2012-06-23 Thread Marco Rogers
Your rant has a lot of truth to it. But many people in the node community don't see this as completely negative. Node is still young and it has a lot of catching up to do in terms of developing a large robust library space. Having a lot of activity and people reinventing wheels is part of that.

Re: [nodejs] process.env.hasOwnProperty

2012-06-23 Thread Marco Rogers
Yep. And I always steer people away from instanceof. It's too unpredictable and often unnecessary. I'm in agreement with Mikeal. As often as possible you should try to make node host objects behave like js objects. :Marco On Saturday, June 23, 2012 12:20:50 AM UTC-7, Jorge wrote:

Re: [nodejs] process.env.hasOwnProperty

2012-06-23 Thread Marco Rogers
Yeah I think there are 2 things happening here. - Should process.env and other node host objects try as hard as possible to behave like real js objects? I think the majority says yes here. - Should objects used as simple hashes have their prototype nulled out, in order to avoid some of common

[nodejs] Re: simple post request using row node and using the request package

2012-06-23 Thread Marco Rogers
On Saturday, June 23, 2012 4:51:06 PM UTC-7, josh wrote: Another question, regarding the documentation of http - how come the res argument of the callback that is called on http.reuest is not listening to the 'end' event in the example?

Re: [nodejs] Re: Should i use node?

2012-06-23 Thread Marco Rogers
://groups.google.com/group/nodejs?hl=en?hl=en -- Marco Rogers marco.rog...@gmail.com | https://twitter.com/polotek Life is ten percent what happens to you and ninety percent how you respond to it. - Lou Holtz -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki

[nodejs] Re: Algorithm help

2012-06-17 Thread Marco Rogers
And object with a blank prototype is a little nicer for using as a hash. You don't have to worry about iterating over they keys with for..in and getting the Object.prototype properties. var o = {} o.toString // function toString() { [native code] } 'toString' in o // true o =

[nodejs] Re: Version 0.7.11 (unstable)

2012-06-16 Thread Marco Rogers
Buffer.concat FTW! I just wrote this myself the other day. On Friday, June 15, 2012 12:48:36 PM UTC-7, Isaac Schlueter wrote: This is the most stable 0.7 release yet. Please try it out. Version 0.8 will be out very soon. You can see the remaining issues on the github issue tracker.

Re: [node-dev] __proto__ vs. Object.create?

2012-06-11 Thread Marco Rogers
I'm only just now reading this thread. But I want to add a couple of comments about __proto__. I've been doing a lot of messing around with inheritance patterns in js. I've come to feel that using __proto__ is useful in only a few rare cases and there are usually more standard ways to

Re: [node-dev] __proto__ vs. Object.create?

2012-06-11 Thread Marco Rogers
That option won't work in this case, because we need SlowBuffer.prototype to be the exact same object returned from C++. Interesting. Can you elaborate on this? Is it due to the weirdness with retrieving the right this object when in C++ land? :Marco

Re: [node-dev] __proto__ vs. Object.create?

2012-06-11 Thread Marco Rogers
properties manually. So for brevity's sake, __proto__ wins here. On Mon, Jun 11, 2012 at 1:17 PM, Marco Rogers marco.rog...@gmail.comwrote: That option won't work in this case, because we need SlowBuffer.prototype to be the exact same object returned from C++. Interesting. Can you elaborate

Re: [node-dev] Re: process.nextTick semantics

2012-06-01 Thread Marco Rogers
/browse_thread/thread/b564ac42ac53e424/7b85530b465f578d -- Jorge. -- Marco Rogers marco.rog...@gmail.com | https://twitter.com/polotek Life is ten percent what happens to you and ninety percent how you respond to it. - Lou Holtz

Re: [node-dev] Re: process.nextTick semantics

2012-06-01 Thread Marco Rogers
not paying money, you're not the customer, you're the product. I would add a corollary. If you're not the customer or the product, then you don't really matter. Not saying that applies here. But it's an interesting line of thought. :Marco -- Marco Rogers marco.rog...@gmail.com | https

Re: [node-dev] Re: process.nextTick semantics

2012-06-01 Thread Marco Rogers
-- Marco Rogers marco.rog...@gmail.com | https://twitter.com/polotek Life is ten percent what happens to you and ninety percent how you respond to it. - Lou Holtz

Re: [node-dev] Re: process.nextTick semantics

2012-06-01 Thread Marco Rogers
not to take the advice, but what you're doing is trying to re-characterize this request to something that it is not. There's currently no good way to assign a handler to the end of the current RTC. Agreed. We should add one and call it something besides nextTick :) :Marco -- Marco Rogers

Re: [nodejs] Re: Callback Style Preference

2012-05-30 Thread Marco Rogers
I don't know why we can't change it. Sure it may break a lot of working code. But as you've outlined, replacing it with more preferable methods is fairly straight forward. It's even easily shimmable for folks who don't want to upgrade. We're talking about breaking nextTick but can't get rid of

Re: [node-dev] Re: process.nextTick semantics

2012-05-29 Thread Marco Rogers
, results in unnecessarily convoluted logic. This isn't going to change for v0.8, but if no one has a use-case where it's known to break, we can try it early in v0.9. -- Marco Rogers marco.rog...@gmail.com | https://twitter.com/polotek Life is ten percent what happens to you

Re: [node-dev] Re: process.nextTick semantics

2012-05-29 Thread Marco Rogers
. The suggestion that we should let it remain because the current behavior (which is broken for the desired use case) fills another one it was not designed for and for which we have other specifically designed API is ludicrous. -Mikeal On May 29, 2012, at May 29, 20122:08 PM, Marco Rogers wrote

[nodejs] Re: FN.bind vs fn() { FN() }

2012-05-29 Thread Marco Rogers
I believe the current state of things is that the closure method of binding is optimized and very fast in v8. Function#bind is not. This is partly due to the fact that nobody uses it, so it may not be worth the time to optimize. But I agree with those that say do what works for you. Deal with

Re: [nodejs] Re: FN.bind vs fn() { FN() }

2012-05-29 Thread Marco Rogers
-optimizations only where they matter. On Tue, May 29, 2012 at 10:37 AM, Marco Rogers marco.rog...@gmail.com wrote: I believe the current state of things is that the closure method of binding is optimized and very fast in v8. Function#bind is not. This is partly due to the fact that nobody

[nodejs] Re: Is it legit to distribute binaries via npm?

2012-05-04 Thread Marco Rogers
I'd be fine if people distributed binaries as long as they're not huge. Npm doesn't try to build anything by default. The only real trick is having some way to tell npm which bin to use when doing install -g. It may be something Isaac is willing to help out with. I would ping him on this

[nodejs] Re: Stream to JSON

2012-04-30 Thread Marco Rogers
There are several potential issues I'm seeing here. But it looks like you have an incoming stream of json messages that are encrypted and separated by newlines. You want parse the stream, decrypt each message and then pass the message to a data handler that expect to each message one by one. Is

[nodejs] Re: Examples of C++ modules, for Node.js

2012-04-21 Thread Marco Rogers
Here are the slides from my nodeconf talk last year. Not much about building properly, but some approachable info about how a native module works in node. Hope it helps. http://marcorogers.com/nodeconf-2011/node_addons_presentation.html :Marco On Saturday, April 21, 2012 6:50:49 PM UTC-7,

Re: [nodejs] Re: How to avoid callback hell?

2012-04-16 Thread Marco Rogers
+1 :Marco If someone has developed a language tool or a library that can ease the life of the second audience, he should be able to talk about it without triggering a war. -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] Re: When fibers beat handwritten callbacks by 10 to 1

2012-04-12 Thread Marco Rogers
Thanks for the backhanded support Axel :) Since when can we not make general statements once they've proven themselves to be generally true? How would we ever have best practices if nothing ever presented itself as best in the general sense? :Marco On Thursday, April 12, 2012 7:48:13 AM

[nodejs] Re: When fibers beat handwritten callbacks by 10 to 1

2012-04-11 Thread Marco Rogers
I would've hoped you had more fortitude against the attacks on streamline then to start throwing around hastily designed benchmarks to prove your point. It sucks that the sync-looking advocates have to deal with the level of aggression they do here. I've expressed that to some people myself,

[nodejs] Re: nodejs throughput verses custom server, scaling question to someone with experience.

2012-04-10 Thread Marco Rogers
Yeah I think you need to provide some code. It should actually be pretty difficult for you to get throughput that slow from node :) I suspect that you're not doing you async callbacks correctly and blocking the event loop more than you should be. :Marco On Tuesday, April 10, 2012 10:15:34 AM

[nodejs] Re: How to avoid callback hell?

2012-04-09 Thread Marco Rogers
I'm confused about this. Isolates is being removed from node, not from v8. node-fibers should still be able to use them right? On Monday, April 9, 2012 2:51:24 PM UTC-7, Joe Ferner wrote: Many streamline like APIs use node-fibers (https://github.com/laverdet/ node-fibers

[nodejs] Re: delegating event emitter

2012-04-09 Thread Marco Rogers
There was a very long and heated debate about this last year sometime. I can't find it right now. I believe it was split between pull request comments and a thread on the mailing list. Things were pretty split on whether we wanted to greatly expand the scope of EventEmitter, by merging in some

Re: [nodejs] Re: delegating event emitter

2012-04-09 Thread Marco Rogers
Just sent you a quick pull request :) On Monday, April 9, 2012 4:32:31 PM UTC-7, Oliver Leics wrote: Now available on npm: caevents - 'Catch all events' event emitter for node.js npm install caevents Repository: https://github.com/oleics/node-caevents -- Job Board:

Re: [nodejs] parseInt bug

2012-02-21 Thread Marco Rogers
I use parseInt and always specify the radix. The Number constructor used as a cast does something totally different. Neither will always do what you want. But if you're looking for an integer from a string, and you don't even control it enough to be sure it doesn't have a 0 at the beginning,

Re: [node-dev] Re: Date headers on HTTP responses

2012-02-13 Thread Marco Rogers
On Feb 13, 2012, at February 13, 201210:49 AM, Marco Rogers wrote: Well there's a separate plan being discussed right now to upgrade the API to ServerResponse anyway. writeHead is going to be deprecated, so that's not the best place to put it. But I do agree we should minimize unnecessary

[nodejs] Re: forking npm modules

2012-02-09 Thread Marco Rogers
If you're building an app, check in your dependencies. Take npm out of the equation (mostly) :) http://eng.yammer.com/blog/2012/1/4/managing-nodejs-dependencies-and-deployments-at-yammer.html :Marco -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [node-dev] Re: Towards a composable core.

2012-02-08 Thread Marco Rogers
+1 one the long-awaited upgrades to http. I have lots of thoughts on this. But right now I just want to mention a few things that I think should be part of the criteria here. This may be controversial, but it helps to illustrate where a lot of my concerns come from. A big factor for core APIs

Re: [node-dev] Re: Towards a composable core.

2012-02-08 Thread Marco Rogers
:22 PM, Ben Noordhuis i...@bnoordhuis.nl wrote: On Thu, Feb 9, 2012 at 03:58, Marco Rogers marco.rog...@gmail.com wrote: I also think there is a bit of a contradiction between low level and hiding implementation. IMO low level apis should expose as much as of the guts as possible

Re: [nodejs] Re: Best way to make a read/write stream?

2012-02-01 Thread Marco Rogers
It looks like what you're created here is a BufferedStream. A read/write stream that sits between a readstream and a writestream and allows you to pause/resume and will by buffering data. That's great and I'm finding that people really need this. I wrote one a while back and tried to get some

Re: [nodejs] streaming many files to one writableStream

2012-02-01 Thread Marco Rogers
Assuming you're sticking with the pipe() method for connecting streams (which you probably should), there are a few methods for telling when a stream is done. The error event will disconnect the pipe and it will throw the error unless there is another error listener to catch it. The error