Live data from Hacker News

Node-fib: Fast non-blocking fibonacci server

github.com

121–124 of 124 posts

Re: Node-fib: Fast non-blocking fibonacci server

#121
post #55

Earlier quoted context omitted.

OK. Set up a load balanced infinite loop. Result: A load balanced infinite loop. This is not a win for Node. Load balancing across a number of hung processes buys you very little. (Not quite zero; you get a chance to detect the fact that it's hung and restart it, as long as these pathological requests aren't coming in fast enough. Hope the user who poked the bug doesn't hit refresh too many times!) I still think you…

How does this differ from MacClients in apache, or process limits on CGI? I agree with you, but don't see how this problem is specific to node...

It isn't specific to Node. What's specific to Node is that there's a whole bunch of hype convincing people that Node is the epitome of multitasking, when in fact it's just yet another event-loop based system, subject to the same foibles. The same very well known foibles.

Node isn't a bad technology and I don't hate it. Well, I personally hate working in the event-loop paradigm (due to abundant experience) but that's no discredit to Node, which simply is what it is. The hype is toxic. The hype is basically full of flat-out lies. It teaches people that the state-of-the-art as of 1990 or so is the state of the art today. The hype claims Node is blazing a new path in the field of concurrency, when in fact it's traveling a 4-lane highway with fast food and hotels, while putting blindfolds on its partisans to hide them from the fact they're actually smack dab in the middle of civilization.

Re: Node-fib: Fast non-blocking fibonacci server

#122
post #116
post #59

Earlier quoted context omitted.

to expand upon this, here are some other representative Ted Dziuba posts: http://teddziuba.com/2010/10/taco-bell-programming.html http://teddziuba.com/2011/02/the-case-against-queues.html http://teddziuba.com/2011/03/osx-unsuitable-web-development.... http://teddziuba.com/2008/09/a-web-os-are-you-dense.html if I had to sum up his philosophy in three sentences, here they are: your job is software engineering. every bi…

Fine. So you pick your tool (Java, Python, Node.js, presumably with an Nginx or Apache front end, though I'm not sure you want to put Node behind Apache), and use it. I don't see how Node.js isn't a valid tool. Async can be a bit of an over-optimization, but you don't have to use it (even in Node), as Ted's naive Fib server shows. And Javascript is ugly as sin. But so's PHP, the language behind Wikipedia, and you hav…

agreed -- for what it's worth, I've looked into node.js for some of my projects, then thrown it out because I already know other technologies which serve the same purpose. the problem isn't with the technology, the problem is with the marketing (and that includes grass-roots marketing through engineers who swear by the technology as one-size-fits-all.)

Re: Node-fib: Fast non-blocking fibonacci server

#123
post #92

Earlier quoted context omitted.

Really? I've almost never seen node.js pitched to anyone other than newbies (although not in the enterprise trenches for sure). Rarely the pitch involves being able to share libraries between the server side and browser side (wonderful benefit of node.js) Most of the time it's being sold as "you already know javascript" or "it's super fast, because non-blocking is magic sauce!" I haven't used Node.js for anything ser…

I find the notion of sharing libraries between the client and server kind of odd, in that people who talk about the "open web" think it's a desirable quality. it allows you to rev a protocol faster, but at the cost of not being forced to have a point of reference that isn't also intrinsically tied to one implementation of the protocol, which seems a very un-open thing to do to me.

The libraries I was thinking of sharing are all ones that are tightly coupled to the specific pages they would be on and all related to UI.

Things like form validation, user input normalization, navigation options. There are ton of small data manipulation functions that you either have to maintain in both javascript and your server side language and cause some weird bugs when one version doesn't behave exactly the same as the other or else you need to make a bunch of unnecessary ajax calls just to avoid reimplementing things in js.

There is much deeper integration you could do but I think we're on the same page as to why that's a bad idea.

Re: Node-fib: Fast non-blocking fibonacci server

#124
post #87
post #5

I wonder why I don't often see folks directly computing Fib(n) using the equation given in SICP exercise 1.13: Fib(n) = round(φ^n / sqrt(5)), where φ = (1 + sqrt(5)) / 2. Cites: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-11.html... https://secure.wikimedia.org/wikipedia/en/wiki/Fibonacci_num...

By using a field extension over √5, you can evaluate this exactly without rounding or resorting to floating point.

I think that's a very sharp observation. I tried it, but in order to exponentiate the vectors (instead of floating point numbers) I end up with the original matrix algorithm (pre-eigenvalues)...
Post reply on HN