Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
Clojureã®ããããªä¸¦è¡å¦çã®ä½¿ãåã Clojureã«ã¯æ¨æºã§ãagentç³»ã®send, send-offã«å ããfutureé¢æ°ã¨ããã¹ã¬ããèµ·åç³»é¢æ°ãããã¾ãã core.asyncã®ç»å ´ã§ãããã«goãã¯ãã¨threadãã¯ããå ããã¾ããã ãããã¯ãã¹ã¦ãèå¾ã§ã¯Javaã®Executorsã使ã£ã¦ã¹ã¬ãããã¼ã«ãä½ããä¸åº¦çæããã¹ã¬ããã®åå©ç¨ãè¡ãã¾ããããããã使ã£ã¦ããã¹ã¬ãããã¼ã«ãç°ãªãã¾ããããã«é¢æ°èªä½ã®æ©è½ãç°ãªããããã©ããã¤ãã£ããããã®ãè¿·ã£ã¦ãã¾ããã¨ãããã¾ãã èªåç¨ã«æ´çããã®ã§ãã¡ã¢ã¨ãã¦ããã¦ããã¾ãã IOãã¦ã³ãã¨CPUãã¦ã³ãã¾ããClojureã®ã¹ã¬ããé¢é£é¢æ°ã®ç¨éã¯ã大ãã2種é¡ã«ããããã¾ããããããIOãã¦ã³ãã¨CPUãã¦ã³ãã§ãã IOãã¦ã³ããªå¦çã¯ãå®è¡ä¸ã®å¦çãCPUãããIOå¦çã«å¼·ãä¾åãã¾ããDBã¢ã¯ã»ã¹
iOSã¢ããªãä½ãå ´åãblocksã使ãéåæå¦çå¾ã«ViewControllerãªã©ã§ãã®å¦çã®å®è¡å 容ããä»»æã®å¦çãå®è¡ããå ´åããã£ããSwiftã§ã¯ã¯ãã¼ã¸ã£(closures)ã使ãåããããªå¦çãè¡ãããã®å®ç¨çãªæ¹æ³ãæ¸ãã¦ããã ã·ã³ãã«ãªã¯ãã¼ã¸ã£ã®è¨è¿° ã¾ãã¯ãã¼ã¸ã£ã®è¨è¿° override func viewDidLoad() { //ã¯ãã¼ã¸ã£ let example = { println("exampleãããã"); } request(example) request({ println("ãã®ã¾ã¾æ¸¡ããã¨ãã§ããããã®") }) } //ã¯ãã¼ã¸ã£ãå¼æ°ã¨ãã¦æ¸¡ãããã¡ã½ãã func request(completion: () -> ()) { //渡ãããã¯ãã¼ã¸ã£ãå®è¡ãã completion() //ãããããã¯ã¯ãã¼ã¸ã£completio
val is better than Java's final? JavaScript hoisting var r = double(1) + triple(1); function double(x) {return x * 2;} var triple = function(x) {return x * 3;} Throws: java.lang.NullPointerException at Vals.<init>(Vals.scala:2) Simplified class Vals { println(answer) private[this] val answer = 42 } Prints... 0 return in lambda def samples(xs: TraversableOnce[Int]) { xs map {x => return x * 10} for
æ¦è¦ Clojureã§ãã¼ã¿ãã¤ãã³ã°ã«å¿ è¦ãªåææ³ã解説ããè¨äºã§ãã æ¬è¨äºãèªãã¨ãå ¨ãClojureãç¥ããªãæ¹ã§ã ãã¼ã¿æ½åºã»éè¨ å¯è¦å æ©æ¢°å¦ç¿ï¼æ±ºå®æ¨ãã©ã³ãã ãã©ã¬ã¹ããk-meansã¯ã©ã¹ã¿ãªã³ã°) ãClojureã§å®è¡ã§ããããã«ãªãã¾ãã ã¯ããã« Clojureã¨ã¯JVMä¸ã§åãï¼ã¤ã¾ãOSãåãã沢山ã®ç°å¢ã§åãä¸ã« Javaè³ç£ããã®ã¾ã¾ä½¿ããï¼Lispç³»ã®è¨èªã§ãã Clojureã§ã¯ãã¼ã¿ãã¤ãã³ã°ãè¡ãéã Incanterã¨clj-mlã¨ãã2ã¤ã®ä¾¿å©ãªãã¼ã«ãããã¾ãã Incanterã¯çµ±è¨å¦çç¨ã®å°éã©ã¤ãã©ãªã§ã åä½ã§æ§ã ãªçµ±è¨åæãè¡ã£ããéè¨ã便å©ã«ãããããæ©è½ã沢山ç¨æããã¦ãã¾ãã clj-mlã¯wekaã¨ããæ©æ¢°å¦ç¿ç³»ã®ãã¼ã«ãClojureã§ç°¡åã«ä½¿ããããã«ããã©ããã¼ã§ã 決å®æ¨ãã©ã³ãã ãã©ã¬ã¹ããªã©ã®åé¡å¨ã å種ã¯
Clojureã®protocolå®è·µ èªç¤¾éçºã§ã¯Clojureãä¸å¿ã«ä½¿ã£ã¦ãã¦ãã¦ã¼ã¶ã¼ãå¢ãã¦æ¬²ããæ°æã¡ããã£ã¦ãClojureã®ããã¹ãçãªãã®ãæ¸ãã¦ãã¦ã¯æ«æããªã©ãç¹°ãè¿ãã¦ã¾ãããããªããªãã®ã§ãããã¹ãã®ãã¨ã¯æ°é·ã«æ§ãã¦ãéçºä¸ã«æ°ãã¤ãããã¨ã¯ã©ãã©ãããã°ã«æ¸ãã¦è¡ããã¨æãã¾ãã æå§ãã«ãæè¿ãã£ã¨ãå®ç¨çãã¨ããæå³ã§ä½¿ããããã«ãªã£ãããªã¼ã¨æãããããããã³ã«ãã«ã¤ãã¦ã Clojureã®ãããã³ã«ã¯ãJavaã§ããã¨ããã®Interfaceã®ãããªãã®ã§ããåå称ã¨é¢æ°å®ç¾©ã ããæãããã®ã§ããdefprotocolã«ãã£ã¦ãããã³ã«ãå®ç¾©ãããã¨ãã§ãã¾ãã Javaããã°ã©ãæ´ãé·ãã®ã§ãã¾ãInterfaceãªãä½è£ã ãªãã¨æ§ãã¦ãã¾ããããæå¤ã¨ä½¿ãæ¹ãé£ããã以ä¸ãJavaããã°ã©ãçæè¦ã§ãããã³ã«ã使ãã¨ä½¿ãã«ãããªããããªãç¹ã«ã¤ãã¦æ¸
ä½ããããã®: ããã°ã©ãã³ã°è¨èªã®ã³ã¢æ¦å¿µãå¦ã¶ãµã¤ãããã®2ã®ç¶ç·¨ã ãã©ã¦ã¶ã®ä¸ã§å¯¾è©±çã«LISPã®ã³ã¼ããå®è¡ã§ãããµã¤ããä½ãã¾ããã http://nhiro.org/learn_language/LISP-on-browser.html ç¾ç¶ã§ã¯ã¾ã 説æã足ããªããããLISPãã¾ã ã¾ã£ããç¥ããªã人ããã®ãµã¤ããè¦ã¦ç解ã§ããããã«ãªããã¨ããã¨ãããã§ã¯ãªãã TODO ãµã³ãã«ã³ã¼ãã1æ©ãã¤å¦ã¹ãç²åº¦ã§ç¨æãã ããªã¼ã®ãªã¢ã«ã¿ã¤ã å¯è¦åã®ã³ã¼ãã¨ãã£ã¤ãã see æ§ææ¨ãå¯è¦åãããµã¤ããä½ã£ã ã³ã¼ããªã¼ãã£ã³ã°ã®ããã®è§£èª¬ãæ¸ã é¢é£è¨äº ãã©ã¦ã¶ä¸ã§æ¼ç®åã®åªå é ä½ã¨çµåæ§ãå¦ã¶
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}