News for hackers. Stuff that matters.
Re:Vim.js – JavaScript port of Vim by brotchie on Sunday November 30, 2014 @09:21AM (#8676863)
Nice, I had a crack at doing this a while back using emscripten, but couldn't get around that Vim's input handling is blocking.

Looks like coolwanglu has found a way around this by hacking some kind of async transformation into emscripten. I haven't looked at his code, but I suspect he specially handles known blocking libc calls. My guess is some how storing the set of stack frames when a blocking function is called so that the stack can be unwound to let the js engine continue.

Good stuff.

Re:Vim.js – JavaScript port of Vim by coolwanglu on Sunday November 30, 2014 @12:36PM (#8677383)
Hi, this could be what you need :) https://github.com/kripken/emscripten/wiki/Asyncify
Re:Vim.js – JavaScript port of Vim by ehsanu1 on Sunday November 30, 2014 @03:29PM (#8677967)
Had to do a double take at your comment, because I thought I wrote it! I wonder how many others there are.