Merge pull request #175 from xexyl/oregon

This commit is contained in:
Landon Curt Noll authored and GitHub committed 2025-08-04 11:30:13 -07:00
commit 1a5a7eda54
11 files changed
+281 -140

No files matched your search

+9 -1
View File
@@ -6,7 +6,7 @@
"dir" : "ferguson1", "dir" : "ferguson1",
"entry_id" : "2024_ferguson1", "entry_id" : "2024_ferguson1",
"title" : "oregon", "title" : "oregon",
"abstract" : "Oregon trail pact with the devil", "abstract" : "A Pact With the Devil On the Oregon Trail",
"author_set" : [ "author_set" : [
{ {
"author_handle" : "Cody_Boone_Ferguson" "author_handle" : "Cody_Boone_Ferguson"
@@ -101,6 +101,14 @@
"display_via_github" : true, "display_via_github" : true,
"entry_text" : "hints on how to deobfuscate" "entry_text" : "hints on how to deobfuscate"
}, },
{
"file_path" : "gotos.txt",
"inventory_order" : 100,
"OK_to_edit" : true,
"display_as" : "text",
"display_via_github" : true,
"entry_text" : "text file showing all the line changes in a run"
},
{ {
"file_path" : "lencount.c", "file_path" : "lencount.c",
"inventory_order" : 100, "inventory_order" : 100,
+114 -66
View File
@@ -53,58 +53,46 @@ inside this C code. :-)
## Author's remarks: ## Author's remarks:
<div id="devil">
### A Pact With the Devil On the Oregon Trail (...and his 134 regrets of goto)
</div>
<hr style="width:10%;text-align:left;margin-left:0">
> Fun fact: after winning this, the author played the game in gdb from start to > Fun fact: after winning this, the author played the game in gdb from start to
finish and not counting macros but counting all function calls (not libc finish and not counting macros but counting all function calls (not libc
functions, functions in prog.c), there were a total of **985** (!) line jumps. functions just the few functions in prog.c), there were a total of **985** (!)
The prog.c, counting `#include`s, `#define`s, functions and some lines that have line jumps. The prog.c, counting `#include`s, `#define`s, functions and some
only braces, as well as 14 blank lines, has only 85 lines. A very tiny fraction lines that have only braces, as well as 14 blank lines, has only 85 lines. A
of the time a line might be repeated in a row ONCE but that does not really matter. 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 **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 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 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. file even after publication. I do have a copy of it if anyone is interested.
<hr style="width:10%;text-align:left;margin-left:0"> <div id="devil">
### A Pact With the Devil On the Oregon Trail (...and his 134 regrets of goto)
</div>
The _Go To Hell In A Handcart Travel Company_ **PROUDLY** welcomes all sinners to
The **Go To Hell In A Handcart Travel Company** PROUDLY welcomes all sinners to our **GREATEST** destination yet, with:
our GREATEST destination yet, with:
<img src="devil.png" <img src="devil.png"
alt="A Pact With the Devil On the Oregon Trail - Devil driving wagon" alt="A Pact With the Devil On the Oregon Trail - Devil driving wagon"
width=640 height=640> width=1024 height=1024>
Here is our travel guide: Here is our very sincere travel guide:
<img src="travelguide.jpg" <img src="travelguide.jpg"
alt="Hell In A Handcart Travel Company Oregon Trail travel guide" alt="Hell In A Handcart Travel Company Oregon Trail travel guide"
width=640 height=720> width=1536 height=1684>
But before I help any sinners embark on this once in a lifetime journey, for But before I help any sinners embark on this once in a lifetime journey, some
those who might be disconcerted with the idea of the theme (even though it's travellers might wish to look at the [commentary on the jokes](#jokes) (and
ridiculous with something going back to 66m years ago, to several centuries ago possibly the [disclaimer](#disclaimer)) as well as the [humour](#humour)
all the way back to the 1950s, all the while taking place in the 1800s), section, [historical references](#history) and [cultural references](#cultural)
**PLEASE** either read the (probably totally unnecessary) as well. The commentary is primarily for those who might be uncomfortable with
[disclaimer](#disclaimer) or skip this perilous journey entirely. Obviously the the jokes that go with the theme. Probably totally unnecessary, especially given
judges will have no choice in the matter :-) but it's not really for them anyway the [Best abuse of the user](https://www.ioccc.org/2000/briddlebane/index.html)
but rather in case this wins (which, of course, it did). IOCCC entry from 2000 that directly insults the player but just in case...
Everyone might or might not want to look at the [commentary on the Now, back to the good stuff (not that the jokes are not a good part of it)!
jokes](#jokes) as well as the [humour](#humour) section, [historical
references](#history) and [cultural references](#cultural) as well. The
commentary is primarily for those who might be uncomfortable with the jokes that
go with the theme. Probably totally unnecessary, especially given the [Best
abuse of the user](https://www.ioccc.org/2000/briddlebane/index.html) IOCCC
entry from 2000 that directly insults the player but just in case...
Now, back to the good stuff!
This program is an **ABSOLUTELY ABSURD PARODY** of the classic Oregon Trail, This program is an **ABSOLUTELY ABSURD PARODY** of the classic Oregon Trail,
although it's actually something else entirely now, hence the name change (not although it's actually something else entirely now, hence the name change (not
@@ -161,7 +149,8 @@ seen any suggestion of them before, one because it's absolutely contrary to how
it works in C, namely near 200 NUL terminated `char *`s in a single flat `char it works in C, namely near 200 NUL terminated `char *`s in a single flat `char
*` - no, not an array of `char *[]`). *` - no, not an array of `char *[]`).
See [obfuscation.html](obfuscation.html) and my [concluding remarks](#conclusion) for See [obfuscation.html](obfuscation.html) and my [concluding
remarks](#conclusions) for
more details on just how many `goto`s I have but beware of monsters. But be careful more details on just how many `goto`s I have but beware of monsters. But be careful
if you have a heart condition. And if you're a computer scientist make sure if you have a heart condition. And if you're a computer scientist make sure
you're not at risk of stroke. you're not at risk of stroke.
@@ -280,15 +269,15 @@ before it happens is one thing but if it succeeds it's even more ludicrous (and
funny - and also perhaps sardonic). funny - and also perhaps sardonic).
And if you do succeed you get some things too but not all of what you might And if you do succeed you get some things too but not all of what you might
expect! It might be called a kind of damaging (some might say 'damning') event but it expect! It might be called a kind of damaging (some might say 'damning') event
fits the theme quite well and although it (and this is not the only case this but it fits the theme quite well and although it (and this is not the only case
happens in the game) might not be something most people care to think about (but this happens in the game) might not be something most people care to think about
see [Disclaimer](#disclaimer) and also [what the judges LIKE](#vomitory), yes (but see [what the judges LIKE](#vomitory), yes cannibalism does in fact occur
cannibalism does in fact occur in the game, to be blunt (not that the judges in the game, to be blunt (not that the judges like THAT but you'll see what I
like THAT but you'll see what I mean if you read that section: which is by no mean if you read that section: which is by no means necessary for most people!).
means necessary for most people!). Of course it's happened throughout history Of course it's happened throughout history including on the trail so even if the
including on the trail so even if the judges did not like to throw up (and judges did not like to throw up (and laugh, which I would guess they will also
laugh, which I would guess they will also be doing), it still fits well. be doing), it still fits well.
There are actually far more ridiculous examples of this, things that make no There are actually far more ridiculous examples of this, things that make no
sense, like most of the game. But that's what makes it so much fun. There are sense, like most of the game. But that's what makes it so much fun. There are
@@ -358,8 +347,8 @@ are even better here](#emojis).
The jokes that have what some people might question actually have multiple The jokes that have what some people might question actually have multiple
interpretations and if one goes to what they find 'questionable' that's actually interpretations and if one goes to what they find 'questionable' that's actually
on their end and very possibly (in many cases this is almost certainly the case) on their end and very possibly (in many cases this is almost certainly the case)
not even my original idea. But that's discussed in the [disclaimer](#disclaimer) not even my original idea. But that's discussed in the [commentary on the
and the [commentary on the jokes](#jokes). jokes](#jokes).
For those who are curious enough but do not want to try and figure it out: I do For those who are curious enough but do not want to try and figure it out: I do
offer a section of some of the [differences](#differences) from the May offer a section of some of the [differences](#differences) from the May
@@ -432,7 +421,8 @@ and easily amused.
### Disclaimer ### Disclaimer
</div> </div>
**PUBLIC HEALTH ADVISORY**: as everyone will have noticed I write a lot. So IF **PUBLIC HEALTH ADVISORY**: as everyone who already knows me, and as new people
will have noticed already: I write a lot. So IF
you believe that all I have written is circumlocution, and you have you believe that all I have written is circumlocution, and you have
circumlocutophobia aka logoblabberophobia (fear of circumlocution - yes those circumlocutophobia aka logoblabberophobia (fear of circumlocution - yes those
are made up), and you also have hippopotomonstrosesquipedalobibliophobia (fear are made up), and you also have hippopotomonstrosesquipedalobibliophobia (fear
@@ -500,9 +490,11 @@ Anyway: if the idea of a pact with the devil (or in this case, the narrator! :-)
:-) ) does offend you, and I suppose that's the real one for some people, I can :-) ) does offend you, and I suppose that's the real one for some people, I can
offer only: it's nothing serious and all in good fun; there are a lot of jokes offer only: it's nothing serious and all in good fun; there are a lot of jokes
and in fact **the PLAYER CHARACTER (PC) is playfully MOCKED** by the narrator and in fact **the PLAYER CHARACTER (PC) is playfully MOCKED** by the narrator
**EXACTLY FOR** this pact and their behaviour! As you'll notice the narrator **EXACTLY FOR** this pact and their behaviour! Of course as the narrator is the
also has a somewhat dubious character (which is also how it would go in real devil that means the devil is mocking the PC for making a pact with the devil,
life, given what the narrator is) but also in vague and ambiguous ways. which makes it even more ridiculous. As you'll notice the narrator also has a
somewhat dubious character (which is also how it would go in real life, at least
if it existed, given what the narrator is) but also in vague and ambiguous ways.
That is also discussed later in the humour subsection. As I note elsewhere I That is also discussed later in the humour subsection. As I note elsewhere I
think, I have a personal problem with labelling people a sinner and I cannot think, I have a personal problem with labelling people a sinner and I cannot
@@ -1389,7 +1381,7 @@ the fact that original Oregon Trail (and my game is even worse) is a goto hell
spaghetti code and my joke in the [obfuscation.html](obfuscation.html) file (not to spaghetti code and my joke in the [obfuscation.html](obfuscation.html) file (not to
mention the joke of using the obscene amount of `goto`s in a single small mention the joke of using the obscene amount of `goto`s in a single small
program (see the obfuscation file for more on that as well as [concluding program (see the obfuscation file for more on that as well as [concluding
remarks](#conclusion)). remarks](#conclusions)).
The message is full of irony for added effect, namely the 'WELCOME TO HELL!' and The message is full of irony for added effect, namely the 'WELCOME TO HELL!' and
calling it your forever home, plus god wishing you a prosperous life ahead. calling it your forever home, plus god wishing you a prosperous life ahead.
@@ -3250,8 +3242,9 @@ ineffable.
Actually I wanted to see what it was like. It was VERY amusing - but only Actually I wanted to see what it was like. It was VERY amusing - but only
because I did not have to debug it. For the submission I included line changes because I did not have to debug it. For the submission I included line changes
for JUST the third prompt. It looked like: for JUST the third prompt. Yes, what would only take a few seconds of play. It
time (mere hours left) but to get to JUST the third prompt this is the lines it looked like this (I only did the third prompt as I had mere hours left to
finish):
``` ```
19 20 21 32 69 82 34 33 34 47 45 47 50 83 34 33 34 47 45 47 50 83 34 33 34 19 20 21 32 69 82 34 33 34 47 45 47 50 83 34 33 34 47 45 47 50 83 34 33 34
@@ -3263,15 +3256,19 @@ I'm a dragon. I'm not a dragon. I have a secret for you: dragons don't exist.
Except on the Oregon Trail. Except on the Oregon Trail.
I was right too: the entire game is worse, far far worse. After this won I did a I was right too: the entire game is worse, far far worse. After this won I did a
full sequence. This is from start to finish and I include it for your amusement. full sequence. This is from start to finish and I include it for your amusement
Or horror. There are a few times where the line is the same but that only shows (see [gotos.txt](gotos.txt)). Or horror. There are a few times where the line
how very often the line changes. It is a total of 985 changes, counting is the same but that only shows how very often the line changes. It is a total
function calls (i.e. each call to one of the few functions is a jump); calls to of **985** (!) changes, counting function calls (i.e. each call to one of the few
the macros are not counted. functions is a jump); calls to the macros are not counted.
This is in a program that is JUST 85 lines! A program that has only 85 lines This is in a program that is **JUST 85 (!) lines**! A program that has only 85 lines
COUNTING the `#include`s, `#define`s, other functions and 14 blank lines that COUNTING the `#include`s, `#define`s, other functions and 14 blank lines that
jumps 985 times is astonishing. jumps 985 times is astonishing. Of course that's not the only technique but the
title of the award and the judges' remarks are rather fitting as it is
diabolical to follow this code (and the theme of the game fits as well); the
[obfuscation.html](obfuscation.html) shows even more on this - and the other
things I did as well.
> I have yet to see a single study that supported the supposition that GOTOs are > I have yet to see a single study that supported the supposition that GOTOs are
harmful (I presume this is not because nobody has tried). Nonetheless, people harmful (I presume this is not because nobody has tried). Nonetheless, people
@@ -3283,14 +3280,17 @@ Well after a bit more than 38 years I have finally provided exactly what Frank
said was missing. And it was about time. Not that it didn't happen before. But said was missing. And it was about time. Not that it didn't happen before. But
he was wrong. he was wrong.
It is not about not trying. But even IF he was right, he It is not about not trying. But even IF he WAS right, he
sure is WRONG NOW. Anyone who thinks otherwise needs to try and debug sure as hell is WRONG NOW. Anyone who thinks otherwise needs to try and debug
my program - or maintain it. Or write it. my program - or maintain it. Or write it.
It would have been SO MUCH EASIER if I did not use 134 `goto`s. Actually, even a It would have been SO MUCH EASIER if I did not use 134 `goto`s. Actually, even a
tiny portion of that would make it harder. Nobody, whether they're in their tiny portion of that would make it harder. Nobody, whether they're in their
right mind or not, would WANT to maintain this, or something even close to it. right mind or not, would WANT to maintain this, or something even close to it.
Feel free to pass on judgement to me. I welcome it! Feel free to pass on judgement to me. I welcome it! You have to be mad and
embrace it to do this. I went full out and if I didn't have to do other things
(or felt like fewer events would be worth it) I would have done even more
`goto`s for this very reason.
Even flex/bison code, which as far as I am aware uses FAR fewer `goto`s, is Even flex/bison code, which as far as I am aware uses FAR fewer `goto`s, is
notorious for `goto`s and is quite hard to follow. It would be a nightmare to notorious for `goto`s and is quite hard to follow. It would be a nightmare to
@@ -3300,7 +3300,7 @@ Okay, yes, I admit it: my abuse is extreme.
That doesn't matter. As I remind everyone later, Apple caused a security hole That doesn't matter. As I remind everyone later, Apple caused a security hole
because of a SINGLE misplaced `goto`. Mine is 133 more than that - and it works. because of a SINGLE misplaced `goto`. Mine is 133 more than that - and it works.
It shouldn't. It shouldn't. But of course it does.
> Then they turn around and say, 'See, the program with GOTOs is more complex.' > Then they turn around and say, 'See, the program with GOTOs is more complex.'
In short, the belief that GOTOs are harmful appears to have become a religious In short, the belief that GOTOs are harmful appears to have become a religious
@@ -3309,7 +3309,7 @@ doctrine, unassailable by evidence.
Well, Frank, I hope you appreciate the evidence now. Well, Frank, I hope you appreciate the evidence now.
I could go on but I don't want to criticise, as I said somewhere, and it's not I could go on but I don't want to criticise, as I said somewhere, and it's not
really important. My point was that where 1987/hines IS INDEED a beautiful really important. My point was that whereas 1987/hines IS INDEED a beautiful
counter-example of this letter, mine takes it much further. This program is not counter-example of this letter, mine takes it much further. This program is not
something anyone would want to maintain - presumably even Frank. something anyone would want to maintain - presumably even Frank.
@@ -3326,7 +3326,8 @@ I would have used git bisect but it would have been a lot of time lost, if I had
made even a few more commits. As it is it took a full two months and I BARELY made even a few more commits. As it is it took a full two months and I BARELY
finished this. In fact I finished it within hours of the contest closing! It was finished this. In fact I finished it within hours of the contest closing! It was
not even 12 hours before closing time. I barely made it. Part of that is I added not even 12 hours before closing time. I barely made it. Part of that is I added
even more `goto`s, despite the fact I had reached 2503 in size. even more `goto`s, despite the fact I had reached 2503 in size, with careful
size optimisation.
Countless times I came up with ways to do more, at least where it was possible, Countless times I came up with ways to do more, at least where it was possible,
such as freeing space so I could change some `break;`s to a `goto Z;` as `Z:` such as freeing space so I could change some `break;`s to a `goto Z;` as `Z:`
@@ -3336,6 +3337,22 @@ said, I could not really move any more code if I wanted to, even if I had more
space free. Those very few places where the code could in theory be moved are space free. Those very few places where the code could in theory be moved are
already controlled by goto. already controlled by goto.
In fact I could have done more `goto`s in this version but I wanted to help the
judges out in judging - that and it was easier to verify things are correct.
`iocccsize` reports on prog.c 2457 and after I won this I kind of wish I did
take it even further just to mess with everyone even more.
But as I said elsewhere basically everything is in the wrong place so what even
would be the point in doing that? It would probably not make it harder to follow
(well it would but still would there be a point in it?); it would just make it
even more absurd: the amount of spaghetti code makes it nigh impossible to
follow and I'm happy to have smashed the record of 24 by 110 `goto`s, even if I
now wish I had gone even further.
Nonetheless the 134 is what won so that's what I'll live by (and I doubt it'll
be broken as this kind of trick will, as the general remarks about the entries
note, not be as worthy, even if `goto`s are alas, not banned outright).
Anyway, as I noted in [obfuscation.html](obfuscation.html), no initialisation is Anyway, as I noted in [obfuscation.html](obfuscation.html), no initialisation is
skipped in my jumps and that is what causes `goto` to invoke UB. skipped in my jumps and that is what causes `goto` to invoke UB.
@@ -3595,6 +3612,37 @@ would be worse with The Chronicles of Narnia. Probably most stories you'll run
into issues without some code modifications (have fun!!). But hopefully this into issues without some code modifications (have fun!!). But hopefully this
helps you appreciate the careful design even more. helps you appreciate the careful design even more.
### Dedications and thanks
I dedicate this to all the poor souls who suffered in the [Salem Witchcraft
Trials](https://en.wikipedia.org/wiki/Salem_witch_trials), the [Great Molasses
Flood](https://en.wikipedia.org/wiki/Great_Molasses_Flood) as well as all those
who died on the [Oregon Trail](https://en.wikipedia.org/wiki/Oregon_Trail).
Oh and those who were eaten by [Dragons](https://en.wikipedia.org/wiki/Dragon),
attacked by [Werewolves](https://en.wikipedia.org/wiki/Werewolf) or bitten by a
[Vampire](https://en.wikipedia.org/wiki/Vampire) (fun or not so fun fact: there
is a disease that has some of the similarities to vampirism, so much so that
it's known also as the vampire disease:
[porphyria](https://medicover-genetics.com/porphyria-the-facts-behind-the-so-called-vampire-disease/).
Plus [Blackbeard's](https://en.wikipedia.org/wiki/Blackbeard) victims. Oh and
yes anyone attacked by the [Flying
Spaghetti Monster](https://en.wikipedia.org/wiki/Flying_Spaghetti_Monster)
or those who were tricked by the [BBC April Fool's prank of the
Spaghetti
tree](http://news.bbc.co.uk/onthisday/hi/dates/stories/april/1/newsid_2819000/2819261.stm)
on the [Panorama programme](https://www.bbc.co.uk/programmes/b006t14n) in 1957.
Bless you all (probably by the [devil on the Oregon
Trail](https://www.ioccc.org/2024/ferguson1/index.html)).
On a more serious note I also dedicate this to my lovely Mum Dianne and
my dear cousin Dani plus my great friend Martijn Schoemaker who gave me my first
real opportunity (a MUD) to get great at C back in the early 2000s and who
reminded me of the IOCCC so many years ago now.
Also thanks to my friends for putting up with my slow responses (and in some
cases no response at all) as I was working on this.
#### P.S. select remarks made to the IOCCC Judges #### P.S. select remarks made to the IOCCC Judges
+40
View File
@@ -0,0 +1,40 @@
19 20 21 32 15 13 15 68 81 34 33 15 13 15 34 13 49 47 49 52 82 34 33 15 13
15 34 13 49 47 49 52 82 34 33 15 13 15 34 13 49 47 49 52 82 34 33 15 13 15
34 13 49 47 49 52 82 34 33 15 13 15 34 13 49 47 49 52 82 18 19 13 19 21 78
27 54 29 55 52 55 52 55 52 55 52 55 52 30 13 30 78 63 82 15 13 15 13 53 56
30 16 32 27 15 13 15 27 32 57 59 57 58 57 59 81 15 13 15 81 71 74 72 74 76
27 54 29 55 52 55 52 55 52 55 52 55 52 30 13 30 78 63 82 15 13 15 13 52 57
59 57 58 57 59 64 15 13 15 19 64 81 71 74 72 74 76 27 54 29 55 52 55 52 55
52 55 52 55 52 30 13 30 15 13 15 13 52 57 59 57 58 57 59 64 15 13 15 19 64
81 71 74 72 74 76 27 54 29 55 52 55 52 55 52 55 52 55 52 30 13 30 15 13 15
13 68 81 34 33 15 13 15 34 13 36 39 41 39 39 41 39 41 39 41 39 41 39 41 39
41 43 52 82 34 33 15 13 15 34 13 36 39 41 39 39 41 39 41 39 41 39 41 39 41
39 41 43 52 82 34 33 15 13 15 34 13 36 39 41 39 39 41 39 41 39 41 39 41 39
41 39 41 43 52 82 34 33 15 13 15 34 13 36 39 41 39 39 41 39 41 39 41 39 41
39 41 39 41 43 52 82 34 33 15 13 15 34 13 36 39 41 39 39 41 39 41 39 41 39
41 39 41 39 41 43 52 82 18 55 29 55 29 29 55 29 29 55 29 29 55 29 29 55 29
19 13 19 57 59 57 58 57 59 81 71 74 72 74 76 27 54 29 55 52 55 52 55 52 55
52 55 52 30 13 30 15 13 15 13 52 57 59 57 58 57 59 60 15 13 15 60 81 71 74
72 74 76 27 54 29 55 52 55 52 55 52 55 52 55 52 30 13 30 15 13 15 13 52 57
59 57 58 57 59 64 15 13 15 19 64 81 71 74 72 74 76 27 54 29 55 52 55 52 55
52 55 52 55 52 30 13 30 78 63 82 15 13 15 13 52 57 59 57 58 57 59 64 15 13
15 19 64 81 54 15 13 15 54 15 13 15 15 13 15 83 15 13 15 27 54 29 55 52 55
52 55 52 55 52 55 52 30 13 30 78 63 82 15 13 15 13 52 57 59 57 58 57 59 64
15 13 15 64 81 83 68 71 15 13 15 74 72 74 76 27 54 29 55 52 55 52 55 52 55
52 55 52 30 13 30 78 63 82 15 13 15 13 52 57 59 57 58 57 59 64 15 13 15 64
81 83 68 71 74 72 74 76 27 54 29 55 52 55 52 55 52 55 52 55 52 30 13 30 78
63 82 15 13 15 13 52 57 59 57 58 57 59 61 15 13 15 61 81 83 68 71 15 13 15
74 72 74 76 27 54 29 55 52 55 52 55 52 55 52 55 52 30 13 30 15 13 15 13 68
81 34 33 15 13 15 34 13 36 39 41 39 39 41 39 41 39 41 39 41 39 41 39 41 43
52 82 34 33 15 13 15 34 13 36 39 41 39 39 41 39 41 39 41 39 41 39 41 39 41
43 52 82 34 33 15 13 15 34 13 36 39 41 39 39 41 39 41 39 41 39 41 39 41 39
41 43 52 82 34 33 15 13 15 34 13 36 39 41 39 39 41 39 41 39 41 39 41 39 41
39 41 43 52 82 34 33 15 13 15 34 13 36 39 41 39 39 41 39 41 39 41 39 41 39
41 39 41 43 52 82 18 55 29 55 29 29 55 29 29 55 29 29 55 29 29 55 29 19 13
19 57 59 57 58 57 59 81 15 13 15 81 83 68 71 74 72 74 76 27 54 29 55 52 55
52 55 52 55 52 55 52 30 13 30 15 13 15 13 52 57 59 57 58 57 59 65 15 13 15
65 81 83 68 71 74 72 74 76 27 54 29 55 52 55 52 55 52 55 52 55 52 30 13 30
15 13 15 13 52 57 59 57 58 57 59 60 15 13 15 60 81 83 68 69 70 71 15 13 15
74 72 74 76 27 54 29 55 52 55 52 55 52 55 52 55 52 30 13 30 15 13 15 13 52
57 59 57 58 57 59 64 15 13 15 19 64 81 83 68 71 15 13 15 74 72 74 76 27 83
26 21 15 13 15 15 13 15 24 85
+108 -63
View File
@@ -434,7 +434,7 @@
</a> </a>
<h1>The International Obfuscated C Code Contest</h1> <h1>The International Obfuscated C Code Contest</h1>
<h2>2024/ferguson1 - Prize in diabolical logistics</h2> <h2>2024/ferguson1 - Prize in diabolical logistics</h2>
<h3>Oregon trail pact with the devil</h3> <h3>A Pact With the Devil On the Oregon Trail</h3>
</div> </div>
<!-- END: this line ends content from: inc/header.default.html --> <!-- END: this line ends content from: inc/header.default.html -->
@@ -495,48 +495,40 @@ by <a href="https://en.wikipedia.org/wiki/The_Oregon_Trail_(series)">Oregon Trai
how well prepared you are, you will have a devil of a time jumping around how well prepared you are, you will have a devil of a time jumping around
inside this C code. :-)</p> inside this C code. :-)</p>
<h2 id="authors-remarks">Author’s remarks:</h2> <h2 id="authors-remarks">Author’s remarks:</h2>
<div id="devil">
<h3 id="a-pact-with-the-devil-on-the-oregon-trail-and-his-134-regrets-of-goto">A Pact With the Devil On the Oregon Trail (…and his 134 regrets of goto)</h3>
</div>
<hr style="width:10%;text-align:left;margin-left:0">
<blockquote> <blockquote>
<p>Fun fact: after winning this, the author played the game in gdb from start to <p>Fun fact: after winning this, the author played the game in gdb from start to
finish and not counting macros but counting all function calls (not libc finish and not counting macros but counting all function calls (not libc
functions, functions in prog.c), there were a total of <strong>985</strong> (!) line jumps. functions just the few functions in prog.c), there were a total of <strong>985</strong> (!)
The prog.c, counting <code>#include</code>s, <code>#define</code>s, functions and some lines that have line jumps. The prog.c, counting <code>#include</code>s, <code>#define</code>s, functions and some
only braces, as well as 14 blank lines, has only 85 lines. A very tiny fraction lines that have only braces, as well as 14 blank lines, has only 85 lines. A
of the time a line might be repeated in a row ONCE but that does not really matter.</p> very tiny fraction of the time a line might be repeated in a row ONCE but that
does not really matter.</p>
</blockquote> </blockquote>
<p><strong>NOTE</strong>: I actually submitted two versions. This one is not encrypted. The <p><strong>NOTE</strong>: I actually submitted two versions. This one is not encrypted. The
encrypted one even encrypted emojis without having to decrypt them in order to 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 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.</p> file even after publication. I do have a copy of it if anyone is interested.</p>
<hr style="width:10%;text-align:left;margin-left:0"> <div id="devil">
<p>The <strong>Go To Hell In A Handcart Travel Company</strong> PROUDLY welcomes all sinners to <h3 id="a-pact-with-the-devil-on-the-oregon-trail-and-his-134-regrets-of-goto">A Pact With the Devil On the Oregon Trail (…and his 134 regrets of goto)</h3>
our GREATEST destination yet, with:</p> </div>
<p>The <em>Go To Hell In A Handcart Travel Company</em> <strong>PROUDLY</strong> welcomes all sinners to
our <strong>GREATEST</strong> destination yet, with:</p>
<p><img src="devil.png" <p><img src="devil.png"
alt="A Pact With the Devil On the Oregon Trail - Devil driving wagon" alt="A Pact With the Devil On the Oregon Trail - Devil driving wagon"
width=640 height=640></p> width=1024 height=1024></p>
<p>Here is our travel guide:</p> <p>Here is our very sincere travel guide:</p>
<p><img src="travelguide.jpg" <p><img src="travelguide.jpg"
alt="Hell In A Handcart Travel Company Oregon Trail travel guide" alt="Hell In A Handcart Travel Company Oregon Trail travel guide"
width=640 height=720></p> width=1536 height=1684></p>
<p>But before I help any sinners embark on this once in a lifetime journey, for <p>But before I help any sinners embark on this once in a lifetime journey, some
those who might be disconcerted with the idea of the theme (even though it’s travellers might wish to look at the <a href="#jokes">commentary on the jokes</a> (and
ridiculous with something going back to 66m years ago, to several centuries ago possibly the <a href="#disclaimer">disclaimer</a>) as well as the <a href="#humour">humour</a>
all the way back to the 1950s, all the while taking place in the 1800s), section, <a href="#history">historical references</a> and <a href="#cultural">cultural references</a>
<strong>PLEASE</strong> either read the (probably totally unnecessary) as well. The commentary is primarily for those who might be uncomfortable with
<a href="#disclaimer">disclaimer</a> or skip this perilous journey entirely. Obviously the the jokes that go with the theme. Probably totally unnecessary, especially given
judges will have no choice in the matter :-) but it’s not really for them anyway the <a href="https://www.ioccc.org/2000/briddlebane/index.html">Best abuse of the user</a>
but rather in case this wins (which, of course, it did).</p> IOCCC entry from 2000 that directly insults the player but just in case…</p>
<p>Everyone might or might not want to look at the <a href="#jokes">commentary on the <p>Now, back to the good stuff (not that the jokes are not a good part of it)!</p>
jokes</a> as well as the <a href="#humour">humour</a> section, <a href="#history">historical
references</a> and <a href="#cultural">cultural references</a> as well. The
commentary is primarily for those who might be uncomfortable with the jokes that
go with the theme. Probably totally unnecessary, especially given the <a href="https://www.ioccc.org/2000/briddlebane/index.html">Best
abuse of the user</a> IOCCC
entry from 2000 that directly insults the player but just in case…</p>
<p>Now, back to the good stuff!</p>
<p>This program is an <strong>ABSOLUTELY ABSURD PARODY</strong> of the classic Oregon Trail, <p>This program is an <strong>ABSOLUTELY ABSURD PARODY</strong> of the classic Oregon Trail,
although it’s actually something else entirely now, hence the name change (not although it’s actually something else entirely now, hence the name change (not
‘Oregon Trail: …’).</p> ‘Oregon Trail: …’).</p>
@@ -583,7 +575,8 @@ things I have done - and some are really quite unique and cool, or at least I
think they are unique (I have never seen these things before nor have I even think they are unique (I have never seen these things before nor have I even
seen any suggestion of them before, one because it’s absolutely contrary to how seen any suggestion of them before, one because it’s absolutely contrary to how
it works in C, namely near 200 NUL terminated <code>char *</code>s in a single flat <code>char *</code> - no, not an array of <code>char *[]</code>).</p> it works in C, namely near 200 NUL terminated <code>char *</code>s in a single flat <code>char *</code> - no, not an array of <code>char *[]</code>).</p>
<p>See <a href="obfuscation.html">obfuscation.html</a> and my <a href="#conclusion">concluding remarks</a> for <p>See <a href="obfuscation.html">obfuscation.html</a> and my <a href="#conclusions">concluding
remarks</a> for
more details on just how many <code>goto</code>s I have but beware of monsters. But be careful more details on just how many <code>goto</code>s I have but beware of monsters. But be careful
if you have a heart condition. And if you’re a computer scientist make sure if you have a heart condition. And if you’re a computer scientist make sure
you’re not at risk of stroke.</p> you’re not at risk of stroke.</p>
@@ -684,15 +677,15 @@ tactics (no need), to be on theme, you rob (or attempt to rob!) them. The joke
before it happens is one thing but if it succeeds it’s even more ludicrous (and before it happens is one thing but if it succeeds it’s even more ludicrous (and
funny - and also perhaps sardonic).</p> funny - and also perhaps sardonic).</p>
<p>And if you do succeed you get some things too but not all of what you might <p>And if you do succeed you get some things too but not all of what you might
expect! It might be called a kind of damaging (some might say ‘damning’) event but it expect! It might be called a kind of damaging (some might say ‘damning’) event
fits the theme quite well and although it (and this is not the only case this but it fits the theme quite well and although it (and this is not the only case
happens in the game) might not be something most people care to think about (but this happens in the game) might not be something most people care to think about
see <a href="#disclaimer">Disclaimer</a> and also <a href="#vomitory">what the judges LIKE</a>, yes (but see <a href="#vomitory">what the judges LIKE</a>, yes cannibalism does in fact occur
cannibalism does in fact occur in the game, to be blunt (not that the judges in the game, to be blunt (not that the judges like THAT but you’ll see what I
like THAT but you’ll see what I mean if you read that section: which is by no mean if you read that section: which is by no means necessary for most people!).
means necessary for most people!). Of course it’s happened throughout history Of course it’s happened throughout history including on the trail so even if the
including on the trail so even if the judges did not like to throw up (and judges did not like to throw up (and laugh, which I would guess they will also
laugh, which I would guess they will also be doing), it still fits well.</p> be doing), it still fits well.</p>
<p>There are actually far more ridiculous examples of this, things that make no <p>There are actually far more ridiculous examples of this, things that make no
sense, like most of the game. But that’s what makes it so much fun. There are sense, like most of the game. But that’s what makes it so much fun. There are
many other absolutely ridiculous things, and the above is only a small sample of many other absolutely ridiculous things, and the above is only a small sample of
@@ -748,8 +741,8 @@ are even better here</a>.</p>
<p>The jokes that have what some people might question actually have multiple <p>The jokes that have what some people might question actually have multiple
interpretations and if one goes to what they find ‘questionable’ that’s actually interpretations and if one goes to what they find ‘questionable’ that’s actually
on their end and very possibly (in many cases this is almost certainly the case) on their end and very possibly (in many cases this is almost certainly the case)
not even my original idea. But that’s discussed in the <a href="#disclaimer">disclaimer</a> not even my original idea. But that’s discussed in the <a href="#jokes">commentary on the
and the <a href="#jokes">commentary on the jokes</a>.</p> jokes</a>.</p>
<p>For those who are curious enough but do not want to try and figure it out: I do <p>For those who are curious enough but do not want to try and figure it out: I do
offer a section of some of the <a href="#differences">differences</a> from the May offer a section of some of the <a href="#differences">differences</a> from the May
1978 issue of Creative Computing (though as it’s mostly a different game it 1978 issue of Creative Computing (though as it’s mostly a different game it
@@ -802,7 +795,8 @@ limits (certainly not possible with obfuscation, maybe not otherwise)!</p>
<p>See my somewhat unserious <a href="#dedications">dedications</a> as well, if you’re bored <p>See my somewhat unserious <a href="#dedications">dedications</a> as well, if you’re bored
and easily amused.</p> and easily amused.</p>
<h3 id="disclaimer">Disclaimer</h3> <h3 id="disclaimer">Disclaimer</h3>
<p><strong>PUBLIC HEALTH ADVISORY</strong>: as everyone will have noticed I write a lot. So IF <p><strong>PUBLIC HEALTH ADVISORY</strong>: as everyone who already knows me, and as new people
will have noticed already: I write a lot. So IF
you believe that all I have written is circumlocution, and you have you believe that all I have written is circumlocution, and you have
circumlocutophobia aka logoblabberophobia (fear of circumlocution - yes those circumlocutophobia aka logoblabberophobia (fear of circumlocution - yes those
are made up), and you also have hippopotomonstrosesquipedalobibliophobia (fear are made up), and you also have hippopotomonstrosesquipedalobibliophobia (fear
@@ -860,9 +854,11 @@ a narrator).</p>
:-) ) does offend you, and I suppose that’s the real one for some people, I can :-) ) does offend you, and I suppose that’s the real one for some people, I can
offer only: it’s nothing serious and all in good fun; there are a lot of jokes offer only: it’s nothing serious and all in good fun; there are a lot of jokes
and in fact <strong>the PLAYER CHARACTER (PC) is playfully MOCKED</strong> by the narrator and in fact <strong>the PLAYER CHARACTER (PC) is playfully MOCKED</strong> by the narrator
<strong>EXACTLY FOR</strong> this pact and their behaviour! As you’ll notice the narrator <strong>EXACTLY FOR</strong> this pact and their behaviour! Of course as the narrator is the
also has a somewhat dubious character (which is also how it would go in real devil that means the devil is mocking the PC for making a pact with the devil,
life, given what the narrator is) but also in vague and ambiguous ways.</p> which makes it even more ridiculous. As you’ll notice the narrator also has a
somewhat dubious character (which is also how it would go in real life, at least
if it existed, given what the narrator is) but also in vague and ambiguous ways.</p>
<p>That is also discussed later in the humour subsection. As I note elsewhere I <p>That is also discussed later in the humour subsection. As I note elsewhere I
think, I have a personal problem with labelling people a sinner and I cannot think, I have a personal problem with labelling people a sinner and I cannot
even name all of the sins which adds to the lack of seriousness - and adding to even name all of the sins which adds to the lack of seriousness - and adding to
@@ -1560,7 +1556,7 @@ winning the game (what is winning in this case? - see below). This is a play on
the fact that original Oregon Trail (and my game is even worse) is a goto hell the fact that original Oregon Trail (and my game is even worse) is a goto hell
spaghetti code and my joke in the <a href="obfuscation.html">obfuscation.html</a> file (not to spaghetti code and my joke in the <a href="obfuscation.html">obfuscation.html</a> file (not to
mention the joke of using the obscene amount of <code>goto</code>s in a single small mention the joke of using the obscene amount of <code>goto</code>s in a single small
program (see the obfuscation file for more on that as well as <a href="#conclusion">concluding program (see the obfuscation file for more on that as well as <a href="#conclusions">concluding
remarks</a>).</p> remarks</a>).</p>
<p>The message is full of irony for added effect, namely the ‘WELCOME TO HELL!’ and <p>The message is full of irony for added effect, namely the ‘WELCOME TO HELL!’ and
calling it your forever home, plus god wishing you a prosperous life ahead.</p> calling it your forever home, plus god wishing you a prosperous life ahead.</p>
@@ -3085,22 +3081,27 @@ traits I do not even know how to describe. Perhaps they would be utterly
ineffable.</p> ineffable.</p>
<p>Actually I wanted to see what it was like. It was VERY amusing - but only <p>Actually I wanted to see what it was like. It was VERY amusing - but only
because I did not have to debug it. For the submission I included line changes because I did not have to debug it. For the submission I included line changes
for JUST the third prompt. It looked like: for JUST the third prompt. Yes, what would only take a few seconds of play. It
time (mere hours left) but to get to JUST the third prompt this is the lines it</p> looked like this (I only did the third prompt as I had mere hours left to
finish):</p>
<pre><code> 19 20 21 32 69 82 34 33 34 47 45 47 50 83 34 33 34 47 45 47 50 83 34 33 34</code></pre> <pre><code> 19 20 21 32 69 82 34 33 34 47 45 47 50 83 34 33 34 47 45 47 50 83 34 33 34</code></pre>
<p>I said the game loop is almost certainly much worse, especially those two for <p>I said the game loop is almost certainly much worse, especially those two for
loops I mentioned, but there is much much more. If this is easier to follow then loops I mentioned, but there is much much more. If this is easier to follow then
I’m a dragon. I’m not a dragon. I have a secret for you: dragons don’t exist. I’m a dragon. I’m not a dragon. I have a secret for you: dragons don’t exist.
Except on the Oregon Trail.</p> Except on the Oregon Trail.</p>
<p>I was right too: the entire game is worse, far far worse. After this won I did a <p>I was right too: the entire game is worse, far far worse. After this won I did a
full sequence. This is from start to finish and I include it for your amusement. full sequence. This is from start to finish and I include it for your amusement
Or horror. There are a few times where the line is the same but that only shows (see <a href="gotos.txt">gotos.txt</a>). Or horror. There are a few times where the line
how very often the line changes. It is a total of 985 changes, counting is the same but that only shows how very often the line changes. It is a total
function calls (i.e. each call to one of the few functions is a jump); calls to of <strong>985</strong> (!) changes, counting function calls (i.e. each call to one of the few
the macros are not counted.</p> functions is a jump); calls to the macros are not counted.</p>
<p>This is in a program that is JUST 85 lines! A program that has only 85 lines <p>This is in a program that is <strong>JUST 85 (!) lines</strong>! A program that has only 85 lines
COUNTING the <code>#include</code>s, <code>#define</code>s, other functions and 14 blank lines that COUNTING the <code>#include</code>s, <code>#define</code>s, other functions and 14 blank lines that
jumps 985 times is astonishing.</p> jumps 985 times is astonishing. Of course that’s not the only technique but the
title of the award and the judges’ remarks are rather fitting as it is
diabolical to follow this code (and the theme of the game fits as well); the
<a href="obfuscation.html">obfuscation.html</a> shows even more on this - and the other
things I did as well.</p>
<blockquote> <blockquote>
<p>I have yet to see a single study that supported the supposition that GOTOs are <p>I have yet to see a single study that supported the supposition that GOTOs are
harmful (I presume this is not because nobody has tried). Nonetheless, people harmful (I presume this is not because nobody has tried). Nonetheless, people
@@ -3111,20 +3112,23 @@ dismiss any statement opposing it.</p>
<p>Well after a bit more than 38 years I have finally provided exactly what Frank <p>Well after a bit more than 38 years I have finally provided exactly what Frank
said was missing. And it was about time. Not that it didn’t happen before. But said was missing. And it was about time. Not that it didn’t happen before. But
he was wrong.</p> he was wrong.</p>
<p>It is not about not trying. But even IF he was right, he <p>It is not about not trying. But even IF he WAS right, he
sure is WRONG NOW. Anyone who thinks otherwise needs to try and debug sure as hell is WRONG NOW. Anyone who thinks otherwise needs to try and debug
my program - or maintain it. Or write it.</p> my program - or maintain it. Or write it.</p>
<p>It would have been SO MUCH EASIER if I did not use 134 <code>goto</code>s. Actually, even a <p>It would have been SO MUCH EASIER if I did not use 134 <code>goto</code>s. Actually, even a
tiny portion of that would make it harder. Nobody, whether they’re in their tiny portion of that would make it harder. Nobody, whether they’re in their
right mind or not, would WANT to maintain this, or something even close to it. right mind or not, would WANT to maintain this, or something even close to it.
Feel free to pass on judgement to me. I welcome it!</p> Feel free to pass on judgement to me. I welcome it! You have to be mad and
embrace it to do this. I went full out and if I didn’t have to do other things
(or felt like fewer events would be worth it) I would have done even more
<code>goto</code>s for this very reason.</p>
<p>Even flex/bison code, which as far as I am aware uses FAR fewer <code>goto</code>s, is <p>Even flex/bison code, which as far as I am aware uses FAR fewer <code>goto</code>s, is
notorious for <code>goto</code>s and is quite hard to follow. It would be a nightmare to notorious for <code>goto</code>s and is quite hard to follow. It would be a nightmare to
try and maintain without the .l/.y source files.</p> try and maintain without the .l/.y source files.</p>
<p>Okay, yes, I admit it: my abuse is extreme.</p> <p>Okay, yes, I admit it: my abuse is extreme.</p>
<p>That doesn’t matter. As I remind everyone later, Apple caused a security hole <p>That doesn’t matter. As I remind everyone later, Apple caused a security hole
because of a SINGLE misplaced <code>goto</code>. Mine is 133 more than that - and it works. because of a SINGLE misplaced <code>goto</code>. Mine is 133 more than that - and it works.
It shouldn’t.</p> It shouldn’t. But of course it does.</p>
<blockquote> <blockquote>
<p>Then they turn around and say, ‘See, the program with GOTOs is more complex.’ <p>Then they turn around and say, ‘See, the program with GOTOs is more complex.’
In short, the belief that GOTOs are harmful appears to have become a religious In short, the belief that GOTOs are harmful appears to have become a religious
@@ -3132,7 +3136,7 @@ doctrine, unassailable by evidence.</p>
</blockquote> </blockquote>
<p>Well, Frank, I hope you appreciate the evidence now.</p> <p>Well, Frank, I hope you appreciate the evidence now.</p>
<p>I could go on but I don’t want to criticise, as I said somewhere, and it’s not <p>I could go on but I don’t want to criticise, as I said somewhere, and it’s not
really important. My point was that where 1987/hines IS INDEED a beautiful really important. My point was that whereas 1987/hines IS INDEED a beautiful
counter-example of this letter, mine takes it much further. This program is not counter-example of this letter, mine takes it much further. This program is not
something anyone would want to maintain - presumably even Frank.</p> something anyone would want to maintain - presumably even Frank.</p>
<p>I think everyone gets the idea. The fact I did all this WITHOUT invoking UB or <p>I think everyone gets the idea. The fact I did all this WITHOUT invoking UB or
@@ -3146,7 +3150,8 @@ case. I might have had to start over.</p>
made even a few more commits. As it is it took a full two months and I BARELY made even a few more commits. As it is it took a full two months and I BARELY
finished this. In fact I finished it within hours of the contest closing! It was finished this. In fact I finished it within hours of the contest closing! It was
not even 12 hours before closing time. I barely made it. Part of that is I added not even 12 hours before closing time. I barely made it. Part of that is I added
even more <code>goto</code>s, despite the fact I had reached 2503 in size.</p> even more <code>goto</code>s, despite the fact I had reached 2503 in size, with careful
size optimisation.</p>
<p>Countless times I came up with ways to do more, at least where it was possible, <p>Countless times I came up with ways to do more, at least where it was possible,
such as freeing space so I could change some <code>break;</code>s to a <code>goto Z;</code> as <code>Z:</code> such as freeing space so I could change some <code>break;</code>s to a <code>goto Z;</code> as <code>Z:</code>
was already there. The only other times this happened is before I had changed was already there. The only other times this happened is before I had changed
@@ -3154,6 +3159,19 @@ the code so much that you can no longer trust what a block of code is. Like I
said, I could not really move any more code if I wanted to, even if I had more said, I could not really move any more code if I wanted to, even if I had more
space free. Those very few places where the code could in theory be moved are space free. Those very few places where the code could in theory be moved are
already controlled by goto.</p> already controlled by goto.</p>
<p>In fact I could have done more <code>goto</code>s in this version but I wanted to help the
judges out in judging - that and it was easier to verify things are correct.
<code>iocccsize</code> reports on prog.c 2457 and after I won this I kind of wish I did
take it even further just to mess with everyone even more.</p>
<p>But as I said elsewhere basically everything is in the wrong place so what even
would be the point in doing that? It would probably not make it harder to follow
(well it would but still would there be a point in it?); it would just make it
even more absurd: the amount of spaghetti code makes it nigh impossible to
follow and I’m happy to have smashed the record of 24 by 110 <code>goto</code>s, even if I
now wish I had gone even further.</p>
<p>Nonetheless the 134 is what won so that’s what I’ll live by (and I doubt it’ll
be broken as this kind of trick will, as the general remarks about the entries
note, not be as worthy, even if <code>goto</code>s are alas, not banned outright).</p>
<p>Anyway, as I noted in <a href="obfuscation.html">obfuscation.html</a>, no initialisation is <p>Anyway, as I noted in <a href="obfuscation.html">obfuscation.html</a>, no initialisation is
skipped in my jumps and that is what causes <code>goto</code> to invoke UB.</p> skipped in my jumps and that is what causes <code>goto</code> to invoke UB.</p>
<p>Everything is file scope. And in any case, when I do jump to a place, everything <p>Everything is file scope. And in any case, when I do jump to a place, everything
@@ -3361,6 +3379,32 @@ every way, probably even if there wasn’t code that seems dead (or is dead) - a
even worse as I have not even revealed everything with that. I don’t even think even worse as I have not even revealed everything with that. I don’t even think
<strong>I</strong> could change this to not use <code>goto</code>s without breaking it! But what I do <strong>I</strong> could change this to not use <code>goto</code>s without breaking it! But what I do
know is it works exactly as intended. But it shouldn’t. It really shouldn’t.</p> know is it works exactly as intended. But it shouldn’t. It really shouldn’t.</p>
<h3 id="dedications-and-thanks">Dedications and thanks</h3>
<p>I dedicate this to all the poor souls who suffered in the <a href="https://en.wikipedia.org/wiki/Salem_witch_trials">Salem Witchcraft
Trials</a>, the <a href="https://en.wikipedia.org/wiki/Great_Molasses_Flood">Great Molasses
Flood</a> as well as all those
who died on the <a href="https://en.wikipedia.org/wiki/Oregon_Trail">Oregon Trail</a>.</p>
<p>Oh and those who were eaten by <a href="https://en.wikipedia.org/wiki/Dragon">Dragons</a>,
attacked by <a href="https://en.wikipedia.org/wiki/Werewolf">Werewolves</a> or bitten by a
<a href="https://en.wikipedia.org/wiki/Vampire">Vampire</a> (fun or not so fun fact: there
is a disease that has some of the similarities to vampirism, so much so that
it’s known also as the vampire disease:
<a href="https://medicover-genetics.com/porphyria-the-facts-behind-the-so-called-vampire-disease/">porphyria</a>.
Plus <a href="https://en.wikipedia.org/wiki/Blackbeard">Blackbeard’s</a> victims. Oh and
yes anyone attacked by the <a href="https://en.wikipedia.org/wiki/Flying_Spaghetti_Monster">Flying
Spaghetti Monster</a>
or those who were tricked by the <a href="http://news.bbc.co.uk/onthisday/hi/dates/stories/april/1/newsid_2819000/2819261.stm">BBC April Fool’s prank of the
Spaghetti
tree</a>
on the <a href="https://www.bbc.co.uk/programmes/b006t14n">Panorama programme</a> in 1957.
Bless you all (probably by the <a href="https://www.ioccc.org/2024/ferguson1/index.html">devil on the Oregon
Trail</a>).</p>
<p>On a more serious note I also dedicate this to my lovely Mum Dianne and
my dear cousin Dani plus my great friend Martijn Schoemaker who gave me my first
real opportunity (a MUD) to get great at C back in the early 2000s and who
reminded me of the IOCCC so many years ago now.</p>
<p>Also thanks to my friends for putting up with my slow responses (and in some
cases no response at all) as I was working on this.</p>
<h4 id="p.s.-select-remarks-made-to-the-ioccc-judges">P.S. select remarks made to the IOCCC Judges</h4> <h4 id="p.s.-select-remarks-made-to-the-ioccc-judges">P.S. select remarks made to the IOCCC Judges</h4>
<p>A hilarious truth is that to write less can take drastically more time than to <p>A hilarious truth is that to write less can take drastically more time than to
write more and unfortunately I am running out of time quickly. Writing this game write more and unfortunately I am running out of time quickly. Writing this game
@@ -3668,6 +3712,7 @@ helps you appreciate the careful design even more.<a href="#fnref2" class="footn
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/ferguson1/byteread.c">byteread.c</a> - prints out the strings without locations</li> <li><a href="https://github.com/ioccc-src/winner/blob/master/2024/ferguson1/byteread.c">byteread.c</a> - prints out the strings without locations</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/ferguson1/bytetest.c">bytetest.c</a> - prints every string extracted from data</li> <li><a href="https://github.com/ioccc-src/winner/blob/master/2024/ferguson1/bytetest.c">bytetest.c</a> - prints every string extracted from data</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/ferguson1/deobfuscation.html">deobfuscation.html</a> - hints on how to deobfuscate</li> <li><a href="https://github.com/ioccc-src/winner/blob/master/2024/ferguson1/deobfuscation.html">deobfuscation.html</a> - hints on how to deobfuscate</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/ferguson1/gotos.txt">gotos.txt</a> - text file showing all the line changes in a run</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/ferguson1/lencount.c">lencount.c</a> - counts strings and reports longest one</li> <li><a href="https://github.com/ioccc-src/winner/blob/master/2024/ferguson1/lencount.c">lencount.c</a> - counts strings and reports longest one</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/ferguson1/mbcheck.c">mbcheck.c</a> - show location of multibyte characters</li> <li><a href="https://github.com/ioccc-src/winner/blob/master/2024/ferguson1/mbcheck.c">mbcheck.c</a> - show location of multibyte characters</li>
<li><a href="https://github.com/ioccc-src/winner/blob/master/2024/ferguson1/obfuscation.html">obfuscation.html</a> - obfuscation information</li> <li><a href="https://github.com/ioccc-src/winner/blob/master/2024/ferguson1/obfuscation.html">obfuscation.html</a> - obfuscation information</li>
+1 -1
View File
@@ -692,7 +692,7 @@ pRNG).</p>
that the Devil wishes they were too:</p> that the Devil wishes they were too:</p>
<p><img src="gotos.png" <p><img src="gotos.png"
alt="image of Devil being strangled to death by spaghetti, regretting the pact" alt="image of Devil being strangled to death by spaghetti, regretting the pact"
width=640 height=640></p> width=1024 height=1024></p>
<p>I have shown JUST HOW LUDICROUS <code>goto</code>s really are and JUST HOW MUCH STRUCTURE <p>I have shown JUST HOW LUDICROUS <code>goto</code>s really are and JUST HOW MUCH STRUCTURE
AND MAINTAINABILITY is lost with <code>goto</code>s: a goal of the contest met simply by AND MAINTAINABILITY is lost with <code>goto</code>s: a goal of the contest met simply by
one thing taken to absurd levels. But if this is not the worst or best abuse of one thing taken to absurd levels. But if this is not the worst or best abuse of
+1 -1
View File
@@ -292,7 +292,7 @@ that the Devil wishes they were too:
<img src="gotos.png" <img src="gotos.png"
alt="image of Devil being strangled to death by spaghetti, regretting the pact" alt="image of Devil being strangled to death by spaghetti, regretting the pact"
width=640 height=640> width=1024 height=1024>
I have shown JUST HOW LUDICROUS `goto`s really are and JUST HOW MUCH STRUCTURE I have shown JUST HOW LUDICROUS `goto`s really are and JUST HOW MUCH STRUCTURE
AND MAINTAINABILITY is lost with `goto`s: a goal of the contest met simply by AND MAINTAINABILITY is lost with `goto`s: a goal of the contest met simply by
+1 -1
View File
@@ -6,7 +6,7 @@
"dir" : "ferguson2", "dir" : "ferguson2",
"entry_id" : "2024_ferguson2", "entry_id" : "2024_ferguson2",
"title" : "navajo-code-talkers", "title" : "navajo-code-talkers",
"abstract" : "Navajo code talker translator", "abstract" : "Navajo Code Talker translator",
"author_set" : [ "author_set" : [
{ {
"author_handle" : "Cody_Boone_Ferguson" "author_handle" : "Cody_Boone_Ferguson"
+1 -1
View File
@@ -434,7 +434,7 @@
</a> </a>
<h1>The International Obfuscated C Code Contest</h1> <h1>The International Obfuscated C Code Contest</h1>
<h2>2024/ferguson2 - Prize in yil-tas</h2> <h2>2024/ferguson2 - Prize in yil-tas</h2>
<h3>Navajo code talker translator</h3> <h3>Navajo Code Talker translator</h3>
</div> </div>
<!-- END: this line ends content from: inc/header.default.html --> <!-- END: this line ends content from: inc/header.default.html -->
+2 -2
View File
@@ -515,8 +515,8 @@ the <a href="index.html">Official IOCCC website</a>.</p>
<li><a href="2024/codemeow/index.html">2024/codemeow</a> - Prize in tray planting - <em>bonsai generator</em></li> <li><a href="2024/codemeow/index.html">2024/codemeow</a> - Prize in tray planting - <em>bonsai generator</em></li>
<li><a href="2024/endoh1/index.html">2024/endoh1</a> - Prize in patient pointillism - <em>slow ray tracer in CPP</em></li> <li><a href="2024/endoh1/index.html">2024/endoh1</a> - Prize in patient pointillism - <em>slow ray tracer in CPP</em></li>
<li><a href="2024/endoh2/index.html">2024/endoh2</a> - Prize in solid body physics - <em>rotating rigid body simulation</em></li> <li><a href="2024/endoh2/index.html">2024/endoh2</a> - Prize in solid body physics - <em>rotating rigid body simulation</em></li>
<li><a href="2024/ferguson1/index.html">2024/ferguson1</a> - Prize in diabolical logistics - <em>Oregon trail pact with the devil</em></li> <li><a href="2024/ferguson1/index.html">2024/ferguson1</a> - Prize in diabolical logistics - <em>A Pact With the Devil On the Oregon Trail</em></li>
<li><a href="2024/ferguson2/index.html">2024/ferguson2</a> - Prize in yil-tas - <em>Navajo code talker translator</em></li> <li><a href="2024/ferguson2/index.html">2024/ferguson2</a> - Prize in yil-tas - <em>Navajo Code Talker translator</em></li>
<li><a href="2024/howe/index.html">2024/howe</a> - Nice accent eh-ward - <em>mini vi</em></li> <li><a href="2024/howe/index.html">2024/howe</a> - Nice accent eh-ward - <em>mini vi</em></li>
<li><a href="2024/kramer/index.html">2024/kramer</a> - Prize in linguistic arithmetic - <em>natural language numerical calculator</em></li> <li><a href="2024/kramer/index.html">2024/kramer</a> - Prize in linguistic arithmetic - <em>natural language numerical calculator</em></li>
<li><a href="2024/kurdyukov1/index.html">2024/kurdyukov1</a> - Prize in phased periodicity - <em>phase of the Moon</em></li> <li><a href="2024/kurdyukov1/index.html">2024/kurdyukov1</a> - Prize in phased periodicity - <em>phase of the Moon</em></li>
+2 -2
View File
@@ -85,8 +85,8 @@ Congratulations to:
* [2024/codemeow](2024/codemeow/index.html) - Prize in tray planting - _bonsai generator_ * [2024/codemeow](2024/codemeow/index.html) - Prize in tray planting - _bonsai generator_
* [2024/endoh1](2024/endoh1/index.html) - Prize in patient pointillism - _slow ray tracer in CPP_ * [2024/endoh1](2024/endoh1/index.html) - Prize in patient pointillism - _slow ray tracer in CPP_
* [2024/endoh2](2024/endoh2/index.html) - Prize in solid body physics - _rotating rigid body simulation_ * [2024/endoh2](2024/endoh2/index.html) - Prize in solid body physics - _rotating rigid body simulation_
* [2024/ferguson1](2024/ferguson1/index.html) - Prize in diabolical logistics - _Oregon trail pact with the devil_ * [2024/ferguson1](2024/ferguson1/index.html) - Prize in diabolical logistics - _A Pact With the Devil On the Oregon Trail_
* [2024/ferguson2](2024/ferguson2/index.html) - Prize in yil-tas - _Navajo code talker translator_ * [2024/ferguson2](2024/ferguson2/index.html) - Prize in yil-tas - _Navajo Code Talker translator_
* [2024/howe](2024/howe/index.html) - Nice accent eh-ward - _mini vi_ * [2024/howe](2024/howe/index.html) - Nice accent eh-ward - _mini vi_
* [2024/kramer](2024/kramer/index.html) - Prize in linguistic arithmetic - _natural language numerical calculator_ * [2024/kramer](2024/kramer/index.html) - Prize in linguistic arithmetic - _natural language numerical calculator_
* [2024/kurdyukov1](2024/kurdyukov1/index.html) - Prize in phased periodicity - _phase of the Moon_ * [2024/kurdyukov1](2024/kurdyukov1/index.html) - Prize in phased periodicity - _phase of the Moon_
+2 -2
View File
@@ -529,10 +529,10 @@
<a class="normal" href="2024/endoh2/index.html">2024/endoh2</a> - Prize in solid body physics - <i>rotating rigid body simulation</i> <a class="normal" href="2024/endoh2/index.html">2024/endoh2</a> - Prize in solid body physics - <i>rotating rigid body simulation</i>
</div></li> </div></li>
<li><div id="2024_ferguson1"> <li><div id="2024_ferguson1">
<a class="normal" href="2024/ferguson1/index.html">2024/ferguson1</a> - Prize in diabolical logistics - <i>Oregon trail pact with the devil</i> <a class="normal" href="2024/ferguson1/index.html">2024/ferguson1</a> - Prize in diabolical logistics - <i>A Pact With the Devil On the Oregon Trail</i>
</div></li> </div></li>
<li><div id="2024_ferguson2"> <li><div id="2024_ferguson2">
<a class="normal" href="2024/ferguson2/index.html">2024/ferguson2</a> - Prize in yil-tas - <i>Navajo code talker translator</i> <a class="normal" href="2024/ferguson2/index.html">2024/ferguson2</a> - Prize in yil-tas - <i>Navajo Code Talker translator</i>
</div></li> </div></li>
<li><div id="2024_howe"> <li><div id="2024_howe">
<a class="normal" href="2024/howe/index.html">2024/howe</a> - Nice accent eh-ward - <i>mini vi</i> <a class="normal" href="2024/howe/index.html">2024/howe</a> - Nice accent eh-ward - <i>mini vi</i>