Re: [nodejs] Re: fibers 0.5; say "no" callbacks (when it makes sense in your application)

2012-11-09 Thread Nuno Job
I would be surprised if it did get caught :) its in a settimout and its throwing!! Check domains on the docs. Nuno Sent from my iPhone On Nov 10, 2012, at 5:01 AM, Alexey Petrushin wrote: > Error handling with callbacks is especially interesting, try this code - the > 'Surprise' error won

[nodejs] Re: fibers 0.5; say "no" callbacks (when it makes sense in your application)

2012-11-09 Thread Alexey Petrushin
Error handling with callbacks is especially interesting, try this code - the 'Surprise' error won't be caught. // Catching synchronous errors. try { myFunction(function(err){ // Catching asynchronous errors. if(err) return console.log('error catched') consol

[nodejs] Re: fibers 0.5; say "no" callbacks (when it makes sense in your application)

2012-11-09 Thread JeanHuguesRobert
Le samedi 10 novembre 2012 01:12:18 UTC+1, Alexey Petrushin a écrit : > Why there are so many negative responses about fibers? > Using fibers (or threads) is not always as easy at it first seems. When things get complex, issues like race conditions and deadlocks sometimes become really hard to

Re: [nodejs] Re: [ANN] node-candle module for callbacks that are freed either by resolving or timing out

2012-11-09 Thread Alexey Kupershtokh
you should read it: > In the case of CANDLE, the only thing remain after a callback is timed out OR DELETE()D On Sat, Nov 10, 2012 at 10:35 AM, Alexey Kupershtokh < alexey.kupersht...@gmail.com> wrote: > Wow. Jason Brumwell is amazing :) > > > For "configurable error handler call", are you refer

Re: [nodejs] Re: [ANN] node-candle module for callbacks that are freed either by resolving or timing out

2012-11-09 Thread Alexey Kupershtokh
Wow. Jason Brumwell is amazing :) > For "configurable error handler call", are you referring to timeouts only? If so the description of `cb` is accurate, otherwise not exactly. Yes, probably I should change the definition. What I meant is "does it allow to call the same callback on timeout with

Re: [nodejs] Re: fibers 0.5; say "no" callbacks (when it makes sense in your application)

2012-11-09 Thread Mark Hahn
> but I didn't seen any solid facts, How can there be solid facts for something so opinionated? Many prefer the async coding style or the promise style or blah blah blah ... Most people who follow this forum know all the sync options available. No one is saying there is anything wrong with fibe

Re: [nodejs] Re: fibers 0.5; say "no" callbacks (when it makes sense in your application)

2012-11-09 Thread Alexey Petrushin
I probably missed it, but I didn't seen any solid facts, only personal opinions about this topics. -- 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 Gro

Re: [nodejs] Re: fibers 0.5; say "no" callbacks (when it makes sense in your application)

2012-11-09 Thread Charlie McConnell
OH MY GOD IT HAS RISEN FROM THE DEAD KILL IT KILL IT On Fri, Nov 9, 2012 at 7:25 PM, Mark Hahn wrote: > This subject has been beaten to death on this forum and I fear you might > be starting yet another 100-message thread. > > > On Fri, Nov 9, 2012 at 4:12 PM, Alexey Petrushin < > alexey.petrus.

Re: [nodejs] Re: fibers 0.5; say "no" callbacks (when it makes sense in your application)

2012-11-09 Thread Mark Hahn
This subject has been beaten to death on this forum and I fear you might be starting yet another 100-message thread. On Fri, Nov 9, 2012 at 4:12 PM, Alexey Petrushin wrote: > Why there are so many negative responses about fibers? > > I use fibers and it seems very helpfull because: > > - it remo

[nodejs] Re: [ANN] node-candle module for callbacks that are freed either by resolving or timing out

2012-11-09 Thread jmar777
Nice work on the comparisons. A couple questions: - For "configurable error handler call", are you referring to timeouts only? If so the description of `cb` is accurate, otherwise not exactly. - Not sure what is being compared here: "can forcibly freecallbackbefore ..." Also, it a

[nodejs] Re: fibers 0.5; say "no" callbacks (when it makes sense in your application)

2012-11-09 Thread Alexey Petrushin
Why there are so many negative responses about fibers? I use fibers and it seems very helpfull because: - it removes callbacks and makes code simple and linear. - allow to use global try/catch block that will catch all errors (both sync and async). - performance impact seems to be small. - compa

Re: [nodejs] Proxy-ing a server, but images not proxied very well

