This is ideology. I do not understand this. I prefer practice. In practice
i want load 2 files at the same time, than process it and save to another.
This code is all i need:

function updateConfig( ){
    try {
        var localConfig= $.fs.readFileSync( './config.tree' )
    } catch( error ){
        console.log( error )
    }

    var remoteConfig= $.http.getSync( 'http://example.org/config.tree' )

    var resultConfig= localConfig ? mergeConfig( localConfig, remoteConfig
) : remoteConfig

    $.fs.writeFileSync( './config.tree', resultConfig )
}

I do not want native or surrogate, sync or async. I want do more, write
less and do not fall to hell of callbacks.

2013/1/10 Alex Tatumizer <[email protected]>

> Fibers practically turn asynchronous code into synchronous one. We throw
> the baby out with the bathwater. The whole idea of fibers is based on
> belief that asynchronous code is evil. If you believe it's evil, why not to
> program in java? No fibers required. And you can even use javascript, if
> you wish (Rhino).. Many people believe this way (web is full of rants on
> this matter).
>
> This is a misconception. Asynchronous functions are *natural*. The
> *nature* is full of asynchronous functions (any fibers running in the
> Universe?)
>
> In fact, if you need a path to automatic parallelization, asynchronous
> functions is the only way to go. I mean REAL parallelization, not just
> while waiting for I/O.
>
> It's somewhat a philosophical issue though.
>
> I think switching to fibers is admitting a failure to come up with a good
> concept that facilitates thinking about async code, and writing async code.
> Circuit is my attempt to provide such concept. It doesn't hide asynchronous
> functions to the same extent as fibers, just makes the notation more
> concise using syntax sugar. Semantics remains absolutely the same.
>
>
>
>
>
>
> On Wed, Jan 9, 2013 at 3:39 PM, 犀利な天使 <[email protected]> wrote:
>
>> Circuit also hides async nature. That marshal functions (that contains
>> chunks of code and uses fields instead of local variables) in one line. And
>> reinvent control flow syntax that already exists in javascript (conditions,
>> loops, error handling etc).
>>
>> I already use fibers in gecko and i love its. Try and you :)
>>
>>
>> 2013/1/9 Tatumizer <[email protected]>
>>
>>> I opened an issue to discuss the best syntax. In fact, there are more
>>> alternatives than I could put into the article - they can be found in the
>>> issue discussion:
>>> https://github.com/tatumizer/circuit/issues/1. Please help to sort it
>>> out!
>>>
>>> @nin jin:
>>> I might be wrong, but I think the goal of fibers is to HIDE asynchronous
>>> nature of functions.
>>> The goal of circuit is the opposite: to create elegant and succinct
>>> notation where asynchronous functions shine. And you see, it's really
>>> getting closer to that goal (gradually).
>>>
>>> @ajlopez:
>>> Please don't hesitate to open new issues in the circuit project if you
>>> know what to improve/add/etc. It's better to document suggestions there, or
>>> else they will be lost.
>>> Even if something is tangentially related, let it better be on github.
>>> Many apparently different problems are inter-related in fancy ways.
>>>
>>> Just one more point. Turns out, circuit can be regarded as fine-grained
>>> implementation of mediator patter,
>>> Good presentation of mediator pattern can be found in this paper:
>>> http://addyosmani.com/largescalejavascript
>>> It's interesting how essentially the same concept applies in two
>>> completely different sets of circumstances. h/t Ates Goral [@atesgoral](
>>> https://github.com/atesgoral)
>>>
>>> Thanks everybody for comments! Please send more!
>>>
>>>  --
>>> 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
>

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

Reply via email to