まめめも このページをアンテナに追加 RSSフィード


[] Merry Quine-mas

OXZbW","-W[acg vsc*TZ`+eaaaaa--vucavuca+eadsvs+W[dgvrtc","-K991LIL77777dIIIII--
LKKILKKI+Mad[   ^U+K991LHJK"].map{|l|l.unpack("C*").map{|c|[(c/6-4)*12/7-8,"012
35b"[c%6,1].     hex]}*4};y=32.chr;l="@"+[(m="Jnx4sn3sgd1")+"vnqkc!6sgd2Lnqc4gz
r4bnld;6/Ld       s2dzqsg6qd2@bdhud6gdq2Khmf;77/Lds2du4@dqx4gdzqs6oqd2@ozqd4ghl
4qnnl,+Amc         2gdz++2   @udm   4z        mc      2gdz      4@+u   dm   2zm
c2mz+@stqd+r     hmf",m+"E    zq    sg  !6sgd2Sz  u4@h  nt  q4qd  hfm  r;  6/Ld
s2ldm6sgdhq       2rnmfr6d  l    2  @o       knx      ;77/      Wghkd2    ehdkc
r4zmc4eknn         cr,6qnb  jr  ,2  gh  kkr,4zmc  4okz  hm  r+Rd  2@odz  s+2+,6
qd2@odzs6           +sgd2r  ntmc+@  hm        f+  inx"  ,"  Nn4l  nqd3k  ds1rhm
r6zmc2rn             4@qqnvr4fqnv,6/Nnq2sgnqmr6hm2@edrs6sgd2fqntmc;77/Hd2bnldr4
sn4lzjd               6Hhr2ak    d4@rrh   mfr4eknv+Fzq2zr+2+,6ezq2zr,6+sgd2btqr
d+hr+entmc         ","Hd4qtkdr3s  gd1   vnqkc6vhsg2sqtsg4zmc4fqzbd,6/Amc2lzjdr6
sgd2mz6@s           hnmr2oqnud77/ T   gd2fk   n4@q   hdr4    ne6Hh       r2qhfg
s4@dntr4             @mdrr,+Amc2v   nm+2+6@    cd    qr,  2v  nm6  +@cdqr2ne+Hh
r+knud"               ].map{|a|   a ,b,c,e,  *    f  =a.  sp  lit"      +";[a,c
=b+c+f                 *"2",c   ,b+  e+f*"4  "+  ".  8/        /"]*"6/"  }.join
.tr("                   a-z   /","b-    za\  n").gs  ub  (/^/  ,"       #"<<32)
;c=0;640.tim     es{|w|c<1&&(l=~/(@)?(.*?)(\d)/m;($>.<<$1?$2:y+$2).flush;l=$';c
=eval$3);c-=     1;a=[128]*z=1200;4.times{|j|t,n=d[j].pop;f=0.3456*2**(t/12.0-j
/2);(n>0?(d[     j]<<[t,n-1];z):800).times{|i|t>-3&&a[i]+=16*Math.sin(f.*w*z+i)

/dev/dsp が利用可能な環境で実行してください。windows 環境なら cygwin でどうぞ *1


  • 1 〜 4 行目: エンコードされた楽譜データ
  • 4 〜 5 行目: 楽譜のデコーダ
  • 5 〜 17 行目: 暗号化・圧縮された歌詞データ (タイミング付き)
  • 17 〜 19 行目: 歌詞データのデコーダ
  • 20 〜 21 行目: 歌詞の再生
  • 21 〜 23 行目: 波形の合成・再生
  • 23 〜 24 行目: quine

*1cygwin だとよく異常終了しますが、何回か挑戦してください。

manverumanveru 2009/12/25 20:00 This quine is encoded with EUC-JP, you can use: http://pastr.it/16504 for 1.9 or run the original code with `ruby -Ke` if you are on 1.8.x.

ku-ma-meku-ma-me 2009/12/25 20:27 Thank you for your comment, manveru.
This blog is indeed encoded with EUC-JP, but the quine does not contain any Japanese character. Didn't you copy and paste not only the program but also body text?
And, you can read some entries of mine in English:

manverumanveru 2009/12/27 02:26 The backslashes you use are shown here as yen (\). It might be a problem with my browser?
Thanks a lot for your effort, this quine is very nice.

ku-ma-meku-ma-me 2009/12/28 03:55 Ah, you might hit a bug of WebKit!



トラックバック - http://d.hatena.ne.jp/ku-ma-me/20091224/p1