タグ

emscriptenに関するyouzのブックマーク (3)

  • emscripten であそぶ - 兼雑記

    hello int main() { puts("hello"); } 生成されたコード // EMSCRIPTEN_START_FUNCS function _main() { var label = 0; var $1=_puts(((8)|0)); return 0; } Module["_main"] = _main; // EMSCRIPTEN_END_FUNCS 8がだだっぴろいメモリへのインデックスなのはわかるけど、それはどこで定義されてるのかな…と hello で検索しても見つからない。 104 で検索すると見つかった。 STATIC_BASE = 8; STATICTOP = STATIC_BASE + 8; /* memory initializer */ allocate([104,101,108,108,111,0,0,0], "i8", ALLOC_NONE, R

    emscripten であそぶ - 兼雑記
  • Lazy K Playground - iroriの日記

    Lazy K もブラウザ上で実行できるようにしたいなぁ、でも JavaScript でインタプリタ実装するの面倒だなぁ、と思っているうちに世の中が進歩して簡単になったので作ってみました。 http://lazy-k.appspot.com/ いくつか例を。 http://lazy-k.appspot.com/p/kyYMG82oRh http://lazy-k.appspot.com/p/2koJ2YQ9fD App Engine はコードの保存のために使っているだけで、実行はブラウザ上で行われます。バックグラウンドでインタプリタを動かすのに Web Workers を使っている関係で IE9 以前では動きません。ごめんなさい。 適当なベンチマークもしてみました。ベンチマークといえば円周率、ということで円周率を100桁計算するプログラムです。 http://lazy-k.appspot.c

    Lazy K Playground - iroriの日記
    youz
    youz 2013/07/08
    emscriptenでLazy-KのC言語実装をJavaScriptに
  • Lua in JavaScript: Running a VM in a VM

    Lua is a cool language, and it would be great to run it on the web. It isn't easy to do that though, see this answer (and the thread around it), [Converting/running Lua in JavaScript] is a recurrent question on the Lua list, i guess because of the superficial similarity of the two languages. Unfortunately, there are many important differences that are not so obvious. Making it work need either a f

    Lua in JavaScript: Running a VM in a VM
  • 1