13. æ¬æ¥ãç´¹ä»ããæ´»ç¨ãã¿ã¼ã³ åç´ç·¨: Ruby On Java ä¸ç´ç·¨: Java Meets Ruby ä¸ç´ç·¨: It's A Java World
JUDE-CRUD-API JUDE5ã§CRUDå³ããµãã¼ããããããã«APIãå ¬éããã¾ããããã£ãã試ãã¦ã¿ã¾ããããé¡æã¯ãããªãã¿ãã¡ã³ã¯ã·ã§ã³ãã¤ã³ã測å®ã¢ããªã§ããããã«ä»åã¯JRubyã使ããJUDE-APIã¨JRubyã®ç¸æ§ãä½æãã¾ãã ä»æ§ ä»æ§ã¯åºæ¬çã«ååã¨åãã§ãè¨æ¸¬çµæãååã¨åãã«ãªãã¯ãã§ãã 使ãæ¹ã¯ã¦ã¼ã¹ã±ã¼ã¹ã¨ERå³ãæãã¦ãã¦ã¼ã¹ã±ã¼ã¹ã¨ã¨ã³ãã£ãã£ããããã®ãã¿ã°ä»ãå¤ãã«DET/RETãªã©ã®è¦ç©ãã«å¿ è¦ãªæ å ±ãå ¥åãã¾ããï¼DET/RETã®è©³ç´°ã¯ååã®ã¨ã³ããªãåç §ãã¦ãã ããï¼ ååã¨ã®ä»æ§ã®éãã¯æ¬¡ã®éãã§ãã ã¦ã¼ã¹ã±ã¼ã¹ã¨ERå³ã使ã ååã¯ãã¦ã¼ã¹ã±ã¼ã¹ã¨ã¯ã©ã¹ã使ã£ã¦ãã¾ããããJUDEã®CRUDå³ã¯ãERå³ãå¿ è¦ã§ããã¨ãããã¨ã§ãã¼ã¿ã®ã¢ãã«ã¯ERå³ã§è¡¨ç¾ãã¾ããï¼ã¡ãªã¿ã«ERã¢ãã«ã¨ã¯ã©ã¹ã®ã¢ãã«ã¯ç¸äºã«å¤æã§ãã¾ãï¼ CRUD
JRubyã§ä¸¦åå®è¡ããã«ã¯ã³ããããã¨ãããã¨ã§ãsynchronizeãå©ç¨ããªãæ¹æ³ãç´¹ä»ããããããªã®âã話é¡ã str = '' max = 1000 (1..4).map{|e| Thread.new(e){|ti| max.times{ str % jruby tmp.rb System.java:-2:in `java.lang.System.arraycopy': java.lang.ArrayIndexOutOfBoundsException: null (NativeException) from ByteList.java:198:in `org.jruby.util.ByteList.append' from ByteList.java:189:in `org.jruby.util.ByteList.append' from RubyString.java:71
ååã®è¨äº http://d.hatena.ne.jp/n_shuyo/20070627/jruby ã§ã¯ãæ¢åã® Java ã¢ããªã±ã¼ã·ã§ã³ã JRuby(jirb) ã®ä¸ããèµ·åããã°ãã¡ããã© Ruby ã³ã³ã½ã¼ã«ä»ãã§èµ·åããç¶æ ã¨ãªãã稼åä¸ã® Java ã¢ããªã±ã¼ã·ã§ã³ã®å é¨ã対話çã«æä½ã§ãããã¨ãç´¹ä»ããã¦ããã£ãã ãã ããJRuby ã®æ¹ã« Java ã¢ããªã±ã¼ã·ã§ã³å ã®å種ã¤ã³ã¹ã¿ã³ã¹ãèªåçã«æ¸¡ã£ã¦ããããã§ã¯ãªãã®ã§ãç¡æ¹é ã§æä½ã§ããç¯å²ã¯éãããå¯è½æ§ãé«ããã¾ãã§ãã»ã¨ãã©ã®ã±ã¼ã¹ã§ã¯ãæ¯è¼çå°éã®æ¹ä¿®ã§ Ruby ããååã«æ¬ä½ããããããã¨ãã§ããããããªããã¨è¦è¾¼ãã§ããã ã¨ããããã§ãããå®è·µããã¹ããå ã® Blokus ã¢ããªã±ã¼ã·ã§ã³ã«ã¦ Ruby ã§æèã«ã¼ãã³ãæ¸ãã¨ããã®ã«ææ¦ãã¦ã¿ãã¨ããã確ãã«ãã®å ´åã«ã¤ãã¦ã¯å°éã®æ¹ä¿®ã§æåããã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}