diff --git a/2011/goren/README.md b/2011/goren/README.md index 07e96e685..a9d15c242 100644 --- a/2011/goren/README.md +++ b/2011/goren/README.md @@ -15,6 +15,12 @@ make echo "some text" | ./goren ``` +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for macOS. +Before the fix it segfaulted. It worked fine under linux. After fixing it it was +noticed that the author stated it does not work for 64-bit so it was then tested +as a 32-bit binary (linux) and 64-bit binary (linux, macOS) and both work. Thank +you Cody! + ## Try: ```sh @@ -29,11 +35,15 @@ In the words of [René François Ghislain Magritte Magritte](http://en.wikipedia One may ask the surrealist question: - echo 'If | is just a representation of a pipe, then how can data stuff it?' | ./goren +```sh +echo 'If | is just a representation of a pipe, then how can data stuff it?' | ./goren +``` However if one takes a firm stand and declares: - echo '| is just a representation of a pipe because I say so! So stuff it!' | ./goren +```sh +echo '| is just a representation of a pipe because I say so! So stuff it!' | ./goren +``` something happens! Why? @@ -50,8 +60,8 @@ a pipe. But what IS a pipe? This program tries to provide an answer. Magritte's [test for pipes](http://en.wikipedia.org/wiki/The_Treachery_of_Images) is: - The famous pipe. How people reproached me for it! And yet, could - you stuff my pipe? No, it's just a representation, is it not? +> The famous pipe. How people reproached me for it! And yet, could +> you stuff my pipe? No, it's just a representation, is it not? Accordingly, this program only approves pipes which can be used for stuffing data. diff --git a/2011/goren/goren.c b/2011/goren/goren.c index c8c6d4776..48fd7af1e 100644 --- a/2011/goren/goren.c +++ b/2011/goren/goren.c @@ -1,20 +1,20 @@ -typedef unsigned char t;t*F="%c",l[]="|\\/=_ \n](.\0(),*(.(=(}*.)[[*.",N='\n',* -r;typedef(*H)();extern H Ar;Q(a){return(a|-a)>>31;}H S(c,a){return(H)(a&~c|(int -)Ar&c);}extern t*ist;V(t*u){*u^=*u&2^(*u>>7)*185;}Z(t*u,t n){*u-=n;}e(t c,H h){ -R(h,Q(* r^c));} -I(){r=l +7-4*Q( -getchar ()^*l); -}R(H h, int c){Ar=S -(c,h);- main() ;}P(){r -++;}z() { O(&N);} -O(t*c){ printf( F,+*c); -}T(){r= "This is not a function\n" ;}w(U){ -U=Z(r,8 ); r-=~Q(* -r/8-4); return 0; }M(){r= -ist-68; } h(){t G -=r[1]-r [2]^*r; -G^=30;V (&G);e( -0,(O(&G ),P(P(* -r++)),z));}g(){M();R(h,0);}f(){P(O(r));e('f',g);}p(){P();e('a',f);}d(){P(O(r)); -e('n',p);}c(u){u=r[-2];T(Ar=d);R(f,Q(u^'"'));}n(){e(w(O(l+*r%8)),c);}a(){I();R( -n,0);}main(){S(Q(Ar),a)();}H Ar;t*ist="Rene Magritte"-(1898-1967); +typedef unsigned char t;t*F="%c",l[]="|\\/=_ \n](.\0(),*(.(=(}*.)[[*.",N='\n',* +r;typedef(*H)();extern H Ar;Q(a){return(a|-a)>>31;}H S(long c,long a){return(H)(a&~c|(long +)Ar&c);}extern t*ist;V(t*u){*u^=*u&2^(*u>>7)*185;}Z(t*u,t n){*u-=n;}e(t c,H h){ +R(h,Q(* r^c));} +I(){r=l +7-4*Q( +getchar ()^*l); +}R(H h, int c){Ar=S +(c,h);- main() ;}P(){r +++;}z() { O(&N);} +O(t*c){ printf( F,+*c); +}T(){r= "This is not a function\n" ;}w(U){ +U=Z(r,8 ); r-=~Q(* +r/8-4); return 0; }M(){r= +ist-68; } h(){t G +=r[1]-r [2]^*r; +G^=30;V (&G);e( +0,(O(&G ),P(P(* +r++)),z));}g(){M();R(h,0);}f(){P(O(r));e('f',g);}p(){P();e('a',f);}d(){P(O(r)); +e('n',p);}c(u){u=r[-2];T(Ar=d);R(f,Q(u^'"'));}n(){e(w(O(l+*r%8)),c);}a(){I();R( +n,0);}main(){S(Q(Ar),a)();}H Ar;t*ist="Rene Magritte"-(1898-1967);