2012-11-09 Thread Cryptic Swarm
If you are actually looking to buffer the full request you can do something like following: function callServer(req, res) { var body = '' ; var options = { host: 'localhost', port: 3000, path: req.url } ; var callback = function(response) { var chunks = []

[nodejs] WebMatrix Database

2012-11-09 Thread David Holman
I'm having trouble finding instructions on how to connect my node.js to WebMatrix's own SQL database... Anyone that could help 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

[nodejs] Proxy-ing a server, but images not proxied very well

2012-11-09 Thread Jeanluca
Hi I'm trying to cache the responses of a server. But before I can do this I need the following to work var http = require('http'), http.createServer(function (req, res) { callServer(req, res); }).listen(8000); function callServer(req, res) { var body = '' ; var options = { h

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-09 Thread Bruno Jouhier
Hi Frederik, I wrote a helper very similar to yours (with a little plus: a concise syntax for property getters and setters) early in our project. I just did a grep and we now have more than 250 classes in more than 200 modules defined with this helper. The helper keeps our code lean, consisten

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

2012-11-09 Thread Bradley Meck
Correct but people use factory functions based on string lookups in most of these modules for some forsaken reason (udp/tcp do not have same api basically). On Friday, November 9, 2012 1:32:39 PM UTC-6, Matt Sergeant wrote: > > Yeah that was the one. I thought mDNS was just DNS packets sent over

[nodejs] Re: Bug in node_crypto.cc

2012-11-09 Thread Sergey Kholodilov
https://github.com/joyent/node/pull/4262 On Friday, November 9, 2012 2:11:56 PM UTC+4, Sergey Kholodilov wrote: > > Hi, I found a bug and fixed it in my local copy of nodejs 0.8.8. > Last source from > https://github.com/joyent/node/blob/master/src/node_crypto.cc still > bugged. > > What shal

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-09 Thread greelgorke
ok, i see it's a fruitless, because very opinionated, discussion. :) use your helper, if you wish, i would use mine, if i need some. Thats ok. i'm fine with it. most importante thing is that we all happy with our tools. thats it. Am Freitag, 9. November 2012 14:44:35 UTC+1 schrieb Fredrik O: >

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

2012-11-09 Thread Matt
Yeah that was the one. I thought mDNS was just DNS packets sent over UDP multicast? With a library that can parse DNS packets we should be able to see mDNS packets in userspace, no? On Fri, Nov 9, 2012 at 11:58 AM, Ben Noordhuis wrote: > On Fri, Nov 9, 2012 at 4:50 PM, Matt wrote: > > On Wed,

Re: [nodejs] Bug in node_crypto.cc

2012-11-09 Thread Ben Noordhuis
On Fri, Nov 9, 2012 at 11:11 AM, Sergey Kholodilov wrote: > Hi, I found a bug and fixed it in my local copy of nodejs 0.8.8. > Last source from > https://github.com/joyent/node/blob/master/src/node_crypto.cc still bugged. > > What shall I do? Can you submit it as a pull request against the v0.8 o

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

2012-11-09 Thread Ben Noordhuis
On Fri, Nov 9, 2012 at 4:50 PM, Matt wrote: > On Wed, Nov 7, 2012 at 6:45 PM, Ben Noordhuis wrote: >> >> While HTTP traffic is event-driven, the initial DNS lookup is done >> from inside the thread pool. That's because we use getaddrinfo(3) >> instead of c-ares, mostly because the latter doesn't

[nodejs] Bug in node_crypto.cc

2012-11-09 Thread Sergey Kholodilov
Hi, I found a bug and fixed it in my local copy of nodejs 0.8.8. Last source from https://github.com/joyent/node/blob/master/src/node_crypto.cc still bugged. What shall I do? I can fix last version, but may be we shall somehow fix previous versions? Bug is very simple, so I can just describe i

Re: [nodejs] Test for performance issues caused by GC

2012-11-09 Thread Vyacheslav Egorov
You should not see any big GCs if you disable idle notifications that are overstressed by node. Vyacheslav Egorov On Nov 8, 2012 6:14 PM, "darcy" wrote: > I'm not focus on the initialization time, but GC impact in large memory > usage cases. > In the test case, I used 850MB memory, which is norm

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

2012-11-09 Thread Nuno Job
btw i would love to have the dns server (named) and indutny's spdy implementation in core *hint* :P On Fri, Nov 9, 2012 at 3:55 PM, Nuno Job wrote: > github.com/iriscouch/named ? > > Its used to run npm > > nuno > > On Fri, Nov 9, 2012 at 3:50 PM, Matt wrote: > >> ee somewhere a Node DNS > > >

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

2012-11-09 Thread Nuno Job
github.com/iriscouch/named ? Its used to run npm nuno On Fri, Nov 9, 2012 at 3:50 PM, Matt wrote: > ee somewhere a Node DNS -- 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

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

2012-11-09 Thread Matt
On Wed, Nov 7, 2012 at 6:45 PM, Ben Noordhuis wrote: > While HTTP traffic is event-driven, the initial DNS lookup is done > from inside the thread pool. That's because we use getaddrinfo(3) > instead of c-ares, mostly because the latter doesn't support things > like mDNS (think Bonjour, Avahi, e

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-09 Thread Fredrik O
1. You can do many tricks as a programmer in any programming language, write ugly code, use anti patterns and so on, but that doesn´t mean you should. 2. When I wrote "good" I mean good as an expert. In that context would I say it is correct. You should of course know the programming language y

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-09 Thread greelgorke
Just to, short, points: 1. you can easily trick the instanceOf operator, because the constructor Property is not write-protected by default. 2. "No need to be a good Java Script programmer." this sentence is just wrong. you should know your tools, in any environment. Thats my opinion. Disclaimer

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-09 Thread Fredrik O
Well, it can very easily be fixed. All good programmers would type "this-> foo()" if any ambiguously may exist. And no, I disagree, it is not an "extreme" lame feature, but of course can it cause some problems if the programmer is not writing good readable code. It has some benefits however. De