Re: [nodejs] Node.js on embedded platform

2012-09-17 Thread Evan
I once got node v4 compiled and running on an ARMv4 chipset [ docs here: https://gist.github.com/1574158 ] and I learned that: - I couldn't compile node on the device itself (not enough ram, and it would have taken days with the onboard CPU). Cross compiling was necessary - Node itself took ab

[nodejs] Re: How to call middleware next() in async function?

2012-09-17 Thread tjholowaychuk
we were actually just talking about this today, for logic tasks that are outside of the req/res cycle since you've already responded etc we might treat subsequent next(err) calls as app.emit('error', err) for delegation. These would still not be handled by the same error handling middleware, becaus

Re: [nodejs] Node.js on embedded platform

2012-09-17 Thread Tim Caswell
Yes, you can most likely get node on there but there won't be much left at all. I created a lua version of node for exactly cases like this at luvit.io. It's an order of magnitude more efficient on both ram and disk space with comparable performance and semantics, but at the cost of a much less m

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

2012-09-17 Thread Bert Belder
Ha! Thanks guys for making my day, nothing beats a good fight on an otherwise very boring evening. Also, it always gives me this warm and fuzzy feeling of self-righteousness every time I decide not to participate. I'm loving it! I hate TAGG because it's built around the lie

[nodejs] Node version 0.9.2 (Unstable)

2012-09-17 Thread Isaac Schlueter
2012.09.17, Version 0.9.2 (Unstable) * http_parser: upgrade to ad3b631 * openssl: upgrade 1.0.1c * darwin: use FSEvents to watch directory changes (Fedor Indutny) * unix: support missing API on NetBSD (Shigeki Ohtsu) * unix: fix EMFILE busy loop (Ben Noordhuis) * windows: un-break writable tt

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

2012-09-17 Thread Marco Rogers
I would very much like to get away from the idea that anyone should make passionate speeches about how the world will end if we keep having debates on the mailing list. It's just not true Mikeal. You and Isaac both are over-reacting to this issue. It's when I stopped over-reacting a while ago that

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

2012-09-17 Thread Michael Schoonmaker
As someone who started using Node after said experimentation was over, I want to publically thank those who argued this sort of thing *in the past*, and am excited about what we (myself included) can build in and with Node. Those decisions were not easy, but they've been decided, and by incredibly

[nodejs] Re: How the browser should communicate with our API

2012-09-17 Thread Richard Rodger
"it depends" :) Apigee had a good article on this recently: http://blog.apigee.com/detail/api_authentication_and_how_it_got_that_way_from_http_basic_to_oauth_2.0/ Richard On Monday, September 17, 2012 11:27:01 PM UTC+1, Dan Milon wrote: > > Hello Community, > > Sorry for going off topic, but I'

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

2012-09-17 Thread Mikeal Rogers
This is where we disagree. I think that this is the worst thing we could be doing and that it's actually damaging to the project. In order for Node to be successful it needs to evolve past each challenge it faces. In the early days, everything was up for debate, and Node attracted a lot of peo

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

2012-09-17 Thread Alexey Petrushin
I guess node.js project reached popularity level when splitting effort into multiple competing implementations would be a good thing, so fork would be good. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You receive

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

2012-09-17 Thread Marco Rogers
I admit to willingly participating in this because I was off today and had nothing better to do. :) I don't think Jorge or anyone else has been much out of line in this thread. And it's really only ever a handful of people that perpetuate these debates until they devolve. Myself included. I think

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

2012-09-17 Thread JeanHuguesRobert
Hi Isaac Le mardi 18 septembre 2012 00:09:32 UTC+2, Isaac Schlueter a écrit : > > These debates give me hives. Seriously, they make my skin crawl. > ... > You know who almost never gets involved in these shenanigans? TJ > Holowaychuk, James Halliday, Matt Ranney, and the folks at Joyent and >

[nodejs] How the browser should communicate with our API

2012-09-17 Thread Dan Milon
Hello Community, Sorry for going off topic, but I'm sure there are people here who could help me. Although most of the stuff described below are build in node, my question is more of an architectural one. I'm developing a public HTTP backend API for a service. On top of that, there is a web app t

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

2012-09-17 Thread Mikeal Rogers
Jorge, This is me asking you nicely to stop. You've succeeded in making some of the most level headed and accommodating people in the community scream. Great work, job well done. Time to stop now. If you do not stop I'lll consider your behavior outright trolling and ask that you be removed fro

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

2012-09-17 Thread Isaac Schlueter
Everybody, These debates give me hives. Seriously, they make my skin crawl. If you think that providing an API for threads is a great idea, then just go do it, as a userland module. Jorge did. What's the big deal? Some people like it, some people don't. That's how anarchy works. Think his th

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

