Hal, you are *really* making ruby an art.
___________________
John Long
www.wiseheartdesign.com


----- Original Message -----
From: "Hal Fulton" <hal9000 / hypermetrics.com>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Saturday, November 01, 2003 12:50 PM
Subject: Another fun but useless program


> I intended to make this one shorter/stranger/etc., but I ultimately
> lost interest and went on to something more productive.
>
> Program below.
>
> Enjoy.
>
> Hal
>
>
> def h(x);x.slice!(0..1).to_i(16);end
> num = ""; DATA.each_line {|line| num << line.chomp!}
> num = num.to_i(36).to_s(16)
> r,c=h(num), h(num)
> num1 = num.slice!(0..2*r*c-1)  # num is now color list
> num1 = num1.scan(/(..)/).flatten
> num1.map! {|x| x.to_i(16) }
> p2 = []; p2 << num1.slice!(0..c-1) until num1.empty?
> num = num.scan(/(......)/).flatten
>
> puts "<html><body><table cellspacing=0 width=380>"
> p2.each_index do |r|
>    puts "<tr>"
>    p2[r].each_index do |c|
>      puts "<td width=10 height=10 bgcolor=##{num[p2[r][c]]}></td>"
>    end
>    puts "</tr>"
> end
> puts "</table></body></html>"
> __END__
>
171q4gt88c3a0h64uyewwdwlz0vw4gmpwo9ale200bfy88lpyo5gwwijcyre4ljoanptfpjuumh
>
i0ohxw22ovjrbghb6fh1ommkjvxn4bkpi09ki5f4076v2arwg3fnm2k3nnku3nazjg4se5wals8
>
s3y7cmipqxqmbpkz19tacsepgsct7imz82d9cxwzqs8o9v2q86pwv4akuxocyxcvl7ivsl4fsto
>
ndbqz1mnh5m84l3mdg225due7ma3drw8hx12b3glnhbwmphs8tj3anm7bampybhgvdmzy2yly7u
>
2kja25ygamhurzuxd1a866mv2y6wtgi5lgg5b1mghyytsp90toq99dc0x18vdhjosx0d0r0d2oq
>
kmqsuj3gyhnk7l9glstb2fgggdl2cunk6i63ntwuf4wwp6pzr18erpjevd2wx6sg0ekmldsvazq
>
uoprqlq3xaazvn57qdz8h39wu8521ngy2dgijji1rf8jn7xfftc8ire1mp04f4q7tolzwm3vq0s
>
fmz0vpamgvd20p97bqk65szyjkp3t4psle3qrs2xlm84bexxjo57z7z1b49fgj4adx0d7onvoc5
>
i0198ynaox5r4gaib0pydp5y0kpupxpwrtsae4evfn43cz0v66kpe9ymxtspu1m5xnmtbvubgxt
>
nzlk7mg4dwptnbf7xjlymd7k43st1iq1njzxqgbtzz2a7pjlff8cqaw4oxb17xdbg1yvxetepla
>
s20dc8pjfj809g9psg4g9vylvm5plu5l7bpc335rikmdyq4tm273t2zobj4grj6maub4ze0oym5
>
7w4lntag1rfsicwnllmi9qcuc96swuct7gk5a1kckxjmr5um2xzd5gtjb7palbfrkibllefzpc8
>
h3tegtpdsswdfquqeoq7bx0snzzutqf00yk79uw4tlaw14m39am75p8htsu98wgzornobymf9zq
>
1y6noym3px1l8s7pm3az45fgnuyukpcq6r6rklvudi582f2pe7zvmcro21tt52sv3wpjl9k4v7z
>
gpgy9q2jol4kl5sf9jppp8y48qvcp9ux95tzngpo43oa0g9p2e0ibyv7rgymog0ggrhw1fovi52
>
6nvrtbdo54s92zzhowfc2yo89rmq12185bayr1q456t6py94bgxv1ksbc5fqovouh6whuq3davx
>
aotfl3s9n7ochl3cwyyc3wuok91xb6ezkqk5rd0uupt7cizpx599f8g3le7sh3kcq5igpsfnai0
>
l1u5cq390gt1mx0rvc38sgw6zvjygzdfjuf4khprtqsqqr4i0smr3h49c9mnjvuflgkivndw0w8
>
69v8irkighwd5gw2eyumef3937qyihljdfienudc2fykpsxy2s521om87q0vr8ppe0z93pbq970
>
jaeeobagspucuf3wehmevln56f08qri5vacecj8wprshveir521mp84yuy1hnjf4jo1lrooj585
>
7ss213l8zz28ged0l6r6be9ptg7vx71lv4l75jo5cpegog04vba4jc9rmo6ettmvvv83qr3li85
>
u1mijo6thr9m4nfhzpe3lokyikdycdzl9x7x457a24ayc0f168atizr64fa38t8l4xlixg365j5
>
vm5ho915wix83aay3uva18udhrwo09ydevto0vpyui411qor3aabvtdrsfo27sa8xecpgvnrst1
>
23uzw0ntaarxnkgb948wd2ew318tyb458vtxj5ghirbuolhvn5v8og4sd5qduuramvs7jrkx0vb
>
kqgy5klvqngnys0237sqg4np8mk90t4c58ukaz7ncj76p35vs1qx1akywuljt42qaazxw191p2a
>
qv65i3tv3xtyn2i5t8tbqimdzfh39cub1krnuh6ylqo9xvrrv878k7dt2w6l4jyxi2sby28m1k4
>
em2dr7zf9reuganlgu2evluizjwv7xdt9csfxugndkihpbo6qakwon4wbi726d0vnpvydvkf1wd
>
2fzwaa9zmi4z2a4ivxy2y8kars6r070m6zdtgn7m1gj08vax134hmt29c2mhwwkvwrcuar0wvo3
>
r21ddp5k2lnha8nr14f49x1zuzyu5fdyykq1wc3pful96qokjlrj2fqkbj4mmktom2pwc2yeh0r
>
d131e5nvbd99k5wns39n5xzc95nomii62vvo609gvxtpwuy5k0phl2wo4egw82yyfz8epidduby
>
2t5jqr82em9fb9vbu0ypte9yoz5l7mowavr8xmav4fpop8m3yavf6d8n74dwzfmgki0qhehyqoy
>
66ieu9qn33yz269yzj605w0431kn6aguea1n6uf9hwhg7zhxwbk9vy44qr96ba36bc3jduazjcf
>
vni759bpg54kr2xrq886l4x71zdbsy2d1uszjmdchrrmh8jnfirewog70q03wsbgj2fx7zlsh1i
>
c62i4vese85l1i2clbnikxf9839gg1rzco2e2viuonshed7wer6rhjdwhu03bu00ic07zaegs46
>
s843ujj6iakt15edehu6yjwl2ltcvu3h18r21rslbu9xwpzp8v32tgpuqmo7u271zk0zzfc6k0t
>
zt8im3n679jdbensvwgsel8pypm8tavg4ffsm353cnayjmnv79f6xiz7q9y2c2azehsffg6pecw
>
330vekpfx8hdnfy1t6kwxpxpsshr77nr3lx7hg72dyltox9pjapp7ze9qwqs6m0o516lx67ykc8
>
mgg7xt3piu88az74xnl006tsz6t3waq2qek2glt8brpelotcefpqjyuvjh30p38e59t4o4s54z8
>
xmqpaa6y8nxwc3hdk0bjbqrbtk8t7y39y6by5z2cao6teomzh1ouz1r41bgmbqja4c5xea8gyrn
>
2hmh4g9nv2trnjbs4bt2711f3tvjlej2bon33crzmhwd0vfx5upn3sv3dlig6c8qimgrh4diopo
>
fj6vvr81to8shzhcql9blajwttwbutyjvec90l2f0wpmrhacqrugr180q05tghrne91ptnodfge
>
phpas68urbwlhoz7m1f79cowlsvlx6cy4sz15bghspgt4mmmxinulrd9jln1ss26marb0cvg1jf
>
luhqu5jrjcliij4rz8f0w1jb9g4j45klh2r5841bw2m83n9i34imy3hqb0jppaxzwa2ispavvqw
>
wwlnjuj9qwfy9erteqe9579wwtb8e7xtk1hj8dw9d66xhqs5p2i1e4b83jr55i04dv4vp1e1o6f
>
u2t4i45ai22i4nyzt7fbblnzp1tenuhe894s5snyqvt0eav9n3j99w0g70lmtmnb18fzou9l1vq
>
wzjfv0bop9qorziajsnh59gp0xiq7nudaphtvpgms7ehgvl1nbhu8njk8hk456kbpjog1v8bcci
>
2wud3hxr58p733p2at4781jpwvhg6bjjg92vok91fvf48v5gdek8zozzukem5b8seows4no7xq1
>
chla7zxtti2klj20o8fkpumtsb40kngl6opg12cicnazjknqt1hatr06me806sgfgfoa0ynw8h8
>
64dwjh7ligfgtbavvddppp6ws4u6nsvs3q07mofn2dy9c69zrgo7oan5pf16orn0wztital3sxf
>
xvoo8fupjqo2jxpba21xf9y9brdctt7ckhv2r7s6tfqqukqdnnngpbiqinvqyyae2h5d81h2a8z
> yqfxbxyp4hzicgc620m94l4jl2p0ugzxejeeyratv80kyx2lrtpvolb182g6lc5sbezs
>
>
>
>
>