From 9e0831cc3df5f399429b915d12154a778262e8c4 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Thu, 14 Aug 2025 06:16:35 -0700 Subject: [PATCH 1/3] Various fixes, improvements in 2024/ferguson1 The alt code was an old version that should not have even been there. The extra event was something that was meant to be somewhere else (like it is in the prog.c) and the event (even 23) is something else. I put in the data files another joke with the intention of using that for the event until I remembered the event was wrong. The alt code has an improvement: it now is possible to specify your hp/stamina and max number of turns. In prog.c remove an unused variable. Updated Judges' remarks to better reflect what happens (in particular improve the commits from yesterday - correcting it but keeping the same flow of the judges). Updated deobfuscation.md (rebuilt deobfuscation.html). Rebuilt index.html. --- 2024/ferguson1/README.md | 46 ++++++++++++++++------- 2024/ferguson1/data.asc.src | Bin 51639 -> 51664 bytes 2024/ferguson1/data.scrnshot.src | Bin 79702 -> 79993 bytes 2024/ferguson1/data.src | Bin 83592 -> 83969 bytes 2024/ferguson1/deobfuscation.html | 20 ++++++---- 2024/ferguson1/deobfuscation.md | 21 +++++++---- 2024/ferguson1/index.html | 36 ++++++++++++------ 2024/ferguson1/prog.alt.c | 47 ++++++++++++------------ 2024/ferguson1/prog.c | 2 +- 2024/ferguson1/strings.asc.loc.txt | 5 ++- 2024/ferguson1/strings.loc.txt | 7 +++- 2024/ferguson1/strings.scrnshot.loc.txt | 8 +++- 12 files changed, 120 insertions(+), 72 deletions(-) diff --git a/2024/ferguson1/README.md b/2024/ferguson1/README.md index ba65efa1b..a10029084 100644 --- a/2024/ferguson1/README.md +++ b/2024/ferguson1/README.md @@ -47,18 +47,20 @@ practical reasons. ``` ./prog.alt + ./prog.alt 55 # 55 = number of turns, default 21 + ./prog.alt 42 6666 # 42 = number of turns (default 21), 6666 = hp (default 666) - ./prog.alt2 + ./prog.alt2 # submitted code with bug fix ``` ## Judges' remarks: You will have to go to "Fun-Damentals" to understand the logic flow of this -game. While you goto as many as 149 times and jump hundreds if not over one -thousand times to travel from `main()` to a successful `exit(666)` you may have -a devil of a time trying to figure out how this program actually does what it -does. +game. While the code might goto as many as 149 times to travel from `main()` to +a successful `exit(666)` you may have a devil of a time trying to figure out how +this program actually does what it does as it jumps hundreds if not thousands of +times. Before you set off on your adventure to decode this program's logic, make sure you have enough food, ammo, clothes, oxen, and programming supplies. @@ -76,19 +78,37 @@ finish and not counting macros but counting all function calls (not libc functions just the few functions in prog.c), there were a total of **1416** (!) line jumps. Skipping prog.c function calls and it was still **1131** jumps! The prog.c, if you remove `#include`s, blank lines, lines with just a brace and -lines that have only variables, **has just 58 (!) lines of code**. A very tiny +lines that have only variables, **only has 58 (!) lines of code**. A very tiny fraction of the time a line might be repeated in a row ONCE but that does not -really matter. - -**NOTE**: I actually submitted two versions. This one is not encrypted. The -encrypted one even encrypted emojis without having to decrypt them in order to -print them (and everything else). I have kept references to encryption in this -file even after publication. I do have a copy of it if anyone is interested. +really matter, as it is still technically a jump. **SUGGESTION**: if you dare, try opening [prog.gotos.c](%%REPO_URL%%/2024/ferguson1/prog.gotos.c) in an editor with syntax highlighting and then highlight `goto`. Alternatively, try it with `grep` -if your grep has colours enabled (probably easier). +if your grep has colours enabled (probably easier). This is a nice one to try: + +``` + grep -E 'heaven|goto|666|hell' prog.gotos.c +``` + +Alternatively, in vim you might try, making sure you're in command mode first +(hit ESC if you don't know - if that doesn't work try hitting it again as it can +depend on what you're doing): + +``` + /heaven\|goto\|666\|hell +``` + +Read it and weep and scream (or curse :-) )! + +**NOTE**: I actually submitted two versions, one encrypted (even emojis); any +document mentioning encryption is left for personal reasons out of +laziness and exhaustion from working on improving the presentation even after it +won. I have a copy of the code and data files +[here](https://ioccc.xexyl.net/2024/oregon/encrypted.txz) (more details on it +can be found [here](https://ioccc.xexyl.net/2024/oregon/) or else in the +markdown files in the tarball), if anyone is interested, assuming there's not an +extended power cut or something else goes wrong.
diff --git a/2024/ferguson1/data.asc.src b/2024/ferguson1/data.asc.src index 9a7f875915773b0002486482c008f942f5a7c7e5..f7b040e3da61729162a008ef85eeb1cba5c3068a 100644 GIT binary patch delta 194 zcmdl!nfbzG<_#Lf_2C(n3YmEdB^jv-iAlxzIi)433LdULJ_;$BDGHVOr3z`8MX4Z0 zkwQUcaY=rTy`n-$Mk-J&vsfW7KPf+@QUS~@$>%E0$j>j)QAn*wPAw>b=qWBKEdUx+ zoSKuSsNk3fF)}YTu_&ifAt@)dTwNg-q(3o5AwMlm2W%nGVlact$;aQ{B~roD#nV4z WGNYx)U;=d_2EveNlGx$EA;26NW>TERM+>alV&}Mkj3JR1GNMRM i^>taU{ulYU#fh@|IAP4m948DMsAyZSx6R|LpZyQ8-841; diff --git a/2024/ferguson1/data.scrnshot.src b/2024/ferguson1/data.scrnshot.src index f5e0f9ae218152fc78fd334bc6337e90f3e531b7..b45b6156816ee530e86e4104c63b4382477154ff 100644 GIT binary patch delta 425 zcmccij^*bEmJPb=>Oah%vRdK8{7DT!g8D2jkjdd0l?s`83MCn-3W-U@`8lN}sR|yh zK0XR5nJM)OmHDL#X_-Z-AV!fwL1uADevZ8&*hxU$KqrM{qyl9#ixu+nlk!t46~Nq* ze1+nS{QMFfh181V)PfR-?&6Ztg3J^JuvfrVD-@^Zq$w&m=B0q`$xBTv%BfUH%1JF( z$OV~{sF|XWpO&TrmIXQo%mBF=VzrZxzrRbQf~Sk8f5>FV9I?p(lY~>ItcDm(i|~SY Rn}KWc{vRfrKdnpY007=K$$ delta 158 zcmW;Fy$!-J5QgC<6%8wV13*^D4hRWRp715MWZgyfS-}-8JFo*Fu?r<5AX++p+P8S# z_p7--o9ps?STV&|J8ZSUQeX#DWUp!OW{fGHeRx5m%KdAvo3;?TsQUl0dE|3etGb$A_^At)lQWX-Dit}?y zOHvg)Tzz~LQZiE%D)UPf(lU!uL5w1Wg3RKQ{2Y5lg^-L?pjc+HLSBASeoCbRm|Kz$ zG7f0wl-0!<`S~R}3aJ&zsRbnvy~QP^1waFfQ*+W36+aA3b}xl2%_C!MmMnT$nGpLmDp(^1T1m{TS2S@y@24A z{Au6fd3RM~e{5V<_w9(u+A_sdBGl)cK?T8xCp, is for the encrypted version only.

+to get everything in.

The following variables are of primary concern (some temporary ones are not documented I think):