Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 1987/korn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ include ../../var.mk

# Common C compiler warnings to silence
#
CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int -Dunix=1 \
CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int \
-Wno-string-plus-int -Wno-strict-prototypes -Wno-return-type \
-Wno-builtin-declaration-mismatch -Wno-format-contains-nul

Expand All @@ -60,7 +60,7 @@ ARCH=

# Defines that are needed to compile
#
CDEFINE=
CDEFINE= -Dunix=1

# Include files that are needed to compile
#
Expand Down
11 changes: 11 additions & 0 deletions 2024/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,40 +297,51 @@ emulating the entire
by computing the output of each gate in a loop, effectively running the CPU and associated RAM/ROM chips!


<div id="lost">
### Remarks on some of submissions that did not win
</div>

<div id="aslr"></div>
* Depending on the address of a variable as the single source of
pseudo-randomness isn't a good idea, as not all platforms support
[ASLR](https://en.wikipedia.org/wiki/Address_space_layout_randomization).
It's much better to mix in other sources of variability (e.g. time, process
ID, etc.) so that subsequent runs will behave differently.

<div id="old"></div>
* If a submission's obfuscation strongly resembles a past IOCCC winning
entry, and the submission's obfuscation is mainly in the C code source,
then the submission is likely to not make it into the final rounds of judging.

<div id="implicit"></div>
* When working with modern C compilers, it's crucial to explicitly
declare variable and function types. Don't assume they'll
automatically default to an `int`.

<div id="kr"></div>
* Sadly, K&C-style C code does not compile well under modern C compilers.

<div id="portability"></div>
* A submission that only works under gcc or clang does not work as well
as submissions that can work under either compiler.

<div id="originality"></div>
* Shrinking an existing open-source program to meet rule 2 size might
be an impressive feat of code shrinking, but it might not be enough to
make it into the final rounds of judging. Originality is key, and this
might not be the most innovative approach.

<div id="math"></div><div id="maths"></div><div id="mathematics"></div>
* If your submission relies on mathematical algorithms, be sure that the
C code that implements the mathematics is well obfuscated.

<div id="missing-files"></div>
* Just a friendly reminder that before you upload your submissions,
uncompress the compressed tarball into a different directory and verify
everything is in order. This way, you can be sure you didn't miss uploading any
important files!

<div id="gotos"></div><div id="goto"></div>
* Using a lot of goto statements to make your code harder to understand
might not help it pass the final rounds of judging.