2012-09-17 Thread Jorge
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 in a written medium ;) I only hear the usual waa waa of th

Re: [nodejs] Threading, and Dogmatisms.

2012-09-17 Thread Jorge
On 17/09/2012, at 22:09, Ben Noordhuis wrote: > On Mon, Sep 17, 2012 at 11:39 AM, Jorge wrote: >> On the other hand it didn't take too long for the V8 guys to fix exactly >> that in the isolates branch... > > That's actually a good example of the cost of threading support: all > benchmarks dropp

Re: [nodejs] How to call middleware next() in async function?

2012-09-17 Thread Aga
Thanks for your quick answers. I think I have to split my question in two parts: 1.) If an error occured, the controller can send the response to the client. But, as Martin wrote, the middleware is able to catch an err via function(err, req, res, next). We wouldn't need this feature, if the co

Re: [nodejs] Threading, and Dogmatisms.

2012-09-17 Thread Ben Noordhuis
On Mon, Sep 17, 2012 at 11:39 AM, Jorge wrote: > On the other hand it didn't take too long for the V8 guys to fix exactly that > in the isolates branch... That's actually a good example of the cost of threading support: all benchmarks dropped by 2 to 8% on the day isolates support got merged int

Re: [nodejs] How to call middleware next() in async function?

2012-09-17 Thread José F . Romaniello
The problem I see is that you car calling next() before you finish reading the file. But, I dont understand why you want to let know to the next middleware that this one has fail? I havent seen that a lot.. For instance lot of authentication code do something along these lines: function addUserT

Re: [nodejs] How to call middleware next() in async function?

2012-09-17 Thread Martín Ciparelli
First of all try to organize your code a little better, that will help you. Try not to have more than 3 levels of indentation whenever possible. I assume you are using expressjs? If so, then you just need to call next() to call the next middleware. If you do with new Error() as the only arg, then I

[nodejs] How to call middleware next() in async function?

2012-09-17 Thread Aga
Hi, I'm a Node.js newbie and have a middleware related question. Here is the code: // router starts controller() ... exports.controller = function controller(req, res, next) { model.getFileData("/tmp/foo.txt", function foo(err, data) { if(err) { console.log("error while reading file

Re: [nodejs] Microsoft Office Docs

2012-09-17 Thread Abraham itule
yeh with .docx files, i'll need to unzip them first. On Mon, Sep 17, 2012 at 7:14 PM, José F. Romaniello wrote: > Oh, I almost forgot, but few weeks ago I was looking for a tool that can > convert from markdown to pdf, and I found pandoc: > > http://johnmacfarlane.net/pandoc/ > > which, I think i

Re: [nodejs] Re: Is nodejs ready for Production?

2012-09-17 Thread Dav Glass
Don't forget Yahoo's mojito stack, we have several production deployments running Node :) -- Dav Glass davgl...@gmail.com blog.davglass.com + Windows: n. - The most successful computer virus, ever. + + A computer without a Microsoft operating system is like a dog without bricks tied to its h

Re: [nodejs] Re: Is nodejs ready for Production?

2012-09-17 Thread Mikeal Rogers
Voxer's entire backend. Linkedin's mobile site. Microsoft Bing's mobile site. I think node is ready, are you ready? On Sep 17, 2012, at September 17, 201211:12 AM, Hitesh Joshi wrote: > Kevin, > > What else does klout.com use other than node for http ? Do you using some > filter like nginx a

Re: [nodejs] Microsoft Office Docs

2012-09-17 Thread José F . Romaniello
Oh, I almost forgot, but few weeks ago I was looking for a tool that can convert from markdown to pdf, and I found pandoc: http://johnmacfarlane.net/pandoc/ which, I think it can convert from any format to any other.. including docx. You might want to have a look into that 2012/9/17 José F. Roma

[nodejs] Re: Is nodejs ready for Production?

2012-09-17 Thread Hitesh Joshi
Kevin, What else does klout.com use other than node for http ? Do you using some filter like nginx and proxy to node? Just want to know best method to make a node app full of security and no holes. Nice to know you are lead frontend developer. Hitesh On Friday, August 24, 2012 10:50:34 AM UT

Re: [nodejs] Microsoft Office Docs

2012-09-17 Thread José F . Romaniello
not sure if this will help you, but docx files are in fact..zips, with a bunch of xml inside. Have you tried opening with 7z or something alike? 2012/9/17 Abramovick > Here is What am trying to do. I made a simple docs sharing application. > So a user can write a new document and share that doc

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

2012-09-17 Thread Marco Rogers
> > > Childish and amateurish were not my words in the first place, they were > Crockford's. And, although there may have been a bit of provocation in my > post, I think that the problem is real (otherwise, why would Crockford use > these words?). > No, childish is your word, and so is unprofe

