From 9b2c0ed2b15fac1b279a7b07ae7fef139cc032de Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 27 Oct 2023 12:37:56 -0700 Subject: [PATCH] Add files from 2020/endoh2 password-protected zip The password was no longer known as the link that had a list of passwords as provided by Yusuke in 2020 was no longer there, being instead from 2021. I didn't have to use the Internet Wayback Machine as I had already extracted them in the 2020 preview back then. The spoiler/spoiler.md has been format fixed. The spoiler.zip file has been deleted. The README.md file has been fixed to refer to the directory, not the zip file, and a missing '`' was added to the file that prevented proper rendering of the html. --- 2020/endoh2/README.md | 11 +- 2020/endoh2/spoiler.zip | Bin 3810 -> 0 bytes 2020/endoh2/spoiler/code.c | 91 ++++++++++++++ 2020/endoh2/spoiler/gen.rb | 42 +++++++ 2020/endoh2/spoiler/glyphs.txt | 209 +++++++++++++++++++++++++++++++++ 2020/endoh2/spoiler/prog.c | 28 +++++ 2020/endoh2/spoiler/spoiler.md | 19 +++ 2020/endoh2/spoiler/tmpl.txt | 28 +++++ thanks-for-fixes.md | 5 + 9 files changed, 428 insertions(+), 5 deletions(-) delete mode 100644 2020/endoh2/spoiler.zip create mode 100644 2020/endoh2/spoiler/code.c create mode 100644 2020/endoh2/spoiler/gen.rb create mode 100644 2020/endoh2/spoiler/glyphs.txt create mode 100644 2020/endoh2/spoiler/prog.c create mode 100644 2020/endoh2/spoiler/spoiler.md create mode 100644 2020/endoh2/spoiler/tmpl.txt diff --git a/2020/endoh2/README.md b/2020/endoh2/README.md index 40324d91c..95077d875 100644 --- a/2020/endoh2/README.md +++ b/2020/endoh2/README.md @@ -26,15 +26,16 @@ make ./prog yoda.txt ./prog bear.txt -`` +``` ## Judges' remarks: -Clever use of the C99 complex data type. The spoiler.zip file contains clues -as to how some winning authors create / edit programs into ASCII shapes. +Clever use of the C99 complex data type. The [spoiler](spoiler/) directory +contains clues as to how some winning authors create / edit programs into ASCII +shapes. -With the source from the spoiler.zip file could you make the code render for a -larger terminal window? How about adding more glyphs? +With the source from the [spoiler](spoiler/) directory could you make the code +render for a larger terminal window? How about adding more glyphs? ## Author's remarks: diff --git a/2020/endoh2/spoiler.zip b/2020/endoh2/spoiler.zip deleted file mode 100644 index 29b5418074142cdc260f235e56d6542b338c937c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3810 zcma)<4~#x};T#UT4KmO_Ov#=ed$`H3uJUo!S3OC*G{W*uv`p~#jjp$gFmu=rm zWsP5r#Sxk|wp|H$dW^HlZL0{M3l;E?jUan&i2<)jG;qToa=IT;KX9u1kT@v3QI82g zK%;8gBfm%9y{x!=uUok~IyX=&LNSgqX1<)AsQ!#IAJ@({tfFYgKX^xs*FeHD?*8hT zbT*-E)nVrO1nwZwzE~#wyyaU~MZIa&iV$WQ6uneZAb-A+evEsvA3qycPg%`Ny zOEhGNU>Gc`Gox=|G9WAO?RbcE^nI#GJbRF`%4-srvkyOcZC`DKd3Z?!bTv$}#IGm| z8cionw~~K1ZN$Wwb#I%n?VRD8)`59b_WyD zWFdl0dXE{(C)uPCh)qyLW}t1WlU)`pyS1yQqSIH}Fk7SsN*hE8S_Qb_>d8yA1a=ix z2J$=`d1F|KrWYcS+9yGzj`-ax9QpIGy(6zQA6W@Z;uQzGn_`|ef9I10EKl;LyX@I( zvzzlKSH8;Tsi;G!ms?VAOuiDRTf9TrGZRN{HEZ$~qoivHOewJ8D5Z}t5V28C$W?>r zZ)AfHQ)_YUQB6e#vxj3mob?jl_=;6K> z=M=Z!i~N8m9}3h$A;>N>6pgpZ5aA-H8fi+kbyJ$}C}@5j%G7y7-<_Ul&xapGZhjgN zeHoBM%TXnBXICfho*4{-6ej%m;%D&=syLO*Xlk}emFCxPEF?so8Cn%g-)11qLTPEV zWz?5wE8Cl_)a+;`e_!X`nQn=cCkl`pmZm&&41jQZ4fZLta{lx4lA+ehGzv6!)!WSg z?sOiusAHt_lv+$FdJKNZ5u$i7lBBzmP)@yK!obVLCgB_WSa4S?ZQ1|jvck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=kF51to+qGA<$5 zq6)Ly%G%y|;%glP?Y`n}NjrgB_lqFzLZ2f9EDUs~N~5I$+Lfo;<7I<5$~Cj2{K2zZ z>JrajXiy}Vn;i=32jume(G`xBbT~m*QbkkA`${WTX9*D}pgiwjthUrJ@}q`gq7Q)C z5{KXQ%VZ(yvABLT2kqb;_;Ci2Ce7~|ALkTL2Gr8w6oobw(1(w-i^X1D#g`mg?$5I;D-5;-)4N#c2{}p?UV%efc;s z3U_{%)6M4=wJnBgB~vvEZj9gUUHrz6N0}DqxhwK|OkeXgZBTwdUOmQkQ4UqCXs=z2 zef~#(TW+b>52rKVkZE`hF|f~-7kh_RN!t?bp$Smd+$!6iLHBd`7lVUWbW3mKayZy> zfNAQWx)-qMTE*Gxu^>14_Xm}gK7n-YEs)ViDv!k8`BLlX`2mA6Gk5K5C&BEG8Vv`; zdsOJWUVN0b9`kH7_yEb1dcC)t7@*>CpL||d?llTSKnKm;s?2R|S=Y)WdyADwcaBUd*ZSOb7O^tj6`htp!gkd} zKSj65cAtJSe)00I;+0`}zOek3_kk*42w|_jffWb)QuDqp!?fJ?Z0N3PfMqkB59<L?^8R?2+G#+ek(34;jU`A;wv1ay$t^uNLcGjAxA2|G!a+MyYGgzn>bEmVjGLNQJs-FWb3F#h|5#c8GvtQzg zFcc-LeA}azo1lYy$yYz%82sj$$Le|4>q_{UetpfH(R@zBMH!xZJUL8@aF?zFnq%Qf zZMly?NB5ey#G?T>Q_Nr1|ta6L*wLznH(~qJPFD{lpl5Tc_I5y!DGonsfh*OR6B` fH}3l*DSvVQ`?>xV^#tXys+33jajzJlJ-+)FSrR=Z diff --git a/2020/endoh2/spoiler/code.c b/2020/endoh2/spoiler/code.c new file mode 100644 index 000000000..153dafb38 --- /dev/null +++ b/2020/endoh2/spoiler/code.c @@ -0,0 +1,91 @@ +int*d,D[9999],N=20,L=4,n,m,k,a[3],i; +char*p,*q,S[2000]="L@X-SGD-HNBBB-AD-VHSG--XNT\x1b[2J\x1b[H",*s=S,*G="GLYPHS"; +#include +typedef/**/complex/**/double(c);c(X)[3],P,O; +c/**/B(double t){ + double s=1-t,u; + P=s*s*X[1]+2*s*t**X+t*t*X[2]+O; + u=I*P; + return+48*((s=P)+48*I)/(1 +void/**/b(double t,double u){ + double s=P=B(t)-B(u); + (s=P*(2*s-P))<1? + m=P=B((t+u)/2),k=-I*P, + m>-41&&m<39&&9 +int(main)(int(x),char**V){ + clock_t(c)=clock(); + // default message + for(d=D;m<26;m++,s++) + *s>63? + *d++=m%7*16-7*8,*d++=m/7*25,*d++=*s-64 + : + 0;; + if(V[1]){ + // read a given file + ;;;FILE*F=fopen(V[+1],"r"); + for(d=D,L=N=m=0;(x=fgetc(F))>0||fclose(F);) + if( + x>13? + 64N*3||(m=0);N++)D[N*3]-=m*8; + } + for(;i<200+L*25;i++){ + // clear the screen + for(n=0,p=S+33;n<1920;*p++=n++%80>78?10:32){} + // render the message + for(*p=x=0,d=D;x33;); + *a=a[1]=*p++; + for(;*p>33;p++) + if( + *p%2? + *a=*p,0 + : + 1 + ){ + a[2]=*p; + for(m=0;m<3;m++){ + // calculate the point on the load + k=a[m]/2-18; + q="POINTTABLE"; + for(n=POINTSTART;k--;)n+=*q++-34; + X[m]=n%XMAX+n/XMAX*I; + } + // bezier + b(0,1); + *a=a[1]=*p; + } + } + // show and wait + for(puts(s),s=S+30;(clock()-c)*10/**//*Oh,my_dear_friend.How_I've_missed_you.--C-3PO***/ +typedef/**/complex/**/double(c);c(X)[3],P,O;c/**/B(double t){double s=1-t,u;P= +s*s*X[1] +2 *s*t* *X+t *t*X [2]+O;u=I*P; +return+48*(( s=P)+ 48*I )/( 1 +void/**/b( double t,/*** * **/double u){double s=P=B(t)-B(u);(s=P +*(2*s-P)) <1?m=P=B ((t+ u)/ 2),k =- I*P, m> -41&&m<39&&9 +_No. _I_am_ IOCCC 1977 ***/ +#include/***** your father.. --DarthVader **/ /**** ****/ +int(main)(int (x), char**V){; clock_t(c)= /* */clock();;; for(d=D +;m<26;m++,s ++)*s> 63?*d++=m% 7* 16-7 *8,*d++=m/ 7*25,*d++ +=*s-64:0;; if(V[1]) {;;;FILE *F =fopen(V[+1], "r");for (d=D,L=N=m +=0;(x=/** * *** **/ fgetc(F))>0 +||fclose(F);)if(x>13?64N*3||(m=0);N++)D[N*3]-=m*8;}for(;i<200+L*25;i++){for(n=0,p=S+33;n<1920;* +p++=n++%80>78?10:32){}for(*p=x=0,d=D;x33;);*a=a[1]=*p++;for(;*p>33;p++)if(*p%2?*a=*p,0:1){a[2 +]=*p;for(m=0;m<3;m++){k=a[m]/2-18;q="/&&&##%%##.+),A$$$$'&&'&&((%-((#'/#%%#&#\ +&&#D&";for(n=2;k--;)n+=*q++-34;X[m]=n%13+n/13*I;}b(0,1);*a=a[1]=*p;}}for(puts( +s),s=S+30;(clock()-c)*10 +_No. _I_am_ IOCCC 1977 ***/ +########/***** your father.. --DarthVader **/ ########/**** ****/ +############# #### #########; ########### /* */########;; ####### +########### ###### ########## ## #### ########## ######### +########## ######## ######## ## ############# ######## ########## +######/** * *** **/ ########### +############################################################################## +############################################################################## +############################################################################## +############################################################################## +#############################################################################\ +############################################################################## +#######################################################/*Nevertellmetheodds!*/ diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 901b5d94b..b1e5997a3 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -2501,6 +2501,11 @@ debugging it since it works with `-O0`. He also added the script [demo.sh](2019/karns/demo.sh) to showcase the entry a bit more easily. +## [2020/endoh2](2020/endoh2/prog.c) ([README.md](2020/endoh2/README.md)) + +Cody copied the files from the spoiler.zip file that was password protected with +a password that was no longer known from his preview of 2020. + ## [2020/endoh3](2020/endoh3/prog.c) ([README.md](2020/endoh3/README.md)) Cody fixed the script [run_clock.sh](2020/endoh3/run_clock.sh) which gave a