I like js and i like fibers - all of them exists in node.js. I was using java - this is a monster.
> Unfamiliarity for other Javascript developers Fibers, as sync, as async, as circuit, as many tons of other wheels, - library that needs to learn to use. But fibers really reduce complexity in client code. > No Windows Support I was developing my library in windows. Fibers works fine. > Browser Incompatible Most of nodejs code is browser incompatible. But Mozilla already implement generators from Harmony ( http://wiki.ecmascript.org/doku.php?id=harmony:generators). And all browsers will support fibers by generators in future. > More Difficult Debugging This is delirium. Stacktrace in callbacks is fully useless. Fibers libraries rebuilding stacktrace for debugging support. 2013/1/10 Alex Tatumizer <[email protected]> > @nin jin; everything is ideology at some level. When you say "practice" - > the notion is full of ideology. > My point is that if you prefer "practice" in a very narrow sense, the same > program in your example can be rewritten in 100 of other languages in a > much simpler form. > Why limit yourself to nodejs? What benefits do you get? > > Try java programming - you will like it! :) And absolutely no need to > reinvent the wheel with fibers, etc. > > P.S. Turns out, fibers are not a magic bullet either: > > http://stackoverflow.com/questions/10282828/node-js-modules-async-vs-fibers-promise-vs-q-oper8 > > > > > > > On Thu, Jan 10, 2013 at 4:05 AM, greelgorke <[email protected]> wrote: > >> @Eldar: thank you for the link to this paper. very interesting. >> >> Am Samstag, 29. Dezember 2012 09:16:39 UTC+1 schrieb Eldar: >> >>> @Raynos, @greelgorke I would recommend reading Out of the >>> tarpit<http://shaffner.us/cs/papers/tarpit.pdf>. >>> It argues that traditional imperative approach with control flow being >>> messed with logic leads to complex unmaintainable just ugly software. >>> >>> On Saturday, December 29, 2012 11:39:28 AM UTC+4, Raynos wrote: >>>> >>>> You can implement the same idea with two functions >>>> >>>> Here the code is explicit about how it runs code. >>>> >>>> ```js >>>> var execute = require("execute") >>>> , serial = require("serialize") // unimplemented see >>>> https://gist.github.com/**4405173 <https://gist.github.com/4405173> >>>> >>>> var run = serial([ >>>> function (cb) { >>>> execute({ >>>> sum1: function (cb) { add(1, 2, cb) } >>>> , sum2: function (cb) { add(3, 4, cb) } >>>> }, cb) >>>> } >>>> , function (result, cb) { >>>> add(result.sum1, result.sum2, cb) >>>> } >>>> ]) >>>> >>>> run(printResult) >>>> >>>> function printResult(err, result) { >>>> if (err) { >>>> throw err >>>> } >>>> console.log("result", result) // prints "result=10" >>>> } >>>> ``` >>>> >>>> Although your idea is interesting, it's hard to build something that's >>>> cleaner then just being explicit about how you do things. >>>> >>>> Also notice that because we are using clean functional abstractions >>>> they compose trivially ( http://jsfiddle.net/fvz7N/4/** ) like >>>> functions should. >>>> >>>> Your ideas however are interesting, the problem is that they are far >>>> more complex to grok and require trust on self organizing code. Also it's >>>> full of implicit magic by the very definition of self organizing code. >>>> >>>> It should be noted substack had a similar idea with disorder ( >>>> https://github.com/substack/**node-disorder#disorder<https://github.com/substack/node-disorder#disorder> >>>> ) >>>> >>> -- >> 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 email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> > > -- > 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 email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- 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 email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
