Slide 1

Slide 1 text

TRICK 2022 "Returns" ― contest results TRICK judges: eto, shinh, yhara, matz, leonid, flagitious, mame Transcendental Ruby Imbroglio Contest for RubyKaigi

Slide 2

Slide 2 text

TRICK-2022-opening.rb eval(s=%w{extend(Math);t="-7AA2I:>4E;D0+C>D?7EE8I 56D=@ADI?:D;9C,FI@I%@GDCCBEBDFHFFEEIIHHG3@?HE<4 ABG3@-@3./1151=B/?H.&'9?D@&'9@88=B/@881513./=A4ABGG>E(((' 3,,,>===A).A27D4$G";s="eval(s=%w{ #{s}}*'')"+"#"*999;h="¥s"*108+(-5..17).map{s.slice!(0,69-_1.abs*4 ).center(108)}*o="";(?$..?F).map{t=t[2..].gsub(_1,t[0,2])};g=(1..8).m ap{[cos(a=Math::PI*k=_1/4.0)*k/6,k*sin(a)/3,k/2]};581.times{|i|f= [x=y=0]*2592;t.bytes{|c|x+=c<72?(y+=1;-x):1.upto(c<73?17:0){q =x+w=_1%6-2;f[(y+v=_1/7-1)*54+q]+=1/(hypot(w*2,v)*(i-400) +1)}};2592.times{|j|u=8;g.map{u+=sin(j%108*_1-j/108*_ 2+i*_3)/(_3+0.1)};v,w,x,y=[u/15,(j%108+i*6)/4e2-1 ,f[j/2],i/2e2-1].map{_1.clamp(0,1)};c=((v*w*( 1-y)+x*y**3)*15).round;z=->c{c<6?16+c*36: c<11?166+c*6:216+c};o<<"¥e[48;5;#{z[c ]}m¥e[38;5;#{z[i<250?15-(15-c)*i/ 250:i<400?c:(c*(580-i)+(5+j/1 08*5/12)*(i-400))/180]}m" +h[j];j%108>106&&o<<" ¥e[0m¥n"};$><

Slide 3

Slide 3 text

Transcendental Ruby Imbroglio Contest for RubyKaigi What’s “TRICK” • A contest for esoteric Ruby programming – The "most esoteric" Ruby program wins Transcendental /ˌtransɛnˈdɛnt(ə)l/ “relating to a spiritual realm” * 「霊的領域に関する」 「世俗を超越した」「超絶技巧」 Imbroglio /ɪmˈbrəʊlɪəʊ/ “an extremely confused, complicated, or embarrassing situation” * 「極めて混乱した、恥ずかしい事態」 * Oxford Dictionaries

Slide 4

Slide 4 text

This talk • TRICK 2022 (2021/09/09 – 2022/07/31) – 1st: TRICK 2013 – 2nd: TRICK 2015 – 3rd: TRICK 2018 FINAL – 4th: TRICK 2022 Returns • This talk announces the winners of TRICK 2022

Slide 5

Slide 5 text

About TRICK 2022

Slide 6

Slide 6 text

TRICK 2022 Judges Yusuke Endoh (@mametter) Koichiro Eto (@eto) Shinichiro Hamaji (@shinh) Yutaka Hara (@yhara) Yukihiro Matsumoto (@yukihiro_matz) Sun Park (@sunleonid) Darren Smith

Slide 7

Slide 7 text

TRICK 2022 Judges eto – Media Artist. – Senior Researcher at AIST. shinh – The admin of anarchy golf. – IOCCC winner. yhara – The author of Japanese esolang book. matz – The creator of Ruby. leonid – The 1st super Ruby golfer. flagitious – The author of GolfScript. – Yet another super Ruby golfer. – Full-time Ruby committer at Cookpad. – The world’s No.1 IOCCC player. mame

Slide 8

Slide 8 text

Submission statistics / Judging process • Submission statistics – Thank you for all the submitters! • Judging process – Each judge gives each entry a score of 1..10 – Any information about the authors is not read • Awards – Three medals – Seven judges' awards JP US DE UK

Slide 9

Slide 9 text

CAUTION • This talk has a lot of spoilers! – Get out here if you want to enjoy analyzing the winners • The winning entries will be published at: No k! http://github.com/tric /trick2022/

Slide 10

Slide 10 text

Winners & Judges' Prizes

Slide 11

Slide 11 text

Winner » eto shinh yhara matz leonid flagitious mame score “Most calculating” 『最も計算高いで賞』 SAITOH Jinroq mame award 6 3 2 6 3 4 7 4.43

Slide 12

Slide 12 text

jimlock.rb mame award “Most calculating” puts( { 2*0-2-2 => 2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2, 2/2+0*2 => 2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2+2+2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0, 2+2/2+0 => 2*2*2+0+2-2/2+0+2*2*2+0+2*2*2+0-2+2+2+0+2*2*2+0+2+2+2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2, 0*2+2*2 => 0+2*2*2+0+2+2+2+0+2+2+2+0+2+2+2+0+2+2+2+0+2+2+2+0+2+2+2+0+2+2+2+0+2*2*2+0+2*2*2+0+2/2, 2*0*2*2 => 2+0+2*2*2+0+2*2*2+0+2*2+2+0+2-2/2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2, 2/2+0-2 => 2*2+0+2*2*2+0+2*2*2+0+2*2*2+0-2-2-2+0-2-2-2+0+2+2+2+0+2+2+2+0+2*2*2+0+2*2*2+0+2+2+2+0, 2*2*2+0 => 2*2*2+0-2*2*2+0+2-2*2+0+2*2*2+0-2-2-2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2, 0<2|2-2 => 0+2+2+2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0-2*2*2+0-2*2*2+0+2*2, 2<0|2-2 => 2+0-2*2*2+0-2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2*2*2+0+2+2+2+0+2, }.map { _2.chr }.join) 2*0-2-2 => 2+0+2*2 * 2+0+2*2 * 2+0+2*2*… map { _ 2.chr } +2+0+2,

Slide 13

Slide 13 text

jimlock.rb • Judges' comments – mame: I like this kind of piece that would never have been written except for TRICK. – eto: Simple and nice. mame award “Most calculating”

Slide 14

Slide 14 text

Winner » eto shinh yhara matz leonid flagitious mame score “Most playable” 『最も遊べるで賞』 Don Yang yhara award 7 4 7 6 4 7.5 5 5.79

Slide 15

Slide 15 text

omoikane.rb yhara award “Most playable” require'zlib';eval(Zlib::Inflate.inflate((%w$eF6VVdtym0gQfZ+vwKOSFoFAIPkiO245sp 2K8+B1lZ2KU4XZLIaRhCUBAiQ0F uTbtwd0201elgeY6enu6cvpQ 8zmC z9m1A/bbhgk4ZRRcguWZb Q00 27 hR7zNloFvrfwcmTaJ4R Es+ s IsY0ZtldZaf4x/yEy u Tdik5g3bTY+1/5aH z a Fee6N64jqB3Nb1d lO fO dE6X+XCsrZe6WHs aSfFB 1xapi12xYwW6K4 mSZYtNz9 +fHio179/V9VD J+QJqDOfzzn3Yv zyYSLeXowbXOOGsxg3fJTgRshxPSzXbsT5K9qxGMUoQxXOUj5a8 Lcln0R8vOQ+vjP ur/g05bMFd2PO3YRzBwOIpn4qt/k+ixUApdKVFEsXUgwr/ZWn LKkOef5oce38zC4 USgsStebw5UHf1FfP/CDx3xnxh1J0aXbyfH7ZPSdR7AepR DdKUhqGUjJzptOXg BK28lPCAm+rJGEBrzonU6pEypw8g/RTm7c75A4irUNc MEkIY7Bs8goj6BAHe mQIDI5MEsHg8fM3y7D1NPwxJPcQ9cHQTczCbEeY h6F3iO+DlcAMApiC68 IbTMCwlR6501N/xpJ1nuWhigg5sVUr6xuNR nZ5pwkXp+jgxFbkZ63TV PHYLkhozeEG7tod24rguX1sw7mQ2daz FtkY1jscEzYErS+vWry5xj Df66ftrnpGLEUzdR1hEcWht3BTeS to6liUq3WORc19CC2uoruVGtk ffIBhjjI4LUiBDlAdQzn0gJI7 lDT1ZLwYDrEVVStbPBfNkLk2R++v Sd9sNGIn8C6xNI0GG+ouXl lGiMFzvM2GIXlXsc6iJwWJRQZrkgGVau ukoGSJK4qFUDraqZbpot tNcUPQN8ozqa7V1uK0tzktElqntXVQSO7Y8b Hj2INledIKFExh5gd o+GgF/R4WWl7qi8h1Enb0wTxuYtXNrq0ucVZ9HMZ qKnHrtyoP9iFyys m7U81i8BJT9cm aKR3V0c7QvLQ0Z7V1Vp QuXgKhEe7QvkX2 k8XRxq2gr dADXSqgWhA/ha/jmDm eHrAMqzL2Ec6 xyBt1q e4HHlvJGTx9vf3ypz 5iqTtuYk5HJ uYh00 F2ndx4t85Or5nnvSZ iG6u3RGhaG Wg/ 3+o9G5bkDbIytaoJl T/mjkMB9Lh qG kkxGETtxUUQZrtQ0N es3/ldSWr r J8vRTNXF/Hbya0pc 9y8cJHER2 k 6O4 I14cIuxYEATDGiCA dko8jARh L fqIZ8h4v Fr2LbIC83NEgFe /6TR8C7P c TSzbXC6k8pGs /S+DVusDyNHy1 RL08t7kk w Zi3BODQxnmjDh IyVjFVKcSBwJ DKOcL5w u 0yApzqkPY2tcAg GnUJz6ZXC+CA 1M8786x 7 /qdMpkX0WCIjnY ZgdlemVWR3Ba fgFcnN1 EF ZeLKte7/XLhAHh kJiZGSAG6JB CbKVjTV oDw dlbCqKMoVoB/m V4JeMU0jKq/I k9HOECT AH4j FIIR2u9yPycLFHf 3jPX/2cBatLbD DqcteaV FFTd0 83xPFN3WITsgqzoTJh9rWUVShO U5lBQphx ZypKA9E 7lDPTskkgVsuUZwCkMIG WKkK1gXe0 iIhHe97e7 khyi+qVBc rp+1XnFTTq eEz+fB/Sfp 4dunR7GhLVp OrHKDf/Ijc1/P ffkEKjZ4wlpU2 OiPCGYJuBn7w3SX wWmljEeVctneGbb pEMy/UFAxoGq6r3gl5 cX1JvqV0iluxDRubqk oZ6M0EMRD1a0nnM/tFeWE pvpbiHy5vd4B7DJxFMD2kx HQ2zCVmJOymIpopwKg4CDDHO /Rsk/ZUeRMMfSuhu1BKkr6PsJS 9dtdgU4FAYvHXfzfCcc314MnamX2h pD+nTKSZPnPHr8EAyTHC2nDttU9wlvbKeo bNn1yw5jtVJItId87q51wuvlVbI4+x463txhtLeghLabxgpF/ABGuDRE=$*'').unpack('m')[0]))

Slide 16

Slide 16 text

omoikane.rb • A snake game whose code is snake-shaped yhara award “Most playable”

Slide 17

Slide 17 text

omoikane.rb • Snake game – Game over if you hit an obstacle or your own body – The snake grows longer if it eats food • Originality – The snake can toggle between black and white – The snake can eat an item of his color – Inspired by Ikaruga(斑鳩) • A famous shooter video game with this scoring rule • It does not use curses but io/console yhara award “Most playable”

Slide 18

Slide 18 text

omoikane.rb • Judges' comments – yhara: At first it looked just like a simple snake game but actually it has some tweaks and many features to make the game enjoyable. – shinh: It was a snake, not Python. yhara award “Most playable”

Slide 19

Slide 19 text

Winner » eto shinh yhara matz leonid flagitious mame score “Most likely to be required” 『最も必要となりそうで賞』 Yutaka HARA flagitious award 7 3 N/A 6 5 8 6 5.83

Slide 20

Slide 20 text

yhara.rb flagitious award “Most likely to be required” ︙ using Kumimoji a = 1.㌢㍍ b = 10.㍉㍍ p a == b #=> true puts a + b #=> 0.02㍍ ㌢㍍ ㍉㍍ Japanese "kumimoji" (composite characters) centi meter milli meter

Slide 21

Slide 21 text

yhara.rb • A DSL using "kumimoji" (composite characters) – like 100.days of ActiveSupport flagitious award “Most likely to be required” ︙ a = 1.㌋ b = 1.㍄ printf "1㌋ ≒ %f㍄¥n", a/b #=> 1㌋ ≒ 1.150779㍄ nautical mile mile

Slide 22

Slide 22 text

yhara.rb • Dare not obfuscate, but cleanly implement with meta-programming • Attention to detail flagitious award “Most likely to be required” %w( 1 ㌅ = 2.54 ㌢㍍ 1 ㌳ = 30.48 ㌢㍍ ... ).each_slice(5) do |_, name, _, amount, unit| define_method name do amount.to_r.send(unit) end end alias ㌖ ㌔㍍ meter kilo kilometer (in a character)

Slide 23

Slide 23 text

yhara.rb • Judges' comments – flagitious: I'd like to encourage non-obfuscated entries in the future that none the less become confusing for high complexity or other oddities. And I thought it was well done. – eto: Practical, even! Attempting to use Unicode characters in a practical way is fun, just like APL. – shinh: Is this just normal code? – yhara (camouflage comment): It's interesting that 1 Kairi is so close to 1 Mile flagitious award “Most likely to be required”

Slide 24

Slide 24 text

Winner » eto shinh yhara matz leonid flagitious mame score “Most reactive and diffusive” 『最も反応的かつ拡散的で賞』 Sergey Kruk (lonelyelk) matz award 9 6 5 8 7 7 6 6.86

Slide 25

Slide 25 text

lonelyelk.rb matz award “Most reactive and diffusive” $q=%w[$w&&!$s&&exit;W=130;H=80;HS=40;puts(q="$q=%w[#$q].join;at_exit{eval($q)}".chars.each_slice(W).map(&:join).join("¥n"));$s&&$w &&(puts('$w="'+$w+?"+";at_exit{$s=#$s}¥n#{q}")||exit);srand($s||=Random.new_seed);f=0.03+0.03*rand;k=0.057+0.006*rand;g=32.chr+".: -=+*#%@";mc=800+400*rand;spt=(1..(3+5*rand)).map{{x:(W*rand).floor,y:(H*rand).floor,r2:(10+10*rand)**2}};z=(0...H).map{|y|(0...W). map{|x|{a:1.0,b:spt.any?{|s|s[:r2]>=(x-s[:x])**2+(y-s[:y])**2}&&1.0||0.0}}};n=(1..H).map{(1..W).to_a};$l=->(v,x,y,s){(l=x-1)<0&&l= W-1;(r=x+1)>=W&&r=0;(t=y-1)<0&&t=H-1;(b=y+1)>=H&&b=0;0.2*(v[y][r][s]+v[y][l][s]+v[t][x][s]+v[b][x][s])+0.05*(v[t][r][s]+v[t][l][s] +v[b][r][s]+v[b][l][s])-v[y][x][s]};print('$w="');pc=4;mc.to_i.times{|c|(0...W).map{|x|(0...H).map{|y|la=$l.call(z,x,y,:a);lb=$l.c all(z,x,y,:b);a=z[y][x][:a];b=z[y][x][:b];n[y][x]={a:(a+1.0*la-a*b*b+f*(1-a)).clamp(0,1),b:(b+0.5*lb+a*b*b-(k+f)*b).clamp(0,1)}}}; z,n=[n,z];((c+=1)/mc*W).floor>pc&&(pc+=1)&&print(?.)};puts(?.*(W-pc));dmi,dma=z.map{|l|l.map{|v|v[:a]-v[:b]}.minmax}.flatten.minma x;z.each_slice(H/HS){|l|W.times{|x|sum=l.inject(0.0){|a,l|l[x,1].inject(a){|s,v|s+((v[:a]-v[:b]-dmi)/dma)}};print(g.chars[(sum*W*H S*g.size/(W*H)).clamp(0,g.size-1).floor])};puts};ft=?"+";at_exit{$s=#$s}";puts(?.*(W-ft.size)+ft+10.chr+q)].join;at_exit{eval($q)}

Slide 26

Slide 26 text

lonelyelk.rb matz award “Most reactive and diffusive” $q=%w[$w&&!$s&&exit;W=130;H=80;HS=40;puts(q="$q=%w[#$q].join;at_exit{eval($q)}".chars.each_slice(W).map(&:join).join("¥n"));$s&&$w &&(puts('$w="'+$w+?"+";at_exit{$s=#$s}¥n#{q}")||exit);srand($s||=Random.new_seed);f=0.03+0.03*rand;k=0.057+0.006*rand;g=32.chr+".: -=+*#%@";mc=800+400*rand;spt=(1..(3+5*rand)).map{{x:(W*rand).floor,y:(H*rand).floor,r2:(10+10*rand)**2}};z=(0...H).map{|y|(0...W). map{|x|{a:1.0,b:spt.any?{|s|s[:r2]>=(x-s[:x])**2+(y-s[:y])**2}&&1.0||0.0}}};n=(1..H).map{(1..W).to_a};$l=->(v,x,y,s){(l=x-1)<0&&l= W-1;(r=x+1)>=W&&r=0;(t=y-1)<0&&t=H-1;(b=y+1)>=H&&b=0;0.2*(v[y][r][s]+v[y][l][s]+v[t][x][s]+v[b][x][s])+0.05*(v[t][r][s]+v[t][l][s] +v[b][r][s]+v[b][l][s])-v[y][x][s]};print('$w="');pc=4;mc.to_i.times{|c|(0...W).map{|x|(0...H).map{|y|la=$l.call(z,x,y,:a);lb=$l.c all(z,x,y,:b);a=z[y][x][:a];b=z[y][x][:b];n[y][x]={a:(a+1.0*la-a*b*b+f*(1-a)).clamp(0,1),b:(b+0.5*lb+a*b*b-(k+f)*b).clamp(0,1)}}}; z,n=[n,z];((c+=1)/mc*W).floor>pc&&(pc+=1)&&print(?.)};puts(?.*(W-pc));dmi,dma=z.map{|l|l.map{|v|v[:a]-v[:b]}.minmax}.flatten.minma x;z.each_slice(H/HS){|l|W.times{|x|sum=l.inject(0.0){|a,l|l[x,1].inject(a){|s,v|s+((v[:a]-v[:b]-dmi)/dma)}};print(g.chars[(sum*W*H S*g.size/(W*H)).clamp(0,g.size-1).floor])};puts};ft=?"+";at_exit{$s=#$s}";puts(?.*(W-ft.size)+ft+10.chr+q)].join;at_exit{eval($q)} $w=".............................................................................................................................. %@@@%#*+-:. .:-+*#%%%#*+=:.. .-+*%@@@@@@@@@%%%%%%%%###*+=====+****+=:.. ..:-=+*#%@@@@@@@%#*+=::.... ..-=*##%%%#*+-:.....:-+*# #%%@@%#*+-:. ..:-=++*++=-:... ..:=*#%@@@@@@%##********++=--:....:-=+++=-:. ..:-=+*##%%%%##*=-:...........:-=+***+=--:......:-=+ =*#%%%%#*=-:. ...::---:::......:=+#%@@@@%#*+=-::::-----:::.. .:=+**+=-:. ...:--=+++++=-:......::::....::-----::::........:- :-+*#%%%#*=:. .............:-+*#%%%%#+=:.. .............:-+*###*+-:.. ...::---::......:--===-::.........:::::::... .. .:=+#%%%#*=:. ..........::-=+*##**=-:. ............:-=*#%%%%#*+=-:.........:::......:-=+****+=-:.......::-=====-:.. .:=+#%%%#*+-:....::---=---::::--=+++==-:. ....::------::...::-+*#%@@@@%%#*+=--::::::::::....:-+*#%%%%#*=-:.....:-=+**##*+=:.. .:=*#%@@%#**+===++******+=--::::----::....::-==++****+=-::...::=+*#%@@@@@@%%#*+=--:::::::::::=+*%@@@@@%#+-:.....:-+*#%%%%#*=-.. .-+#%@@@@@%%####%%%%%%#*+=-::..::::::.:::-=+*#%%%%%%#*=-......:-=*#%%@@@@@@%%#+=-:::::::::-=+*%@@@@@@%#+=:. .:=*#%@@@@%#+=:. .-+#%@@@@@%%%##%%%%%%%#*+=-:.....:::::::-=+##%@@@@@@%#+-. ...:-=+*#%%@@@@%#+=::..::::::-=+#%@@@@@@@#*=:. .:=*#@@@@@%#*=:. .:-+#%@@%%#*+++++**###**+=-::..::::::::::-=+*#%@@@@@@@%*=:. ...::-=+*#%%%#*=:.. ....:::--=*#%@@@@@%#*=:. .:=*%@@@@@%#+=:. .:=*#%%%#+=::...::-====--::::::-----::...::-=+*#%@@@@@@%*=:.. .....:-=**#*+=:. ....::::-=+*#%%%%%#+=:.. .:=*%@@@@@%*=-.. .:=+##%#*+-. ...::::...::-=+++++=-:......:-=+*#%@@@@%#*=-:::.........:-++*++-:....:::::::::-=++****+=-:....:-+*%@@@@%#+-:. .:-+*#%##+-:. ............:-=+*####*=-:. ..:-+*%@@@@@%%#*+=--:... .:-+*##*++=====---:::.:::-------::....:-+*#%%%%#+-:. .:-+*#%%#*=-.. ...::---:::....:-=*#%%%%#*+-:.. .:=*%@@@@@@@%%#*=-:... .:-+#%%%%%###**+=--::........::.......:-=*####*+-:. :-+#%%%%#+-:....:--=+++=--:....:-+*%%@@@%#+=:... ..-+#%@@@@@@@%%*+-:.. .:=*#%@@@@%%##*+=-::...................:-=++++=-:. . =+#%%%%#*=:.. ..:=+*###*+=:.....:-+#%@@@@%#*=-:.. ..:=*#%@@@@@@%#*=-:. .:-+#%@@@%%##*+=--::......::-----::......::----:.. ..: *#%%%%#*=-.. ..-+*%%%%%*+-:. .:-+#%@@@@@%*=-:.. ...:-+*#%%@@%%#*=-:. .:-+*%%%%#*+==-::.......:--=+*****+==-::....:::......:-+ %%@@%#*=-.. .:=*#%@@@%#*=:. .:-+#%@@@@@%*=-.. ...:-=+*****++=::.. ..-=*#%%%#*+-:... ...:-=+*##%%%%%%##*+=--::.......:-=+# @@%%#*=-.. .-+#%@@@@@%#+-.. .:=*%@@@@@@%*=:. ...::------::.....:-+*#%%%#*=-. ..:-=+*##%%%%%%%%%%%%##*+=-:.....:-=*#% @%%#+=:.. ..-+*%@@@@@@@#*=:.. .:=*#@@@@@@@%*=-.. .............:=+#%%@@%#+-. .:-=+*##%%%%#*****##%%@%%#*+=:.....-=*#%@ %#*+-:. ..:-+*%@@@@@@@@%*+-:.....:-+#%@@@@@@@%#+=:... ..........:-=*#%@@%%*+-. .:-=+*#%%@@%#*+-:..:-+*#%%%%#+=:.. .:-+#%%% #*=-.. ..:-=+*#%%@@@@@@%#*+-::....:-=+*#%%@@@@@%##*+=--:::::::::.....:-=*#%%%%#*=-:...:-=*#%%@@@%#*=:. .:=*####*+-:. ..:=*#%%% *=-.. ..:-=++******####**+=-::....:::-==+**##%%%%%%###******+++=--:..::-=+*##**+-::..:-=+*#%%%%%#*=-.. .:-=+**++-:.. .:-+##%%# =-.. .:-==+++=--::---===--:::..........:::-==+*##%%%%%%%%%%%%%##*+-::.::--=====-::..::-=+**###**+=-:.......::--==--:.. ..-=*####* -.. .:-=+**+=-.. ................... ...:-=++*##%%%@@@@@@%%#*=-::...::::::.......::--=====-::.........:::::::... .:=+*###*= :. .:-=*###*=:. ........:::::::.... ...::-==+**##%%%%%##*=-:............................ ...:::::::.... .:-+*###*=- . ..-=*#%%%#+-:......::::--===++++==--::... ....::--=+*****+=-:.........:::::::..... ..:-==+++=-::. .:-+*###*+-: .:=+#%@@%%*+-:...::--=++*###%%%%###*++=-::.. ..:------::.....::--=++++++==--::........:-=+*######*+=-::::-=+*#%%%#+=:. .-=*%%@@@%#*=-:.::--=+*#%%@@@@@@@@@@%%#**+=-::.... ....:::......:-=+*##%%%%%%##**++=======+**#%%%@@@%%%##*+++**#%%@@@%#+-. ..-+*%@@@@%#*=::..::-=+##%@@@@@@@@@@@@@@%%%#**+==---::::::.........:-=+##%@@@@@@@@%%%%%########%%%%@@@@%%%%%######%%@@@@@@%*=:. .:=*#%@@@%*+-:....::-=+*#%%%%%%%%%%%%%@@@@@@%%%###**++==--::....:-=+*#%@@@@@%%%#######%%%%%%%%%%%%%###****+++++**#%%@@@@@%#+-. .:-+#%%%%#*=:. ....::-==++*+++=====+**#%%@@@@@@@@%%%#*+=-::....:=+#%%@@%%#**+=======++***#####**++=---::::::::--=+*#%%@@%#+=:. . .:=+##%##+-:. ....:::::::......:-=+*##%%%@@@%%%#*+=-:....:-+*#%%%%#*=-:........:::--=====--::... ..:-=+#%%%#*+-: :. .:-+*##*+=:. ........... ..:--=+***###**++=-:.. .:=+#%%##*=-.. ............. ...... .:-=*#%%#*+- -:. .:-=+***+=--::::-----::............. ....::---==---::.. .:-+*###*+-:. ....... .........:::-----::... .:=*##%#*+ +=:. ..:-=+*************+=-::...::::::.... ......... ..:=+##%#*+-:. ..::------:::........::--=++****++=-:. .:=*#%%#* #*=:.. .::=+*#%%%@@@@@%%#*=-:...::------::.. ....:-=+*#%%%#+=:. ..:-=+**###**++==--:::::--=+*#%%%%%#*+=:.. ..-+*#%%% %#*+-:. .:-+*%%@@@@@@@%#*=:....::-=+***+=--:.......:::--==+*#%%@@%%#+-.. .:-=*#%%@@@@@%%##*+=-::::-=+*#%@@@@@%#*=-.. .:-+#%%% @%%#+=:.. .:-+*%@@@@@@@%*+-:. ..-=*#%%%%##**++====++++***##%%%@@@%%*=-.. ..:=+#%@@@@@@@@@@%#*+-::..::-=*#%@@@@@%#*=:.. .:=*#%@ @@@%#*=-.. .:-+#%@@@@@%#+-:. .:-+#%@@@@@@@%%%################%%%%#*=:.. ..:=+#%@@@@@@@@@@%#*+-:......:-+*#%@@@%#*+-:....:-+*#% .............................................................................";at_exit{$s=242772018625937582781958127315352038949} $q=%w[$w&&!$s&&exit;W=130;H=80;HS=40;puts(q="$q=%w[#$q].join;at_exit{eval($q)}".chars.each_slice(W).map(&:join).join("¥n"));$s&&$w &&(puts('$w="'+$w+?"+";at_exit{$s=#$s}¥n#{q}")||exit);srand($s||=Random.new_seed);f=0.03+0.03*rand;k=0.057+0.006*rand;g=32.chr+".: -=+*#%@";mc=800+400*rand;spt=(1..(3+5*rand)).map{{x:(W*rand).floor,y:(H*rand).floor,r2:(10+10*rand)**2}};z=(0...H).map{|y|(0...W). map{|x|{a:1.0,b:spt.any?{|s|s[:r2]>=(x-s[:x])**2+(y-s[:y])**2}&&1.0||0.0}}};n=(1..H).map{(1..W).to_a};$l=->(v,x,y,s){(l=x-1)<0&&l= W-1;(r=x+1)>=W&&r=0;(t=y-1)<0&&t=H-1;(b=y+1)>=H&&b=0;0.2*(v[y][r][s]+v[y][l][s]+v[t][x][s]+v[b][x][s])+0.05*(v[t][r][s]+v[t][l][s] +v[b][r][s]+v[b][l][s])-v[y][x][s]};print('$w="');pc=4;mc.to_i.times{|c|(0...W).map{|x|(0...H).map{|y|la=$l.call(z,x,y,:a);lb=$l.c all(z,x,y,:b);a=z[y][x][:a];b=z[y][x][:b];n[y][x]={a:(a+1.0*la-a*b*b+f*(1-a)).clamp(0,1),b:(b+0.5*lb+a*b*b-(k+f)*b).clamp(0,1)}}}; z,n=[n,z];((c+=1)/mc*W).floor>pc&&(pc+=1)&&print(?.)};puts(?.*(W-pc));dmi,dma=z.map{|l|l.map{|v|v[:a]-v[:b]}.minmax}.flatten.minma x;z.each_slice(H/HS){|l|W.times{|x|sum=l.inject(0.0){|a,l|l[x,1].inject(a){|s,v|s+((v[:a]-v[:b]-dmi)/dma)}};print(g.chars[(sum*W*H S*g.size/(W*H)).clamp(0,g.size-1).floor])};puts};ft=?"+";at_exit{$s=#$s}";puts(?.*(W-ft.size)+ft+10.chr+q)].join;at_exit{eval($q)}

Slide 27

Slide 27 text

lonelyelk.rb matz award “Most reactive and diffusive” $q=%w[$w&&!$s&&exit;W=130;H=80;HS=40;puts(q="$q=%w[#$q].join;at_exit{eval($q)}".chars.each_slice(W).map(&:join).join("¥n"));$s&&$w &&(puts('$w="'+$w+?"+";at_exit{$s=#$s}¥n#{q}")||exit);srand($s||=Random.new_seed);f=0.03+0.03*rand;k=0.057+0.006*rand;g=32.chr+".: -=+*#%@";mc=800+400*rand;spt=(1..(3+5*rand)).map{{x:(W*rand).floor,y:(H*rand).floor,r2:(10+10*rand)**2}};z=(0...H).map{|y|(0...W). map{|x|{a:1.0,b:spt.any?{|s|s[:r2]>=(x-s[:x])**2+(y-s[:y])**2}&&1.0||0.0}}};n=(1..H).map{(1..W).to_a};$l=->(v,x,y,s){(l=x-1)<0&&l= W-1;(r=x+1)>=W&&r=0;(t=y-1)<0&&t=H-1;(b=y+1)>=H&&b=0;0.2*(v[y][r][s]+v[y][l][s]+v[t][x][s]+v[b][x][s])+0.05*(v[t][r][s]+v[t][l][s] +v[b][r][s]+v[b][l][s])-v[y][x][s]};print('$w="');pc=4;mc.to_i.times{|c|(0...W).map{|x|(0...H).map{|y|la=$l.call(z,x,y,:a);lb=$l.c all(z,x,y,:b);a=z[y][x][:a];b=z[y][x][:b];n[y][x]={a:(a+1.0*la-a*b*b+f*(1-a)).clamp(0,1),b:(b+0.5*lb+a*b*b-(k+f)*b).clamp(0,1)}}}; z,n=[n,z];((c+=1)/mc*W).floor>pc&&(pc+=1)&&print(?.)};puts(?.*(W-pc));dmi,dma=z.map{|l|l.map{|v|v[:a]-v[:b]}.minmax}.flatten.minma x;z.each_slice(H/HS){|l|W.times{|x|sum=l.inject(0.0){|a,l|l[x,1].inject(a){|s,v|s+((v[:a]-v[:b]-dmi)/dma)}};print(g.chars[(sum*W*H S*g.size/(W*H)).clamp(0,g.size-1).floor])};puts};ft=?"+";at_exit{$s=#$s}";puts(?.*(W-ft.size)+ft+10.chr+q)].join;at_exit{eval($q)} $w=".............................................................................................................................. .::--=+*#%@@@@@@@%*=:....:=*%@@@@%*=-.. ......... ...::-----::..:-=+#%%%%%#*+-:...:=*#%%%%#+=::::-=++*++=-::......::::::........ =++*##%@@@@@@@@@@#+-:. ..:=*#%@@@@%#+=::...........::--=++**++=-::.::-=+****+=-:...:-+#%%%%#+=:...:-+*#%%%#*+=-:..............::-- #%%%%@@@@@@@@@@@@#+-:. ..:-+#%@@@@@@%#*+==========++**##%%%%%#*+-:...::--==--::....:=*#%%%#*=:....:=*#%@@@@%%#*+=-:.......::--=+*# @@@%%%%%%%%@@@@@@%*=:.....:=+#%@@@@@@@@%%%#######%%%%%@@@@@@@%#*+-:......::.... .:=+#%%%%#+-:. ..-+#%@@@@@@@@%#*+==-----==+*##%%% %%##*+====+*#%@@@%#+=:.....:=+*#%@@@@@@@@@@@@@@@@@@@@@%%%%%%@%%#*+=:.............:=*#%@@%#*=:....:=*%@@@@@@@@@%%###****###%%%@@@@@ #*+=-:.....-=*#%@@%#*=-:....:-=+*##%%%%%%%@@@@@@@@%%##**+++*#%%%%#*+==--::::::--=*#%@@@@%#+-:...:-+#%@@@@@@%%#****#%%%@@@@@@@@@%%# =-::... ..:=*#%@@%#*+-:......:--=+++++*****#####*++=-:...:=+#%@@%%%##*******##%%@@@@@@#*=-:..:-=+#%@@@@%#*=-::-=+#%@@@@@@@@%#*+= ............:-=*#%@@@%#*+-:........::::::::---====--:.. :=*%@@@@@@@%%%%%%@@@@@@@@@@%*+-:...::=+*#%%%#*=-.. .-+#%@@@@@%#+=-:: ..::----::...:-=*#%@@@@%#*+-::................::::::... .:=*%@@@@@@%%%%%%%@@@@@@@@@%#+-:.....:-=+****+=-.. .:+#%@@@%#*=:.... :-=++**+=-:....:=+#%@@@@@%%#*=--::.........:::::::::::::::--+*#%%%%##***+*****###%%%%%#*=:. ..:-=++++=-:......:=*#%@@%#+-:. .. =+*#%%%#*+=:....:=+#%@@@@@@@%##*++===========---:::--==++**##%%%#*+=-:::::::----==+****+=-:.....:-=++++=--:...::-+*#%@@%#*=:.....: +#%@@@@@%#+=:....:=+*#%@@@@@@@@%%%%%%%%%%###*+=--:--=+*#%%@@@@%#*=:...............:--=++++======+**##**=-:::::-=*#%@@@@%*=-.....:= #%@@@@@@@%#+-:...::-=+**###%%%%@@@@@@@@@@@@%#*=-:::-=*#%@@@@@@%*=:.. ...::::::......:-+*###%%%%%%@@%%#*=-:..:-=*#%@@@@%#+-:....:-+ %@@@@@@@@@#*=-::..:::---====++*##%@@@@@@@@@%#+-:...:=+#%@@@@@%#+-:....:-==++==-:....:-+*%%@@@@@@@@@@%#*=:....-=*%@@@@@%*=:.. ..:=* @@@@@@@@@%#+=-::::::::.......::-=+*#%@@@@@@%#+-. ..:=+#%%@@%#*+-:..:-=+*####*+=::..:-+*%@@@@@@@@@@@%#+-.. ..-+#%@@@@%#+-:. .:-+# @@@@@@@%#*+=-:::::---:::... ...:-=*#%@@@@%#+-. ..:-+*####*+=::.:-=*#%%@@%#*+-:..:-=*%@@@@@@@@@@@%*=:. ..-+#%@@@@%*=:. ..-=*% @@@@@@%*=-:...::-==+++==--:.... ..:-+*%@@@@%#+-:. ..::-=+++==-:::-=+#%@@@@@%#+-::.:-=+#%%@@@@@@@@%#*=:....:=*%@@@@%#+-:. ..:=*%@ @@@@@%*=:. ..:-=+*##%###*+=-::... ..:=*#%@@@%#+=-:......::---:::::-+*%@@@@@@%*=-:...:-=++*###%%%%%#*+-:...:=+#%@@@@%#+-:...:=+#%@ @@@@@%*-. ..:-+*#%@@@@@@%#*+=-:.....-=*#%@@@%%#*+=-::....::::::::-=*#%@@@@@#*=:.....:::----===++++==-::::-+*%%@@@%#*=-:..:-=*#@@ @@@@@%*=-.....:-=*#%@@@@@@@@@%#+=-:...:-+*#%@@@@@%##*++==----:::::::-=*#%@@@@#*-:. ............:::---::::-=+*#%@@%#*+-::.::-=*#%@ %%@@@%%*+-:....:-+#%@@@@@@@@@@%#+=-:::::-=+*#%%%@@@%%%%###*++=-::...::=+#%@@@%#+-:....:::..........::::::::-=+*#%%#*=-:...::--=+*# +*#%%%%%#+=-:...:=+#%@@@@@@@@@%#+=-:::::::-==+**#%%%@@@@@@%%#*=-:.. ..-+#%@@@%%*++========---:::::::::.....:-=****=-:. ....:::--= :-=+#%%%%#*=-:...:-+#%@@@@@@%%*+=-::::::::..:::-=++*#%@@@@@@%#*=:. :=*%@@@@@@%%%%%######****+++==-:.. :-+***+-:. .......... ..:-+*#%%%#*=:....:-+*#%%%%##+=-::.:::--:::......::-=+#%%@@@@%#*=:. .:=*%%@@@@@@@@@@@@@@@@@@@%%%%#*+=-:. ..-=*#%##*=--::--:::... ...:-+*%%%%#+=:....:-=+****+=-:....:-=+++=--:.. ..::=+*#%@@@%%#*==--=+**###########%%%%@@@@@@@@@@@%%#*+===+*#%@@@@%%##****++=-:. :...:-+#%%%%#+-:.....:-----::.....-=+*####**+=-:.......:-+*#%%@@@%%###****++==========++**##%%%@@@@@@@%%%%#%%%@@@@@@@@@@@@@%%#*+=- -:...:=*#%@@%#+=:...............:-+*#%@@@@@%%#*+=--::...::-+*#%@@@@@@%##+=-::.........:::--=++**##%%%%%%%%%%@@@@@@@@@@@@@@@@@@%#+= -:....-+#%@@@%#*=-:...........:-=+#%@@@@@@@@@@%%#*+==-::..::-+*%@@@@@%#*=::.................:::-==+++*****#####%%%@@@@@@@@@@@@%#+= :.. ..-+#%@@@@@%#*+=--:::::--=+*#%%@@@@@@@@@@@@%%##*+=-::....-=*%@@@%#*=-:...::------::... .....::::-------====++*##%%%%%%%##*=- .....:=*%@@@@@@@@%%##*******##%%%%%%%#############**+=-::.. ..-+#%@%%*+-:..::-=+*****++=-::......................::--==++***++=-:: ...:-=*%@@@@@@@@@@@%%%%%%@@@@@@@%%#+==-----=========--::... .:-+#%%%#*=:...:-=+*#%%%%%%##*+==--:::::..................::::-::::... :-=+*#%@@@@@%%#######%%@@@@@@@@@#*=:.............:::........:-+#%@@%#+-:...:-=+##%@@@@@@@@%%##**++++====----::::.................. +*##%%@%%%#*+==----==+*#%@@@@@@%*=:. ...............::::-=+*#%@@@%#+-:. ..:-=+*#%%@@@@@@@@@@@@%%%%######***++==--::.... ....:-= %%@@@%%#*+=-:........:-+*#@@@@@%*=:.....:------------==++**#%%@@@@@@%#+-......:-==+*#%@@@@@@@@@@@@%%%%@@@@@@@%%%##*++=--:::--==+*# @@@%%#*+=::............:=+#%@@@%*=:...::-=+**##########%%%%%@@@@@@@@@%#+=::......::--+*%@@@@@@@%#***##%%@@@@@@@@@@@%%%###**###%%@@ @%%#*+-::....:::::::....:=*#%@%%*+-:..:-=*#%%@@@@@@@@@@@@%%%#####%%@@@%%#*+=-::......:=*#@@@@%*+-:::-=+*##%%@@@@@@@@@@@@@@@@@@@@@@ #*+=-:.....:-==++==-:...:-+#%%%%#+-:..:-=*#%@@@@@@@@@@@%%#*+=----=*#%@@@@%##+=-:.. .-+#%%%%*=:. ..:-==+**#%%@@@@@@@@@@@@@@@@%% =--:.....:-=+*###*+=-:...-=*%%@%#*=:...:-+*#%%%@%%%%##**+=-:.. ..-+#%@@@@@%%*+=:.....-+*%%%#*=:. .....::::--=+*#%@@@@@@@@@%%##*+ :... ..:-+*#%%%%#*+-:...:=*#%@%%*=:....:-=++****+++=---::.... .:=*#@@@@@@%#*=-:...:=*#%%%#*=-:...::::.......:-=+*#%%%%%##*+=--: ......:-+*#%@@@@@%*=-....:=*#%@@%#+-.. ...::----:::...............:-+#%@@@@@%#*=-:..:-+*%%%%#*=-::::-----::... ..::-=+++++=-::.... .............................................................................";at_exit{$s=317871915447465570974410760196813665823} $q=%w[$w&&!$s&&exit;W=130;H=80;HS=40;puts(q="$q=%w[#$q].join;at_exit{eval($q)}".chars.each_slice(W).map(&:join).join("¥n"));$s&&$w &&(puts('$w="'+$w+?"+";at_exit{$s=#$s}¥n#{q}")||exit);srand($s||=Random.new_seed);f=0.03+0.03*rand;k=0.057+0.006*rand;g=32.chr+".: -=+*#%@";mc=800+400*rand;spt=(1..(3+5*rand)).map{{x:(W*rand).floor,y:(H*rand).floor,r2:(10+10*rand)**2}};z=(0...H).map{|y|(0...W). map{|x|{a:1.0,b:spt.any?{|s|s[:r2]>=(x-s[:x])**2+(y-s[:y])**2}&&1.0||0.0}}};n=(1..H).map{(1..W).to_a};$l=->(v,x,y,s){(l=x-1)<0&&l= W-1;(r=x+1)>=W&&r=0;(t=y-1)<0&&t=H-1;(b=y+1)>=H&&b=0;0.2*(v[y][r][s]+v[y][l][s]+v[t][x][s]+v[b][x][s])+0.05*(v[t][r][s]+v[t][l][s] +v[b][r][s]+v[b][l][s])-v[y][x][s]};print('$w="');pc=4;mc.to_i.times{|c|(0...W).map{|x|(0...H).map{|y|la=$l.call(z,x,y,:a);lb=$l.c all(z,x,y,:b);a=z[y][x][:a];b=z[y][x][:b];n[y][x]={a:(a+1.0*la-a*b*b+f*(1-a)).clamp(0,1),b:(b+0.5*lb+a*b*b-(k+f)*b).clamp(0,1)}}}; z,n=[n,z];((c+=1)/mc*W).floor>pc&&(pc+=1)&&print(?.)};puts(?.*(W-pc));dmi,dma=z.map{|l|l.map{|v|v[:a]-v[:b]}.minmax}.flatten.minma x;z.each_slice(H/HS){|l|W.times{|x|sum=l.inject(0.0){|a,l|l[x,1].inject(a){|s,v|s+((v[:a]-v[:b]-dmi)/dma)}};print(g.chars[(sum*W*H S*g.size/(W*H)).clamp(0,g.size-1).floor])};puts};ft=?"+";at_exit{$s=#$s}";puts(?.*(W-ft.size)+ft+10.chr+q)].join;at_exit{eval($q)}

Slide 28

Slide 28 text

lonelyelk.rb matz award “Most reactive and diffusive” $q=%w[$w&&!$s&&exit;W=130;H=80;HS=40;puts(q="$q=%w[#$q].join;at_exit{eval($q)}".chars.each_slice(W).map(&:join).join("¥n"));$s&&$w &&(puts('$w="'+$w+?"+";at_exit{$s=#$s}¥n#{q}")||exit);srand($s||=Random.new_seed);f=0.03+0.03*rand;k=0.057+0.006*rand;g=32.chr+".: -=+*#%@";mc=800+400*rand;spt=(1..(3+5*rand)).map{{x:(W*rand).floor,y:(H*rand).floor,r2:(10+10*rand)**2}};z=(0...H).map{|y|(0...W). map{|x|{a:1.0,b:spt.any?{|s|s[:r2]>=(x-s[:x])**2+(y-s[:y])**2}&&1.0||0.0}}};n=(1..H).map{(1..W).to_a};$l=->(v,x,y,s){(l=x-1)<0&&l= W-1;(r=x+1)>=W&&r=0;(t=y-1)<0&&t=H-1;(b=y+1)>=H&&b=0;0.2*(v[y][r][s]+v[y][l][s]+v[t][x][s]+v[b][x][s])+0.05*(v[t][r][s]+v[t][l][s] +v[b][r][s]+v[b][l][s])-v[y][x][s]};print('$w="');pc=4;mc.to_i.times{|c|(0...W).map{|x|(0...H).map{|y|la=$l.call(z,x,y,:a);lb=$l.c all(z,x,y,:b);a=z[y][x][:a];b=z[y][x][:b];n[y][x]={a:(a+1.0*la-a*b*b+f*(1-a)).clamp(0,1),b:(b+0.5*lb+a*b*b-(k+f)*b).clamp(0,1)}}}; z,n=[n,z];((c+=1)/mc*W).floor>pc&&(pc+=1)&&print(?.)};puts(?.*(W-pc));dmi,dma=z.map{|l|l.map{|v|v[:a]-v[:b]}.minmax}.flatten.minma x;z.each_slice(H/HS){|l|W.times{|x|sum=l.inject(0.0){|a,l|l[x,1].inject(a){|s,v|s+((v[:a]-v[:b]-dmi)/dma)}};print(g.chars[(sum*W*H S*g.size/(W*H)).clamp(0,g.size-1).floor])};puts};ft=?"+";at_exit{$s=#$s}";puts(?.*(W-ft.size)+ft+10.chr+q)].join;at_exit{eval($q)} $w=".............................................................................................................................. ::..... ................:-+*#%@@@@@@@%#*+=-:.. ..:-=+**######**++++==++++***##%%%@@@@@@@@@@@@@@@@%%#+=-:....:-=*##%#*+=:......: .......::::::::::........:=+*%%@@@@@%%#*+=-:.. ..:-+*#%%%@@@@@%%%%%############%%%%@@@@@@%%%####%%%%##*=-:....:-=*####*=-....... ::---=============------=+*#%@@@@@%%#*+-::.. ..:-=+##%%@@@@@@@@@@@@@%%%%###********#####*++=---=+*#####*=-:....:-=*###*+=:...... =++***############*****##%%@@@@%%#*+=-:... ...:-=+*#%%%%%#####%%%%%%%%##**++=--::---=====-::. .:-+*####*=-:....:-+*#%##*+=----- *##%%%%%%%%@@@@@@@@@@@@@@@@@@%%#*+=-:.. ...:-=+*#%%%%#*+==-==++*****++==--::.......::::::.. .:-+*###*+=:.. ..-=*#%%%%##***** ##%%%%%%%%%%%%%%@@@@@@@@@@%%#*+=-:... ..::-+*##%%%%%#+-:.....::-----:::............:::::..... .-=*###*+=-.. ..:=*#%@@@%%%#### ***************###%%%%%%%##*+=-:.. ...:-=+*#%%@@@%%#+=:. ..............:::::::::::::::::... ..-=*###*+=:.. ..-=*#%@@%%%##*** ----------:::---==++*****+=-:... ...:-=+*#%%@@@@%%#*=-:........... ..:--=====-----------::....:=+*###*=-:....:-+*%%%%#*+==--- .......... ....::-----::... ...:-=+*##%%@@@%%%#*+=-:....::::::::::::-==+***++==-----==+++======+*####*+=::....:=*#%%#*+=:..... .......... .....:::......::-==+*#%%%%%%%##*++=-::...::--======+++**######*+=-::::-=+*#######%%%%%%#*=-:....:-+*#%#*+-:. .. ::------:::::..............:::-=+**#%%%%%%##*++=-::......::-=+**#####%%%%@@@%%*+=:....:-=*#%@@@@@@@@@@%#*+-:.....-=*#%%#*=:. ..: -==++****++++====---:::::::--=+*#%%%%%%##*+=-::... ..:-=+*##%%%%%@@@@@@@@%#*=:. ..-=*#%@@@@@@@@@@%#+=:.. ..:-+#%%%%*+-:....:: -=+*##%%%%%%%%###*++=--:::-=+*#%%%@%%##*=-:... ...:-=+**########%%@@@@@@%#*=:. .:=*#@@@@@@@@@@@%*=-.. ..:=*#%@@%#*=-:..::- --=*#%%@@@@@@@@%%%#*+=-:::-=+*#%%%%%#*=-:........:::-=++*####*++====+*#%@@@@@%*=-.. ..:=+#%@@@@@@@@@%#+-:. .:-+#%@@@@%#*+-::::: ::-=*#%@@@@@@@@@%%#*+=-:..:-=*#%%%#*+=:......::-==+**##%%%##*+-:. .:-+*%%@@@%#*=-:....:-+*#%@@@@@@@%#*=:.. .:=*#%@@@@@%#*=-:::. ...-=*#%@@@@@@%%#**+=-:....:-+*###*+-:.....:-=++*##%%%@@%%#*+-:. ..-+*#%%%%#*+=-::.:::-+*#%%@@@%%#*=-:. .:-+#%@@@@@@%#*+-::.. ...:=+#%%%%%##*++=--:... ..-=*##*+=:.....:-=+*#%%@@@@@@%#*+=:........:-+**###**+=--::::::--=+*####*+=-:.. ..:=*#@@@@@@%#*+=-:... ..:-=+*###*+==-:::.... .:-+*##*+=:.....:-=+*##%%@@@%%#*+-::........::-===+++==--::::....::--======-:.. ..:=*#%@@@@@%#*+--:.... :--=++**+=-::........ ..:-+*#%%#*+-:.....:-==+*######*+=-:....:::::....:::::::::::::........::::-:::.....:-=*#%@@@@%#*+=-:.....: =++**++=-::.. .....::::-=+*#%%@%%#*+-:......::-==++++=--:....::----::............::::::::::...::::::....:-=+#%%@@@%%*+=-:.....:-- *****+=-:......::--==++*##%%@@@@@%%#*+=-::......::::::::....::-=++++=-::.. ...::--===++====---:::::..::-=+*#%@@@@%#*=-:......:-=+ ###*+=-:...::--=+*###%%%@@@@@@%%%##**++==---::............::-=+*#####*+=------==++**#######**++=-:::.::-=+#%%@@@@%#*=-:.. ...:=+*# %#*+=::...:-=+*##%%@@@@@@@@@%#**+======++++++=--::.......:-=+*#%@@@@@%%##******###%%%%%@@@%%%#*+=-:..::-+*%%@@@@%#*=-... ...-=+##% %#*=:....:-=+*#%%@@@@@@@@%%#*+-::...::-+**####*++=-::...:-=+#%%@@@@@@@@@%%%%%######%%%%%@@@@%%#+=-:...:=+#%@@@@%#*=-... ..:-=+#%%% %*+-.. ..:-=*#%%@@@@@@%%#*+=-:.. ..-=*#%%%%%##*+-::.::-=*#%@@@@@@@@@%%%###****+++++**#%%%%#*+-:....:-+#%@@@%#*=-:.....:-=*#%%@% %*=:. ..:-=+*#%%%%%##*+=--:..........:-+#%%@@@%%#*=-::::-=+*#%%%%%%%##**+++==---::::::-=+*##*+=-:. .:-+#%%@%%*+-:.....:-=+#%@@@@ %*=:. ..:-==+******+=-::.............:-+*#%@@@%%#*+=-::::-=++*****++==--::::..... .:-++*+=-:.. .:-+#%%%%#*=:......:-+*%@@@@@ %#+:. ..::-======-::.......::::::::::-=+*#%%%%#*+=-::..:::-------::............ ..-=+++=-:. .:=*#%@%%#+-:.....:-=+#%@@@@@ @%*=: ..:::::::.......::-==++==--::--=+*****+==-::.............. .....:::.....::-=+**+=-:.. .:-+#%@@@%#+-:.....::-=*#%@@@@ @%#*=:. ..........::-=+**####*++=------==---::......::...... ...::--========+++*####*+-:...:-=*#%@@@%#*=-......::-=+*#%@@ @@@%*+-. ...:-=+*##%%%%%%##*+=-::::::.......::------:::....:::-==+**##########%%%%##*+=::.::=+#%@@@@@%#*=::.......:-=+#%% %@@@%#*+-:.. ..::-=+*##%%%@@@%%%#**+--:.........::-=++*****++++==+++**##%%%@@@@@%%%%%%%%##*+=-::::-=+*#%@@@@@%#*=-::........:=*# %@@@@@@%#*++====++**##%%%%%%%%###**+=-::......::--=+**##%%%%%%%####%%%%@@@@@@@@@@%%%###***++==-::::::-=+*#%@@@@@%#*+=-::... :=* #%@@@@@@@@@@%%%%%%%%%%%##**+++++==--::.....::-=++*##%%%%%%%%%%%%%%%@@@@@@@@@@%%##**++===---::::::....::-=+*#%@@@@%%#*=-::.. .:+ #%@@@@@@@@@@@@@@@@@@%#*+=--:::::::.......:-=+**##%%%%%####*****###%%%%%%%%%##*++=--:::..........:.......:-=+*%%@@@@%#*+-::.. .:= #%@@@@@@@@@@@@@@@@%%#+=-:..............:-=+*#%%%%%##**+==------===++******++=--:..... ...:::::::......:-=*#%@@@@%#*=-:... ..-+ #%@@@@@@%%%%%%%%###*+-:.............::-=*##%%%%%##*+=-::.........:::------:::.... ....:--==++==-::.. ..-=*#%@@@%%#+=::....:=+ *#####**++====++++==-::......::::--=++*#%%%%%%#*+=-:........... ...................::--=+**#####*+=-:.. ..-=*#%@@@%#*=-:...:-=+ ++++==-::.....::::::::.....::--=+**##%%@@@%%#*+=-:........::::..... .......:::--==++*##%%@@@@@@%#*+-:.. ..-=*#%%%%#*+-::..::-= ---::.. .............::-=+*#%%@@@@@%%#*+=-:.. ..::-=======--:::..:::::--==+**##%%%@@@@@@@@@@@%%*+=:.. .:-=*#%%%#*+=::..:::- .............................................................................";at_exit{$s=154129094866360313063042721822912717326} $q=%w[$w&&!$s&&exit;W=130;H=80;HS=40;puts(q="$q=%w[#$q].join;at_exit{eval($q)}".chars.each_slice(W).map(&:join).join("¥n"));$s&&$w &&(puts('$w="'+$w+?"+";at_exit{$s=#$s}¥n#{q}")||exit);srand($s||=Random.new_seed);f=0.03+0.03*rand;k=0.057+0.006*rand;g=32.chr+".: -=+*#%@";mc=800+400*rand;spt=(1..(3+5*rand)).map{{x:(W*rand).floor,y:(H*rand).floor,r2:(10+10*rand)**2}};z=(0...H).map{|y|(0...W). map{|x|{a:1.0,b:spt.any?{|s|s[:r2]>=(x-s[:x])**2+(y-s[:y])**2}&&1.0||0.0}}};n=(1..H).map{(1..W).to_a};$l=->(v,x,y,s){(l=x-1)<0&&l= W-1;(r=x+1)>=W&&r=0;(t=y-1)<0&&t=H-1;(b=y+1)>=H&&b=0;0.2*(v[y][r][s]+v[y][l][s]+v[t][x][s]+v[b][x][s])+0.05*(v[t][r][s]+v[t][l][s] +v[b][r][s]+v[b][l][s])-v[y][x][s]};print('$w="');pc=4;mc.to_i.times{|c|(0...W).map{|x|(0...H).map{|y|la=$l.call(z,x,y,:a);lb=$l.c all(z,x,y,:b);a=z[y][x][:a];b=z[y][x][:b];n[y][x]={a:(a+1.0*la-a*b*b+f*(1-a)).clamp(0,1),b:(b+0.5*lb+a*b*b-(k+f)*b).clamp(0,1)}}}; z,n=[n,z];((c+=1)/mc*W).floor>pc&&(pc+=1)&&print(?.)};puts(?.*(W-pc));dmi,dma=z.map{|l|l.map{|v|v[:a]-v[:b]}.minmax}.flatten.minma x;z.each_slice(H/HS){|l|W.times{|x|sum=l.inject(0.0){|a,l|l[x,1].inject(a){|s,v|s+((v[:a]-v[:b]-dmi)/dma)}};print(g.chars[(sum*W*H S*g.size/(W*H)).clamp(0,g.size-1).floor])};puts};ft=?"+";at_exit{$s=#$s}";puts(?.*(W-ft.size)+ft+10.chr+q)].join;at_exit{eval($q)}

Slide 29

Slide 29 text

lonelyelk.rb matz award “Most reactive and diffusive” $q=%w[$w&&!$s&&exit;W=130;H=80;HS=40;puts(q="$q=%w[#$q].join;at_exit{eval($q)}".chars.each_slice(W).map(&:join).join("¥n"));$s&&$w &&(puts('$w="'+$w+?"+";at_exit{$s=#$s}¥n#{q}")||exit);srand($s||=Random.new_seed);f=0.03+0.03*rand;k=0.057+0.006*rand;g=32.chr+".: -=+*#%@";mc=800+400*rand;spt=(1..(3+5*rand)).map{{x:(W*rand).floor,y:(H*rand).floor,r2:(10+10*rand)**2}};z=(0...H).map{|y|(0...W). map{|x|{a:1.0,b:spt.any?{|s|s[:r2]>=(x-s[:x])**2+(y-s[:y])**2}&&1.0||0.0}}};n=(1..H).map{(1..W).to_a};$l=->(v,x,y,s){(l=x-1)<0&&l= W-1;(r=x+1)>=W&&r=0;(t=y-1)<0&&t=H-1;(b=y+1)>=H&&b=0;0.2*(v[y][r][s]+v[y][l][s]+v[t][x][s]+v[b][x][s])+0.05*(v[t][r][s]+v[t][l][s] +v[b][r][s]+v[b][l][s])-v[y][x][s]};print('$w="');pc=4;mc.to_i.times{|c|(0...W).map{|x|(0...H).map{|y|la=$l.call(z,x,y,:a);lb=$l.c all(z,x,y,:b);a=z[y][x][:a];b=z[y][x][:b];n[y][x]={a:(a+1.0*la-a*b*b+f*(1-a)).clamp(0,1),b:(b+0.5*lb+a*b*b-(k+f)*b).clamp(0,1)}}}; z,n=[n,z];((c+=1)/mc*W).floor>pc&&(pc+=1)&&print(?.)};puts(?.*(W-pc));dmi,dma=z.map{|l|l.map{|v|v[:a]-v[:b]}.minmax}.flatten.minma x;z.each_slice(H/HS){|l|W.times{|x|sum=l.inject(0.0){|a,l|l[x,1].inject(a){|s,v|s+((v[:a]-v[:b]-dmi)/dma)}};print(g.chars[(sum*W*H S*g.size/(W*H)).clamp(0,g.size-1).floor])};puts};ft=?"+";at_exit{$s=#$s}";puts(?.*(W-ft.size)+ft+10.chr+q)].join;at_exit{eval($q)} $w=".............................................................................................................................. .................................................................................................................................. .................................................................................................................................. .................................................................................................................................. .................................................................................................................................. ......... ............................................................. .................................................... ...... ...... ......::---::...................::---::............ .................................................. .... ...::::::.. ..::-===--:.................:-=++==-:....... ...................................................... .... ..:-=+++=-:.. ..::-===--:................:-=++++=-:.. .:--===-:... ............................................ ... ..:-+*###*+-:. ...:::-:::..................:-====-::. ..:-=+*###*=-:. ........................................... ... ..:-=**#*+=-:. ..............................:::::.. .:-=+*#%@@@%#*=-.. .......................::::................ .... ..:--===-::.. ...................................... ..:=+#%@@@@@%#+=:. .......................::::::............... ..... ......... ......................................... .:-=*#%%%%#*+-:. ........................:::::............... ....... ............................................ ..:-=++++=-:. .............................................. ............................................................... ....::... ................................................ ................................................................ .................................................. ................................................................... ....................................................... .................................................................................................................................. .................................................................................................................................. ................................ ............................................................................................ ............................ . ......................................................................................... .....::::.................. ...::::.. ....................................................................... ............. ...:::--:::............... .:-=+++=-:.. .................................................................... ................ ...:::---::.............. ..-=*#%##+=:. ................................................................... ...:--==--:... .. ....::::::............... .:-+*#%%#*=:. ................................................................. ..:-=+**+=-:.. .. .......................... ..:=+***+=-:. ............................................ ................. ..:-+***+=-:... .. .......................... ..::----:.. ......................................... ..... .............. ...:-====-:....... ........................... ...... ......................................... ...:::::... .............. ....::::......... ............................ ........................................... ..:-=+++=-:.. ............... ...... ...... .............................. ............................................. ..:-+*##*+=-:. ............................... .................................................................................. ..:-=+***+=:.. ............................... ..........................::----:................................................. ..::-===-:... ............................... .........................:-==+==-:................................................. ......... ................................ .........................:-==++=-:.................................:................. ................................... ..........................:-----::................................................................................................ .............................:.................................................................................................... .................................................................................................................................. .................................................................................................................:::.............. ...............................................................................................................:::::::............ ...............................................................................................................:::::::............ .................................................................................................................:::.............. .............................................................................";at_exit{$s=207048293170487523485800825757960625670} $q=%w[$w&&!$s&&exit;W=130;H=80;HS=40;puts(q="$q=%w[#$q].join;at_exit{eval($q)}".chars.each_slice(W).map(&:join).join("¥n"));$s&&$w &&(puts('$w="'+$w+?"+";at_exit{$s=#$s}¥n#{q}")||exit);srand($s||=Random.new_seed);f=0.03+0.03*rand;k=0.057+0.006*rand;g=32.chr+".: -=+*#%@";mc=800+400*rand;spt=(1..(3+5*rand)).map{{x:(W*rand).floor,y:(H*rand).floor,r2:(10+10*rand)**2}};z=(0...H).map{|y|(0...W). map{|x|{a:1.0,b:spt.any?{|s|s[:r2]>=(x-s[:x])**2+(y-s[:y])**2}&&1.0||0.0}}};n=(1..H).map{(1..W).to_a};$l=->(v,x,y,s){(l=x-1)<0&&l= W-1;(r=x+1)>=W&&r=0;(t=y-1)<0&&t=H-1;(b=y+1)>=H&&b=0;0.2*(v[y][r][s]+v[y][l][s]+v[t][x][s]+v[b][x][s])+0.05*(v[t][r][s]+v[t][l][s] +v[b][r][s]+v[b][l][s])-v[y][x][s]};print('$w="');pc=4;mc.to_i.times{|c|(0...W).map{|x|(0...H).map{|y|la=$l.call(z,x,y,:a);lb=$l.c all(z,x,y,:b);a=z[y][x][:a];b=z[y][x][:b];n[y][x]={a:(a+1.0*la-a*b*b+f*(1-a)).clamp(0,1),b:(b+0.5*lb+a*b*b-(k+f)*b).clamp(0,1)}}}; z,n=[n,z];((c+=1)/mc*W).floor>pc&&(pc+=1)&&print(?.)};puts(?.*(W-pc));dmi,dma=z.map{|l|l.map{|v|v[:a]-v[:b]}.minmax}.flatten.minma x;z.each_slice(H/HS){|l|W.times{|x|sum=l.inject(0.0){|a,l|l[x,1].inject(a){|s,v|s+((v[:a]-v[:b]-dmi)/dma)}};print(g.chars[(sum*W*H S*g.size/(W*H)).clamp(0,g.size-1).floor])};puts};ft=?"+";at_exit{$s=#$s}";puts(?.*(W-ft.size)+ft+10.chr+q)].join;at_exit{eval($q)}

Slide 30

Slide 30 text

lonelyelk.rb • Reaction-Diffusion System – A mathematical model of patterns like giraffes, cheetahs, fishes, etc. – Simulates reaction and diffusion of chemical substances • … and Quine – It shows itself twice, at the top and at the bottom – All the following commands work well matz award “Most reactive and diffusive” $ ruby entry.rb $ ruby entry.rb | ruby $ ruby entry.rb | head | ruby $ ruby entry.rb | tail | ruby

Slide 31

Slide 31 text

lonelyelk.rb • Judges' comments – matz: I love this kind of thing. – eto: Very beautiful. – flagitious: Impressive evolving rendering quine. matz award “Most reactive and diffusive”

Slide 32

Slide 32 text

Winner » eto shinh yhara matz leonid flagitious mame score “Most global” 『最もグローバルで賞』 Yusuke Endoh eto award 9 8 8 5 8 9 N/A 7.83

Slide 33

Slide 33 text

mame.rb eto award “Most global” a=0132;eval$s=%q!eval(%q~d,h,Y ___---------___ ,X=*$*.map(&:to_i),45;b=(a+d)% R=360;s=[v=[include(Math)]] _--- ---_ ;T=PI*2;n=x=0;f=->{(n/=2)%2 >0?1:f[]*2+(n/=2)%2};g=- _- v@v ,,,,,, -_ >{z=f[];z/2*(3-z%2*6)};" 8'8f'y;I;asr1mY?Sr$6r _- ,vv@@@@@@@^''@v,-_ {+Gi{03G3=ZbpUo3l'}Yw CqxJfHIWd'R /v ,@@@@@@@@@@@v ^^^'''^@@@@¥ MUS4&$r3D>GqL((/C ea&e'|PS@3aQ@-hL /@@ ,v@@@@@@@@@@@@@@v, '*v, '^@¥ ja+/Lru>]96]d_4W 9o][*A;J&..;a?@ /@@@ @@@@@@@@@@@@@@@@@@@v,,,@@@@@ @@¥ O'x.RmTPRK+Pol# U;o_wP`}6.g#?y |@@@@v, '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| 0`.lHNxLXjI^#S 5F-XcldGh_BZDc |@@@@@^ '^^@@@@@@@@@@@@@@@@@'@@@@ '@@@@| JTLKD)#e*CUo$. {c&a46;+AaGW*M |@@@@' '^@@@@@@@@@@@@@ @@@@@v '@@| R5".bytes{n=n* 90+-_1%91};190 |@@^ @@@@@@@@@@@@@ ^^^''' '@| .times{x+=e=(g []+g[].i)*T/R; |^' @@@@@@@@@@@@@vv, @| e==0?s<<<(1..(d==0 ?h*w=h*4:25*w= | ,@@@@@@@@@@@^' | 80)).map{|i|q= i/w*6+3;r=i%w;" ¥ v@@@@@@@@@@@ / ¥s'*^,:v@¥nXa=# {"%04o"%b};eval$ ¥ @@@@@@@@@@@@ / s=%q¥x21#$s¥x21" [r>0?X&&r==(X+168 ¥ @@@@@@@@^' ,v* / )%R*w/R&&q/6==(90 -Y)*h/180?9:(0..2) ¥ ^^^^^^' ,^ / .all?{e=d==0?cos(q* T/w/3):(r*3i-120i-q+ ¥ / 73)/Complex.polar(72 ,2/4.9);q-=2;y,x=e.re -_, _- ct;e.abs<1&&n+=n-s.ma p{|s|z=sqrt(1-y*y);c=d== -_v,, _- 0?r*T/(1-w):b*T/R+acos(x );g=0;s.sum{(g-g=atan2(sin( --__v, __-- o=_1+c),z/tan(_2)+y*cos(o)) /T).round}}.min/9}?n%8:i+9:8]} ```---------``` *""~.gsub(/¥x20.*¥x20|¥n/){})!

Slide 34

Slide 34 text

mame.rb • It prints itself with a globe rotated 45 degrees – Eight execution will return the original code • The rotation angle can be specified freely eto award “Most global” a=0132;eval$s=%q!eval(%q~d,h,Y ___---------___ ,X=*$*.map(&:to_i),45;b=(a+d)% R=360;s=[v=[include(Math)]] _--- ---_ ;T=PI*2;n=x=0;f=->{(n/=2)%2 >0?1:f[]*2+(n/=2)%2};g=- _- v@v ,,,,,, -_ >{z=f[];z/2*(3-z%2*6)};" 8'8f'y;I;asr1mY?Sr$6r _- ,vv@@@@@@@^''@v,-_ {+Gi{03G3=ZbpUo3l'}Yw CqxJfHIWd'R /v ,@@@@@@@@@@@v ^^^'''^@@@@¥ MUS4&$r3D>GqL((/C ea&e'|PS@3aQ@-hL /@@ ,v@@@@@@@@@@@@@@v, '*v, '^@¥ ja+/Lru>]96]d_4W 9o][*A;J&..;a?@ /@@@ @@@@@@@@@@@@@@@@@@@v,,,@@@@@ @@¥ O'x.RmTPRK+Pol# U;o_wP`}6.g#?y |@@@@v, '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| 0`.lHNxLXjI^#S 5F-XcldGh_BZDc |@@@@@^ '^^@@@@@@@@@@@@@@@@@'@@@@ '@@@@| JTLKD)#e*CUo$. {c&a46;+AaGW*M |@@@@' '^@@@@@@@@@@@@@ @@@@@v '@@| R5".bytes{n=n* 90+-_1%91};190 |@@^ @@@@@@@@@@@@@ ^^^''' '@| .times{x+=e=(g []+g[].i)*T/R; |^' @@@@@@@@@@@@@vv, @| e==0?s<<<(1..(d==0 ?h*w=h*4:25*w= | ,@@@@@@@@@@@^' | 80)).map{|i|q= i/w*6+3;r=i%w;" ¥ v@@@@@@@@@@@ / ¥s'*^,:v@¥nXa=# {"%04o"%b};eval$ ¥ @@@@@@@@@@@@ / s=%q¥x21#$s¥x21" [r>0?X&&r==(X+168 ¥ @@@@@@@@^' ,v* / )%R*w/R&&q/6==(90 -Y)*h/180?9:(0..2) ¥ ^^^^^^' ,^ / .all?{e=d==0?cos(q* T/w/3):(r*3i-120i-q+ ¥ / 73)/Complex.polar(72 ,2/4.9);q-=2;y,x=e.re -_, _- ct;e.abs<1&&n+=n-s.ma p{|s|z=sqrt(1-y*y);c=d== -_v,, _- 0?r*T/(1-w):b*T/R+acos(x );g=0;s.sum{(g-g=atan2(sin( --__v, __-- o=_1+c),z/tan(_2)+y*cos(o)) /T).round}}.min/9}?n%8:i+9:8]} ```---------``` *""~.gsub(/¥x20.*¥x20|¥n/){})! a=0207;eval$s=%q!eval(%q~d,h,Y ___---------___ ,X=*$*.map(&:to_i),45;b=(a+d)% R=360;s=[v=[include(Math)]] _---@^^@@, ^@@@@---_ ;T=PI*2;n=x=0;f=->{(n/=2)%2 >0?1:f[]*2+(n/=2)%2};g=- _-@@@''''' *^ ''^^^v-_ >{z=f[];z/2*(3-z%2*6)};" 8'8f'y;I;asr1mY?Sr$6r _-^''@^ -_ {+Gi{03G3=ZbpUo3l'}Yw CqxJfHIWd'R / ^@ ^@v¥ MUS4&$r3D>GqL((/C ea&e'|PS@3aQ@-hL / ,,v@@@@¥ ja+/Lru>]96]d_4W 9o][*A;J&..;a?@ / v@@@vv, ,:'''''@¥ O'x.RmTPRK+Pol# U;o_wP`}6.g#?y | @@@@@@@@v ,v@@@@@@vv^ | 0`.lHNxLXjI^#S 5F-XcldGh_BZDc | @@@@@@@@@@, v@@@@@@@@@@@, | JTLKD)#e*CUo$. {c&a46;+AaGW*M | @@@@@@@@@@@ v@@@@@@@@@@@@@@@| R5".bytes{n=n* 90+-_1%91};190 | ^@@@@@@@@@@@v, @@@@@@@@@@@@@@@| .times{x+=e=(g []+g[].i)*T/R; | @@@@@@@@@@@@@@ '@@@@@@@@@@@@@@| e==0?s<<<(1..(d==0 ?h*w=h*4:25*w= | ,@@@@@@@@@@@@^ @@@@@@@v| 80)).map{|i|q= i/w*6+3;r=i%w;" ¥ v@@@@@@@@^^'' @@@@@@^/ ¥s'*^,:v@¥nXa=# {"%04o"%b};eval$ ¥@@@@@^' @@@@@@'/ s=%q¥x21#$s¥x21" [r>0?X&&r==(X+168 ¥^' v@@@@@ / )%R*w/R&&q/6==(90 -Y)*h/180?9:(0..2) ¥ v@@@@@/ .all?{e=d==0?cos(q* T/w/3):(r*3i-120i-q+ ¥ @@@@@/ 73)/Complex.polar(72 ,2/4.9);q-=2;y,x=e.re -_ @@@_- ct;e.abs<1&&n+=n-s.ma p{|s|z=sqrt(1-y*y);c=d== -_ _- 0?r*T/(1-w):b*T/R+acos(x );g=0;s.sum{(g-g=atan2(sin( --__ __-- o=_1+c),z/tan(_2)+y*cos(o)) /T).round}}.min/9}?n%8:i+9:8]} ```---------``` *""~.gsub(/¥x20.*¥x20|¥n/){})! 45-degree rotation

Slide 35

Slide 35 text

mame.rb • Q. "Didn't you create the same thing?" • A. Yeah, @mame have created "Qlobe" eto award “Most global” v=0000;eval$s=%q~d=%!^LcfYoP 4ZojjV)O>qIH1/n[|2yE[>:ieC "%.#% :::##" 97N-A&Kj_K_>

Slide 36

Slide 36 text

mame.rb • Q. What is the difference from Endoh's work? • A. Many new features and improvements! – The tilted rotational axis (23.4 degrees!) – Very compressed polygon map data (only 286 letters!) – Robust spherical trigonometry – Map dump with a mark of specified lat/long eto award “Most global”

Slide 37

Slide 37 text

mame.rb eto award “Most global” $ ruby entry.rb dump ,,,,,,,,,,, ,,vvv@@@@@@@@@@@@@@@@@ ''^^@@@@@@@@@@@@@@@@@@@@ ,,,vvvv@@@vvvv,,, ,,,,,, ,,,,,,,,,,''^vvv,, '^@@@@@@@@@@@@@@^^* ,,,,, @ ,vv@@@@@@@@@@@@@@@@@@@@@@vv,,vvvvvvvvvv@vvvvvvvvvv,, vv@@@@@@@@@@@@@@@@@@@@@vvvv@@@@@@@@@@@@' ,v@@@@@* '^@@@@@^^'' ,v@@@@@@@@@@@*,,,,,vvvvvvvvv@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@v,, @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@' '''^^^ '^^' ,v@@@^ ^^^^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^'' ''' '''^^@@@@@@@@@@@@@@@@@@@@, ,@@@vv,, , *@@@@' ,v@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^^^''' v^^''' '^@@@@@@@@@@@@@@@@@@@@vv, @@@@@@@@@@v, @@, v@@@@@@vv@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ' '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^^''v ^^'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@v ^@@@@@@@@@@@@@@@@@@@@@@@@@@:,,, *^^ ,@@@@@@@@^@@@@@@@^^''''''^^^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^' '@@@@@@@@@@@@@@@@@@@@@@@@^'' v@@@@^^'^@ '@@@^ ,v @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@' @@@@@@@@@@@@@@@@@@@@@' ^^^^' ' ^' ''^^@@@@@@@,:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ v @@@@@@@@@@@@@@@@@@@' ,vvv@@@@@@, @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ' *^^ @@@@@@@@@@@@^'^@@^ ,@@@@@@@@@@@@@vvvvvvvvv@@@@@@'^^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ^'^@@@@@^' '^ ,@@@@@@@@@@@@@@@@@@@@@@^@@@@@@@,,, ''^^@@@@@@@@@@@@@@@@@@@@@@@@@@@ '@@@@@ , v@@@@@@@@@@@@@@@@@@@@@@@@'@@@@@@@@@@* '^@@@@@@@@@^^@@@@@@@^^'' '^^@@@@ v@@@@@@@@@@@@@@@@@@@@@@@@@@ ^@@@@@^' '@@@@^'' ^@@@@: '^^@@v v@@@@@@@@@@@@@@@@@@@@@@@@@@@@ '^' ^@@ '@@@@v '^ ,,,,, ^@@@@@@@@@@@@@@@@@@@@@@@@@@@@,,,, @' ''@@@^ , v@@@@@@@@@v, ^@@@@@@@@@@@@@@@@@@@@@@@@@@@@^ ' ' @ @@@@@@@@@@@@v, @@@@@@@@@@@@@@@@@' ,,vv',,, v@@@@@@@@@@@@@@v,, @@@@@@@@@@@@@@^ @@@@ @@ ,, @@@@@@@@@@@@@@@@@@@@@v @@@@@@@@@@@@@ * ''' ^@@vv, '@@@@@@@@@@@@@@@@@@@@' @@@@@@@@@@@@@ '''^* ^@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@ , ,v@@v, @, ^@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@ v@^ ,v@@@@@@@@@@@ ,@@@@@@@@@@@@@' ^@@@@@@@@@@@^ @^ ,v@@@@@@@@@@@@@@@ @@@@@@@@@@@@^ '@@@@@@@@@^ ' @@@@@@@@@@@@@@@@@@, @@@@@@@@@@', '@@@@@@^' ^@@@@@@@@@@@@@@@@@@ v@@@@@@@^' ^^' ^^^^''' '^@@@@@@@ @@@@@@@ '^@@@ ^v ,@@@@@@ ' @@@@@^ ^@@@' '' ' ,,vv,,, ,,,vvvvvv,,,,,,,,vvvvv,, ,,,,,,vvv@@@@@@@@@@@@@ ,vv@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@vvvv,,,,,,,, ,,,,,,, ,,,,*' ,v@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,vv@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^' vvvv@@@@@@@@@@@@@@@@@@@@@@@@v@@@@@@@@@@@@@^' ,,vv@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^^' ^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@vvvv,,,,,,,,,,,,,,,vvvvv@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@vv,,, vvv,,,,::@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@vvvvvvv

Slide 38

Slide 38 text

mame.rb eto award “Most global” $ ruby entry.rb dump 40 36 140 ,,,,,vvvvvvvvv, vv@@@@@@@@@@@@@@@@@@, ,,,,,, **,,,, ''^@@@@@@@@@@@@@@@@ , ,,vvv@@@@@@@@@@@@vvv,, ,,,,,,,,,,,,,,,, ,,vvvvvvvvvvvvvvvvvv,,,,vvvvv@@@@@@' '@@@vv, '@@@@@@@@^''' ,v@@@@@vvvv, ,,,,,,,,@,v@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@, @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@' '^^@@' '^^^' v@@@^v@@@@@@v@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^^ '''' '''^@@@@@@@@@@@@@@@@@@@ @@vv,, , @@@@' ,v@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^^^'''' v^^''' '^@@@@@@@@@@@@@@@@@@v, @@@@@@@@@v, @v,,@@@@@@v@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ *' '@@@@@@@@@@@@@@@@@@@@@@@@@@^^'',@ ^':@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@* ^@@@@@@@@@@@@@@@@@@@@@@@v** ''' v@@@@@@@'@@@@@^'''''''''^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@' '@@@@@@@@@@@@@@@@@@@^'' ,@@@^'' '@ '@@' ,,,,,,v@, @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@' '@@@@@@@@@@@@@@@@@@ '':,,,vvv, '@@@@@@v@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'^@ vX '@@@@@@@@@@@@^@@@ v@@@@@@@@@@,,,,,,,,,@@@@@^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@' '@^@@@@@@^' '^' v@@@@@@@@@@@@@@@@@@:@@@@@@v ''^^@@@@@@@@@@@@@@@@@@@@@@@@@ ^@@@v @@@@@@@@@@@@@@@@@@@@@v^@@@@@@@@v ''^@@@@@@@@^@@@@@@@^^'' '^^@v@' @@@@@@@@@@@@@@@@@@@@@@@v'@@@@^' @@@@^'' '@@@@: ''^@@ @@@@@@@@@@@@@@@@@@@@@@@@@, ^' @@ @@@@v '* ,,,,,vvv ^@@@@@@@@@@@@@@@@@@@@@@@@vvv* ' :^@^' , @@@@@@@@@@v ^^^^^^^^^@@@@@@@@@@@@@@@@' , ' @@@@@@@@@@@@v ^@@@@@@@@@@@@@^ v@@ vv @@@@@@@@@@@@@@@@vv,, ^@@@@@@@@@@@' , ^^' '' '*vv,, ^@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@, ''^^*, '^@@@@@@@@@@@@@@@^ @@@@@@@@@@@@ ,vv, ,v '^@@@@@@@@@@@@@ @@@@@@@@@@@@' @' ,v@@@@@@v@@v @@@@@@@@@@@@' '@@@@@@@@@@' ' ,v@@@@@@@@@@@@@v @@@@@@@@@@' '@@@@@@@@ ^@@@@@@@@@@@@@@@v @@@@@@@@^'^ '@@@^'' @@@@@@^@@@@@@@@@ @@@@@@' ' ''' '^@@@@@ , v@@@@@' '^ '' @@@@@' @@@^ '' , ,,vvv@@vvv,, ,,,,vvv@@@@@@vvvvvv@@@@@vvv,,, , ,vvvvvvvvvvvvvvvv@@@@@@@@@@@@@@@@@ ,,vv@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@vvvv* ,,,,vvvv@@@@vvvvvvvvvv,,,,,,vvvvvvvvv@^' ,vv@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^' ^@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@v,,,, ,,,,,,vvv@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,, ,,,,,,:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@vvvvvvvv, 36°N 140°E Here! This feature is an homage to IOCCC 1992 "Best Small Program"

Slide 39

Slide 39 text

mame.rb • Judges' comments – eto: Earth! High artistic point. It contains polygon data of the world map. Very interesting. – shinh: The compression ratio looks amazing. I think there is enough difference from "Qlobe". – mame (camouflage comment): It is almost the same as my "Qlobe", but there seems to be enough novelty in the technical aspect. eto award “Most global”

Slide 40

Slide 40 text

Winner » eto shinh yhara matz leonid flagitious mame score “Most accessible” 『最もアクセシビリティがある賞』 Yutaka HARA leonid award 8 6 N/A 9 10 8 8 8.00

Slide 41

Slide 41 text

yhara.rb leonid award “Most accesible” %;;;;Symbol.define_method(:method_missing){|n|t="#{self}#{n[..-2]}"; n[-1]=="⠠" && eval(t.unpack("U*").map{((_1&64)/8+(_1&56)*2+(_1&135)).chr}*""+t)||:"#{self}#{n}"} :⠥⠥⠥⠐⡝⠐⠒⡬⠽⠚⡘⠚⠘⠒⡂⡦⠐⡝⠐⡘⠙⡂⠴⠵⠶⠐⠶⠼⡐⠻⡑⠐⠓⡕⡞⠐⠫⠼⠺⡱⡶⠷⡂⠼⡝⡫⡭⡂⡴⡝⠻⡖⠳⡰⠱⠺⠻⡂⠶⡔⠺⡝⡴⡫⠘⡔⡦⡕⠙⡭⡔⡴⡫⡦⡕⠙⡖⡖⡭⡂. ⠼⡜⡜⠒⡚⠓⡻⠶⡖⡲⡷⡱⡶⡽⡖⠒⡂⡒⠱⡔⡺⡝⠺⡖⠵⠱⠳⡰⡯⠻⡴⡱⠳⠵⡐⡦⡑⡖⡵⠱⠸⡐⠖⡚⡲⡷⡱⡶⡑⡂⠱⡖⠵⠱⠳⡰⡻⡼⡴⡼⠐⠼⡜⡜⠒⠓⡻⡴⡽⡖⠒⡽⡂⠼⡜⡜⠒⠓⡻⡺⡽. ⠓⡻⠥⠥⠥⡽⠒⡂⠼⡖⡲⡷⡱⡶⡐⠒⡬⡶⠒⡑⡂⠵⡶⠴⡂⡠⠐⡝⠐⠕⠹⡻⠕⡛⡛⡛⡛⠫⡹⡵⠲⡷⡴⡖⠴⠵⠶⡱⡶⠵⡯⡵⠵⠼⡰⡷⠴⡐⡚⡵⠵⠼⡰⡷⠴⡯⡵⡱⠻⠻⡱⡶⠷⡑⡻⡼⡶⡼⠼⡝⠒. ⠓⡻⠻⠵⡴⠶⡽⠓⡻⡶⡫⡖⡖⡕⠚⡭⡽⠒⡛⠐⡶⡫⡕⠙⡭⡝⡝⠒⡬⠽⠚⡘⠚⠘⠒⠐⠖⠖⡂⠵⠾⠱⡴⡐⠼⡖⠽⡶⠸⠱⠳⡳⡐⠒⠭⡒⠒⡑⡖⡵⠱⠸⡻⡐⡐⡯⠙⠖⠞⠜⡑⡗⡘⡓⡐⡯⠙⠖⠝⠞⡑. ⡒⠚⡓⡐⡯⠙⠖⠙⠛⠝⡑⡑⡖⠳⡰⠺⡽⡒⠒⠒⡓⠼⡑⡼⡼⡚⠒⠓⡻⠻⠵⡴⠶⡽⠓⡻⡶⡽⠒⡽⡂⡽⡖⠷⠻⠽⠲⠐⠒⡬⡬⠽⠚⡘⠚⠘⠒⡔⠒⡬⠽⠚⡘⠚⠘⠒⡂⡠⡠⠐⡝⠐⡠⡖⠷⠻⠽⠲⠐⡗⡖. ⡗⡔⠒⠐⠒⡂⠴⠵⠶⠐⠴⠵⠳⡐⠳⡑⡂⠺⠵⠼⠽⠺⡶⠐⠳⠐⡱⠶⠐⠳⡝⡝⠒⡚⠒⡼⡼⠳⡝⡝⠒⡖⠒⡂⠽⠐⡝⠐⠳⡖⠽⡶⠸⠱⠳⡳⡐⠒⠭⡒⠒⡑⡫⠘⡭⡂⡐⠽⠖⠞⠜⡑⡗⡘⡓⡐⠽⠖⠝⠞⡑. ⡒⠚⡓⡐⠽⠖⠙⠛⠝⡑⡂⠵⡶⠴⡂⠴⠵⠶⠐⠺⠴⡐⠸⡸⡔⠐⠿⡔⠐⡰⡑⡂⡐⠘⡖⡖⡖⡰⡗⠜⡑⡖⠵⠱⠳⡰⡻⡼⠾⡼⡂⡐⠘⡖⡖⡖⠿⡗⠚⡑⡖⠵⠱⠳⡰⡻⡼⠽⡼⡂⡸⡝⠽⡒⠚⡛⡹⡝⠾⡒⠜. ⡂⡳⡝⠸⡸⡫⡹⡭⡫⡸⡭⡂⡱⠶⠐⠫⠼⠺⡱⡶⠷⡝⡝⡝⡳⠐⡂⠸⠺⡱⡶⠼⠐⡳⡂⠵⡴⠻⡱⠶⠐⡳⡂⡶⡝⠸⡸⡫⡹⡭⡫⡸⡭⡼⠸⡸⡫⡹⡭⡫⡸⡓⠙⡭⡜⡜⠛⡼⡂⠸⡸⡫⡹⡓⠙⡭⡫⡸⡭⡜⡜. ⠙⡼⠸⡸⡫⡹⡓⠙⡭⡫⡸⡓⠙⡭⡜⡜⠜⡼⡂⠸⡸⡫⡹⡓⠚⡭⡫⡸⡭⡜⡜⠚⡼⠸⡸⡫⡹⡓⠚⡭⡫⡸⡓⠙⡭⡜⡜⠝⡼⡂⠸⡸⡫⡹⡓⠛⡭⡫⡸⡭⡜⡜⠞⡼⠸⡸⡫⡹⡓⠛⡭⡫⡸⡓⠙⡭⡜⡜⠟⡂⠸. ⠺⡱⡶⠼⠐⡫⠘⡸⠚⡘⠘⠘⡓⡶⡭⡖⠸⠱⠳⡳⡐⠒⠭⠒⡑⡂⠵⡶⠴⡂⡽⡂⠸⠽⠼⠻⡂⡽⡂⠵⡶⠴⡂⠴⠵⠶⠐⠺⠽⡶⡐⡸⡑⡂⠸⠺⡱⡶⠼⠐⠒⠕⠕⡬⡶⡬⠵⡫⠚⡢⠒⡂⠳⠳⡝⠶⠼⡐⡸⡖⠼. ⡷⡯⠻⡑⡖⡴⡱⡶⠵⠻⡖⡵⠱⠸⡻⡯⠙⡖⠳⡰⡷⡵⠸⡖⠳⡰⠱⠺⠻⡽⡂⡵⠻⡝⠳⠳⡖⠶⡴⠱⠼⡯⡵⠱⠸⡻⡼⠺⡷⠿⡼⡂⡐⠘⡖⡖⠛⡑⡖⡵⠱⠸⡻⡼⡹⡹⡼⡂⠺⡷⠿⡖⠶⡴⠱⠼⡯⡵⠱⠸⡻. ⡼⠳⡼⡂⡶⡝⠴⠵⠳⡐⠳⡑⡂⡱⠶⠐⡡⡶⠼⠵⠷⠵⠺⡝⡝⡝⡶⡂⡫⡶⡫⡹⡹⡓⠘⡭⡔⡶⡫⡹⡹⡓⠜⡭⡭⡂⠵⡴⠻⡱⠶⠐⡹⡹⡝⡝⠘⡂⡫⡶⡔⠘⡭⡂⠵⡴⠻⠵⡂⡫⠘⡔⠘⡭⡂⠵⡶⠴⡂⡽⡂. ⡽⡂⡽⡂⠳⠺⡝⡵⠻⡖⡵⠱⠸⡻⡯⠙⡖⡵⠱⠸⡻⠘⡽⡽⡂⡰⡝⠳⠺⡖⠻⡱⡺⠵⡂⠿⡝⠳⠺⡫⠘⡭⡖⠻⡱⡺⠵⡂⠾⡝⡐⠘⡖⡖⡖⠿⡑⡖⠶⡴⠱⠼⡯⡵⠱⠸⡻⡼⡸⡼⡐⠘⡖⡖⡖⡰⡑⡖⡵⠱⠸. ⡻⡼⡹⡼⡫⡸⡔⠐⡹⡭⡽⡽⡖⠻⡰⠽⠶⠶⡴⠵⡂⡶⡝⠙⡂⠴⡶⡝⠙⡖⠘⠚⠘⡂⡴⡷⡷⠸⠐⠴⡷⡂⠸⠺⡱⡶⠼⠐⠒⡬⠵⡫⠙⡛⠙⡠⠒⡂⡶⡖⠶⡴⡷⡷⠺⡖⠼⡱⡵⠵⠻⠐⠴⡷⡂⡸⡔⡹⡝⠾⡖. ⠻⡰⡱⠶⠼⡂⠳⡝⡵⠻⡫⡹⡭⡫⡸⡭⡂⠳⠺⡫⡹⡭⡫⡸⡭⡝⠳⠐⡱⠶⠐⠳⡂⠾⡖⠵⡵⠸⠼⡹⡟⠖⠖⠲⠺⠵⠱⡳⡂⠵⡶⠴⡂⡶⡒⡝⠴⡶⡂⠸⠽⠼⠻⠐⡠⡠⡂⠺⠴⠐⠳⠺⡔⠿⡔⡰⡂⠻⡴⠵⠵. ⠸⠐⠘⡖⠘⠙⡂⠲⠺⠵⠱⡳⠐⡱⠶⠐⠾⡖⠵⡵⠸⠼⡹⡟⡂⠵⡶⠴⡂⠸⠺⡱⡶⠼⠐⠒⡬⠵⡫⠙⡛⠙⡠⠒⡂⠸⠽⠼⠻⠐⡠⡂⠸⠽⠼⠻⠐⠳⠳⡖⡵⠱⠸⡐⠖⡚⡲⡷⡱⡶⡑⡂⠵⡶⠴⡂⠺⠽⡶⠐⡚⠠

Slide 42

Slide 42 text

yhara.rb • The braille part is a symbol and method chain • This braille part represents the main code – Eight-dot braille represents a byte (8-bit) sequence leonid award “Most accesible” :⠥⠥⠥ … ⡖⡭⡂. ⠼⡜⡜⠒ … ⡻⡺⡽. ⠓⡻⠥⠥ … ⠼⡝⠒. ︙ ︙ ⠸⠐⠘⡖ … ⡶⠐⡚⠠ Symbol's colon Symbol's body method call's period method name

Slide 43

Slide 43 text

yhara.rb • Judges' comments – eto: Cool animation that the dots appear slowly. It's unprecedented as the beauty of the source code. – shinh: Very impressive. – mame: Abuse of Braille! leonid award “Most accesible”

Slide 44

Slide 44 text

Winner » eto shinh yhara matz leonid flagitious mame score “Most orderly code” 『最も整然としたコードで賞』 Tomoya Ishida (tompng) shinh award 7 10 10 7 8 9.5 9 8.64

Slide 46

Slide 46 text

tompng.rb • One-dimensional cellular automaton shinh award “Most orderly code” $ ruby tompng3/entry.rb # ### ## # ## #### ## # # ## #### ### ## # # # ## #### ###### ## # ### # ## #### ## # ### ## # # #### ## # ## #### ## # # #### ## # ### ## ## # # ## #### ## ### ### ## ### ## # # ### # ### # # ## #### ## # # ##### ####### ## # ### #### # ### # ## #### ## ### ## ## # ### ## # # ### # ## ### #### ## # ## #### ## # ###### # # ### #### ## # ### #### #### ### ## # # ## #### ## ### # ## # # # ### ### ## # # ### # ### ## # ### ## # # # # ## #### ## # ### # # #### # # ## ###### ## # ### #### ## ##### # ##### # # # ## #### ## ### # ## # # ## # ##### ### ## # # ### # ## # #### ## # ## ## # ## # ## #### ## # ### # # # ### #### # ## # ## # #### ## # ### #### #### ## ## ### # # #### # # # ## #### ## ### # ## # # ### # ## #### ### ## ### ## # # ### # ## # # ##### # ###### # # ## # # # ## #### ## # ### # # #### #### #### ## # # ######### $ ruby tompng3/entry.rb 90 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

Slide 47

Slide 47 text

tompng.rb • It is very difficult to read this piece • The main TRICK: – If a local variable x is defined, it is a division – If a local variable x is not defined, it is a method call shinh award “Most orderly code” x /y #/ x(/ y #/) x / y #/

Slide 49

Slide 49 text

tompng.rb • A simplified version – This executes "code1" and reloads itself – Note that a local variable "a" is now defined! shinh award “Most orderly code” a /%!(?)/ =~ %! if + %! - %[ #! if (code2; exit) #] if (code1; false) eval(File.read($0))

Slide 51

Slide 51 text

tompng.rb • When a local variable "a" defined – Execute "code2" • This code executes "code1" and then "code2" as a whole shinh award “Most orderly code” a /%!(?)/ =~ %! if + %! - %[ #! if (code2; exit) #] if (code1; false) eval(File.read($0))

Slide 53

Slide 53 text

tompng.rb • Judges' comments – shinh: Ruby is Lisp-2 but not Lisp. This piece makes good use of this fact. I like it. – yhara: Definitely the hardest to read. – flagitious: Cool cellular automaton based on parsing trick, no eval abuse, short. – mame: Amazing obfuscation unique to Ruby! shinh award “Most orderly code”

Slide 54

Slide 54 text

Top three awards

Slide 55

Slide 55 text

Winner » eto shinh yhara matz leonid flagitious mame score “Most anti-gravity” 『最も反重力で賞』 Yusuke Endoh 8 10 9 8 9 9 N/A 8.83

Slide 56

Slide 56 text

“Most anti-gravity” mame2.rb 2022;"# .chars} {puts'TRICK+2022' ¥ { ; #';$><< b ?! };#{s=' ' # 0 ! s[0]? ( b=$<.read ;' } ub( ,''} ';a= ''<<32 b.lines {puts( ?.. *( b.size) .gsub(/./) { b.sub!( /^#$`¥K(¥S) /x,a)?$1:a } .rstrip)}): ( [ 12,1,12,11]. cycle { | i | t = ( s * 10<< 10)* 10+ %(¥e[A)* 10 10. times{t[i* _1 ] = 'TRICK+2022'[ _1 ] };$><

Slide 57

Slide 57 text

“Most anti-gravity” mame2.rb 2022;"# .chars} {puts'TRICK+2022' ¥ { ; #';$><< b ?! };#{s=' ' # 0 ! s[0]? ( b=$<.read ;' } ub( ,''} ';a= ''<<32 b.lines {puts( ?.. *( b.size) .gsub(/./) { b.sub!( /^#$`¥K(¥S) /x,a)?$1:a } .rstrip)}): ( [ 12,1,12,11]. cycle { | i | t = ( s * 10<< 10)* 10+ %(¥e[A)* 10 10. times{t[i* _1 ] = 'TRICK+2022'[ _1 ] };$><<<

Slide 58

Slide 58 text

“Most anti-gravity” mame2.rb 2022;"# .chars} {puts'TRICK+2022' ¥ { ; #';$><< b ?! };#{s=' ' # 0 ! s[0]? ( b=$<.read ;' } ub( ,''} ';a= ''<<32 b.lines {puts( ?.. *( b.size) .gsub(/./) { b.sub!( /^#$`¥K(¥S) /x,a)?$1:a } .rstrip)}): ( [ 12,1,12,11]. cycle { | i | t = ( s * 10<< 10)* 10+ %(¥e[A)* 10 10. times{t[i* _1 ] = 'TRICK+2022'[ _1 ] };$><<< b .gsub(''<<32,'') };#?!=' ' 12,{puts()?..¥*: !;s{s]? ( i |ub(/./`¥{(}S* }.a[0es [ = s/x/^#$$1Ka[}[ '.l=ne) | 1,,a)?ri:)2) b.siz!( ] 't.rst1]p* i bysib1( ] lT12,1[s.* ' b0cue1{ }%=¥(eA)t c0K}t 10. }$ < ) 1 p 1 1 " upward gravity "Left gravity" program

Slide 59

Slide 59 text

“Most anti-gravity” mame2.rb 2022;"# .chars} {puts'TRICK+2022' ¥ { ; #';$><< b ?! };#{s=' ' # 0 ! s[0]? ( b=$<.read ;' } ub( ,''} ';a= ''<<32 b.lines {puts( ?.. *( b.size) .gsub(/./) { b.sub!( /^#$`¥K(¥S) /x,a)?$1:a } .rstrip)}): ( [ 12,1,12,11]. cycle { | i | t = ( s * 10<< 10)* 10+ %(¥e[A)* 10 10. times{t[i* _1 ] = 'TRICK+2022'[ _1 ] };$><<< b .gsub(''<<32,'') };#?!=' ' 12,{puts()?..¥*: !;s{s]? ( i |ub(/./`¥{(}S* }.a[0es [ = s/x/^#$$1Ka[}[ '.l=ne) | 1,,a)?ri:)2) b.siz!( ] 't.rst1]p* i bysib1( ] lT12,1[s.* ' b0cue1{ }%=¥(eA)t c0K}t 10. }$ < ) 1 p 1 1 " 2022;"#{puts'TRICK+2022'} .chars}¥#{b=$<.read;0;'( #';$><K}t 10.}$<) 1p1 1" Prints "TRICK+2022" up and then left

Slide 60

Slide 60 text

“Most anti-gravity” mame2.rb 2022;"# .chars} {puts'TRICK+2022' ¥ { ; #';$><< b ?! };#{s=' ' # 0 ! s[0]? ( b=$<.read ;' } ub( ,''} ';a= ''<<32 b.lines {puts( ?.. *( b.size) .gsub(/./) { b.sub!( /^#$`¥K(¥S) /x,a)?$1:a } .rstrip)}): ( [ 12,1,12,11]. cycle { | i | t = ( s * 10<< 10)* 10+ %(¥e[A)* 10 10. times{t[i* _1 ] = 'TRICK+2022'[ _1 ] };$><<<<<'=$ts(?..*( #';{s='b32ub(/./){ ?!#0]?(}pu$`¥K(¥S) };[(,'') 10.=p1} 10]} 10]e _1e _1 sl }"

Slide 61

Slide 61 text

• The TRICK for left gravity • The TRICK for upward gravity “Most anti-gravity” mame2.rb "¥ #{code1} # {code2}" "¥#{code1} #{code2}" left gravity "x x#{code1} xx{code2} " "x{code1} x#{code2} xx " upward gravity

Slide 62

Slide 62 text

• Judges' comments – shinh: Various things by gravity. Wow, it's so fun! – yhara: Very tricky - essentially five programs are condensed into one. – flagitious: My brain hurts, horizontal/vertical is a bit of a gimmic (not generic, but still) – mame (camouflage comment): I think this piece would be the most difficult to implement in TRICK 2022 “Most anti-gravity” mame2.rb

Slide 63

Slide 63 text

Winner » eto shinh yhara matz leonid flagitious mame score “Most interactive code” 『最もインタラクティブなコードで賞』 Tomoya Ishida (tompng) 10 7 10 10 9 8 8 8.86

Slide 64

Slide 64 text

“Most interactive code” tompng2.rb q=->{!sleep _1/1e2};p=( c=0..2).map{[_1/9r ,0,5**_1.i/3,1,0]} require'socket';puts'op' "en http://localhost:#{( w=TCPServer.new$*[0]||0).addr[1]}";Thread.new{q[2];f=[-1 ]*s=3;t=Time.now.to_f;p.select!{0<_1[3]=[_1[3]+_1[4]/8.0,1 ].min};9.times{h=p.map{[2**(_1*t.i)/_4**0.5/(1+Math.sin(2*t- 9*_1%2)**32/16),_2+_4*( _3-_2)]};r=[s*3/2,84].min;g=->{x,y= (s*(1+_1+1i)/2).rect;x<0 ||x>=s-1||y<0||y>=s-1?0:((l=f[y+1])[ x+1]*(a=x%1)+(1-a)*l[x] )*(b=y%1)+(1-b)*((l=f[y])[x+1]*a+(1- a)*l[x])};f=(1..r).map {|y|(1..r).map{|x|z=1.5+1.5i-3.0*(y .i+x)/r;[h.sum{g[_1.*z +_2]}*0.9,1].min}};s=r};c=f.flatten redo};loop{s=w.accept ; Thread.new{r=s.gets;h='HTTP/1.1 '+ "200 OK¥r¥nContent-" 'T' "ype:text/html¥r¥n¥r¥n";r['/ ']?s. <<(h+'ifram' 'e{' 'opacity:0;height:0;}input{wid'+ 'th:252px;}</styl' 'e>' '<form target="i"><input src="'+ "g#{rand}¥" type" '="im' 'age"><iframe name="i"></ifra'+ 'me></form>'):r ['/g'] ?(h[/:.+l/]=?:'image/gif';s<< h+'GIF8' '7a'+[84, 84,246,0,*(0..383).map {15*_1. /(383r)**(3-_1% 3)*17}].pack('v3c*'); loop{ s<<[67434785,5, 44,84,84,7,c.map{_1* 127} .each_slice(126 ).map{[127,128,*_1 ] .pack'c*'}*'', 1,129].pack('V3x' 'v2na*c2x');q[ 5];q.[]1while(r ==r=c)}):(x,y, z=r.scan(/¥d+/).map{_1.to_f/ 126-1};z&&p<<[rand-0.5,( z=x+y.i)*1.5,z/(z. abs+0.9),0,-p[ -3][4]=-1] s.<<h);s .close }}

Slide 65

Slide 65 text

“Most interactive code” tompng2.rb

Slide 66

Slide 66 text

“Most interactive code” tompng2.rb

Slide 67

Slide 67 text

• A fractal organism with a pulse – You can tweak it with a mouse click • No JavaScript, no canvas, no HTML5! • Pre-HTML5 technologies – Endless streaming of an animated GIF – • This element tells the click position to the server with a GET request like /?x=50&y=100 “Most interactive code” tompng2.rb

Slide 68

Slide 68 text

“Most interactive code” tompng2.rb q=->{!sleep _1/1e2};p=( c=0..2).map{[_1/9r ,0,5**_1.i/3,1,0]} require'socket';puts'op' "en http://localhost:#{( w=TCPServer.new$*[0]||0).addr[1]}";Thread.new{q[2];f=[-1 ]*s=3;t=Time.now.to_f;p.select!{0<_1[3]=[_1[3]+_1[4]/8.0,1 ].min};9.times{h=p.map{[2**(_1*t.i)/_4**0.5/(1+Math.sin(2*t- 9*_1%2)**32/16),_2+_4*( _3-_2)]};r=[s*3/2,84].min;g=->{x,y= (s*(1+_1+1i)/2).rect;x<0 ||x>=s-1||y<0||y>=s-1?0:((l=f[y+1])[ x+1]*(a=x%1)+(1-a)*l[x] )*(b=y%1)+(1-b)*((l=f[y])[x+1]*a+(1- a)*l[x])};f=(1..r).map {|y|(1..r).map{|x|z=1.5+1.5i-3.0*(y .i+x)/r;[h.sum{g[_1.*z +_2]}*0.9,1].min}};s=r};c=f.flatten redo};loop{s=w.accept ; Thread.new{r=s.gets;h='HTTP/1.1 '+ "200 OK¥r¥nContent-" 'T' "ype:text/html¥r¥n¥r¥n";r['/ ']?s. <<(h+'ifram' 'e{' 'opacity:0;height:0;}input{wid'+ 'th:252px;}</styl' 'e>' '<form target="i"><input src="'+ "g#{rand}¥" type" '="im' 'age"><iframe name="i"></ifra'+ 'me></form>'):r ['/g'] ?(h[/:.+l/]=?:'image/gif';s<< h+'GIF8' '7a'+[84, 84,246,0,*(0..383).map {15*_1. /(383r)**(3-_1% 3)*17}].pack('v3c*'); loop{ s<<[67434785,5, 44,84,84,7,c.map{_1* 127} .each_slice(126 ).map{[127,128,*_1 ] .pack'c*'}*'', 1,129].pack('V3x' 'v2na*c2x');q[ 5];q.[]1while(r ==r=c)}):(x,y, z=r.scan(/¥d+/).map{_1.to_f/ 126-1};z&&p<<[rand-0.5,( z=x+y.i)*1.5,z/(z. abs+0.9),0,-p[ -3][4]=-1] s.<<h);s .close }} fractal web server GIF encoding

Slide 69

Slide 69 text

• Judges' comments – eto: Heart-shaped code. It is very beautiful. – shinh: Sending GIF stream is interesting. The author should advocate ARAG (Async Ruby and Gif) instead of AJAX (Async JS and XML). – yhara: Good example of how Ruby is good at network programming. It reacts to mouse click, wow! – flagitious: Cool that it is interactive. “Most interactive code” tompng2.rb

Slide 70

Slide 70 text

Winner » eto shinh yhara matz leonid flagitious mame score “Best fishbowl” 『最高の金魚鉢で賞』 Tomoya Ishida (tompng) 9 9 9 9 N/A 9.5 9 9.08

Slide 71

Slide 71 text

“Best fishbowl” tompng3.rb eval((s=%~c=(0..35 ).map{s[2*_1+1]}*'';class$Inte ger;def$quXinclude(Math ;spXo(a)=self* a.pow(87X=h=32.chr;g=PI/480;ls=(sp*31X,89)%89; def$abX+'eval((s=%'+(n=? .next)+s*88.chr+[nXs()=[a =self%X+'.split(',sp*25+'?'+88.chr+');(0..36).mapX89,89- a].miX{s[2*_1].split}',sp*31+".join.tr('$',$/)))"]*$/)Xn;end ;reqX.split$/;trap(:INT){puts;exit};q=->t,i{a,y=((t+i*99)Xuire 'matrX%960). ivmod(80);[(a*(7+i)+i*23)%79+(y+a)/(5+i%4)%2,39Xix';1 5.tiX-y/2]};p=->t,u{a=->b,c{(0..5).sum{(u%2-1)*E**(t*(b+c*_1)*gXmes{ |i,*X.i+ i*u+=5+sin(u*u))}};x,z=a[5,3]. 5,3].rect;x+=y.Xv|z= *?!Xi a[19,4];z+=w;r=(4+(x.abs+z.i).ab };t=(0..959).fX..? W,?Xind{|t|(0..29).all?{x,y=q[t,_1];(x 2||h=ls[y][x]X[,* ?]..X[/[^!-}]/]}};h=($**h+h).chr;eval( []} ->(x,yX?};a =(0X,a,b){x=x*36+39.5;y=19.5-y*18;b*=1 |i|((yX..1 34)X-b).ceil..y+b).map{|j|((x-i)/a+(y j)/ .times{X.ma p{zXx,z=p[t,_1];l=u```=0;while``````(l<1)``; u+```=0 ;d=x-y;X.in dex(Xl+=(d.abs+(z-w``)``.i).ab``s*1.``1 ;x``,z=y``,w;o[v``=``x.r d.imag/Xc[i+ 15*Xd.abs*l*sin(2*``l-t``*g*80``-_1) l*(``1-l)/``6,a``=l*( -l)**2*0.X_1] )};X7,a*2]&&o[v,z,``0.0``3,l**`` ``times``{|i``|(8+i).times{|Xw=* MatXj|o[sin(i)/2+````` ```sin( `/2.0`````````)*j/200,j*0.0Xrix [*(X5-1,0.02,0.1]``}} ``. q[t,``_1];m``[y][x]= };i=-X0.. 44).X1;$><<(['%%','[H .map{|j|(0..79).map{|k|x=(Xmap{ |i,X -39.5)/35.8;y=( i+=1;m[j][k]?h:c[i]):ls[j]X*b| v<;rxRht+ ADjV;e&'/h Qg cO?,C%J a0mE+Qy2a9'X(i+ _2)X^):t|am}b`k>e zxd[HJ9 ony JC gucaew/gcoWRy_X**9 .1).X*]u+DL(&hH wc 8531x'b bd= } < z Say vJ@{?+$Xto_i %88+XV-GE'5^Va <9 *`?9b1 >_ } 8g 3 4 l zH_/o@j*2vX1)*( _1||(Xp]h"u=4- U. 0nz2- E9U #"pl=^ e E(=+x6s/pXb<

K 2DA B8jDlS b* WpM(|t(2X;b}] .lup.X5R(B71 la u?5V? M(2 dP Fj4 5D=#(;(% ?X||w.shif t]}};eval(X9P lRQ S dq4M(Xc)~.split( ?X);(0..36).map{s[2*_1].split} .join.tr('$',$/)))

Slide 72

Slide 72 text

• 960-frame fishbowl animation – Each frame is an executable Ruby code (Quine) • The animation does not insert whitespaces • But it replaces some characters with whitespace – Not trivial to restore the original code “Best fishbowl” tompng3.rb

Slide 73

Slide 73 text

• Error-correcting codes with linear algebra • By using Matrix library – with monkey-patching Integer for modular arithmetic • Wait! May this error-correcting code be corrupted? “Best fishbowl” tompng3.rb require 'matrix' matrix = Matrix[[3, 1, 4], [1, 5, 9], [2, 6, 5]] class Integer def quo(x) = self * x.pow(87, 89) % 89 def abs() = [self % 89, 89 - self % 89].min end answer = matrix.lup.solve([1, 2, 3]) (matrix * answer).map { _1 % 89 }

Slide 74

Slide 74 text

“Best fishbowl” tompng3.rb eval((s=%~c=(0..35 ).map{s[2*_1+1]}*'';class$Inte ger;def$quXinclude(Math ;spXo(a)=self* a.pow(87X=h=32.chr;g=PI/480;ls=(sp*31X,89)%89; def$abX+'eval((s=%'+(n=? .next)+s*88.chr+[nXs()=[a =self%X+'.split(',sp*25+'?'+88.chr+');(0..36).mapX89,89- a].miX{s[2*_1].split}',sp*31+".join.tr('$',$/)))"]*$/)Xn;end ;reqX.split$/;trap(:INT){puts;exit};q=->t,i{a,y=((t+i*99)Xuire 'matrX%960). ivmod(80);[(a*(7+i)+i*23)%79+(y+a)/(5+i%4)%2,39Xix';1 5.tiX-y/2]};p=->t,u{a=->b,c{(0..5).sum{(u%2-1)*E**(t*(b+c*_1)*gXmes{ |i,*X.i+ i*u+=5+sin(u*u))}};x,z=a[5,3]. 5,3].rect;x+=y.Xv|z= *?!Xi a[19,4];z+=w;r=(4+(x.abs+z.i).ab };t=(0..959).fX..? W,?Xind{|t|(0..29).all?{x,y=q[t,_1];(x 2||h=ls[y][x]X[,* ?]..X[/[^!-}]/]}};h=($**h+h).chr;eval( []} ->(x,yX?};a =(0X,a,b){x=x*36+39.5;y=19.5-y*18;b*=1 |i|((yX..1 34)X-b).ceil..y+b).map{|j|((x-i)/a+(y j)/ .times{X.ma p{zXx,z=p[t,_1];l=u```=0;while``````(l<1)``; u+```=0 ;d=x-y;X.in dex(Xl+=(d.abs+(z-w``)``.i).ab``s*1.``1 ;x``,z=y``,w;o[v``=``x.r d.imag/Xc[i+ 15*Xd.abs*l*sin(2*``l-t``*g*80``-_1) l*(``1-l)/``6,a``=l*( -l)**2*0.X_1] )};X7,a*2]&&o[v,z,``0.0``3,l**`` ``times``{|i``|(8+i).times{|Xw=* MatXj|o[sin(i)/2+````` ```sin( `/2.0`````````)*j/200,j*0.0Xrix [*(X5-1,0.02,0.1]``}} ``. q[t,``_1];m``[y][x]= };i=-X0.. 44).X1;$><<(['%%','[H .map{|j|(0..79).map{|k|x=(Xmap{ |i,X -39.5)/35.8;y=( i+=1;m[j][k]?h:c[i]):ls[j]X*b| v<;rxRht+ ADjV;e&'/h Qg cO?,C%J a0mE+Qy2a9'X(i+ _2)X^):t|am}b`k>e zxd[HJ9 ony JC gucaew/gcoWRy_X**9 .1).X*]u+DL(&hH wc 8531x'b bd= } < z Say vJ@{?+$Xto_i %88+XV-GE'5^Va <9 *`?9b1 >_ } 8g 3 4 l zH_/o@j*2vX1)*( _1||(Xp]h"u=4- U. 0nz2- E9U #"pl=^ e E(=+x6s/pXb<

K 2DA B8jDlS b* WpM(|t(2X;b}] .lup.X5R(B71 la u?5V? M(2 dP Fj4 5D=#(;(% ?X||w.shif t]}};eval(X9P lRQ S dq4M(Xc)~.split( ?X);(0..36).map{s[2*_1].split} .join.tr('$',$/)))

Slide 75

Slide 75 text

“Best fishbowl” tompng3.rb eval((s=%~c=(0..35 ).map{s[2*_1+1]}*'';class$Inte ger;def$quXinclude(Math ;spXo(a)=self* a.pow(87X=h=32.chr;g=PI/480;ls=(sp*31X,89)%89; def$abX+'eval((s=%'+(n=? .next)+s*88.chr+[nXs()=[a =self%X+'.split(',sp*25+'?'+88.chr+');(0..36).mapX89,89- a].miX{s[2*_1].split}',sp*31+".join.tr('$',$/)))"]*$/)Xn;end ;reqX.split$/;trap(:INT){puts;exit};q=->t,i{a,y=((t+i*99)Xuire 'matrX%960). ivmod(80);[(a*(7+i)+i*23)%79+(y+a)/(5+i%4)%2,39Xix';1 5.tiX-y/2]};p=->t,u{a=->b,c{(0..5).sum{(u%2-1)*E**(t*(b+c*_1)*gXmes{ |i,*X.i+ i*u+=5+sin(u*u))}};x,z=a[5,3]. 5,3].rect;x+=y.Xv|z= *?!Xi a[19,4];z+=w;r=(4+(x.abs+z.i).ab };t=(0..959).fX..? W,?Xind{|t|(0..29).all?{x,y=q[t,_1];(x 2||h=ls[y][x]X[,* ?]..X[/[^!-}]/]}};h=($**h+h).chr;eval( []} ->(x,yX?};a =(0X,a,b){x=x*36+39.5;y=19.5-y*18;b*=1 |i|((yX..1 34)X-b).ceil..y+b).map{|j|((x-i)/a+(y j)/ .times{X.ma p{zXx,z=p[t,_1];l=u```=0;while``````(l<1)``; u+```=0 ;d=x-y;X.in dex(Xl+=(d.abs+(z-w``)``.i).ab``s*1.``1 ;x``,z=y``,w;o[v``=``x.r d.imag/Xc[i+ 15*Xd.abs*l*sin(2*``l-t``*g*80``-_1) l*(``1-l)/``6,a``=l*( -l)**2*0.X_1] )};X7,a*2]&&o[v,z,``0.0``3,l**`` ``times``{|i``|(8+i).times{|Xw=* MatXj|o[sin(i)/2+````` ```sin( `/2.0`````````)*j/200,j*0.0Xrix [*(X5-1,0.02,0.1]``}} ``. q[t,``_1];m``[y][x]= };i=-X0.. 44).X1;$><<(['%%','[H .map{|j|(0..79).map{|k|x=(Xmap{ |i,X -39.5)/35.8;y=( i+=1;m[j][k]?h:c[i]):ls[j]X*b| v<;rxRht+ ADjV;e&'/h Qg cO?,C%J a0mE+Qy2a9'X(i+ _2)X^):t|am}b`k>e zxd[HJ9 ony JC gucaew/gcoWRy_X**9 .1).X*]u+DL(&hH wc 8531x'b bd= } < z Say vJ@{?+$Xto_i %88+XV-GE'5^Va <9 *`?9b1 >_ } 8g 3 4 l zH_/o@j*2vX1)*( _1||(Xp]h"u=4- U. 0nz2- E9U #"pl=^ e E(=+x6s/pXb<

K 2DA B8jDlS b* WpM(|t(2X;b}] .lup.X5R(B71 la u?5V? M(2 dP Fj4 5D=#(;(% ?X||w.shif t]}};eval(X9P lRQ S dq4M(Xc)~.split( ?X);(0..36).map{s[2*_1].split} .join.tr('$',$/))) Xis highlighted

Slide 76

Slide 76 text

“Best fishbowl” tompng3.rb eval((s=%~c=(0..35 ).map{s[2*_1+1]}*'';class$Inte ger;def$quXinclude(Math ;spXo(a)=self* a.pow(87X=h=32.chr;g=PI/480;ls=(sp*31X,89)%89; def$abX+'eval((s=%'+(n=? .next)+s*88.chr+[nXs()=[a =self%X+'.split(',sp*25+'?'+88.chr+');(0..36).mapX89,89- a].miX{s[2*_1].split}',sp*31+".join.tr('$',$/)))"]*$/)Xn;end ;reqX.split$/;trap(:INT){puts;exit};q=->t,i{a,y=((t+i*99)Xuire 'matrX%960). ivmod(80);[(a*(7+i)+i*23)%79+(y+a)/(5+i%4)%2,39Xix';1 5.tiX-y/2]};p=->t,u{a=->b,c{(0..5).sum{(u%2-1)*E**(t*(b+c*_1)*gXmes{ |i,*X.i+ i*u+=5+sin(u*u))}};x,z=a[5,3]. 5,3].rect;x+=y.Xv|z= *?!Xi a[19,4];z+=w;r=(4+(x.abs+z.i).ab };t=(0..959).fX..? W,?Xind{|t|(0..29).all?{x,y=q[t,_1];(x 2||h=ls[y][x]X[,* ?]..X[/[^!-}]/]}};h=($**h+h).chr;eval( []} ->(x,yX?};a =(0X,a,b){x=x*36+39.5;y=19.5-y*18;b*=1 |i|((yX..1 34)X-b).ceil..y+b).map{|j|((x-i)/a+(y j)/ .times{X.ma p{zXx,z=p[t,_1];l=u```=0;while``````(l<1)``; u+```=0 ;d=x-y;X.in dex(Xl+=(d.abs+(z-w``)``.i).ab``s*1.``1 ;x``,z=y``,w;o[v``=``x.r d.imag/Xc[i+ 15*Xd.abs*l*sin(2*``l-t``*g*80``-_1) l*(``1-l)/``6,a``=l*( -l)**2*0.X_1] )};X7,a*2]&&o[v,z,``0.0``3,l**`` ``times``{|i``|(8+i).times{|Xw=* MatXj|o[sin(i)/2+````` ```sin( `/2.0`````````)*j/200,j*0.0Xrix [*(X5-1,0.02,0.1]``}} ``. q[t,``_1];m``[y][x]= };i=-X0.. 44).X1;$><<(['%%','[H .map{|j|(0..79).map{|k|x=(Xmap{ |i,X -39.5)/35.8;y=( i+=1;m[j][k]?h:c[i]):ls[j]X*b| v<;rxRht+ ADjV;e&'/h Qg cO?,C%J a0mE+Qy2a9'X(i+ _2)X^):t|am}b`k>e zxd[HJ9 ony JC gucaew/gcoWRy_X**9 .1).X*]u+DL(&hH wc 8531x'b bd= } < z Say vJ@{?+$Xto_i %88+XV-GE'5^Va <9 *`?9b1 >_ } 8g 3 4 l zH_/o@j*2vX1)*( _1||(Xp]h"u=4- U. 0nz2- E9U #"pl=^ e E(=+x6s/pXb<

K 2DA B8jDlS b* WpM(|t(2X;b}] .lup.X5R(B71 la u?5V? M(2 dP Fj4 5D=#(;(% ?X||w.shif t]}};eval(X9P lRQ S dq4M(Xc)~.split( ?X);(0..36).map{s[2*_1].split} .join.tr('$',$/))) Error-correcting code is here! (Fish don't come to this area) The main code is inside with redundancy for error recovery

Slide 77

Slide 77 text

• Judges' comments – eto: Beautiful! The "AQUA" Logo is also good! – shinh: Self-repairing Quine is not new, but this one is moving and catchy! – flagitious: Extremely aquatic and beautiful, I haven't figured out how fishes are calculated yet. – mame: Beautiful animation. Error correction makes the animation more beautiful. I love that the technical side supports the artistic side. “Best fishbowl” tompng3.rb

Slide 78

Slide 78 text

Conclusion

Slide 79

Slide 79 text

Judges’ awards mame award: “Most calculating” - SAITOH Jinroq yhara award: “Most playable” – Don Yang fragitious award: “Most likely to be required” – Yutaka HARA matz award: “Most reactive and diffusive” – Sergey Kruk eto award: “Most global” – Yusuke Endoh leonid award: “Most accessible” – Yutaka HARA shinh award: “Most orderly code” – Tomoya Ishida

Slide 80

Slide 80 text

Dishonorable Top 3 “Best fishbowl” – Tomoya Ishida “Most interactive code” – Tomoya Ishida “Most anti-gravity” – Yusuke Endoh

Slide 81

Slide 81 text

Prize? • Dishonor: the title of “insane” • Top three entries will be checked into the Ruby official repository in “sample” directory – Ruby 3.2.0 will have them

Slide 82

Slide 82 text

Conclusion • The winning entries will be published soon at: • Thank you for all participants! No k! http://github.com/tric /trick2022/

Slide 83

Slide 83 text

Next contest? • No plan! – TRICK 2013 – TRICK 2015 – TRICK 2018 – TRICK 2022 – TRICK ? See you again! +2 +3 +4 +?