mrubyã®å¤ã¹ åå ãã¾ãã
æ¨æ¥ã¯ã1/28(æ) 15:00-ããã® ãmrubyããããã«ã½ã³ãã¨17:00-ããã®ãmrubyã®å¤ã¹ãã«åå ãã¦ãã¾ããã
ä»åmrubyãã¿ã§ç§ãçºè¡¨ããæ©ä¼ãé ãã¾ãããããã¡ãã«ã¤ãã¦ã¯å¥éä¼ç¤¾æä¾ã®ããã°ã§å
¬éããäºå®ã§ããæ¬ããã°ã§ã¯ãã¾ã¤ãã¨ããã²ãããã®mrubyè¬æ¼å
容ã«ã¤ãã¦ã¾ã¨ãã¦ã¿ã¾ãã
ç§ã®ç¥ãéãã90åã®æéãããã¦mrubyã®è©³ç´°ã«ã¤ãã¦ã¾ã¤ãã¨ãããã説æãã¦ããã ããæ©ä¼ã¯ä»åãåãã¦ã ã¨æãã¾ãã
mrubyã®ãã¯ãã«ã«ãªè©±ã¯ä»åãåãã¦
mrubyã«ãããçµã¿è¾¼ã¿ã¨ã¯
mrubyã«å¿ è¦ãªãã®
- çµã¿è¾¼ã¿API
- 移æ¤æ§(Portability)
- POSIXéä¾åãOSéä¾å, C99ã®ç¯å²å 㧠(ã§ããã ã)
- ãã ããVisual Cã§ãåä½ããããã«ãC99ã®å¶éã¯ç·©åã¦ãã
- æ§æå¯è½æ§
- ã·ã¹ãã ã«å¯¾ããæé©ãªã«ã¹ã¿ã ã³ã³ãã£ã°ã¬ã¼ã·ã§ã³
- ã½ãããªã¢ã«ã¿ã¤ã
- è»ã®ABSãªã©ã«ã¯ä¸åã(ãã¼ããªã¢ã«ã¿ã¤ã ã¯é£ãã)
- ã²ã¼ã ã¸ã®çµã¿è¾¼ã¿ã¬ãã«ã®ãªã¢ã«ã¿ã¤ã æ§
- GCã®è¨è¨
ç¦å²¡ã®äººãã¡ããã¨ã¦ãã¢ããã¼ã·ã§ã³ãé«ãã£ã
- å¹³æ22年度å°åã¤ããã¼ã·ã§ã³åµåºç 究éçºäºæ¥ã«æ¡æããã¦mrubyéçºãé²ãããã¨ã«ãªã£ã
- ãã®ããã¸ã§ã¯ããç¡ããã°mrubyã¯çã¾ãã¦ããªãã£ããããããªã
- æ¨å¹´4æã«ã½ã¼ã¹ã³ã¼ããgithubä¸ã«å ¬éãã
çµã¿è¾¼ã¿API
- mrb_open()
- mrb_load_string()
- mrb_close()
mruby VM
- æ§ç§° Rite VM
- 32bit word machine
- å½ä»¤ç¨®å¥ 7bit
- operand A: 9bit
- operand B: 8bit
- operand C: 7bit
- register machine
- ãªãã©ã³ãã§ã¬ã¸ã¹ã¿çªå·ãæå®
- ãªãã¡ãã£ã¦ã¬ã¸ã¹ã¿ãã·ã³
struct mruby_value
mruby C API
è¨èªã¨ãã¦ã®lua
- ã³ã³ãã¯ããåªå ã®ãããè¨èªã¨ãã¦ã®æ©è½ã¯å°ãªã
- rubyã£ã½ãæ¸ããã³ã³ãã¯ããªè¨èªã欲ããã¨ããã¢ããã¼ã·ã§ã³ããã£ã
移æ¤æ§
æ§æå¯è½æ§
ãªã³ã«ãªãã·ã§ã³
- ã³ã³ãã¤ã©ã®æé¤ãã§ãã
- eval, loadè¦ããªãå ´å
- ã³ã¼ãçæå¨ã®æé¤
- äºåã³ã³ãã¤ã«
- bin/mrbcã使ã
- test/mrbtest ã§ã使ã£ã¦ãã
è¤éãªãã«ãæ¡ä»¶
- 種ã ã®ãã©ãããã©ã¼ã ãã³ã³ãã¤ã©ã¸ã®å¯¾å¿ãå¿ è¦
- ã¯ãã¹ã³ã³ãã¤ã«ãå¿ è¦
- rubyã³ã¼ãã®ã³ã³ãã¤ã«ããªã³ã¯ãå¿ è¦
- Ruby/Rake ã使ã£ããã«ãæ¹å¼ã«ç§»è¡ãã(2013å¹´1æé )
mrbgems
- ã©ã¤ãã©ãªã®çµã¿è¾¼ã¿ãã§ãã
- åçã«ãã¼ãããæ©è½ã¯ç¡ããã³ã³ãã¤ã«æã«ãªã³ã¯ãã
- ãã©ãããã©ã¼ã éä¾å
- mrubyã½ã¼ã¹ã³ã¼ãå¤ã®ã³ã¼ããæå®ã§ãã
- githubãæå®ãããã¨ãå¯è½
mgem
- gem install mgem ã§ç°¡åã¤ã³ã¹ãã¼ã«
- mrbgems ã管çã§ãã
- mgem update ããã°ããªã¹ããæ´æ°ã§ãã
- 使ãæ¹ã®ä¾
- mgem add mruby-env
- mgem config > build_config.rb
ã½ãããªã¢ã«ã¿ã¤ã
- GC
- ã¹ã«ã¼ããã
- å®è¡æéä¸ã«GCã®å ããå²å
- æ大åæ¢æé
- æãé·ãåæ¢æé
- ãªã¢ã«ã¿ã¤ã æ§ã®è©ä¾¡ææ¨
- çµã¿è¾¼ã¿ã®é åã§ã¯ãã¹ã«ã¼ããããããæ大åæ¢æéãéè¦ãããã¨ãå¤ã
- ãã¼ã¯ã¢ã³ãã¹ã¤ã¼ãGC
- mark phase 㨠seep phase ã«åããã
- mark phase
- top levelå¤æ°ã root ã«ãã
- æ°ç ã¤ãªãã«ã¢ã¯ã»ã¹ã§ãããªãã¸ã§ã¯ããæ¢ç´¢
- è¦ã¤ãããªãã¸ã§ã¯ãããã¼ã¯ãã
- sweep phase
- å ¨ã¦ã®ãªãã¸ã§ã¯ããæ¢ç´¢ããæ»ãã§ãããªãã¸ã§ã¯ããæ¹ä¿®ãã
- ä¿å®çGC
- Arena
- ã¤ã³ã¯ãªã¡ã³ã¿ã«GC
- ä¸ä»£å¥GC
- ã¤ã³ã¯ãªã¡ã³ã¿ã«ä¸ä»£å¥GC
- ã¹ã«ã¼ããã
太é½å çºé»ç®¡çã·ã¹ãã
- æ±èãããéçº
- 管çã¹ãã³ã10å¹´åä½ã¨é·ããããPCããå¯åé¨ã®å°ãªãæ©å¨ãæé©
- mrubyã使ã£ã¦ãããã¿ã¤ããå®è£ ãã
èªåæ©ã¡ã³ãã·ã¹ãã
- å¯å£«é»æ©ãããéçº
- ä¸å½ã®åä¼ç¤¾ãã³ã¼ããæ¸ãã¦ãã
- ruby -> rule based compiler -> cè¨èª ã«å¤æãã¦ä½¿ã£ã¦ãã
- ã¡ã³ããã³ã¹ã·ã¹ãã (ã¬ã·ã¼ãå°å)åãã«ãããã¿ã¤ããä½æãã
ruby対å¿ã¤ã³ããªã¸ã§ã³ãã«ã¼ã¿
- mrubyãæè¼ããã¨ãã¸ã«ã¼ã¿
æè²ç¨ãã¼ãã³ã³ãã¥ã¼ã¿
- GR-SAKURA ã«æ¶²æ¶ããã«ãè¼ãããã®
- ãã£ã¸ã«ã«ã³ã³ãã¥ã¼ãã£ã³ã°ãã§ãã
- arduino ã¨ãã³é ç½®äºæ
ã¢ã¸ã¥ã¼ã«è²ã
- mod_mruby
- Nginx
- mruby-uv
ãµã¼ãç¨éã§ã®mruby
ã¯ã©ã¤ã¢ã³ããµã¤ã
- mruby to JS converter
- llvmã使ã£ã¦ãã
- NaCl (native client)
- web browser ã§åããã®ã«åãã¦ãã
ãããã
- top levelã®å¶å¾¡ã«mrubyã使ã
ã¬ã´ ãã¤ã³ãã¹ãã¼ã
- ETããã³ã³ã§ä½¿ã£ã¦ãããã¼ã ããã
- ã¡ã¢ãªã64kBãããªãã®ã§ãã©ã¤ã³ãã¬ã¼ã¹ããã ãã§ã大å¤
- ã¡ã¢ãªã®å¢ãããã¼ã¸ã§ã³ãæè¿çºå£²ããã
MobiRuby
- iOSä¸ã§åä½ãã
Games
- ã²ã¼ã ã®ããã°ã©ã å
ã§å©ç¨ãã
- ä»ã®ã¨ãã lua ãå¤ã
- mrubyãæ¯é使ã£ã¦ã»ãã