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

2012-04-10 Thread Axel Kittenberger
> I disagree about my benchmarks being incorrect. No, as long the two "benchmarks" behave different IO wise, they are incorrect and you compare apples with oranges. E.g. If you want to fill buffers to full limit, and do it both wise. And try to come up with aproperiate flow control in vanilla code

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

2012-04-10 Thread Axel Kittenberger
> If you are ignoring coffeescript because of this then that is a shame.  I > use absolutely nothing but coffeescript and I can't imagine living without > it. Yes it's a make or break for me. A language that doesn't even get its scoping at least somewhat right is a no-go for me .Introducing a new

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

2012-04-10 Thread Bruno Jouhier
depend is not a very good measure either. Streamline is more for people who write applications than for library writers. And people don't publish whole applications to NPM. There are also a few who use it browser side. On Wednesday, April 11, 2012 3:49:00 AM UTC+2, Mikeal Rogers wrote: > > Node

Re: [nodejs] Should a binding module support multiple Node versions

2012-04-10 Thread Nathan Rajlich
You can support as far back as is practical for you. I don't think people are caring about v0.4.x so much these days, but I did make a shim for eio_custom()/uv_queue_work(): https://gist.github.com/1368935. Also, you can check out that gist as well to see how node_version.h can be used with #if to

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

2012-04-10 Thread Mark Hahn
> when things break I even get line numbers :) I can tell you went to a lot of work writing those diplomatic even-handed posts. But then you couldn't resist taking a shot at the end. :-) -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-Li

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