Re: [nodejs] Threading, and Dogmatisms.

2012-09-17 Thread Mikeal Rogers
If you want to add something to core it'll need to be a GitHub issue. For all the same reasons non-blocking APIs fail on platforms that traditionally use threading a threading API in Node will fail just the same. It's a matter of community, the two approaches are not compatible and this means th

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

2012-09-17 Thread Bruno Jouhier
@Marco, Childish and amateurish were not my words in the first place, they were Crockford's. And, although there may have been a bit of provocation in my post, I think that the problem is real (otherwise, why would Crockford use these words?). The problem that I see is that a number of smart p

[nodejs] Microsoft Office Docs

2012-09-17 Thread Abramovick
Here is What am trying to do. I made a simple docs sharing application. So a user can write a new document and share that document by giving its unique URL to someone. E.g. lets say my website is, www.quickdocs.com, if you make a new document, the app will provide u a new unique URL e.g. www.qu

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

2012-09-17 Thread marco . rogers
Jorge doesn't have to swallow anything. In fact he has not. He has engaged with the subject at hand and has not responded to the troll bait about his lib. Notice he continues to receive feedback, about the subject. As does rektide even though he was the person who derailed the conversation in th

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-17 Thread wavded
In case anyone is interested, my memory issue came down to: https://github.com/LearnBoost/socket.io/issues/438 (i ended up setting a websocket only instance (no fallbacks except htmlfile) and xhr only instance, xhr RSS still grows but slower, and websocket will go down when clients disconnect.

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-17 Thread Jorge
On 17/09/2012, at 16:14, Ryan Schmidt wrote: > On Sep 17, 2012, at 09:03, Ben Noordhuis wrote: >> On Mon, Sep 17, 2012 at 3:40 PM, Ryan Schmidt wrote: >>> So do I understand correctly: a node program could use up all the >>> computer's memory? >>> >>> If I then need to launch additional programs,

Re: [nodejs] NPM without https-proxy

2012-09-17 Thread Martin Cooper
On Mon, Sep 17, 2012 at 12:29 AM, Malcolm Ryan wrote: > My local network has an http-proxy but no https-proxy. The npm tool seems to > assume you either have neither or both. I can't find any way to set 'proxy' > without setting 'https-proxy' to the same value. If I try setting > https-proxy to ""

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-17 Thread Ryan Schmidt
On Sep 17, 2012, at 09:03, Ben Noordhuis wrote: > On Mon, Sep 17, 2012 at 3:40 PM, Ryan Schmidt wrote: >> So do I understand correctly: a node program could use up all the computer's >> memory? >> >> If I then need to launch additional programs, will node notice this and >> reduce its memory usa

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-17 Thread Ben Noordhuis
On Mon, Sep 17, 2012 at 3:40 PM, Ryan Schmidt wrote: > So do I understand correctly: a node program could use up all the computer's > memory? > > If I then need to launch additional programs, will node notice this and > reduce its memory usage so that the new program doesn't incur virtual memory

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-17 Thread Ryan Schmidt
On Sep 17, 2012, at 03:09, Nico Kaiser wrote: > Ben Noordhuis wrote: >> On Sun, Sep 16, 2012 at 9:55 PM, Brian Gruber wrote: >>> It also appear that RSS grows to fill up available memory but doesn't seem >>> to >>> hit an OOM. It just stays at a very high memory usage. >>> ... >> >> That's intent

Re: [nodejs] best way to store non-persistent data at execution time?

2012-09-17 Thread Rakshit Menpara
We are using redis as a session store as well as for our task processing queue, which works pretty well. -- Rakshit Menpara On Monday 17 September 2012 at 5:54 PM, david rene comba lareu wrote: > Hi everyone :) > > i was wondering if someone more experienced than me in node, could tell me >

[nodejs] best way to store non-persistent data at execution time?

2012-09-17 Thread david rene comba lareu
Hi everyone :) i was wondering if someone more experienced than me in node, could tell me how you handle big amount of non persistent data on runtime? i'm talking about objects with user data or stuff pulled from a database that are used in the script (like a list of rooms, or services), what i

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

2012-09-17 Thread Fedor Indutny
> > > So it is perfectly fine if someone writes: > > "Threads-a-go-go is a pretty daft silly thing. > It's certainly not the safe sane shared-nothing threading that keeps Node > & JS safe. That > responsible multi-threading work was attempted in the 'isolates' branch of > Node.js" > > Jorge should

[nodejs] Re: Threading, and Dogmatisms.

2012-09-17 Thread Bruno Jouhier
So it is perfectly fine if someone writes: "Threads-a-go-go is a pretty daft silly thing. It's certainly not the safe sane shared-nothing threading that keeps Node & JS safe. That responsible multi-threading work was attempted in the 'isolates' branch of Node.js" Jorge should just swallow th

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