Expand Down
8 changes: 8 additions & 0 deletions 2024/ferguson1/.entry.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@
"display_via_github" : true,
"entry_text" : "text file showing all the line changes in a single run"
},
{
"file_path" : "gotos.ruined.c",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "c",
"display_via_github" : true,
"entry_text" : "shows why lots of gotos will no longer make it through the final rounds"
},
{
"file_path" : "lencount.c",
"inventory_order" : 100,
Expand Down
173 changes: 113 additions & 60 deletions 2024/ferguson1/README.md

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions 2024/ferguson1/gotos.ruined.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
switch(1) { j:if(z)goto A; E*=5; B:
printf(&y[Z(12)],T); if(z) { goto f; } goto PP; default: srand(time(0));
goto hell; goto M; OO:if(b<1) { if(a){ { V(40); V(4); goto hell; goto M; } PP:goto G; } if(f) { V(41); V(4); goto hell; goto M; } { V(36); V(4); goto hell; goto M; } g:goto S; } { V(M>2169?47:36); V(4); goto hell; goto M; }
666; rr:; goto CC; yy:
{ if(b<1||M<0||M>2169){ goto _; F:V(51); R+=18; goto L; } goto i;
P:for(X=1; X<--(unsigned){ 7 } ; ){ goto kk; BB:*o[X]+=(X==2?t[X]*5:t[X]); goto HA; TA:++X; goto at; ZZ:; }
printf(&y[Z(11)],R,E,G,O,N,T,b,M); if(x(0,1))goto I; R:if(R<14)V(37); if(z) { z=0; l:{ if (k()) { if (x(0,9) > 4) { V(52);
R+=23; if(!x(0,9)){ goto r; L:goto II; } c:; } else{ goto F; r:goto c; qq:{ V(53); goto zz; } II:; } } else { goto qq; } zz:E-=9; M-=45; } goto C; y:V(42); while(scanf(&y[Z(2)],&r)!=1)while(getchar()!='\n'); switch(r) { M:V(1); v:memset(&t, 0,sizeof t); goto
N; D:{ if (k()) { goto dd; ii:V(f=79); b -= 80; T/=4; goto jj; ee:; } else { goto oo; dd:V(a=29); T+=70; goto ee; x:V(X+--(
666 ){ V(14); goto x; goto
heaven ; ET:L-=t[u]; goto XT; } L=T; for(u
=0; u < 6; ++u){ goto ET; XT:; }
if(L<0){ V(46); memset(&t, 0, sizeof t; goto v; } }
goto x; } T=1666-O-R-E-G-0-N; if(T<0){ V(46); O=R=E=G=N=0; goto v; LL:*o[X]=0; uu:++X; goto ZZ; } } goto bb; } } goto s; case 3:goto X; case 1:z=1; M-=45; goto v;
case 2:goto T; } goto y;
O:{ V(e = 19); O -= 40; R+=40; } goto E; i:if(O<1){ goto d; } else { goto vv; mm:; } goto P; go:V(81); R+=9; N+=3; goto to;
} else{ goto y; HA:T-=X[t]; goto TA; A:for(X=1; X < 6; ){ goto BB; kk:if (*o[X]<0) goto LL; goto uu; QQ:V(B=38); goto JJ; at:; } goto B;
} T:l=1; if (E<9){ goto h; } else { goto l; h:V(16); goto C; DD:goto u; } C:l=0; f:z=0;
X:if(R<1){ goto e; U:{ V(24); V(4); goto hell; goto M; } K:R-=R
R; goto Y; TT:V(v=15); O=0; goto P; } else { goto K; } goto tt; Y:switch(q=x(0,22))
{ case 1:V(95); R+=5; goto Z; case 18:V(26); goto Z; case 13:V(28); goto Z;
case 2:O-=40; V(71); goto Z; case 3:V(a=76); b-=70; goto W; case 4:V(77); N-=7; M-=7; goto Z; case 5:case
10:if(q<6) { goto ha; m:V(56); goto D; CC:goto OO; o:; } else
{ goto m; oo:V(f=62); M-=50; b-=35; s:; } goto Z; a:goto H;
case 9:case 19:V(30); goto Z; case 20:V(32); goto Z; case 21 :V(31); goto Z; case 6:goto g; case 16:case 22:V(49); goto Z; case 17:V(72); goto Z;
case 7:V(83); M-=10; goto Z; case 8:V(86); R-=30; G-=20; O-=40; V
:switch(x(1,9)){ case 2:if(q>9){ switch(x(1,2)){ q:R+=40; goto Y; case 1:{ switch (x(2,5)) { case 2:V(a=54); goto
MM; b:{ V(48); V(4); goto hell; goto M; }
case 3:goto J; N:goto Q; case 4:i=17; } } case 2:V(5); } goto k; u:if(M<1951||W){ goto
if(!x(0,3)){ { V(x(0,4)?84:x(0,4)?33:34); V(4); goto hell; goto M; } e:if(O>39){ goto xx; vv:v=0; goto mm; d:{ if(!v)goto TT; goto P; } } goto U; } if (x(0,9) < 5) w:V(35); c=1; M-=101; ++E; k:M-=10; W:if(x(0,1)){ if (d) V(39); if(e)V(25); } while(i)heaven:{ { V(i); V(4); goto hell; goto M; } goto _; } if (!B&&(f||
a)){ if(d&&a) V(91); if(T<666){ goto QQ; KK:Q=a?1:Q; h=f?1:h; f=a=0; V(93); T-=666; } else{ goto KK; } JJ:; } b-=f?15
b-=10; goto z; J:V(a=54); } goto k; MM
:goto k; default: if(q>10) { goto k; } if(q>7) { if(N<5) { { V(99); V(4); goto hell; goto M; } goto M; G:goto yy; } V(13); N-=5; } goto Z; _:goto rr; goto _; S:if (E>1999){ { V(27); V(4); goto hell; goto M; } goto _; I:goto a; } V(82); M-=9; N-=5; R-=20; goto Z;
} M-=17; goto Z; case 14:V(74); goto Z; case 15:V(x(0,1)?69:68);
goto Z; ha:V(78); if(k()){ goto go; to:; } else { goto ii; jj:; } goto o; case 11:goto V; case
12:V(94); M-=5; b-=19; N -= 5; goto Z; tt:goto Y; case 0:V(20); Z:; } if(O>39&&!x(0,9)){goto O; xx:V(e=x(0,1)?18:19); O -= 40; goto q; } E:if(M<951) goto W; if (G < 36){ goto b; } if (x(0,9) > 2) goto n; V(96); if (x(0,1)) { goto p; Q:for (X=
1; X < 6; ++X) { goto x; bb:; } goto j; } V(97); M-= 60; goto n; H:goto R; p:if (x(0,9)<3) goto t; V(21); M -=99;
goto n; t:V(22); M -= 85; n:if(m){ goto DD; } m=1; if (x(0,9) > 5) goto w; V(23); z:; } if (A++<21) goto yy; goto _;
Loading