ç§ã¯æããè¨èªå¦çç³»ã«èå³ããããèªåã§è¨èªãä½ããã¨ã夢è¦ã¦ãã¾ããã ããããããè¨èªãå®è£ ãããã¨æã£ã¦è¨èªå¦çç³»ã«é¢ããæ¬ãèªãã§ãä½ããæãä»ãã¦ãããåããããã¢ã»ã³ãã©ãã¾ã¨ãã«èªããªãã¾ã¾ãæ°å¹´ãçµã£ã¦ãã¾ãã¾ããã 大å¦æ代ã¯æ å ±ç³»ã§ã¯ãªãã£ããããã³ã³ãã¤ã©ã®å®é¨ãããæ å ±ç³»ã®å¦ç§ã®ã«ãªãã¥ã©ã ã羨ã¾ããæããæ å ±ç³»ã®ææ¥ã®æç§æ¸ãæã«ã¨ã£ã¦è¦ã¦ãèªãæ°ãèµ·ãããèªåã«ä½ããã®ã¯æè©®ãæ§ææ¨ãã¡ããã£ã¨ããã£ã¦å¤æããã¬ãã«ã®ãã® (ä¾ãã°sjspãªã©) ã«ã¨ã©ã¾ã£ã¦ãã¾ããã
ãããªä¸ãå»å¹´ã®Rebuild.fmã§ãã¨ã¦ãæéãåããåãããã¾ããã LLVMã®linkerã§ããLLDãéçºããã¦ããrui314ããã®åã§ãã rebuild.fm ã»ã«ãã³ã³ãã¤ã«ã§ããCè¨èªã®ã³ã³ãã¤ã©ãå®è£ ããã¨ãã話ã®ãªãã§ãã¤ã³ã¯ãªã¡ã³ã¿ã«ã«éçºããéè¦æ§ã«ã¤ãã¦è©±ãããã¦ãã¾ãã
ãã®åãèãã¦ãã£ã¨ãã³ã³ãã¤ã©ã®æ¸ãæ¹ãããã£ãæ°ããã¾ããã ã³ã³ãã¤ã©ã«é¢ããæ¬ãèªãã§ãå®è£ ã®é²ãæ¹ãããããªãã£ãã®ã¯ãã³ã³ãã¤ã«ãã§ã¼ãºãã¨ã«ç« ã«åããã¦ããããã§ãæ£è¦è¨èªã®é£ãã話ãèªãã§ã¯æ¬ãæãåºãã¦ããã®ã§ãã Rebuild.fmã®rui314ããã®ã話ãèãã¦ãã¾ãæåã¯å°ããè¨èªãã¨ã«ãããã¼ã¹ããã³ã¼ãçæã¾ã§éãã¦åãããã«ãã¦ãããããå¾ã ã«ææ³ãå¢ããã¦ããã¨ããã¤ã³ã¯ãªã¡ã³ã¿ã«ãªã¢ããã¼ããæåãªã®ã ã¨ãã£ã¨ããã£ãã®ã§ãã ããã§æåã®è¨èªã¯ãé¢æ°ãforã«ã¼ããæ¼ç®åããªããã¨ã¦ãããªããã£ããªææ³ã ããã¤è¨èªããå§ããã®ã§ãã ã³ã³ãã¤ã©ã®æç§æ¸ãèªãã§ããã£ã±ãããããªãã£ãå®è£ ã®é²ãæ¹ããããããããã£ãç¬éã§ããã
æè¿ãã¾ã¤ãã¨ããã²ãããã®ãè¨èªã®ããã¿ããåºçããããã¨ããããè¨èªå®è£ ã®ç±ãé«ã¾ã£ã¦ããããã«æãã¾ãã ç§ã¯ä»å¹´ã¯è¨èªå®è£ ã®å¹´ã«ãããã¨æã£ã¦ãã¦ããã®ç¬¬ä¸æ©ã¨ãã¦ã¤ã³ã¿ã¼ããªã¿è¨èªãæ¸ãã¦ã¿ã¾ããã ã¾ããã£ããã¨ã¯ãmrubyãLuaãªã©ã®å®è£ ãæå ã«å¼ã£å¼µã£ã¦ãã¦ãctagsãæã£ã¦æ°æ¥èªãã§ã¿ã¾ããã
Luaã®ãã¡ã¤ã«æ§æã¯åãããããã®ã§èªã¿ãããã§ããmrubyã¯mrbgems/mruby-compiler/coreãsrc/vm.cãªã©ãä¸å¿ã«è¦ã¦ããã¾ããããã£ããé°å²æ°ãæ´ããããã®æ°æã¡ã§èªã¿ã¾ããã ãã¨ã¯ã²ãããå®è£ ãé²ãã¦ããã¾ããã
ã¤ã¾ãåèã«ãããã®ã¯mrubyã¨Luaã§ãã æ¸ç±ã¨ãã¦ã¯ä»¥ä¸ã®æ¬ãæãã¦ããã¾ã (ããã¡ãã£ã¨ãããããã¤ã³ã¿ã¼ããªã¿å®è£ ã®æ¬ããæ°ããããã©ç¥ããªãã§ã)ã
大å¦æ代ã«è²·ã£ããã©å½æã¯ãã¾ãç解ã§ãããæè¿éãã¦ã¿ã¦ããããç解ãå§ããã³ã³ãã¤ã©ã®æ¬ã ãã®æ¬ã ãèªãã§ã¦ãããåãããªããã©ãèªåã§VMãæ¸ãã¦ã¿ã¦ããæ¹ãã¦ãã®æ¬ãèªãã§ã¿ãããç´å¾ããé¨åãããããããã¾ãã (ç¹ã«é¢æ°ã®ã³ã¼ãçæã«ã¤ãã¦)ã 大å¦ã§ä½¿ããã¦ããæç§æ¸ã§å°ã硬ãã
æ å ±ç³»æç§æ¸ã·ãªã¼ãº ã³ã³ãã¤ã©
- ä½è : 湯淺太ä¸
- åºç社/ã¡ã¼ã«ã¼: ãªã¼ã 社
- çºå£²æ¥: 2014/09/06
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
- ãã®ååãå«ãããã° (1件) ãè¦ã
Direct threadingãªã©mrubyã§ä½¿ããã¦ããæè¡ãããåããæ¬ (ãã¿ã¾ãããæåã®æ¹ãã¡ãè¦ããã ãã§ã¡ããã¨ã¯èªãã§ã¯ãªãã§ãâ¦)ã
ã¾ã¤ãã¨ããã²ã è¨èªã®ããã¿
- ä½è : ã¾ã¤ãã¨ããã²ã
- åºç社/ã¡ã¼ã«ã¼: æ¥çµBP社
- çºå£²æ¥: 2016/12/22
- ã¡ãã£ã¢: Kindleç
- ãã®ååãå«ãããã° (2件) ãè¦ã
rui314å çããªã¹ãã¯ããã¦ããã®ã§ãç§ãæ¥è¨å½¢å¼ã§ãéããã¦ã¿ã¾ãã
1æ3æ¥
å®å®¶ããæ»ããã¤ã³ã¿ã¼ããªã¿è¨èªãä½ãæèãé«ããã ãã£ã¬ã¯ããªãä½ããyaccãã¡ã¤ã«ãç¨æããã
1æ7æ¥
mrubyã®æ§ææ¨ã®å®è£
ãåèã«ãã¦ãASTãå
¨ã¦node*
ã§å®è£
ãããã¨ã«ããã
typedef struct node { struct node *car, *cdr; } node;
ã¨ãããããã¼ãã追å ãããã³ã«mallocãããããªå½¢ã§å®è£ ãé²ããã ææ³ã¯ååæ¼ç®ã®ã¿ã
1æ8æ¥
æ§ææ¨ã®ããã®ã¡ã¢ãªã¼ãã¼ã«ãå®è£
ããã
ASTã¯å
¨ã¦node*
ã§è¡¨ããã¨ã«ããã®ã§ããã®æ§é ä½ã®ã¿èãã¦ããã°è¯ãã®ã¯æ¥½ã
ååæ¼ç®ã®ã¿ã®è¨èªã«å¯¾ãã¦ãã³ã¼ãçæã¨å®è¡å¨ãå®è£ ããã å®è£ ãç°¡åãªã¹ã¿ãã¯ãã·ã³ã§ä½ãã
ä»ããææ³ã¯
- å¼ (expression) ã並ãã ãã®ãprogram
- expressionã¯ååæ¼ç®ã使ãã
- ãªãã©ã«ã¯æ´æ° (long) ã¾ãã¯æµ®åå°æ°ç¹æ° (double)
enum OP_CODE {
OP_ADD,
OP_MINUS,
OP_TIMES,
OP_DIVIDE,
OP_LOAD_LONG,
OP_LOAD_DOUBLE,
OP_PRINT_POP,
};
OP_PRINT_POP
ã¯ã¡ãã£ã¨ããµãâ¦
1æ9æ¥
ã³ã¼ããèªã¿ãããããã«ããã¤ãå¤æ°åããªãã¼ã ã å¤æ°ãä½ãå§ãããé£ããã¦æ£æ©ã«åºãããã
å¤ãå¤æ°ãå®è£ ãæ°ãã«è¿½å ããææ³ã¯
- å¤æ°ã«ä»£å ¥ã§ãã
- ååæ¼ç®ã®ãªãã§å¤æ°ã使ãã
- printæ
statement : IDENTIFIER EQ expression { $$ = cons(nint(NODE_ASSIGN), cons($1, $3)); } | PRINT expression { $$ = cons(nint(NODE_PRINT), $2); } ;
OP_PRINT_POP
ãåé¤ãã¦OP_ASSIGN
, OP_PRINT
, OP_LOAD_IDENT
ã追å ã
enum OP_CODE { + OP_ASSIGN, + OP_PRINT, OP_ADD, OP_MINUS, OP_TIMES, OP_DIVIDE, OP_LOAD_LONG, OP_LOAD_DOUBLE, - OP_PRINT_POP, + OP_LOAD_IDENT, };
OP_ASSIGN
ãOP_LOAD_IDENT
ã®operandã¯ãå¤æ°é
åã®indexãå
¥ã£ã¦ããã®ã§ãå®è¡å¨ã®é°å²æ°ã¯ãããªæãã
+ case OP_ASSIGN: + e->variables[GET_ARG_A(e->codes[i])].value = e->stack[--e->stackidx]; + break; case OP_ADD: BINARY_OP(+); break; @@ -172,6 +214,9 @@ static void execute_codes(env* e) { break; + case OP_LOAD_IDENT: + e->stack[e->stackidx++] = e->variables[offset - GET_ARG_A(e->codes[i])].value; + break;
booleanãªãã©ã«ãå®è£ ãããã¾ã æ¼ç®ã¯ãªãã
1æ11æ¥
ç°¡åãªãã¹ãã±ã¼ã¹ãæ¸ãã
foo = 3 * 4 / 5 + 6.7 * 7 bar = foo * 3.1 + foo / 7.2 print foo + bar
ãã®ã¹ã¯ãªãããå®è¡ããã¨207.281666667ã¨è¡¨ç¤ºãããã Python 2ã®ã³ã³ã½ã¼ã«ã§ç¢ºãããªããå®è¡çµæã確ãããã
ifæãå®è£
ãããVim scriptã«å£ã£ã¦ãif … endifã«ããã
ifæã®å®è£
ã«ä¼´ã£ã¦ãOP_JMP_NOT
ãä½ãã
åã¹ãã¼ãã¡ã³ãã®å½ä»¤æ°ãã«ã¦ã³ãããªãã¨ãããªããã¨ã«æ°ãä»ããcodegen
é¢æ°ã®è¿ãå¤ãvoid
ããuint16_t
ã«ããã
1æ12æ¥
elseæãå®è£
ããã
ç¡æ¡ä»¶ã«ã¸ã£ã³ãããOP_JMP
ãä½ãã
if true a = 10 print a else b = 11 print b endif
ãã®ã¹ã¯ãªããã¯æ¬¡ã®ãããªã³ã¼ãã«å¤æããã¦å®è¡ãããã
bool true jmp_ifnot 5 long 10 let 0 load 0 print jmp 4 long 11 let 1 load 1 print
foræã®ä¸ã«program counterãincrementããã¨ãããããã®ã§ãjmp_ifnot
ã®operandã1å°ãªãããã«è¦ãããããã§æ£ããã
elseifæãå®è£ ããã æ§ææ¨ãæ§ç¯ããã¨ãã«æ°ããifæã«ãã¦ãã¾ããã¨ã§ãã³ã¼ãçæã触ããªãã¦ãå®è£ ã§ãã¦ãã¾ããã¨ã«æ°ãã¤ãã
ãããã°ããããããã«ãæ§ææ¨ãLISPã®ãããªå½¢å¼ã§è¡¨ç¤ºã§ããããã«ããã
1æ13æ¥
whileæãå®è£
ããã
ããã¾ã§operandã¯uint16_t
ã ã¨æã£ã¦ããããããã§ã¯ã¸ã£ã³ãå½ä»¤ã§è² ã®å¤ãæå®ã§ããªãã¨ããåæ©çãªãã¹ã«æ°ãã¤ãã
ã¨ããããæ«å®å¯¾å¦ã§OP_JMP_BACK
ã追å ããã
>=
, ==
, <=
ãªã©ãæ°å¤ã®æ¯è¼ãè¡ãæ¼ç®åãå®è£
ããã
&&
, ||
ãå®è£
ããããããã¯ååæ¼ç®ãªã©ã®ä»ã®äºé
æ¼ç®åã¨ã¯ç°ãªããå³è¾ºãè©ä¾¡ããªããã¨ãããã
ifæãä½ã£ãã¨ãã«è¿½å ããOP_JMP_NOT
ã¯è©ä¾¡å¤ãã¹ã¿ãã¯ããpopãã¦ãã¾ããããä»æ¹ãªãã«OP_JMP_NOT_KEEP
ãä½ãã
ifæã¨whileæãå®è£ ãããã®ã§ããªãã¨ãªããè¨èªãããããåºã¦ãã¦ããããã
1æ14æ¥
operandãuint16_t
ããint16_t
ã«å¤æ´ããOP_JMP_BACK
ãåé¤ããã
å°ããªãã¡ã¯ã¿ãªã³ã°ããã
æè¿ã¯ä»äºãå¿ããã¦é²ãããã¦ããªãã
1æ16æ¥
çµã¿è¾¼ã¿é¢æ°min()
, max()
ãå®è£
ããã
é¢æ°ã®å¼æ°ã®ASTãçµã¿ç«ã¦ã¦ãã¦ãããããnode*
ã®è¯ããåãã£ã¦ããã
é¢æ°ã®å®è£
ã¯ã¹ãæ¸ãã§ã¹ã¿ãã¯ãç´æ¥æä½ãã¦ãã¦å±ãªãã
é¢æ°å¼ã³åºãã®operandã«ã¯ãä½çªç®ã®é¢æ°ãã¨ããindexã¨ãå¼æ°ã®æ°ãæå®ããããã«ããã
ã¦ã¼ã¶ã¼å®ç¾©ã®é¢æ°ã®å®è£
ãå¦æ³ããã
1æ17æ¥
åé
æ¼ç®å +
, -
ãå®è£
ããã
çµã¿è¾¼ã¿é¢æ°abs()
ãå®è£
ããã
1æ18æ¥
endifã¨endwhileãendã«ãããRubyãLuaã£ã½ãã¦ããããã
a = 10 while a >= 0 print a if a > 5 print 10 else print 0 end a = a - 1 end
ã¦ã¼ã¶ã¼å®ç¾©é¢æ°ãã¨ãããããã¼ã¹ã§ããããã«ããã
+statement : FUNC IDENTIFIER LPAREN fargs_opt RPAREN sep statements sep END + { + $$ = cons(nint(NODE_FUNCTION), cons($2, cons($4, $7))); + } + | RETURN expression + { + $$ = cons(nint(NODE_RETURN), $2); + }
ã¾ã ã³ã¼ãçæã¯ã©ãããã°è¯ãã®ããã£ã±ãããããªãã
ãã¡ã¤ã«ã大ãããªã£ã¦ããã®ã§åå²ããã
1æ19æ¥
simple virtual machineã¨ããæå³ã§svmã¨åä»ãã¦ããããsupport vector machineã¨ç´ããããã®ã§ãminivmã«renameããã
ã¦ã¼ã¶ã¼å®ç¾©é¢æ°ã®å®è£ ã«æ³ãã馳ããã
1æ21æ¥
ã¦ã¼ã¶ã¼å®ç¾©é¢æ°ã®ã³ã¼ãçæã¨å®è¡å¨ãå®è£
ããã
program counterãsaveã»unsaveããOP_SAVEPC
, OP_UNSAVEPC
ããã¼ã«ã«å¤æ°ã®é åã確ä¿ã¨è§£æ¾ãè¡ãOP_ALLOC
, OP_UNALLOC
ãå®è£
ããã
å°ãæ±ããã©ãå®è¡æã«ã¯å¤æ°é åãéãã¾ã«ä½¿ãããã«ããã¨ã確ä¿ããæ°ãæããªãã¦ããã®ã§æ¥½ã¨ãããã¨ã«æ°ãã¤ãã
é¢æ°ã®å®è¡ã¯ããããã次ã®ãããªæµãã«ãªãã
- å¼æ°ãé çªã«è©ä¾¡ãã¦ã¹ã¿ãã¯ã«ç©ã
- ç¾å¨ã®program counter (å¼ã³åºãåã®pc) ãã¹ã¿ãã¯ã«ç©ã
- é¢æ°å¼ã³åºããè¡ã
- ãã¼ã«ã«å¤æ°ã®ããã®å¤æ°é åã確ä¿
- popãã¦å¼ã³åºãåã®pcããã¼ã«ã«å¤æ°ã«å ¥ãã
- å¼æ°ãpopãã¦å¾ããããã¼ã«ã«å¤æ°ã«å ¥ãã¦ãã
- é¢æ°ã®ä¸èº«ãè©ä¾¡ãã
- returnæã§ããã¼ã«ã«å¤æ°ã®å¤æ°é åã解æ¾ããå¼ã³åºãåã®pcã«æ»ã
ããããé¢æ°ã®ä¸ããã°ãã¼ãã«å¤æ°ãè¦ããªãã¨ããå帰å¼åºããã§ããªã (é¢æ°èªä½ã¯ã°ãã¼ãã«å¤æ°é åã«ç¢ºä¿ãããããé¢æ°ã®ä¸èº«ã®ã³ã¼ãçææã«ãã¼ã«ã«å¤æ°ãªã¹ããè¦ã¦ãããã) ã¨ããåé¡ã«ç´é¢ããé ãæ±ãããæ¼å¯ããã
åé
æ¼ç®å !
(not) ãå®è£
ããã
1æ22æ¥
ã°ãã¼ãã«å¤æ°ã¨ãã¼ã«ã«å¤æ°ã¯å
¨ãæ§è³ªãéãã¨æãã
湯淺å
çã®æ¬ã®é¢æ°ã®ã³ã¼ãçæã®ç¯ãèªãã
ãã¼ã«ã«å¤æ°ã«å¯¾ãããªãã³ã¼ã OP_LET_LOCAL
, OP_LOAD_LOCAL_IDENT
ã追å ããã°ãã¼ãã«å¤æ°ã¨ã¯åºå¥ããããã«å®è£
ããããããé¢æ°ã®ä¸ããã°ãã¼ãã«å¤æ°ãåç
§ããããå帰å¼ã³åºãã§ããããã«ãªãã
a = 10 b = 20 func foo(x) b = 30 return a * b + x end print foo(50) print a print b
ãã®ã¹ã¯ãªããã350, 10, 20ã¨è¡¨ç¤ºããããã«ãªã (æ¨æ¥ã®æç¹ã§ã¯ã°ãã¼ãã«å¤æ°é åãè¦ãã¦ãªãã£ãã®ã§ãUndefined variable: a
ã ã£ã)ã
ãã£ããããæ°ãè¨ç®ãã (å¹çã®æªãå帰å¼ã³åºãã®) ã¹ã¯ãªãããåããã¨ã¦ãè奮ããããã¹ãã±ã¼ã¹ã«è¿½å ããã
OP_UNALLOC
ã¨OP_UNSAVEPC
ãåé¤ãã¦OP_RET
ã«çµ±ä¸ããããã¼ã«ã«å¤æ°é åãæã渡ãã¨ã¨ãã«ãprogram counterãå¼ã³åºãå
ã«æ»ãã
breakæã¨continueæãå®è£ ããã continueã¯ç°¡åãªã®ã§ã¾ãããã¨ãã¦ãbreakæã®ã¸ã£ã³ãå ãããããã«å°ä¸æéæ©ãã ã¯ã³ãã¹ã§çæã¾ã§ãã£ã¦ããã®ã§ãwhileæã®ä¸èº«ãçæãã¦ããã¨ãã¯é£ã³å ã®pcãåãããªãã ä»æ¹ãªããwhileæã®å é ã«whileæã®æå¾ã¾ã§é£ã¶ã¸ã£ã³ãå½ä»¤ã追å ããã
ã¹ã¿ãã¯ã®ä¸çªä¸ãã³ãã¼ãã¦ç©ãOP_DUP
ã追å ãã¦ã &&
, ||
ãä½ã£ãã¨ãã«è¿½å ããOP_JMP_IF_KEEP
ã¨OP_JMP_NOT_KEEP
ãåé¤ããã
ããã©ã¼ãã³ã¹æ¹åã®ããã«ãå³å¤ã足ãããå¼ãããããOP_IADD
ã¨OP_IMINUS
ã追å ããã
足ãç®ã¯å¯æãªã®ã§å³å¤ãå·¦ã®ã¨ããé©ç¨ã§ããã¯ãã ãã©å¾åãã
ããããã³ã¼ããæ¸ããããã«ãªã£ãã®ã§ã軽ãã¹ã¯ãªãããæ¸ãã¦ã¿ããé度æ¯è¼ããã¦ã¿ãã 以ä¸ã®ã¹ã¯ãªãããåãã
func fib(n) if n <= 1 return 1 end return fib(n - 1) + fib(n - 2) end n = 0 while n < 38 print fib(n) n = n + 1 end
ãã®ã¹ã¯ãªããã9.05sã§å®è¡ã§ããã ããã¨å ¨ãåããã¨ãè¡ãã¹ã¯ãªããã¯ruby 2.1.9ã§9.10s, mruby 1.2.0ã§14.78s, Lua 5.2.4ã§12.83s, Python 2.7.12ã§26.30sããã£ãã ã¹ã¯ãªããè¨èªã¨ãã¦ããããã®é度ãåºã¦ããäºããããã
ãªããçæãããä¸éã³ã¼ãã¯æ¬¡ã®ãããªæãã«ãªã£ãã
long 3 let 0 jmp 20 ret 2 alloc 2 let_local 1 let_local 0 load_local 0 long 1 <= jmp_ifnot 2 long 1 jmp -10 load_local 0 iminus 1 call 0 1 load_local 0 iminus 2 call 0 1 + jmp -18 long 0 jmp -20 long 0 let 1 jmp 1 jmp 11 load 1 long 38 < jmp_ifnot 7 load 1 call 0 1 print load 1 iadd 1 let 1 jmp -11
ãããã£ã¦æ¹ãã¦è¦ã¦ã¿ãã¨ããã¯ãé¢æ°ã®æåã«retããã£ããwhileæã®æåã®jmpã¨ããã¦æå³ä¸æãããããªãã returnãbreakãªã©ãçææã«æ¬æ¥é£ã³ããã¸ã£ã³ãå ãããããã«ãããªã£ã¦ãã¾ã£ãã ã¯ã³ãã¹ã§çæããã®ã«ãã ãããªãã£ããããå°ãç´ ç´ãªã³ã¼ãã«ãªãã¯ãã ãã©ãä»åã¯æ·±è¿½ãããªããã¨ã«ããã
ãããããããã¨
è¨èªå¦çç³»ã¨ãã¦ãããªãã¨ãããªããã¨ã¯ãã¾ã ã¾ã ããããããã¾ãã æååãé åãè¾æ¸ãªã©ãä½ãããããåã¨ãé¢æ°å¼æ°ã®æ°ã®ãã§ãã¯ãªã©ãã¹ããããã¦ããã®ã§ã誤ã£ãææ³ã®ã¹ã¯ãªãããæµãã¨ç°¡åã«ã»ã°ãã©ãã¦ãã¾ãã¾ã⦠æµç³ã«ããããã®ã¯ç´ãããã æ§æã¨ã©ã¼æã®ã¡ãã»ã¼ã¸ãéãããã®ã§ãªãã¨ããããã¨æã£ã¦ãã¾ãã ä»ã®å®è£ ã ã¨ããããã¯ãã¼ã¸ã£ãä½ããªãã®ã§ãããå°ãã¹ã³ã¼ãããã¡ãã¨æ±ããããã«ãªã£ã¦ããèãããã§ãã
ããã£ã½ãåããã®ã¯ã§ãããã©è²ã ã¨æ°ã«å ¥ããªãé¨åã¯ããã®ã§ãä»åã®å®è£ ã¯ãã£ããæ¨ã¦ã¦ãã¾ã1ããæ¸ãã¦ããã¨æãã¾ãã åèç¨åº¦ã«GitHubã«ãªãã¸ããªãç½®ãã¦ããã¾ãã
ã¾ã¨ã
äºé±éã§åãã¦ã®ã¤ã³ã¿ã¼ããªã¿è¨èªãå®è£ ã§ããã®ã§ãä»å¹´ä¸ã«ãã¨23åãããè¨èªå¦çç³»ãæ¸ãã¨æãã¾ãã ä»åã¯ã¹ã¿ãã¯ãã·ã³ã§ä½ãã¾ããããã¬ã¸ã¹ã¿ãã·ã³ã®ã³ã¼ãçæã¯ã©ãããã°ããã®ãããããããªããã並è¡å¦çã®ã³ã¼ãçæã¨ãæ¤è¨ãã¤ãã¾ããã LLVMããã¯ã¨ã³ãã使ã£ã¦ã¿ãããã¢ã»ã³ãã©ãåãã¦ã¿ãããGCãå®è£ ãã¦ã¿ããããããã¯goroutineã¹ã±ã¸ã¥ã¼ã©ã®å®è£ ãèªãã§ã¿ããã¨ãããããäºãå±±ç©ã¿ã§ãã Scalaã®webã¢ããªã±ã¼ã·ã§ã³ãéç¨ãã¦ãã以ä¸ã¯JVMã«ã¤ãã¦è©³ãããªãããã¨ããæããããã¾ãã
ãã®æåã®ã¹ãããã¨ãã¦ãç°¡åãªã¤ã³ã¿ã¼ããªã¿è¨èªãå®è£ ãã¦ã¿ã¾ããã ã¨ããããæåã®ä¸æ©ãè¸ã¿åºãã¦ããã£ãã§ãã å°ããæ§æããå§ãã¦ãå°ããã¤æ§æã足ãã¦ããã¨ããããæ¹ã¯ãè¨èªå¦çç³»ãä½ãä¸ã§æç¨ã ã¨æãã¾ãã ããèãã¦ã¿ãã°ããããããã¨ããæ¹æ³ã§ãããrui314ããã®ã話ãå§ãã¦èããã¨ãã¯ç®ããé±ãè½ã¡ãæãããã¾ããã
ASTã«mrubyæ¹å¼ (LISPã®ããã«car cdrã§è¡¨ã) ãæ¡ç¨ãããã¨ã¯ãè¯ãé¢ã¨æªãé¢ãããã¾ããã ã¡ã¢ãªã¼ç®¡çã¯1ã¤ã®æ§é ä½ã«ã¤ãã¦éä¸ãã¦ããã°ããã®ã§æ¥½ã§ãã é¢æ°ã®å¼æ°é¨åã®ããã«ãã¾ãã«ãªã¹ãæ§é ã«ãªã£ã¦ããé¨åã¯é åã«ããããããconsã§è¡¨ãã»ãã楽ã ã¨æãã¾ãã æªãé¢ã¨ãã¦ã¯ãã³ã¼ãçææã«carãcdrãä½ã表ãã¦ããã®ãããåãããªããªãã¨ããåé¡ãããã¾ãã ãã¼ãµã¼ã®å¯¾å¿ããé¨åãè¦ãã°åããã®ã§ãããçæé¨åã®ã³ã¼ãã ããè¦ã¦ãããä½ãåããã¾ããã 次ã«æ¸ãè¨èªã§ã¯ããã®æ¹å¼ã¯ä½¿ããã«å®è£ ãã¦ã¿ããã¨æãã¾ãã
è¨èªå®è£ ã®æ¥½ãã¿ã¯ããã°ã£ã¦ãããå ¨ãåããªããããã¡ãã¨å®è£ ã§ãããããã®ææ³ã§æ¸ããããããã³ã¼ããããããã¢ã«ã´ãªãºã ãåãããã«ãªãã¨ããã¨ããã«ããã¨æãã¾ããããã¨ããã¾ã§æ¸ãããå¯è½æ§ãä¸æ°ã«åºãã楽ããã¨ããã®ã¯æTweetãããã¨ãããã¾ãã ãã®æãã¯ä»ã§ãå¤ãã£ã¦ãã¾ããã
ããã°ã©ãã³ã°ã£ã¦ã, 1æ¸ãã¦ã1ã®ææã§ãªãããã. 5ã¾ã§, ãã, 9ã¾ã§æ¸ãã¦ã2ã®ææããåºãªãããã. 10ã¾ã§æ¸ãã¦ãã£ã¨3ã®ææã, ã¨æã£ãã, 100ã®ææã«å®ã£ã¦ã, ã ãã楽ãããã ãã.
— ãã¡ã«ã (@itchyny) 2012å¹´3æ4æ¥
è¨èªå¦çç³»ã®åéã¯åºå¤§ã§ããããã§ãå¦ã¶æ¥½ãã¿ãåºãã£ã¦ãã¾ãã ããããã£ã¦ãå¦ã¶ãã¨ãããããããå®è£ ãã¦ã¿ã¦åãã¨ããã楽ããã¨ããã®ã¯ãããã°ã©ãã®è¶£å³ã¨ãã¦ã¯ãã£ã¦ã¤ãã§ã¯ãªãã§ãããã (趣å³ã¬ãã«ã«ä½ãç¨åº¦ã ã¨ãæ¬æ¥ã§ç 究ããã¦ããã¬ãã«ã¾ã§ã¯ããããã£ã¦ãå°éããªãã¾ã¾ããããã¾ãããâ¦)ã å®è£ ãå ¬éããã¦ããè¨èªãããã¤ããããç´ æ´ãããææãããããè¦ã¤ããã¾ãã 第ä¸æ©ã¨ãã¦ãã¹ã¿ãã¯ãã·ã³ã®ã¤ã³ã¿ã¼ããªã¿è¨èªãå®è£ ãã¦ã¿ã¾ããã ã¬ã¸ã¹ã¿ãã·ã³ããã¤ãã£ãã³ã¼ãçæãLLVMããã¯ã¨ã³ããªã©ãè²ã ãªæ¹å¼ã試ããªãããè¨èªå¦çç³»ä½ãã楽ãã¿ããã¨æãã¾ãã