You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Early last fall, I started working on a project called js.js with two other graduate students, Naga Katta and Stephen Beard. We started using a public Github repository from the start, and at the beginning of January, the author of three.js found and tweeted a link to our repository to his many followers. Soon after, a post wound up on Hacker News. Unfortunately, we weren’t very far along in the p
digraph testgraph{ {node[shape=none, fontsize=23] "Welcome to Liviz.js!" } {node[shape=none] "Interactive GraphViz on your browser" } {edge[color=transparent] "Welcome to Liviz.js!" -> "Interactive GraphViz on your browser" } A -> B -> C -> D -> E; B -> D; {node[shape=box]; 1 -> 2 -> 3; } E -> 1;2 -> C; {rank=same; 1; A;} {rank=same; 3; D;} } Test
I've been porting various libraries to JavaScript recently (lzma.js, sql.js) and I thought it might be useful to write up details about how this kind of thing is done. So here is how I ported libxml - an open source library that can validate XML schemas - in response to a request. Note that this isn't a general HOWTO, it's more a detailed writeup of what I did to port libxml in particular, but I h
emscriptenのファイルIOってどうなってるんじゃと思って調べてみた。 手順的にはこんな感じ。 1. file IOを行うcファイル(file.c)を作る 2. emscriptenで生成したファイルが事前に読み込むjsファイル(pre.js)を作る 3. ラップする(header.js, footer.js) まずはc言語で簡単なファイルIOを行うプログラムを書いてみる。inputというファイルからデータを読み取りoutputというファイルにデータを書き込む。 #include <stdio.h> int main(void){ FILE *i, *o; int c; i = fopen("input", "r"); o = fopen("output", "w"); while((c = fgetc(i)) != EOF) fputc(c, o); fclose(i); fclo
はじめに JavaScript Advent Calendar 2011 (フレームワークコース) の17日目です。この記事では、C言語で書かれたアプリケーションを Javascript エンジン上で動かすためのツールである Emscripten について解説します。 Emscripten の原理 Emscripten はC言語のコードを Javascript のコードへ変換するツールですが、人間が移植作業を行うように「書き直し」をしてくれるものではありません。例として、以下のようなC言語のコードの移植を考えます。 #include <stdio.h> #define MESSAGE "Hello" int main() { int i; for (i = 0;i < 10;i++) { puts(MESSAGE); } return 0; } プログラマーが手作業で移植するなら、Java
https://github.com/kripken/emscripten/ この手のツールは、hello world程度のsrcしか変換できないと思っていましたが、物理engine:bulletやfont engine:freetypeのデモをみると、その完成度に驚きます。 最近、jsでバイナリを扱うアプリが増えた裏にemscriptenがあるのかも... で、実際にinstallし、試してみました。 参考site Emscripten入門 http://teikyo.tumblr.com/2011-emscripten-1 http://teikyo.tumblr.com/2011/emscripten-tips 日本語で大変、分かりやすくまとめてられています。 2011年12月(約6ヶ月前)のentryで、emmaken.py 後継の emcc が公開されている為、install方法
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く