2012-04-10 Thread Isaac Schlueter
On Tue, Apr 10, 2012 at 19:16, Isaac Schlueter wrote: > It is not our goal to make programs look blocking when they are in > fact parallel (that's a bad complexity trade-off). s/parallel/nonblocking/ -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/

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

2012-04-10 Thread Isaac Schlueter
On Tue, Apr 10, 2012 at 18:49, Mikeal Rogers wrote: > NodeUp is not exclusively node core committers nor has it ever included the > full list of committers so the views represented should not be viewed as > "core". I think Felix and I are the only core committers that have been on NodeUp. > W

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

2012-04-10 Thread Mikeal Rogers
On Apr 10, 2012, at April 10, 20126:36 PM, Mark Hahn wrote: > > They are definitely not coffeescript fans if you listen through a couple > > of the episodes. > > I'll take your word for it. I can see where people working at the core level > may not be excited about higher-level languages.

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

2012-04-10 Thread Mikeal Rogers
NodeUp is not exclusively node core committers nor has it ever included the full list of committers so the views represented should not be viewed as "core". While our personal views about coffeescript may be negative node is committed to support (but not include or bundle) the use compile target

[nodejs] Should a binding module support multiple Node versions

2012-04-10 Thread Liam
My first draft of the Xapian binding was for 0.4. It's about to get some more work, including a port to 0.6 and testing on 0.7. Should I plan to support 0.4, 0.6, and 0.7/8, and if so, are there node_version header defines for use with #ifdef? -- Job Board: http://jobs.nodejs.org/ Posting guideli

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

2012-04-10 Thread Mark Hahn
> They are definitely not coffeescript fans if you listen through a couple of the episodes. I'll take your word for it. I can see where people working at the core level may not be excited about higher-level languages. These same people use c++. I'm working at the app level and I have 10,000 li

Re: [nodejs] [ANN] Calango.js: Build native apps in Node + HTML5

2012-04-10 Thread Roger WANG
Artur writes: > Calango.js enables you to run "native apps" (i.e. native graphics + > audio) directly from Node using HTML5 APIs (like Canvas). The vision > is to eventually have an ecosystem of cool native GUIs/apps created > purely in JavaScript/Node. Hi Artur, We share the similar vision wi

[nodejs] Re: How to avoid callback hell?

2012-04-10 Thread Joe Ferner
Not sure if 10 was it, that's the only one I could find from searching the text of the episodes. They are definitely not coffeescript fans if you listen through a couple of the episodes. On Apr 10, 9:13 pm, Mark Hahn wrote: > >  I think it was episode 10 of nodeup (http://nodeup.com/ten) where th

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

2012-04-10 Thread Mark Hahn
> I think it was episode 10 of nodeup (http://nodeup.com/ten) where they railed on it for 10 minutes. There is also a pull request (https:// github.com/joyent/node/pull/2472) where they complain about it that is pretty funny. They didn't trash coffeescript, they were trashing the idea of using it

[nodejs] Re: "return callback(...);" vs "callback(...); return;"

2012-04-10 Thread Roly Fentanes
I do it during the err check because it's more readable. And I assume everyone else is doing it for the same reason? function somethingAsync(data, callback) { otherthigAsync(function(err, result) { if (err) return callback(err); // do something with result }); }); On Tuesday, April

Re: [nodejs] Re: Node.js vs Ruby on Rails

2012-04-10 Thread Eric Muyser
I wouldn't vest much in speed. It's more about the language, the libraries, and the community than anything. Luckily for you, both are good choices. On Tue, Apr 10, 2012 at 2:54 PM, Mark S wrote: > Yeah Rails is dog slow compared to Node. I'm seeing more than a 10x > performance improvement for

[nodejs] Re: How to avoid callback hell?

2012-04-10 Thread Joe Ferner
Ah never mind my fault. Needed "socket.connect(, 'localhost', function(_) {" (missing underscore here). On Apr 10, 8:16 pm, Joe Ferner wrote: > On Apr 10, 5:01 pm, Axel Kittenberger wrote: > > > > > > > > > > > > If I want to mix the syntax, let me, don't error out. > > > I lets you mix it,

[nodejs] Re: How to avoid callback hell?

2012-04-10 Thread Joe Ferner
On Apr 10, 8:30 pm, Mark Hahn wrote: > >  By that logic we should also be using Coffeescript with it's 4,800+ > > followers but if you listen to any of the node core team I think you > would hear quite a different story. > > Can you please elaborate on what the core team has said about coffeescr

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

2012-04-10 Thread Mark Hahn
> By that logic we should also be using Coffeescript with it's 4,800+ followers but if you listen to any of the node core team I think you would hear quite a different story. Can you please elaborate on what the core team has said about coffeescript? -- Job Board: http://jobs.nodejs.org/ Postin

[nodejs] Re: How to avoid callback hell?

2012-04-10 Thread Joe Ferner
By that logic we should also be using Coffeescript with it's 4,800+ followers but if you listen to any of the node core team I think you would hear quite a different story. On Apr 10, 6:53 pm, Marcel Laverdet wrote: > Joe your stubbornness speaks volumes. If you'd have quit everything in life > a

[nodejs] Re: How to avoid callback hell?

2012-04-10 Thread Joe Ferner
On Apr 10, 5:01 pm, Axel Kittenberger wrote: > > If I want to mix the syntax, let me, don't error out. > > I lets you mix it, you just have to do it correctly. E.g: this works > without error: > > function foo(_) { >     process.nextTick(_); >     console.log('a'); >     process.nextTick(functio

Re: [nodejs] "return callback(...);" vs "callback(...); return;"

2012-04-10 Thread Joshua Holbrook
> BTW, the return in case B is ignored and not needed. What about short circuiting? The example didn't illustrate short-circuiting but it's somewhat common and probably the OP's inspiration. function (opts, cb) { thing(opts, function (err, data) { if (err) { cb(err);

Re: [nodejs] "return callback(...);" vs "callback(...); return;"

2012-04-10 Thread Mark Hahn
BTW, the return in case B is ignored and not needed. On Tue, Apr 10, 2012 at 4:24 PM, Mark Hahn wrote: > The only difference is that the return value of foo takes on the > callback's return value instead of null. There is no other difference at > all. > > > On Tue, Apr 10, 2012 at 4:17 PM, Ken

Re: [nodejs] "return callback(...);" vs "callback(...); return;"

2012-04-10 Thread Mark Hahn
The only difference is that the return value of foo takes on the callback's return value instead of null. There is no other difference at all. On Tue, Apr 10, 2012 at 4:17 PM, Ken wrote: > Assuming that the callback doesn't return a value, does v8 behave any > differently when invoking callback

[nodejs] "return callback(...);" vs "callback(...); return;"

2012-04-10 Thread Ken
Assuming that the callback doesn't return a value, does v8 behave any differently when invoking callbacks in one of these forms vs. the other? I find the first approach to be a convenient shorthand in many cases, but am wondering (after observing some unexpected timings when profiling async me

Re: [nodejs] open source license for native modules

2012-04-10 Thread Dan Shaw
Many bindings will extend the original native code's licensing. However, if you preferred to be more explicitly liberal with your license, you could go with MIT for your code and note that the underlying code has whatever license it has. Daniel Shaw @dshaw On Tue, Apr 10, 2012 at 3:41 PM, Liam

Re: [nodejs] open source license for native modules

2012-04-10 Thread Mikeal Rogers
Many popular libraries are Apache2 licensed as well. Liberal licenses are preferable. On Apr 10, 2012, at April 10, 20123:47 PM, Eric Muyser wrote: > MIT/BSD or go home. > > On Tue, Apr 10, 2012 at 3:41 PM, Liam wrote: > What's the preferred OSS license for native modules? I'm working on a > b

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

2012-04-10 Thread Marcel Laverdet
Joe your stubbornness speaks volumes. If you'd have quit everything in life after spending 10 minutes and messing up once you wouldn't get anywhere. There's an ever-growing number of supporters of this kind of technology (435 followers on github for fibers, 222 for streamline) and to not even explo

Re: [nodejs] open source license for native modules

2012-04-10 Thread Eric Muyser
MIT/BSD or go home. On Tue, Apr 10, 2012 at 3:41 PM, Liam wrote: > What's the preferred OSS license for native modules? I'm working on a > binding for the Xapian text-indexing library, which uses MIT/X *& GPL. > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com

[nodejs] open source license for native modules

2012-04-10 Thread Liam
What's the preferred OSS license for native modules? I'm working on a binding for the Xapian text-indexing library, which uses MIT/X *& GPL. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message bec

Re: [nodejs] HTML to PDF

2012-04-10 Thread Alan Hoffmeister
@mlegenhausen wkhtmltopdf or prince? The problem wans't the HTML, I was trying to convert http://google.com for example. As I said, the problem was broken packages, I could se in the log the error messages and send to this list later on ;) -- Att, Alan Hoffmeister 2012/4/10 mlegenhausen : > Ca

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

2012-04-10 Thread timp
Oh well, thanks for your responses so far. If anyone has any real world experiences with scaling and using nodeJS, I would be interested in how you set up things computationally. Did you actually have the nodeJS perform work? Or just fetch results? If just fetch results, what did you use on y

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

2012-04-10 Thread timp
(I think) I just tried the native bson with the pages or at least I did this: pm install mongodb --mongodb:native seemed to compile things the mongoskin says it will use it if it is there tests are coming out about the same. +/- 5 fps On Tuesday, April 10, 2012 5:46:38 PM UTC-4, Jann Horn wr

[nodejs] Re: Node.js vs Ruby on Rails

2012-04-10 Thread Mark S
Yeah Rails is dog slow compared to Node. I'm seeing more than a 10x performance improvement for dynamic calls (and everything that I can I cache and let Nginx handle it.) I'm seeing something like 220 rps with Rails, 3000 + with Node, and 14000 when Nginx could server the request statically (te

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

2012-04-10 Thread Jann Horn
Am Dienstag, den 10.04.2012, 10:15 -0700 schrieb timp: > But at the same time, I am truly annoyed at how slow these web > servers/frameworks are. Me too. :D I have a small node.js proxy running here, and even when it's just piping through a youtube video (using the normal Stream pipe method) betw

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

2012-04-10 Thread christkv
Use the raw mongodb driver and the c++ bson parser I suggest trying native_parser set to true to avoid any gc overhead On Apr 10, 10:28 pm, timp wrote: > or BSON, sorry. > > I assume it must parse the db results, > and then it must JSON them into the result. > > > > > > > > On Tuesday, April 10,

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

2012-04-10 Thread timp
by "parse the db results", I mean, the db has a communications format, and this must be transformed into whatever javascript is doing. by "JSON them into the result", I mean, convert the javascript objects into a textual representation On Tuesday, April 10, 2012 5:28:48 PM UTC-4, timp wrote: > >

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

2012-04-10 Thread timp
or BSON, sorry. I assume it must parse the db results, and then it must JSON them into the result. On Tuesday, April 10, 2012 5:24:45 PM UTC-4, Marak Squires wrote: > > Where in this code is JSON being parsed? > > Also, running apache bench from your local to your local node app is not > goin

Re: [nodejs] HTML to PDF

2012-04-10 Thread mlegenhausen
Can you send me your HTML document you want to convert? I am running the prebuild binaries under ubuntu 10.04 without problems. > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you

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

2012-04-10 Thread Mark Hahn
> Unless coffee script fixes its "implicit local variable is global if the names match and just dont take care to not accidently name it equally" I will not touch it with a long stick. I and a number of other coffeescripters have been bitching about this over and over. So far we haven't budged th

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

2012-04-10 Thread Marak Squires
Where in this code is JSON being parsed? Also, running apache bench from your local to your local node app is not going to give you accurate results. It will place you in an approximate ballpark, but if your application is built correctly, your local system and bench will both cap out before node

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

2012-04-10 Thread timp
One more test: this one gets rid of the parallelism of async, no time difference. (I assume because JSON is using all the time, which won't be parallel) # ab -n 1000 -c 100 "http://localhost:3000/user/loginJ?name=a&password=a"; # Requests per second:190.89 [#/sec] (mean) exports.loginJ = (req

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

2012-04-10 Thread timp
all the time seems-to-be/is in JSON. are there any magic flags to make JSON faster? On Tuesday, April 10, 2012 5:14:06 PM UTC-4, Mark Hahn wrote: > > You say you added profiling. Did you find out where the time was being > burned? > > -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

[nodejs] Re: [ANN] Calango.js: Build native apps in Node + HTML5

2012-04-10 Thread Hammer
I'm in for that. Volunteering On Apr 9, 8:24 am, Brandon Benvie wrote: > How bout we make this real. dom.js needs a rendering engine. > > > > > > > > On Monday, April 9, 2012 7:26:46 AM UTC-4, Artur wrote: > > > On Sunday, April 8, 2012 9:48:32 PM UTC-4, ryandesign wrote: > > >> Is this just a th

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

2012-04-10 Thread Mark Hahn
You say you added profiling. Did you find out where the time was being burned? -- 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.

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

2012-04-10 Thread timp
Ok, so I spent the last hour running tests, you can see the gradual deterioration: the biggest impact seems to be json parsing. # setup ms = require('mongoskin') m = { db : ms.db('localhost:27017/standard') } # setup one K out oneK = ''; ppp = 0; for ppp in [0..1024] oneK = oneK + 'x'; ###

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

2012-04-10 Thread Axel Kittenberger
> If I want to mix the syntax, let me, don't error out. I lets you mix it, you just have to do it correctly. E.g: this works without error: function foo(_) { process.nextTick(_); console.log('a'); process.nextTick(function() { console.log('b'); }); } foo(_); Don't blame s

[nodejs] Re: How to avoid callback hell?

2012-04-10 Thread Joe Ferner
On Apr 10, 4:07 pm, Axel Kittenberger wrote: > > errors like "Function contains async calls but does not have _ > > parameter" which IMO shouldn't be an error at all. > > By all respect you just got little clue. This error is *good*, since > it does not allow functions to "yield under your ass", w

[nodejs] Re: How to avoid callback hell?

2012-04-10 Thread Bruno Jouhier
Streamline translates its special syntax to vanilla JS with callbacks. So, if you implement a function like function foo(x, y, _) { ... } Normal JS modules (not written with streamline) will be able to call it as: foo(x, y, function(err, result) { ... }); Streamline is just a tool that hel

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

2012-04-10 Thread Naouak
Am I the only one that thinks that we talk about Callback Hell only because we are not used to used callback everywhere ? Naouak, Grade 2 de Kobal. Site web: http://www.naouak.net On Tue, Apr 10, 2012 at 22:01, Joe Ferner wrote: > I think I'm done writing benchmarks. Even if I come up with a

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

2012-04-10 Thread Marak Squires
60rps for an express / mongo app seems way off. I suspect a possible flaw in application code itself. Perhaps there is bottleneck in application where logic is being fired on every incoming request which should not be. Maybe connection for mongodb is not being pooled. Perhaps there is performance

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

2012-04-10 Thread Axel Kittenberger
> errors like "Function contains async calls but does not have _ > parameter" which IMO shouldn't be an error at all. By all respect you just got little clue. This error is *good*, since it does not allow functions to "yield under your ass", which would technically be impossible in streamline anyw

[nodejs] Re: How to avoid callback hell?

2012-04-10 Thread Joe Ferner
I think I'm done writing benchmarks. Even if I come up with a benchmark that shows streamline is faster I'm still not going to use it and I couldn't recommend anyone else use it either. The community as a whole doesn't back that kind of syntax so I couldn't submit a module to npm if I wrote it usi

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

2012-04-10 Thread Alexey Petrushin
When a question rises again and again it's a good sign of problem. To make clear I'm not in any way blame the node on it, it has tons of advantages and it's ok to have problem. Every advanced machinery have some sort of problems or limitations - it's ok. But what's not ok - is to have false d

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

2012-04-10 Thread timp
I'll try to post some code in this box, don't know how the formatting will come through. I decided to do everything in coffee script, because, javascript is pretty ugly. using express framework: here is the "login." exports.login = (req, res) -> async.auto ({ token: async.apply(userService.g

[nodejs] Re: How to avoid callback hell?

2012-04-10 Thread Bruno Jouhier
Still, your bench is wrong because the two programs do different things: * The streamline program calls socket.write from the callback of the previous socket.write. So it does proper flow control and it won't overflow output buffers. * The callback program calls socket.write in a loop, without c

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

2012-04-10 Thread Axel Kittenberger
On Tue, Apr 10, 2012 at 9:03 PM, Marcel Laverdet wrote: > func()[1] not being allowed in PHP is just a silly deficiency in the > language grammar and runtime. I "fixed" it in 2009 with a rewrite rule > (right before APC in the compile chain). func()[1] -> _helper(func(), 1). I > have a habit of no

[nodejs] Re: MAC address of the client?

2012-04-10 Thread Joe Ferner
All the clients will be one hop away from the server so the MAC address will be available. I was hoping for a secret API off of socket or something that gives me low level access to the MAC address. On Apr 10, 2:37 pm, Dick Hardt wrote: > There are other commandline methods of getting access to t

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

2012-04-10 Thread Marcel Laverdet
func()[1] not being allowed in PHP is just a silly deficiency in the language grammar and runtime. I "fixed" it in 2009 with a rewrite rule (right before APC in the compile chain). func()[1] -> _helper(func(), 1). I have a habit of not accepting languages the way they're given to me I guess. Anywa

Re: [nodejs] Free Little Utility

2012-04-10 Thread Matthew Hazlett
I'll look up how to do that, I'm still new to node. On 4/10/2012 1:11 PM, Isaac Schlueter wrote: Seems like it'd be nice to have a package.json in there, and publish it to npm. On Tue, Apr 10, 2012 at 06:24, Matthew Hazlett wrote: Ohh, quite right. I will fix that, thanks! On 4/10/2012 9:0

Re: [nodejs] console.log memory leak ?

2012-04-10 Thread Filirom1
Many thanks, it's exactly what I was looking for. -- 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 e

Re: [nodejs] MAC address of the client?

2012-04-10 Thread Dick Hardt
There are other commandline methods of getting access to the arp table, and any API I know of is OS specific and usually requires root privilege of some kind. Is the client a browser? If so you are not going to be able to get the MAC address. Somewhat of a privacy / security issue if you could. On

Re: [nodejs] MAC address of the client?

2012-04-10 Thread David Worms
On 4/10/12 8:29 PM, Joe Ferner wrote: Does node have anyway to get the MAC address of the client connecting to a server? I saw an arp plugin (http://search.npmjs.org/#/arp) which would work but it requires shelling out to read the arp table which I would prefer not to do. you can have a look at

[nodejs] Re: Node.js IDE for iPad

2012-04-10 Thread Lothar Pfeiler
Probably, gluing a hinge-joint between the keyboard and the iPad? ;-) On Apr 10, 5:44 pm, Dave Clements wrote: > I had the thought of using two iPads (or an iPad and a cheap HP touchpad), > and an external keyboard, and possibly a stand that holds one of the > iPads/tablets up in the air. > > The

[nodejs] MAC address of the client?

2012-04-10 Thread Joe Ferner
Does node have anyway to get the MAC address of the client connecting to a server? I saw an arp plugin (http://search.npmjs.org/#/arp) which would work but it requires shelling out to read the arp table which I would prefer not to do. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: htt

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

2012-04-10 Thread Axel Kittenberger
On Tue, Apr 10, 2012 at 3:37 PM, Yi Tan wrote: > you really should spend a few hours learning coffee script if the js > callback syntax make you uncomfortable Unless coffee script fixes its "implicit local variable is global if the names match and just dont take care to not accidently name it equ

Re: [nodejs] Autoescaping as default?

2012-04-10 Thread Rob Ashton
It is a non-question, because node itself doesn't make any decisions over this stuff So the answer to your question is "It depends which template engine you are using" On Tue, Apr 10, 2012 at 8:03 PM, akira wrote: > Is the content rendered in templates autoecasped by default? Does it > depend o

[nodejs] Autoescaping as default?

2012-04-10 Thread akira
Is the content rendered in templates autoecasped by default? Does it depend on the template engine? Thanks -- 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 Go

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

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

2012-04-10 Thread Tim Caswell
What is the actual work you're trying to do. I suspect that either it is a serious misconfiguration or something that node is just not good at. On Tue, Apr 10, 2012 at 12:15 PM, timp wrote: > Greetings, > > I was wondering if someone who has experience with working with scaling > problems could

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

2012-04-10 Thread Mark Hahn
> Apparently Json is actually really slow or something. Not really. There is something wrong with the way you are using node. That performance is not typical. If it was, node would be useless. Can you show some code? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.

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

2012-04-10 Thread timp
Greetings, I was wondering if someone who has experience with working with scaling problems could give me some insight on an issue. Long story: A) So- I'm making an iPhone/iPad app, which basically is a spiffy view of json data provided by a server. The app makes modifications to the json, t

Re: [nodejs] Node.js vs Ruby on Rails

2012-04-10 Thread Philipp Klose
Am 10.04.2012 19:08, schrieb Matt: > I suspect this might have a lot to do with being on Windows. Lots of > things are known not to perform well there (Apache, probably Rails > too), whereas Node has had a lot of effort put in to make it very fast > on Windows. +1 Also comparing hello world node

Re: [nodejs] Node.js vs Ruby on Rails

2012-04-10 Thread Angel Java Lopez
Loosely related Past year, @luislavena shows how to improve Ruby (and Rails) performance on Windows. See https://groups.google.com/forum/#!topic/railsinstaller/WGZv7EkyMxA http://blog.mmediasys.com/2011/11/26/rubyconf-argentina-and-fenix/ https://github.com/luislavena/fenix The problem: Ruby

Re: [nodejs] [ANN] Calango.js: Build native apps in Node + HTML5

2012-04-10 Thread Chad Retz
I would say CEF3 would be the way to go (http://code.google.com/p/chromiumembedded/). I was thinking about experimenting with it. It already has V8 support natively and many of the tasks for creating windows has already been developed. In fact, Brandon, it looks like you've already started here

Re: [nodejs] Free Little Utility

2012-04-10 Thread Isaac Schlueter
Seems like it'd be nice to have a package.json in there, and publish it to npm. On Tue, Apr 10, 2012 at 06:24, Matthew Hazlett wrote: > Ohh, quite right.  I will fix that, thanks! > > > On 4/10/2012 9:01 AM, Alan Hoffmeister wrote: >> >> Nice project, >> >> In the linux installation guide, aren't

Re: [nodejs] Node.js vs Ruby on Rails

2012-04-10 Thread Matt
I suspect this might have a lot to do with being on Windows. Lots of things are known not to perform well there (Apache, probably Rails too), whereas Node has had a lot of effort put in to make it very fast on Windows. Having said that, RoR is slower than Node, just maybe not quite THAT much slowe

Re: [nodejs] HTML to PDF

2012-04-10 Thread Alan Hoffmeister
Hey guyz, Phantom.js just did it, there is a compiled bin for linux ready to go, easy to install and was able to convert a webpage full of javascript into a beautiful searchable PDF :) -- Att, Alan Hoffmeister 2012/4/10 Alan Hoffmeister : > That's right. > -- > Att, > Alan Hoffmeister > > > >

Re: [nodejs] HTML to PDF

2012-04-10 Thread Alan Hoffmeister
That's right. -- Att, Alan Hoffmeister 2012/4/10 Dave Clements : > On Tuesday, 10 April 2012 15:52:26 UTC+1, Matthew Hazlett wrote: >> >> Pricey, should be possible to build a rendering engine using webkit or >> something to output to a image.  Then insert the image in a PDF. > > > But then you

Re: [nodejs] console.log memory leak ?

2012-04-10 Thread Ben Noordhuis
On Tue, Apr 10, 2012 at 17:54, Romain wrote: > Memory increase it's ok. > > But I was thinking that the memory allocated by all the console.log would be > free after 5 minutes of idle time. > > I don't understand why I need to segment the loop, if I wait a very long > time after the loop. Oh, tha

Re: [nodejs] Node.js vs Ruby on Rails

2012-04-10 Thread shawn wilson
If you just care for speed, use erlang. I'm sure the people who wrote all of the message queue services couldn't have all been wrong. (I wouldn't write a web site in erlang though) also look at nginx and varnish + memcache On Apr 10, 2012 11:24 AM, "Derek Chalmers" wrote: > What's up, > > I've

[nodejs] [ANN] node-perfectapi version 1.0

2012-04-10 Thread Steven Campbell
I have releases version 1.0 of node-perfectapi. This is a framework for creating http service APIs easily and quickly. http://blog.perfectapi.com/2012/announcing-node-perfectapi-version-1.0.0/ https://github.com/perfectapi/node-perfectapi http://perfectapi.github.com/node-perfectapi/ Some

Re: [nodejs] Node.js vs Ruby on Rails

2012-04-10 Thread Tim Caswell
Besides V8 being considerably faster than Ruby (which is actually less important than you think), the real issue is the fact that rails is based on blocking I/O. This means that you need a process or thread per concurrent customer. Node can multiplex thousands of connections in a single thread.

Re: [nodejs] console.log memory leak ?

2012-04-10 Thread Romain
Memory increase it's ok. But I was thinking that the memory allocated by all the console.log would be free after 5 minutes of idle time. I don't understand why I need to segment the loop, if I wait a very long time after the loop. 2012/4/10 Ben Noordhuis > On Tue, Apr 10, 2012 at 16:43, Romain

Re: [nodejs] HTML to PDF

2012-04-10 Thread Dave Clements
On Tuesday, 10 April 2012 15:52:26 UTC+1, Matthew Hazlett wrote: > > Pricey, should be possible to build a rendering engine using webkit or > something to output to a image. Then insert the image in a PDF. But then you lose the ability to search PDF text -- Job Board: http://jobs.nodejs.org/

Re: [nodejs] Node JS can't run while SELinux is active

2012-04-10 Thread Vyacheslav Egorov
I think you need to explicitly allow V8 to map executable memory: chcon -t execmem_exec_t node or something along these lines. -- Vyacheslav Egorov On Mon, Apr 9, 2012 at 12:22 PM, Amir Mahmoudi wrote: > I'm using Debian Server 6 on my server, after installing SE Linux, and > execute "setenf

[nodejs] Re: Node.js IDE for iPad

2012-04-10 Thread Dave Clements
I had the thought of using two iPads (or an iPad and a cheap HP touchpad), and an external keyboard, and possibly a stand that holds one of the iPads/tablets up in the air. Then I realized that I was basically reinventing the notebook. -- Job Board: http://jobs.nodejs.org/ Posting guideli

[nodejs] Re: How to measure quality of modules

2012-04-10 Thread Jeff Barczewski
+1 On Tuesday, 10 April 2012 08:45:38 UTC-5, Eldar wrote: > > For me github is awesome. Generaly 5-10 minutes of digging through the > code is enough do decide whether you like it or not and if you like it you > don't care so much about popularity, battle testing and other boring stuff. > You j

Re: [nodejs] Node.js vs Ruby on Rails

2012-04-10 Thread Alan Hoffmeister
Ruby depends a lot on caching, the language by itself it's slower than PHP... Em terça-feira, 10 de abril de 2012, Derek Chalmers escreveu: > What's up, > > I've been writing a game using HTML5/JS + Node.js, and so far that's been > going great, but I've heard a lot about Ruby on Rails and one of

[nodejs] Re: How to avoid callback hell?

2012-04-10 Thread Joe Ferner
On Apr 10, 11:12 am, Bruno Jouhier wrote: > Your bench does not make sense. There is no async call at all. So there is no > reason to have an _ in the streamline source. > > Streamline does not transform sync fonctions. So the Streamline version of > this bench should take 3 ms. > > Callback !=

[nodejs] Node.js vs Ruby on Rails

2012-04-10 Thread Derek Chalmers
What's up, I've been writing a game using HTML5/JS + Node.js, and so far that's been going great, but I've heard a lot about Ruby on Rails and one of my friends insisted on checking it out, so I did. I did a quick speed test to see how fast Ruby on Rails is compared to Node.js, and my numbers sho

[nodejs] Re: Node.js IDE for iPad

2012-04-10 Thread Lothar Pfeiler
The screenshots look promising. Not too many buttons and a custom keyboard. On Apr 10, 4:59 pm, Arnout Kazemier wrote: > I got Texttastic running on my iPad > (http://itunes.apple.com/us/app/id383577124?mt=8) and it's working rather > nicely. I have it with me as a backup editing for when somet

[nodejs] Re: How to avoid callback hell?

2012-04-10 Thread Bruno Jouhier
Your bench does not make sense. There is no async call at all. So there is no reason to have an _ in the streamline source. Streamline does not transform sync fonctions. So the Streamline version of this bench should take 3 ms. Callback != asynchronous Try again with an async call -- Job Bo

Re: [nodejs] Re: Node.js IDE for iPad

2012-04-10 Thread Arnout Kazemier
I got Texttastic running on my iPad (http://itunes.apple.com/us/app/id383577124?mt=8) and it's working rather nicely. I have it with me as a backup editing for when something horribly fails and I need to look at some code. But I also use it occasionally for when I have some brainfarts and need

[nodejs] Re: JSONT

2012-04-10 Thread webacad
I used JSONT extensively at Cisco to implement dynamic content rendering in several areas of cisco.com. Both for JSON embedded in the page load as well as JSON responses to Ajax requests. Nothing whatsoever to do with XSLT. That analogy was used in 1996 just to explain what JSONT was, becaus

Re: [nodejs] console.log memory leak ?

2012-04-10 Thread Ben Noordhuis
On Tue, Apr 10, 2012 at 16:43, Romain wrote: > Hi, > > I am struggling to understand why NodeJs do not decrease the resident memory > after a lot of console.log. > > If someone could explain me this behaviour I would be very happy. > >     for (var i = 0; i< 100 * 1000; i++){ >       console.log(i

Re: [nodejs] Re: HTML to PDF

2012-04-10 Thread Nuno Job
Hi Alan, As far as I see it @marak's pdf js is capable of generating pdf programmatically. node-trumpet is capable of intelligently selecting pieces of an html document. It seems like together they could help you build what you need? Nuno On Tue, Apr 10, 2012 at 3:47 PM, Alan Hoffmeister wrote

[nodejs] Re: How to avoid callback hell?

2012-04-10 Thread Joe Ferner
On Apr 10, 10:12 am, Bruno Jouhier wrote: > @joeferner > > You are just such a concentrate of preconceived ideas. > > Take a realistic bench case, implement it with streamline and fibers and then > come back to us with figures. From my experience there are code patterns > where fibers beats call

Re: [nodejs] HTML to PDF

2012-04-10 Thread Matthew Hazlett
Pricey, should be possible to build a rendering engine using webkit or something to output to a image. Then insert the image in a PDF. On 4/10/2012 10:24 AM, Kenneth Shaw wrote: PrinceXML (http://www.princexml.com/) is a really nice tool that I've used in the past to generate things such a

[nodejs] Re: HTML to PDF

2012-04-10 Thread Alan Hoffmeister
Yesterday I tried to use it with Ubuntu 11.10, but it seems to have broken packages, so I couldn't use it. Em terça-feira, 10 de abril de 2012, Kenneth Shaw escreveu: > PrinceXML > (http://www.princexml.com/) is a really nice tool that I've used in > the past to generate things such as account /

  1   2   >