ãæ¥æ¬ã§æåã®ããã«ã¼ãã¨å¼ã°ããåç°è±ä¸ãããæ±äº¬å¤§å¦åèªææã§IIJæè¡ç 究ææé·ããããªãããä»ã§ã第ä¸ç·ã®ããã°ã©ãã§ãããæã¡ã«ãªã£ãã®ã¯å±±ã®ãããªHappy Hacking Keyboardsãæããã®è åã§çµµãæããã¨ã趣å³ã¨ãã£ãããã¾ãããå½ç¶ã®ããã«æ®éã®ãçµµãã§ã¯ããã¾ããã§ããã
Lispã«ã¤ãã¦ã®ãããã誤解ã¨ããã®ä¸ã«ããã¡ãã£ã¨ããçå® ã¯ã¦ãªã®è³ªå: ããã°ã©ãã³ã°è¨èªã§æå¼·ï¼ã¹ã±ã¼ã©ãã«ï¼ãªã®ã¯ã Lispã ã¨æããã¾ãã http://jp.franz.com/index.html ãããã ä¸éã§ã¯ãã¤ãã¼è¨èªã®ããã§ãã ãªãã§ããããã ã«ã¤ããåçã®ããã¤ãã«ã¯ããLispãå°ãã ãããã£ã人ãããã¡ãªèª¤è§£ãã å«ã¾ãã¦ããããªã®ã§ãããããã¿ã«å°ã解説ãã¦ã¿ã¾ãã ãã ã誤解ãçããã®ã¯ããã£ã±ããããªãã®çç±ããã£ã¦ãå¾ã£ã¦ã㮠誤解ã®ä¸ã«ã(æ¡ä»¶ã¤ãã®)çå®ãå«ã¾ãã¦ãããã¨ãããã¾ãã ãã®ã¸ãã¾ã§ããå«ãã¦èãã¦ã¿ã¾ãããã以éãå¼ç¨ã¯åçããã§ãã Lispã¯ã¹ã¯ãªããè¨èª? ä¸æåã¾ã§ããããã®ã¹ã¯ãªããç³»ã®è¨èªã¯ãã¨ã¦ã¤ããªãé ããã®ãå«ãããæ大ã®è¦å ã§ããããæè¿ã®ã³ã³ãã¥ã¼ã¿ã¼ã®æ§è½åä¸ã§ããããRuby,Python,Li
LISPUSERLISPMEMOLisp is like a ball of mud - you can throw anything you want into it, and it's still Lisp. -- Anonymous Ruby æ¹é¢ã§ã¿ããããã¿ã«è§¦çºããã¾ããï¼Lisp ã¯ããã°ã©ããã«ãªè¨èªãª ã®ã§ãªã¼ãã¼ãããã°ã©ããã«ã§ãï¼ããã§ãªã¼ãã¼ãããã£ã¦ let ã defun ãªã©ã®æ§æãæ¬å¼§ãããªã㦠end ã«ã§ããã¦ã¿ã¾ããããï¼ 100 è¡ç¨åº¦ãç®æ¨ã«ãã©ã¤ãã¾ããï¼ä½¿ã£ãã©ã¤ãã©ãªã¯ CL-Yacc ã®ã¿ã§ãï¼ ã§ãããã£ãã®ããã¡ãï¼ #@suck-lisp defun fib (n) if (< n 0) (error "oops") elif (= n 0) 0 elif (= n 1) 1 else let x <- (fib (- n 1))
åå ã¯åãªãã¸ã§ã¯ãã®åºæ¬çãªç¹å¾´ãè¦ãã ãã§çµãã£ã¦ãã¾ã£ããä»åã¯ããããã³ã³ããã¹ãã¨ãã観ç¹ããè¦ã¦ã¿ããã ååã®ã¾ã¨ã å¼ã³åºãå¤å´ã®scopeblockä¸èº«æ»ãå¤ __send____send__ä¸å¯è½(ããããã³ã³ããã¹ããä¿åãã¦ããªã)å¯è½ä¿æããªãã¡ã½ããã®æ»ãå¤ Method[],callåç §ä¸å¯è½å¯è½ã¡ã½ããæ¬ä½ã¨selfã¡ã½ããã®æ»ãå¤ UnboundMethodä¸è½åç §ä¸å¯è½-æ¬ä½ã¡ã½ããã®æ»ãå¤ Proc[],call,yieldåç §å¯è½ä¸å¯è½closureProcã®æå¾ã®å¤ Continuation[],call-ä¸å¯è½ãç¶ããæ»ããªã Proc#callã«ããã¦ãããã¯ä»ãã®å¼ã³åºããä¸å¯è½ã§ãããã¨ã¯ååã¯è¨è¿°ããªãã£ãã sshiããã«ãææããã ãã ã Procãä½æããã¨ãã«æå®ãããããã¯ä»®å¼æ°ã®è¨è¿°ã¯ãã¡ã½ããå®ç¾©ã®éã®ä»®å¼æ°ã®è¨è¿°ã«ã¨ã¦
Rubyã«ã¯ã³ã¼ãçã表ããªãã¸ã§ã¯ããè¤æ°ããã Method , UnboundMethod , Proc ã§ããã Continuation ã¯å°ãéããã©ãå®è¡ã³ã³ããã¹ããè¨æ¶ãã¦ãããªãã¸ã§ã¯ãã¨ããæå³ã§ã¯è¿ããã®ãããããã Ruby Way ãã«ã¯ããããããããããããã¨ã«ã¤ãã¦ãé©ãã»ã©ã®ãã¨ã§ã¯ããã¾ãããã¨æ¸ãã¦ããããã©ãç§ã¯é©ãããã§ãããããå¾®å¦ã«éãã®ã ãå°ã£ãããã ãããã便å©ãªã®ãããããªããã ããã§ä»åã¯ãããã®æ¦è¦ãçºãã¦ã¿ããã¨æãã æ®éã®ã¡ã½ãã defã§ã¡ã½ãããå®ç¾©ããã®ãä¸çªæ®éã ããªã class C def greeting(arg) puts "C#greeting reveived #{arg}" end def iterator yield 'iterator 1st' yield 'iterator 2nd' yield
ç´åå¹´ãããã¦è¨ç®æ©ããã°ã©ã ã®æ§é ã¨è§£é(SICP)ãèªã¿çµããã¾ããã ï¼éä¸ã§ãç·´ç¿åé¡ãã¹ãããããããã¾ãããã»ã»ã»ï¼ åå¹´ããããã®ã§ã¡ãã£ã¨ã ãæ¯ãè¿ã£ã¦è¦ã¾ãã SICPãèªãéç¨ã§å¾ããã® ã¾ãã¯SICPãèªãéç¨ã§å¾ããã®ãããã£ã¨åæãã¦ã¿ããã æ§æ解æãç解ãèªåã§å®è£ ã§ããããã«ãªã£ã åå¥è§£æãç解ãèªåã§å®è£ ã§ããããã«ãªã£ã ã¹ããªã¼ã ãç解ãã é 延è©ä¾¡ãç解ãã æç¶ãã first class objectã§ããè¨èªã§ã®èãæ¹ãå¦ãã åå¤æã®å°å ¥ã®åæ©ã¨ãã®æå³ãç解ãã æç¶ãã®æ½è±¡åã®å°å ¥ã®åæ©ã¨éç¨ãå¦ãã é«éé¢æ°ã使ã£ããæ¸ããããã«ãªã£ãããã ã¯ãã¼ã¸ã£ãç解ãã Schemeãæ¸ããããã«ãªã£ã å帰å¦çãèªç¶ã«æ¸ããããã«ãªã£ã ãã«ã¹ã¯ã©ããã§ã¤ã³ã¿ããªã¿ãæ¸ããããã«ãªã£ã ã³ã³ãã¤ã©ãèªåã§æ¸ããã¨ãåºæ¥ããã ã¨ã®æ触ãå¾ã
James Goslingã®ããã°ã«æ¸ããã¦ãã話ã ãï¼å ã¯Guy Steeleã®è©±ãããï¼ http://blogs.sun.com/jag/entry/the_black_hole_theory_of ãã£ã¨è¨³ãã¨æ¬¡ã®ãããªæããï¼ Lispã¯ãã©ãã¯ãã¼ã«ã ï¼ããLispã§ã¯ãªãä½ããï¼Lisp風ã«è¨è¨ãããã¨ããã¨ï¼è¨è¨ã®å¼åãããããã©ãã¯ãã¼ã«ã«å¼ãè¾¼ããã¨ããããã ããï¼ããã¦ï¼ããã¯Lispã«ãªããã ï¼ Jamesã¯ä¾ã®ã¯ãã¼ã¸ã£ã®ææ¡ã«é¢é£ãã¦ãã®è©±ãæã¡åºãã¦ããï¼æå³ãæ£ããèªã¿åãã¦ããªããããããªããï¼ãã¨ãã°Lispã¯ç°¡ç´ ã§ãã¬ãã·ãã«ãªè¨èªã§ãããªããç¾å¨ã»ã¨ãã©ä½¿ããã¦ããªãçç±ã¯ï¼ãã®å¼·åãããã«è¨èªãéåå´©å£ãèµ·ããã¦ãã¾ã£ãããã§ï¼Javaè¨èªã«ããã¦ãã¯ãã¼ã¸ã£æ©è½ã®è¿½å ã¯ãã®ãããªå±éºãããã¨ããææã ã¨ç解ããã°ããã®ãï¼ï¼ãã²ã³ã¡ã³ãããããã
åã®ã¨ã³ããªã¼ã§ãã£ã¦ãããã¨ã CLOS ã®ãè£å©ã¡ã½ãããã§ããããããããã·ã³ãã«ã«æ¸ãã¦ãã¾ãã¨ããªãã ããf ãããã®ã¾ã¾å®ç¾©ãã¦æã¤ããã«ãããã¨ã¸ã®è±åæãéã ã¡ã¾ãã(^_^;)ã (defmethod f ((n integer)) (cond ((= n 1) 1) ((evenp n) (f (/ n 2))) ((oddp n) (f (+ (* 3 n) 1))))) (defmethod f :before ((n integer)) (setq steps (1+ steps)) (setq upto (max upto n))) (defmethod g ((n integer)) (setq steps 0) (setq upto n) (f n) (list steps upto)) (defmethod h ((n integer)) (let ((r
å æã®æ«ã«Groovy-1.0-jsrãå ¬éãããã¿ããããªããã®ãããªãã¨ãç¥ã£ã¦ããã®ãã¨ããã¨ãæè¿Groovyã調ã¹ã¦ããããã Groovyã¯å»å¹´ã®3æããä¸åº¦ãã§ãã¯ãã¦è¯ãæ触ãæã£ã¦ããã®ã ããã©ãå½æGroovyã使ç¨ãã¦è¡ãäºå®ã ã£ãä»äºããã£ã³ã»ã«ã«ãªã£ããã¨ã¨ãå½æ使ç¨ãã¦ãããã¼ãPCãã¯ã©ãã·ã¥ãã¦ææç©ã失ããã¦ãã¾ã£ããã¨ãããããªãã¨ãªãçé ã«ãªã£ã¦ããã ãã¯ã¯ãã¨ãã¨Lispã§ããã°ã©ã ãæ¸ãã®ã好ã¿ã ã£ãã®ã ããã©ã大è¦æ¨¡ããã°ã©ã ãLispã§æ¸ãã®ãããªããã©ã¤ãã¨ãæããéçåã¨ã¢ã¸ã¥ã¼ã«åæ©è½ã«æå¾ ãã¦OOPã«ç§»ã£ã¦ããããã C++ã§ã¯ãã¡ã¢ãªç®¡çãè¤éã§ãããã¨ã«ãã(ãã°ãåºãããä¸ã«)èå¿ã®(æ¬æ ¼çãª)OOPãé£ãããã¨ããåé¡ãããããã®ä¸OSãããã«ã¦ã§ã¢å±¤ã®æ¨æºAPIãç¨æããã¦ããªããã¨ããåé¡ãããæ¥åã«å©ç¨ããã®ã«ã¯ææå°æ©ã¨
http://www.fobj.com/hisa/diary/20060514.html#p02 ããã¯ä¾¿å©ãé ãã¾ããï¼ ;; çµæ表示 (define (displayln v) (display v) (newline)) (define (displayln-kv k v) (display k) (display ": ") (displayln v)) è¿½è¨ g:sicp:id:hyukiãããããã©ãã¯ããã¯ãé ãã¾ããã define-syntaxãå©ç¨ãã debug ã¨ããæç¶ããç´¹ä»ããã¦ãã¾ãã define-syntaxã£ã¦é¢ç½ãã§ããã http://sicp.g.hatena.ne.jp/hyuki/20060515/debug ããã«è¿½è¨ Gauche release 0.7.3ããã`.gaucherc'ã¯goshãã¹ã¯ãªããã¢ã¼ã㧠起åãããæã¯èªã¾ã
id:onishi:20060512#p1ãåèã«Gauche ã¦ã¼ã¶ã¼ãªãã¡ã¬ã³ã¹ã®HTML Helpãä½ãã¾ããã gauche-chm-20060512.zip (ç´1MB) éãã»ç°¡åã«æ¤ç´¢ã§ããã®ã§ã¨ã¦ã便å©ã§ãã è¯ãã£ãããå©ç¨ãã ããã åè Gauche - A Scheme Interpreterã«ã¦2006/05/12æç¹ã«å ¬éããã¦ããæ¥æ¬èªçãDownload tar+gzipped htmlsããå©ç¨ãã¦ä½æãã¾ããã ãã¼ã«ã§ç®æ¬¡ãçæããé½åã§ãªãªã¸ãã«HTMLã®titleã¿ã°ãããGauche ã¦ã¼ã¶ãªãã¡ã¬ã³ã¹: ãã¨ããæååãåé¤ãã¾ããã ãã¼ã«ã§å¤æããéã®é½åã§æåã³ã¼ããUTF-8âShift_JISã«å¤æããmetaã¿ã°å ã®CharsetãShift_JISã«æ¸ãæãã¾ããã gauche-refj_1.htmlãªã©ãInternet Ex
Shiro Kawai ã¾ã ä¸æ¸ã Schemeã®ç¹å¾´ããããã¨ãã«ããç¶ç¶ãããcall/ccããåºã¦æ¥ãªããã¨ã¯ãªãã ã§ããR5RSã®call/ccã®é ããããèªãã§ããã©ããããããããªãã call/ccã使ãã°Cè¨èªã®breakã¿ãããªã®ã¨ããã³ã«ã¼ãã³ã¨ããã ã¹ã¬ãããã©ãã¨ããæ¸ãããã¨ããã®ã¯ããã£ããã©ãä¸ä½ããããã®ãæ¸ã㦠ä½ãå¬ããã®ãããããã¨ãããã³ã¨æ¥ãªããã ã ä»ãããã«ããç¶ç¶ ããã°ã©ãã³ã°ã®ä¸çã®æ¦å¿µã«ã¯ãç¦ ã®å ¬æ¡ã®ãããªãã®ãããã ããã説æããæç« ã¯ã»ãã®ä¸æãªã®ã«ãæåã«ç®ã«ããæã ãã®æã¯å ¨ãæå³ããªããªããæå·ã®ããã«æããããã ã ãã²ã¨ãã³ãã®æ¦å¿µãç解ããã¨ã ãã®æ¦å¿µã®èª¬æã¯ç¢ºãã«ãã®ä¸æã§èª¬æããã¦ããã®ããããã®ã ã ãããªããåããã°åãããã¨ããç¦ åçã®ä¸ã§ã ãç¶ç¶ãã¯æãè¬ããããã®ã®ä¸ã¤ã¨è¨ããã ããã æç®ã
Quack 㯠Emacs ç¨ã®é«æ©è½ãª Scheme ã¢ã¼ãã§ãã Scheme æ¸ãæã¯å¤§æµã³ã¬ä½¿ã£ã¦ã¾ãã (PLT Scheme ã ãã¯éå±ã®ã¨ãã£ã¿ä½¿ãã¾ãã) Quack for Emacs æ§ã 㪠Scheme å¦çç³»ã«å¯¾å¿(Gauche ããã£ãã¼) ããã¥ã¢ã«ãèªãæ©è½ããã SRFI ãèªãæ©è½ããã è¦ãç®ããããããlambda ã λ ã¨è¡¨ç¤ºãããã¨ã ã¤ã³ã¹ãã¼ã«ãç°¡å(ã¡ãã¥ã¼ãããã¦ã¹ã§ã»ã¨ãã©é¸ã¹ã) rlwrap ã«ãã readline æ¯æ´ for Gauche ã·ã³ãã«ãä¿¡æ¡ã® Scheme ã«ãã£ã¦ï¼æ£è¦è¡¨ç¾ãæ¨æºè£ åï¼ã©ã¤ãã©ãªãçµæ§å å®ã¨ï¼ä½æ ã Common Lisp ããå¿«é©ãªå¦çç³» gauche ã ãï¼ã¾ã è¡ç·¨éãã³ãã³ããã¹ããªæ©è½ãç¡ãï¼Emacs ãã使ãæã¯ãã¾ãå°ããªãã®ã ãï¼ãã¯ãåç¬ã§åããã¨ãã¯è¡ç·¨éæ©è½ãããã¯æ¬²ããâ¦
æ績ã«ã¤ã㦠Schemeã®æ績ã¯ã¬ãã¼ãã®ã¿(åºå¸ã¯åããªã) ã¬ãã¼ãã¯å®å ¨ã«ã§ãã¦ããªãã¦ãæåºã§ããåããããªãã«è©ä¾¡ãã 課é¡ã«ã¤ã㦠æåºã¯ hara2001-scheme ï¼ ui.is.s.u-tokyo.ac.jp ã¸ã¡ã¼ã«ã§éã£ã¦ãã ãã éä¿¡ãããE-mailã«å¯¾ãã¦èªåçã«è¿ä¿¡ã¡ã¼ã«ãéããã¾ã æ·»ä»ãã¡ã¤ã«ã§ã¯ãªãã¡ã¼ã«æ¬æã«ç´æ¥è²¼ã£ã¦ãã ãã (ãã ãã©ããã¦ãæååããã¦ãã¾ã人ã¯ããã¹ããã¡ã¤ã«ãæ·»ä»ãã¦ãã ãã) Subject㯠"Report (課é¡çªå·) å¦ç証çªå·" ã§éã£ã¦ãã ãã ä¾: Report (1) 123456 課é¡ã®æ¬æã®å é ã« Schemeæ¼ç¿ 第1åã¬ãã¼ã çç§Ié¡2å¹´ 123456 é æ¨ ç°å¤¢ ã¨ããå½¢å¼ã§ååçãæ¸ãã¦ãã ãã ç· ãåãã¯æ¬¡ã®Schemeæ¼ç¿ã®åæ¥ ææ¥ã§åºé¡ããåã«èª²é¡ãæåºãã¦ããã¾ãã¾ãã (質åãå
ãç¥ãã
é害
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}