Re: [nodejs] Threading, and Dogmatisms.

2012-09-17 Thread Jorge
On 17/09/2012, at 11:12, Ben Noordhuis wrote: > On Mon, Sep 17, 2012 at 10:49 AM, Jorge wrote: >> On 17/09/2012, at 06:35, Ben Noordhuis wrote: >> >>> (...) >>> That small gain is offset by the need to serialize access to your data >>> structures - which is often a lot more expensive than the sma

Re: [nodejs] Nodejitsu server down??

2012-09-17 Thread Ben Noordhuis
On Mon, Sep 17, 2012 at 10:55 AM, Hakan Guzelgoz wrote: > Hi, > > Our small website is running on NodeJitsu server - http://www.hezenhotel.com > but suddenly today we got the following error: > > An error has occurred: > {"code":"EMFILE","errno":"EMFILE","syscall":"connect"} > > Our website is ver

Re: [nodejs] Threading, and Dogmatisms.

2012-09-17 Thread Ben Noordhuis
On Mon, Sep 17, 2012 at 10:49 AM, Jorge wrote: > On 17/09/2012, at 06:35, Ben Noordhuis wrote: > >> (...) >> That small gain is offset by the need to serialize access to your data >> structures - which is often a lot more expensive than the small gain >> you get by using threads. >> >> As for tran

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

2012-09-17 Thread Anephenix
It would be nice if Crockford could elaborate on where he thinks Joyent are making mistakes with Node.js. I'm sure Joyent would be receptive to feedback from him. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You r

[nodejs] Nodejitsu server down??

2012-09-17 Thread Hakan Guzelgoz
Hi, Our small website is running on NodeJitsu server - http://www.hezenhotel.com but suddenly today we got the following error: An error has occurred: {"code":"EMFILE","errno":"EMFILE","syscall":"connect"} Our website is very basic and has been working for the last few months. Is there anybody

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

2012-09-17 Thread Jorge
On 15/09/2012, at 20:47, Mark Hahn wrote: > > ... what's a non-blocking event loop > > An imaginary mash-up of different concepts. It was a brain-fart. > > Actually, it could make sense if you think of it as an event loop that calls > non-blocking code on each tick. But not all code is non-bl

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

2012-09-17 Thread Jorge
On 16/09/2012, at 05:39, tjholowaychuk wrote: > crockford writes code? I haven't seen much ;) > > I don't he has any place in a community he doesn't contribute to Now that's an irony. -- Jorge. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mail

Re: [nodejs] Threading, and Dogmatisms.

2012-09-17 Thread Jorge
On 17/09/2012, at 06:35, Ben Noordhuis wrote: > (...) > That small gain is offset by the need to serialize access to your data > structures - which is often a lot more expensive than the small gain > you get by using threads. > > As for transferring objects, you don't need threads for that, just

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-17 Thread Nico Kaiser
Am 17.09.2012 um 06:42 schrieb Ben Noordhuis : > On Sun, Sep 16, 2012 at 9:55 PM, Brian Gruber wrote: >> It also appear that RSS grows to fill up available memory but doesn't seem to >> hit an OOM. It just stays at a very high memory usage. >> ... > > That's intentional. The V8 garbage collecto

Re: [nodejs] Node.js on embedded platform

2012-09-17 Thread Ben Noordhuis
On Mon, Sep 17, 2012 at 7:56 AM, Shiplu wrote: > I am creating a chat application which will run on embedded device. It > has only 8MB flash memory and 16Mb RAM. Processor is ARM6. > Is it possible to run nodejs application there? The application will > be Ajax based heavy RIA application. It'll b

[nodejs] NPM without https-proxy

2012-09-17 Thread Malcolm Ryan
My local network has an http-proxy but no https-proxy. The npm tool seems to assume you either have neither or both. I can't find any way to set 'proxy' without setting 'https-proxy' to the same value. If I try setting https-proxy to "" it complains that it must be a full url. is there a way ar

[nodejs] Node.js on embedded platform

2012-09-17 Thread Shiplu
I am creating a chat application which will run on embedded device. It has only 8MB flash memory and 16Mb RAM. Processor is ARM6. Is it possible to run nodejs application there? The application will be Ajax based heavy RIA application. It'll be heavy on client side. But not on server side. I google

[nodejs] Re: Threading, and Dogmatisms.

2012-09-17 Thread Bruno Jouhier
> I've got some idea what Nuno is groaning about. :) Threads-a-go-go is a > pretty daft silly thing. > It's certainly not the safe sane shared-nothing threading that keeps Node > & JS safe. That > responsible multi-threading work was attempted in the 'isolates' branch of > Node.js. I would