>  hacking the JS to add an _ parameters to all async calls

Unfortunately I need to support arbitrary unknown code calling my lib
functions.

On Wed, Oct 29, 2014 at 5:26 AM, Bruno Jouhier <bjouh...@gmail.com> wrote:

> Mark,
>
> sync XHR may be a bandaid solution but I think that it should really be a
> last resort.
>
> For info, vim has been ported to the browser by Lu Wang. The challenge was
> similar to yours because the implementation uses blocking calls to read
> from the terminal. The challenge was even higher because the source was in
> C, not JS.
>
> The vim port was done by first transpiling the C to JS with , then hacking
> the JS to add an _ parameters to all async calls, and then transpiling with
> streamline.js. A special C header was used to rename all the async calls so
> that they could be hacked automatically. The result is here:
> http://coolwanglu.github.io/vim.js/web/vim.html
>
> Later on, Lu Wang created his own fork of emscripten with an async
> extension. This allowed him to eliminate the streamline.js pass.
>
> So maybe you should not completely rule out the transpiler route.
>
> Bruno
>
> On Tuesday, October 28, 2014 7:59:07 PM UTC+1, Mark Hahn wrote:
>>
>> > So Atom pinwheels when the disk is slow?
>>
>> No.  The disk is fast enough to not notice.  It is node itself that slows
>> down atom, at least compared to an editor written in C++.
>>
>> On Tue, Oct 28, 2014 at 7:39 AM, Aria Stewart <ared...@nbtsc.org> wrote:
>>
>>>
>>> On Oct 28, 2014, at 1:20 AM, Mark Hahn <ma...@hahnca.com> wrote:
>>>
>>> >  you've only synchronous XHR to do that,
>>>
>>> You've made me think about this.  I rejected sync XHR out-of-hand
>>> because the user interface would be blocked which of course is a horrible
>>> idea.  But the Atom editor only hits the disk to load/save source files and
>>> sometimes to load/save options.  And of course it hits it a lot when the
>>> app is loading.  When editing a source file the disk it silent.  So maybe
>>> sync XHR is worth considering.
>>>
>>>
>>> Makes sense!
>>>
>>> So Atom pinwheels when the disk is slow?
>>>
>>> >  it's pretty restricted since all the new features of XHR aren't
>>> allowed in sync mode.
>>>
>>> What features would I be missing?  I can't imagine anything other than
>>> making normal http requests.
>>>
>>>
>>> Binary data handling and some of the XHR2 features, I believe.
>>>
>>> --
>>> Job board: http://jobs.nodejs.org/
>>> New group rules: https://gist.github.com/othiym23/9886289#file-
>>> moderation-policy-md
>>> Old group rules: https://github.com/joyent/node/wiki/Mailing-List-
>>> Posting-Guidelines
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "nodejs" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/
>>> topic/nodejs/oMNRWXwASOU/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> nodejs+un...@googlegroups.com.
>>> To post to this group, send email to nod...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/nodejs/469BEE26-2A5A-4AA8-AE82-F20EC0B5C964%40nbtsc.org
>>> <https://groups.google.com/d/msgid/nodejs/469BEE26-2A5A-4AA8-AE82-F20EC0B5C964%40nbtsc.org?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "nodejs" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nodejs/oMNRWXwASOU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/f358a7b2-3152-47f6-86ed-b4d235d436fc%40googlegroups.com
> <https://groups.google.com/d/msgid/nodejs/f358a7b2-3152-47f6-86ed-b4d235d436fc%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CACrj35HmhBAENjNMRCUmEpx%2BDpDsRaGm5hzi0Bb4JHbnH4_7YQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to