ä»ææ«ã® RubyKaigi 2010 ã§ã「超絶技巧 Ruby プログラミング」ã¨ããçºè¡¨ãããäºå®ã§ãã2 æ¥ç®ã® 13:30-14:00 ã大ãã¼ã«ã§ã®çºè¡¨ã§ãã
主ã«ãã®ããã°ã§ç´¹ä»ãã¦ããã³ã¼ããã¡ãç´¹ä»ããäºå®ã§ãããã®èæ¯ã®æå¤ãªæ·±é ããããããå¯è½ã«ãã Ruby ã®ç´ æ´ããããèªããããããªãã¨æã£ã¦ãã¾ãã
çºè¡¨è¨èªã¯æ¥æ¬èªãªã®ã§ã¹ã©ã¤ããããã¯è±èªã«ãã¨æã£ã¦ãå»å¹´ã®æ®ãã«æ¸ãã 山手 quine ã®è±èªçãä½ãã¾ããã
z=27;eval$s=%w!c,s=["H+{K}8k->dXNpv-cD~@?(zhAi~>JOv<-;A(]oH+MFKs*+KOB825i$%QX9~P=HC{iIlj*Sh# v=3U62LhUXhtnCx^{F=nuTtGG}@85_(xVvIWQ|Vllp[Gt22x&`^K3*ui;IW@O9-(`Z6V_T.E]%WHXYGa{O9A#msMgV{5 R3XS/dxI8zM)XrbFom,$Msj8>=ca#i.yOqM-gtf2xH T#2VYW9Koq.)IjS:&n3f6$Q/@4-8m_[(HxaP>n*b]Ih/3`3T uG-C~3Bn)d.PSdX8 uvtft?;j%bsM^v&h NcaFzv7)uyD=lkc+eYn5&dN/%.|o@pD|BPi+a`rJCgg>?AE; W~){4l9}","_m?PM(N5L <',.ht}f8B|*o8|Qg?:v '(@LY'1^KvIm8twKZHvU@:&FS)r[N1?t9k26*=tiLQw<Tq$l ]V1@Z3hnQ:cQ'b)>])-p }r'U[8hN 7`j6SW r-ZW m2 3n<ZaJ %C%g @@+DABEERjKj5Yt~&>xL ~8BN`L#u?tE+CH$wM%*J px[D;A t%se'c waI. R; FIn( VUVq{0 6c Y]'1EV sqNd_V1yp8"].map{| s|n=0;s.unpack("C*") .map{| c|n=n* 91+( c-1)%9 2};n}; e= "z=#{z =($*[i=0]?(z+1):z- 1)%29};eval$s=%w"<<3 3<<$s[ 0,903] *3;1 4. time s{|y|b =" ";n=f= proc{|w|b<<e[i,w]; i+=w};t=s;f[4];z.dow nto(0){| a|a<1& &6.t imes {|x| y>1&&y<12&&c[n*60+y* 6-x-67]>0?(b<<32<<32):f[2]}while(0<n=(t/=38)%38)};f[4];y>12& &b[-28,28]=""<<33<<"*''#..(c). Yusuke.Endoh.2010";puts(b)}#c,s=["H+{K}8k->dXNpv-cD~@? (zhAi~>JOv<-;A(]oH+MFKs*+KOB825i $%QX9~P=HC{iIlj*Sh#v=3U62LhUXhtnCx^{F=nuTtGG}@85_(xVvIWQ|Vllp[Gt22x&`^K3*ui;IW@O9-(`Z6V_T.E] %WHXYGa{O9A#msMgV{5R3XS/dxI8zM)XrbFom,$Msj8>=ca#i.yOqM-gtf2xHT#2!*''#..(c).Yusuke.Endoh.2010
ã¡ãã£ã¨è¦ã«ããã§ããç®ãç´°ãã㨠Tokyo ã¨æ¸ãã¦ã¾ããå®è¡ãã㨠Yurakucho â Shimbashi â ... ã¨å±±æç·ãåã£ã¦ã29 åããã㧠Tokyo ã«æ»ã£ã¦ãã¾ããããããããªããã°ã¨ãããã以ä¸ã®ããã«å®è¡ãã¦ã¿ã¦ãã ããã
$ ruby yamanote-quine.rb $ ruby yamanote-quine.rb | ruby $ ruby yamanote-quine.rb | ruby | ruby $ ruby yamanote-quine.rb | ruby | ruby | ruby $ ruby yamanote-quine.rb | ruby | ruby | ruby | ruby $ ruby yamanote-quine.rb | ruby | ruby | ruby | ruby | ruby
ãããªæãã®ã³ã¼ãã解説ä»ãã§çºè¡¨ããäºå®ã§ãããæå¾
ãã ããã
è£çªçµã«ã¯ JRuby 会議の Keynote ãããã¾ããã大ãã¼ã«ã¯ãã£ã¡ã§ãã®ã§ãè¿·ããªãããã«å¤§ãã¼ã«ã¸ã©ããã