2010-01-01ãã1å¹´éã®è¨äºä¸è¦§
ä»å¤ã¯ãå¹´ã«ä¸åº¦ã® W. V. Quine ã®å½æ¥ã¤ãã§ãã %;';;X= %q(x=1; z="%c"% 32;eval %w(w=N= Merry =128;r= z*79+$/; ;p=open" / dev/dsp ","w"rescue$_;/ / ;eval"s rand(%s)"%$*[ d=0];a=[];s=(r+z+% (%;';;X=#{z* 3}%q(#{X});e val(X)) +r*=23).l ines.mâ¦
ãã®è¨äºã¯ Functional Ikamusume Advent Calendar jp 2010 ã«ãã£ã¦ä¾µç¥ãããã§ã²ã½ã ä»å㯠Ruby ãä¾µç¥ããã§ã²ã½ãã¾ã㯠gem ãã¤ã³ã¹ãã¼ã«ããã§ã²ã½ã $ gem install ikamusume Hello, world ã§ã²ã½ã # coding: utf-8 # ruby examples/hello.ikamâ¦
ã¯ã¦ãªã«ä½ãåé¡ãèµ·ãã¦ãèªåã®æ¸ããæ¥è¨ãå ¨é¨æ¶ãããå°ãããªããããã¯ã¢ãããã¨ããªãã¨ãªããã¨æããªããããªããªãå®è¡ã§ãã¦ã¾ããã§ããã ããã¤ãã«ä¸å¿µçºèµ·ãã¦ããã¾ãããã¨ãã£ã¦ã ã¯ã¦ãªãã¤ã¢ãªã¼AtomPub ã®éãã«åå¾ãã¦ããã ãâ¦
縦軸ãæéã横軸ãã¿ã¹ã¯ã¨è¦ããããªã«ãã縦æ£ãå¤ããã°ãåæã«å®è¡ããæ§ã表ãã¦ããããªã«ãã横æ£ãå¤ããã°ãã¿ã¹ã¯å士ãéä¿¡ããªããå®è¡ããæ§ã表ãã¦ããã è¡ã¨åã®è¦ãæ¹ã®ãã¯ãªã§ãã 以ä¸ä½è«ãã¿ã¤ã ã·ã§ã¢ãªã³ã° *1 ã®ãã¨ã concurreâ¦
Qlobe ãå ¬éããã¨ãããæå¿ã®äººãã¡ã Youtube åç»ã¨ã ã¢ãã¡ã¼ã·ã§ã³ gif ã¨ãã«ãã¦ããã¦ãããããªããããã¦ãã£ã±ãåç»éè¦ã ãªãã¨æãã¾ããã ããã§ãQuine ãªåç»ãã¡ã¤ã« qvi ãä½ãã¾ãããqng ã qif ã®ä»²éã§ããæ¸ãã¦ããã³ã¼ããå®â¦
RubyKaigi 2010 ã® Chad Fowler å 輩ã®åºèª¿è¬æ¼ã§ãbrainfuck ã®ç½®æè¨èªã®ä»£è¡¨ã§ãã Ook! ãç´¹ä»ããã¦ã¾ããã Ook! ããã°ã©ã ã£ã¦ã±ã£ã¨è¦ã㨠Ruby ã®ã³ã¼ããã£ããã§ããããOok. Ook! Ook. Ook? ã£ã¦ããã Ook.Ook!(Ook.Ook?) ãããªãã§ãããå®â¦
RubyConf ã«åå ããããã«ã¯ããã£ã±ã å±±æ quine ã¿ããã«æ±äº¬éå®ãã¿ã¯éãã«ããã§ãããããããã㯠Quine ãã°ãã¼ãã«ã§ãªãã¨ãããªãã¨æãã¾ããã ã§ãä¸ççã«æåãªç°ç¶ç·ã¨ãç¥ããªãã®ã§ãä¸ççã«æåãªåããã®ãæ¸ãã¦ã¿ã¾ããã v=000â¦
è¶ çµ¶æå·§ Ruby ããã°ã©ãã³ã°ã®è³ªçã§ãã©ããã£ã¦é³ãé³´ããã¦ããã®ããã¨ãã質åããã£ãã®ã§ãèªåã®ããã®è¨é²ãå ¼ãã¦ç°¡åã«ç´¹ä»ã ã¨ãã£ã¦ã Linux Sound programming with OSS API ã«ããéããRuby ã§æ¸ãã¨ãããªæãã # ããã©ã«ãã§ã¯ 8bit â¦
åå ãã¦ã¾ããã ãè¶ çµ¶æå·§ Ruby ããã°ã©ãã³ã°ãã®çºè¡¨è³æã¨ãçºè¡¨ã§ä½¿ã£ãã½ã¼ã¹ã³ã¼ãã以ä¸ã«ç½®ãã¦ããã¾ãã ref: http://dame.dyndns.org/misc/rubykaigi2010/rubykaigi2010-endoh.ppt ref: http://dame.dyndns.org/misc/rubykaigi2010/rubykaigiâ¦
ä»ææ«ã® RubyKaigi 2010 ã§ããè¶ çµ¶æå·§ Ruby ããã°ã©ãã³ã°ãã¨ããçºè¡¨ãããäºå®ã§ãã2 æ¥ç®ã® 13:30-14:00 ã大ãã¼ã«ã§ã®çºè¡¨ã§ãã主ã«ãã®ããã°ã§ç´¹ä»ãã¦ããã³ã¼ããã¡ãç´¹ä»ããäºå®ã§ãããã®èæ¯ã®æå¤ãªæ·±é ããããããå¯è½ã«ãã Ruby ã®â¦
å wonderfl ã§ä½ã£ãã²ã¼ã ã§ãã ref: http://wonderfl.net/c/rx2A
è¬ã®å¶ç´ã®ããå¸æ±ºãã²ã¼ã ã§ãã ref: http://wonderfl.net/c/wcnb ã«ã¼ã« ç°æ§ãåããåãããã«åº§ããã¦ãã ãã å·¦ããè©°ãã¦åº§ãã¾ã åãã°ã«ã¼ããéè¤ãã¦ä½¿ãã¾ã ç·å¥³ã®äººæ°ãä¸è´ããããã¼ãã£éå§ (ã¯ãªã¢) ã§ã æä½æ¹æ³ãªã© ä¸ 3 ã¤ã®ã°ã«â¦
æ°åãã¾ããªããæ¶ããã¨æãã ä»»æã® Ruby ããã°ã©ã ãã¢ã«ãã¡ãããã¨æ°åã ãã«ããããã°ã©ã ã¨ãµã©ãã¨è¨ããã¦ããã®ã ããã©ãæãã¤ãã®ã«ããªãè¦å´ãã¾ããããªãã¨ã 2 ã¤ã®æ¹æ³ãè¦ã¤ããã åºé¡ãã 1 å¹´å以ä¸çµã£ã¦ããã®ã§ã以ä¸ã«ã¼ãâ¦
ref: http://icfpcontest.org/ä»åã®èª²é¡ã¯è¿å¹´ç¨ã«è¦ãé¢ç½ãã§ãããè¦ç´ããã¨ãããªèª²é¡ã è»ã¨ãã®çæãéçºãã¦ãå¸å ´ã«æå ¥ããã å¸å ´ã«æå ¥ãããè»ã®è¨è¨æ¸ã¯åå è å ¨å¡ã«å ¬éããããçæã®è¨è¨æ¸ã¯å ¬éãããªãã ä»ç¤¾ã®è»ã®è¨è¨æ¸ã解æãã¦ãâ¦
Ruby/Tk 㧠quine ã eval$s=%q(require"tk" r=Tk.root;r.withdraw x=y=22;s="eval$s=%q(#$s)" f=proc{c=s.slice! 0,1 (f[y+=x=22];next)if"\n"==c w=TkToplevel.new(r){ withdraw geometry"18x18+#{x}+#{y}" overrideredirect true bind"Button",proc{exit}â¦
ããããã° C 㧠quine æ¸ããè¦ãããªããªã¼ãã㨠Linux ã®ã«ã¼ãã«ã¢ã¸ã¥ã¼ã«æ¸ãã¦ã¿ãããªã¼ãã¨æã£ãã®ã§ãç·´ç¿ã¨ã㦠Linux ã®ã«ã¼ãã«ã¢ã¸ã¥ã¼ã«ã§ quine ãæ¸ãã¦ã¿ã¾ãããref: http://github.com/mame/kernel-mode-quineãã«ãæ¹æ³ãã¾ããç°å¢â¦
ref: æªæ¥ã®å½ã®ã¢ãªã¹ - d.y.d.ã§ç´¹ä»ããã¦ãã implicit future ã Ruby ã«æ¬²ããï¼ # promise ãä½ã x = Promise.new a = [1, x, 2, x, 3, x] # ä»ã¯ã¾ã å¤ã«ãªã£ã¦ããªã p a #=> [1, _promise_, 2, _promise_, 3, _promise_] # ãã® promise 㯠42 ã«â¦
ãã®è¨äºã¯ Quine Advent Calender 2014 ã® 103 æ¥ç®ã«ãªãã¾ãããref: http://gihyo.jp/dev/column/01/prog/2010/aprilfool2010-01 ref: http://route477.net/d/?date=20100402#p01 ã§ç´¹ä»ããã¦ãã yhara ããä½ã®è¨èªã§ quine ãæ¸ãã¾ããã 以ä¸ã®ãâ¦
ã¨ã¤ããªã«ãã¼ã«ã®é£ãã§ããå¯è½æ§ãæããç¥ç¦ã®ã³ã¡ã³ããªã©ããããã¿ãªãããããã¨ããããã¾ãããã¨ã¤ããªã«ãã¼ã«å¾ã«ãããã¿ãªããããããã¨ããããã¾ããã å¼è¶ã㧠IP unreachable ã«ãªã£ãããã«ããã«è¿äºãã§ããªãã¦ãã©ãããç¶æ ã§ãâ¦
å ¥ç±ãã¾ããã
3/13 ã«ã¯ã常ç£ç·ãæ©ãã¾ãããå»å¹´ã® 8 æã¶ããåé¨é§ ããæ°´æ¸é§ ã¾ã§ãç·è·¯ã®è·é¢ã§ 16.5 km ãæ©ãã®è·é¢ã§ 20.5 km ã大ããªå°å³ã§è¦ããã®ææãé¸ãã çç±ã¯ãéæ¥ 18 å符ã使ããã㨠(åé¨é§ ã¾ã§çé 2000 åãè¶ ãã) ã¨ãå楽åé§ ã®è¨æéæ¥ã®â¦
ç¿é±ã¯é¨ã ã£ãã®ã§ãç¿ã é±ã® 3/5 ã«ç¶ããä¸ç·çä¹ é§ ããäºäºé§ ã¾ã§ãç·è·¯ã®è·é¢ã§ 16.5 km ãæ©ãã®è·é¢ã§ 20.5 km ã大ããªå°å³ã§è¦ãä¸ç·çä¹ é§ ããã¹ã¿ã¼ããé§ åã«ã¯ãã¹ãå転ããåºå ´ (ãã¼ã¿ãªã¼ã¨ããã»ã©æ´åããã¦ããªã) ããããã¿ã¯ã·ã¼ã®å¶â¦
2/20 (å) ã«ãå°æ¹ééãæ©ãå§ãã¾ãããåç·¨ã¯æ¿ç·å島ã®çãä¸ã®ä¸ç·ä¸éé§ ãããä¸ç·çä¹ é§ ã¾ã§ãç·è·¯ã®è·é¢ã§ 22.7 km ãæ©ãã®è·é¢ã§ 29.3 km ã大ããªå°å³ã§è¦ãã¾ãã¯å°æ¹ééã«ä¹ã£ã¦ä¸ç·ä¸éé§ ã¸ãä¸ç·ä¸éé§ ã¾ã§ããåè»ãå°ãªããæä¸çªã§ã 8:â¦
ããã§ã @mametter ãªãã£ã»ã»ã»ï¼ RT @bonotake: quineã®ä½ãããããããããªâ¦ä½ããªããã© RT @masahiro_sakai: ã¸ã§ã¸ã§è¨èªããã http://bit.ly/d0RUUR http://twitter.com/masahiro_sakai/status/9091442089 brainfuck ã®å½ä»¤æåãç½®æããã ãã®ä¿ºâ¦
2/6 (å) ã¯ãæ±äº¬ã¡ããå代ç°ç·ãæ©ãã¾ããã代ã æ¨ä¸åé§ ããå綾ç¬é§ ã¾ã§ãç·è·¯ã®è·é¢ã§ 24.0 km ãæ©ãã®è·é¢ã§ 30.7 km ã大ããªå°å³ã§è¦ã代ã æ¨ä¸åé§ ããã¹ã¿ã¼ããä½å® è¡ã®ä¸ã«ãã£ã¦ãé§ åã¯åºããªããå·¥äºä¸ã ã£ãã å°ç°æ¥ã®ä»£ã æ¨å «å¹¡é§ ãéâ¦
1/30 (å) ã¯äº¬æåèç·ã»ååç·ãæ©ãã¾ãããååã®åèç·ã¯ãç·è·¯ã®è·é¢ã§ 12.9 km ãæ©ãã®è·é¢ã§ 15.3 km ã大ããªå°å³ã§è¦ã京ææ´¥ç°æ²¼é§ ãã¹ã¿ã¼ãã京æå¹å¼µæ¬é·é§ ã¨äº¬æå¹å¼µé§ ã¾ã§ã¯ç·æ¦ç·ã¨åãæãã®éã®ãã å¹å¼µé§ ã®å ããã¡ãã£ã¨é¢ããã ãã§â¦
1/23 (å) ã¯æ°äº¬æé»éãæ©ãã¾ãããç·è·¯ã®è·é¢ã§ 26.5 km ãæ©ãã®è·é¢ã§ 32.6 km ã大ããªå°å³ã§è¦ãæ°äº¬æé»éã¯äº¬æã¨ã©ãããé¢ä¿ãªã®ããã¾ãã¡ããããã£ã¦ãªãããã©ãã¨ãããã京ææ±ãã§ã«ã¦ã³ããã¦ãããå®ã¯ä»¥åæ¾æ¸é§ ããéä¸ã®äºé¦é§ ã¾ã§â¦
ã¾ãæºã¾ã£ã¦ãã¾ã£ãã1/16 (å) ã¯ãçãã«æ±èé«éééãæ©ãã¾ãããç·è·¯ã®è·é¢ã§ 16.2 km ãæ©ãã®è·é¢ã§ 21.9 km ã大ããªå°å³ã§è¦ã西è¹æ©é§ ãã¹ã¿ã¼ããç·æ¦ç·ãæ¦èµéç·ã京èç·ãæ±è¥¿ç·ã§æ¥ã西è¹æ©ããããã§æå¾ã ã¨æãã¨ææ ¨æ·±ããã¾ãè¿ãã®â¦
ref: http://github.com/mame/doublehelix/Hello, world! ããã°ã©ã ã require "doublehelix" AT A--T T---A G----C G----C G----C T---A G--C AT GC T--A G---C T----A A----T T----A G---C C--G AT CG A--T A---T C----G A----T G----C G---C G--C CG GC â¦
ãfunc() ã®å¸°ãå¤ã 1 ã¾ã㯠2 ã¾ã㯠3 ã®ã¨ããã¿ãããªãã¨ãæ¸ããããã¨ã¯ããããã¾ãã r = func() if r == 1 || r == 2 || r == 3 p "hit" end ãããããã¡ãã¡å¤æ°ã«ä»£å ¥ããªãã¨ãããªãã®ãæ°ã«å ¥ãã¾ãããã¨ãã«å¤æ°åãèããã®ãé¢åããâ¦