ãæ鬱ãªåè ãã Squeak Smalltalk ã§
http://d.hatena.ne.jp/scinfaxi/20080527/1211919944 ã«è§¦çºããã¦ãhttp://d.hatena.ne.jp/hrkt0115311/20080527/1211891558 ã Squeak Smalltalk ã§æ¸ãã¦ã¿ã¾ããã
| ã¢ã³ã¹ã¿ã¼ãã¡ ã¹ãã«ç¾¤ æé«ã¬ãã« çµé¨å¤ãå¾ãæ¨ æçµã¬ãã«å°éã®æ¨ å²æã®æ¨ ã¬ãã«ãä¸ãã£ãæ¨ | ã¢ã³ã¹ã¿ã¼ãã¡ := #('ç¼ããã¦ãã³' 'å¼·ãã·ã£ããã³' 'ããããç¼ãä¸å¹´ç' 'æªäººãã¿ãç·' 'ãã»åè ' 'éã足ã®æ©ãã¢ã¬' 'ç¡é' 'ç ©æ©' 'æãããåç¬ã®ä¸ã®äºº' 'æããã¹ãºã¡ãã' 'åæ¢ãªã¯ãã³ãã' 'ä¿¡ããããªãç©' 'åè ã®å¸«å ' 'æµ®éããé§' 'æªçããã³' 'éã®æãç«' 'èªæã®ã«ã¹ã¿ã¼ãã¯ãªã¼ã ' 'ããã£ã±ãããç± æ' 'ã«ã¬ã¼å³ã®å ' 'å æ²¢ã ãã¯ä¸æµã®ç¾' 'è¥èãã¼ã¯ã®ã¢ã³ã¹ã¿ã¼' 'æ°ç·ã®å£ç¯' 'æ¢ é¨æã®è»ä¸¡ã®ããªã¤' 'æãããå¤' 'æ°å®¿ãããä½ã' 'ãããçºéãããã¼ãã' 'è²ã¡ãããã¯ãã¼' 'ãªããããªé°å²æ°' 'åãä»ããæ°é ' 'å¿ã³å¯ãææ'). ã¹ãã«ç¾¤ := #('ãè±è ã®è²·ãæ¹' 'éçã®è²·ãæ¹' 'æ¶ãã´ã ã®ä½¿ãæ¹' 'ã¡ã¢ã®åãæ¹' 'æ»æã«ä½¿ããªããã¨ããªãåªæ' 'è£çºã®æ©ãæ¹' '森ææµ´' 'çç²ã®å³' 'ããã¿ã®ã¿ãæ±ã®ä½ãæ¹' 'å覧æ¿ã®åãæ¹' 'éµä¾¿ç©ã®æå½æ¹æ³' 'ç«ã¡è©±ã®ã³ã' 'ç«ã®å¼ã³æ¹' 'ç¬ã®å¼ã³æ¹' 'ã«ã©ã¹ã®å¼ã³æ¹' '鳩å°ç¨è±éç ²' 'ç§å¯ã®è¶£å³' 'éãèµ°ãã³ã' 'å£ã®ä½¿ãæ¹' 'æ§ã®ä½¿ãæ¹' 'ã¾ãããã§ãã¾ã£ããããã' 'èãªãç¥ã' 'å¤ç¬' '涼ããéããã³ã' 'ãæ´è½ã®ã³ã' 'åµããµãã£ã¨ç¼ãæ¹æ³' 'ãã¯ãã®ç ãæ¹' 'æ²¹æ±ãã®å¯¾å¿æ¹æ³' '大人ã®æ¯ãã¾ã' 'Suicaã®ä½¿ãæ¹' ). çµé¨å¤ãå¾ãæ¨ := '\*-----\{1}ãåããï¼\{2}ã®çµé¨å¤ãå¾ãã' withCRs. ã¬ãã«ãä¸ãã£ãæ¨ := '\åè ã¯{3}ã«ã¬ãã«ãä¸ãã£ãï¼\åè ã¯ã{4}ãè¦ããã\' withCRs. æçµã¬ãã«å°éã®æ¨ := '\åè ã¯ãã¾ããã¬ãã«ãä¸ãã£ãï¼\åè ã¯ããµã¨ç©ºãããè¦ããã\' withCRs. å²æã®æ¨ := '\\ããã¦ã\ããããããããã§ãå±±ããè°·ããã®åéºãç¶ãããå²æã\\' withCRs. World findATranscript: nil. æé«ã¬ãã« := 30. 1 to: æé«ã¬ãã« - 1 do: [:ã¬ãã« | Transcript show: (çµé¨å¤ãå¾ãæ¨, ã¬ãã«ãä¸ãã£ãæ¨ format: { ã¢ã³ã¹ã¿ã¼ãã¡ atRandom. ã¬ãã« factorial. ã¬ãã«. ã¹ãã«ç¾¤ atRandom}). (Delay forSeconds: 2) wait. Transcript show: å²æã®æ¨. (Delay forSeconds: 2) wait]. Transcript show: (çµé¨å¤ãå¾ãæ¨, æçµã¬ãã«å°éã®æ¨ format: {ã¢ã³ã¹ã¿ã¼ãã¡ atRandom. æé«ã¬ãã« factorial})
æ¸ãã®ã«ä½¿ã£ãã®ã¯èªåç¨ã«ã«ã¹ã¿ãã¤ãºãã Squeak3.9 ã§ãããumejava ããã Squeak開発者版 ã¨ãã¦å
¬éãã¦ãã ãã£ã¦ãããSqueak3.9-final-7075Jã ãSqueak3.9-final-7067J*1(Squeak 3.9.1-7075ãã¼ã¹)ã ã§ãåä½ãããã¨ã確èªãã¦ãã¾ãï¼Modbook/MacBook 2.4GHz ã§ãOS X 10.5 ããã³ Vista SP1 ã使ç¨ï¼ã
Squeak Smalltalk ã®ã¤ã³ã¹ãã¼ã«ã¯ãç°¡åã«ã¯ã¤ãã®æé ã§è¡ãªãã¾ãã
- umejava ããã® Squeak開発者版 ãã¼ã¸ãã Squeak3.9.1-final-7075J.zip ããã¦ã³ãã¼ã
- åããã¼ã¸ãããçµã¿è¾¼ã¿ã¯ã©ã¹ç¾¤ã®ã½ã¼ã¹ SqueakV39.sources.zip ããã¦ã³ãã¼ã
- http://squeakland.jp/developer/ ããâãã¹ãOSâç¨ã® Squeak VM ããã¦ã³ãã¼ã
- 以ä¸ãå±éãã¦ãããããã®å 容ã Squeak3.9J ãªã©ã¨åä»ãããã©ã«ãã«ã¾ã¨ãã
Squeak3.9.1-final-7075J.image ã Squeak VMï¼.app ã .exeï¼ã«ããããã¤ã³ããã¨ãSqueak ç°å¢ãèµ·åãã¾ããã¹ã¯ãªããã®å®è¡ã¯ããã¹ããå
¥åã§ããå ´æã§ããã°ã©ãã§ãã§ãã¾ãããé常ã¯ãSqueak ç°å¢ã®ãã¹ã¯ãããã«ç¸å½ããé åãã¯ãªãã¯ãã¦ãããã¢ããããã¡ãã¥ã¼ãããéãâ¦ãâãã¯ã¼ã¯ã¹ãã¼ã¹ããé¸ãã§âæ¸ãæ¨ã¦ç¨ã¡ã¢âã¦ã¤ã³ãã¦ãå¼ã³åºãã¦ä½¿ãã¾ããä¸ã®ã¹ã¯ãªãããã³ãã¼ï¼ãã¼ã¹ããã¦ããæ¹ã㦠commandï¼Win ã§ã¯ alt ã¾ã㯠ctrl) + a ã§å
¨é¸æå¾ãcommand (Win ã§ã¯ alt ã¾ã㯠ctrl) + d ã§å®è¡ã§ãã¾ãã
Squeak ç°å¢ãä½æ¥ç¶æ ãä¿åããã«çµäºããã«ã¯ããã¹ã¯ãããã¡ãã¥ã¼ âãçµäºãâããããããé¸ã³ã¾ãã
ãã®ã»ããSqueak ç°å¢ã§ã§ãããã¨ã«ã¤ãã¦èå³ããæã¡ã®éã¯ãumejava ããã®ãèªç±èªå¨Squeakããã°ã©ãã³ã°ããããã¸ãåèã«ãªãã¾ãã®ã§ãããããã¾ãã
èªç±èªå¨Squeakããã°ã©ãã³ã°
- ä½è : æ¢ æ²¢çå²
- åºç社/ã¡ã¼ã«ã¼: ã½ãããªãµã¼ãã»ã³ã¿ã¼
- çºå£²æ¥: 2004/10
- ã¡ãã£ã¢: åè¡æ¬
- è³¼å ¥: 4人 ã¯ãªãã¯: 75å
- ãã®ååãå«ãããã° (58件) ãè¦ã
Squeak Smalltalk ã®å®£ä¼ã ãã§ã¯æ°ãå¼ããã®ã§ãä¸ã® Smalltalk ã¹ã¯ãªããã¨ã»ã¼åããã¨ããã Ruby åãã®é移æ¤çãã
#!/usr/bin/ruby -Ku class Integer; def fact; self < 2 ? self : self * (self - 1).fact end end class Array; def at_rand; self[rand(size)] end end ã¢ã³ã¹ã¿ã¼ãã¡ = ["ç¼ããã¦ãã³", "å¼·ãã·ã£ããã³", "ããããç¼ãä¸å¹´ç", "æªäººãã¿ãç·", "ãã»åè ", "éã足ã®æ©ãã¢ã¬", "ç¡é", "ç ©æ©", "æãããåç¬ã®ä¸ã®äºº", "æããã¹ãºã¡ãã", "åæ¢ãªã¯ãã³ãã", "ä¿¡ããããªãç©", "åè ã®å¸«å ", "æµ®éããé§", "æªçããã³", "éã®æãç«", "èªæã®ã«ã¹ã¿ã¼ãã¯ãªã¼ã ", "ããã£ã±ãããç± æ", "ã«ã¬ã¼å³ã®å ", "å æ²¢ã ãã¯ä¸æµã®ç¾", "è¥èãã¼ã¯ã®ã¢ã³ã¹ã¿ã¼", "æ°ç·ã®å£ç¯", "æ¢ é¨æã®è»ä¸¡ã®ããªã¤", "æãããå¤", "æ°å®¿ãããä½ã", "ãããçºéãããã¼ãã", "è²ã¡ãããã¯ãã¼", "ãªããããªé°å²æ°", "åãä»ããæ°é ", "å¿ã³å¯ãææ"] ã¹ãã«ç¾¤ = ["ãè±è ã®è²·ãæ¹", "éçã®è²·ãæ¹", "æ¶ãã´ã ã®ä½¿ãæ¹", "ã¡ã¢ã®åãæ¹", "æ»æã«ä½¿ããªããã¨ããªãåªæ", "è£çºã®æ©ãæ¹", "森ææµ´", "çç²ã®å³", "ããã¿ã®ã¿ãæ±ã®ä½ãæ¹", "å覧æ¿ã®åãæ¹", "éµä¾¿ç©ã®æå½æ¹æ³", "ç«ã¡è©±ã®ã³ã", "ç«ã®å¼ã³æ¹", "ç¬ã®å¼ã³æ¹", "ã«ã©ã¹ã®å¼ã³æ¹", "鳩å°ç¨è±éç ²", "ç§å¯ã®è¶£å³", "éãèµ°ãã³ã", "å£ã®ä½¿ãæ¹", "æ§ã®ä½¿ãæ¹", "ã¾ãããã§ãã¾ã£ããããã", "èãªãç¥ã", "å¤ç¬", "涼ããéããã³ã", "ãæ´è½ã®ã³ã", "åµããµãã£ã¨ç¼ãæ¹æ³", "ãã¯ãã®ç ãæ¹", "æ²¹æ±ãã®å¯¾å¿æ¹æ³", "大人ã®æ¯ãã¾ã", "Suicaã®ä½¿ãæ¹" ] æé«ã¬ãã« = 30 (1..(æé«ã¬ãã« - 1)).each{ |ã¬ãã«| print "\n*-----\n#{ã¢ã³ã¹ã¿ã¼ãã¡.at_rand}ãåããï¼\n#{ã¬ãã«.fact}ã®çµé¨å¤ãå¾ãã" print "\nåè ã¯#{ã¬ãã«}ã«ã¬ãã«ãä¸ãã£ãï¼\nåè ã¯ã#{ã¹ãã«ç¾¤.at_rand}ãè¦ããã\n" sleep 2 print "\n\nããã¦ã\nããããããããã§ãå±±ããè°·ããã®åéºãç¶ãããå²æã\n\n" sleep 2 } print "\n*-----\n#{ã¢ã³ã¹ã¿ã¼ãã¡.at_rand}ãåããï¼\n#{æé«ã¬ãã«.fact}ã®çµé¨å¤ãå¾ãã" print "\nåè ã¯ãã¾ããã¬ãã«ãä¸ãã£ãï¼\nåè ã¯ããµã¨ç©ºãããè¦ããã\n"
*1:Squeak3.9.1-final-7075Jâ¦ã®ééãã§ãããï¼ > umejava ãããâä¿®æ£ãã¦ããã ãã¾ããããããã¨ããããã¾ãã