diff --git a/2024/ferguson1/.entry.json b/2024/ferguson1/.entry.json index d71a361e1..988feb902 100644 --- a/2024/ferguson1/.entry.json +++ b/2024/ferguson1/.entry.json @@ -6,7 +6,7 @@ "dir" : "ferguson1", "entry_id" : "2024_ferguson1", "title" : "oregon", - "abstract" : "Oregon trail pact with the devil", + "abstract" : "A Pact With the Devil On the Oregon Trail", "author_set" : [ { "author_handle" : "Cody_Boone_Ferguson" @@ -101,6 +101,14 @@ "display_via_github" : true, "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", "inventory_order" : 100, diff --git a/2024/ferguson1/README.md b/2024/ferguson1/README.md index fef7af243..a0010b5db 100644 --- a/2024/ferguson1/README.md +++ b/2024/ferguson1/README.md @@ -53,58 +53,46 @@ inside this C code. :-) ## Author's remarks: -
+ width=1024 height=1024>
-Here is our travel guide:
+Here is our very sincere travel guide:
+ width=1536 height=1684>
-But before I help any sinners embark on this once in a lifetime journey, for
-those who might be disconcerted with the idea of the theme (even though it's
-ridiculous with something going back to 66m years ago, to several centuries ago
-all the way back to the 1950s, all the while taking place in the 1800s),
-**PLEASE** either read the (probably totally unnecessary)
-[disclaimer](#disclaimer) or skip this perilous journey entirely. Obviously the
-judges will have no choice in the matter :-) but it's not really for them anyway
-but rather in case this wins (which, of course, it did).
+But before I help any sinners embark on this once in a lifetime journey, some
+travellers might wish to look at the [commentary on the jokes](#jokes) (and
+possibly the [disclaimer](#disclaimer)) 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...
-Everyone might or might not want to look at the [commentary on the
-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!
+Now, back to the good stuff (not that the jokes are not a good part of it)!
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
@@ -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
*` - 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
if you have a heart condition. And if you're a computer scientist make sure
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).
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
-fits the theme quite well and although it (and this is not the only case this
-happens in the game) might not be something most people care to think about (but
-see [Disclaimer](#disclaimer) and also [what the judges LIKE](#vomitory), yes
-cannibalism does in fact occur in the game, to be blunt (not that the judges
-like THAT but you'll see what I mean if you read that section: which is by no
-means necessary for most people!). Of course it's happened throughout history
-including on the trail so even if the judges did not like to throw up (and
-laugh, which I would guess they will also be doing), it still fits well.
+expect! It might be called a kind of damaging (some might say 'damning') event
+but it fits the theme quite well and although it (and this is not the only case
+this happens in the game) might not be something most people care to think about
+(but see [what the judges LIKE](#vomitory), yes cannibalism does in fact occur
+in the game, to be blunt (not that the judges like THAT but you'll see what I
+mean if you read that section: which is by no means necessary for most people!).
+Of course it's happened throughout history including on the trail so even if the
+judges did not like to throw up (and laugh, which I would guess they will also
+be doing), it still fits well.
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
@@ -358,8 +347,8 @@ are even better here](#emojis).
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
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)
-and the [commentary on the jokes](#jokes).
+not even my original idea. But that's discussed in the [commentary on the
+jokes](#jokes).
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
@@ -432,7 +421,8 @@ and easily amused.
### Disclaimer
-**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
circumlocutophobia aka logoblabberophobia (fear of circumlocution - yes those
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
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
-**EXACTLY FOR** this pact and their behaviour! As you'll notice the narrator
-also has a somewhat dubious character (which is also how it would go in real
-life, given what the narrator is) but also in vague and ambiguous ways.
+**EXACTLY FOR** this pact and their behaviour! Of course as the narrator is the
+devil that means the devil is mocking the PC for making a pact with the devil,
+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
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
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
-remarks](#conclusion)).
+remarks](#conclusions)).
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.
@@ -3250,8 +3242,9 @@ ineffable.
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
-for JUST the third prompt. It looked like:
-time (mere hours left) but to get to JUST the third prompt this is the lines it
+for JUST the third prompt. Yes, what would only take a few seconds of play. 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
@@ -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.
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.
-Or horror. There are a few times where the line is the same but that only shows
-how very often the line changes. It is a total of 985 changes, counting
-function calls (i.e. each call to one of the few functions is a jump); calls to
-the macros are not counted.
+full sequence. This is from start to finish and I include it for your amusement
+(see [gotos.txt](gotos.txt)). Or horror. There are a few times where the line
+is the same but that only shows how very often the line changes. It is a total
+of **985** (!) changes, counting function calls (i.e. each call to one of the few
+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
-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
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
he was wrong.
-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
+It is not about not trying. But even IF he WAS right, he
+sure as hell is WRONG NOW. Anyone who thinks otherwise needs to try and debug
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
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.
-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
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
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.'
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.
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
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
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
-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,
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
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
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
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
diff --git a/2024/ferguson1/gotos.txt b/2024/ferguson1/gotos.txt
new file mode 100644
index 000000000..84d5f4efd
--- /dev/null
+++ b/2024/ferguson1/gotos.txt
@@ -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
diff --git a/2024/ferguson1/index.html b/2024/ferguson1/index.html
index 8dbf8d43f..0d783e580 100644
--- a/2024/ferguson1/index.html
+++ b/2024/ferguson1/index.html
@@ -434,7 +434,7 @@
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 -functions, functions in prog.c), there were a total of 985 (!) line jumps. -The prog.c, counting
+functions just the few functions in prog.c), there were a total of 985 (!) +line jumps. The prog.c, counting#includes,#defines, functions and some lines that have -only braces, as well as 14 blank lines, has only 85 lines. A very tiny fraction -of the time a line might be repeated in a row ONCE but that does not really matter.#includes,#defines, functions and some +lines that have only braces, as well as 14 blank lines, has only 85 lines. 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.
-The Go To Hell In A Handcart Travel Company PROUDLY welcomes all sinners to -our GREATEST destination yet, with:
+The Go To Hell In A Handcart Travel Company PROUDLY welcomes all sinners to +our GREATEST destination yet, with:

Here is our travel guide:
+ width=1024 height=1024> +Here is our very sincere travel guide:

But before I help any sinners embark on this once in a lifetime journey, for -those who might be disconcerted with the idea of the theme (even though it’s -ridiculous with something going back to 66m years ago, to several centuries ago -all the way back to the 1950s, all the while taking place in the 1800s), -PLEASE either read the (probably totally unnecessary) -disclaimer or skip this perilous journey entirely. Obviously the -judges will have no choice in the matter :-) but it’s not really for them anyway -but rather in case this wins (which, of course, it did).
-Everyone might or might not want to look at the commentary on the -jokes as well as the humour section, historical -references and cultural references 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 IOCCC -entry from 2000 that directly insults the player but just in case…
-Now, back to the good stuff!
+ width=1536 height=1684> +But before I help any sinners embark on this once in a lifetime journey, some +travellers might wish to look at the commentary on the jokes (and +possibly the disclaimer) as well as the humour +section, historical references and cultural references +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 +IOCCC entry from 2000 that directly insults the player but just in case…
+Now, back to the good stuff (not that the jokes are not a good part of it)!
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 ‘Oregon Trail: …’).
@@ -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 seen any suggestion of them before, one because it’s absolutely contrary to how it works in C, namely near 200 NUL terminatedchar *s in a single flat char * - no, not an array of char *[]).
-See obfuscation.html and my concluding remarks for +
See obfuscation.html and my concluding
+remarks for
more details on just how many gotos I have but beware of monsters. But be careful
if you have a heart condition. And if you’re a computer scientist make sure
you’re not at risk of stroke.
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 -fits the theme quite well and although it (and this is not the only case this -happens in the game) might not be something most people care to think about (but -see Disclaimer and also what the judges LIKE, yes -cannibalism does in fact occur in the game, to be blunt (not that the judges -like THAT but you’ll see what I mean if you read that section: which is by no -means necessary for most people!). Of course it’s happened throughout history -including on the trail so even if the judges did not like to throw up (and -laugh, which I would guess they will also be doing), it still fits well.
+expect! It might be called a kind of damaging (some might say ‘damning’) event +but it fits the theme quite well and although it (and this is not the only case +this happens in the game) might not be something most people care to think about +(but see what the judges LIKE, yes cannibalism does in fact occur +in the game, to be blunt (not that the judges like THAT but you’ll see what I +mean if you read that section: which is by no means necessary for most people!). +Of course it’s happened throughout history including on the trail so even if the +judges did not like to throw up (and laugh, which I would guess they will also +be doing), it still fits well.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 many other absolutely ridiculous things, and the above is only a small sample of @@ -748,8 +741,8 @@ are even better here.
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 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 -and the commentary on the jokes.
+not even my original idea. But that’s discussed in the commentary on the +jokes.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 from the May 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)!
See my somewhat unserious dedications as well, if you’re bored and easily amused.
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 circumlocutophobia aka logoblabberophobia (fear of circumlocution - yes those are made up), and you also have hippopotomonstrosesquipedalobibliophobia (fear @@ -860,9 +854,11 @@ a narrator).
:-) ) 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 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 -also has a somewhat dubious character (which is also how it would go in real -life, given what the narrator is) but also in vague and ambiguous ways. +EXACTLY FOR this pact and their behaviour! Of course as the narrator is the +devil that means the devil is mocking the PC for making a pact with the devil, +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
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
@@ -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
spaghetti code and my joke in the obfuscation.html file (not to
mention the joke of using the obscene amount of gotos 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).
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.
@@ -3085,22 +3081,27 @@ traits I do not even know how to describe. Perhaps they would be utterly ineffable.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 -for JUST the third prompt. It looked like: -time (mere hours left) but to get to JUST the third prompt this is the lines it
+for JUST the third prompt. Yes, what would only take a few seconds of play. 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
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 I’m a dragon. I’m not a dragon. I have a secret for you: dragons don’t exist. Except on the Oregon Trail.
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. -Or horror. There are a few times where the line is the same but that only shows -how very often the line changes. It is a total of 985 changes, counting -function calls (i.e. each call to one of the few 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 +full sequence. This is from start to finish and I include it for your amusement +(see gotos.txt). Or horror. There are a few times where the line +is the same but that only shows how very often the line changes. It is a total +of 985 (!) changes, counting function calls (i.e. each call to one of the few +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
COUNTING the #includes, #defines, other functions and 14 blank lines that
-jumps 985 times is astonishing.
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 @@ -3111,20 +3112,23 @@ dismiss any statement opposing it.
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 he was wrong.
-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 +
It is not about not trying. But even IF he WAS right, he +sure as hell is WRONG NOW. Anyone who thinks otherwise needs to try and debug my program - or maintain it. Or write it.
It would have been SO MUCH EASIER if I did not use 134
+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 +gotos. Actually, even a 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. -Feel free to pass on judgement to me. I welcome it!gotos for this very reason.Even flex/bison code, which as far as I am aware uses FAR fewer
gotos, is notorious forgotos and is quite hard to follow. It would be a nightmare to try and maintain without the .l/.y source files.Okay, yes, I admit it: my abuse is extreme.
That doesn’t matter. As I remind everyone later, Apple caused a security hole because of a SINGLE misplaced
+It shouldn’t. But of course it does.goto. Mine is 133 more than that - and it works. -It shouldn’t.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 @@ -3132,7 +3136,7 @@ doctrine, unassailable by evidence.
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 -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 something anyone would want to maintain - presumably even Frank.
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.
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 not even 12 hours before closing time. I barely made it. Part of that is I added -even moregotos, despite the fact I had reached 2503 in size. +even moregotos, 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, such as freeing space so I could change some
+break;s to agoto Z;asZ: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 space free. Those very few places where the code could in theory be moved are already controlled by goto.In fact I could have done more
+gotos in this version but I wanted to help the +judges out in judging - that and it was easier to verify things are correct. +iocccsizereports 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
+gotos, 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
gotos are alas, not banned outright).Anyway, as I noted in obfuscation.html, no initialisation is skipped in my jumps and that is what causes
gototo invoke UB.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 I could change this to not use
+gotos without breaking it! But what I do know is it works exactly as intended. But it shouldn’t. It really shouldn’t.Dedications and thanks
+I dedicate this to all the poor souls who suffered in the Salem Witchcraft +Trials, the Great Molasses +Flood as well as all those +who died on the Oregon Trail.
+Oh and those who were eaten by Dragons, +attacked by Werewolves or bitten by a +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. +Plus Blackbeard’s victims. Oh and +yes anyone attacked by the Flying +Spaghetti Monster +or those who were tricked by the BBC April Fool’s prank of the +Spaghetti +tree +on the Panorama programme in 1957. +Bless you all (probably by the devil on the Oregon +Trail).
+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
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 @@ -3668,6 +3712,7 @@ helps you appreciate the careful design even more.byteread.c - prints out the strings without locations
bytetest.c - prints every string extracted from data deobfuscation.html - hints on how to deobfuscate +gotos.txt - text file showing all the line changes in a run lencount.c - counts strings and reports longest one mbcheck.c - show location of multibyte characters obfuscation.html - obfuscation information diff --git a/2024/ferguson1/obfuscation.html b/2024/ferguson1/obfuscation.html index 4b135b9fc..166e508b2 100644 --- a/2024/ferguson1/obfuscation.html +++ b/2024/ferguson1/obfuscation.html @@ -692,7 +692,7 @@ pRNG). that the Devil wishes they were too:+ width=1024 height=1024>
I have shown JUST HOW LUDICROUS
gotos really are and JUST HOW MUCH STRUCTURE AND MAINTAINABILITY is lost withgotos: 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 diff --git a/2024/ferguson1/obfuscation.md b/2024/ferguson1/obfuscation.md index f05ee6cf1..d768cdd41 100644 --- a/2024/ferguson1/obfuscation.md +++ b/2024/ferguson1/obfuscation.md @@ -292,7 +292,7 @@ that the Devil wishes they were too:+ width=1024 height=1024> 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 diff --git a/2024/ferguson2/.entry.json b/2024/ferguson2/.entry.json index 4369af5df..765da400b 100644 --- a/2024/ferguson2/.entry.json +++ b/2024/ferguson2/.entry.json @@ -6,7 +6,7 @@ "dir" : "ferguson2", "entry_id" : "2024_ferguson2", "title" : "navajo-code-talkers", - "abstract" : "Navajo code talker translator", + "abstract" : "Navajo Code Talker translator", "author_set" : [ { "author_handle" : "Cody_Boone_Ferguson" diff --git a/2024/ferguson2/index.html b/2024/ferguson2/index.html index 8b0c5f80c..d0efa40b0 100644 --- a/2024/ferguson2/index.html +++ b/2024/ferguson2/index.html @@ -434,7 +434,7 @@
The International Obfuscated C Code Contest
2024/ferguson2 - Prize in yil-tas
-Navajo code talker translator
+Navajo Code Talker translator
diff --git a/news.html b/news.html index 9ef2acb8a..ff6f80615 100644 --- a/news.html +++ b/news.html @@ -515,8 +515,8 @@ the Official IOCCC website.2024/codemeow - Prize in tray planting - bonsai generator 2024/endoh1 - Prize in patient pointillism - slow ray tracer in CPP 2024/endoh2 - Prize in solid body physics - rotating rigid body simulation -2024/ferguson1 - Prize in diabolical logistics - Oregon trail pact with the devil -2024/ferguson2 - Prize in yil-tas - Navajo code talker translator +2024/ferguson1 - Prize in diabolical logistics - A Pact With the Devil On the Oregon Trail +2024/ferguson2 - Prize in yil-tas - Navajo Code Talker translator 2024/howe - Nice accent eh-ward - mini vi 2024/kramer - Prize in linguistic arithmetic - natural language numerical calculator 2024/kurdyukov1 - Prize in phased periodicity - phase of the Moon diff --git a/news.md b/news.md index 0144af565..6c341d79d 100644 --- a/news.md +++ b/news.md @@ -85,8 +85,8 @@ Congratulations to: * [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/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/ferguson2](2024/ferguson2/index.html) - Prize in yil-tas - _Navajo code talker translator_ +* [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/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/kurdyukov1](2024/kurdyukov1/index.html) - Prize in phased periodicity - _phase of the Moon_ diff --git a/years.html b/years.html index d6f4297cb..61502768e 100644 --- a/years.html +++ b/years.html @@ -529,10 +529,10 @@ 2024/endoh2 - Prize in solid body physics - rotating rigid body simulation -2024/ferguson1 - Prize in diabolical logistics - Oregon trail pact with the devil +2024/ferguson1 - Prize in diabolical logistics - A Pact With the Devil On the Oregon Trail -2024/ferguson2 - Prize in yil-tas - Navajo code talker translator +2024/ferguson2 - Prize in yil-tas - Navajo Code Talker translator 2024/howe - Nice accent eh-ward - mini vi