2013-03-01から1ヶ月間の記事一覧

調子よくツイートしていたら上限に達してしまった 残ツイート数とか表示してくれないと困る

asm.js is 何

解説記事じゃないですし、内容は保証しません。 asm.js は低レベル言語 仕様書[1]によれば、asm.jsはJavaScriptの厳密なサブセットであって、コンパイラーの低レベルで効率的なターゲット言語として使うことができる言語だ。 This specification defines asm…

3DCGスクリプト言語案 save obj > "alpha.obj" let $cube = load obj < "cube.obj" for $r1 $r2 in load csv < "value.tsv" begin translate 5 0 0 rotate $r1 0 0 1 model $cube end begin translate -5 0 0 rotate $r2 0 0 1 model $cube end

ラムダ++

#include <iostream> int main() { for (int i = 0; i < 10; ++i) { auto x = [=](){ return i; }; std::cout << x() << std::endl; } } prog_cpp$ g++ -std=c++0x hellolambda.cpp prog_cpp$ ./a.out 0 1 2 3 4 5 6 7 8 9 prog_cpp$</iostream>

ラムダラムダ

TypeScriptは ()=> で Java8は ()-> なのか。辛い。2013-03-12 13:58:59 via SoraUsagi C++ [](int x) { return x > 0; } Python lambda x: x > 0 Ruby -> x { x > 0 } Haskell \x -> x > 0 C# x => x > 0 CoffeeScript (x) -> x > 0

Bool ::= False | True Nat ::= O | S Nat Maybe a ::= Nothing | Just a Not :: Bool -> Bool Not = False -> True | True -> False Match :: _ -> _ -> Bool Match a = a -> True | _ -> False Pred ::= S (x : Nat) -> x