From d95a55cbfce3f0be6657a6e73092f7c59de448b6 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Sun, 20 Oct 2024 12:25:35 -0700 Subject: [PATCH] fix the order of faq The faq entries have been reordered to match the same order as the Table of Contents. Added missing "Why were some filenames changed?" FAQ to the Table of Contents. Fixed a number of FAQ headers to use the "Q:" at the start. Added double 1/2 lines between sections. Made use of double empty lines consistent. Added some missing "Jump to top" lines. Shortened 2 very long FAQ long titles. Perform `make faq` to perform the above and test under macOS. TODO: Check the HTML with the link checker. --- faq.html | 5644 ++++++++++++++++++------------------- faq.md | 8198 +++++++++++++++++++++++++++--------------------------- 2 files changed, 6982 insertions(+), 6860 deletions(-) diff --git a/faq.html b/faq.html index aa0f6f25e..060df37ef 100644 --- a/faq.html +++ b/faq.html @@ -389,7 +389,7 @@

IOCCC FAQ Table of Contents

-

This is FAQ version 28.0.9 2024-10-19.

+

This is FAQ version 28.1 2024-10-20.

Q: What is an author_handle?

@@ -4156,310 +2406,6 @@ FAQ on “fixing author information” for information about how to update and/or correct IOCCC author information.

Jump to: top

- -
-

Q: What is an entry_id?

-
-

An entry_id is a string that identifies a winning entry of the IOCCC.

-

An entry_id is a 4-digit year, followed by an underscore, followed by a directory name.

-

For example, the entry_id associated with Cody Boone Ferguson’s 2nd winning IOCCC entry -of 2020 is found under the following directory:

-
    2020/ferguson2
-

The entry_id for that winning entry is:

-
    2020_ferguson2
-

Jump to: top

-
-
-
-
-
-

Q: What is the purpose of the .top, .allyear, .year and .path files?

-
-
-
-
-
-

The .top file resides at the top directory. This file contains the complete list -of IOCCC years.

-

Under each IOCCC year, one will find a .year file. These files contain directory paths from the top directory, -of the IOCCC entry directories for a given year. For example, see the 1984/.year file.

-

The .allyear file contains the contents of all .year files for all IOCCC years.

-

Under each IOCCC entry directory, you will find a .path file. -These files contain the directory path from the top directory. -For example see 1984/anonymous/.path.

-

The .top, .allyear, .year and .path files are generated from the top level Makefile, by:

-
    make genpath
-

Jump to: top

-
-

Q: What is the current meaning of the IOCCC terms Author, Entry, and Submission?

-
-

The IOCCC is now attempting to use the following terms:

- -

An author is someone who has submitted an entry that has won the IOCCC.

-

An entry can have more than one authors. A number of authors have submitted -entries that have won the IOCCC, sometimes in the same IOCCC contest year.

-

An apology for being inconsistent: In the past, the IOCCC used the term winner to -refer to what is now an author. In a number of historical cases, -such as old rules and old guidelines, terms such as winner may still be -found. Moreover, out of habit, the IOCCC judges sometimes use old -names such as winner when they should use author. Sorry (tm Canada)! :-)

- -

An entry is a submission that won the IOCCC.

-

An entry has one or more authors.

-

An entry includes all of the files needed to compile it, -plus sample input files, a Makefile, an .entry.json file -describing the entry, a compressed tarball containing all of -files in the entry, etc. Under the IOCCC tree, an entry -that win the IOCCC in year YYYY is located under the -directory YYYY/entry.

-

An apology for being inconsistent: In the past, the IOCCC used the term winner to -refer to what is now an entry. In a number of historical cases, -such as old rules and old guidelines, terms such as winner may still be -found. Moreover, out of habit, the IOCCC judges sometimes use old -names such as winner when they should use entry. Sorry (tm Canada)! :-)

- -

A submission is something given to the IOCCC judges -for consideration when the IOCCC is open.

-

When the IOCCC is open for submissions, those who register -to enter the IOCCC may use the mkiocccentry tool -to package their code into a compressed tarball that may be -uploaded to the IOCCC submit server. -This compressed tarball is formatted in such a way that -the IOCCC judges do not see who wrote the code.

-

A submission that the IOCCC judges deem to have won the IOCCC -becomes an entry. Only then do the IOCCC judges look into -the special JSON file to discover who the author(s) are.

-

An apology for being inconsistent: In the past, the IOCCC used the term entry to -refer to what is now a submission. In a number of historical cases, -such as old rules and old guidelines, terms such as entry may still be -found. Moreover, out of habit, the IOCCC judges sometimes use old -names such as entry when they should use submission. Sorry (tm Canada)! :-)

-

Jump to: top

-
-
-

Q: How do I make a pull request to the GitHub repo?

-
-
-

First, if you do not already have a GitHub account or you have not installed an -ssh key to your account you must do so. For this we will assume you do not have -a GitHub account. For the steps following creating a GitHub account you will -have to be logged into your account.

-

To help you out here is a navigation menu in this FAQ entry:

- -

Creating a GitHub account

-

Go to GitHub and click on ‘Sign up’. Follow the -instructions. Once you’ve completed this task make sure you log in to GitHub.

-

Installing an ssh key to GitHub

-

Assuming you do not have an ssh key you should go to the command prompt and -type (if you already have one and are okay using it for GitHub you can use that -one):

-
    ssh-keygen -t rsa -b 4096 -C "luser@example.com"
-

where luser@example.com is the email you want associated with your key. -Follow the instructions. It will tell you the key files.

-

Once you have an ssh key you need to go to your account -settings. Once there, in the menu -on the left you should see the item SSH and GPG keys. Click that and then -click (on the right side) the button that says New SSH key. You will see that -you have to specify a title, the key type and the PUBLIC key. Put whatever title -you want and keep the key type as Authentication Key. Now you need to put the -PUBLIC key in.

-

If you used an rsa key the default file will likely be found in: -~/.ssh/id_rsa.pub. If you used a different algorithm the file name will be -different. For instance if you used ed25519 the default PUBLIC key file would -be ~/.ssh/id_ed25519. If, like some people do, you have a separate key for -GitHub, it could be anything you wish, as long as it’s in ~/.ssh. For instance -it might be ~/.ssh/github.pub.

-

Whatever the key file is, copy the contents and paste it into the GitHub field -labelled Key. Once you have done so click on Add SSH key.

-

Forking the IOCCC winner repo

-

Open in your browser the link: -https://github.com/ioccc-src/winner/fork. You now should follow the -instructions in forking the repo.

-

Cloning the IOCCC winner repo

-

Once you have forked the repo you are ready to clone it to your system. For -instance Cody Boone Ferguson has the GitHub handle xexyl so he would type in:

-
    git clone https://github.com/xexyl/winner [target_dir]
-

Once that is completed you will need to change to that directory. The default -directory would be the name of the repo but if you specified a target directory -it will be that. For instance using the above example you might do:

-
    cd winner
-

You’re ready to make your changes now!

-

Making changes, fixes etc.

-

Here you must use your wits, knowledge, creativity and whatever else you have. -Let’s say that Cody wants to update his file -2020/ferguson1/play.sh script. He would open it in -his editor of choice (in his case vim) and make the changes. He would then make -sure (as there is a last updated date) to update the last updated date. For -instance he might add the following:

-
-

BTW: did you know that some people believe in snake human hybrids? It’s true! See -http://www.macroevolution.net/snake-human-hybrids.html and have a laugh, shock -or an exercise in sibilance!

-
-

Then, assuming that the date is 1 March 2024, he would update the line that -starts with # Last updated: to refer to 01 March 2024 rather than what it -is now (at the time of writing this), 15 April 2023.

-

But what if he wanted to add a file? He’d create the file and then type:

-
    git add foo
-

where foo is the file to add.

-

When he’s ready to make a commit he would need to create a new branch for the -pull request.

-

Committing your changes

-

First, as an aside, if this is your first pull request (which we assume is if you’re -reading this :-) ) you need to make sure that you can push changes to GitHub -with your ssh key. To do this you need to do:

-
    ssh -T git@github.com
-

Cody would see:

-
-

Hi xexyl! You’ve successfully authenticated, but GitHub does not provide shell access.

-
-

Now, assuming that the forked repo is -https://github.com/xexyl/winner, you’d type:

-
    git remote set-url origin git@github.com:xexyl/winner.git
-

Now you’d be ready to make your commits.

-

Before doing anything else, however, a new branch needs to be created. -Continuing the example above for -2020/ferguson1/play.sh, it might be that:

-
    git checkout -B human-snakes
-

This would change the branch to the newly created branch human-snakes branch. -Now Cody could commit the changes:

-
    git commit play.sh # if specifying specific files
-    git commit -a # if committing everything
-

He could also have done:

-
    git add play.sh
-    git commit
-

In any case this would open an editor (in his case vim) to write a commit log. -It is recommended that the first line is <=51 chars and the next line is blank. -Then if necessary add a description for the log. For instance the above might -warrant the log:

-
    Add fun link to 2020/ferguson1/play.sh
-
-    Did you know some people believe in snake human hybrids? I added a link to the
-    script that discusses this and gives supposed examples.
-

Now a pull request has to be opened.

-

Opening a pull request

-

To do this depends on the branch name. Assuming the branch from above, -human-snakes, you would type:

-
    git push --set-upstream origin human-snakes
-

This might show:

-
    Enumerating objects: 9, done.
-    Counting objects: 100% (9/9), done.
-    Delta compression using up to 10 threads
-    Compressing objects: 100% (5/5), done.
-    Writing objects: 100% (5/5), 739 bytes | 147.00 KiB/s, done.
-    Total 5 (delta 4), reused 0 (delta 0), pack-reused 0
-    remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
-    remote:
-    remote: Create a pull request for 'human-snakes' on GitHub by visiting:
-    remote:      https://github.com/xexyl/winner/pull/new/human-snakes
-    remote:
-    To github.com:xexyl/winner.git
-     * [new branch]     human-snakes -> human-snakes
-    branch 'human-snakes' set up to track 'origin/human-snakes'.
-

The link referred to above would then be opened to open a pull request. Just -follow the instructions at this point. If however it does not show a link it is -likely because the branch already exists in your GitHub account (for the repo). -In this case you can open the link: -https://github.com/ioccc-src/winner/pulls which might show something -like:

-
    xexyl:human-snakes had recent pushes 1 minute ago
-

and to the right of it you would see a button that says Compare & pull request -which you could click on. Do that and follow the instructions.

-

An important note is if you have more than one pull request opened it’ll only -show the branch name as the summary. You should in that case copy paste the log -you put in into the website. For instance the line (on the website) Add a -title could have:

-
-

Add fun link to 2020/ferguson1/play.sh

-
-

and then the text field that is labelled Add a description would have:

-
-

Did you know some people believe in snake human hybrids? I added a link to the -script that discusses this and gives supposed examples.

-
-

Once you’ve done this you should click on Create pull request.

-

IMPORTANT NOTE: although the Judges will -give more deference to the authors of edited entries the -Judges also retain the final editorial say -in the matter.

-

What to do after a merge

-

When the judges have merged the pull request you now need to make sure your fork -has the merge. To do this from the command line, assuming the fork in the above -example, you would type:

-
    git checkout master && git pull https://github.com/ioccc-src/winner.git master && git push origin master
-

This will merge your pull request to your fork.

-

Jump to: top

-
-
-

Q: Am I allowed to use IOCCC content?

-
-
-

Disclaimer: This FAQ is not a license, has no legal -value, and only highlights some of the key features and terms of -the actual CC BY-SA 4.0 -license.

-

The content of the IOCCC is Copyrighted and is under the CC BY-SA 4.0 License.

-

As long as you abide by the terms of the CC BY-SA 4.0 -License -you may copy and redistribute the material in any medium or format -for any purpose, even commercially.

-

As long as you abide by the terms of the CC BY-SA 4.0 -License -you may remix, transform, and build upon the material for any -purpose, even commercially.

-

This FAQ is an incomplete summary of how you may use IOCCC content. -You should review the highlights of some of the key features and terms -and this may help clarify some aspects of the -CC BY-SA 4.0 License.

-

The Copyright and CC BY-SA 4.0 License applies to all -IOCCC content. We use this to help ensure that we can all -enjoy hat those working on the IOCCC have proper Attribution -including, of course, the IOCCC winners themselves! It is designed -to help ensure that everyone may enjoy the IOCCC.

-

Jump to: top

-
-

Q: What is Mastodon and why does IOCCC use it?

-
-

The IOCCC uses Mastodon for news updates, -announcements, and for various other social media purposes.

-

Please follow the IOCCC on Mastodon.

-
-

The IOCCC no longer uses twitter, or whatever that someone who appears to have -poor impulse control (allegedly) calls their platform these days.

-
-

The IOCCC prefers to reside in the fediverse.

-

For help with Mastodon:

-

There is help with Mastodon available for -those who might wish to get started with Mastodon.

-

While there are many fine Mastodon server instances out there, the IOCCC judges -use fosstodon.org where lots of fun folk hang out, -and topics like science, technology, free and open source -have a good home. The fosstodon.org folk made the IOCCC feel welcome.

-

While using Mastodon is free, the IOCCC judges are pleased to -support the Fosstodon Hub.

-

If you have a phone or tablet there is also an official app that you can get -from the App Store or whatever equivalent your device has. Please note that the -app does not at this time seem to give push notifications when someone you -follow posts something so you will have to check the IOCCC feed manually.

-

HINT to mastodon users: You may wish to refresh the @IOCCC -mastodon feed page and/or mastodon -app from time to time to view IOCCC mastodon updates.

-

Jump to: top

Q: How can I find my author handle?

@@ -4493,116 +2439,17 @@ how they are used.

FAQ on “Author, Entry, Submission” for more information on terms such as author, entry, and submission.

Jump to: top

-
-

Q: How do I set certain tabstops for viewing source code in vi(m)?

+ +
+

Q: What is an entry_id?

-

Sometimes an author will state that for best viewing purposes you should have -your tabstop set at say 4 or 8. If you use vim or vi or vim in no compatible -mode you can do this easily: make sure you’re in command mode (in most cases you -can hit ESC to do this) and then type the command:

-
    :set tabstop=4
-

where 4 is the value you wish to set the tabstop to.

-

Jump to: top

- -
- -
-

The way the menu works on desktops or laptops is that you should simply see the -menu directly without the need of JavaScript or any intervention on your part. -It should look something like:

-

screenshot of IOCCC menu on desktops

-

Simply move your mouse cursor over the category you want and then click on the -item you wish to view that drops down from the category.

-

This is likely how it will appear with a tablet device in landscape -mode, too, unless JavaScript is -disabled.

-
-

Mobile menus

-
-

If, however, you’re on a mobile device, it can vary, depending on the dimensions -and whether or not you have JavaScript enabled.

-
- -
-

For instance, on an iPhone 14 -Pro Max or similar device (in dimensions), you should see at the top right of -every page, something that looks like:

-

screenshot of IOCCC menu on iPhone 14 Pro Max

-

In this case click on the icon at the top right corner that looks like:

-

menu open icon

-

to activate the menu.

-
- -
-

If JavaScript is disabled on any mobile device, tablet or phone, you should see -the words:

-
        Please Enable JavaScript
-

at the top right corner; clicking on this will take you to the no JavaScript -menu which is a plaintext menu. You of course can use this if -you like, even if you do not have JavaScript enabled, by pointing your browser -to https://ioccc-src.github.io/temp-test-ioccc/nojs-menu.html.

-
- -
-

With tablets, it likely depends on the orientation you have your device in. If it’s -in portrait mode you likely will see the menu that one will get on a mobile -phone.

-

If, on the other hand, you are using landscape mode, say on an iPad Pro 11 inch -4th generation, then you will likely see the menu as you would on a desktop or -laptop.

-
- -
-

Finally, if you’re on a mobile device that is wider than 1024 pixels, you will -very possibly have to press and hold the menu icon:

-

menu open icon

-

to activate it. You can then use it as you would on a mobile -phone.

-
-
Browsing the website on mobile devices with a browser bug
-
-

It was noticed that in iOS 16 Safari (both on an iPhone 8 Plus and in simulation -mode in macOS) the menu does not work at all. That is to say one might see:

-

browser bug where menu icon does not show up

-

Notice how the menu icon is not even there! This happens in both portrait mode -and landscape mode.

-

In this case one will have to use the no JavaScript -menu. If you have a fix for this that does NOT -affect the usability of desktops, laptops or other mobile devices, please -consider fixing it and opening a pull request or at -least report it as an -issue (choose -the category Website issue).

-

Jump to: top

-
-

Q: FAQ 6.16 - How do I find more information about a winning author of an entry?

-
-

At the top of the index.html file of a winning entry with the author you want -information on, you should see a section called Author. All you have to do is -click on the author’s name (it’s a link) and it will take you to their -information in the authors.html page.

-

There you will find various information including a link to their -authors.html information which includes various things like -their GitHub account (if known), a URL or alternate UL, mastodon handle, -location (if known and not anonymous location) and a link to their JSON author file.

-

NOTE: you might wish to search google (or some other search engine) by their -name as sometimes you can find out their GitHub account even if it’s not in our -JSON files.

-

Of course if you know the author’s name you can go directly to -authors.html and click on their surname’s/last name’s/second -name’s initial and then scroll down (if necessary) to the author in question.

+

An entry_id is a string that identifies a winning entry of the IOCCC.

+

An entry_id is a 4-digit year, followed by an underscore, followed by a directory name.

+

For example, the entry_id associated with Cody Boone Ferguson’s 2nd winning IOCCC entry +of 2020 is found under the following directory:

+
    2020/ferguson2
+

The entry_id for that winning entry is:

+
    2020_ferguson2

Jump to: top

Q: What is a .entry.json file and how is it used?

@@ -5020,49 +2867,2193 @@ source code (if there is an alternate version). Some, however, have another file name. The entry_text for the try scripts will be script to try entry or something along those lines.

Jump to: top

-
-

Q: I do not understand the IOCCC, can you explain it to me?

+
+
+

Q: How can I validate any JSON document?

-

The IOCCC stands for the International Obfuscated C Code Contest. -The IOCCC is a C programming contest.

-

The goals of the IOCCC are:

+
+

If you want or need to verify that a JSON document (as a string or file) is +valid, you can use the +jparse +tool. The IOCCC version of the jparse(1) tool may be installed from the +mkiocccentry repo.

+

The FAQ.md file in the mkiocccentry +repo +contains information about how to find and compile the mkiocccentry +toolkit, which includes the IOCCC version of the jparse(1) tool, located +under the mkiocccentry directory as jparse/jparse.

+

Additionally you may install the jparse(1) tool from the jparse +repo:

+
    git clone https://github.com/xexyl/jparse.git
+    cd jparse
+    make clobber all test
+    sudo make install
+

The syntax of jparse(1) is very simple:

+
    jparse foo.json
+

If the tool exits 0 then the document is valid JSON; otherwise it’ll +show an error message.

+

If you want to see more information about the parsing you can increase the +verbosity with the -v option. For instance:

+
    jparse -v 3 foo.json
+

If the tool is not installed then you will obviously have to specify the path of +the tool.

+

Jump to: top

+
+
+
+

Section 4: Compiling IOCCC entries

+
+

Jump to: top

+
+
+

Q: What Makefile rules are available to build or clean up IOCCC entries?

+
+
+

In general the best way to compile everything in an entry directory is to run:

+
    make clobber all
+

If you wish to compile every entry for every year you should go to the top level +directory and run the same command as above, make clobber all.

+

The all rule will build everything necessary except for the alternate +versions. Every Makefile has an alt rule but it will only do something if an +alternate version exists. To build all the entries along with any alternate code +you can do from the top level directory:

+
    make clobber everything
+

If you wish to only build alternate code you can do:

+
    make clobber alt
+

If you wish to not remove the entry binaries and only compile the additional alt +versions:

+
    make alt
+

The following Makefile rules should be in all Makefiles:

    -
  • To write the most Obscure/Obfuscated C program within the rules.
  • -
  • To show the importance of programming style, in an ironic way.
  • -
  • To stress C compilers with unusual code.
  • -
  • To illustrate some of the subtleties of the C language.
  • -
  • To provide a safe forum for poor C code. :-)
  • -
  • To have fun with C!
  • +
  • all: build the entry programs (main program and any supplementary program)
  • +
  • alt: build alternate code
  • +
  • clobber: clean up object files and all binary files (except for those that are +not compiled)
  • +
  • clean: a simpler version of clobber that only removes object files. make clobber depends on clean so running make clobber will invoke make clean.
  • +
  • everything: equivalent to make all alt.
-

See the -FAQ on “start of the IOCCC” -and the -FAQ on “history of the IOCCC” -for more information the background of the IOCCC.

-

See the -FAQ on “entering the IOCCC” -for information on how to enter and submit to the IOCCC.

-

If you are still confused, consider the nature of -the IOCCC rules and of the IOCCC -guidelines. You will see a dose of the technical, -mixed with “nerd humor” (or humour if you prefer 🤓).

-

If after all that you are still confused, sorry (tm Canada 😉). -Consider this: While the IOCCC often attempts to be presentable, -it is under no obligation to be wholly understandable. One might -say that to truly understand the IOCCC is problematic. And if -someone did manage to fully understand the IOCCC, then perhaps -this modified quote from the The Hitchhiker’s Guide to the -Galaxy -may apply:

+

Are there any other rules? You tell us!

+

The top level and the year (e.g. 1984/Makefile, 1985/Makefile etc.) +Makefiles recurse into the subdirectories for each entry so you can compile +individual entries, entries of a given year or all entries, based on what you +wish to do.

+

NOTE about the above rules: the Makefile default assumes cc which might be a +gcc-based compiler, or a clang-based compiler, or some other compiler. Only by +forcing CC=clang or CC=gcc will one invoke a specific compiler to, say, +enable or disable additional warnings or flags. Even so different versions or +compilers might do different things, have different defects or other issues. +Note that the Makefiles check the CC variable by substrings so that if you +were to do something like make CC=gcc=mp-12 it would register as gcc.

+

Jump to: top

+
+
+
+

Q: What kind of make(1) compatibility does the IOCCC support and will it support other kinds?

+
+
+
+

For the IOCCC mkiocccentry submission +toolkit and the winning IOCCC +entries we support ONLY GNU Makefile syntax. This means that if +you only have Cygwin or a BSD make(1) (often bmake(1)) or some other +make(1) utility the Makefiles we use will not be compatible.

+

We do not intend on supporting anything but the GNU make(1) utility so if you +do not currently have it installed you will have to do that in order to compile +entries for the IOCCC. If you are submitting an entry this will also be +necessary.

+

If you do not have GNU make(1) you might look for gmake as that is what it +often is packaged as. Then you can use gmake instead. For instance if you go +to the top level directory of the winner repo you can do:

+
    gmake
+

In the case that the Makefile uses the MAKE variable you will have to override +it like:

+
    gmake MAKE=gmake
+

though of course for both you may specify a rule or rules to run.

+

Jump to: top

+
+
+
+

Section 5: Dependencies for some IOCCC entries

+
+

Jump to: top

+
+
+

Q: How do I compile and run an IOCCC entry that requires X11?

+
+
+
+

Generally, to compile and run an IOCCC entry that requires X11:

+
+

You must have the X11 related include files and X11 libraries in order to +compile the IOCCC entry. In order to do this you will need to install Xorg and +related packages including development related packages. If you have macOS see +further down for different instructions. Otherwise: in particular you must:

+
    +
  • Install the Xorg server.
  • +
  • Configure the Xorg server for your graphics environment.
  • +
  • Install a X11 terminal application.
  • +
  • Start the Xorg server.
  • +
  • Launch the X11 terminal application.
  • +
  • Run the IOCCC entry in the X11 terminal application.
  • +
+

By X11 terminal application we suggest one of:

+
    +
  • Gnome terminal application
  • +
  • KDE terminal application
  • +
  • xterm(1) terminal application
  • +
+

See below for various system related hints that may be of help.

+
+

X.org server has been deprecated

+
+

The Red Hat RHEL9.0 release notes state that X.org Server is now +deprecated.

+

According to this Linux for Devices tutorial on +XOrg as +of 2023 Mar 25:

-

“There is a theory which states that if ever anyone discovers -exactly what the IOCCC is for and why it is here, it will -instantly disappear and be replaced by something even more bizarre -and inexplicable.

-

There is another theory which states that this has -already happened.” 😜

+

Recently, RHEL developers categorized Xorg was put in the ‘deprecated’ +software, +as its development has mostly halted. Subsequent updates will completely replace +it with Wayland, a more modern windowing system.. Although Wayland is not fully +developed yet, many applications do not support it properly yet and screen +sharing might not work sometime, but it is the future. Fedora, also developed by +RHEL, has switched to a Wayland session as it’s default windowing system (And it +works flawlessly on my Laptop).

-

Share and enjoy! ☺️

+

See the Wayland website for more details.

+

IMPORTANT NOTE: We do NOT know if IOCCC entries will run under +Wayland. Some IOCCC entries that use X11 might be OK while other IOCCC +entries that use X11 in an unusual way might fail under Wayland.

+

See the Wayland FAQ for more +information.

+

If your system uses Wayland and not X11, you might give the IOCCC entries +that use X11 a try. They might work but again we do not know.

+

IMPORTANT NOTE: The IOCCC judges do not support IOCCC entries. +See the +FAQ on “no entry support”. +So if an IOCCC entry that uses X11 fails under Wayland, and you wish to +provide a fix to the IOCCC entry so that it will run under Wayland, +then consider submitting a fix so that it will run under Wayland. +See the +FAQ on “fixing an entry” +for more information.

+

Basically: if you discover an entry does not work in Wayland you are welcome to +provide alternate code that works for Wayland. We will happily credit you in +the thanks-for-help.html file.

+

Red Hat based Linux

+

First, see the +FAQ on “general X11”.

+

Install Xorg and related packages:

+
    sudo dnf install --skip-broken --best --exclude xorgxrdp \
+    --exclude xorgxrdp-glamor '*xorg*' 'libx*' 'libX*' 'fontconfig*'
+

See also:

+ +

IMPORTANT NOTE: The X.org server has been deprecated. +See the +FAQ on “X.org deprecated” +for more information.

+

macOS

+

First, see the +FAQ on “general X11”. +However, for macOS, instead of installing the Xorg server, you need to install and launch +the most recent XQuartz application +and then run the IOCCC entry from the Xterm window +shell.

+

As an example we will use 1993/jonth which works +with macOS 14.2.1 (macOS Sonoma).

+

First of all you will need to install the most recent +XQuartz, preferably on an Apple supported version of +macOS, preferably the most recent version. +After it is installed, open the “XQuartz” application (usually located in +/Applications/Utilities/XQuartz.app) by typing at the command line:

+
    open /Applications/Utilities/XQuartz.app
+

With the “XQuartz” application open you will get an X Window System +Manager launched with an Xterm window +shell started:

+

xterm-launch in macOS

+

At this point you need to cd to the winning directory and compile it. For example:

+

compiling an entry in xterm in macOS

+

And then run the program as directed by the index.html file. For example with +1993/jonth:

+

running 1993/jonth in macOS

+

Note that you can compile the code in your regular terminal prior to opening +XQuartz, should you wish to. You can even run it from that terminal and it +should open XQuartz.

+

IMPORTANT NOTE: The X.org server has been deprecated. +See the +FAQ on “X.org deprecated” +for more information.

+

Debian based Linux

+

First, see the +FAQ on “general X11”.

+

According to the Debian Xorg wiki, installing +X11 requires:

+
    sudo apt install xorg
+

IMPORTANT NOTE: The X.org server has been deprecated. +See the +FAQ on “X.org deprecated” +for more information.

+

Other Linux distributions

+

First, see the +FAQ on “general X11”.

+

For general documentation on installing X11, this ServerGUI for +Ubuntu, and in particular, these +may be helpful:

+ +

See also:

+ +

For systems that have the dnf(1) command:

+
    sudo dnf install --skip-broken --best --exclude xorgxrdp \
+    --exclude xorgxrdp-glamor '*xorg*' 'libx*' 'libX*' 'fontconfig*'
+

For systems that have the yum(1) command:

+
    sudo yum install --skip-broken --best --exclude xorgxrdp\
+    --exclude xorgxrdp-glamor '*xorg*' 'libx*' 'libX*' 'fontconfig*'
+

IMPORTANT NOTE: The X.org server has been deprecated. +See the +FAQ on “X.org deprecated” +for more information.

+

Package website

+

First, see the +FAQ on “general X11”.

+

See the X.org foundation website.

+

IMPORTANT NOTE: The X.org server has been deprecated. +See the +FAQ on “X.org deprecated” +for more information.

+

Jump to: top

+
+

Q: How do I compile and install SDL1 or SDL2 for entries that require it?

+
+

This depends on your operating system but below are instructions for Linux and +macOS with alternative methods for macOS and different package managers with Linux.

+

Red Hat based Linux

+

Execute the following as root or via sudo:

+
    dnf install SDL2 SDL2-devel sdl12-compat sdl12-compat-devel
+

Older RHEL distributions might have to use “yum” instead of “dnf” +in the above command.

+

In the past it was said that one might need to run make like:

+
    make ... SDL2_INCLUDE_ROOT=/usr
+

or set the following environment variable:

+
    export SDL2_INCLUDE_ROOT=/usr
+

but this might not be necessary in more modern days especially as we use +sdl-config and sdl2-config which should find the proper paths.

+
+

macOS

+
+

If you’re using macOS there are at least three ways to obtain it. You can +use Homebrew or MacPorts. If you do not wish to use either of those +package managers, you can always try to install via the package website. +For macOS we do recommend using Homebrew or MacPorts instead of using +the package website.

+
macOS via Homebrew
+

If you have not already done so, install Homebrew.

+

Then to install SDL and SDL2, execute the following command:

+
    brew install sdl2 sdl12-compat
+    eval "$(opt/homebrew/bin/brew shellenv)"
+
macOS via MacPorts
+

If you haven’t already, install +MacPorts. Then run:

+
    sudo port install libsdl libsdl2
+

Debian based Linux

+

Execute the following as root or via sudo:

+
    apt install libsdl1.2debian libsdl1.2-dev libsdl2-dev
+

and then try make all again.

+

In the past it was said that one might need to run make like:

+
    make ... SDL2_INCLUDE_ROOT=/usr
+

or set the following environment variable:

+
    export SDL2_INCLUDE_ROOT=/usr
+

but this might not be necessary in more modern days especially as we use +sdl-config and sdl2-config which should find the proper paths.

+

Other Linux distributions

+

Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running.

+

Package website

+

Go to the SDL website and follow their instructions +for downloading, installing and using SDL.

+

We recommend trying a method suitable for your environment first, if possible.

+

NOTE: there might be extra SDL packages required

+

In the case that some entries do not work even with SDL1/SDL2 installed it might +be that you need additional SDL libraries. See the entry’s index.html for +details. If something is not noted you’re welcome to report it as an issue or +fix it and make a pull request.

+

See the +FAQ on “GitHub pull request” +for more information about pull requests.

+

Jump to: top

+
+

Q: How do I compile and install (n)curses for entries that require it?

+
+

This depends on your operating system but below are instructions for Linux and +macOS with alternative methods for macOS and different package managers with Linux.

+

Red Hat based Linux

+

Execute the following as root or via sudo:

+
    dnf install ncurses ncurses-devel
+

macOS

+

With macOS it should already be installed. If it is not you might have to do:

+
    xcode-select --install
+

and agree to the terms and conditions and proceed with the install.

+
macOS via Homebrew
+

Not applicable, see above.

+
macOS via MacPorts
+

Not applicable, see above.

+

Debian based Linux

+

Execute the following as root or via sudo:

+
    apt install libncurses6
+

and then try make all again.

+

Other Linux distributions

+

Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running.

+

Package website

+

Go to the ncurses website and follow their instructions +for downloading, installing and using ncurses.

+

We recommend trying a method suitable for your environment first, if possible.

+

Jump to: top

+
+
+

Q: How do I compile and run an IOCCC entry that requires sound?

+
+
+

This might depend on the entry but most likely the Swiss Army Knife of sound +processing programs, SoX, will work. How to +install depends on your OS. See below.

+

After it is installed, you should be able to compile and use the program as +described in the index.html file.

+

Red Hat based Linux

+

As root or via sudo:

+
    dnf install -y sox sox-devel
+

macOS

+

For macOS there are two well known options.

+
macOS via Homebrew
+

If you have not already done so, install Homebrew.

+

Then to install SoX, execute the following command:

+
    brew install sox
+    eval "$(opt/homebrew/bin/brew shellenv)"
+
macOS via MacPorts
+

If you haven’t already, install +MacPorts. Then run:

+
    sudo port install sox
+

Debian based Linux

+

Usually the index.html file will explain how to use it under Debian so we do not +include this here, at least for now.

+

Package website

+

Not applicable, see above.

+

Other Linux distributions

+

Usually the index.html file will explain how to use it under Linux so we do not +include this here, at least for now.

+

Jump to: top

+
+

Q: - How do I compile and install tcpserver for entries that require it?

+
+

If your OS package manager does not have the package tcpserver you can +download, making sure you’re in a temporary directory, and compile the source +like:

+
    wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
+    tar ucspi-tcp-0.88.tar.gz
+    cd ucspi-tcp-0.88
+    make
+

Then as root or via sudo(1) enter:

+
    make setup check
+

That will install it to /usr/local/bin. Now you should be able to use the +entry in question.

+

Jump to: top

+
+

Q: How do I compile and install netpbm for entries that require it?

+
+

This depends on your operating system for which we describe a couple below.

+

Red Hat based Linux

+

Execute the following as root or via sudo:

+
    dnf install netpbm-progs netpbm
+

Older RHEL distributions might have to use “yum” instead of “dnf” +in the above command.

+

macOS

+

If you’re using macOS there are at least three ways to obtain it. You can +use Homebrew or MacPorts. If you do not wish to use either of those +package managers, you can always try to install via the package website. +For macOS we do recommend using Homebrew or MacPorts instead of using +the package website.

+
macOS via Homebrew
+

If you have not already done so, install Homebrew.

+

Then to install netpbm, execute the following command:

+
    brew install netpbm
+
macOS via MacPorts
+

If you haven’t already, install +MacPorts. Then run:

+
    sudo port install libnetpbm netpbm
+

Debian based Linux

+

Execute the following as root or via sudo:

+
    apt install netpbm
+

and then try make all again.

+

Other Linux distributions

+

Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running.

+

Package website

+

Go to the netpbm website and follow their instructions +for downloading, installing and using netpbm.

+

We recommend trying a method suitable for your environment first, if possible.

+

Jump to: top

+
+

Q: How do I compile and install libjpeg-turbo for entries that require it?

+
+

This depends on your operating system for which we describe a couple below.

+

Red Hat based Linux

+

Execute the following as root or via sudo:

+
    dnf install libjpeg-turbo-utils libjpeg-turbo-devel libjpeg-turbo
+

Older RHEL distributions might have to use “yum” instead of “dnf” +in the above command.

+

macOS

+

If you’re using macOS there are at least three ways to obtain it. You can +use Homebrew or MacPorts. If you do not wish to use either of those +package managers, you can always try to install via the package website. +For macOS we do recommend using Homebrew or MacPorts instead of using +the package website.

+
macOS via Homebrew
+

If you have not already done so, install Homebrew.

+

Then to install libjpeg-turbo, execute the following command:

+
    brew install libjpeg-turbo
+
macOS via MacPorts
+

If you haven’t already, install +MacPorts. Then run:

+
    sudo port install libjpeg-turbo libjpeg-turbo-devel
+

Debian based Linux

+

Execute the following as root or via sudo:

+
    apt install libturbojpeg0 libturbojpeg0-dev
+

and then try make all again.

+

Other Linux distributions

+

Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running.

+

Package website

+

Go to the libjpeg-turbo website and follow their instructions +for downloading, installing and using libjpeg-turbo.

+

We recommend trying a method suitable for your environment first, if possible.

+

Jump to: top

+
+

Q: How do I compile and install ImageMagick for entries that require it?

+
+

This depends on your operating system for which we describe a couple below.

+

Red Hat based Linux

+

Execute the following as root or via sudo:

+
    dnf install ImageMagick
+

Older RHEL distributions might have to use “yum” instead of “dnf” +in the above command.

+

macOS

+

If you’re using macOS there are at least three ways to obtain it. You can +use Homebrew or MacPorts. If you do not wish to use either of those +package managers, you can always try to install via the package website. +For macOS we do recommend using Homebrew or MacPorts instead of using +the package website.

+
macOS via Homebrew
+

If you have not already done so, install Homebrew.

+

Then to install ImageMagick, execute the following command:

+
    brew install ImageMagick
+
macOS via MacPorts
+

If you haven’t already, install +MacPorts. Then run:

+
    sudo port install ImageMagick
+

Debian based Linux

+

Execute the following as root or via sudo:

+
    apt install imagemagick
+

and then try make all again.

+

Other Linux distributions

+

Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running.

+

Package website

+

Go to the ImageMagick website and follow their instructions +for downloading, installing and using ImageMagick.

+

We recommend trying a method suitable for your environment first, if possible.

+

Jump to: top

+
+

Q: How do I compile and install OpenGL for entries that require it?

+
+

This depends on your operating system for which we describe a couple below.

+

In general OpenGL needs X11 to be installed and the X Window Server to be running. See the +FAQ on “X11” +for general information about X11.

+

Once X11 is install and the X Window Server is running, one needs to compile +and link with the two libraries, GL and GLU:

+
    cc ... -lGL -lGLU -L _location-where-X11-libs-are-installed_ -lX11
+

NOTE: The OpenGL development effort is being managed by vulkan.org. +We suggest you check out their resource for further information on OpenGL.

+

Red Hat based Linux

+

Execute the following as root or via sudo:

+
    sudo dnf install glew-devel SDL2-devel SDL2_image-devel glm-devel freetype-devel
+

See OpenGL Programming/Installation/Linux for details.

+

Older RHEL distributions might have to use “yum” instead of “dnf” +in the above command.

+

macOS

+

In the past, macOS has come with OpenGL pre-installed. However as of macOS 10.14, +OpenGL has been deprecated on macOS (in favor of Metal).

+

As long as Apple continues to ship OpenGL pre-installed and it works, you +should be able to go. However in Apple drops support for OpenGL later on, +you might look to install OpenGL via Homebrew or MacPorts.

+

Debian based Linux

+

Execute the following as root or via sudo:

+
    sudo apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev
+

and then try make all again.

+

See OpenGL Programming/Installation/Linux for details.

+

Other Linux distributions

+

Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running.

+

Package website

+

Go to the Vulkan website and follow their instructions +for downloading, installing and using OpenGL.

+

We recommend trying a method suitable for your environment first, if possible.

+

Jump to: top

+
+
+

Q: How do I download individual winning entries or all winning entries of a given year?

+
+
+

Although one can clone the entire winner +repo to get the entire website and all +entries, we also provide, as a convenience, a way to download individual entries +as well as a way to download a year’s winning entries.

+

Please note that some of the links in the html files will not work! This is +because you are not downloading the full website. If you want to view the entry +with links intact you should clone the repo or view it on the official IOCCC +website instead.

+

Individual winning entry tarballs

+

The individual entry tarballs are named in the form of +YYYY/winner/YYYY_winner.tar.bz2 (e.g. +1984/mullender/1984_mullender.tar.bz2) +and they contain a single entry as well as some additional necessary files. Each +entry tarball is linked to in its index.html (e.g. +1984/mullender/index.html) manifest, listed in the +Secondary files list.

+

These tarballs will have the following files:

+
    +
  • ioccc.css - stylesheet for the html files
  • +
  • var.mk - the top level Makefile included by all the other Makefiles that holds variables used by the Makefiles
  • +
  • YYYY/winner/.path - directory path from top level directory
  • +
  • YYYY/winner/.entry.json - entry summary and manifest in JSON
  • +
  • YYYY/winner/.gitignore - list of files that should not be committed under git
  • +
+

plus the winning entry files like source code, the Makefile, supplementary data +provided by the author and any other file in the winning entry, found under the +entry’s subdirectory.

+

If you downloaded 1984/mullender/1984_mullender.tar.bz2, for instance, you might +then do:

+
        cd 1984/mullender
+        make everything
+        ./mullender.alt
+

to compile all versions and then run the alternate version (if you have +a PDP-11 or VAX-11 you would be able to run the original version). For more help +on compiling entries, see also the +FAQ on “IOCCC Makefile rules”.

+

If you want to view the index.html file you can point your browser to the +index.html file of the winning entry (e.g. 1984/mullender/index.html) with the +caveats noted above.

+

Year based tarballs

+

The year based tarballs, which are under each year’s directory and are named in +the form of YYYY/YYYY.tar.bz2 (e.g. 1984/1984.tar.bz2), +include all the winning entries of a given year. +Each year’s tarball can be found under that year in the years.html +page and in the year’s index.html as well (e.g. +1984/index.html).

+

These tarballs have, along with each entry’s directory and their respective +files (as if you downloaded each entry tarball of the year individually as +described above), the following files:

+
    +
  • .filelist - list of files in the year that are not part of a winning entry of the year, including the YYYY.tar.bz2 tarball
  • +
  • index.html - the YYYY/index.html file rendered from the YYYY/README.md file
  • +
  • Makefile - Makefile for the year to compile etc. all entries of the year
  • +
  • README.md - the source of the YYYY/index.html file
  • +
  • rules.txt - rules of the year’s contest
  • +
  • .year - text file that has a list of the winning entries’ directories of the year
  • +
+

Additionally, some will have extra files like:

+
    +
  • .gitignore - list of files that should not be committed under git
  • +
  • guidelines.txt - the guidelines of the year
  • +
  • iocccsize.c - iocccsize tool of the year
  • +
  • iocccsize.mk - Makefile to compile the iocccsize tool of the year
  • +
  • iocccsize-test.sh - test suite for the iocccsize tool
  • +
+

.. and perhaps some others we have neglected to mention as well.

+

If you extract a year’s tarball you can cd YYYY (e.g. cd 1984) and then run +make everything to compile the entries and alternate code of every entry, as +if you switched to each entry’s directory and ran make everything in each one.

+

If you download the 1984 tarball, i.e. 1984/1984.tar.bz2, then you might +extract it and then switch to the directory and compile everything of each +entry:

+
        cd 1984
+        make everything
+

For more help on compiling entries, see also the +FAQ on “IOCCC Makefile rules”.

+

Of course in this case you can also switch to individual entries and look at the +index.html file (or any other file in the entry) and try out the entries that +interest you, as if you downloaded that entry’s individual tarball.

+

If you want to view the index.html files of that tarball, for instance the +year’s index.html file and then 1984/mullender/index.html you could point your +browser to 1984/index.html, scroll down to Winning Entries of 1984 - The 1st IOCCC and click on the link 1984/mullender which will take you to the +index.html file. Of course the caveats listed above still will apply.

+

Jump to: top

+
+

Q: How do I compile and install zlib for IOCCC entries that require it?

+
+

This depends on your operating system but below are instructions for Linux and +macOS with alternative methods for macOS and different package managers with Linux.

+

Red Hat based Linux

+

Execute the following as root or via sudo:

+
    dnf install zlib
+

macOS

+

With macOS it should already be installed. If it is not you might have to do:

+
    xcode-select --install
+

and agree to the terms and conditions and proceed with the install.

+
macOS via Homebrew
+

Not applicable, see above.

+
macOS via MacPorts
+

Not applicable, see above.

+

Debian based Linux

+

Execute the following as root or via sudo:

+
    apt install zlib1g zlib1g-dev
+

and then try make all again.

+

Other Linux distributions

+

Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running.

+

Package website

+

Go to the zlib website and follow their instructions +for downloading, installing and using zlib.

+

We recommend trying a method suitable for your environment first, if possible.

+

Jump to: top

+
+

Q: How do I install Ruby for entries that require it?

+
+

Please see the official Ruby installation +guide.

+

Jump to: top

+
+

Q: How do I install rake for entries that require it?

+
+

First, if gem is not installed, see the gem GitHub repo.

+

Assuming you have git(1) installed, you can do:

+
    git clone https://github.com/rubygems/rubygems
+    cd rubygems && exe/gem install rake
+

Otherwise, you can download the zip file, extract it, cd to the directory and +then run:

+
    exe/gem install rake
+

Once this is done, try as root or via sudo:

+
    gem install rake
+

Jump to: top

+
+
+
+

Section 6: Problems compiling IOCCC entries

+
+

Jump to: top

+
+
+

Q: Why don’t certain IOCCC entries compile?

+
+
+

Some entries that won the IOCCC, particularly entries from long ago, no longer compile on more +modern systems because the C language has evolved (i.e. the modern C compilers +are much more strict in what they accept as a valid program), or the entry +depended on operation system and library features that where common back then +but are different/missing today.

+

Please see the other FAQs in this section as they might offer helpful +hints, especially in cases were something else needs to be installed.

+

Please see the bugs.html file for details about known problems with IOCCC entries. In some cases you may be dealing with a problematic entry. In a few fun cases, the IOCCC does not compile by design!

+

If you have a fix that makes a minimal impact to the entry, then +please consider submitting that change in the form of a pull request. +Please see +FAQ on “fixing an entry”. +See also the +FAQ on “GitHub pull request” +for more information about pull requests.

+

In some cases alternative code has been added that does compile on some or most +systems. Check the write up for the entry for “alt” code and possible ways to +compile and run that code. In some cases we replaced the original code (but not +the .orig.c file!) with code that works for modern systems but one can view +the original code in the .orig.c files (sometimes the original code is also in +the directory as a dirname.alt.c or prog.alt.c).

+

See the +FAQ on “original source code” +for more information.

+

It might also be worth noting that almost all entries, have been +fixed so that they can compile in modern systems though just because an entry +compiles does not mean it will run on your specific system.

+

Jump to: top

+
+
+

Q: Why does clang or gcc fail to compile some IOCCC entries?

+
+
+

Although we have fixed numerous entries to work with clang (sometimes in an alt +version but usually in the program itself) there are some that simply cannot be +fixed or if they are fixable they have not yet been fixed (and might or might +not ever be fixed).

+

This is because clang has some defects where the args of main() are required to +be a specific type and some versions of clang allow only 1, 2 or 3 args, not 4, +to main(). In the case of types of args many were changed to the right type and +then what was main() became another function of the original main() type.

+

At the same time some entries are not designed to work with clang. There might +be alternate code added at some point but at this point it is highly unlikely.

+

gcc is far more forgiving. Nonetheless some entries no longer work or worked +with gcc. Some of these have been fixed (or in some cases partly fixed, much +like with clang) but there might be some that do not work with gcc or +clang or for that matter some other compiler.

+

See if the problem is mentioned in bugs.html. If you have a change +that fixes the problem (even if it just a change to the Makefile) that doesn’t +negatively impact the entry too much, consider submitting that change in the +form of a pull request. Please see the +FAQ on “fixing an entry”. +See also the +FAQ on “GitHub pull request” +for more information about pull requests.

+

Jump to: top

+
+
+
+

Q: Why do some IOCCC entries fail to compile under macOS?

+
+
+
+

If the entry requires gcc and you did not explicitly install gcc in macOS you +will not be able to run or use these entries. This is because macOS gcc is +actually clang, even /usr/bin/gcc.

+

That being said many (if not most) of these entries have been fixed and some +others will be looked at, when found.

+

In some cases the bugs.html file may note a known macOS problem +with an entry. Should you manage to port the entry, and assuming your changes +also attempt to preserve the original intent of the IOCCC entry, we would +encourage you to submit a pull request with your ported code. +Please see the +FAQ on “fixing an entry” +for details.

+

Jump to: top

+
+

Q: Why do Makefiles use -Weverything with clang?

+
+

While we know that use of -Weverything is generally not recommended +by clang C compiler developers, we do use the -Weverything +option in a certain case in IOCCC entry Makefiles.

+

The use of -Weverything is limited to when one forces CC=clang or more +generally if the string ‘clang’ is in $(CC). If $(CC) contains ‘gcc’ the +‘gcc’ specific options are run instead.

+

Users with clang compilers are not required to set CC=clang or equivalent but +when they do, -Weverything is enabled with all of its challenges, pedantic +warnings, and sometimes warnings about things that do not matter, some of which +are frankly frivolous and often downright dubious.

+

To enable this feature:

+
    make clobber all CC=clang
+

IOCCC authors who have access to clang might wish to try their +hand at compiling with -Weverything while using a minimum of -Wno-foo +statements. Sometimes there is a technical or pedantic issue that +-Weverything warns about that would merit a change to your C code; often, +however, it is not even possible to fix let alone is it worth it. Of course +if you’re running out of bytes due to rule 2[ab] one might not have much choice. +This is something that obfuscation authors simply sometimes have to deal with!

+

If you try to minimize the number of -Wno-foo options needed with +-Weverything, please mention this in your remarks about the entry, as the +judges note you attempt to honor it (see also below). In some cases your +obfuscated code will issue warnings with -Weverything no matter what: the +-Wno-poison-system-directories is a common example of this but there are +others as well, sometimes depending on the version of clang.

+

If you do try for a compile with clang -Weverything, keep on mind that while your +compile environment might be warning free, a different clang version or a +different build environment might still have warnings. For instance the warning +set is different in macOS (which by default is clang: even when run as gcc!) +than Linux (due to versions and possibly other things)!

+

Given that your entry MUST work as documented, you may be safer to +say that your entry keeps the number of warnings and -Wno-foo options while +compiling with clang -Weverything at a minimum. You might want to say the +version number and platform too as an extra safety net. Because if you claim zero +warnings, and we find a warning situation, this may diminish the value of your +entry as it is not as documented. Thus it might be wise to point this out and +if you can test it in multiple platforms (or versions of clang, see +below note) this would be advisable.

+

NOTE: different versions of clang have other differences as well. For instance +a defect of clang that required numerous entries to be fixed for clang is that it +requires that main()’s arguments to be of a specific type. However some +versions of clang are more strict in the number of args allowed. These reasons +are part of why numerous entries had to be modified so that main() calls +another function instead of doing it all in main() (another reason was that +some entries that recursively called main() caused a crash or otherwise broke +the entry in modern systems). Some entries do not work in clang (or at least do +not work completely) due to these defects, for instance +1989/westley; Cody Boone +Ferguson was able to +get much of it to work and looking at that entry might be of value to your +submissions, at least if you can figure the code out :-). To see the +differences, try from 1989/westley:

+
    make diff_orig_prog
+

If you have colordiff try:

+
    make DIFF=colordiff diff_orig_prog
+

Alternatively you can try:

+
    git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..eb9e69fde657acc8c85a618a8a99af4c2f93b21d westley.c
+

As you can see, using clang has some additional problems to work out but if +you can get your entry to work well in clang it might very well be considered +better than other entries.

+

Jump to: top

+
+
+
+

Section 7: Running IOCCC entries

+
+

Jump to: top

+
+

Q: What are try.sh and try.alt.sh scripts and why should I use them?

+
+

A lot of the entries, old and otherwise, have complicated uses or, if not +complicated uses, it has numerous uses (sometimes both), and having a script +that automates these for viewers improves the usability of these entries so one +can enjoy them better.

+

The try.sh script is for the original entry and the try.alt.sh script is for +alternate versions. These scripts are usually for the Try: and Alternate try: sections in the index.html files.

+

Some entries provide additional scripts that are meant to run the entry as well +but might not fit in the try model though some are used by a try.sh / +try.alt.sh script.

+

Although you’re certainly welcome to copy and paste or type the commands in +manually, sometimes the scripts will do additional things that you might miss +and there are some other benefits as well which you would miss if you did not +use them. Nevertheless, if you prefer to do it manually, whether to help you +process or appreciate the entry more, then please do so.

+

Jump to: top

+
+
+
+
+

Q: An IOCCC entry messed up my terminal application, how do I fix this?

+
+
+
+
+

The simplest way to do this is to type reset. If echo was disabled you can get +usually away with stty echo. Sometimes you can also get away with stty sane. +reset does the most but note that it will clear the screen; it is not the +clearing of the screen, however, that solves the problem, so clear will not +help.

+

Jump to: top

+
+
+

Q: Why does an IOCCC entry fail to compile and/or fail to run?

+
+
+

What may have worked years ago may not work well or work at all today. +Please note that the IOCCC judges do NOT support IOCCC entries. +Nevertheless, there may be a number of reasons why an IOCCC entry +may fail to compile or run well or fail to run on your system.

+

In some cases the American National Standards Institute’s ANSI C committee has +damaged the C standard to the point where perfectly valid C programs no longer +compile with modern compilers. As such some old IOCCC entries can no longer be +compiled with modern compilers (though a great deal of these were fixed in +2023).

+

In some cases programs that may have worked on an old computer system +longer work on modern computers. Some IOCCC entries do not work well, +or no longer work on modern computers or modern operating systems, though again +a great deal of these were fixed for modern systems.

+

Some IOCCC entries fail to compile under clang, or gcc. +Some IOCCC entries require operating system services that +may not be present on your system.

+

In some cases the IOCCC entry simply has bugs or (Mis)features.

+

If you are having problems compiling or running an IOCCC entry, +we recommend that you look in bugs.html to see if +there is a known bugs or (Mis)feature. In some cases what you +may think is a bug is actually an feature that was intentionally +written by the authors. In some cases the problem is well +known and we are looking for someone to attempt to fix it.

+

In some cases there is an alternate version of the IOCCC entry +that you may wish to try.

+

It also possible that you may have discovered a bug in a winning IOCCC +entry. If so, you are invited to try and fix the IOCCC entry and +submit that fix by way of a GitHub pull +request. +Please see the +FAQ on “fixing an entry” +for how to submit a fix to an IOCCC entry.

+

Jump to: top

+
+
+
+

Q: How do I find out how to send interrupt/EOF etc. for entries that require it?

+
+
+
+

For some entries one needs to send interrupt or EOF or some other signal/other +special characters. There are typical defaults like (where ^ = ctrl):

+
    +
  • ^D for EOF (eof)
  • +
  • ^C for interrupt (intr)
  • +
  • ^U for kill (kill)
  • +
+

and various others. But if you don’t know this you can find out through the +stty(1) command with the -a option. For instance with macOS you might see:

+
    $ stty -a
+    speed 9600 baud; rows 40; columns 155;
+    intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; [..snip..]
+

If you know the name you can use grep to find the correct line and if your +implementation of grep(1) has the -o option you can filter it. For instance +to find what the intr is set to:

+
    $ stty -a |grep -o 'intr = ^[[:alpha:]]'
+    intr = ^C
+

… assuming of course that it’s a ctrl combination :-) If for some strange +reason it’s not you might have to do something else including just piping it to +just grep intr or whatever.

+

Jump to: top

+
+
+

Q: Why does an IOCCC entry fail to run on my 64-bit system?

+
+
+

Unfortunately some older entries are non-portable and require 32-bit support or +32-bit binaries. A problem system here is macOS Catalina (10.15) as as of that +version macOS no longer supports 32-bit binaries. If the entry acts on a certain +type of binary, say ELF, then that will also be a problem depending on the +entry. For example 2001/anonymous requires 32-bit +ELF binaries.

+

There are a few example entries that require 32-bit binaries. We have tried +to note these in both the respective Makefiles and index.html files but it is +possible that some were missed. These entries are very likely in the +bugs.html file and we welcome any help in making an alternate version +for 64-bit systems. Many were fixed to work with modern systems but some are +supposed to only work with 32-bit systems so any updated version of these +entries should be an alternate version.

+

Other entries like 2001/herrmann2 +now work with 32-bit AND 64-bit systems.

+

Please see the bugs.html file for the problematic entry +in question to see if the problem is known, and if a fix is wanted, +consider trying to port the code to a 64-bit system and submitting +a pull request with that change. Pull requests that fix such code +while trying to minimize the impact of any changes and preserving +the spirit of the original code are very welcome! Please see the +FAQ on “fixing an entry” +for details. See also the +FAQ on “GitHub pull request” +for more information about pull requests.

+

Jump to: top

+
+
+
+

/An IOCCC entry messed +## Section 8: Changes made to IOCCC entries

+
+

Jump to: top

+
+
+

Q: How can I find out what was changed in an IOCCC entry source code?

+
+
+

We have set up make rules to easily do see what was changed in the winning IOCCC +entry source. Using the Makefile in the entry directory, use +one of the following make(1) rules:

+

The following make rules exist to make a difference:

+
    +
  • make diff_orig_prog: +
      +
    • This rule will show the diff of the original source to the +current source (that is entry.orig.c to entry.c).
    • +
  • +
  • make make diff_alt_orig: +
      +
    • This rule will show the diff of the alternate code to the original +code (that is entry.alt.c to entry.orig.c). If no alternate code exists +nothing will be shown.
    • +
  • +
  • make diff_alt_prog: +
      +
    • This rule will show the diff of the alternate code to the entry as it +stands (that is entry.alt.c to entry.c).
    • +
  • +
  • make diff_orig_alt: +
      +
    • This rule will show the diff of the original code to the alternate code +(that is entry.orig.c to entry.alt.c).
    • +
  • +
  • make diff_prog_alt: +
      +
    • This rule will show the diff of the entry to the alternate code (that is +entry.c to entry.alt.c).
    • +
  • +
  • make diff_prog_orig: +
      +
    • This rule will show the diff of the entry to the original code (that is +entry.c to entry.orig.c).
    • +
  • +
+

For instance one of Landon’s all time favourite entries is +1984/mullender so the file names would be: +mullender.orig.c, mullender.alt.c and mullender.c. For later years, it +would be instead prog.orig.c, prog.alt.c and prog.c.

+

Note that you might see something like:

+
    make: [Makefile:170: diff_orig_prog] Error 1 (ignored)
+

at the end of the output but this is completely normal if there are differences.

+

If the alternate code is the same as the original, say with +1984/anonymous, then naturally there is no point in +running the rule and the same applies for all the other rules but this system +allows for easily seeing the diffs.

+

As some examples we’ll first look at one that has really long lines which +will make it harder to see what is different, +2001/anonymous. What you would do is cd 2001/anonymous and then do:

+
    make diff_orig_prog
+

and then be really confused! :-)

+

But for an entry like 1991/dds, you can see the +differences much more easily. 1991/dds is a good example where it’s very +simple to see what is different as it’s just a couple lines.

+

You might be quite surprised how little some entries had to be changed and at +the same time how much other entries had to be changed, often with quite complex +differences! In some cases if the line is rather long, like the above mentioned +one, it will be harder to see what changed but in other cases like +1984/decot or 1986/wall it’s a +lot easier.

+

Well, at least it’s easier see the differences on a line-by-line basis but maybe +not what actually changed, especially since it’s easier to know what was fixed +when you have compiler errors :-) (though there are, as noted, some examples +where it’s quite easy to see the differences).

+

1991/dds is also a good example to see the alt difference +very easily. To do that cd 1991/dds and then do:

+
    make diff_alt_prog
+

and you’ll see a single line changed and very simply.

+

NOTE: The above mentioned make rules are located in the 1337.mk +include Makefile via the optional include directive line:

+
    -include 1337.mk ../1337.mk ../../1337.mk
+

The 1337.mk file must exist in the current +directory, or under the directory above, or under the directory 2 levels +above in order for these rules to work.

+

Tip: if you have colordiff installed it’s a lot easier to see the differences

+

To use these rules but provide a different diff, for instance colordiff, +just do:

+
    make DIFF=colordiff diff_orig_prog          # for orig to prog diff
+    make DIFF=colordiff diff_alt_prog           # for alt to prog diff
+

Obviously if you want to view the alternate code or the orig code you can just open +the files as described above.

+

See the +FAQ on “original source code” +for more information.

+

Jump to: top

+
+
+

Q: Why were some calls to the libc function gets(3) changed to use fgets(3)?

+
+
+

Some may wonder: “Doesn’t this tamper with the entry too much?”

+

A fine line indeed has to be drawn here but it was decided that it is worth it +because of alarming warnings that can be displayed, in some systems at runtime +interspersed with the output of the program.

+

For instance in macOS the entry 1990/tbr would output the +warning in such a way that caused confusing output for the entry, looking like:

+
    $ ./tbr
+    $ warning: this program uses gets(), which is unsafe.
+    # nothing here, what to do?
+

In some cases it is not possible to fix or at least it is highly unlikely and so +those have mainly not been touched except one that has had the buffer size +increased (which could be done for others that are not possible to change to +fgets() though this has not been done).

+

Some entries can be made to look almost identical to the original entry. For +instance the fix to 1988/reddy required only a single +#define be added.

+

In the cases it has not been done it is likely the entry can be found in the +bugs.html file.

+

In the future we, the judges, would prefer that entries use fgets() to prevent +these problems.

+

An annoying fact is that for ‘“compatibility” reasons’ fgets() retains the +newline and gets() does not. As the Unix version 7 man page used to say:

+
+

BUGS

+

The fgets(3) function retains the newline while gets(3) does not, all +in the name of backward compatibility.

+
+

We’re not sure how this is compatibility but either way it can cause a +problem and it is this that has complicated most of the fixes though again some +can look almost identical.

+

Jump to: top

+
+
+

Q: Why do author remarks sometimes not match the source and/or inconsistent with the entry?

+
+
+

Because some entries had to be fixed for modern systems and often the fixes +required a change in code, sometimes significant changes. Thus the remarks can +be inconsistent in some cases.

+

This is why we recommend that when you read the remarks, sometimes the judges’ +remarks and always the author’s or authors’ remarks, you look at the original +code. When the entry source code is called prog.c the original code is in +prog.orig.c; otherwise it is dirname.orig.c. For instance one of Landon’s all +time favourite entries is 1984/mullender and the +original code is in mullender.orig.c. In +some cases, such as 1984/mullender, the original code is the same as the code +as no changes were made (there is an alt version for systems that are not +VAX-11/PDP-11, however).

+

See the +FAQ on “original source code” +and the +FAQ on “entry source code changes” +for more information.

+

Jump to: top

+
+

Q: What is the meaning of the file ending in .orig.c in IOCCC entries?

+
+

Due to the fact that the original code has sometimes had to change these files +are the original winning entry or as close to as possible to the original that +we can find (in some cases a change was made by the Judges, for example, or an +author might have made a modification without saving the original).

+

Jump to: top

+
+
+

Q: What are alternate versions and why were they added to some entries?

+
+
+

The alternate versions are exactly what they sound like, versions of their +respective entries that were not the winning source code but have additional +features added (often by the author) or fixes, updates at the request of the +judges (upon winning the contest), unobfuscated versions and a variety of other +things for instance letting it work on more than one platform (where it would +not be possible to do in the original submission).

+

In some cases the alternate code added come directly from the author (some of +which already were in the website) but there were other cases where alternate +code was added that might or might not be necessary; this was a judgement call +and the reasons vary.

+

In many cases it was simply to make the entry more presentable to more people +but without modifying the entry itself, which would be tampering with the entry +(a problem that we tried to avoid as much as possible although we certainly did +not manage to do this perfectly), and in some cases it would be changing it so +much that it would no longer be what was submitted.

+

In one case an alternate version was created to help locate and fix a bug that +prevented the entry from working properly and it seemed like it should be added +as well, for fun (it is a game).

+

In some cases it might be better to not have them but as noted this was a +judgement call.

+

See also the +FAQ on “original source code” +for more information.

+

Jump to: top

+
+
+

Q: Why was arg count and/or type changed in main() in some older entries?

+
+
+

There are a number of reasons this was done but they usually come down to a +mis-feature or defect in the clang compiler.

+

In all versions of clang the first arg must be an int and the rest must be a +char ** but in some versions it also objects to the number of args in +main(). In the versions observed that complain about the number of args it +says that there must be 0, 2 or 3 args. This only was triggered with 4 args, not +1, but to future proof the entry entries that had only one arg to main() were +changed to two.

+

The above also meant that some entries that were recursive calls to main() +could no longer be so: main() instead had to call another function that has +the body of the old main() and that function would call itself again. In some +cases, however, this had to be done even without clang objections.

+

Jump to: top

+
+
+
+
+

Q: Why were files added to, removed from or changed in some entries?

+
+
+
+
+

Like with files being renamed, there are multiple reasons files were added, +removed or changed. The addition of the try.sh and try.alt.sh scripts is the most +significant example of files being added. These scripts, +help demonstrate entries by automating commands, sometimes many +commands and not always simple commands, that one would previously have to run +manually (there are other benefits as well).

+

See the +FAQ on “try.sh and try.alt.sh” +for more details.

+

Alternate code, sometimes provided by the author, sometimes provided by the +judges and sometimes other people, was added to some entries as well.

+

In the case that a link might end up with a 404 the files, if possible, were +downloaded and put into the entry’s directory. Sometimes the links were already +dead but with the help of the Internet Wayback Machine we could get the files +back.

+

In a few cases files were removed and there are multiple reasons for this too.

+

The end result is to help improve the presentation of the entries in some way or +ways.

+

Jump to: top

+
+
+

Q: What is the original source file?

+
+
+

Every entry has what is called the “original source file”. This is +a copy of the original source code (usually prog.c) that the +IOCCC judges used when declaring that submission is a +winning IOCCC entry.

+

There are a number of reasons why the source code (usually prog.c) needs +to be modified. Reasons include things such as:

+
    +
  • modification as requested by the IOCCC judges
  • +
  • modification as requested by the author(s)
  • +
  • modification as requested by a pull request from someone else
  • +
  • bug fix
  • +
  • portability improvement
  • +
  • etc.
  • +
+

We seek to preserve the “original source file”, for historical purposes, +by preserving the original source code (usually as prog.orig.c).

+

IMPORTANT NOTE: The “original source file”, because it is a historic +record, should NOT be modified.

+

Unless one can demonstrate that a mistake has been made regarding +the “original source file” and that, for some reason, the file +is NOT the original source code, please do NOT attempt to modify it.

+

IMPORTANT NOTE: If you believe that the “original source file” is +NOT the original source code, then plesse open an +IOCCC issue and describe the +problem to the IOCCC judges, including what you believe +is the correct “original source file”.

+

FYI: To determine the difference between the “original source file” and +the source code as it is now now, try:

+
    make diff_orig_prog
+

See the +FAQ on “what changed” +for more information and make rules relating to “original source file” differences.

+

Jump to: top

+
+

Q: Why were some filenames changed?

+
+

The reasons this was done varies. One of the earliest changes was making the old +.hint or .text files README.md files. The first time this was done was for +2019/README.text and 2020/README.text with commit +87c41a787fa334f6696ec8f23284eacea63e3e89. +With commit +77fb0f11a2ddc8584a1ebe8d68fb0cccf3b959a6index.html +and hint.html files were removed in favour of README.md files; +commit +851e191519953c743cdd363dc19099e89210319c +renamed hint.txt and hint.text to README.md. There were most likely other +commits that fixed some issues with this.

+

Other files were also renamed, though, sometimes being converted to markdown as +well. Shell scripts were often renamed to end with .sh to indicate it is a +shell script and to help browsers know how to deal with it (this was before the +method of how to display files was devised).

+

Another example is for more consistency, sometimes to do with alternate code and +other times something else.

+

There were certainly other reasons as well.

+

Jump to: top

+
+
+
+

Section 9: Helping the IOCCC

+
+

Jump to: top

+
+
+

Q: How can I help the IOCCC?

+
+
+

We welcome your help in fixing IOCCC entries

+

The known bugs file, order by IOCCC years, contains a +list of known bugs & (mis)features. If you are looking for an IOCCC entry +to try and fix, this file is a good place to start.

+

See the +FAQ on “fixing an entry” +for information on how to submit a fix to +an IOCCC entry. Before you consider trying to fix an IOCCC winning entry, +please check the known bugs file for the IOCCC entry +in question. Note that in several cases what you may have discovered, +while a (mis)feature is not considered a bug and should not be fixed. +In cases where the bug is known, the entry’s known bugs file +section may offer you important fixing clues.

+

We welcome your help on fixing the IOCCC website

+

Jump to: top

+
+
+
+

Q: Is there a list of known bugs and (mis)features of IOCCC entries?

+
+
+
+

Yes! Please see bugs.html for a list of known bugs and/or issues of a +variety of kinds.

+

Note that just because an entry is not in the bugs file does not mean there is +not an issue and note that some issues are simply missing files, dead URL(s) or +something like that.

+

Jump to: top

+
+
+

Q: How can I submit a fix to an IOCCC entry?

+
+
+

If you see a problem with an IOCCC entry, first check the known bugs +file. In some cases what you might think of as a bug is instead a known +feature. In some cases the bug is known, but no fix has ever been submitted. +In other cases you may have found a new problem.

+

If you do have a fix, and the known bugs file does not recommend +against fixing it, then please consider opening a GitHub pull +request against the master +branch of the ioccc-src/winner +repo.

+

BTW: A problem is not limited to the code itself. Fixing typos in files +such as “index.html” files, fixing issues in a “Makefile”, or otherwise +correcting an IOCCC entry is VERY MUCH WELCOME! Please use the same +GitHub pull request process against +the master branch of the +ioccc-src/winner repo.

+

NOTE: some of the issues in the bugs.html file includes just missing +files and we welcome these too!

+

Please also help us fix typos and / or otherwise improve the write-up of how +IOCCC winning entries are presented!

+

In any event we will happily add you to the +thanks file for your help!

+

And of course, an IOCCC author may update their own entries +(metadata as well as source code and any extra files) by opening a +GitHub pull request +against the master branch +of the ioccc-src/winner repo.

+

Please see the +FAQ on “fixing an entry”. +See also the +FAQ on “GitHub pull request” +for more information about pull requests.

+

Note that we’re much more inclined to accept an author’s fixes but the judges +have the final say in the matter.

+

Jump to: top

+
+
+

Q: How do I make a pull request to the GitHub repo?

+
+
+

First, if you do not already have a GitHub account or you have not installed an +ssh key to your account you must do so. For this we will assume you do not have +a GitHub account. For the steps following creating a GitHub account you will +have to be logged into your account.

+

To help you out here is a navigation menu in this FAQ entry:

+ +

Creating a GitHub account

+

Go to GitHub and click on ‘Sign up’. Follow the +instructions. Once you’ve completed this task make sure you log in to GitHub.

+

Installing an ssh key to GitHub

+

Assuming you do not have an ssh key you should go to the command prompt and +type (if you already have one and are okay using it for GitHub you can use that +one):

+
    ssh-keygen -t rsa -b 4096 -C "luser@example.com"
+

where luser@example.com is the email you want associated with your key. +Follow the instructions. It will tell you the key files.

+

Once you have an ssh key you need to go to your account +settings. Once there, in the menu +on the left you should see the item SSH and GPG keys. Click that and then +click (on the right side) the button that says New SSH key. You will see that +you have to specify a title, the key type and the PUBLIC key. Put whatever title +you want and keep the key type as Authentication Key. Now you need to put the +PUBLIC key in.

+

If you used an rsa key the default file will likely be found in: +~/.ssh/id_rsa.pub. If you used a different algorithm the file name will be +different. For instance if you used ed25519 the default PUBLIC key file would +be ~/.ssh/id_ed25519. If, like some people do, you have a separate key for +GitHub, it could be anything you wish, as long as it’s in ~/.ssh. For instance +it might be ~/.ssh/github.pub.

+

Whatever the key file is, copy the contents and paste it into the GitHub field +labelled Key. Once you have done so click on Add SSH key.

+

Forking the IOCCC winner repo

+

Open in your browser the link: +https://github.com/ioccc-src/winner/fork. You now should follow the +instructions in forking the repo.

+

Cloning the IOCCC winner repo

+

Once you have forked the repo you are ready to clone it to your system. For +instance Cody Boone Ferguson has the GitHub handle xexyl so he would type in:

+
    git clone https://github.com/xexyl/winner [target_dir]
+

Once that is completed you will need to change to that directory. The default +directory would be the name of the repo but if you specified a target directory +it will be that. For instance using the above example you might do:

+
    cd winner
+

You’re ready to make your changes now!

+

Making changes, fixes etc.

+

Here you must use your wits, knowledge, creativity and whatever else you have. +Let’s say that Cody wants to update his file +2020/ferguson1/play.sh script. He would open it in +his editor of choice (in his case vim) and make the changes. He would then make +sure (as there is a last updated date) to update the last updated date. For +instance he might add the following:

+
+

BTW: did you know that some people believe in snake human hybrids? It’s true! See +http://www.macroevolution.net/snake-human-hybrids.html and have a laugh, shock +or an exercise in sibilance!

+
+

Then, assuming that the date is 1 March 2024, he would update the line that +starts with # Last updated: to refer to 01 March 2024 rather than what it +is now (at the time of writing this), 15 April 2023.

+

But what if he wanted to add a file? He’d create the file and then type:

+
    git add foo
+

where foo is the file to add.

+

When he’s ready to make a commit he would need to create a new branch for the +pull request.

+

Committing your changes

+

First, as an aside, if this is your first pull request (which we assume is if you’re +reading this :-) ) you need to make sure that you can push changes to GitHub +with your ssh key. To do this you need to do:

+
    ssh -T git@github.com
+

Cody would see:

+
+

Hi xexyl! You’ve successfully authenticated, but GitHub does not provide shell access.

+
+

Now, assuming that the forked repo is +https://github.com/xexyl/winner, you’d type:

+
    git remote set-url origin git@github.com:xexyl/winner.git
+

Now you’d be ready to make your commits.

+

Before doing anything else, however, a new branch needs to be created. +Continuing the example above for +2020/ferguson1/play.sh, it might be that:

+
    git checkout -B human-snakes
+

This would change the branch to the newly created branch human-snakes branch. +Now Cody could commit the changes:

+
    git commit play.sh # if specifying specific files
+    git commit -a # if committing everything
+

He could also have done:

+
    git add play.sh
+    git commit
+

In any case this would open an editor (in his case vim) to write a commit log. +It is recommended that the first line is <=51 chars and the next line is blank. +Then if necessary add a description for the log. For instance the above might +warrant the log:

+
    Add fun link to 2020/ferguson1/play.sh
+
+    Did you know some people believe in snake human hybrids? I added a link to the
+    script that discusses this and gives supposed examples.
+

Now a pull request has to be opened.

+

Opening a pull request

+

To do this depends on the branch name. Assuming the branch from above, +human-snakes, you would type:

+
    git push --set-upstream origin human-snakes
+

This might show:

+
    Enumerating objects: 9, done.
+    Counting objects: 100% (9/9), done.
+    Delta compression using up to 10 threads
+    Compressing objects: 100% (5/5), done.
+    Writing objects: 100% (5/5), 739 bytes | 147.00 KiB/s, done.
+    Total 5 (delta 4), reused 0 (delta 0), pack-reused 0
+    remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
+    remote:
+    remote: Create a pull request for 'human-snakes' on GitHub by visiting:
+    remote:      https://github.com/xexyl/winner/pull/new/human-snakes
+    remote:
+    To github.com:xexyl/winner.git
+     * [new branch]     human-snakes -> human-snakes
+    branch 'human-snakes' set up to track 'origin/human-snakes'.
+

The link referred to above would then be opened to open a pull request. Just +follow the instructions at this point. If however it does not show a link it is +likely because the branch already exists in your GitHub account (for the repo). +In this case you can open the link: +https://github.com/ioccc-src/winner/pulls which might show something +like:

+
    xexyl:human-snakes had recent pushes 1 minute ago
+

and to the right of it you would see a button that says Compare & pull request +which you could click on. Do that and follow the instructions.

+

An important note is if you have more than one pull request opened it’ll only +show the branch name as the summary. You should in that case copy paste the log +you put in into the website. For instance the line (on the website) Add a +title could have:

+
+

Add fun link to 2020/ferguson1/play.sh

+
+

and then the text field that is labelled Add a description would have:

+
+

Did you know some people believe in snake human hybrids? I added a link to the +script that discusses this and gives supposed examples.

+
+

Once you’ve done this you should click on Create pull request.

+

IMPORTANT NOTE: although the Judges will +give more deference to the authors of edited entries the +Judges also retain the final editorial say +in the matter.

+

What to do after a merge

+

When the judges have merged the pull request you now need to make sure your fork +has the merge. To do this from the command line, assuming the fork in the above +example, you would type:

+
    git checkout master && git pull https://github.com/ioccc-src/winner.git master && git push origin master
+

This will merge your pull request to your fork.

+

Jump to: top

+
+
+

Q: How can I report an IOCCC website problem?

+
+
+

If you discover a problem with the IOCCC website that is related +to a particular IOCCC entry, please see the +FAQ on “report entry bug” +for information about reporting a bug in an IOCCC entry, and see the +FAQ on “fixing an entry” +for information on how to submit a fix to an IOCCC entry.

+

If you discover a problem with the IOCCC website (such as a broken link, which +may or may not be specific to a particular IOCCC entry) that is not related +to a particular IOCCC entry, the best way you can help is to submit a fix to +the IOCCC website. See the +FAQ on “fixing the website” +for information on submitting fixes +to the IOCCC website.

+

If you do not have an IOCCC website fix, and just wish to report a general IOCCC +website problem, we ask that you first look at the IOCCC +issues to see if the problem has +already been reported. If it has been reported, feel free to add a comment to +the issue. Otherwise, if you do not see the same issue reported, then feel free +to open a new IOCCC website issue.

+

Jump to: top

+
+

Q: How can I submit a fix to the IOCCC website?

+
+

For IOCCC website problems that relate to a particular IOCCC entry, please +see the +FAQ on “fixing an entry” +for information on how submit a fix to an IOCCC entry.

+

You may open a GitHub pull request +against the master branch +of the ioccc-src/winner repo +to submit a fix.

+

Please see the +FAQ on “fixing an entry”. +See also the +FAQ on “GitHub pull request” +for more information about pull requests.

+

Some HTML files should NOT be directly modified

+

Nearly all HTML files on the IOCCC website +are built from markdown files. +If you see lines containing:

+
    <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
+    <!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
+    <!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
+    <!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
+    <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
+

This means that the file is generated by a tool from a bin directory tool. +You should NOT attempt to modify the file.

+

You may also find lines slightly below the above set that suggest another file to edit. +For example, in contact.html, one may read:

+
    <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
+    <!-- !!! Do not modify this web page, instead modify the file: contact.md -->
+    <!-- !!! Do not modify this web page, instead modify the file: contact.md -->
+    <!-- !!! Do not modify this web page, instead modify the file: contact.md -->
+    <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
+

This means that you could consider editing the referenced markdown file +AND then run make www from the top level directory in your IOCCC pull +request. There are quicker ways but to be sure you get +everything built you should do this. If you modified a markdown and you do not +see the same file as a html file then you did not complete the fix.

+

Please see the +FAQ on “fixing an entry”.

+

See also the +FAQ on “GitHub pull request” +for more information about pull requests.

+

In some cases, the HTML file is NOT based on markdown content, but instead +came from JSON and other data files. So instead of the above reference to a +markdown file, you will read:

+
    <!-- The main section of this web page came from JSON and other data files -->
+    <!-- -->
+    <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
+    <!-- The main section of this web page was generated via the tool: bin/gen-years.sh -->
+    <!-- The main section of this web page was generated via the tool: bin/gen-years.sh -->
+    <!-- The main section of this web page was generated via the tool: bin/gen-years.sh -->
+    <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
+

This means there is NOT even a markdown file to edit. Instead one must +modify JSON files and/or change a bin directory tool.

+

If this happens, consider opening up an IOCCC issue +and ask for help. See +FAQ on “fixing an entry” +for information on opening up an IOCCC issue.

+

Jump to: top

+
+

Q: How can I correct or update an IOCCC author’s information?

+
+

You may correct or update IOCCC author information by submitting a +GitHub pull request that modifies an author’s author_handle.json file.

+

For example, if a given author_handle.json file contained:

+
    "url" : "https://www.example.com/employee/username",
+

and you knew that the author has long ago left the www.example.com company, +and that they have a new faculty web page at www.example.edu, then you should +submit a GitHub pull request to change the above line to:

+
    "url" : "https://www.example.edu/faculty/deartment/user.name",
+

Authors of IOCCC winning entries are kept in JSON files of the form:

+
    author/author_handle.json
+

where author_handle is an author handle.

+

See the +FAQ on “author handle” +for more information about author handles.

+

See the +FAQ on “author_handle.json” +for information about the contents of these JSON files and how they are used.

+

See the +FAQ on “finding author handles” +for how to find an author_handle.

+

You may update IOCCC author information in a author_handle.json file +by submitting a pull request +against the master branch +of the ioccc-src/winner repo.

+

See the +FAQ on “GitHub pull request” +for more information.

+

IMPORTANT NOTE: As these files are JSON you should verify that +they are validly formed (e.g., you didn’t make a typo).

+

Before you form your GitHub pull request that modifies a +author_handle.json file, please run the make www command. This +unfortunately takes quite a while but it is the safest way to do +it. So you may wish to test your edits by running the somewhat +quicker make quick_www as this can speed up your testing.

+

The make quick_www rule will update the authors.html and +location.html pages and it will also check the timestamps of the index.html +files versus the README.md files. Since they were touched and thus the +timestamp was updated, the +bin/quick-readme2index.sh tool would +only worry about those two files. This greatly speeds things along while testing. +Nevertheless, doing a final make www is still recommended best practice +before you form your pull request.

+

Please see +FAQ on “fixing an entry”.

+

See also the +FAQ on “GitHub pull request” +for more information about pull requests.

+

Important note about XX - Anonymous location:

+

Unless you are the author who originally selected the XX - Anonymous +location, please do not attempt to change an XX - Anonymous +location without the permission of the original author, as sometimes they +want to have the location known but not their name and/or other details.

+
+

PLEASE HELP us identify proper locations for IOCCC authors

+
+

If you know the location of an author listed under:

+

      ZZ - Unknown location

+

or if you find IOCCC author location that is incorrect, +then please submit a pull request, +or at least inform the IOCCC judges.

+

FYI: The ZZ - Unknown location is used for +historic winning authors whose location or country is not known, +whereas the XX - Anonymous location is used when the +winning author does not wish to disclose their location.

+

The contents of these JSON files contain the best known information +about authors of IOCCC entries. See +FAQ on “author_handle.json” +for information about the contents of these JSON files and how they are used.

+

For example, if a given author_handle.json file contained:

+
    "location_code" : "ZZ",
+

and you knew that the author was located in Australia +(location code AU), we encourage you to submit a GitHub pull +request to change that line to:

+
    "location_code" : "AU",
+

See the +FAQ on “fixing author information” +for information about how to change author location codes.

+

Jump to: top

+ +

We would appreciate if you try to fix the broken (the link goes nowhere) or wrong +(the link goes to something that clearly is not the original intent) web link. +If wish to fix such links, you may open a GitHub pull request as described in +FAQ on “fixing the website”. +In the case of dead links or invalid links it doesn’t matter +if it’s a specific winner or not; the procedure is the same: open a pull request +to fix the problem. See also the +FAQ on “GitHub pull request” +for more information about pull requests.

+

As far as how to find the updated link you can try using the Internet Wayback +Machine and see if you can find the last non 4xx non +3xx page. Note, however, that just because it redirects, does not mean it’s not +valuable. Other times you might find it with a web search.

+

Some links were changed to more recent URLs by doing this exact +same thing. Some links, while they were a valid web page, no longer +reach the intended web page (for example when the domain is sold +and the new domain owner’s content no longer provides the content +that was originally intended .. and while the content of the web +page may be humorous to some, the original content may have literally +gone “up in smoke”).

+

In cases where the original content is lost, try searching for it on +the Internet Wayback Machine. When searching +look back for dates that are around the year of given IOCCC contest. +If you do find the original content in Internet archive history, +please consider submitting a change to replace the link accordingly.

+

If there is no alternative that you can find you might want to remove the link +instead by replacing the link with just phrase of text. For example, +if the text in some index.html file was:

+
    See the [author's description of the program](https://example.com) for more information.
+

Assuming that the author’s description cannot be found in the +Internet Wayback Machine archive, then +replace that text with:

+
    See the **author's description of the program** (sorry the content is no longer available) for more information.
+

If you just wish to report the bad link issue, see +FAQ on “report website problem”.

+

Jump to: top

+
+
+

Q: How can I support the IOCCC?

+
+
+

The IOCCC judges run the IOCCC entirely out of +their own funds. This includes paying for IOCCC related hardware, +services, registration, software and related technical items.

+

There is NO requirement for anyone to support the IOCCC. +Nevertheless, it has been shown that receiving anonymous gifts +provides the IOCCC judges with a nice +dopamine +boost, and happy IOCCC judges help make the IOCCC +better for everyone. :-)

+

If you wish to express your support and/or appreciation for our +efforts, we suggest making an Anonymous gift via the +IOCCC Amazon wishlist.

+

Jump to: top

+
+
+
+
+

Q: I deobfuscated some entry code, may I contribute the source?

+
+
+
+
+

PLEASE NOTE: many winning authors have unobfuscated code +of their own entries and you should look for this first, often on GitHub or on +their website; see the FAQ on how to find more information about a winning +author of an entry for how you might find this +information. We ask you to, if you can find them, please ask them what they +think as they can often provide invaluable information; this is less of an issue +for fixes of bugs - not features - found in the bugs.html file.

+

The IOCCC judges welcome those who wish to contribute a +deobfuscated version of a winning IOCCC entry: from either the author or +authors (which is much, much preferred) or from people such +as yourself (assuming you are not the author :-) ) who are willing to contribute +deobfuscated code. We also welcome contributions to improve existing +deobfuscated code. You might wish to look at their URL or alt URL (see below +for more details) first as quite a few authors have provided +unobfuscated code of their entries and this is far more fair to the winning +authors (and it is much more likely to be identical functionality +as well, though many authors are experienced and skilled enough +to add features after or during obfuscation! and many in fact do).

+

HISTORICAL NOTE: The IOCCC website has shifted to a more +educational theme: preferring to explain entries rather than hiding +things under the guise of such information being a “spoiler”. We +now use the term deobfuscated instead of “spoiler” for this reason, at +least in most cases; other terms might be used, including on a rare occasion +spoiler, this depending on context.

+

We ask that the deobfuscated code be identical in functionality +to the winning IOCCC entry code.

+

PLEASE NOTE: Be aware that IOCCC entry code may contain extremely subtle and +obscure side effects (i.e., features). Those wishing to contribute a +deobfuscated version of code should strive to mimic the original (or +existing) IOCCC entry code as much as possible. Some authors can be contacted +(see above for more details on this) and you could ask them for details and if +possible it would be good to include them in the discussion as well (see below) +as it is very likely there are things that will be missed when trying to +deobfuscate the code, some of which might be important to the author.

+

To contribute your deobfuscated code, please open up a +Show and tell new discussion +with a title of the form:

+
+

Enhancement: deobfuscated code for YYYY/dirname

+
+

where “YYYY/dirname” refers to the winning IOCCC entry for which you are deobfuscating.

+

In the body of your new discussion, PLEASE provide us with a URL of +your deobfuscated code, along with whatever notes and/or comments you +think might be helpful. If the author has a GitHub handle please mention +them in the discussion (see above part for how you might find out if they have a +GitHub account)!

+

If you are providing an improved version of some existing deobfuscated code, please +mention that in the body of your new discussion as well.

+

If there are limitations to how well the your deobfuscated code mimics +the original (or existing) IOCCC entry code, PLEASE mention those limitations +in the body of your new discussion as well.

+

Any questions that may arise will be added as comments to the discussion.

+

SUGGESTION: PLEASE try to make your deobfuscated code readable. PLEASE +add comments as needed to help the reader of your deobfuscated code understand it.

+

SUGGESTION: Where useful, consider providing, as C comments, +code fragments of from the original (or existing) IOCCC +entry code. While it is NOT necessary to include the entire +original code as C comments, including key parts from the +original (or existing) IOCCC entry code may be helpful +to others who wish to read your deobfuscated code.

+

If your deobfuscated is accepted (in some form), the IOCCC judges +will be happy to thank you for your contribution in the +thanking people for their help file.

+

The IOCCC judges will do the rest of the work in integrate your +deobfuscated code as an “alt” code for the entry AND will reference +your deobfuscated code in the entry’s index.html file. We will be +happy to include any whatever notes and/or comments from your new discussion +that be prove helpful.

+

THANK YOU in advance for your willingness to assist!

+

Jump to: top

+
+
+

Q: How do I report a bug in an IOCCC entry?

+
+
+

We do not ‘maintain’ the contest entries as such. The code is made available on an ‘AS +IS’ basis. If you have a FIX for an entry, we suggest that you submit your fixes in a GitHub pull +request as we welcome pull requests that have a +minimal impact on the entry while improving the portability, functionality, and/or addressing known problems.

+

If you do submit a pull request, we ask that each pull request address just one IOCCC entry at a time.

+

Note that just because you have a fix does not mean it’ll be accepted. This +might be because the author objects or it doesn’t fit in some way or another. Of +course if the entry does not work we’ll certainly be more inclined to accept the +fix. If it is accepted we’ll be happy to credit you in the +thanks file. If you’re a previous author of a winning IOCCC entry we will happily +link to your entries; if you’re not we can link to your website if you wish.

+

Please see the +FAQ on “fixing an entry” +for information on how to submit a fix to an +IOCCC entry. See also the +FAQ on “GitHub pull request” +for more information about pull requests.

+

Jump to: top

+
+
+
+

Section 10: Miscellaneous IOCCC

+
+

Jump to: top

+
+
+
+

Q: May I mirror the IOCCC website?

+
+
+
+

There are a few steps in mirroring the website:

+
    +
  1. First of all, open the website on your device, preferably one you can hold +and aim somewhere.
  2. +
  3. Then, turn your device towards a mirror. This should mirror it. :-)
  4. +
  5. If you can, take a picture of the mirror image. It might help if you can put +your device down facing the mirror, so that it is easier to get a picture.
  6. +
+

Okay, backing up, on a more serious note: we are not accepting mirror requests at +this time, sorry. However you are free to fork the IOCCC winner +repo.

+

Yes we are aware that some people have previously made their own repo of the +winning entries but these ARE UNOFFICIAL and VERY LIKELY out of date or +incorrect. What’s more, this repo is the source of the Official IOCCC +website so whenever a push is made to this repo the +Official IOCCC website is updated. When new winners are announced, this will +happen.

+

To put it simply, please do NOT fork those repos, as they are UNOFFICIAL +and certainly OUT OF DATE.

+

If you do make a new fork of THIS repo, we do ask that your fork keep up to +date with the latest changes when possible. Thank you.

+

Jump to: top

+
+ +
+

While IOCCC judges look favorably on most requests to use IOCCC material, +we request that you ask the IOCCC judges first. Of course, if +you’re the winner of the entry you can make use of it as you want (make a shirt, +put it on your website etc.).

+

Please send your request using the instructions on the contacting +the IOCCC Judges page.

+

Please note that the content of the IOCCC +Copyrighted and is under the CC BY-SA 4.0 License. +See the Copyright at the bottom of IOCCC web pages for more details.

+

See +FAQ on “using IOCCC content”. +For additional information on the Copyright and CC BY-SA 4.0 License.

+

Jump to: top

+
+
+
+

Q: Why do you sometimes use the first person plural?

+
+
+
+

As a precedent for first person +plural, we may cite Two-, +Three-, and Four-Atom Exchange Effects in bcc in +3He and +the co-authorship of F. D. C. +Willard as well +as the APS New Open Access +Initiative.

+

The number of IOCCC judges has +always been “> 1” such that IOCCC judges often refer to themselves +in the plural, sometimes in the common +plural, sometimes in the +first person plural, there +may be some who reject such a practice. Therefore please consider +that when you believe that just one of the IOCCC +judges is in action, you may +consider that F. D. C. +Willard has been +consulted, agreed, and has authorized the statement thus allowing +the in the common plural +to be used without offense.

+

And while some might claim that F. D. C. +Willard died in +1982, we suggest that the Schrödinger’s +cat superposition +may still be in effect and the 1982 report of death was an +exaggeration.

+

p.s. Here is an image of F. D. C. Willard:

+

image of F.D.C.Willard.png

+

Jump to: top

+
+
+
+
+
+

Q: What is the purpose of the .top, .allyear, .year and .path files?

+
+
+
+
+
+

The .top file resides at the top directory. This file contains the complete list +of IOCCC years.

+

Under each IOCCC year, one will find a .year file. These files contain directory paths from the top directory, +of the IOCCC entry directories for a given year. For example, see the 1984/.year file.

+

The .allyear file contains the contents of all .year files for all IOCCC years.

+

Under each IOCCC entry directory, you will find a .path file. +These files contain the directory path from the top directory. +For example see 1984/anonymous/.path.

+

The .top, .allyear, .year and .path files are generated from the top level Makefile, by:

+
    make genpath
+

Jump to: top

+
+

Q: What is the current meaning of the IOCCC terms Author, Entry, and Submission?

+
+

The IOCCC is now attempting to use the following terms:

+
    +
  • Author
  • +
+

An author is someone who has submitted an entry that has won the IOCCC.

+

An entry can have more than one authors. A number of authors have submitted +entries that have won the IOCCC, sometimes in the same IOCCC contest year.

+

An apology for being inconsistent: In the past, the IOCCC used the term winner to +refer to what is now an author. In a number of historical cases, +such as old rules and old guidelines, terms such as winner may still be +found. Moreover, out of habit, the IOCCC judges sometimes use old +names such as winner when they should use author. Sorry (tm Canada)! :-)

+
    +
  • Entry
  • +
+

An entry is a submission that won the IOCCC.

+

An entry has one or more authors.

+

An entry includes all of the files needed to compile it, +plus sample input files, a Makefile, an .entry.json file +describing the entry, a compressed tarball containing all of +files in the entry, etc. Under the IOCCC tree, an entry +that win the IOCCC in year YYYY is located under the +directory YYYY/entry.

+

An apology for being inconsistent: In the past, the IOCCC used the term winner to +refer to what is now an entry. In a number of historical cases, +such as old rules and old guidelines, terms such as winner may still be +found. Moreover, out of habit, the IOCCC judges sometimes use old +names such as winner when they should use entry. Sorry (tm Canada)! :-)

+
    +
  • Submission
  • +
+

A submission is something given to the IOCCC judges +for consideration when the IOCCC is open.

+

When the IOCCC is open for submissions, those who register +to enter the IOCCC may use the mkiocccentry tool +to package their code into a compressed tarball that may be +uploaded to the IOCCC submit server. +This compressed tarball is formatted in such a way that +the IOCCC judges do not see who wrote the code.

+

A submission that the IOCCC judges deem to have won the IOCCC +becomes an entry. Only then do the IOCCC judges look into +the special JSON file to discover who the author(s) are.

+

An apology for being inconsistent: In the past, the IOCCC used the term entry to +refer to what is now a submission. In a number of historical cases, +such as old rules and old guidelines, terms such as entry may still be +found. Moreover, out of habit, the IOCCC judges sometimes use old +names such as entry when they should use submission. Sorry (tm Canada)! :-)

+

Jump to: top

+
+
+

Q: Am I allowed to use IOCCC content?

+
+
+

Disclaimer: This FAQ is not a license, has no legal +value, and only highlights some of the key features and terms of +the actual CC BY-SA 4.0 +license.

+

The content of the IOCCC is Copyrighted and is under the CC BY-SA 4.0 License.

+

As long as you abide by the terms of the CC BY-SA 4.0 +License +you may copy and redistribute the material in any medium or format +for any purpose, even commercially.

+

As long as you abide by the terms of the CC BY-SA 4.0 +License +you may remix, transform, and build upon the material for any +purpose, even commercially.

+

This FAQ is an incomplete summary of how you may use IOCCC content. +You should review the highlights of some of the key features and terms +and this may help clarify some aspects of the +CC BY-SA 4.0 License.

+

The Copyright and CC BY-SA 4.0 License applies to all +IOCCC content. We use this to help ensure that we can all +enjoy hat those working on the IOCCC have proper Attribution +including, of course, the IOCCC winners themselves! It is designed +to help ensure that everyone may enjoy the IOCCC.

+

Jump to: top

+
+

Q: What is Mastodon and why does IOCCC use it?

+
+

The IOCCC uses Mastodon for news updates, +announcements, and for various other social media purposes.

+

Please follow the IOCCC on Mastodon.

+
+

The IOCCC no longer uses twitter, or whatever that someone who appears to have +poor impulse control (allegedly) calls their platform these days.

+
+

The IOCCC prefers to reside in the fediverse.

+

For help with Mastodon:

+

There is help with Mastodon available for +those who might wish to get started with Mastodon.

+

While there are many fine Mastodon server instances out there, the IOCCC judges +use fosstodon.org where lots of fun folk hang out, +and topics like science, technology, free and open source +have a good home. The fosstodon.org folk made the IOCCC feel welcome.

+

While using Mastodon is free, the IOCCC judges are pleased to +support the Fosstodon Hub.

+

If you have a phone or tablet there is also an official app that you can get +from the App Store or whatever equivalent your device has. Please note that the +app does not at this time seem to give push notifications when someone you +follow posts something so you will have to check the IOCCC feed manually.

+

HINT to mastodon users: You may wish to refresh the @IOCCC +mastodon feed page and/or mastodon +app from time to time to view IOCCC mastodon updates.

+

Jump to: top

+
+

Q: How do I set certain tabstops for viewing source code in vi(m)?

+
+

Sometimes an author will state that for best viewing purposes you should have +your tabstop set at say 4 or 8. If you use vim or vi or vim in no compatible +mode you can do this easily: make sure you’re in command mode (in most cases you +can hit ESC to do this) and then type the command:

+
    :set tabstop=4
+

where 4 is the value you wish to set the tabstop to.

+

Jump to: top

+ +
+ +
+

The way the menu works on desktops or laptops is that you should simply see the +menu directly without the need of JavaScript or any intervention on your part. +It should look something like:

+

screenshot of IOCCC menu on desktops

+

Simply move your mouse cursor over the category you want and then click on the +item you wish to view that drops down from the category.

+

This is likely how it will appear with a tablet device in landscape +mode, too, unless JavaScript is +disabled.

+
+

Mobile menus

+
+

If, however, you’re on a mobile device, it can vary, depending on the dimensions +and whether or not you have JavaScript enabled.

+
+ +
+

For instance, on an iPhone 14 +Pro Max or similar device (in dimensions), you should see at the top right of +every page, something that looks like:

+

screenshot of IOCCC menu on iPhone 14 Pro Max

+

In this case click on the icon at the top right corner that looks like:

+

menu open icon

+

to activate the menu.

+
+ +
+

If JavaScript is disabled on any mobile device, tablet or phone, you should see +the words:

+
        Please Enable JavaScript
+

at the top right corner; clicking on this will take you to the no JavaScript +menu which is a plaintext menu. You of course can use this if +you like, even if you do not have JavaScript enabled, by pointing your browser +to https://ioccc-src.github.io/temp-test-ioccc/nojs-menu.html.

+
+ +
+

With tablets, it likely depends on the orientation you have your device in. If it’s +in portrait mode you likely will see the menu that one will get on a mobile +phone.

+

If, on the other hand, you are using landscape mode, say on an iPad Pro 11 inch +4th generation, then you will likely see the menu as you would on a desktop or +laptop.

+
+ +
+

Finally, if you’re on a mobile device that is wider than 1024 pixels, you will +very possibly have to press and hold the menu icon:

+

menu open icon

+

to activate it. You can then use it as you would on a mobile +phone.

+
+
Browsing the website on mobile devices with a browser bug
+
+

It was noticed that in iOS 16 Safari (both on an iPhone 8 Plus and in simulation +mode in macOS) the menu does not work at all. That is to say one might see:

+

browser bug where menu icon does not show up

+

Notice how the menu icon is not even there! This happens in both portrait mode +and landscape mode.

+

In this case one will have to use the no JavaScript +menu. If you have a fix for this that does NOT +affect the usability of desktops, laptops or other mobile devices, please +consider fixing it and opening a pull request or at +least report it as an +issue (choose +the category Website issue).

+

Jump to: top

+
+

Q: How do I find more information about a winning author of an entry?

+
+

At the top of the index.html file of a winning entry with the author you want +information on, you should see a section called Author. All you have to do is +click on the author’s name (it’s a link) and it will take you to their +information in the authors.html page.

+

There you will find various information including a link to their +authors.html information which includes various things like +their GitHub account (if known), a URL or alternate UL, mastodon handle, +location (if known and not anonymous location) and a link to their JSON author file.

+

NOTE: you might wish to search google (or some other search engine) by their +name as sometimes you can find out their GitHub account even if it’s not in our +JSON files.

+

Of course if you know the author’s name you can go directly to +authors.html and click on their surname’s/last name’s/second +name’s initial and then scroll down (if necessary) to the author in question.

+

Jump to: top

+
+

Q: What is this cb tool that is mentioned in the IOCCC?

+
+

This was a C beautifier for Unix, both AT&T and Berkeley, but it seems to no +longer be available, code wise, except for Plan 9, but Plan 9 was never used for +judging the IOCCC. A Unix man page for cb +still exists.

+

Jump to: top

+
+

Section 11: History of the IOCCC

@@ -5387,7 +5378,50 @@ general USENIX conference, usua immediately after the BSD BOF, where the winners of a new IOCCC were announced in the early years of the IOCCC.

Jump to: top

-
+
+

Q: I do not understand the IOCCC, can you explain it to me?

+
+

The IOCCC stands for the International Obfuscated C Code Contest. +The IOCCC is a C programming contest.

+

The goals of the IOCCC are:

+
    +
  • To write the most Obscure/Obfuscated C program within the rules.
  • +
  • To show the importance of programming style, in an ironic way.
  • +
  • To stress C compilers with unusual code.
  • +
  • To illustrate some of the subtleties of the C language.
  • +
  • To provide a safe forum for poor C code. :-)
  • +
  • To have fun with C!
  • +
+

See the +FAQ on “start of the IOCCC” +and the +FAQ on “history of the IOCCC” +for more information the background of the IOCCC.

+

See the +FAQ on “entering the IOCCC” +for information on how to enter and submit to the IOCCC.

+

If you are still confused, consider the nature of +the IOCCC rules and of the IOCCC +guidelines. You will see a dose of the technical, +mixed with “nerd humor” (or humour if you prefer 🤓).

+

If after all that you are still confused, sorry (tm Canada 😉). +Consider this: While the IOCCC often attempts to be presentable, +it is under no obligation to be wholly understandable. One might +say that to truly understand the IOCCC is problematic. And if +someone did manage to fully understand the IOCCC, then perhaps +this modified quote from the The Hitchhiker’s Guide to the +Galaxy +may apply:

+
+

“There is a theory which states that if ever anyone discovers +exactly what the IOCCC is for and why it is here, it will +instantly disappear and be replaced by something even more bizarre +and inexplicable.

+

There is another theory which states that this has +already happened.” 😜

+
+

Share and enjoy! ☺️

+

Jump to: top

+ mkiocccentry -a answers.txt ... +``` + +Alternatively, if you wish to overwrite a file, you can use the `-A` +flag with the same option argument. Be **very careful** that you do not accidentally +overwrite your `prog.c` or some other important file! + +To make use of the answers file, use the `-i answers` option like: + +``` + mkiocccentry -i answers.txt ... +``` + +Jump to: [top](#) + + +
+### Q: May I use a different source or compiled filename than prog.c or prog? +
+ +While your entry's source filename, as submitted, must be `prog.c`, your entry's `Makefile` +may copy `prog.c` to a different filename as part of the compiling/building process. For example: + +``` + # Makefile continues above ... + + all: desired_name + + desired_name: desired_name.c + rm -f $@ + cc desired_name.c -o $@ + + desired_name.c: prog.c + rm -f $@ + cp -f prog.c $@ + + clean: + rm -f desired_name.o + + clobber: clean + rm -f desired_name.c desired_name + + # Makefile continues below ... +``` + +We recommend that the `make clobber` rule remove files that your entry +creates as part of the compiling/building process. + +You may also copy the compiled `prog` into a different file as part of compiling process. +For example: + +``` + # Makefile continues above ... + + all: desired_name + + different_name: prog + rm -f $@ + cp -f prog $@ + + clean: + rm -f prog.o + + clobber: clean + rm -f desired_name + + # Makefile continues below ... +``` + +Jump to: [top](#) + + +
+
+### Q: What are the IOCCC best practices for using markdown? +
+
+ +The IOCCC makes extensive use of [markdown](https://daringfireball.net/projects/markdown/). +For example, we [submitting to the IOCCC](#submit), we have people +to submit remarks about entry in markdown format. Every +[winning IOCCC entry](years.html) uses a `README.md` markdown file +as the basis for forming the `index.html` web page for that entry. +All generated HTML pages on the [Official IOCCC website](https://www.ioccc.org/index.html) +start with some markdown content. + +**IMPORTANT**: Please read the [IOCCC markdown best practices](markdown.html) guide +as it lists things you **should not use** in markdown files. + +See the [markdown syntax](https://www.markdownguide.org/basic-syntax) guide. +See also [CommonMark Spec](https://spec.commonmark.org/current/). + +Jump to: [top](#) + + +
+### Q: How do I report bugs in an `mkiocccentry` tool? +
+ +As the [mkiocccentry toolkit](https://github.com/ioccc-src/mkiocccentry) is +crucial in the contest, both for submitters and the judges, if you find a bug +(or you think you find a bug) we would be grateful if you were to report it at +the [mkiocccentry issues +page](https://github.com/ioccc-src/mkiocccentry/issues). + +Please see the +FAQ on "[reporting bugs and other issues in the mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry/blob/master/FAQ.md#bugs)" +in the [mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry). + +Jump to: [top](#) + +
+
+ + +
+## Section 2: IOCCC Judging process +
+ +Jump to: [top](#) + + +
+
+### Q: What is the best way to ask a question about the IOCCC rules, guideline and tools? +
+
+ +We realise that the [IOCCC rules](next/rules.html), [IOCCC guidelines](next/guidelines.html) +and the [IOCCC mkiocccentry tools](https://github.com/ioccc-src/mkiocccentry) +can be confusing or even seem overwhelming to some people. + +The [IOCCC judges](judges.html) do welcome questions about the IOCCC +and will be **happy to help**. + +Chances are, if you have a question, there are a number of other people who +have similar questions. So we recommend first view the +[GitHub discussions for this repo](https://github.com/ioccc-src/winner/discussions) +so see if someone else asked already. Feel free to join in on such a discussion, +even if to just say: + +> I have this question too. + +Feel free to provide additional feedback in the existing discussion as needed. + +**BTW**: If your question is just about the +[IOCCC mkiocccentry tools](https://github.com/ioccc-src/mkiocccentry), please +view the [mkiocccentry repo discussions](https://github.com/ioccc-src/mkiocccentry/discussions) +instead. + +If you do not find a suitable open discussion, please consider opening a +[new IOCCC repo discussion](https://github.com/ioccc-src/winner/discussions/new/choose) with +your question. Doing this may be of help to others with a question similar to yours. + +**BTW**: If your question is just about the +[IOCCC mkiocccentry +tools](https://github.com/ioccc-src/mkiocccentry/discussions), and you do not +see a suitable open discussion over there, then please consider opening a +[new mkiocccentry discussion](https://github.com/ioccc-src/mkiocccentry/discussions/new/choose) +over there. + +If you do not feel, for some reason, comfortable asking your question in public +(although we hope you consider asking it in public for the benefit of others), +then use the [How to contact the IOCCC](contact.html) information to ask +a private question. + +**IMPORTANT**: When you ask your question (in public or as a private question) +**PLEASE** try to **NOT** discuss detailed information about any pending submission. +Try to ask for question in a more generic way as this will help others +with a similar question and this will not **give away** what you might be doing +with your submission. If the [IOCCC judges](judges.html) truly need more +information, they will ask (either in public or suggest a private conversation). + +Again, **please** don't hesitate to ask: Your question may be something that +others are wondering about as well! + +See also the +FAQ on "[rules, guidelines, tools feedback](#feedback)". + +Jump to: [top](#) + + +
+
+### Q: How can I comment or make a suggestion on IOCCC rules, guidelines and tools? +
+
+ +The [IOCCC judges](judges.html) to welcome feedback on the [IOCCC +rules](next/rules.html), [IOCCC guidelines](next/guidelines.html) +and on the [IOCCC mkiocccentry tools](https://github.com/ioccc-src/mkiocccentry). + +To comment on the [IOCCC rules](next/rules.html) or the +[IOCCC guidelines](next/guidelines.html) please view the +[GitHub discussions for this repo](https://github.com/ioccc-src/winner/discussions). +If there is an on-going discussion that seems relevant to what you +have to say, consider adding comments to that particular discussion. +Otherwise consider opening a [new IOCCC repo +discussion](https://github.com/ioccc-src/winner/discussions/new/choose). + +To comment on [IOCCC mkiocccentry tools](https://github.com/ioccc-src/mkiocccentry), +please view the [mkiocccentry repo discussions](https://github.com/ioccc-src/mkiocccentry/discussions). +If there is an on-going discussion that seems relevant to what you +have to say, consider adding comments to that particular discussion. +Otherwise consider opening a [new mkiocccentry +discussion](https://github.com/ioccc-src/mkiocccentry/discussions/new/choose). + +Jump to: [top](#) + + +
+
+### Q: Are there any compiler warnings that I should not worry about? +
+
+ +There are unfortunately some warnings that cannot be disabled; they are always +enabled whatever warning options you have enabled. Also, there is a warning that +is enabled whenever you act on `char *`s, saying it is unsafe buffer usage, even +when it's not (this might be enabled by `-Weverything` but it might not be; for +more details on why we use `-Weverything` in Clang see the FAQ on +"[`-Weverything`](#weverything)"), and it is not detrimental to your submission +if you disable this. This warning happens to be `-Wno-unsafe-buffer-usage`. + +So in short, no you should not worry about these as they are sometimes +inevitable in obfuscated code and even non-obfuscated code. + +If you *can* work past this it might be good but this is not something that +should be worried about too much as this is on the compiler developers, not you. + +Jump to: [top](#) + + +
+### Q: What types of entries have been frequently submitted to the IOCCC? +
+ +There are types of entries that are frequently submitted to the IOCCC. +While we **do not wish to prevent** people from sending +a submission to the IOCCC on a frequently submitted theme, +we do wish to provide a **fair warning** to those who do. + + +#### Fair warnings on frequently submitted themes: + +**IMPORTANT HINT**: It is **not fatal** to send in those types of +entries, it is just **HARDER to win** with such a submission. A +submission on a frequently submitted theme will have to do something +in a **really unique AND interesting way** to even make it into the +final judging rounds. It will have to compete with previous IOCCC +winners based on the same theme. + +**IMPORTANT HINT**: If you really wish send in a submission on a +frequently submitted theme, be sure that it is obfuscated in several +new and novel ways. + +**IMPORTANT HINT**: Be sure to **clearly explain** near the beginning +of your `remarks.md` file, see the +FAQ on "[remarks.md](#remarks_md)", +**why you are submitting an entry based on a frequently +submitted theme** and **how compares with previous IOCCC winners** +of the same theme. + + +#### Examples of frequently submitted themes + + +##### Maze generator + +- [1985/shapiro](1985/shapiro/index.html) +- [1991/buzzard](1991/buzzard/index.html) +- [1995/cdua](1995/cdua/index.html) +- [1995/dodsond2](1995/dodsond2/index.html) +- [1998/bas1](1998/bas1/index.html) + + +##### Tic-Tac-Toe/Noughts and Crosses/Xs and Os game + +- [1991/westley](1991/westley/index.html) +- [1996/jonth](1996/jonth/index.html) +- [2020/carlini](2020/carlini/index.html) + + +##### Solitaire/Othello game + +- [1987/lievaart](1987/lievaart/index.html) +- [1994/dodsond1](1994/dodsond1/index.html) + + +##### Generating small primes (below is the list of all prime related winning entries) + +- [1985/august](1985/august/index.html) +- [1988/applin](1988/applin/index.html) +- [1994/weisberg](1994/weisberg/index.html) +- [1995/makarios](1995/makarios/index.html) +- [1996/dalbec](1996/dalbec/index.html) +- [2000/bellard](2000/bellard/index.html) + + +##### Self-reproducing program + +- [1990/scjones](1990/scjones/index.html) +- [1994/smr](1994/smr/index.html) - _do not claim your program is the smallest without seeing this entry_! +- [2000/dhyang](2000/dhyang/index.html) - _this entry set a high bar for entries of this theme_ + + +##### Entries that just print "Hello, world!" + +- [1984/anonymous](1984/anonymous/index.html) +- [1985/applin](1985/applin/index.html) +- [1986/applin](1986/applin/index.html) +- [1986/holloway](1986/holloway/index.html) +- [1989/jar.1](1989/jar.1/index.html) +- [1992/lush](1992/lush/index.html) +- [2000/tomx](2000/tomx/index.html) + + +##### Entries that use some complex state machine/table to print something + +- [1988/isaak](1988/isaak/index.html) +- [1988/phillipps](1988/phillipps/index.html) +- [2018/ciura](2018/ciura/index.html) +- [2018/giles](2018/giles/index.html) + + +##### ROT13 + +- [1985/sicherman](1985/sicherman/index.html) +- [1989/westley](1989/westley/index.html) +- [1990/dg](1990/dg/index.html) +- [1991/fine](1991/fine/index.html) + + +##### **pi** or **e** computation + +- [1986/august](1986/august/index.html) +- [1988/robison](1988/robison/index.html) +- [1988/westley](1988/westley/index.html) +- [1989/roemer](1989/roemer/index.html) + + +#### The above list of frequently submitted themes is not exhaustive + + +#### Some final thoughts on frequently used themes + +While it is possible to win a new IOCCC with one of these +**frequently submitted** types of entries, level of the competition from +previous IOCCC entries make it more challenging to be successful. + +It is also important to note that the [guidelines](next/guidelines.html) often +state something along the lines of: + +``` + We tend to dislike programs that: are similar to previous winning entries. +``` + +**FAIR WARNING**: Be sure to **clearly explain** near the beginning +of your `remarks.md` file, see the +FAQ on "[remarks.md](#remarks_md)", +**why you are submitting an entry based on a frequently +submitted theme** and **how compares with previous IOCCC winners** +of the same theme. + +Jump to: [top](#) + + +
+
+### Q: How did an entry that breaks the size rule 2 win the IOCCC? +
+
+ +As entries have been fixed it is entirely possible that some of the entries no +longer fit within the year's size restrictions. Invariably the length of columns +and/or number of rows have also changed. + +The `winner.orig.c` file contains the original source code that was +subjected to rule 2 of the given IOCCC. You may also wish to see +the [archive](archive) directory where you can find all the +original winning entries as compressed tar files for a given year. + +In some cases the entry may have abused rule 2 and declared an +"abuse of the rules" (although now blatant abuse of the rules to +get around rule 2 size limits is discouraged). + +Jump to: [top](#) + + +
+
+### Q: How many submissions do the judges receive for a given IOCCC? +
+
+ +By tradition, we do not say. + +Jump to: [top](#) + + +
+### Q: How much time does it take to judge the contest? +
+ +It takes a fair amount of time to setup, run, respond to messages, process entries, +review entries, trim down the set entries to a set of winning entries, doing the +write-up of the entries, announcing the entries, reviewing final edits of the +winning entry set, posting the winning entries, being flamed :-), tell folks who send in +late entries to wait until the next contest, etc... It takes a few weekends and +a number nights of study and work ... which is hard given that we are busy with +many other activities as well. + +Note that we do not contact the author if an entry does not compile or does not +work as advertised; we might attempt to fix obvious compilation problems or +incompatibilities, but no more than that - so be sure that your entry does work +on at least a couple different platforms, at least one of them being UNIX or +SUS-conforming. See the +FAQ on "[SUS](#SUS)" +for more information. + +Jump to: [top](#) + + +
+
+### Q: How many judging rounds do you have? +
+
+ +Are you trying to trick us? :-) + +By tradition, we do not say how many judging rounds we have in a given IOCCC. + +We often report when the IOCCC judges start the 1st round, and then usually +report when the IOCCC judges start near final judging rounds, and sometimes we +also report when we enter what we believe is the final judging round, so you may +guess that we have at least 3 rounds. :-) The actual number of rounds is +certainly more than 3. + +Jump to: [top](#) + + +
+
+
+### Q: Why do some IOCCC entries receive the Grand Prize or Best of Show award? +
+
+
+ +In some years, the IOCCC judges discover a truly amazing IOCCC entry that +stands out among all of the other IOCCC entries received that year. +For such an IOCCC entry, the IOCCC judges award a "Grand Prize" +or "Best of Show award. + +In 1984-1987, the grand prize winning entries are: + +- [1984/mullender](years.html#1984_mullender) +- [1985/shapiro](years.html#1985_shapiro) +- [1986/wall](years.html#1986_wall) +- [1987/lievaart](years.html#1987_lievaart) + +Starting from 1988, the entry we liked the most in that year is called +"Best of Show". Here are the "Best of Show" entries: + +- [1988/applin](years.html#1988_applin) +- [1989/jar.2](years.html#1989_jar.2) +- [1990/theorem](years.html#1990_theorem) +- [1991/brnstnd](years.html#1991_brnstnd) +- [1992/vern](years.html#1992_vern) +- [1996/august](years.html#1996_august) +- [1998/banks](years.html#1998_banks) +- [2000/jarijyrki](years.html#2000_jarijyrki) +- [2020/carlini](years.html#2020_carlini) + + +In 1993, 1994 and 1995 the judges were unable to select a clear overall +winning entry. So to give a nod to the entry that had the highest approval ranking +from the judges, they used the following awards: + +- [1993/rince](years.html#1993_rince) - Most Well Rounded +- [1994/shapiro](years.html#1994_shapiro) - Most Well Rounded +- [1995/leo](years.html#1995_leo) - Best Use of Obfuscation + +These could be considered the 'best entry' for those years with 1 or +more other entries that came in close behind. + +Jump to: [top](#) + + +
+
+
+### Q: How are winning IOCCC entries announced? +
+
+
+ +Once the [IOCCC](index.html) closes, the judges will: + +* Judge the submissions. + +* Select the [winning entries](years.html) and announce them on the [@IOCCC +mastodon feed](https://fosstodon.org/@ioccc). + +* Notify the authors of entries that won the IOCCC via email using their previously +registered email address. + +* Announce who are authors of this year's winning IOCCC entries via the [@IOCCC mastodon +feed](https://fosstodon.org/@ioccc). + +* Upload the winning code to the [Official IOCCC winner +repo](https://github.com/ioccc-src/winner). + +* Update the [Official IOCCC website](index.html), and in particular +display this year's winning IOCCC entries at the top of the [IOCCC +winning entries page](years.html). This is done by updating this repo. + +* Update the [IOCCC news](news.html) page, also by updating this repo. + +Jump to: [top](#) + + +
+
+### Q: Why don't you publish submissions that do not win? +
+
+ +Because the publication on the IOCCC site **_IS_** the award! +Anyone is free to put their IOCCC hopefuls, lookalikes and/or +entries that do not win on their web page for everyone to see. + +Jump to: [top](#) + +
+
+ + +
+## Section 3: The mkiocccentry toolkit: finer details +
+ + +Jump to: [top](#) +
+### Q: What sort of checks does the mkiocccentry tool perform? +
+ +`mkiocccentry(1)` will check and warn about the following conditions: + +- If the files do not exist, are not regular files or cannot be read. +- If `prog.c` violates [Rule 2](next/rules.html#rule2) (see +[iocccsize.c](https://github.com/ioccc-src/mkiocccentry/blob/master/iocccsize.c)). +- If `prog.c` is empty. +- If `prog.c` has any high bit char (see +[iocccsize.c](https://github.com/ioccc-src/mkiocccentry/blob/master/iocccsize.c)). +- If `prog.c` has any NUL char (see +[iocccsize.c](https://github.com/ioccc-src/mkiocccentry/blob/master/iocccsize.c)). +- If `prog.c` has any unknown or invalid trigraph (see +[iocccsize.c](https://github.com/ioccc-src/mkiocccentry/blob/master/iocccsize.c)). +- If `prog.c` triggers a word buffer overflow (see +[iocccsize.c](https://github.com/ioccc-src/mkiocccentry/blob/master/iocccsize.c)). +- If `prog.c` triggers an `ungetc(3)` error (see +[iocccsize.c](https://github.com/ioccc-src/mkiocccentry/blob/master/iocccsize.c)). +- If the first rule in the `Makefile` is not `all`. +- If the `Makefile` does not have a `clean` rule. +- If the `Makefile` does not have a `clobber` rule. +- If the `Makefile` does not have a `try` rule. +- If the `remarks.md` is empty. + +Conditions that one must correct, and which `mkiocccentry(1)` will prompt until +they are correct, are: + +- Your _title_ is not in the range of 1 through `MAX_TITLE_LEN` chars (see +[limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). +- Your _title_ does not match the regexp `^[0-9a-z][0-9a-z._+-]*$`. +- Your _abstract_ is not between 1 and `MAX_ABSTRACT_LEN` chars +(see [limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). +- the author count is not 1 through `MAX_AUTHORS` (see +[limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). +- An author _name_ is not 1 through `MAX_NAME_LEN` chars (see +[limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). +- Duplicate author _name_. +- _Country code_ is invalid (not ISO 3166-1 2 character +codes). +- An _email_, if provided, is not in the format of `x@y` or +if `x` or `y` contain a `@`, are empty or if the total length is longer than +`MAX_EMAIL_LEN` (see [limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). +- A _URL_ or _alt URL_, if provided, does not start with `http://` +or `https://` or is longer than `MAX_URL_LEN` chars (see +[limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)) +or does not have anything after the `http://` or `https://`. +- A _mastodon handle_, if provided, is not in the form of +`@user@site` (i.e. starts with an `@`, has text following it and then another +`@` followed by more text and has no other `@`) or is longer than `MAX_MASTODON_LEN` (see +[limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). +- A _GitHub account_, if provided, does not start with an `@`, +has more than one `@` or is longer than `MAX_GITHUB_LEN` (see +[limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). +- An _affiliation_, if provided, is longer than +`MAX_AFFILIATION_LEN` (see [limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). +- An _author handle_, if the default is not accepted, does +not match the regexp `^[0-9A-Za-z][0-9A-Za-z._+-]*$`. +- An _author handle_ is repeated. +- The output of `ls` on the submission directory is incorrect. + +Although the `mkiocccentry(1)` tool will verify everything for you, you may wish +to validate different parts individually with the different tools. As the +[rules](next/rules.html) state, each of these tools has a `-h` option. + +See the +FAQ on "[jparse](#jparse)", +the +FAQ on "[.auth.json](#auth_json)", +the +FAQ on "[.info.json](#info_json)", +the +FAQ on "[chkentry](#chkentry)", +the +FAQ on "[txzchk](#txzchk)" +and the +FAQ on "[fnamchk](#fnamchk)" +for more details on the tools that `mkiocccentry` either executes directly or +indirectly as part of the packaging process, especially if you wish to run one +or more of these tools manually. + +See also the [Guidelines](next/guidelines.html) and the [Rules](next/rules.html) +(and in particular [Rule 17](next/rules.html#rule17)). + +Jump to: [top](#) + + +
+
+
+### Q: How can I validate my submission tarball? +
+
+
+ +The tool that validates submission tarballs can be obtained from the [IOCCC +mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry). The +`mkiocccentry` tool itself will run the validator **after** forming the tarball. +However, you may wish to manually validate the tarball. The tool that does this +is `txzchk`. + +If you wish to validate the tarball without running the `mkiocccentry(1)` tool, +for instance the tarball +`submit.12345678-1234-4321-abcd-1234567890ab-2.1720636351.txz` you can, after +installing the tools, do: + +``` + txzchk submit.12345678-1234-4321-abcd-1234567890ab-2.1720636351.txz +``` + +Assuming that the tarball exists and is valid, you should see no output. + +If you wish to see the contents, for instance like `mkiocccentry(1)` does, you +could do: + +``` + txzchk -v 1 submit.12345678-1234-4321-abcd-1234567890ab-2.1720636351.txz +``` + +As the [guidelines state](next/guidelines.html#txzchk), it is beyond the scope +of this document to discuss the many tests that `txzchk(1)` runs; if you must +know we refer you to the [source +code](https://github.com/ioccc-src/mkiocccentry/blob/master/txzchk.c). + +Jump to: [top](#) + + +
+
+### Q: What is the `fnamchk` tool? +
+
+ +This tool, which is in the [mkiocccentry +repo](https://github.com/ioccc-src/mkiocccentry), validates the directory name +of your submission. + +Rather than `mkiocccentry` running this tool manually, `txzchk`'s algorithm uses +the output of this tool. If you wish to validate your tarball filename manually, +you can do so. For instance: + +``` + fnamchk submit.12345678-1234-4321-abcd-1234567890ab-2.1720636351.txz +``` + +Assuming everything is OK, it would show: + +> `12345678-1234-4321-abcd-1234567890ab-2` + +See also the +FAQ on "[validating your submission tarball](#txzchk)" +for more information. + +Jump to: [top](#) + + +
+
+### Q: How can I validate my `.auth.json` and/or `.info.json` files? +
+
+ +If you want to validate the `.auth.json` or `.info.json` files you +should use `chkentry(1)` from the [mkiocccentry +repo](https://github.com/ioccc-src/mkiocccentry). + +The `chkentry(1)` tool uses the IOCCC version of the [jparse +API](https://github.com/ioccc-src/mkiocccentry/blob/master/jparse/man/man3/jparse.3) +to perform **additional** checks on these two IOCCC specific JSON files. It is +_possible_ that this version will at times differ from the [official jparse +API](https://github.com/xexyl/jparse/blob/master/man/man3/jparse.3) at the +[official jparse repo](https://github.com/xexyl/jparse) and this is one of the +reasons the tools' `-V` (version option) show the JSON parser version as well. + +See the +FAQ on "[.auth.json](#auth_json)" +and +FAQ on "[.info.json](#info_json)" +for more details on these files. + +The `chkentry(1)` tool accepts more than one command line form. +If you pass a single argument, it is expected to be a directory that has both +`.auth.json` and `.info.json` in it. You can also specify a `.auth.json` and/or +`.info.json` file. An argument of "`.`" will skip that file. For instance: + +``` + # test entry directory test_work: + chkentry test_work + + # run checks on .info.json: + chkentry .info.json . + + # run checks on .auth.json: + chkentry . .auth.json + + # run checks on .info.json and .auth.json: + chkentry .info.json .auth.json +``` + +If there is a [JSON](https://www.json.org/json-en.html) issue detected by +`jparse(3)` API, then there is a [JSON](https://www.json.org/json-en.html) error and +`chkentry(1)` will report it as an **error**. If the parsing is OK (i.e. valid +JSON) but there is an issue in one or both of the +[JSON](https://www.json.org/json-en.html) files in **the context of the IOCCC**, +it will report this as an **error**. Thus, if you were to package your +submission manually then you would be violating [Rule +17](next/rules.html#rule17). + +Jump to: [top](#)
@@ -547,7 +1336,6 @@ In order of the file's contents we describe each required field, below: report it as an **error** and your submission **WILL BE** rejected for violating [Rule 17](next/rules.html#rule17)! - - `tarball` (double quoted string) * The xz compressed tarball filename. @@ -560,8 +1348,6 @@ In order of the file's contents we describe each required field, below: does not mean it's a bug but rather that the directory in the tarball matches the filename. - - - `submit_slot` (number) * The submission number. @@ -662,7 +1448,6 @@ author(s) of the submission: After the `authors` **array** the remaining of a `.auth.json` file holds: - - `formed_timestamp` (number) * Seconds since epoch when `.auth.json` was formed (see `gettimeofday(2)`). See also the FAQ on "[.info.json](#info_json)" @@ -702,7 +1487,6 @@ After the `authors` **array** the remaining of a `.auth.json` file holds: in the [mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry/). If this is not the case your submission **WILL BE** rejected! - This file will be verified with the `chkentry(1)` tool and if there are any problems **it is an error**. If there is an error the tarball will **NOT** be formed by `mkiocccentry`; otherwise the `txzchk(1)` tool will be executed on the @@ -731,6 +1515,7 @@ FAQ on "[validating JSON documents](#validating_json)". Jump to: [top](#) +
### Q: What is a `.info.json` file?
@@ -1029,7 +1814,6 @@ In order of the file's contents we describe each required field, below: Next comes the `manifest` **array** which **MUST** have AT LEAST the following. The `mkiocccentry(1)` tool will write it in this order: - - `info_JSON` (double quoted string) * This `MUST` be `".info.json"`, defined as `INFO_JSON_FILENAME` in [soup/entry_util.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/entry_util.h) @@ -1066,7 +1850,6 @@ The `mkiocccentry(1)` tool will write it in this order: **NOTE:** if you provide to `mkiocccentry` a different filename it will be copied to `prog.c`. - - `Makefile` (double quoted string) * This `MUST` be `"Makefile"`, defined as `MAKEFILE_FILENAME` in [soup/entry_util.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/entry_util.h) @@ -1153,7 +1936,6 @@ Finally, after the `manifest` **array**, the following fields **MUST** exist: in the [mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry/). If this is not the case your submission **WILL BE** rejected! - This file will be verified with the `chkentry(1)` tool and if there are any problems **it is an error** and the tarball will **NOT** be formed by `mkiocccentry`; otherwise the `txzchk(1)` tool will be executed on the tarball. @@ -1176,3412 +1958,6 @@ FAQ on "[validating JSON documents](#validating_json)". Jump to: [top](#) -
-
-### Q: How can I validate any JSON document? -
-
- -If you want or need to verify that a JSON document (as a string or file) is -valid, you can use the -[jparse](https://github.com/ioccc-src/mkiocccentry/blob/master/jparse/README.md) -tool. The IOCCC version of the `jparse(1)` tool may be installed from the -[mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry). - -The [FAQ.md file in the mkiocccentry -repo](https://github.com/ioccc-src/mkiocccentry/blob/master/FAQ.md#download) -contains information about how to find and compile the mkiocccentry -toolkit, which includes the IOCCC version of the `jparse(1)` tool, located -under the `mkiocccentry` directory as `jparse/jparse`. - -Additionally you may install the `jparse(1)` tool from the [jparse -repo](https://github.com/xexyl/jparse): - -``` - git clone https://github.com/xexyl/jparse.git - cd jparse - make clobber all test - sudo make install -``` - -The syntax of `jparse(1)` is very simple: - - -``` - jparse foo.json -``` - -If the tool exits 0 then the document is valid JSON; otherwise it'll -show an error message. - -If you want to see more information about the parsing you can increase the -verbosity with the `-v` option. For instance: - -``` - jparse -v 3 foo.json -``` - -If the tool is not installed then you will obviously have to specify the path of -the tool. - -Jump to: [top](#) - -
-
-### Q: How can I validate my `.auth.json` and/or `.info.json` files? -
-
- -If you want to validate the `.auth.json` or `.info.json` files you -should use `chkentry(1)` from the [mkiocccentry -repo](https://github.com/ioccc-src/mkiocccentry). - -The `chkentry(1)` tool uses the IOCCC version of the [jparse -API](https://github.com/ioccc-src/mkiocccentry/blob/master/jparse/man/man3/jparse.3) -to perform **additional** checks on these two IOCCC specific JSON files. It is -_possible_ that this version will at times differ from the [official jparse -API](https://github.com/xexyl/jparse/blob/master/man/man3/jparse.3) at the -[official jparse repo](https://github.com/xexyl/jparse) and this is one of the -reasons the tools' `-V` (version option) show the JSON parser version as well. - -See the -FAQ on "[.auth.json](#auth_json)" -and -FAQ on "[.info.json](#info_json)" -for more details on these files. - -The `chkentry(1)` tool accepts more than one command line form. -If you pass a single argument, it is expected to be a directory that has both -`.auth.json` and `.info.json` in it. You can also specify a `.auth.json` and/or -`.info.json` file. An argument of "`.`" will skip that file. For instance: - -``` - # test entry directory test_work: - chkentry test_work - - # run checks on .info.json: - chkentry .info.json . - - # run checks on .auth.json: - chkentry . .auth.json - - # run checks on .info.json and .auth.json: - chkentry .info.json .auth.json -``` - -If there is a [JSON](https://www.json.org/json-en.html) issue detected by -`jparse(3)` API, then there is a [JSON](https://www.json.org/json-en.html) error and -`chkentry(1)` will report it as an **error**. If the parsing is OK (i.e. valid -JSON) but there is an issue in one or both of the -[JSON](https://www.json.org/json-en.html) files in **the context of the IOCCC**, -it will report this as an **error**. Thus, if you were to package your -submission manually then you would be violating [Rule -17](next/rules.html#rule17). - -Jump to: [top](#) - - - - -
-## Section 1: Entering the IOCCC: more help and details -
-Jump to: [top](#) -
-### Q: Is there a way to not have to re-enter the same information, when making a change to my submission? -
- -Yes! The `mkiocccentry(1)` tool has some options to help write _OR_ read from an -answers file so you do not have to input the author(s) or the submission -details (like the abstract, summary etc.), just to change a file. - -To write to `answers.txt` try: - -``` - mkiocccentry -a answers.txt ... -``` - -Alternatively, if you wish to overwrite a file, you can use the `-A` -flag with the same option argument. Be **very careful** that you do not accidentally -overwrite your `prog.c` or some other important file! - -To make use of the answers file, use the `-i answers` option like: - -``` - mkiocccentry -i answers.txt ... -``` - -Jump to: [top](#) - - -
-### Q: May I use a different source or compiled filename than prog.c or prog? -
- -While your entry's source filename, as submitted, must be `prog.c`, your entry's `Makefile` -may copy `prog.c` to a different filename as part of the compiling/building process. For example: - -``` - # Makefile continues above ... - - all: desired_name - - desired_name: desired_name.c - rm -f $@ - cc desired_name.c -o $@ - - desired_name.c: prog.c - rm -f $@ - cp -f prog.c $@ - - clean: - rm -f desired_name.o - - clobber: clean - rm -f desired_name.c desired_name - - # Makefile continues below ... -``` - -We recommend that the `make clobber` rule remove files that your entry -creates as part of the compiling/building process. - -You may also copy the compiled `prog` into a different file as part of compiling process. -For example: - -``` - # Makefile continues above ... - - all: desired_name - - different_name: prog - rm -f $@ - cp -f prog $@ - - clean: - rm -f prog.o - - clobber: clean - rm -f desired_name - - # Makefile continues below ... -``` - -Jump to: [top](#) - - -
-
-### Q: What are the IOCCC best practices for using markdown? -
-
- -The IOCCC makes extensive use of [markdown](https://daringfireball.net/projects/markdown/). -For example, we [submitting to the IOCCC](#submit), we have people -to submit remarks about entry in markdown format. Every -[winning IOCCC entry](years.html) uses a `README.md` markdown file -as the basis for forming the `index.html` web page for that entry. -All generated HTML pages on the [Official IOCCC website](https://www.ioccc.org/index.html) -start with some markdown content. - -**IMPORTANT**: Please read the [IOCCC markdown best practices](markdown.html) guide -as it lists things you **should not use** in markdown files. - -See the [markdown syntax](https://www.markdownguide.org/basic-syntax) guide. -See also [CommonMark Spec](https://spec.commonmark.org/current/). - -Jump to: [top](#) - - -
-### Q: How do I report bugs in an `mkiocccentry` tool? -
- -As the [mkiocccentry toolkit](https://github.com/ioccc-src/mkiocccentry) is -crucial in the contest, both for submitters and the judges, if you find a bug -(or you think you find a bug) we would be grateful if you were to report it at -the [mkiocccentry issues -page](https://github.com/ioccc-src/mkiocccentry/issues). - -Please see the -FAQ on "[reporting bugs and other issues in the mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry/blob/master/FAQ.md#bugs)" -in the [mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry). - -Jump to: [top](#) - - - - -
-## Section 2: IOCCC Judging process -
- -Jump to: [top](#) - - -
-
-### Q: What is the best way to ask a question about the IOCCC rules, guideline and tools? -
-
- -We realise that the [IOCCC rules](next/rules.html), [IOCCC guidelines](next/guidelines.html) -and the [IOCCC mkiocccentry tools](https://github.com/ioccc-src/mkiocccentry) -can be confusing or even seem overwhelming to some people. - -The [IOCCC judges](judges.html) do welcome questions about the IOCCC -and will be **happy to help**. - -Chances are, if you have a question, there are a number of other people who -have similar questions. So we recommend first view the -[GitHub discussions for this repo](https://github.com/ioccc-src/winner/discussions) -so see if someone else asked already. Feel free to join in on such a discussion, -even if to just say: - -> I have this question too. - -Feel free to provide additional feedback in the existing discussion as needed. - -**BTW**: If your question is just about the -[IOCCC mkiocccentry tools](https://github.com/ioccc-src/mkiocccentry), please -view the [mkiocccentry repo discussions](https://github.com/ioccc-src/mkiocccentry/discussions) -instead. - -If you do not find a suitable open discussion, please consider opening a -[new IOCCC repo discussion](https://github.com/ioccc-src/winner/discussions/new/choose) with -your question. Doing this may be of help to others with a question similar to yours. - -**BTW**: If your question is just about the -[IOCCC mkiocccentry -tools](https://github.com/ioccc-src/mkiocccentry/discussions), and you do not -see a suitable open discussion over there, then please consider opening a -[new mkiocccentry discussion](https://github.com/ioccc-src/mkiocccentry/discussions/new/choose) -over there. - -If you do not feel, for some reason, comfortable asking your question in public -(although we hope you consider asking it in public for the benefit of others), -then use the [How to contact the IOCCC](contact.html) information to ask -a private question. - -**IMPORTANT**: When you ask your question (in public or as a private question) -**PLEASE** try to **NOT** discuss detailed information about any pending submission. -Try to ask for question in a more generic way as this will help others -with a similar question and this will not **give away** what you might be doing -with your submission. If the [IOCCC judges](judges.html) truly need more -information, they will ask (either in public or suggest a private conversation). - -Again, **please** don't hesitate to ask: Your question may be something that -others are wondering about as well! - -See also the -FAQ on "[rules, guidelines, tools feedback](#feedback)". - -Jump to: [top](#) - - -
-
-### Q: How can I comment or make a suggestion on IOCCC rules, guidelines and tools? -
-
- -The [IOCCC judges](judges.html) to welcome feedback on the [IOCCC -rules](next/rules.html), [IOCCC guidelines](next/guidelines.html) -and on the [IOCCC mkiocccentry tools](https://github.com/ioccc-src/mkiocccentry). - -To comment on the [IOCCC rules](next/rules.html) or the -[IOCCC guidelines](next/guidelines.html) please view the -[GitHub discussions for this repo](https://github.com/ioccc-src/winner/discussions). -If there is an on-going discussion that seems relevant to what you -have to say, consider adding comments to that particular discussion. -Otherwise consider opening a [new IOCCC repo -discussion](https://github.com/ioccc-src/winner/discussions/new/choose). - -To comment on [IOCCC mkiocccentry tools](https://github.com/ioccc-src/mkiocccentry), -please view the [mkiocccentry repo discussions](https://github.com/ioccc-src/mkiocccentry/discussions). -If there is an on-going discussion that seems relevant to what you -have to say, consider adding comments to that particular discussion. -Otherwise consider opening a [new mkiocccentry -discussion](https://github.com/ioccc-src/mkiocccentry/discussions/new/choose). - -Jump to: [top](#) - - - -
-
-### Q: How many submissions do the judges receive for a given IOCCC? -
-
- -By tradition, we do not say. - -Jump to: [top](#) - - -
-### Q: What types of entries have been frequently submitted to the IOCCC? -
- -There are types of entries that are frequently submitted to the IOCCC. -While we **do not wish to prevent** people from sending -a submission to the IOCCC on a frequently submitted theme, -we do wish to provide a **fair warning** to those who do. - - -#### Fair warnings on frequently submitted themes: - -**IMPORTANT HINT**: It is **not fatal** to send in those types of -entries, it is just **HARDER to win** with such a submission. A -submission on a frequently submitted theme will have to do something -in a **really unique AND interesting way** to even make it into the -final judging rounds. It will have to compete with previous IOCCC -winners based on the same theme. - -**IMPORTANT HINT**: If you really wish send in a submission on a -frequently submitted theme, be sure that it is obfuscated in several -new and novel ways. - -**IMPORTANT HINT**: Be sure to **clearly explain** near the beginning -of your `remarks.md` file, see the -FAQ on "[remarks.md](#remarks_md)", -**why you are submitting an entry based on a frequently -submitted theme** and **how compares with previous IOCCC winners** -of the same theme. - - -#### Examples of frequently submitted themes - - -##### Maze generator - -- [1985/shapiro](1985/shapiro/index.html) -- [1991/buzzard](1991/buzzard/index.html) -- [1995/cdua](1995/cdua/index.html) -- [1995/dodsond2](1995/dodsond2/index.html) -- [1998/bas1](1998/bas1/index.html) - - -##### Tic-Tac-Toe/Noughts and Crosses/Xs and Os game - -- [1991/westley](1991/westley/index.html) -- [1996/jonth](1996/jonth/index.html) -- [2020/carlini](2020/carlini/index.html) - - -##### Solitaire/Othello game - -- [1987/lievaart](1987/lievaart/index.html) -- [1994/dodsond1](1994/dodsond1/index.html) - - -##### Generating small primes (below is the list of all prime related winning entries) - -- [1985/august](1985/august/index.html) -- [1988/applin](1988/applin/index.html) -- [1994/weisberg](1994/weisberg/index.html) -- [1995/makarios](1995/makarios/index.html) -- [1996/dalbec](1996/dalbec/index.html) -- [2000/bellard](2000/bellard/index.html) - - -##### Self-reproducing program - -- [1990/scjones](1990/scjones/index.html) -- [1994/smr](1994/smr/index.html) - _do not claim your program is the smallest without seeing this entry_! -- [2000/dhyang](2000/dhyang/index.html) - _this entry set a high bar for entries of this theme_ - - -##### Entries that just print "Hello, world!" - -- [1984/anonymous](1984/anonymous/index.html) -- [1985/applin](1985/applin/index.html) -- [1986/applin](1986/applin/index.html) -- [1986/holloway](1986/holloway/index.html) -- [1989/jar.1](1989/jar.1/index.html) -- [1992/lush](1992/lush/index.html) -- [2000/tomx](2000/tomx/index.html) - - -##### Entries that use some complex state machine/table to print something - -- [1988/isaak](1988/isaak/index.html) -- [1988/phillipps](1988/phillipps/index.html) -- [2018/ciura](2018/ciura/index.html) -- [2018/giles](2018/giles/index.html) - - -##### ROT13 - -- [1985/sicherman](1985/sicherman/index.html) -- [1989/westley](1989/westley/index.html) -- [1990/dg](1990/dg/index.html) -- [1991/fine](1991/fine/index.html) - - -##### **pi** or **e** computation - -- [1986/august](1986/august/index.html) -- [1988/robison](1988/robison/index.html) -- [1988/westley](1988/westley/index.html) -- [1989/roemer](1989/roemer/index.html) - - -#### The above list of frequently submitted themes is not exhaustive - - -#### Some final thoughts on frequently used themes - -While it is possible to win a new IOCCC with one of these -**frequently submitted** types of entries, level of the competition from -previous IOCCC entries make it more challenging to be successful. - -It is also important to note that the [guidelines](next/guidelines.html) often -state something along the lines of: - -``` - We tend to dislike programs that: are similar to previous winning entries. -``` - -**FAIR WARNING**: Be sure to **clearly explain** near the beginning -of your `remarks.md` file, see the -FAQ on "[remarks.md](#remarks_md)", -**why you are submitting an entry based on a frequently -submitted theme** and **how compares with previous IOCCC winners** -of the same theme. - -Jump to: [top](#) - - -
-
-### Q: Why don't you publish submissions that do not win? -
-
- -Because the publication on the IOCCC site **_IS_** the award! -Anyone is free to put their IOCCC hopefuls, lookalikes and/or -entries that do not win on their web page for everyone to see. - -Jump to: [top](#) - -
-### Q: How much time does it take to judge the contest? -
- -It takes a fair amount of time to setup, run, respond to messages, process entries, -review entries, trim down the set entries to a set of winning entries, doing the -write-up of the entries, announcing the entries, reviewing final edits of the -winning entry set, posting the winning entries, being flamed :-), tell folks who send in -late entries to wait until the next contest, etc... It takes a few weekends and -a number nights of study and work ... which is hard given that we are busy with -many other activities as well. - -Note that we do not contact the author if an entry does not compile or does not -work as advertised; we might attempt to fix obvious compilation problems or -incompatibilities, but no more than that - so be sure that your entry does work -on at least a couple different platforms, at least one of them being UNIX or -SUS-conforming. See the -FAQ on "[SUS](#SUS)" -for more information. - -Jump to: [top](#) - -
-
-### Q: How many judging rounds do you have? -
-
- -Are you trying to trick us? :-) - -By tradition, we do not say how many judging rounds we have in a given IOCCC. - -We often report when the IOCCC judges start the 1st round, and then usually -report when the IOCCC judges start near final judging rounds, and sometimes we -also report when we enter what we believe is the final judging round, so you may -guess that we have at least 3 rounds. :-) The actual number of rounds is -certainly more than 3. - -Jump to: [top](#) - -
-
-
-### Q: Why do some IOCCC entries receive the Grand Prize or Best of Show award? -
-
-
- -In some years, the IOCCC judges discover a truly amazing IOCCC entry that -stands out among all of the other IOCCC entries received that year. -For such an IOCCC entry, the IOCCC judges award a "Grand Prize" -or "Best of Show award. - -In 1984-1987, the grand prize winning entries are: - -- [1984/mullender](years.html#1984_mullender) -- [1985/shapiro](years.html#1985_shapiro) -- [1986/wall](years.html#1986_wall) -- [1987/lievaart](years.html#1987_lievaart) - -Starting from 1988, the entry we liked the most in that year is called -"Best of Show". Here are the "Best of Show" entries: - -- [1988/applin](years.html#1988_applin) -- [1989/jar.2](years.html#1989_jar.2) -- [1990/theorem](years.html#1990_theorem) -- [1991/brnstnd](years.html#1991_brnstnd) -- [1992/vern](years.html#1992_vern) -- [1996/august](years.html#1996_august) -- [1998/banks](years.html#1998_banks) -- [2000/jarijyrki](years.html#2000_jarijyrki) -- [2020/carlini](years.html#2020_carlini) - - -In 1993, 1994 and 1995 the judges were unable to select a clear overall -winning entry. So to give a nod to the entry that had the highest approval ranking -from the judges, they used the following awards: - -- [1993/rince](years.html#1993_rince) - Most Well Rounded -- [1994/shapiro](years.html#1994_shapiro) - Most Well Rounded -- [1995/leo](years.html#1995_leo) - Best Use of Obfuscation - -These could be considered the 'best entry' for those years with 1 or -more other entries that came in close behind. - -Jump to: [top](#) - -
-
-
-### Q: How are winning IOCCC entries announced? -
-
-
- -Once the [IOCCC](index.html) closes, the judges will: - -* Judge the submissions. - -* Select the [winning entries](years.html) and announce them on the [@IOCCC -mastodon feed](https://fosstodon.org/@ioccc). - -* Notify the authors of entries that won the IOCCC via email using their previously -registered email address. - -* Announce who are authors of this year's winning IOCCC entries via the [@IOCCC mastodon -feed](https://fosstodon.org/@ioccc). - -* Upload the winning code to the [Official IOCCC winner -repo](https://github.com/ioccc-src/winner). - -* Update the [Official IOCCC website](index.html), and in particular -display this year's winning IOCCC entries at the top of the [IOCCC -winning entries page](years.html). This is done by updating this repo. - -* Update the [IOCCC news](news.html) page, also by updating this repo. - -Jump to: [top](#) - - - - - -
-## Section 3: The mkiocccentry toolkit: finer details -
- -Jump to: [top](#) -
-### Q: What sort of checks does the mkiocccentry tool perform? -
- -`mkiocccentry(1)` will check and warn about the following conditions: - -- If the files do not exist, are not regular files or cannot be read. -- If `prog.c` violates [Rule 2](next/rules.html#rule2) (see -[iocccsize.c](https://github.com/ioccc-src/mkiocccentry/blob/master/iocccsize.c)). -- If `prog.c` is empty. -- If `prog.c` has any high bit char (see -[iocccsize.c](https://github.com/ioccc-src/mkiocccentry/blob/master/iocccsize.c)). -- If `prog.c` has any NUL char (see -[iocccsize.c](https://github.com/ioccc-src/mkiocccentry/blob/master/iocccsize.c)). -- If `prog.c` has any unknown or invalid trigraph (see -[iocccsize.c](https://github.com/ioccc-src/mkiocccentry/blob/master/iocccsize.c)). -- If `prog.c` triggers a word buffer overflow (see -[iocccsize.c](https://github.com/ioccc-src/mkiocccentry/blob/master/iocccsize.c)). -- If `prog.c` triggers an `ungetc(3)` error (see -[iocccsize.c](https://github.com/ioccc-src/mkiocccentry/blob/master/iocccsize.c)). -- If the first rule in the `Makefile` is not `all`. -- If the `Makefile` does not have a `clean` rule. -- If the `Makefile` does not have a `clobber` rule. -- If the `Makefile` does not have a `try` rule. -- If the `remarks.md` is empty. - -Conditions that one must correct, and which `mkiocccentry(1)` will prompt until -they are correct, are: - -- Your _title_ is not in the range of 1 through `MAX_TITLE_LEN` chars (see -[limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). -- Your _title_ does not match the regexp `^[0-9a-z][0-9a-z._+-]*$`. -- Your _abstract_ is not between 1 and `MAX_ABSTRACT_LEN` chars -(see [limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). -- the author count is not 1 through `MAX_AUTHORS` (see -[limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). -- An author _name_ is not 1 through `MAX_NAME_LEN` chars (see -[limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). -- Duplicate author _name_. -- _Country code_ is invalid (not ISO 3166-1 2 character -codes). -- An _email_, if provided, is not in the format of `x@y` or -if `x` or `y` contain a `@`, are empty or if the total length is longer than -`MAX_EMAIL_LEN` (see [limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). -- A _URL_ or _alt URL_, if provided, does not start with `http://` -or `https://` or is longer than `MAX_URL_LEN` chars (see -[limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)) -or does not have anything after the `http://` or `https://`. -- A _mastodon handle_, if provided, is not in the form of -`@user@site` (i.e. starts with an `@`, has text following it and then another -`@` followed by more text and has no other `@`) or is longer than `MAX_MASTODON_LEN` (see -[limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). -- A _GitHub account_, if provided, does not start with an `@`, -has more than one `@` or is longer than `MAX_GITHUB_LEN` (see -[limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). -- An _affiliation_, if provided, is longer than -`MAX_AFFILIATION_LEN` (see [limit_ioccc.h](https://github.com/ioccc-src/mkiocccentry/blob/master/soup/limit_ioccc.h)). -- An _author handle_, if the default is not accepted, does -not match the regexp `^[0-9A-Za-z][0-9A-Za-z._+-]*$`. -- An _author handle_ is repeated. -- The output of `ls` on the submission directory is incorrect. - -Although the `mkiocccentry(1)` tool will verify everything for you, you may wish -to validate different parts individually with the different tools. As the -[rules](next/rules.html) state, each of these tools has a `-h` option. - -See the -FAQ on "[jparse](#jparse)", -the -FAQ on "[.auth.json](#auth_json)", -the -FAQ on "[.info.json](#info_json)", -the -FAQ on "[chkentry](#chkentry)", -the -FAQ on "[txzchk](#txzchk)" -and the -FAQ on "[fnamchk](#fnamchk)" -for more details on the tools that `mkiocccentry` either executes directly or -indirectly as part of the packaging process, especially if you wish to run one -or more of these tools manually. - -See also the [Guidelines](next/guidelines.html) and the [Rules](next/rules.html) -(and in particular [Rule 17](next/rules.html#rule17)). - -Jump to: [top](#) -
-
-
-### Q: FAQ 0.13 - How can I validate my submission tarball? -
-
-
- -The tool that validates submission tarballs can be obtained from the [IOCCC -mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry). The -`mkiocccentry` tool itself will run the validator **after** forming the tarball. -However, you may wish to manually validate the tarball. The tool that does this -is `txzchk`. - -If you wish to validate the tarball without running the `mkiocccentry(1)` tool, -for instance the tarball -`submit.12345678-1234-4321-abcd-1234567890ab-2.1720636351.txz` you can, after -installing the tools, do: - -``` - txzchk submit.12345678-1234-4321-abcd-1234567890ab-2.1720636351.txz -``` - -Assuming that the tarball exists and is valid, you should see no output. - -If you wish to see the contents, for instance like `mkiocccentry(1)` does, you -could do: - -``` - txzchk -v 1 submit.12345678-1234-4321-abcd-1234567890ab-2.1720636351.txz -``` - -As the [guidelines state](next/guidelines.html#txzchk), it is beyond the scope -of this document to discuss the many tests that `txzchk(1)` runs; if you must -know we refer you to the [source -code](https://github.com/ioccc-src/mkiocccentry/blob/master/txzchk.c). - -Jump to: [top](#) - -
-
-### Q: FAQ 0.14 - What is the `fnamchk` tool? -
-
- -This tool, which is in the [mkiocccentry -repo](https://github.com/ioccc-src/mkiocccentry), validates the directory name -of your submission. - -Rather than `mkiocccentry` running this tool manually, `txzchk`'s algorithm uses -the output of this tool. If you wish to validate your tarball filename manually, -you can do so. For instance: - -``` - fnamchk submit.12345678-1234-4321-abcd-1234567890ab-2.1720636351.txz -``` - -Assuming everything is OK, it would show: - -> `12345678-1234-4321-abcd-1234567890ab-2` - -See also the -FAQ on "[validating your submission tarball](#txzchk)" -for more information. - -Jump to: [top](#) - - - - -
-## Section 4: Compiling IOCCC entries -
- -Jump to: [top](#) - -
-
-### Q: What Makefile rules are available to build or clean up IOCCC entries? -
-
- -In general the best way to compile everything in an entry directory is to run: - -``` - make clobber all -``` - -If you wish to compile every entry for every year you should go to the top level -directory and run the same command as above, `make clobber all`. - -The `all` rule will build everything necessary except for the alternate -versions. Every Makefile has an `alt` rule but it will only do something if an -alternate version exists. To build all the entries along with any alternate code -you can do from the top level directory: - -``` - make clobber everything -``` - -If you wish to only build alternate code you can do: - -``` - make clobber alt -``` - -If you wish to not remove the entry binaries and only compile the additional alt -versions: - -``` - make alt -``` - -The following Makefile rules should be in all Makefiles: - -- all: build the entry programs (main program and any supplementary program) -- alt: build alternate code -- clobber: clean up object files and all binary files (except for those that are -not compiled) -- clean: a simpler version of `clobber` that only removes object files. `make -clobber` depends on `clean` so running `make clobber` will invoke `make clean`. -- everything: equivalent to `make all alt`. - -Are there any other rules? You tell us! - -The top level and the year (e.g. `1984/Makefile`, `1985/Makefile` etc.) -`Makefile`s recurse into the subdirectories for each entry so you can compile -individual entries, entries of a given year or all entries, based on what you -wish to do. - -NOTE about the above rules: the Makefile default assumes `cc` which might be a -gcc-based compiler, or a clang-based compiler, or some other compiler. Only by -forcing `CC=clang` or `CC=gcc` will one invoke a specific compiler to, say, -enable or disable additional warnings or flags. Even so different versions or -compilers might do different things, have different defects or other issues. -Note that the `Makefile`s check the `CC` variable by substrings so that if you -were to do something like `make CC=gcc=mp-12` it would register as `gcc`. - -Jump to: [top](#) - -
-
-### Q: Why don't certain IOCCC entries compile? -
-
- -Some entries that won the IOCCC, particularly entries from long ago, no longer compile on more -modern systems because the C language has evolved (i.e. the modern C compilers -are much more strict in what they accept as a valid program), or the entry -depended on operation system and library features that where common back then -but are different/missing today. - -Please see the other FAQs in this section as they might offer helpful -hints, especially in cases were something else needs to be installed. - -Please see the [bugs.html](bugs.html) file for details about known problems with IOCCC entries. In some cases you may be dealing with a problematic entry. In a few fun cases, the IOCCC does not compile by design! - -If you have a fix that makes a minimal impact to the entry, then -please consider submitting that change in the form of a pull request. -Please see -FAQ on "[fixing an entry](#fix_an_entry)". -See also the -FAQ on "[GitHub pull request](#pull_request)" -for more information about pull requests. - -In some cases alternative code has been added that does compile on some or most -systems. Check the write up for the entry for "alt" code and possible ways to -compile and run that code. In some cases we replaced the original code (but not -the `.orig.c` file!) with code that works for modern systems but one can view -the original code in the `.orig.c` files (sometimes the original code is also in -the directory as a `dirname.alt.c` or `prog.alt.c`). - -See the -FAQ on "[original source code](#original_source_code)" -for more information. - -It might also be worth noting that almost all entries, have been -fixed so that they can compile in modern systems though just because an entry -compiles does not mean it will run on your specific system. - -Jump to: [top](#) - -
-
-### Q: Why does an IOCCC entry fail to run on my 64-bit system? -
-
- -Unfortunately some older entries are non-portable and require 32-bit support or -32-bit binaries. A problem system here is macOS Catalina (10.15) as as of that -version macOS no longer supports 32-bit binaries. If the entry acts on a certain -type of binary, say ELF, then that will also be a problem depending on the -entry. For example [2001/anonymous](2001/anonymous/index.html) requires 32-bit -ELF binaries. - -There are a few example entries that require 32-bit binaries. We have tried -to note these in both the respective Makefiles and index.html files but it is -possible that some were missed. These entries are very likely in the -[bugs.html](bugs.html) file and we welcome any help in making an alternate version -for 64-bit systems. Many were fixed to work with modern systems but some are -supposed to only work with 32-bit systems so any updated version of these -entries should be an alternate version. - -Other entries like [2001/herrmann2](thanks-for-help.html#2001_herrmann2) -now work with 32-bit AND 64-bit systems. - -Please see the [bugs.html](bugs.html) file for the problematic entry -in question to see if the problem is known, and if a fix is wanted, -consider trying to port the code to a 64-bit system and submitting -a pull request with that change. Pull requests that fix such code -while trying to minimize the impact of any changes and preserving -the spirit of the original code are very welcome! Please see the -FAQ on "[fixing an entry](#fix_an_entry)" -for details. See also the -FAQ on "[GitHub pull request](#pull_request)" -for more information about pull requests. - -Jump to: [top](#) - -
-
-
-### Q: Why do some IOCCC entries fail to compile under macOS? -
-
-
- -If the entry requires gcc and you did not explicitly install gcc in macOS you -will not be able to run or use these entries. This is because macOS gcc is -actually clang, even `/usr/bin/gcc`. - -That being said many (if not most) of these entries have been fixed and some -others will be looked at, when found. - -In some cases the [bugs.html](bugs.html) file may note a known macOS problem -with an entry. Should you manage to port the entry, and assuming your changes -also attempt to preserve the original intent of the IOCCC entry, we would -encourage you to submit a pull request with your ported code. -Please see the -FAQ on "[fixing an entry](#fix_an_entry)" -for details. - -Jump to: [top](#) - -
-
-### Q: Why does clang or gcc fail to compile some IOCCC entries? -
-
- -Although we have fixed numerous entries to work with clang (sometimes in an alt -version but usually in the program itself) there are some that simply cannot be -fixed or if they are fixable they have not yet been fixed (and might or might -not ever be fixed). - -This is because clang has some defects where the args of `main()` are required to -be a specific type and some versions of clang allow only 1, 2 or 3 args, not 4, -to `main()`. In the case of types of args many were changed to the right type and -then what was `main()` became another function of the original `main()` type. - -At the same time some entries are not designed to work with clang. There might -be alternate code added at some point but at this point it is highly unlikely. - -`gcc` is far more forgiving. Nonetheless some entries no longer work or worked -with `gcc`. Some of these have been fixed (or in some cases partly fixed, much -like with `clang`) but there might be some that do not work with `gcc` or -`clang` or for that matter some other compiler. - -See if the problem is mentioned in [bugs.html](bugs.html). If you have a change -that fixes the problem (even if it just a change to the `Makefile`) that doesn't -negatively impact the entry too much, consider submitting that change in the -form of a pull request. Please see the -FAQ on "[fixing an entry](#fix_an_entry)". -See also the -FAQ on "[GitHub pull request](#pull_request)" -for more information about pull requests. - -Jump to: [top](#) - -
-### Q: What is this cb tool that is mentioned in the IOCCC? -
- -This was a C beautifier for Unix, both AT&T and Berkeley, but it seems to no -longer be available, code wise, except for Plan 9, but Plan 9 was never used for -judging the IOCCC. A Unix man page for `cb` -[still exists](https://www.ibm.com/docs/en/aix/7.3?topic=c-cb-command). - -Jump to: [top](#) - -
-
-
-
-### Q: An IOCCC entry messed up my terminal application, how do I fix this? -
-
-
-
- -The simplest way to do this is to type `reset`. If echo was disabled you can get -usually away with `stty echo`. Sometimes you can also get away with `stty sane`. -`reset` does the most but note that it will clear the screen; it is not the -clearing of the screen, however, that solves the problem, so `clear` will not -help. - -Jump to: [top](#) - -
-
-### Q: How do I compile and run an IOCCC entry that requires X11? -
-
- - -
-#### Generally, to compile and run an IOCCC entry that requires X11: -
- -You must have the X11 related include files and X11 libraries in order to -compile the IOCCC entry. In order to do this you will need to install Xorg and -related packages including development related packages. If you have macOS see -further down for different instructions. Otherwise: in particular you must: - -* Install the Xorg server. -* Configure the Xorg server for your graphics environment. -* Install a X11 terminal application. -* Start the Xorg server. -* Launch the X11 terminal application. -* Run the IOCCC entry in the X11 terminal application. - -By X11 terminal application we suggest one of: - -* [Gnome](https://www.gnome.org) terminal application -* [KDE](https://kde.org) terminal application -* `xterm(1)` terminal application - -See below for various system related hints that may be of help. - - -
-#### X.org server has been deprecated -
- -The Red Hat RHEL9.0 release notes state that [X.org Server is now -deprecated](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/9.0_release_notes/deprecated_functionality#deprecated-functionality_graphics-infrastructures). - -According to this [Linux for Devices tutorial on -XOrg](https://www.linuxfordevices.com/tutorials/linux/install-xorg-on-linux) as -of 2023 Mar 25: - - -> Recently, RHEL developers categorized [Xorg was put in the ‘deprecated’ -software](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/9.0_release_notes/deprecated_functionality), -as its development has mostly halted. Subsequent updates will completely replace -it with Wayland, a more modern windowing system.. Although Wayland is not fully -developed yet, many applications do not support it properly yet and screen -sharing might not work sometime, but it is the future. Fedora, also developed by -RHEL, has switched to a Wayland session as it’s default windowing system (And it -works flawlessly on my Laptop). - -See the [Wayland](https://wayland.freedesktop.org) website for more details. - -**IMPORTANT NOTE**: We do **NOT** know if IOCCC entries will run under -**Wayland**. Some IOCCC entries that use X11 might be OK while other IOCCC -entries that use X11 in an unusual way might fail under **Wayland**. - - -See the [Wayland FAQ](https://wayland.freedesktop.org/faq.html) for more -information. - -If your system uses **Wayland** and not X11, you might give the IOCCC entries -that use X11 a try. They might work but again we do not know. - -**IMPORTANT NOTE**: The [IOCCC judges](judges.html) **do not support IOCCC entries**. -See the -FAQ on "[no entry support](#no_support)". -So if an IOCCC entry that uses X11 fails under **Wayland**, and you wish to -provide a fix to the IOCCC entry so that it will run under **Wayland**, -then consider submitting a fix so that it will run under **Wayland**. -See the -FAQ on "[fixing an entry](#fix_an_entry)" -for more information. - -Basically: if you discover an entry does not work in Wayland you are welcome to -provide **alternate code** that works for Wayland. We will happily credit you in -the [thanks-for-help.html](thanks-for-help.html) file. - - -#### Red Hat based Linux - -First, see the -FAQ on "[general X11](#X11_general)". - -Install Xorg and related packages: - -``` - sudo dnf install --skip-broken --best --exclude xorgxrdp \ - --exclude xorgxrdp-glamor '*xorg*' 'libx*' 'libX*' 'fontconfig*' -``` - -See also: - -* [How to Configure X11 in Linux](https://www.wikihow.com/Configure-X11-in-Linux) - -**IMPORTANT NOTE**: The X.org server has been deprecated. -See the -FAQ on "[X.org deprecated](#Xorg_deprecated)" -for more information. - - -#### macOS - -First, see the -FAQ on "[general X11](#X11_general)". -However, for macOS, instead of installing the Xorg server, you need to install and launch -the [most recent XQuartz](https://www.xquartz.org) application -and then run the IOCCC entry from the [Xterm window -shell](https://en.wikipedia.org/wiki/Xterm). - -As an example we will use [1993/jonth](1993/jonth/index.html) which works -with macOS 14.2.1 (macOS Sonoma). - -First of all you will need to install the [most recent -XQuartz](https://www.xquartz.org), preferably on an [Apple supported version of -macOS, preferably the most recent version](https://support.apple.com/macOS). -After it is installed, open the "XQuartz" application (usually located in -`/Applications/Utilities/XQuartz.app`) by typing at the command line: - -``` - open /Applications/Utilities/XQuartz.app -``` - -With the "XQuartz" application open you will get an [X Window System -Manager](https://www.x.org/wiki/) launched with an [Xterm window -shell](https://en.wikipedia.org/wiki/Xterm) started: - -xterm-launch in macOS - -At this point you need to cd to the winning directory and compile it. For example: - -compiling an entry in xterm in macOS - -And then run the program as directed by the `index.html` file. For example with -`1993/jonth`: - -running 1993/jonth in macOS - -Note that you can compile the code in your regular terminal prior to opening -XQuartz, should you wish to. You can even run it from that terminal and it -should open XQuartz. - -**IMPORTANT NOTE**: The X.org server has been deprecated. -See the -FAQ on "[X.org deprecated](#Xorg_deprecated)" -for more information. - - -#### Debian based Linux - -First, see the -FAQ on "[general X11](#X11_general)". - -According to the [Debian Xorg wiki](https://wiki.debian.org/Xorg), installing -X11 requires: - -``` - sudo apt install xorg -``` - -**IMPORTANT NOTE**: The X.org server has been deprecated. -See the -FAQ on "[X.org deprecated](#Xorg_deprecated)" -for more information. - - -#### Other Linux distributions - -First, see the -FAQ on "[general X11](#X11_general)". - -For general documentation on installing X11, this [ServerGUI for -Ubuntu](https://help.ubuntu.com/community/ServerGUI), and in particular, these -may be helpful: - -* [X11 Client Installation](https://help.ubuntu.com/community/ServerGUI#X11_Client_Installation) -* [X11 Server Installation](https://help.ubuntu.com/community/ServerGUI#X11_Server_Installation) -* [Full Desktop Environments](https://help.ubuntu.com/community/ServerGUI#Full_Desktop_Environments) - -See also: - -* [How to Configure X11 in Linux](https://www.wikihow.com/Configure-X11-in-Linux) - -For systems that have the `dnf(1)` command: - -``` - sudo dnf install --skip-broken --best --exclude xorgxrdp \ - --exclude xorgxrdp-glamor '*xorg*' 'libx*' 'libX*' 'fontconfig*' -``` - -For systems that have the `yum(1)` command: - -``` - sudo yum install --skip-broken --best --exclude xorgxrdp\ - --exclude xorgxrdp-glamor '*xorg*' 'libx*' 'libX*' 'fontconfig*' -``` - -**IMPORTANT NOTE**: The X.org server has been deprecated. -See the -FAQ on "[X.org deprecated](#Xorg_deprecated)" -for more information. - - -#### Package website - -First, see the -FAQ on "[general X11](#X11_general)". - -See the [X.org](https://x.org/wiki/) foundation website. - -**IMPORTANT NOTE**: The X.org server has been deprecated. -See the -FAQ on "[X.org deprecated](#Xorg_deprecated)" -for more information. - -Jump to: [top](#) - -
-### Q: How do I compile and install SDL1 or SDL2 for entries that require it? -
- -This depends on your operating system but below are instructions for Linux and -macOS with alternative methods for macOS and different package managers with Linux. - - -#### Red Hat based Linux - -Execute the following as root or via sudo: - -``` - dnf install SDL2 SDL2-devel sdl12-compat sdl12-compat-devel -``` - -Older RHEL distributions might have to use "yum" instead of "dnf" -in the above command. - -In the past it was said that one might need to run `make` like: - -``` - make ... SDL2_INCLUDE_ROOT=/usr -``` - -or set the following environment variable: - -``` - export SDL2_INCLUDE_ROOT=/usr -``` - -but this might not be necessary in more modern days especially as we use -`sdl-config` and `sdl2-config` which should find the proper paths. - - -
-#### macOS -
- -If you're using macOS there are at least three ways to obtain it. You can -use Homebrew or MacPorts. If you do not wish to use either of those -package managers, you can always try to install via the package website. -For macOS we do recommend using Homebrew or MacPorts instead of using -the package website. - - -##### macOS via Homebrew - -If you have not already done so, install [Homebrew](https://brew.sh). - -Then to install SDL and SDL2, execute the following command: - -``` - brew install sdl2 sdl12-compat - eval "$(opt/homebrew/bin/brew shellenv)" -``` - - -##### macOS via MacPorts - -If you haven't already, install -[MacPorts](https://www.macports.org/install.php). Then run: - - -``` - sudo port install libsdl libsdl2 -``` - - -#### Debian based Linux - -Execute the following as root or via sudo: - -``` - apt install libsdl1.2debian libsdl1.2-dev libsdl2-dev -``` - -and then try `make all` again. - -In the past it was said that one might need to run `make` like: - -``` - make ... SDL2_INCLUDE_ROOT=/usr -``` - -or set the following environment variable: - -``` - export SDL2_INCLUDE_ROOT=/usr -``` - -but this might not be necessary in more modern days especially as we use -`sdl-config` and `sdl2-config` which should find the proper paths. - - -#### Other Linux distributions - -Use your package manager to install the appropriate packages. Try the search -feature of the package manager to determine which packages you need to install. -Note that you might have to install both the library and the developmental -packages: one for compiling and one for linking / running. - - -#### Package website - -Go to the [SDL website](https://www.libsdl.org) and follow their instructions -for downloading, installing and using SDL. - -We recommend trying a method suitable for your environment first, if possible. - - -#### NOTE: there might be extra SDL packages required - -In the case that some entries do not work even with SDL1/SDL2 installed it might -be that you need additional SDL libraries. See the entry's index.html for -details. If something is not noted you're welcome to report it as an issue or -fix it and make a pull request. - -See the -FAQ on "[GitHub pull request](#pull_request)" -for more information about pull requests. - -Jump to: [top](#) - -
-### Q: How do I compile and install (n)curses for entries that require it? -
- -This depends on your operating system but below are instructions for Linux and -macOS with alternative methods for macOS and different package managers with Linux. - - -#### Red Hat based Linux - -Execute the following as root or via sudo: - -``` - dnf install ncurses ncurses-devel -``` - - -#### macOS - -With macOS it should already be installed. If it is not you might have to do: - -``` - xcode-select --install -``` - -and agree to the terms and conditions and proceed with the install. - - -##### macOS via Homebrew - -Not applicable, see above. - - -##### macOS via MacPorts - -Not applicable, see above. - - -#### Debian based Linux - -Execute the following as root or via sudo: - -``` - apt install libncurses6 -``` - -and then try `make all` again. - - -#### Other Linux distributions - -Use your package manager to install the appropriate packages. Try the search -feature of the package manager to determine which packages you need to install. -Note that you might have to install both the library and the developmental -packages: one for compiling and one for linking / running. - - -#### Package website - -Go to the [ncurses website](https://invisible-island.net/ncurses/) and follow their instructions -for downloading, installing and using ncurses. - -We recommend trying a method suitable for your environment first, if possible. - -Jump to: [top](#) - -
-
-### Q: How do I compile and run an IOCCC entry that requires sound? -
-
- -This might depend on the entry but most likely the Swiss Army Knife of sound -processing programs, [SoX](https://sox.sourceforge.net), will work. How to -install depends on your OS. See below. - -After it is installed, you should be able to compile and use the program as -described in the index.html file. - -#### Red Hat based Linux - -As root or via sudo: - -``` - dnf install -y sox sox-devel -``` - -#### macOS - -For macOS there are two well known options. - -##### macOS via Homebrew - -If you have not already done so, install [Homebrew](https://brew.sh). - -Then to install SoX, execute the following command: - -``` - brew install sox - eval "$(opt/homebrew/bin/brew shellenv)" -``` - - -##### macOS via MacPorts - -If you haven't already, install -[MacPorts](https://www.macports.org/install.php). Then run: - - -``` - sudo port install sox -``` - - -#### Debian based Linux - -Usually the index.html file will explain how to use it under Debian so we do not -include this here, at least for now. - - -#### Package website - -Not applicable, see above. - - -#### Other Linux distributions - -Usually the index.html file will explain how to use it under Linux so we do not -include this here, at least for now. - - - - -Jump to: [top](#) - -
-### Q: Why do Makefiles use -Weverything with clang? -
- -While we know that use of `-Weverything` is generally not recommended -by `clang` C compiler developers, we do use the `-Weverything` -option in a certain case in IOCCC entry `Makefile`s. - -The use of `-Weverything` is limited to when one forces `CC=clang` or more -generally if the string 'clang' is in `$(CC)`. If `$(CC)` contains 'gcc' the -'gcc' specific options are run instead. - -Users with clang compilers are not required to set `CC=clang` or equivalent but -when they do, `-Weverything` is enabled with all of its challenges, pedantic -warnings, and sometimes warnings about things that do not matter, some of which -are frankly frivolous and often downright dubious. - -To enable this feature: - -``` - make clobber all CC=clang -``` - -IOCCC authors who have access to `clang` might wish to try their -hand at compiling with `-Weverything` while using a minimum of `-Wno-foo` -statements. Sometimes there is a technical or pedantic issue that -`-Weverything` warns about that would merit a change to your C code; often, -however, it is not even possible to fix let alone is it worth it. Of course -if you're running out of bytes due to rule 2[ab] one might not have much choice. -This is something that obfuscation authors simply sometimes have to deal with! - -If you try to minimize the number of `-Wno-foo` options needed with -`-Weverything`, please mention this in your remarks about the entry, as the -judges note you attempt to honor it (see also below). In some cases your -obfuscated code will issue warnings with `-Weverything` no matter what: the -`-Wno-poison-system-directories` is a common example of this but there are -others as well, sometimes depending on the version of `clang`. - -If you do try for a compile with `clang -Weverything`, keep on mind that while _your_ -compile environment might be warning free, a different clang version or a -different build environment might still have warnings. For instance the warning -set is different in macOS (which by default is `clang`: even when run as `gcc`!) -than Linux (due to versions and possibly other things)! - -Given that your entry **MUST** work as documented, you may be safer to -say that your entry keeps the number of warnings and `-Wno-foo` options while -compiling with `clang -Weverything` at a minimum. You might want to say the -version number and platform too as an extra safety net. Because if you claim zero -warnings, and we find a warning situation, this may diminish the value of your -entry as it is not as documented. Thus it might be wise to point this out and -if you can test it in multiple platforms (or versions of `clang`, see -below note) this would be advisable. - -**NOTE**: different versions of `clang` have other differences as well. For instance -a defect of `clang` that required numerous entries to be fixed for clang is that it -requires that `main()`'s arguments to be of a specific type. However some -versions of `clang` are more strict in the number of args allowed. These reasons -are part of why numerous entries had to be modified so that `main()` calls -another function instead of doing it all in `main()` (another reason was that -some entries that recursively called `main()` caused a crash or otherwise broke -the entry in modern systems). Some entries do not work in `clang` (or at least do -not work completely) due to these defects, for instance -[1989/westley](1989/westley/index.html); [Cody Boone -Ferguson](authors.html#Cody_Boone_Ferguson) was able to -get much of it to work and looking at that entry might be of value to your -submissions, at least if you can figure the code out :-). To see the -differences, try from `1989/westley`: - -``` - make diff_orig_prog -``` - -If you have `colordiff` try: - -``` - make DIFF=colordiff diff_orig_prog -``` - -Alternatively you can try: - -``` - git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..eb9e69fde657acc8c85a618a8a99af4c2f93b21d westley.c -``` - -As you can see, using `clang` has some additional problems to work out but if -you can get your entry to work well in `clang` it might very well be considered -better than other entries. - -Jump to: [top](#) - -
-
-
-### Q: How do I find out how to send interrupt/EOF etc. for entries that require it? -
-
-
- -For some entries one needs to send interrupt or EOF or some other signal/other -special characters. There are typical defaults like (where `^` = ctrl): - -- `^D` for EOF (`eof`) -- `^C` for interrupt (`intr`) -- `^U` for kill (`kill`) - -and various others. But if you don't know this you can find out through the -`stty(1)` command with the `-a` option. For instance with macOS you might see: - -``` - $ stty -a - speed 9600 baud; rows 40; columns 155; - intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; [..snip..] -``` - -If you know the name you can use `grep` to find the correct line and if your -implementation of `grep(1)` has the `-o` option you can filter it. For instance -to find what the `intr` is set to: - -``` - $ stty -a |grep -o 'intr = ^[[:alpha:]]' - intr = ^C -``` - -... assuming of course that it's a ctrl combination :-) If for some strange -reason it's not you might have to do something else including just piping it to -just `grep intr` or whatever. - -Jump to: [top](#) - -
-
-### Q: Why does an IOCCC entry fail to compile and/or fail to run? -
-
- -What may have worked years ago may not work well or work at all today. -Please note that the IOCCC judges do **NOT** support IOCCC entries. -Nevertheless, there may be a number of reasons why an IOCCC entry -may fail to compile or run well or fail to run on your system. - -In some cases the American National Standards Institute's ANSI C committee has -damaged the C standard to the point where perfectly valid C programs no longer -compile with modern compilers. As such some old IOCCC entries can no longer be -compiled with modern compilers (though a great deal of these were fixed in -2023). - -In some cases programs that may have worked on an old computer system -longer work on modern computers. Some IOCCC entries do not work well, -or no longer work on modern computers or modern operating systems, though again -a great deal of these were fixed for modern systems. - -Some IOCCC entries fail to compile under clang, or gcc. -Some IOCCC entries require operating system services that -may not be present on your system. - -In some cases the IOCCC entry simply has bugs or (Mis)features. - -If you are having problems compiling or running an IOCCC entry, -we recommend that you look in [bugs.html](bugs.html) to see if -there is a known bugs or (Mis)feature. In some cases what you -may think is a bug is actually an feature that was intentionally -written by the authors. In some cases the problem is well -known and we are looking for someone to attempt to fix it. - -In some cases there is an alternate version of the IOCCC entry -that you may wish to try. - -It also possible that you may have discovered a bug in a winning IOCCC -entry. If so, you are invited to try and fix the IOCCC entry and -submit that fix by way of a [GitHub pull -request](https://github.com/ioccc-src/winner/pulls). -Please see the -FAQ on "[fixing an entry](#fix_an_entry)" -for how to submit a fix to an IOCCC entry. - -Jump to: [top](#) - -
-### Q: FAQ 3.14 - How do I compile and install tcpserver for entries that require it? -
- -If your OS package manager does not have the package `tcpserver` you can -download, making sure you're in a temporary directory, and compile the source -like: - -``` - wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz - tar ucspi-tcp-0.88.tar.gz - cd ucspi-tcp-0.88 - make -``` - -Then as root or via `sudo(1)` enter: - -``` - make setup check -``` - -That will install it to `/usr/local/bin`. Now you should be able to use the -entry in question. - - -
-### 3.15 - How do I compile and install netpbm for entries that require it? -
- -This depends on your operating system for which we describe a couple below. - - -#### Red Hat based Linux - -Execute the following as root or via sudo: - -``` - dnf install netpbm-progs netpbm -``` - -Older RHEL distributions might have to use "yum" instead of "dnf" -in the above command. - - -#### macOS - - -If you're using macOS there are at least three ways to obtain it. You can -use Homebrew or MacPorts. If you do not wish to use either of those -package managers, you can always try to install via the package website. -For macOS we do recommend using Homebrew or MacPorts instead of using -the package website. - - -##### macOS via Homebrew - -If you have not already done so, install [Homebrew](https://brew.sh). - -Then to install netpbm, execute the following command: - -``` - brew install netpbm -``` - - -##### macOS via MacPorts - -If you haven't already, install -[MacPorts](https://www.macports.org/install.php). Then run: - - -``` - sudo port install libnetpbm netpbm -``` - - -#### Debian based Linux - -Execute the following as root or via sudo: - -``` - apt install netpbm -``` - -and then try `make all` again. - - -#### Other Linux distributions - -Use your package manager to install the appropriate packages. Try the search -feature of the package manager to determine which packages you need to install. -Note that you might have to install both the library and the developmental -packages: one for compiling and one for linking / running. - - -#### Package website - -Go to the [netpbm website](https://netpbm.sourceforge.net) and follow their instructions -for downloading, installing and using netpbm. - -We recommend trying a method suitable for your environment first, if possible. - - -
-### 3.16 - How do I compile and install libjpeg-turbo for entries that require it? -
- -This depends on your operating system for which we describe a couple below. - - -#### Red Hat based Linux - -Execute the following as root or via sudo: - -``` - dnf install libjpeg-turbo-utils libjpeg-turbo-devel libjpeg-turbo -``` - -Older RHEL distributions might have to use "yum" instead of "dnf" -in the above command. - - -#### macOS - -If you're using macOS there are at least three ways to obtain it. You can -use Homebrew or MacPorts. If you do not wish to use either of those -package managers, you can always try to install via the package website. -For macOS we do recommend using Homebrew or MacPorts instead of using -the package website. - - - -##### macOS via Homebrew - -If you have not already done so, install [Homebrew](https://brew.sh). - -Then to install libjpeg-turbo, execute the following command: - -``` - brew install libjpeg-turbo -``` - - -##### macOS via MacPorts - -If you haven't already, install -[MacPorts](https://www.macports.org/install.php). Then run: - - -``` - sudo port install libjpeg-turbo libjpeg-turbo-devel -``` - - - -#### Debian based Linux - -Execute the following as root or via sudo: - -``` - apt install libturbojpeg0 libturbojpeg0-dev -``` - -and then try `make all` again. - - -#### Other Linux distributions - -Use your package manager to install the appropriate packages. Try the search -feature of the package manager to determine which packages you need to install. -Note that you might have to install both the library and the developmental -packages: one for compiling and one for linking / running. - - -#### Package website - -Go to the [libjpeg-turbo website](https://www.libjpeg-turbo.org) and follow their instructions -for downloading, installing and using libjpeg-turbo. - -We recommend trying a method suitable for your environment first, if possible. - - -
-### 3.17 - How do I compile and install ImageMagick for entries that require it? -
- -This depends on your operating system for which we describe a couple below. - - -#### Red Hat based Linux - -Execute the following as root or via sudo: - -``` - dnf install ImageMagick -``` - -Older RHEL distributions might have to use "yum" instead of "dnf" -in the above command. - - -#### macOS - -If you're using macOS there are at least three ways to obtain it. You can -use Homebrew or MacPorts. If you do not wish to use either of those -package managers, you can always try to install via the package website. -For macOS we do recommend using Homebrew or MacPorts instead of using -the package website. - - -##### macOS via Homebrew - -If you have not already done so, install [Homebrew](https://brew.sh). - -Then to install ImageMagick, execute the following command: - -``` - brew install ImageMagick -``` - - -##### macOS via MacPorts - -If you haven't already, install -[MacPorts](https://www.macports.org/install.php). Then run: - - -``` - sudo port install ImageMagick -``` - - -#### Debian based Linux - -Execute the following as root or via sudo: - -``` - apt install imagemagick -``` - -and then try `make all` again. - - -#### Other Linux distributions - -Use your package manager to install the appropriate packages. Try the search -feature of the package manager to determine which packages you need to install. -Note that you might have to install both the library and the developmental -packages: one for compiling and one for linking / running. - - -#### Package website - -Go to the [ImageMagick website](https://imagemagick.org) and follow their instructions -for downloading, installing and using ImageMagick. - -We recommend trying a method suitable for your environment first, if possible. - - -
-### 3.18 - How do I compile and install OpenGL for entries that require it? -
- -This depends on your operating system for which we describe a couple below. - -In general OpenGL needs X11 to be installed and the X Window Server to be running. See the -FAQ on "[X11](#X11)" -for general information about X11. - -Once X11 is install and the X Window Server is running, one needs to compile -and link with the two libraries, _GL_ and _GLU_: - -``` - cc ... -lGL -lGLU -L _location-where-X11-libs-are-installed_ -lX11 -``` - -**NOTE**: The OpenGL development effort is being managed by [vulkan.org](https://vulkan.org). -We suggest you check out their resource for further information on OpenGL. - - -#### Red Hat based Linux - -Execute the following as root or via sudo: - -``` - sudo dnf install glew-devel SDL2-devel SDL2_image-devel glm-devel freetype-devel -``` - -See [OpenGL Programming/Installation/Linux](https://en.wikibooks.org/wiki/OpenGL_Programming/Installation/Linux) for details. - -Older RHEL distributions might have to use "yum" instead of "dnf" -in the above command. - - -#### macOS - -In the past, macOS has come with OpenGL pre-installed. However as of macOS 10.14, -[OpenGL has been deprecated on macOS](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_intro/opengl_intro.html) (in favor of Metal). - -As long as Apple continues to ship OpenGL pre-installed and it works, you -should be able to go. However in Apple drops support for OpenGL later on, -you might look to install OpenGL via Homebrew or MacPorts. - - -#### Debian based Linux - -Execute the following as root or via sudo: - -``` - sudo apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev -``` - -and then try `make all` again. - -See [OpenGL Programming/Installation/Linux](https://en.wikibooks.org/wiki/OpenGL_Programming/Installation/Linux) for details. - - -#### Other Linux distributions - -Use your package manager to install the appropriate packages. Try the search -feature of the package manager to determine which packages you need to install. -Note that you might have to install both the library and the developmental -packages: one for compiling and one for linking / running. - - -#### Package website - -Go to the [Vulkan website](https://vulkan.org) and follow their instructions -for downloading, installing and using OpenGL. - -We recommend trying a method suitable for your environment first, if possible. - - -
-
-
-### 3.19 - What kind of make(1) compatibility does the IOCCC support and will it support other kinds? -
-
-
- -For the [IOCCC](https://www.ioccc.org) [mkiocccentry submission -toolkit](https://github.com/ioccc-src/mkiocccentry) and the [winning IOCCC -entries](years.html) we support *ONLY* GNU Makefile syntax. This means that if -you only have Cygwin or a BSD `make(1)` (often `bmake(1)`) or some other -`make(1)` utility the Makefiles we use will not be compatible. - -We do not intend on supporting anything but the GNU `make(1)` utility so if you -do not currently have it installed you will have to do that in order to compile -entries for the IOCCC. If you are submitting an entry this will also be -necessary. - -If you do not have GNU `make(1)` you might look for `gmake` as that is what it -often is packaged as. Then you can use `gmake` instead. For instance if you go -to the top level directory of the winner repo you can do: - -``` - gmake -``` - -In the case that the Makefile uses the `MAKE` variable you will have to override -it like: - -``` - gmake MAKE=gmake -``` - -though of course for both you may specify a rule or rules to run. - - -
-
-### 3.20 - How do I download individual winning entries or all winning entries of a given year? -
-
- -Although one can clone the entire [winner -repo](https://github.com/ioccc-src/winner) to get the entire website and all -entries, we also provide, as a convenience, a way to download individual entries -as well as a way to download a year's winning entries. - -Please note that some of the links in the html files will not work! This is -because you are not downloading the full website. If you want to view the entry -with links intact you should clone the repo or view it on the [official IOCCC -website](https://www.ioccc.org) instead. - - -#### Individual winning entry tarballs - -The individual entry tarballs are named in the form of -`YYYY/winner/YYYY_winner.tar.bz2` (e.g. -[1984/mullender/1984_mullender.tar.bz2](1984/mullender/1984_mullender.tar.bz2)) -and they contain a single entry as well as some additional necessary files. Each -entry tarball is linked to in its `index.html` (e.g. -[1984/mullender/index.html](1984/mullender/index.html)) manifest, listed in the -_Secondary files_ list. - -These tarballs will have the following files: - -- `ioccc.css` - stylesheet for the html files -- `var.mk` - the top level Makefile included by all the other Makefiles that holds variables used by the Makefiles -- `YYYY/winner/.path` - directory path from top level directory -- `YYYY/winner/.entry.json` - entry summary and manifest in JSON -- `YYYY/winner/.gitignore` - list of files that should not be committed under git - -plus the winning entry files like source code, the Makefile, supplementary data -provided by the author and any other file in the winning entry, found under the -entry's subdirectory. - -If you downloaded `1984/mullender/1984_mullender.tar.bz2`, for instance, you might -then do: - -```sh - cd 1984/mullender - make everything - ./mullender.alt -``` - -to compile all versions and then run the alternate version (if you have -a PDP-11 or VAX-11 you would be able to run the original version). For more help -on compiling entries, see also the -FAQ on "[IOCCC Makefile rules](#make_rules)". - -If you want to view the `index.html` file you can point your browser to the -`index.html` file of the winning entry (e.g. `1984/mullender/index.html`) with the -caveats noted above. - - -#### Year based tarballs - -The year based tarballs, which are under each year's directory and are named in -the form of `YYYY/YYYY.tar.bz2` (e.g. [1984/1984.tar.bz2](1984/1984.tar.bz2)), -include all the winning entries of a given year. -Each year's tarball can be found under that year in the [years.html](years.html) -page and in the year's `index.html` as well (e.g. -[1984/index.html](1984/index.html)). - -These tarballs have, along with each entry's directory and their respective -files (as if you downloaded each entry tarball of the year individually as -described above), the following files: - -- `.filelist` - list of files in the year that are not part of a winning entry of the year, including the `YYYY.tar.bz2` tarball -- `index.html` - the `YYYY/index.html` file rendered from the `YYYY/README.md` file -- `Makefile` - Makefile for the year to compile etc. all entries of the year -- `README.md` - the source of the `YYYY/index.html` file -- `rules.txt` - rules of the year's contest -- `.year` - text file that has a list of the winning entries' directories of the year - - -Additionally, some will have extra files like: - -- `.gitignore` - list of files that should not be committed under git -- `guidelines.txt` - the guidelines of the year -- `iocccsize.c` - `iocccsize` tool of the year -- `iocccsize.mk` - Makefile to compile the `iocccsize` tool of the year -- `iocccsize-test.sh` - test suite for the `iocccsize` tool - -.. and perhaps some others we have neglected to mention as well. - -If you extract a year's tarball you can `cd YYYY` (e.g. `cd 1984`) and then run -`make everything` to compile the entries and alternate code of every entry, as -if you switched to each entry's directory and ran `make everything` in each one. - -If you download the 1984 tarball, i.e. `1984/1984.tar.bz2`, then you might -extract it and then switch to the directory and compile everything of each -entry: - -```sh - cd 1984 - make everything -``` - -For more help on compiling entries, see also the -FAQ on "[IOCCC Makefile rules](#make_rules)". - -Of course in this case you can also switch to individual entries and look at the -`index.html` file (or any other file in the entry) and try out the entries that -interest you, as if you downloaded that entry's individual tarball. - -If you want to view the `index.html` files of that tarball, for instance the -year's `index.html` file and then `1984/mullender/index.html` you could point your -browser to `1984/index.html`, scroll down to `Winning Entries of 1984 - The 1st -IOCCC` and click on the link `1984/mullender` which will take you to the -`index.html` file. Of course the caveats listed above still will apply. - - -
-### 3.21 - What are `try.sh` and `try.alt.sh` scripts and why should I use them? -
- -A lot of the entries, old and otherwise, have complicated uses or, if not -complicated uses, it has numerous uses (sometimes both), and having a script -that automates these for viewers improves the usability of these entries so one -can enjoy them better. - -The `try.sh` script is for the original entry and the `try.alt.sh` script is for -alternate versions. These scripts are usually for the `Try:` and `Alternate -try:` sections in the `index.html` files. - -Some entries provide additional scripts that are meant to run the entry as well -but might not fit in the `try` model though some are used by a `try.sh` / -`try.alt.sh` script. - -Although you're certainly welcome to copy and paste or type the commands in -manually, sometimes the scripts will do additional things that you might miss -and there are some other benefits as well which you would miss if you did not -use them. Nevertheless, if you prefer to do it manually, whether to help you -process or appreciate the entry more, then please do so. - -Jump to: [top](#) - - -
-
-### 3.22 - Are there any compiler warnings that I should not worry about? -
-
- -There are unfortunately some warnings that cannot be disabled; they are always -enabled whatever warning options you have enabled. Also, there is a warning that -is enabled whenever you act on `char *`s, saying it is unsafe buffer usage, even -when it's not (this might be enabled by `-Weverything` but it might not be; for -more details on why we use `-Weverything` in Clang see the FAQ on -"[`-Weverything`](#weverything)"), and it is not detrimental to your submission -if you disable this. This warning happens to be `-Wno-unsafe-buffer-usage`. - -So in short, no you should not worry about these as they are sometimes -inevitable in obfuscated code and even non-obfuscated code. - -If you *can* work past this it might be good but this is not something that -should be worried about too much as this is on the compiler developers, not you. - - -Jump to: [top](#) - -
-### Q: How do I compile and install zlib for IOCCC entries that require it? -
- -This depends on your operating system but below are instructions for Linux and -macOS with alternative methods for macOS and different package managers with Linux. - - -#### Red Hat based Linux - -Execute the following as root or via sudo: - -``` - dnf install zlib -``` - - -#### macOS - -With macOS it should already be installed. If it is not you might have to do: - -``` - xcode-select --install -``` - -and agree to the terms and conditions and proceed with the install. - - -##### macOS via Homebrew - -Not applicable, see above. - - -##### macOS via MacPorts - -Not applicable, see above. - - -#### Debian based Linux - -Execute the following as root or via sudo: - -``` - apt install zlib1g zlib1g-dev -``` - -and then try `make all` again. - - -#### Other Linux distributions - -Use your package manager to install the appropriate packages. Try the search -feature of the package manager to determine which packages you need to install. -Note that you might have to install both the library and the developmental -packages: one for compiling and one for linking / running. - - -#### Package website - -Go to the [zlib website](https://www.zlib.net) and follow their instructions -for downloading, installing and using zlib. - -We recommend trying a method suitable for your environment first, if possible. - -Jump to: [top](#) - -
-### Q: How do I install Ruby for entries that require it? -
- -Please see the [official Ruby installation -guide](https://www.ruby-lang.org/en/documentation/installation/). - -Jump to: [top](#) - -
-### Q: How do I install rake for entries that require it? -
- -First, if `gem` is not installed, see the [gem GitHub repo -](https://github.com/rubygems/rubygems). - -Assuming you have `git(1)` installed, you can do: - -``` - git clone https://github.com/rubygems/rubygems - cd rubygems && exe/gem install rake -``` - -Otherwise, you can download the zip file, extract it, cd to the directory and -then run: - -``` - exe/gem install rake -``` - -Once this is done, try as root or via `sudo`: - -``` - gem install rake -``` - -Jump to: [top](#) - - -
-## Section 5: Dependencies for some IOCCC entries -
- -Jump to: [top](#) - - - -
-## Section 6: Problems compiling IOCCC entries -
- -Jump to: [top](#) - - - - -
-## Section 7: Running IOCCC entries -
- -Jump to: [top](#) - - - - -
-## Section 8: Changes made to IOCCC entries -
- -Jump to: [top](#) - - -
-
-### Q: Why were some calls to the libc function gets(3) changed to use fgets(3)? -
-
- -Some may wonder: "Doesn't this tamper with the entry too much?" - -A fine line indeed has to be drawn here but it was decided that it is worth it -because of alarming warnings that can be displayed, in some systems at runtime -interspersed with the output of the program. - -For instance in macOS the entry [1990/tbr](1990/tbr/index.html) would output the -warning in such a way that caused confusing output for the entry, looking like: - -``` - $ ./tbr - $ warning: this program uses gets(), which is unsafe. - # nothing here, what to do? -``` - - -In some cases it is not possible to fix or at least it is highly unlikely and so -those have mainly not been touched except one that has had the buffer size -increased (which could be done for others that are not possible to change to -`fgets()` though this has not been done). - -Some entries can be made to look almost identical to the original entry. For -instance the fix to [1988/reddy](1988/reddy/index.html) required only a single -`#define` be added. - -In the cases it has not been done it is likely the entry can be found in the -[bugs.html](bugs.html) file. - -In the future we, the judges, would prefer that entries use `fgets()` to prevent -these problems. - -An annoying fact is that for '"compatibility" reasons' `fgets()` retains the -newline and `gets()` does not. As the Unix version 7 man page used to say: - -> **BUGS** -> -> The _fgets(3)_ function retains the newline while _gets(3)_ does not, all -in the name of backward compatibility. - -We're not sure how this is compatibility but either way it can cause a -problem and it is this that has complicated most of the fixes though again some -can look almost identical. - -Jump to: [top](#) - - -
-
-### Q: How can I find out what was changed in an IOCCC entry source code? -
-
- -We have set up make rules to easily do see what was changed in the winning IOCCC -entry source. Using the `Makefile` in the entry directory, use -one of the following `make(1)` rules: - -The following `make` rules exist to make a difference: - -* `make diff_orig_prog`: - - This rule will show the diff of the _original_ source to the - current source (that is `entry.orig.c` to `entry.c`). -* `make make diff_alt_orig`: - - This rule will show the diff of the alternate code to the original - code (that is `entry.alt.c` to `entry.orig.c`). If no alternate code exists - nothing will be shown. -* `make diff_alt_prog`: - - This rule will show the diff of the alternate code to the entry as it - stands (that is `entry.alt.c` to `entry.c`). -* `make diff_orig_alt`: - - This rule will show the diff of the original code to the alternate code - (that is `entry.orig.c` to `entry.alt.c`). -* `make diff_prog_alt`: - - This rule will show the diff of the entry to the alternate code (that is - `entry.c` to `entry.alt.c`). -* `make diff_prog_orig`: - - This rule will show the diff of the entry to the original code (that is - `entry.c` to `entry.orig.c`). - -For instance one of Landon's all time favourite entries is -[1984/mullender](1984/mullender/index.html) so the file names would be: -`mullender.orig.c`, `mullender.alt.c` and `mullender.c`. For later years, it -would be instead `prog.orig.c`, `prog.alt.c` and `prog.c`. - -Note that you might see something like: - -``` - make: [Makefile:170: diff_orig_prog] Error 1 (ignored) -``` - -at the end of the output but this is completely normal if there are differences. - -If the alternate code is the same as the original, say with -[1984/anonymous](1984/anonymous/index.html), then naturally there is no point in -running the rule and the same applies for all the other rules but this system -allows for easily seeing the diffs. - -As some examples we'll first look at one that has really long lines which -will make it harder to see what is different, -[2001/anonymous](2001/anonymous/index.html). What you would do is `cd -2001/anonymous` and then do: - -``` - make diff_orig_prog -``` - -and then be really confused! :-) - -But for an entry like [1991/dds](1991/dds/index.html), you can see the -differences much more easily. `1991/dds` is a good example where it's very -simple to see what is different as it's just a couple lines. - -You might be quite surprised how little some entries had to be changed and at -the same time how much other entries had to be changed, often with quite complex -differences! In some cases if the line is rather long, like the above mentioned -one, it will be harder to see what changed but in other cases like -[1984/decot](1984/decot/index.html) or [1986/wall](1986/wall/index.html) it's a -lot easier. - -Well, at least it's easier see the differences on a line-by-line basis but maybe -not what actually changed, especially since it's easier to know what was fixed -when you have compiler errors :-) (though there are, as noted, some examples -where it's quite easy to see the differences). - -[1991/dds](1991/dds/index.html) is also a good example to see the alt difference -very easily. To do that `cd 1991/dds` and then do: - -``` - make diff_alt_prog -``` - -and you'll see a single line changed and very simply. - -**NOTE**: The above mentioned `make` rules are located in the [1337.mk](%%REPO_URL%%/1337.mk) -include Makefile via the optional include directive line: - -``` - -include 1337.mk ../1337.mk ../../1337.mk -``` - -The [1337.mk](%%REPO_URL%%/1337.mk) file must exist in the current -directory, or under the directory above, or under the directory 2 levels -above in order for these rules to work. - - -#### Tip: if you have `colordiff` installed it's a lot easier to see the differences - -To use these rules but provide a different `diff`, for instance `colordiff`, -just do: - -``` - make DIFF=colordiff diff_orig_prog # for orig to prog diff - make DIFF=colordiff diff_alt_prog # for alt to prog diff -``` - -Obviously if you want to view the alternate code or the orig code you can just open -the files as described above. - -See the -FAQ on "[original source code](#original_source_code)" -for more information. - -Jump to: [top](#) - - -
-
-### FAQ 4.3 - Why do author remarks sometimes not match the source and/or why are there other inconsistencies with the original entry? -
-
- -Because some entries had to be fixed for modern systems and often the fixes -required a change in code, sometimes significant changes. Thus the remarks can -be inconsistent in some cases. - -This is why we recommend that when you read the remarks, sometimes the judges' -remarks and always the author's or authors' remarks, you look at the original -code. When the entry source code is called `prog.c` the original code is in -`prog.orig.c`; otherwise it is `dirname.orig.c`. For instance one of Landon's all -time favourite entries is [1984/mullender](1984/mullender/index.html) and the -original code is in [mullender.orig.c](%%REPO_URL%%/1984/mullender/mullender.orig.c). In -some cases, such as `1984/mullender`, the original code is the same as the code -as no changes were made (there is an alt version for systems that are not -VAX-11/PDP-11, however). - -See the -FAQ on "[original source code](#original_source_code)" -and the -FAQ on "[entry source code changes](#what_changed)" -for more information. - -Jump to: [top](#) - - -
-### Q: What is the meaning of the file ending in .orig.c in IOCCC entries? -
- -Due to the fact that the original code has sometimes had to change these files -are the original winning entry or as close to as possible to the original that -we can find (in some cases a change was made by the Judges, for example, or an -author might have made a modification without saving the original). - -Jump to: [top](#) - - -
-
-### Q: What are alternate versions and why were alternate versions added to some entries when the original entry worked fine and well? -
-
- -The alternate versions are exactly what they sound like, versions of their -respective entries that were not the winning source code but have additional -features added (often by the author) or fixes, updates at the request of the -judges (upon winning the contest), unobfuscated versions and a variety of other -things for instance letting it work on more than one platform (where it would -not be possible to do in the original submission). - -In some cases the alternate code added come directly from the author (some of -which already were in the website) but there were other cases where alternate -code was added that might or might not be necessary; this was a judgement call -and the reasons vary. - -In many cases it was simply to make the entry more presentable to more people -but without modifying the entry itself, which would be tampering with the entry -(a problem that we tried to avoid as much as possible although we certainly did -not manage to do this perfectly), and in some cases it would be changing it so -much that it would no longer be what was submitted. - -In one case an alternate version was created to help locate and fix a bug that -prevented the entry from working properly and it seemed like it should be added -as well, for fun (it is a game). - -In some cases it might be better to not have them but as noted this was a -judgement call. - -See also the -FAQ on "[original source code](#original_source_code)" -for more information. - -Jump to: [top](#) - - -
-
-### Q: Why was arg count and/or type changed in main() in some older entries? -
-
- -There are a number of reasons this was done but they usually come down to a -mis-feature or defect in the `clang` compiler. - -In all versions of `clang` the first arg must be an `int` and the rest must be a -`char **` but in some versions it also objects to the number of args in -`main()`. In the versions observed that complain about the number of args it -says that there must be 0, 2 or 3 args. This only was triggered with 4 args, not -1, but to future proof the entry entries that had only one arg to `main()` were -changed to two. - -The above also meant that some entries that were recursive calls to `main()` -could no longer be so: `main()` instead had to call another function that has -the body of the old `main()` and that function would call itself again. In some -cases, however, this had to be done even without `clang` objections. - -Jump to: [top](#) - - -
-### Q: Why were some filenames changed? -
- -The reasons this was done varies. One of the earliest changes was making the old -`.hint` or `.text` files `README.md` files. The first time this was done was for -`2019/README.text` and `2020/README.text` with [commit -87c41a787fa334f6696ec8f23284eacea63e3e89](https://github.com/ioccc-src/temp-test-ioccc/commit/87c41a787fa334f6696ec8f23284eacea63e3e89). -With [commit -77fb0f11a2ddc8584a1ebe8d68fb0cccf3b959a6](https://github.com/ioccc-src/temp-test-ioccc/commit/77fb0f11a2ddc8584a1ebe8d68fb0cccf3b959a6)`index.html` -and `hint.html` files were removed in favour of `README.md` files; -[commit -851e191519953c743cdd363dc19099e89210319c](https://github.com/ioccc-src/temp-test-ioccc/commit/851e191519953c743cdd363dc19099e89210319c) -renamed `hint.txt` and `hint.text` to `README.md`. There were most likely other -commits that fixed some issues with this. - -Other files were also renamed, though, sometimes being converted to markdown as -well. Shell scripts were often renamed to end with `.sh` to indicate it is a -shell script and to help browsers know how to deal with it (this was before the -method of how to display files was devised). - -Another example is for more consistency, sometimes to do with alternate code and -other times something else. - -There were certainly other reasons as well. - -Jump to: [top](#) - - -
-
-
-
-### Q: Why were files added to, removed from or changed in some entries? -
-
-
-
- -Like with files being renamed, there are multiple reasons files were added, -removed or changed. The addition of the `try.sh` and `try.alt.sh` scripts is the most -significant example of files being added. These scripts, -help demonstrate entries by automating commands, sometimes many -commands and not always simple commands, that one would previously have to run -manually (there are other benefits as well). - -See the -FAQ on "[try.sh and try.alt.sh](#try)" -for more details. - -Alternate code, sometimes provided by the author, sometimes provided by the -judges and sometimes other people, was added to some entries as well. - -In the case that a link might end up with a 404 the files, if possible, were -downloaded and put into the entry's directory. Sometimes the links were already -dead but with the help of the Internet Wayback Machine we could get the files -back. - -In a few cases files were removed and there are multiple reasons for this too. - -The end result is to help improve the presentation of the entries in some way or -ways. - -Jump to: [top](#) - - -
-
-###- What is the original source file? -
-
- -Every entry has what is called the "**original source file**". This is -a copy of the original source code (usually `prog.c`) that the -[IOCCC judges](judges.html) used when declaring that submission is a -winning IOCCC entry. - -There are a number of reasons why the source code (usually `prog.c`) needs -to be modified. Reasons include things such as: - -* modification as requested by the [IOCCC judges](judges.html) -* modification as requested by the author(s) -* modification as requested by a pull request from [someone else](thanks-for-help.html) -* bug fix -* portability improvement -* etc. - -We seek to preserve the "**original source file**", for historical purposes, -by preserving the original source code (usually as `prog.orig.c`). - -**IMPORTANT NOTE**: The "**original source file**", because it is a historic -record, should **NOT** be modified. - -Unless one can demonstrate that a mistake has been made regarding -the "**original source file**" and that, for some reason, the file -is **NOT** the original source code, please do **NOT** attempt to modify it. - -**IMPORTANT NOTE**: If you believe that the "**original source file**" is -**NOT** the original source code, then plesse open an -[IOCCC issue](https://github.com/ioccc-src/winner/issues) and describe the -problem to the [IOCCC judges](judges.html), including what you believe -is the correct "**original source file**". - -**FYI**: To determine the difference between the "**original source file**" and -the source code as it is now now, try: - -``` - make diff_orig_prog -``` - -See the -FAQ on "[what changed](#what_changed)" -for more information and make rules relating to "**original source file**" differences. - -Jump to: [top](#) - - - - -
-## Section 9: Helping the IOCCC -
- -Jump to: [top](#) - - -
-
-### Q: How can I help the IOCCC? -
-
- -#### We welcome your help in fixing IOCCC entries - -The [known bugs](bugs.html) file, order by IOCCC years, contains a -list of known bugs & (mis)features. If you are looking for an IOCCC entry -to try and fix, this file is a good place to start. - -See the -FAQ on "[fixing an entry](#fix_an_entry)" -for information on how to submit a fix to -an IOCCC entry. Before you consider trying to fix an IOCCC winning entry, -please check the [known bugs](bugs.html) file for the IOCCC entry -in question. Note that in several cases what you may have discovered, -while a (mis)feature is not considered a bug and should **not be fixed**. -In cases where the bug is known, the entry's [known bugs](bugs.html) file -section may offer you important fixing clues. - -#### We welcome your help on fixing the IOCCC website - -Jump to: [top](#) - -
-
-### Q: How do I report a bug in an IOCCC entry? -
-
- -We do not 'maintain' the contest entries as such. The code is made available on an 'AS -IS' basis. If you have a FIX for an entry, we suggest that you submit your fixes in a [GitHub pull -request](https://github.com/ioccc-src/winner/pulls) as we welcome pull requests that have a -minimal impact on the entry while improving the portability, functionality, and/or addressing known problems. - -If you do submit a pull request, we ask that each pull request address just one IOCCC entry at a time. - -Note that just because you have a fix does not mean it'll be accepted. This -might be because the author objects or it doesn't fit in some way or another. Of -course if the entry does not work we'll certainly be more inclined to accept the -fix. If it is accepted we'll be happy to credit you in the -[thanks](thanks-for-help.html) file. If you're a previous author of a winning IOCCC entry we will happily -link to your entries; if you're not we can link to your website if you wish. - -Please see the -FAQ on "[fixing an entry](#fix_an_entry)" -for information on how to submit a fix to an -IOCCC entry. See also the -FAQ on "[GitHub pull request](#pull_request)" -for more information about pull requests. - -Jump to: [top](#) - -
-
-### Q: How can I submit a fix to an IOCCC entry? -
-
- -If you see a problem with an IOCCC entry, first check the [known bugs](bugs.html) -file. In some cases what you might think of as a bug is instead a known -feature. In some cases the bug is known, but no fix has ever been submitted. -In other cases you may have found a new problem. - -If you do have a fix, and the [known bugs](bugs.html) file **does not recommend -against fixing it**, then please consider opening a [GitHub pull -request](https://github.com/ioccc-src/winner/pulls) against the master -[branch](https://github.com/ioccc-src/winner/branches) of the [ioccc-src/winner -repo](https://github.com/ioccc-src/winner). - -BTW: A **problem** is not limited to the code itself. Fixing typos in files -such as "_index.html_" files, fixing issues in a "_Makefile_", or otherwise -correcting an IOCCC entry is **VERY MUCH WELCOME**! Please use the same -[GitHub pull request](https://github.com/ioccc-src/winner/pulls) process against -the [master branch](https://github.com/ioccc-src/winner/branches) of the -[ioccc-src/winner repo](https://github.com/ioccc-src/winner). - -**NOTE**: some of the issues in the [bugs.html](bugs.html) file includes just missing -files and we welcome these too! - -**Please also help us fix typos and / or otherwise improve the write-up** of how -IOCCC winning entries are presented! - -In any event we will happily add you to the -[thanks](thanks-for-help.html) file for your help! - -And of course, an IOCCC author may update their own entries -(metadata as well as source code and any extra files) by opening a -[GitHub pull request](https://github.com/ioccc-src/winner/pulls) -against the [master branch](https://github.com/ioccc-src/winner/branches) -of the [ioccc-src/winner repo](https://github.com/ioccc-src/winner). - -Please see the -FAQ on "[fixing an entry](#fix_an_entry)". -See also the -FAQ on "[GitHub pull request](#pull_request)" -for more information about pull requests. - -Note that we're much more inclined to accept an author's fixes but the judges -have the final say in the matter. - -Jump to: [top](#) - -
-
-### Q: How can I report an IOCCC website problem? -
-
- -If you discover a problem with the IOCCC website that is related -to a particular IOCCC entry, please see the -FAQ on "[report entry bug](#report_bug)" -for information about reporting a bug in an IOCCC entry, and see the -FAQ on "[fixing an entry](#fix_an_entry)" -for information on how to submit a fix to an IOCCC entry. - -If you discover a problem with the IOCCC website (such as a broken link, which -may or may not be specific to a particular IOCCC entry) that is **not related -to a particular IOCCC entry**, the best way you can help is to submit a fix to -the IOCCC website. See the -FAQ on "[fixing the website](#fix_web_site)" -for information on submitting fixes -to the IOCCC website. - -If you do not have an IOCCC website fix, and just wish to report a general IOCCC -website problem, we ask that you first look at the [IOCCC -issues](https://github.com/ioccc-src/winner/issues) to see if the problem has -already been reported. If it has been reported, feel free to add a comment to -the issue. Otherwise, if you do not see the same issue reported, then feel free -to [open a new IOCCC website issue](https://github.com/ioccc-src/temp-test-ioccc/issues/new?assignees=&labels=website&projects=&template=website_issue.yml&title=%5BWebsite%5D+%3Ctitle%3E). - -Jump to: [top](#) - -
-### Q: How can I submit a fix to the IOCCC website? -
- -For IOCCC website problems that relate to a particular IOCCC entry, please -see the -FAQ on "[fixing an entry](#fix_an_entry)" -for information on how submit a fix to an IOCCC entry. - -You may open a [GitHub pull request](https://github.com/ioccc-src/winner/pulls) -against the [master branch](https://github.com/ioccc-src/winner/branches) -of the [ioccc-src/winner repo](https://github.com/ioccc-src/winner) -to submit a fix. - -Please see the -FAQ on "[fixing an entry](#fix_an_entry)". -See also the -FAQ on "[GitHub pull request](#pull_request)" -for more information about pull requests. - -#### Some HTML files should NOT be directly modified - -Nearly all HTML files on the [IOCCC website](https://www.ioccc.org) -are built from [markdown](https://daringfireball.net/projects/markdown/) files. -If you see lines containing: - -``` - - - - - -``` - -This means that the file is generated by a tool from a [bin directory tool](bin/index.html). -You should **NOT** attempt to modify the file. - -You may also find lines slightly below the above set that suggest another file to edit. -For example, in [contact.html](contact.html), one may read: - -``` - - - - - -``` - -This means that you could consider editing the referenced markdown file -AND then run `make www` from the top level directory in your IOCCC pull -request. There are quicker ways but to be sure you get -everything built you should do this. If you modified a markdown and you do not -see the same file as a html file then you did not complete the fix. - -Please see the -FAQ on "[fixing an entry](#fix_an_entry)". - -See also the -FAQ on "[GitHub pull request](#pull_request)" -for more information about pull requests. - -In some cases, the HTML file is **NOT** based on markdown content, but instead -came from JSON and other data files. So instead of the above reference to a -markdown file, you will read: - -``` - - - - - - - -``` - -This means there is **NOT even a markdown file to edit**. Instead one must -modify JSON files and/or change a [bin directory tool](bin/index.html). - -If this happens, consider opening up an [IOCCC issue](https://github.com/ioccc-src/winner/issues) -and ask for help. See -FAQ on "[fixing an entry](#fix_an_entry)" -for information on opening up an IOCCC issue. - - -
-## How can I correct or update an IOCCC author's information? -
- -You may correct or update IOCCC author information by submitting a -GitHub pull request that modifies an author's `author_handle.json` file. - -For example, if a given `author_handle.json` file contained: - -``` - "url" : "https://www.example.com/employee/username", -``` - -and you knew that the author has long ago left the `www.example.com` company, -and that they have a new faculty web page at `www.example.edu`, then you should -submit a GitHub pull request to change the above line to: - -``` - "url" : "https://www.example.edu/faculty/deartment/user.name", -``` - -Authors of IOCCC winning entries are kept in JSON files of the form: - -``` - author/author_handle.json -``` - -where `author_handle` is an author handle. - -See the -FAQ on "[author handle](#author_handle_faq)" -for more information about author handles. - -See the -FAQ on "[author_handle.json](#author_json)" -for information about the contents of these JSON files and how they are used. - -See the -FAQ on "[finding author handles](#find_author_handle)" -for how to find an _author_handle_. - -You may update IOCCC author information in a `author_handle.json` file -by [submitting a pull request](#pull_request) -against the [master branch](https://github.com/ioccc-src/winner/branches) -of the [ioccc-src/winner repo](https://github.com/ioccc-src/winner). - -See the -FAQ on "[GitHub pull request](#pull_request)" -for more information. - -**IMPORTANT NOTE**: As these files are JSON you should verify that -they are validly formed (e.g., you didn't make a typo). - -Before you form your GitHub pull request that modifies a -`author_handle.json` file, please run the `make www` command. This -unfortunately takes quite a while but it is the safest way to do -it. So you may wish to test your edits by running the somewhat -quicker `make quick_www` as this can speed up your testing. - -The `make quick_www` rule will update the `authors.html` and -`location.html` pages and it will also check the timestamps of the `index.html` -files versus the `README.md` files. Since they were touched and thus the -timestamp was updated, the -[bin/quick-readme2index.sh](%%REPO_URL%%/bin/quick-readme2index.sh) tool would -only worry about those two files. This greatly speeds things along while testing. -Nevertheless, doing a final `make www` is still recommended best practice -before you form your pull request. - -Please see -FAQ on "[fixing an entry](#fix_an_entry)". - -See also the -FAQ on "[GitHub pull request](#pull_request)" -for more information about pull requests. - - -#### Important note about **XX - Anonymous location**: - -Unless you are the author who originally selected the **XX - Anonymous -location**, please do not attempt to change an **XX - Anonymous -location** without the permission of the original author, as sometimes they -want to have the location known but not their name and/or other details. - - -
-#### PLEASE HELP us identify proper locations for IOCCC authors -
- -If you know the location of an author listed under: - -      **[ZZ - Unknown location](location.html#ZZ)** - -or if you find IOCCC author location that is incorrect, -then **please submit a pull request**, -or at least [inform the IOCCC judges](contact.html). - -**FYI**: The [ZZ - Unknown location](location.html#ZZ) is used for -historic winning authors whose location or country is not known, -whereas the [XX - Anonymous location](location.html#XX) is used when the -winning author does **not wish to disclose their location**. - -The contents of these JSON files contain the best known information -about authors of IOCCC entries. See -FAQ on "[author_handle.json](#author_json)" -for information about the contents of these JSON files and how they are used. - -For example, if a given `author_handle.json` file contained: - -``` - "location_code" : "ZZ", -``` - -and you knew that the author was located in [Australia](location.html#AU) -(location code **AU**), we encourage you to submit a **GitHub pull -request** to change that line to: - -``` - "location_code" : "AU", -``` - -See the -FAQ on "[fixing author information](#fix_author)" -for information about how to change author location codes. - - - - -We would appreciate if you try to fix the broken (the link goes nowhere) or wrong -(the link goes to something that clearly is not the original intent) web link. -If wish to fix such links, you may open a GitHub pull request as described in -FAQ on "[fixing the website](#fix_web_site)". -In the case of dead links or invalid links it doesn't matter -if it's a specific winner or not; the procedure is the same: open a pull request -to fix the problem. See also the -FAQ on "[GitHub pull request](#pull_request)" -for more information about pull requests. - -As far as how to find the updated link you can try using the [Internet Wayback -Machine](https://web.archive.org) and see if you can find the last non 4xx non -3xx page. Note, however, that just because it redirects, does not mean it's not -valuable. Other times you might find it with a web search. - -Some links were changed to more recent URLs by doing this exact -same thing. Some links, while they were a valid web page, no longer -reach the intended web page (for example when the domain is sold -and the new domain owner's content no longer provides the content -that was originally intended .. and while the content of the web -page may be humorous to some, the original content may have literally -gone "up in smoke"). - -In cases where the original content is lost, try searching for it on -the [Internet Wayback Machine](https://web.archive.org). When searching -look back for dates that are around the year of given IOCCC contest. -If you do find the original content in Internet archive history, -please consider submitting a change to replace the link accordingly. - -If there is no alternative that you can find you might want to remove the link -instead by replacing the link with just phrase of text. For example, -if the text in some `index.html` file was: - -``` - See the [author's description of the program](https://example.com) for more information. -``` - -Assuming that the author's description cannot be found in the -[Internet Wayback Machine](https://web.archive.org) archive, then -replace that text with: - -``` - See the **author's description of the program** (sorry the content is no longer available) for more information. -``` - -If you just wish to report the bad link issue, see -FAQ on "[report website problem](#report_web_problem)". - -Jump to: [top](#) - -
-
-### Q: How can I support the IOCCC? -
-
- -The [IOCCC judges](judges.html) run the IOCCC entirely out of -their own funds. This includes paying for IOCCC related hardware, -services, registration, software and related technical items. - -There is **NO** requirement for anyone to support the [IOCCC](index.html). -Nevertheless, it has been shown that receiving **anonymous** gifts -provides the [IOCCC judges](judges.html) with a nice -[dopamine](https://en.wikipedia.org/wiki/Dopamine) -boost, and happy [IOCCC judges](judges.html) help make the IOCCC -better for everyone. :-) - -If you wish to express your support and/or appreciation for our -efforts, we suggest making an **Anonymous** gift via the -[IOCCC Amazon wishlist](https://www.amazon.com/hz/wishlist/ls/3HSNTEL8RQ1M0?ref_=wl_share). - -Jump to: [top](#) - -
-
-
-
-### Q: I deobfuscated some entry code, may I contribute the source? -
-
-
-
- -**PLEASE NOTE**: **many [winning authors](authors.html)** have unobfuscated code -of their **own entries** and you should look for this first, often on GitHub or on -their website; see the FAQ on [how to find more information about a winning -author of an entry](#author-information) for how you might find this -information. We ask you to, if you can find them, please ask them what they -think as they can often provide invaluable information; this is less of an issue -for fixes of bugs - not features - found in the [bugs.html](bugs.html) file. - -The [IOCCC judges](judges.html) welcome those who wish to contribute a -**deobfuscated** version of a winning IOCCC entry: from either the [author or -authors](authors.html) (**which is much, much preferred**) or from people such -as yourself (assuming you are not the author :-) ) who are willing to contribute -**deobfuscated** code. We also welcome contributions to improve existing -**deobfuscated** code. You might wish to look at their URL or alt URL (see below -for more details) **first** as quite a few [authors](authors.html) have provided -unobfuscated code of their entries and this is far more fair to the [winning -authors](authors.html) (and it is much more likely to be identical functionality -as well, though many [authors](authors.html) are experienced and skilled enough -to add features **after or during obfuscation!** and many in fact do). - -**HISTORICAL NOTE**: The IOCCC website has shifted to a more -educational theme: preferring to explain entries rather than hiding -things under the guise of such information being a "_spoiler_". We -now use the term **deobfuscated** instead of "_spoiler_" for this reason, at -least in most cases; other terms might be used, including on a rare occasion -_spoiler_, this depending on context. - -We ask that the **deobfuscated** code be **identical in functionality** -to the winning IOCCC entry code. - -**_PLEASE_ NOTE**: Be aware that IOCCC entry code may contain **extremely subtle and -obscure side effects** (i.e., features). Those wishing to contribute a -**deobfuscated** version of code should **strive to mimic** the original (or -existing) IOCCC entry code as much as possible. Some authors can be contacted -(see above for more details on this) and you could ask them for details and if -possible it would be good to include them in the discussion as well (see below) -as it is **very likely** there are things that will be missed when trying to -deobfuscate the code, some of which might be important to the author. - -To contribute your **deobfuscated** code, please open up a -[Show and tell new discussion](https://github.com/ioccc-src/temp-test-ioccc/discussions/new?category=show-and-tell) -with a title of the form: - -> Enhancement: deobfuscated code for YYYY/dirname - -where "`YYYY/dirname`" refers to the winning IOCCC entry for which you are deobfuscating. - -In the **body** of your new discussion, **PLEASE** provide us with a **URL** of -your **deobfuscated** code, along with whatever notes and/or comments you -think might be helpful. If the author has a GitHub handle **please** mention -them in the discussion (see above part for how you might find out if they have a -GitHub account)! - -If you are providing an improved version of some existing **deobfuscated** code, please -mention that in the **body** of your new discussion as well. - -If there are **limitations** to how well the your **deobfuscated** code mimics -the original (or existing) IOCCC entry code, **PLEASE** mention those **limitations** -in the **body** of your new discussion as well. - -Any questions that may arise will be added as comments to the discussion. - -**SUGGESTION**: **PLEASE** try to make your **deobfuscated** code readable. **PLEASE** -add comments as needed to help the reader of your **deobfuscated** code understand it. - -**SUGGESTION**: Where useful, consider providing, as **C comments**, -code fragments of from the original (or existing) IOCCC -entry code. While it is **NOT** necessary to include the entire -original code as **C comments**, including key parts from the -original (or existing) IOCCC entry code may be helpful -to others who wish to read your **deobfuscated** code. - -If your **deobfuscated** is accepted (in some form), the [IOCCC judges](judges.html) -will be happy to **thank you** for your contribution in the -[thanking people for their help file](thanks-for-help.html). - -The [IOCCC judges](judges.html) will do the rest of the work in integrate your -**deobfuscated** code as an "_alt_" code for the entry **AND** will reference -your **deobfuscated** code in the entry's `index.html` file. We will be -happy to include any whatever notes and/or comments from your new discussion -that be prove helpful. - -**THANK YOU** in advance for your willingness to assist! - -Jump to: [top](#) - - - - -
-## Section 10: Miscellaneous IOCCC -
- -Jump to: [top](#) - -
-
-### Q: How did an entry that breaks the size rule 2 win the IOCCC? -
-
- -As entries have been fixed it is entirely possible that some of the entries no -longer fit within the year's size restrictions. Invariably the length of columns -and/or number of rows have also changed. - -The `winner.orig.c` file contains the original source code that was -subjected to rule 2 of the given IOCCC. You may also wish to see -the [archive](archive) directory where you can find all the -original winning entries as compressed tar files for a given year. - -In some cases the entry may have abused rule 2 and declared an -"abuse of the rules" (although now blatant abuse of the rules to -get around rule 2 size limits is discouraged). - -Jump to: [top](#) - -
-
-
-### Q: Is there a list of known bugs and (mis)features of IOCCC entries? -
-
-
- -Yes! Please see [bugs.html](bugs.html) for a list of known bugs and/or issues of a -variety of kinds. - -Note that just because an entry is not in the bugs file does not mean there is -not an issue and note that some issues are simply missing files, dead URL(s) or -something like that. - -Jump to: [top](#) - -
-
-
-### Q: May I mirror the IOCCC website? -
-
-
- -There are a few steps in mirroring the website: - -0. First of all, open the website on your device, preferably one you can hold -and aim somewhere. -1. Then, turn your device towards a mirror. This should mirror it. :-) -2. If you can, take a picture of the mirror image. It might help if you can put -your device down facing the mirror, so that it is easier to get a picture. - -Okay, backing up, on a more serious note: we are not accepting mirror requests at -this time, sorry. However you are free to fork the [IOCCC winner -repo](https://github.com/ioccc-src/winner). - -Yes we are aware that some people have previously made their own repo of the -winning entries but these **ARE UNOFFICIAL** and **VERY LIKELY** out of date or -incorrect. What's more, this repo is the source of the [**Official** IOCCC -website](https://www.ioccc.org) so whenever a push is made to this repo the -**Official IOCCC website** is updated. When new winners are announced, this will -happen. - -To put it simply, please do **NOT** fork those repos, as they are **UNOFFICIAL** -and certainly **OUT OF DATE**. - -If you do make a new fork of **THIS** repo, we do ask that your fork keep up to -date with the latest changes when possible. Thank you. - -Jump to: [top](#) - -
- -
- -While IOCCC judges look favorably on most requests to use IOCCC material, -we request that you ask the [IOCCC judges](judges.html) first. Of course, if -you're the winner of the entry you can make use of it as you want (make a shirt, -put it on your website etc.). - -Please send your request using the instructions on the [contacting -the IOCCC Judges](contact.html) page. - -Please note that the content of the IOCCC -**Copyrighted and is under the CC BY-SA 4.0 License**. -See the [Copyright](#copyright) at the bottom of IOCCC web pages for more details. - -See -FAQ on "[using IOCCC content](#license)". -For additional information on the [Copyright and CC BY-SA 4.0 License](license.html). - -Jump to: [top](#) - -
-
-
-### Q: Why do you sometimes use the first person plural? -
-
-
- -As a precedent for [first person -plural](https://en.wikipedia.org/wiki/Nosism), we may cite [Two-, -Three-, and Four-Atom Exchange Effects in bcc in -3He](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.35.1442) and -the co-authorship of [F. D. C. -Willard](https://en.wikipedia.org/wiki/F._D._C._Willard) as well -as the [APS New Open Access -Initiative](https://journals.aps.org/2014/04/01/aps-announces-a-new-open-access-initiative). - -The number of [IOCCC judges](https://www.ioccc.org/judges.html) has -always been "> 1" such that IOCCC judges often refer to themselves -in the plural, sometimes [in the common -plural](https://en.wikipedia.org/wiki/Plural), sometimes in the -[first person plural](https://en.wikipedia.org/wiki/Nosism), there -may be some who reject such a practice. Therefore please consider -that when you believe that just one of the [IOCCC -judges](judges.html) is in action, you may -consider that [F. D. C. -Willard](https://en.wikipedia.org/wiki/F._D._C._Willard) has been -consulted, agreed, and has authorized the statement thus allowing -the [in the common plural](https://en.wikipedia.org/wiki/Plural) -to be used without offense. - -And while some might claim that [F. D. C. -Willard](https://en.wikipedia.org/wiki/F._D._C._Willard) died in -1982, we suggest that the [Schrödinger's -cat](https://en.wikipedia.org/wiki/Schrödinger%27s_cat) superposition -may still be in effect and the 1982 [report of death was an -exaggeration](https://books.google.com/books?id=ms3tce7BgJsC&lpg=PA134&vq=%22the%20report%20of%20my%20death%20was%20an%20exaggeration%22&pg=PA134#v=onepage&q=%22the%20report%20of%20my%20death%20was%20an%20exaggeration%22&f=false). - -p.s. Here is an image of F. D. C. Willard: - -image of F.D.C.Willard.png - -Jump to: [top](#)
@@ -4664,6 +2040,7 @@ Anonymous `author_handle`'s match this regexp: Jump to: [top](#) +
### Q: What is an `author_handle.json` file and how are they used? @@ -5190,450 +2567,6 @@ and/or correct IOCCC author information. Jump to: [top](#) - -
-### Q: What is an `entry_id`? -
- -An `entry_id` is a string that identifies a winning entry of the IOCCC. - -An `entry_id` is a 4-digit year, followed by an underscore, followed by a directory name. - -For example, the `entry_id` associated with Cody Boone Ferguson's 2nd winning IOCCC entry -of 2020 is found under the following directory: - -``` - 2020/ferguson2 -``` - -The `entry_id` for that winning entry is: - -``` - 2020_ferguson2 -``` - -Jump to: [top](#) - -
-
-
-
-
-### Q: What is the purpose of the `.top`, `.allyear`, `.year` and `.path` files? -
-
-
-
-
- -The [.top](%%REPO_URL%%/.top) file resides at the top directory. This file contains the complete list -of IOCCC years. - -Under each IOCCC year, one will find a `.year` file. These files contain directory paths from the top directory, -of the IOCCC entry directories for a given year. For example, see the [1984/.year](%%REPO_URL%%/1984/.year) file. - -The [.allyear](%%REPO_URL%%/.allyear) file contains the contents of all `.year` files for all IOCCC years. - -Under each IOCCC entry directory, you will find a `.path` file. -These files contain the directory path from the top directory. -For example see [1984/anonymous/.path](%%REPO_URL%%/1984/anonymous/.path). - -The .top, .allyear, .year and .path files are generated from the top level Makefile, by: - -``` - make genpath -``` - -Jump to: [top](#) - -
-### Q: What is the current meaning of the IOCCC terms Author, Entry, and Submission? -
- -The IOCCC is now attempting to use the following terms: - -- Author - -An _author_ is someone who has submitted an entry that has won the IOCCC. - -An entry can have more than one authors. A number of authors have submitted -entries that have won the IOCCC, sometimes in the same IOCCC contest year. - -**An apology for being inconsistent**: In the past, the IOCCC used the term _winner_ to -refer to what is now an _author_. In a number of historical cases, -such as old rules and old guidelines, terms such as _winner_ may still be -found. Moreover, out of habit, the IOCCC judges sometimes use old -names such as _winner_ when they should use _author_. Sorry (tm Canada)! :-) - -- Entry - -An _entry_ is a _submission_ that won the IOCCC. - -An _entry_ has one or more _authors_. - -An _entry_ includes all of the files needed to compile it, -plus sample input files, a `Makefile`, an `.entry.json` file -describing the entry, a compressed tarball containing all of -files in the entry, etc. Under the IOCCC tree, an _entry_ -that win the IOCCC in year _YYYY_ is located under the -directory `YYYY/entry`. - -**An apology for being inconsistent**: In the past, the IOCCC used the term _winner_ to -refer to what is now an _entry_. In a number of historical cases, -such as old rules and old guidelines, terms such as _winner_ may still be -found. Moreover, out of habit, the IOCCC judges sometimes use old -names such as _winner_ when they should use _entry_. Sorry (tm Canada)! :-) - -- Submission - -A _submission_ is something given to the IOCCC judges -for consideration when the IOCCC is open. - -When the IOCCC is open for submissions, those who register -to enter the IOCCC may use the [mkiocccentry tool](https://github.com/ioccc-src/mkiocccentry) -to package their code into a compressed tarball that may be -uploaded to the [IOCCC submit server](https://submit.ioccc.org). -This compressed tarball is formatted in such a way that -the IOCCC judges do not see who wrote the code. - -A _submission_ that the IOCCC judges deem to have won the IOCCC -becomes an _entry_. Only then do the IOCCC judges look into -the special JSON file to discover who the _author_(s) are. - -**An apology for being inconsistent**: In the past, the IOCCC used the term _entry_ to -refer to what is now a _submission_. In a number of historical cases, -such as old rules and old guidelines, terms such as _entry_ may still be -found. Moreover, out of habit, the IOCCC judges sometimes use old -names such as _entry_ when they should use _submission_. Sorry (tm Canada)! :-) - -Jump to: [top](#) - -
-
-### Q: How do I make a pull request to the GitHub repo? -
-
- -First, if you do not already have a GitHub account or you have not installed an -ssh key to your account you must do so. For this we will assume you do not have -a GitHub account. For the steps following creating a GitHub account you will -have to be logged into your account. - -To help you out here is a navigation menu in this FAQ entry: - -- [Creating a GitHub account](#creating-a-github-account) -- [Installing an ssh key to GitHub](#installing-an-ssh-key) -- [Forking the IOCCC winner repo](#forking-the-ioccc-winner-repo) -- [Cloning the IOCCC winner repo](#cloning-the-ioccc-winner-repo) -- [Making changes, fixes etc.](#making-changes-fixes-etc) -- [Committing your changes](#committing-your-changes) -- [Opening a pull request](#opening-a-pull-request) -- [What to do after a merge](#what-to-do-after-a-merge) - - -#### Creating a GitHub account - -Go to [GitHub](https://github.com/) and click on 'Sign up'. Follow the -instructions. Once you've completed this task make sure you log in to GitHub. - -#### Installing an ssh key to GitHub - -Assuming you do not have an ssh key you should go to the command prompt and -type (if you already have one and are okay using it for GitHub you can use that -one): - -``` - ssh-keygen -t rsa -b 4096 -C "luser@example.com" -``` - -where `luser@example.com` is the email you want associated with your key. -Follow the instructions. It will tell you the key files. - -Once you have an ssh key you need to go to your [account -settings](https://github.com/settings/profile). Once there, in the menu -on the left you should see the item _SSH and GPG keys_. Click that and then -click (on the right side) the button that says _New SSH key_. You will see that -you have to specify a title, the key type and the PUBLIC key. Put whatever title -you want and keep the key type as _Authentication Key_. Now you need to put the -PUBLIC key in. - -If you used an rsa key the default file will likely be found in: -`~/.ssh/id_rsa.pub`. If you used a different algorithm the file name will be -different. For instance if you used `ed25519` the default PUBLIC key file would -be `~/.ssh/id_ed25519`. If, like some people do, you have a separate key for -GitHub, it could be anything you wish, as long as it's in `~/.ssh`. For instance -it might be `~/.ssh/github.pub`. - -Whatever the key file is, copy the contents and paste it into the GitHub field -labelled _Key_. Once you have done so click on _Add SSH key_. - -#### Forking the IOCCC winner repo - -Open in your browser the link: -. You now should follow the -instructions in forking the repo. - - -#### Cloning the IOCCC winner repo - -Once you have forked the repo you are ready to clone it to your system. For -instance Cody Boone Ferguson has the GitHub handle _xexyl_ so he would type in: - -``` - git clone https://github.com/xexyl/winner [target_dir] -``` - -Once that is completed you will need to change to that directory. The default -directory would be the name of the repo but if you specified a target directory -it will be that. For instance using the above example you might do: - -``` - cd winner -``` - -You're ready to make your changes now! - - -#### Making changes, fixes etc. - -Here you must use your wits, knowledge, creativity and whatever else you have. -Let's say that Cody wants to update his file -[2020/ferguson1/play.sh](%%REPO_URL%%/2020/ferguson1/play.sh) script. He would open it in -his editor of choice (in his case vim) and make the changes. He would then make -sure (as there is a last updated date) to update the last updated date. For -instance he might add the following: - -> BTW: did you know that some people believe in snake human hybrids? It's true! See -> http://www.macroevolution.net/snake-human-hybrids.html and have a laugh, shock -> or an exercise in sibilance! - -Then, assuming that the date is 1 March 2024, he would update the line that -starts with `# Last updated: ` to refer to `01 March 2024` rather than what it -is now (at the time of writing this), `15 April 2023`. - -But what if he wanted to add a file? He'd create the file and then type: - -``` - git add foo -``` - -where _foo_ is the file to add. - -When he's ready to make a commit he would need to create a new branch for the -pull request. - -#### Committing your changes - -First, as an aside, if this is your first pull request (which we assume is if you're -reading this :-) ) you need to make sure that you can push changes to GitHub -with your ssh key. To do this you need to do: - -``` - ssh -T git@github.com -``` - -Cody would see: - -> Hi xexyl! You've successfully authenticated, but GitHub does not provide shell access. - -Now, assuming that the forked repo is -, you'd type: - - -``` - git remote set-url origin git@github.com:xexyl/winner.git -``` - -Now you'd be ready to make your commits. - -Before doing anything else, however, a new branch needs to be created. -Continuing the example above for -[2020/ferguson1/play.sh](%%REPO_URL%%/2020/ferguson1/play.sh), it might be that: - - -``` - git checkout -B human-snakes -``` - -This would change the branch to the newly created branch `human-snakes` branch. -Now Cody could commit the changes: - -``` - git commit play.sh # if specifying specific files - git commit -a # if committing everything -``` - -He could also have done: - -``` - git add play.sh - git commit -``` - -In any case this would open an editor (in his case vim) to write a commit log. -It is recommended that the first line is <=51 chars and the next line is blank. -Then if necessary add a description for the log. For instance the above might -warrant the log: - -``` - Add fun link to 2020/ferguson1/play.sh - - Did you know some people believe in snake human hybrids? I added a link to the - script that discusses this and gives supposed examples. -``` - -Now a pull request has to be opened. - - -#### Opening a pull request - -To do this depends on the branch name. Assuming the branch from above, -`human-snakes`, you would type: - -``` - git push --set-upstream origin human-snakes -``` - -This might show: - -``` - Enumerating objects: 9, done. - Counting objects: 100% (9/9), done. - Delta compression using up to 10 threads - Compressing objects: 100% (5/5), done. - Writing objects: 100% (5/5), 739 bytes | 147.00 KiB/s, done. - Total 5 (delta 4), reused 0 (delta 0), pack-reused 0 - remote: Resolving deltas: 100% (4/4), completed with 4 local objects. - remote: - remote: Create a pull request for 'human-snakes' on GitHub by visiting: - remote: https://github.com/xexyl/winner/pull/new/human-snakes - remote: - To github.com:xexyl/winner.git - * [new branch] human-snakes -> human-snakes - branch 'human-snakes' set up to track 'origin/human-snakes'. -``` - -The link referred to above would then be opened to open a pull request. Just -follow the instructions at this point. If however it does not show a link it is -likely because the branch already exists in your GitHub account (for the repo). -In this case you can open the link: - which might show something -like: - -``` - xexyl:human-snakes had recent pushes 1 minute ago -``` - -and to the right of it you would see a button that says _Compare & pull request_ -which you could click on. Do that and follow the instructions. - -An important note is if you have more than one pull request opened it'll only -show the branch name as the summary. You should in that case copy paste the log -you put in into the website. For instance the line (on the website) _Add a -title_ could have: - -> Add fun link to 2020/ferguson1/play.sh - -and then the text field that is labelled _Add a description_ would have: - -> Did you know some people believe in snake human hybrids? I added a link to the -> script that discusses this and gives supposed examples. - -Once you've done this you should click on _Create pull request_. - -IMPORTANT NOTE: although the [Judges](https://www.ioccc.org/judges.html) will -give more deference to the authors of edited entries the -[Judges](https://www.ioccc.org/judges.html) also retain the final editorial say -in the matter. - - -#### What to do after a merge - -When the judges have merged the pull request you now need to make sure your fork -has the merge. To do this from the command line, assuming the fork in the above -example, you would type: - -``` - git checkout master && git pull https://github.com/ioccc-src/winner.git master && git push origin master -``` - -This will merge your pull request to your fork. - -Jump to: [top](#) - -
-
-### Q: Am I allowed to use IOCCC content? -
-
- -**Disclaimer**: This FAQ is **not a license**, has **no legal -value**, and only highlights some of the key features and terms of -the actual [CC BY-SA 4.0 -license](https://creativecommons.org/licenses/by-sa/4.0/legalcode.en). - -The content of the IOCCC is [Copyrighted and is under the CC BY-SA 4.0 License](#copyright). - -As long as you abide by the terms of the [CC BY-SA 4.0 -License](https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1) -you may copy and redistribute the material in any medium or format -for any purpose, even commercially. - -As long as you abide by the terms of the [CC BY-SA 4.0 -License](https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1) -you may remix, transform, and build upon the material for any -purpose, even commercially. - -This FAQ is an incomplete summary of how you may use IOCCC content. -You should review the [highlights of some of the key features and terms](license.html) -and this may help clarify some aspects of the -[CC BY-SA 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1). - -The [Copyright and CC BY-SA 4.0 License](#copyright) applies to all -IOCCC content. We use this to help ensure that we can all -enjoy hat those working on the IOCCC have proper Attribution -including, of course, the IOCCC winners themselves! It is designed -to help ensure that everyone may enjoy the IOCCC. - -Jump to: [top](#) - -
-### Q: What is Mastodon and why does IOCCC use it? -
- -The [IOCCC uses Mastodon](https://fosstodon.org/@ioccc) for news updates, -announcements, and for various other social media purposes. - -**Please follow the [IOCCC on Mastodon](https://fosstodon.org/@ioccc)**. - -> The IOCCC no longer uses twitter, or whatever that someone who appears to have -poor impulse control (allegedly) calls their platform these days. - -The IOCCC prefers to reside in the [fediverse](https://fediverse.info). - -**For help with Mastodon**: - -There is [help with Mastodon](https://mastodon.help) available for -those who might wish to [get started with Mastodon](https://fosstodon.org/deck/getting-started). - -While there are many fine Mastodon server instances out there, the [IOCCC judges](judges.html) -use [fosstodon.org](https://fosstodon.org/about) where lots of fun folk hang out, -and topics like science, technology, [free and open source](https://en.wikipedia.org/wiki/Free_and_open-source_software) -have a good home. The [fosstodon.org](https://fosstodon.org/@fosstodon) folk made the IOCCC feel welcome. - -While using Mastodon is free, the [IOCCC judges](judges.html) are pleased to -[support the Fosstodon Hub](https://hub.fosstodon.org/support/). - -If you have a phone or tablet there is also an official app that you can get -from the App Store or whatever equivalent your device has. Please note that the -app does not at this time seem to give push notifications when someone you -follow posts something so you will have to check the IOCCC feed manually. - -**HINT to mastodon users**: You may wish to refresh the [@IOCCC -mastodon feed](https://fosstodon.org/@ioccc) page and/or mastodon -app from time to time to view IOCCC mastodon updates. - -Jump to: [top](#)
### Q: How can I find my author handle? @@ -5679,167 +2612,31 @@ for more information on terms such as _author_, _entry_, and _submission_. Jump to: [top](#) -
-### Q: How do I set certain tabstops for viewing source code in vi(m)? + + +
+### Q: What is an `entry_id`?
-Sometimes an author will state that for best viewing purposes you should have -your tabstop set at say 4 or 8. If you use vim or vi or vim in no compatible -mode you can do this easily: make sure you're in command mode (in most cases you -can hit ESC to do this) and then type the command: +An `entry_id` is a string that identifies a winning entry of the IOCCC. +An `entry_id` is a 4-digit year, followed by an underscore, followed by a directory name. + +For example, the `entry_id` associated with Cody Boone Ferguson's 2nd winning IOCCC entry +of 2020 is found under the following directory: ``` - :set tabstop=4 + 2020/ferguson2 ``` -where `4` is the value you wish to set the tabstop to. +The `entry_id` for that winning entry is: + +``` + 2020_ferguson2 +``` Jump to: [top](#) - - -
-#### Menu on desktops or laptop computers -
- -The way the menu works on desktops or laptops is that you should simply see the -menu directly without the need of JavaScript or any intervention on your part. -It should look something like: - -screenshot of IOCCC menu on desktops - -Simply move your mouse cursor over the category you want and then click on the -item you wish to view that drops down from the category. - -This is likely how it will appear with a [tablet device in landscape -mode](#tablet_menu), too, unless [JavaScript is -disabled](#no_javascript_menu). - - -
-#### Mobile menus -
- -If, however, you're on a mobile device, it can vary, depending on the dimensions -and whether or not you have JavaScript enabled. - -
-##### Menus on mobile phones -
- -For instance, on an iPhone 14 -Pro Max or similar device (in dimensions), you should see at the top right of -every page, something that looks like: - - -screenshot of IOCCC menu on iPhone 14 Pro Max - -In this case click on the icon at the top right corner that looks like: - -menu open icon - -to activate the menu. - -
-##### Menu on mobile devices if JavaScript is disabled -
- -If JavaScript is disabled on any mobile device, tablet or phone, you should see -the words: - -``` - Please Enable JavaScript -``` - -at the top right corner; clicking on this will take you to the [no JavaScript -menu](nojs-menu.html) which is a plaintext menu. You of course can use this if -you like, even if you do not have JavaScript enabled, by pointing your browser -to . - -
-##### Menus on tablet devices (e.g. iPads) -
- -With tablets, it likely depends on the orientation you have your device in. If it's -in portrait mode you likely will see the [menu that one will get on a mobile -phone](#mobile_phone_menu). - -If, on the other hand, you are using landscape mode, say on an iPad Pro 11 inch -4th generation, then you will likely see the [menu as you would on a desktop or -laptop](#desktop_menu). - - -
-##### Menus on mobile devices wider than 1024 pixels -
- -Finally, if you're on a mobile device that is wider than 1024 pixels, you will -very possibly have to **press and hold** the menu icon: - -menu open icon - -to activate it. You can then use it [as you would on a mobile -phone](#mobile_phone_menu). - - -
-##### Browsing the website on mobile devices with a browser bug -
- -It was noticed that in iOS 16 Safari (both on an iPhone 8 Plus and in simulation -mode in macOS) the menu does not work at all. That is to say one might see: - -browser bug where menu icon does not show up - -Notice how the menu icon is not even there! This happens in both portrait mode -and landscape mode. - -In this case one will have to use the [no JavaScript -menu](#no_javascript_menu). If you have a fix for this that **does NOT -affect the usability of desktops, laptops or other mobile devices**, please -consider fixing it and [opening a pull request](#pull_request) or at -least [report it as an -issue](https://github.com/ioccc-src/temp-test-ioccc/issues/new/choose) (choose -the category _Website issue_). - -Jump to: [top](#) - -
-### Q: FAQ 6.16 - How do I find more information about a winning author of an entry? -
- -At the top of the index.html file of a winning entry with the author you want -information on, you should see a section called `Author`. All you have to do is -click on the author's name (it's a link) and it will take you to their -information in the [authors.html](authors.html) page. - -There you will find various information including a link to their -[authors.html](authors.html) information which includes various things like -their GitHub account (if known), a URL or alternate UL, mastodon handle, -location (if known and not anonymous location) and a link to their JSON author file. - -**NOTE**: you might wish to search google (or some other search engine) by their -name as sometimes you can find out their GitHub account even if it's not in our -JSON files. - -Of course if you know the author's name you can go directly to -[authors.html](authors.html) and click on their surname's/last name's/second -name's initial and then scroll down (if necessary) to the author in question. - -Jump to: [top](#)
### Q: What is a `.entry.json` file and how is it used? @@ -6257,7 +3054,6 @@ Now we will describe each field of each file in the manifest: FAQ on "[GitHub pull request](#pull_request)" for more information about pull requests. - - `display_as` (string) * This _JSON_ **string** describes what kind of file it is and in particular how to **display** it. An entry source code file would be (all strings are @@ -6276,7 +3072,6 @@ Now we will describe each field of each file in the manifest: * This _JSON_ **string** is a short string that gives a summary of what the file is, for purposes of the file lists in the `index.html` inventory. - Now that we have discussed the _JSON members_ of each file in the `manifest` we will give a list of **MANDATORY** files (for winning entry source code the names will depend on the year). @@ -6355,57 +3150,3294 @@ something along those lines. Jump to: [top](#) -
-### Q: I do not understand the IOCCC, can you explain it to me? + +
+
+### Q: How can I validate any JSON document? +
-The IOCCC stands for the International Obfuscated C Code Contest. -The IOCCC is a C programming contest. +If you want or need to verify that a JSON document (as a string or file) is +valid, you can use the +[jparse](https://github.com/ioccc-src/mkiocccentry/blob/master/jparse/README.md) +tool. The IOCCC version of the `jparse(1)` tool may be installed from the +[mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry). -The goals of the IOCCC are: +The [FAQ.md file in the mkiocccentry +repo](https://github.com/ioccc-src/mkiocccentry/blob/master/FAQ.md#download) +contains information about how to find and compile the mkiocccentry +toolkit, which includes the IOCCC version of the `jparse(1)` tool, located +under the `mkiocccentry` directory as `jparse/jparse`. -* To write the most Obscure/Obfuscated C program within the rules. -* To show the importance of programming style, in an ironic way. -* To stress C compilers with unusual code. -* To illustrate some of the subtleties of the C language. -* To provide a safe forum for poor C code. :-) -* To have fun with C! +Additionally you may install the `jparse(1)` tool from the [jparse +repo](https://github.com/xexyl/jparse): + +``` + git clone https://github.com/xexyl/jparse.git + cd jparse + make clobber all test + sudo make install +``` + +The syntax of `jparse(1)` is very simple: + + +``` + jparse foo.json +``` + +If the tool exits 0 then the document is valid JSON; otherwise it'll +show an error message. + +If you want to see more information about the parsing you can increase the +verbosity with the `-v` option. For instance: + +``` + jparse -v 3 foo.json +``` + +If the tool is not installed then you will obviously have to specify the path of +the tool. + +Jump to: [top](#) + +
+
+ + +
+## Section 4: Compiling IOCCC entries +
+ +Jump to: [top](#) + + +
+
+### Q: What Makefile rules are available to build or clean up IOCCC entries? +
+
+ +In general the best way to compile everything in an entry directory is to run: + +``` + make clobber all +``` + +If you wish to compile every entry for every year you should go to the top level +directory and run the same command as above, `make clobber all`. + +The `all` rule will build everything necessary except for the alternate +versions. Every Makefile has an `alt` rule but it will only do something if an +alternate version exists. To build all the entries along with any alternate code +you can do from the top level directory: + +``` + make clobber everything +``` + +If you wish to only build alternate code you can do: + +``` + make clobber alt +``` + +If you wish to not remove the entry binaries and only compile the additional alt +versions: + +``` + make alt +``` + +The following Makefile rules should be in all Makefiles: + +- all: build the entry programs (main program and any supplementary program) +- alt: build alternate code +- clobber: clean up object files and all binary files (except for those that are +not compiled) +- clean: a simpler version of `clobber` that only removes object files. `make +clobber` depends on `clean` so running `make clobber` will invoke `make clean`. +- everything: equivalent to `make all alt`. + +Are there any other rules? You tell us! + +The top level and the year (e.g. `1984/Makefile`, `1985/Makefile` etc.) +`Makefile`s recurse into the subdirectories for each entry so you can compile +individual entries, entries of a given year or all entries, based on what you +wish to do. + +NOTE about the above rules: the Makefile default assumes `cc` which might be a +gcc-based compiler, or a clang-based compiler, or some other compiler. Only by +forcing `CC=clang` or `CC=gcc` will one invoke a specific compiler to, say, +enable or disable additional warnings or flags. Even so different versions or +compilers might do different things, have different defects or other issues. +Note that the `Makefile`s check the `CC` variable by substrings so that if you +were to do something like `make CC=gcc=mp-12` it would register as `gcc`. + +Jump to: [top](#) + + +
+
+
+### Q: What kind of make(1) compatibility does the IOCCC support and will it support other kinds? +
+
+
+ +For the [IOCCC](https://www.ioccc.org) [mkiocccentry submission +toolkit](https://github.com/ioccc-src/mkiocccentry) and the [winning IOCCC +entries](years.html) we support *ONLY* GNU Makefile syntax. This means that if +you only have Cygwin or a BSD `make(1)` (often `bmake(1)`) or some other +`make(1)` utility the Makefiles we use will not be compatible. + +We do not intend on supporting anything but the GNU `make(1)` utility so if you +do not currently have it installed you will have to do that in order to compile +entries for the IOCCC. If you are submitting an entry this will also be +necessary. + +If you do not have GNU `make(1)` you might look for `gmake` as that is what it +often is packaged as. Then you can use `gmake` instead. For instance if you go +to the top level directory of the winner repo you can do: + +``` + gmake +``` + +In the case that the Makefile uses the `MAKE` variable you will have to override +it like: + +``` + gmake MAKE=gmake +``` + +though of course for both you may specify a rule or rules to run. + +Jump to: [top](#) + +
+
+ + +
+## Section 5: Dependencies for some IOCCC entries +
+ +Jump to: [top](#) + + +
+
+### Q: How do I compile and run an IOCCC entry that requires X11? +
+
+ + +
+#### Generally, to compile and run an IOCCC entry that requires X11: +
+ +You must have the X11 related include files and X11 libraries in order to +compile the IOCCC entry. In order to do this you will need to install Xorg and +related packages including development related packages. If you have macOS see +further down for different instructions. Otherwise: in particular you must: + +* Install the Xorg server. +* Configure the Xorg server for your graphics environment. +* Install a X11 terminal application. +* Start the Xorg server. +* Launch the X11 terminal application. +* Run the IOCCC entry in the X11 terminal application. + +By X11 terminal application we suggest one of: + +* [Gnome](https://www.gnome.org) terminal application +* [KDE](https://kde.org) terminal application +* `xterm(1)` terminal application + +See below for various system related hints that may be of help. + + +
+#### X.org server has been deprecated +
+ +The Red Hat RHEL9.0 release notes state that [X.org Server is now +deprecated](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/9.0_release_notes/deprecated_functionality#deprecated-functionality_graphics-infrastructures). + +According to this [Linux for Devices tutorial on +XOrg](https://www.linuxfordevices.com/tutorials/linux/install-xorg-on-linux) as +of 2023 Mar 25: + + +> Recently, RHEL developers categorized [Xorg was put in the ‘deprecated’ +software](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/9.0_release_notes/deprecated_functionality), +as its development has mostly halted. Subsequent updates will completely replace +it with Wayland, a more modern windowing system.. Although Wayland is not fully +developed yet, many applications do not support it properly yet and screen +sharing might not work sometime, but it is the future. Fedora, also developed by +RHEL, has switched to a Wayland session as it’s default windowing system (And it +works flawlessly on my Laptop). + +See the [Wayland](https://wayland.freedesktop.org) website for more details. + +**IMPORTANT NOTE**: We do **NOT** know if IOCCC entries will run under +**Wayland**. Some IOCCC entries that use X11 might be OK while other IOCCC +entries that use X11 in an unusual way might fail under **Wayland**. + + +See the [Wayland FAQ](https://wayland.freedesktop.org/faq.html) for more +information. + +If your system uses **Wayland** and not X11, you might give the IOCCC entries +that use X11 a try. They might work but again we do not know. + +**IMPORTANT NOTE**: The [IOCCC judges](judges.html) **do not support IOCCC entries**. +See the +FAQ on "[no entry support](#no_support)". +So if an IOCCC entry that uses X11 fails under **Wayland**, and you wish to +provide a fix to the IOCCC entry so that it will run under **Wayland**, +then consider submitting a fix so that it will run under **Wayland**. +See the +FAQ on "[fixing an entry](#fix_an_entry)" +for more information. + +Basically: if you discover an entry does not work in Wayland you are welcome to +provide **alternate code** that works for Wayland. We will happily credit you in +the [thanks-for-help.html](thanks-for-help.html) file. + + +#### Red Hat based Linux + +First, see the +FAQ on "[general X11](#X11_general)". + +Install Xorg and related packages: + +``` + sudo dnf install --skip-broken --best --exclude xorgxrdp \ + --exclude xorgxrdp-glamor '*xorg*' 'libx*' 'libX*' 'fontconfig*' +``` + +See also: + +* [How to Configure X11 in Linux](https://www.wikihow.com/Configure-X11-in-Linux) + +**IMPORTANT NOTE**: The X.org server has been deprecated. +See the +FAQ on "[X.org deprecated](#Xorg_deprecated)" +for more information. + + +#### macOS + +First, see the +FAQ on "[general X11](#X11_general)". +However, for macOS, instead of installing the Xorg server, you need to install and launch +the [most recent XQuartz](https://www.xquartz.org) application +and then run the IOCCC entry from the [Xterm window +shell](https://en.wikipedia.org/wiki/Xterm). + +As an example we will use [1993/jonth](1993/jonth/index.html) which works +with macOS 14.2.1 (macOS Sonoma). + +First of all you will need to install the [most recent +XQuartz](https://www.xquartz.org), preferably on an [Apple supported version of +macOS, preferably the most recent version](https://support.apple.com/macOS). +After it is installed, open the "XQuartz" application (usually located in +`/Applications/Utilities/XQuartz.app`) by typing at the command line: + +``` + open /Applications/Utilities/XQuartz.app +``` + +With the "XQuartz" application open you will get an [X Window System +Manager](https://www.x.org/wiki/) launched with an [Xterm window +shell](https://en.wikipedia.org/wiki/Xterm) started: + +xterm-launch in macOS + +At this point you need to cd to the winning directory and compile it. For example: + +compiling an entry in xterm in macOS + +And then run the program as directed by the `index.html` file. For example with +`1993/jonth`: + +running 1993/jonth in macOS + +Note that you can compile the code in your regular terminal prior to opening +XQuartz, should you wish to. You can even run it from that terminal and it +should open XQuartz. + +**IMPORTANT NOTE**: The X.org server has been deprecated. +See the +FAQ on "[X.org deprecated](#Xorg_deprecated)" +for more information. + + +#### Debian based Linux + +First, see the +FAQ on "[general X11](#X11_general)". + +According to the [Debian Xorg wiki](https://wiki.debian.org/Xorg), installing +X11 requires: + +``` + sudo apt install xorg +``` + +**IMPORTANT NOTE**: The X.org server has been deprecated. +See the +FAQ on "[X.org deprecated](#Xorg_deprecated)" +for more information. + + +#### Other Linux distributions + +First, see the +FAQ on "[general X11](#X11_general)". + +For general documentation on installing X11, this [ServerGUI for +Ubuntu](https://help.ubuntu.com/community/ServerGUI), and in particular, these +may be helpful: + +* [X11 Client Installation](https://help.ubuntu.com/community/ServerGUI#X11_Client_Installation) +* [X11 Server Installation](https://help.ubuntu.com/community/ServerGUI#X11_Server_Installation) +* [Full Desktop Environments](https://help.ubuntu.com/community/ServerGUI#Full_Desktop_Environments) + +See also: + +* [How to Configure X11 in Linux](https://www.wikihow.com/Configure-X11-in-Linux) + +For systems that have the `dnf(1)` command: + +``` + sudo dnf install --skip-broken --best --exclude xorgxrdp \ + --exclude xorgxrdp-glamor '*xorg*' 'libx*' 'libX*' 'fontconfig*' +``` + +For systems that have the `yum(1)` command: + +``` + sudo yum install --skip-broken --best --exclude xorgxrdp\ + --exclude xorgxrdp-glamor '*xorg*' 'libx*' 'libX*' 'fontconfig*' +``` + +**IMPORTANT NOTE**: The X.org server has been deprecated. +See the +FAQ on "[X.org deprecated](#Xorg_deprecated)" +for more information. + + +#### Package website + +First, see the +FAQ on "[general X11](#X11_general)". + +See the [X.org](https://x.org/wiki/) foundation website. + +**IMPORTANT NOTE**: The X.org server has been deprecated. +See the +FAQ on "[X.org deprecated](#Xorg_deprecated)" +for more information. + +Jump to: [top](#) + + +
+### Q: How do I compile and install SDL1 or SDL2 for entries that require it? +
+ +This depends on your operating system but below are instructions for Linux and +macOS with alternative methods for macOS and different package managers with Linux. + + +#### Red Hat based Linux + +Execute the following as root or via sudo: + +``` + dnf install SDL2 SDL2-devel sdl12-compat sdl12-compat-devel +``` + +Older RHEL distributions might have to use "yum" instead of "dnf" +in the above command. + +In the past it was said that one might need to run `make` like: + +``` + make ... SDL2_INCLUDE_ROOT=/usr +``` + +or set the following environment variable: + +``` + export SDL2_INCLUDE_ROOT=/usr +``` + +but this might not be necessary in more modern days especially as we use +`sdl-config` and `sdl2-config` which should find the proper paths. + + +
+#### macOS +
+ +If you're using macOS there are at least three ways to obtain it. You can +use Homebrew or MacPorts. If you do not wish to use either of those +package managers, you can always try to install via the package website. +For macOS we do recommend using Homebrew or MacPorts instead of using +the package website. + + +##### macOS via Homebrew + +If you have not already done so, install [Homebrew](https://brew.sh). + +Then to install SDL and SDL2, execute the following command: + +``` + brew install sdl2 sdl12-compat + eval "$(opt/homebrew/bin/brew shellenv)" +``` + + +##### macOS via MacPorts + +If you haven't already, install +[MacPorts](https://www.macports.org/install.php). Then run: + + +``` + sudo port install libsdl libsdl2 +``` + + +#### Debian based Linux + +Execute the following as root or via sudo: + +``` + apt install libsdl1.2debian libsdl1.2-dev libsdl2-dev +``` + +and then try `make all` again. + +In the past it was said that one might need to run `make` like: + +``` + make ... SDL2_INCLUDE_ROOT=/usr +``` + +or set the following environment variable: + +``` + export SDL2_INCLUDE_ROOT=/usr +``` + +but this might not be necessary in more modern days especially as we use +`sdl-config` and `sdl2-config` which should find the proper paths. + + +#### Other Linux distributions + +Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running. + + +#### Package website + +Go to the [SDL website](https://www.libsdl.org) and follow their instructions +for downloading, installing and using SDL. + +We recommend trying a method suitable for your environment first, if possible. + + +#### NOTE: there might be extra SDL packages required + +In the case that some entries do not work even with SDL1/SDL2 installed it might +be that you need additional SDL libraries. See the entry's index.html for +details. If something is not noted you're welcome to report it as an issue or +fix it and make a pull request. See the -FAQ on "[start of the IOCCC](#ioccc_start)" -and the -FAQ on "[history of the IOCCC](#website_history)" -for more information the background of the IOCCC. +FAQ on "[GitHub pull request](#pull_request)" +for more information about pull requests. + +Jump to: [top](#) + + +
+### Q: How do I compile and install (n)curses for entries that require it? +
+ +This depends on your operating system but below are instructions for Linux and +macOS with alternative methods for macOS and different package managers with Linux. + + +#### Red Hat based Linux + +Execute the following as root or via sudo: + +``` + dnf install ncurses ncurses-devel +``` + + +#### macOS + +With macOS it should already be installed. If it is not you might have to do: + +``` + xcode-select --install +``` + +and agree to the terms and conditions and proceed with the install. + + +##### macOS via Homebrew + +Not applicable, see above. + + +##### macOS via MacPorts + +Not applicable, see above. + + +#### Debian based Linux + +Execute the following as root or via sudo: + +``` + apt install libncurses6 +``` + +and then try `make all` again. + + +#### Other Linux distributions + +Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running. + + +#### Package website + +Go to the [ncurses website](https://invisible-island.net/ncurses/) and follow their instructions +for downloading, installing and using ncurses. + +We recommend trying a method suitable for your environment first, if possible. + +Jump to: [top](#) + + +
+
+### Q: How do I compile and run an IOCCC entry that requires sound? +
+
+ +This might depend on the entry but most likely the Swiss Army Knife of sound +processing programs, [SoX](https://sox.sourceforge.net), will work. How to +install depends on your OS. See below. + +After it is installed, you should be able to compile and use the program as +described in the index.html file. + +#### Red Hat based Linux + +As root or via sudo: + +``` + dnf install -y sox sox-devel +``` + +#### macOS + +For macOS there are two well known options. + +##### macOS via Homebrew + +If you have not already done so, install [Homebrew](https://brew.sh). + +Then to install SoX, execute the following command: + +``` + brew install sox + eval "$(opt/homebrew/bin/brew shellenv)" +``` + + +##### macOS via MacPorts + +If you haven't already, install +[MacPorts](https://www.macports.org/install.php). Then run: + + +``` + sudo port install sox +``` + + +#### Debian based Linux + +Usually the index.html file will explain how to use it under Debian so we do not +include this here, at least for now. + + +#### Package website + +Not applicable, see above. + + +#### Other Linux distributions + +Usually the index.html file will explain how to use it under Linux so we do not +include this here, at least for now. + +Jump to: [top](#) + + +
+### Q: - How do I compile and install tcpserver for entries that require it? +
+ +If your OS package manager does not have the package `tcpserver` you can +download, making sure you're in a temporary directory, and compile the source +like: + +``` + wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz + tar ucspi-tcp-0.88.tar.gz + cd ucspi-tcp-0.88 + make +``` + +Then as root or via `sudo(1)` enter: + +``` + make setup check +``` + +That will install it to `/usr/local/bin`. Now you should be able to use the +entry in question. + +Jump to: [top](#) + + +
+### Q: How do I compile and install netpbm for entries that require it? +
+ +This depends on your operating system for which we describe a couple below. + + +#### Red Hat based Linux + +Execute the following as root or via sudo: + +``` + dnf install netpbm-progs netpbm +``` + +Older RHEL distributions might have to use "yum" instead of "dnf" +in the above command. + + +#### macOS + + +If you're using macOS there are at least three ways to obtain it. You can +use Homebrew or MacPorts. If you do not wish to use either of those +package managers, you can always try to install via the package website. +For macOS we do recommend using Homebrew or MacPorts instead of using +the package website. + + +##### macOS via Homebrew + +If you have not already done so, install [Homebrew](https://brew.sh). + +Then to install netpbm, execute the following command: + +``` + brew install netpbm +``` + + +##### macOS via MacPorts + +If you haven't already, install +[MacPorts](https://www.macports.org/install.php). Then run: + + +``` + sudo port install libnetpbm netpbm +``` + + +#### Debian based Linux + +Execute the following as root or via sudo: + +``` + apt install netpbm +``` + +and then try `make all` again. + + +#### Other Linux distributions + +Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running. + + +#### Package website + +Go to the [netpbm website](https://netpbm.sourceforge.net) and follow their instructions +for downloading, installing and using netpbm. + +We recommend trying a method suitable for your environment first, if possible. + +Jump to: [top](#) + + +
+### Q: How do I compile and install libjpeg-turbo for entries that require it? +
+ +This depends on your operating system for which we describe a couple below. + + +#### Red Hat based Linux + +Execute the following as root or via sudo: + +``` + dnf install libjpeg-turbo-utils libjpeg-turbo-devel libjpeg-turbo +``` + +Older RHEL distributions might have to use "yum" instead of "dnf" +in the above command. + + +#### macOS + +If you're using macOS there are at least three ways to obtain it. You can +use Homebrew or MacPorts. If you do not wish to use either of those +package managers, you can always try to install via the package website. +For macOS we do recommend using Homebrew or MacPorts instead of using +the package website. + + +##### macOS via Homebrew + +If you have not already done so, install [Homebrew](https://brew.sh). + +Then to install libjpeg-turbo, execute the following command: + +``` + brew install libjpeg-turbo +``` + + +##### macOS via MacPorts + +If you haven't already, install +[MacPorts](https://www.macports.org/install.php). Then run: + + +``` + sudo port install libjpeg-turbo libjpeg-turbo-devel +``` + + +#### Debian based Linux + +Execute the following as root or via sudo: + +``` + apt install libturbojpeg0 libturbojpeg0-dev +``` + +and then try `make all` again. + + +#### Other Linux distributions + +Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running. + + +#### Package website + +Go to the [libjpeg-turbo website](https://www.libjpeg-turbo.org) and follow their instructions +for downloading, installing and using libjpeg-turbo. + +We recommend trying a method suitable for your environment first, if possible. + +Jump to: [top](#) + + +
+### Q: How do I compile and install ImageMagick for entries that require it? +
+ +This depends on your operating system for which we describe a couple below. + + +#### Red Hat based Linux + +Execute the following as root or via sudo: + +``` + dnf install ImageMagick +``` + +Older RHEL distributions might have to use "yum" instead of "dnf" +in the above command. + + +#### macOS + +If you're using macOS there are at least three ways to obtain it. You can +use Homebrew or MacPorts. If you do not wish to use either of those +package managers, you can always try to install via the package website. +For macOS we do recommend using Homebrew or MacPorts instead of using +the package website. + + +##### macOS via Homebrew + +If you have not already done so, install [Homebrew](https://brew.sh). + +Then to install ImageMagick, execute the following command: + +``` + brew install ImageMagick +``` + + +##### macOS via MacPorts + +If you haven't already, install +[MacPorts](https://www.macports.org/install.php). Then run: + + +``` + sudo port install ImageMagick +``` + + +#### Debian based Linux + +Execute the following as root or via sudo: + +``` + apt install imagemagick +``` + +and then try `make all` again. + + +#### Other Linux distributions + +Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running. + + +#### Package website + +Go to the [ImageMagick website](https://imagemagick.org) and follow their instructions +for downloading, installing and using ImageMagick. + +We recommend trying a method suitable for your environment first, if possible. + +Jump to: [top](#) + + +
+### Q: How do I compile and install OpenGL for entries that require it? +
+ +This depends on your operating system for which we describe a couple below. + +In general OpenGL needs X11 to be installed and the X Window Server to be running. See the +FAQ on "[X11](#X11)" +for general information about X11. + +Once X11 is install and the X Window Server is running, one needs to compile +and link with the two libraries, _GL_ and _GLU_: + +``` + cc ... -lGL -lGLU -L _location-where-X11-libs-are-installed_ -lX11 +``` + +**NOTE**: The OpenGL development effort is being managed by [vulkan.org](https://vulkan.org). +We suggest you check out their resource for further information on OpenGL. + + +#### Red Hat based Linux + +Execute the following as root or via sudo: + +``` + sudo dnf install glew-devel SDL2-devel SDL2_image-devel glm-devel freetype-devel +``` + +See [OpenGL Programming/Installation/Linux](https://en.wikibooks.org/wiki/OpenGL_Programming/Installation/Linux) for details. + +Older RHEL distributions might have to use "yum" instead of "dnf" +in the above command. + + +#### macOS + +In the past, macOS has come with OpenGL pre-installed. However as of macOS 10.14, +[OpenGL has been deprecated on macOS](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_intro/opengl_intro.html) (in favor of Metal). + +As long as Apple continues to ship OpenGL pre-installed and it works, you +should be able to go. However in Apple drops support for OpenGL later on, +you might look to install OpenGL via Homebrew or MacPorts. + + +#### Debian based Linux + +Execute the following as root or via sudo: + +``` + sudo apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev +``` + +and then try `make all` again. + +See [OpenGL Programming/Installation/Linux](https://en.wikibooks.org/wiki/OpenGL_Programming/Installation/Linux) for details. + + +#### Other Linux distributions + +Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running. + + +#### Package website + +Go to the [Vulkan website](https://vulkan.org) and follow their instructions +for downloading, installing and using OpenGL. + +We recommend trying a method suitable for your environment first, if possible. + +Jump to: [top](#) + + +
+
+### Q: How do I download individual winning entries or all winning entries of a given year? +
+
+ +Although one can clone the entire [winner +repo](https://github.com/ioccc-src/winner) to get the entire website and all +entries, we also provide, as a convenience, a way to download individual entries +as well as a way to download a year's winning entries. + +Please note that some of the links in the html files will not work! This is +because you are not downloading the full website. If you want to view the entry +with links intact you should clone the repo or view it on the [official IOCCC +website](https://www.ioccc.org) instead. + + +#### Individual winning entry tarballs + +The individual entry tarballs are named in the form of +`YYYY/winner/YYYY_winner.tar.bz2` (e.g. +[1984/mullender/1984_mullender.tar.bz2](1984/mullender/1984_mullender.tar.bz2)) +and they contain a single entry as well as some additional necessary files. Each +entry tarball is linked to in its `index.html` (e.g. +[1984/mullender/index.html](1984/mullender/index.html)) manifest, listed in the +_Secondary files_ list. + +These tarballs will have the following files: + +- `ioccc.css` - stylesheet for the html files +- `var.mk` - the top level Makefile included by all the other Makefiles that holds variables used by the Makefiles +- `YYYY/winner/.path` - directory path from top level directory +- `YYYY/winner/.entry.json` - entry summary and manifest in JSON +- `YYYY/winner/.gitignore` - list of files that should not be committed under git + +plus the winning entry files like source code, the Makefile, supplementary data +provided by the author and any other file in the winning entry, found under the +entry's subdirectory. + +If you downloaded `1984/mullender/1984_mullender.tar.bz2`, for instance, you might +then do: + +```sh + cd 1984/mullender + make everything + ./mullender.alt +``` + +to compile all versions and then run the alternate version (if you have +a PDP-11 or VAX-11 you would be able to run the original version). For more help +on compiling entries, see also the +FAQ on "[IOCCC Makefile rules](#make_rules)". + +If you want to view the `index.html` file you can point your browser to the +`index.html` file of the winning entry (e.g. `1984/mullender/index.html`) with the +caveats noted above. + + +#### Year based tarballs + +The year based tarballs, which are under each year's directory and are named in +the form of `YYYY/YYYY.tar.bz2` (e.g. [1984/1984.tar.bz2](1984/1984.tar.bz2)), +include all the winning entries of a given year. +Each year's tarball can be found under that year in the [years.html](years.html) +page and in the year's `index.html` as well (e.g. +[1984/index.html](1984/index.html)). + +These tarballs have, along with each entry's directory and their respective +files (as if you downloaded each entry tarball of the year individually as +described above), the following files: + +- `.filelist` - list of files in the year that are not part of a winning entry of the year, including the `YYYY.tar.bz2` tarball +- `index.html` - the `YYYY/index.html` file rendered from the `YYYY/README.md` file +- `Makefile` - Makefile for the year to compile etc. all entries of the year +- `README.md` - the source of the `YYYY/index.html` file +- `rules.txt` - rules of the year's contest +- `.year` - text file that has a list of the winning entries' directories of the year + + +Additionally, some will have extra files like: + +- `.gitignore` - list of files that should not be committed under git +- `guidelines.txt` - the guidelines of the year +- `iocccsize.c` - `iocccsize` tool of the year +- `iocccsize.mk` - Makefile to compile the `iocccsize` tool of the year +- `iocccsize-test.sh` - test suite for the `iocccsize` tool + +.. and perhaps some others we have neglected to mention as well. + +If you extract a year's tarball you can `cd YYYY` (e.g. `cd 1984`) and then run +`make everything` to compile the entries and alternate code of every entry, as +if you switched to each entry's directory and ran `make everything` in each one. + +If you download the 1984 tarball, i.e. `1984/1984.tar.bz2`, then you might +extract it and then switch to the directory and compile everything of each +entry: + +```sh + cd 1984 + make everything +``` + +For more help on compiling entries, see also the +FAQ on "[IOCCC Makefile rules](#make_rules)". + +Of course in this case you can also switch to individual entries and look at the +`index.html` file (or any other file in the entry) and try out the entries that +interest you, as if you downloaded that entry's individual tarball. + +If you want to view the `index.html` files of that tarball, for instance the +year's `index.html` file and then `1984/mullender/index.html` you could point your +browser to `1984/index.html`, scroll down to `Winning Entries of 1984 - The 1st +IOCCC` and click on the link `1984/mullender` which will take you to the +`index.html` file. Of course the caveats listed above still will apply. + +Jump to: [top](#) + + +
+### Q: How do I compile and install zlib for IOCCC entries that require it? +
+ +This depends on your operating system but below are instructions for Linux and +macOS with alternative methods for macOS and different package managers with Linux. + + +#### Red Hat based Linux + +Execute the following as root or via sudo: + +``` + dnf install zlib +``` + + +#### macOS + +With macOS it should already be installed. If it is not you might have to do: + +``` + xcode-select --install +``` + +and agree to the terms and conditions and proceed with the install. + + +##### macOS via Homebrew + +Not applicable, see above. + + +##### macOS via MacPorts + +Not applicable, see above. + + +#### Debian based Linux + +Execute the following as root or via sudo: + +``` + apt install zlib1g zlib1g-dev +``` + +and then try `make all` again. + + +#### Other Linux distributions + +Use your package manager to install the appropriate packages. Try the search +feature of the package manager to determine which packages you need to install. +Note that you might have to install both the library and the developmental +packages: one for compiling and one for linking / running. + + +#### Package website + +Go to the [zlib website](https://www.zlib.net) and follow their instructions +for downloading, installing and using zlib. + +We recommend trying a method suitable for your environment first, if possible. + +Jump to: [top](#) + + +
+### Q: How do I install Ruby for entries that require it? +
+ +Please see the [official Ruby installation +guide](https://www.ruby-lang.org/en/documentation/installation/). + +Jump to: [top](#) + + +
+### Q: How do I install rake for entries that require it? +
+ +First, if `gem` is not installed, see the [gem GitHub repo +](https://github.com/rubygems/rubygems). + +Assuming you have `git(1)` installed, you can do: + +``` + git clone https://github.com/rubygems/rubygems + cd rubygems && exe/gem install rake +``` + +Otherwise, you can download the zip file, extract it, cd to the directory and +then run: + +``` + exe/gem install rake +``` + +Once this is done, try as root or via `sudo`: + +``` + gem install rake +``` + +Jump to: [top](#) + +
+
+ + +
+## Section 6: Problems compiling IOCCC entries +
+ +Jump to: [top](#) + + +
+
+### Q: Why don't certain IOCCC entries compile? +
+
+ +Some entries that won the IOCCC, particularly entries from long ago, no longer compile on more +modern systems because the C language has evolved (i.e. the modern C compilers +are much more strict in what they accept as a valid program), or the entry +depended on operation system and library features that where common back then +but are different/missing today. + +Please see the other FAQs in this section as they might offer helpful +hints, especially in cases were something else needs to be installed. + +Please see the [bugs.html](bugs.html) file for details about known problems with IOCCC entries. In some cases you may be dealing with a problematic entry. In a few fun cases, the IOCCC does not compile by design! + +If you have a fix that makes a minimal impact to the entry, then +please consider submitting that change in the form of a pull request. +Please see +FAQ on "[fixing an entry](#fix_an_entry)". +See also the +FAQ on "[GitHub pull request](#pull_request)" +for more information about pull requests. + +In some cases alternative code has been added that does compile on some or most +systems. Check the write up for the entry for "alt" code and possible ways to +compile and run that code. In some cases we replaced the original code (but not +the `.orig.c` file!) with code that works for modern systems but one can view +the original code in the `.orig.c` files (sometimes the original code is also in +the directory as a `dirname.alt.c` or `prog.alt.c`). See the -FAQ on "[entering the IOCCC](#submit)" -for information on how to enter and submit to the IOCCC. +FAQ on "[original source code](#original_source_code)" +for more information. -If you are still confused, consider the nature of -the [IOCCC rules](next/rules.html) and of the [IOCCC -guidelines](next/guidelines.html). You will see a dose of the technical, -mixed with "nerd humor" (or humour if you prefer 🤓). +It might also be worth noting that almost all entries, have been +fixed so that they can compile in modern systems though just because an entry +compiles does not mean it will run on your specific system. -If after all that you are still confused, sorry (tm Canada 😉). -Consider this: While the IOCCC often attempts to be presentable, -it is under no obligation to be wholly understandable. One might -say that to truly understand the IOCCC is problematic. And if -someone did manage to fully understand the IOCCC, then perhaps -this **modified** quote from the [The Hitchhiker's Guide to the -Galaxy](https://en.wikipedia.org/wiki/The_Hitchhiker's_Guide_to_the_Galaxy) -may apply: +Jump to: [top](#) -> "There is a theory which states that if ever anyone discovers -exactly what the IOCCC is for and why it is here, it will -instantly disappear and be replaced by something even more bizarre -and inexplicable. + +
+
+### Q: Why does clang or gcc fail to compile some IOCCC entries? +
+
+ +Although we have fixed numerous entries to work with clang (sometimes in an alt +version but usually in the program itself) there are some that simply cannot be +fixed or if they are fixable they have not yet been fixed (and might or might +not ever be fixed). + +This is because clang has some defects where the args of `main()` are required to +be a specific type and some versions of clang allow only 1, 2 or 3 args, not 4, +to `main()`. In the case of types of args many were changed to the right type and +then what was `main()` became another function of the original `main()` type. + +At the same time some entries are not designed to work with clang. There might +be alternate code added at some point but at this point it is highly unlikely. + +`gcc` is far more forgiving. Nonetheless some entries no longer work or worked +with `gcc`. Some of these have been fixed (or in some cases partly fixed, much +like with `clang`) but there might be some that do not work with `gcc` or +`clang` or for that matter some other compiler. + +See if the problem is mentioned in [bugs.html](bugs.html). If you have a change +that fixes the problem (even if it just a change to the `Makefile`) that doesn't +negatively impact the entry too much, consider submitting that change in the +form of a pull request. Please see the +FAQ on "[fixing an entry](#fix_an_entry)". +See also the +FAQ on "[GitHub pull request](#pull_request)" +for more information about pull requests. + +Jump to: [top](#) + + +
+
+
+### Q: Why do some IOCCC entries fail to compile under macOS? +
+
+
+ +If the entry requires gcc and you did not explicitly install gcc in macOS you +will not be able to run or use these entries. This is because macOS gcc is +actually clang, even `/usr/bin/gcc`. + +That being said many (if not most) of these entries have been fixed and some +others will be looked at, when found. + +In some cases the [bugs.html](bugs.html) file may note a known macOS problem +with an entry. Should you manage to port the entry, and assuming your changes +also attempt to preserve the original intent of the IOCCC entry, we would +encourage you to submit a pull request with your ported code. +Please see the +FAQ on "[fixing an entry](#fix_an_entry)" +for details. + +Jump to: [top](#) + + +
+### Q: Why do Makefiles use -Weverything with clang? +
+ +While we know that use of `-Weverything` is generally not recommended +by `clang` C compiler developers, we do use the `-Weverything` +option in a certain case in IOCCC entry `Makefile`s. + +The use of `-Weverything` is limited to when one forces `CC=clang` or more +generally if the string 'clang' is in `$(CC)`. If `$(CC)` contains 'gcc' the +'gcc' specific options are run instead. + +Users with clang compilers are not required to set `CC=clang` or equivalent but +when they do, `-Weverything` is enabled with all of its challenges, pedantic +warnings, and sometimes warnings about things that do not matter, some of which +are frankly frivolous and often downright dubious. + +To enable this feature: + +``` + make clobber all CC=clang +``` + +IOCCC authors who have access to `clang` might wish to try their +hand at compiling with `-Weverything` while using a minimum of `-Wno-foo` +statements. Sometimes there is a technical or pedantic issue that +`-Weverything` warns about that would merit a change to your C code; often, +however, it is not even possible to fix let alone is it worth it. Of course +if you're running out of bytes due to rule 2[ab] one might not have much choice. +This is something that obfuscation authors simply sometimes have to deal with! + +If you try to minimize the number of `-Wno-foo` options needed with +`-Weverything`, please mention this in your remarks about the entry, as the +judges note you attempt to honor it (see also below). In some cases your +obfuscated code will issue warnings with `-Weverything` no matter what: the +`-Wno-poison-system-directories` is a common example of this but there are +others as well, sometimes depending on the version of `clang`. + +If you do try for a compile with `clang -Weverything`, keep on mind that while _your_ +compile environment might be warning free, a different clang version or a +different build environment might still have warnings. For instance the warning +set is different in macOS (which by default is `clang`: even when run as `gcc`!) +than Linux (due to versions and possibly other things)! + +Given that your entry **MUST** work as documented, you may be safer to +say that your entry keeps the number of warnings and `-Wno-foo` options while +compiling with `clang -Weverything` at a minimum. You might want to say the +version number and platform too as an extra safety net. Because if you claim zero +warnings, and we find a warning situation, this may diminish the value of your +entry as it is not as documented. Thus it might be wise to point this out and +if you can test it in multiple platforms (or versions of `clang`, see +below note) this would be advisable. + +**NOTE**: different versions of `clang` have other differences as well. For instance +a defect of `clang` that required numerous entries to be fixed for clang is that it +requires that `main()`'s arguments to be of a specific type. However some +versions of `clang` are more strict in the number of args allowed. These reasons +are part of why numerous entries had to be modified so that `main()` calls +another function instead of doing it all in `main()` (another reason was that +some entries that recursively called `main()` caused a crash or otherwise broke +the entry in modern systems). Some entries do not work in `clang` (or at least do +not work completely) due to these defects, for instance +[1989/westley](1989/westley/index.html); [Cody Boone +Ferguson](authors.html#Cody_Boone_Ferguson) was able to +get much of it to work and looking at that entry might be of value to your +submissions, at least if you can figure the code out :-). To see the +differences, try from `1989/westley`: + +``` + make diff_orig_prog +``` + +If you have `colordiff` try: + +``` + make DIFF=colordiff diff_orig_prog +``` + +Alternatively you can try: + +``` + git diff d2a42f42e8f477f29e9d5ed09ce2bb349eaf7397..eb9e69fde657acc8c85a618a8a99af4c2f93b21d westley.c +``` + +As you can see, using `clang` has some additional problems to work out but if +you can get your entry to work well in `clang` it might very well be considered +better than other entries. + +Jump to: [top](#) + +
+
+ + +
+## Section 7: Running IOCCC entries +
+ +Jump to: [top](#) + + +
+### Q: What are `try.sh` and `try.alt.sh` scripts and why should I use them? +
+ +A lot of the entries, old and otherwise, have complicated uses or, if not +complicated uses, it has numerous uses (sometimes both), and having a script +that automates these for viewers improves the usability of these entries so one +can enjoy them better. + +The `try.sh` script is for the original entry and the `try.alt.sh` script is for +alternate versions. These scripts are usually for the `Try:` and `Alternate +try:` sections in the `index.html` files. + +Some entries provide additional scripts that are meant to run the entry as well +but might not fit in the `try` model though some are used by a `try.sh` / +`try.alt.sh` script. + +Although you're certainly welcome to copy and paste or type the commands in +manually, sometimes the scripts will do additional things that you might miss +and there are some other benefits as well which you would miss if you did not +use them. Nevertheless, if you prefer to do it manually, whether to help you +process or appreciate the entry more, then please do so. + +Jump to: [top](#) + + +
+
+
+
+### Q: An IOCCC entry messed up my terminal application, how do I fix this? +
+
+
+
+ +The simplest way to do this is to type `reset`. If echo was disabled you can get +usually away with `stty echo`. Sometimes you can also get away with `stty sane`. +`reset` does the most but note that it will clear the screen; it is not the +clearing of the screen, however, that solves the problem, so `clear` will not +help. + +Jump to: [top](#) + + +
+
+### Q: Why does an IOCCC entry fail to compile and/or fail to run? +
+
+ +What may have worked years ago may not work well or work at all today. +Please note that the IOCCC judges do **NOT** support IOCCC entries. +Nevertheless, there may be a number of reasons why an IOCCC entry +may fail to compile or run well or fail to run on your system. + +In some cases the American National Standards Institute's ANSI C committee has +damaged the C standard to the point where perfectly valid C programs no longer +compile with modern compilers. As such some old IOCCC entries can no longer be +compiled with modern compilers (though a great deal of these were fixed in +2023). + +In some cases programs that may have worked on an old computer system +longer work on modern computers. Some IOCCC entries do not work well, +or no longer work on modern computers or modern operating systems, though again +a great deal of these were fixed for modern systems. + +Some IOCCC entries fail to compile under clang, or gcc. +Some IOCCC entries require operating system services that +may not be present on your system. + +In some cases the IOCCC entry simply has bugs or (Mis)features. + +If you are having problems compiling or running an IOCCC entry, +we recommend that you look in [bugs.html](bugs.html) to see if +there is a known bugs or (Mis)feature. In some cases what you +may think is a bug is actually an feature that was intentionally +written by the authors. In some cases the problem is well +known and we are looking for someone to attempt to fix it. + +In some cases there is an alternate version of the IOCCC entry +that you may wish to try. + +It also possible that you may have discovered a bug in a winning IOCCC +entry. If so, you are invited to try and fix the IOCCC entry and +submit that fix by way of a [GitHub pull +request](https://github.com/ioccc-src/winner/pulls). +Please see the +FAQ on "[fixing an entry](#fix_an_entry)" +for how to submit a fix to an IOCCC entry. + +Jump to: [top](#) + + +
+
+
+### Q: How do I find out how to send interrupt/EOF etc. for entries that require it? +
+
+
+ +For some entries one needs to send interrupt or EOF or some other signal/other +special characters. There are typical defaults like (where `^` = ctrl): + +- `^D` for EOF (`eof`) +- `^C` for interrupt (`intr`) +- `^U` for kill (`kill`) + +and various others. But if you don't know this you can find out through the +`stty(1)` command with the `-a` option. For instance with macOS you might see: + +``` + $ stty -a + speed 9600 baud; rows 40; columns 155; + intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; [..snip..] +``` + +If you know the name you can use `grep` to find the correct line and if your +implementation of `grep(1)` has the `-o` option you can filter it. For instance +to find what the `intr` is set to: + +``` + $ stty -a |grep -o 'intr = ^[[:alpha:]]' + intr = ^C +``` + +... assuming of course that it's a ctrl combination :-) If for some strange +reason it's not you might have to do something else including just piping it to +just `grep intr` or whatever. + +Jump to: [top](#) + + +
+
+### Q: Why does an IOCCC entry fail to run on my 64-bit system? +
+
+ +Unfortunately some older entries are non-portable and require 32-bit support or +32-bit binaries. A problem system here is macOS Catalina (10.15) as as of that +version macOS no longer supports 32-bit binaries. If the entry acts on a certain +type of binary, say ELF, then that will also be a problem depending on the +entry. For example [2001/anonymous](2001/anonymous/index.html) requires 32-bit +ELF binaries. + +There are a few example entries that require 32-bit binaries. We have tried +to note these in both the respective Makefiles and index.html files but it is +possible that some were missed. These entries are very likely in the +[bugs.html](bugs.html) file and we welcome any help in making an alternate version +for 64-bit systems. Many were fixed to work with modern systems but some are +supposed to only work with 32-bit systems so any updated version of these +entries should be an alternate version. + +Other entries like [2001/herrmann2](thanks-for-help.html#2001_herrmann2) +now work with 32-bit AND 64-bit systems. + +Please see the [bugs.html](bugs.html) file for the problematic entry +in question to see if the problem is known, and if a fix is wanted, +consider trying to port the code to a 64-bit system and submitting +a pull request with that change. Pull requests that fix such code +while trying to minimize the impact of any changes and preserving +the spirit of the original code are very welcome! Please see the +FAQ on "[fixing an entry](#fix_an_entry)" +for details. See also the +FAQ on "[GitHub pull request](#pull_request)" +for more information about pull requests. + +Jump to: [top](#) + +
+
+ + +
+/An IOCCC entry messed +## Section 8: Changes made to IOCCC entries +
+ +Jump to: [top](#) + + +
+
+### Q: How can I find out what was changed in an IOCCC entry source code? +
+
+ +We have set up make rules to easily do see what was changed in the winning IOCCC +entry source. Using the `Makefile` in the entry directory, use +one of the following `make(1)` rules: + +The following `make` rules exist to make a difference: + +* `make diff_orig_prog`: + - This rule will show the diff of the _original_ source to the + current source (that is `entry.orig.c` to `entry.c`). +* `make make diff_alt_orig`: + - This rule will show the diff of the alternate code to the original + code (that is `entry.alt.c` to `entry.orig.c`). If no alternate code exists + nothing will be shown. +* `make diff_alt_prog`: + - This rule will show the diff of the alternate code to the entry as it + stands (that is `entry.alt.c` to `entry.c`). +* `make diff_orig_alt`: + - This rule will show the diff of the original code to the alternate code + (that is `entry.orig.c` to `entry.alt.c`). +* `make diff_prog_alt`: + - This rule will show the diff of the entry to the alternate code (that is + `entry.c` to `entry.alt.c`). +* `make diff_prog_orig`: + - This rule will show the diff of the entry to the original code (that is + `entry.c` to `entry.orig.c`). + +For instance one of Landon's all time favourite entries is +[1984/mullender](1984/mullender/index.html) so the file names would be: +`mullender.orig.c`, `mullender.alt.c` and `mullender.c`. For later years, it +would be instead `prog.orig.c`, `prog.alt.c` and `prog.c`. + +Note that you might see something like: + +``` + make: [Makefile:170: diff_orig_prog] Error 1 (ignored) +``` + +at the end of the output but this is completely normal if there are differences. + +If the alternate code is the same as the original, say with +[1984/anonymous](1984/anonymous/index.html), then naturally there is no point in +running the rule and the same applies for all the other rules but this system +allows for easily seeing the diffs. + +As some examples we'll first look at one that has really long lines which +will make it harder to see what is different, +[2001/anonymous](2001/anonymous/index.html). What you would do is `cd +2001/anonymous` and then do: + +``` + make diff_orig_prog +``` + +and then be really confused! :-) + +But for an entry like [1991/dds](1991/dds/index.html), you can see the +differences much more easily. `1991/dds` is a good example where it's very +simple to see what is different as it's just a couple lines. + +You might be quite surprised how little some entries had to be changed and at +the same time how much other entries had to be changed, often with quite complex +differences! In some cases if the line is rather long, like the above mentioned +one, it will be harder to see what changed but in other cases like +[1984/decot](1984/decot/index.html) or [1986/wall](1986/wall/index.html) it's a +lot easier. + +Well, at least it's easier see the differences on a line-by-line basis but maybe +not what actually changed, especially since it's easier to know what was fixed +when you have compiler errors :-) (though there are, as noted, some examples +where it's quite easy to see the differences). + +[1991/dds](1991/dds/index.html) is also a good example to see the alt difference +very easily. To do that `cd 1991/dds` and then do: + +``` + make diff_alt_prog +``` + +and you'll see a single line changed and very simply. + +**NOTE**: The above mentioned `make` rules are located in the [1337.mk](%%REPO_URL%%/1337.mk) +include Makefile via the optional include directive line: + +``` + -include 1337.mk ../1337.mk ../../1337.mk +``` + +The [1337.mk](%%REPO_URL%%/1337.mk) file must exist in the current +directory, or under the directory above, or under the directory 2 levels +above in order for these rules to work. + + +#### Tip: if you have `colordiff` installed it's a lot easier to see the differences + +To use these rules but provide a different `diff`, for instance `colordiff`, +just do: + +``` + make DIFF=colordiff diff_orig_prog # for orig to prog diff + make DIFF=colordiff diff_alt_prog # for alt to prog diff +``` + +Obviously if you want to view the alternate code or the orig code you can just open +the files as described above. + +See the +FAQ on "[original source code](#original_source_code)" +for more information. + +Jump to: [top](#) + + +
+
+### Q: Why were some calls to the libc function gets(3) changed to use fgets(3)? +
+
+ +Some may wonder: "Doesn't this tamper with the entry too much?" + +A fine line indeed has to be drawn here but it was decided that it is worth it +because of alarming warnings that can be displayed, in some systems at runtime +interspersed with the output of the program. + +For instance in macOS the entry [1990/tbr](1990/tbr/index.html) would output the +warning in such a way that caused confusing output for the entry, looking like: + +``` + $ ./tbr + $ warning: this program uses gets(), which is unsafe. + # nothing here, what to do? +``` + + +In some cases it is not possible to fix or at least it is highly unlikely and so +those have mainly not been touched except one that has had the buffer size +increased (which could be done for others that are not possible to change to +`fgets()` though this has not been done). + +Some entries can be made to look almost identical to the original entry. For +instance the fix to [1988/reddy](1988/reddy/index.html) required only a single +`#define` be added. + +In the cases it has not been done it is likely the entry can be found in the +[bugs.html](bugs.html) file. + +In the future we, the judges, would prefer that entries use `fgets()` to prevent +these problems. + +An annoying fact is that for '"compatibility" reasons' `fgets()` retains the +newline and `gets()` does not. As the Unix version 7 man page used to say: + +> **BUGS** > -> There is another theory which states that this has -[already happened](#great_fork_merge)." 😜 +> The _fgets(3)_ function retains the newline while _gets(3)_ does not, all +in the name of backward compatibility. -Share and enjoy! ☺️ +We're not sure how this is compatibility but either way it can cause a +problem and it is this that has complicated most of the fixes though again some +can look almost identical. + +Jump to: [top](#) +
+
+### Q: Why do author remarks sometimes not match the source and/or inconsistent with the entry? +
+
+ +Because some entries had to be fixed for modern systems and often the fixes +required a change in code, sometimes significant changes. Thus the remarks can +be inconsistent in some cases. + +This is why we recommend that when you read the remarks, sometimes the judges' +remarks and always the author's or authors' remarks, you look at the original +code. When the entry source code is called `prog.c` the original code is in +`prog.orig.c`; otherwise it is `dirname.orig.c`. For instance one of Landon's all +time favourite entries is [1984/mullender](1984/mullender/index.html) and the +original code is in [mullender.orig.c](%%REPO_URL%%/1984/mullender/mullender.orig.c). In +some cases, such as `1984/mullender`, the original code is the same as the code +as no changes were made (there is an alt version for systems that are not +VAX-11/PDP-11, however). + +See the +FAQ on "[original source code](#original_source_code)" +and the +FAQ on "[entry source code changes](#what_changed)" +for more information. + +Jump to: [top](#) + + +
+### Q: What is the meaning of the file ending in .orig.c in IOCCC entries? +
+ +Due to the fact that the original code has sometimes had to change these files +are the original winning entry or as close to as possible to the original that +we can find (in some cases a change was made by the Judges, for example, or an +author might have made a modification without saving the original). + +Jump to: [top](#) + + +
+
+### Q: What are alternate versions and why were they added to some entries? +
+
+ +The alternate versions are exactly what they sound like, versions of their +respective entries that were not the winning source code but have additional +features added (often by the author) or fixes, updates at the request of the +judges (upon winning the contest), unobfuscated versions and a variety of other +things for instance letting it work on more than one platform (where it would +not be possible to do in the original submission). + +In some cases the alternate code added come directly from the author (some of +which already were in the website) but there were other cases where alternate +code was added that might or might not be necessary; this was a judgement call +and the reasons vary. + +In many cases it was simply to make the entry more presentable to more people +but without modifying the entry itself, which would be tampering with the entry +(a problem that we tried to avoid as much as possible although we certainly did +not manage to do this perfectly), and in some cases it would be changing it so +much that it would no longer be what was submitted. + +In one case an alternate version was created to help locate and fix a bug that +prevented the entry from working properly and it seemed like it should be added +as well, for fun (it is a game). + +In some cases it might be better to not have them but as noted this was a +judgement call. + +See also the +FAQ on "[original source code](#original_source_code)" +for more information. + +Jump to: [top](#) + + +
+
+### Q: Why was arg count and/or type changed in main() in some older entries? +
+
+ +There are a number of reasons this was done but they usually come down to a +mis-feature or defect in the `clang` compiler. + +In all versions of `clang` the first arg must be an `int` and the rest must be a +`char **` but in some versions it also objects to the number of args in +`main()`. In the versions observed that complain about the number of args it +says that there must be 0, 2 or 3 args. This only was triggered with 4 args, not +1, but to future proof the entry entries that had only one arg to `main()` were +changed to two. + +The above also meant that some entries that were recursive calls to `main()` +could no longer be so: `main()` instead had to call another function that has +the body of the old `main()` and that function would call itself again. In some +cases, however, this had to be done even without `clang` objections. + +Jump to: [top](#) + + +
+
+
+
+### Q: Why were files added to, removed from or changed in some entries? +
+
+
+
+ +Like with files being renamed, there are multiple reasons files were added, +removed or changed. The addition of the `try.sh` and `try.alt.sh` scripts is the most +significant example of files being added. These scripts, +help demonstrate entries by automating commands, sometimes many +commands and not always simple commands, that one would previously have to run +manually (there are other benefits as well). + +See the +FAQ on "[try.sh and try.alt.sh](#try)" +for more details. + +Alternate code, sometimes provided by the author, sometimes provided by the +judges and sometimes other people, was added to some entries as well. + +In the case that a link might end up with a 404 the files, if possible, were +downloaded and put into the entry's directory. Sometimes the links were already +dead but with the help of the Internet Wayback Machine we could get the files +back. + +In a few cases files were removed and there are multiple reasons for this too. + +The end result is to help improve the presentation of the entries in some way or +ways. + +Jump to: [top](#) + + +
+
+### Q: What is the original source file? +
+
+ +Every entry has what is called the "**original source file**". This is +a copy of the original source code (usually `prog.c`) that the +[IOCCC judges](judges.html) used when declaring that submission is a +winning IOCCC entry. + +There are a number of reasons why the source code (usually `prog.c`) needs +to be modified. Reasons include things such as: + +* modification as requested by the [IOCCC judges](judges.html) +* modification as requested by the author(s) +* modification as requested by a pull request from [someone else](thanks-for-help.html) +* bug fix +* portability improvement +* etc. + +We seek to preserve the "**original source file**", for historical purposes, +by preserving the original source code (usually as `prog.orig.c`). + +**IMPORTANT NOTE**: The "**original source file**", because it is a historic +record, should **NOT** be modified. + +Unless one can demonstrate that a mistake has been made regarding +the "**original source file**" and that, for some reason, the file +is **NOT** the original source code, please do **NOT** attempt to modify it. + +**IMPORTANT NOTE**: If you believe that the "**original source file**" is +**NOT** the original source code, then plesse open an +[IOCCC issue](https://github.com/ioccc-src/winner/issues) and describe the +problem to the [IOCCC judges](judges.html), including what you believe +is the correct "**original source file**". + +**FYI**: To determine the difference between the "**original source file**" and +the source code as it is now now, try: + +``` + make diff_orig_prog +``` + +See the +FAQ on "[what changed](#what_changed)" +for more information and make rules relating to "**original source file**" differences. + +Jump to: [top](#) + + +
+### Q: Why were some filenames changed? +
+ +The reasons this was done varies. One of the earliest changes was making the old +`.hint` or `.text` files `README.md` files. The first time this was done was for +`2019/README.text` and `2020/README.text` with [commit +87c41a787fa334f6696ec8f23284eacea63e3e89](https://github.com/ioccc-src/temp-test-ioccc/commit/87c41a787fa334f6696ec8f23284eacea63e3e89). +With [commit +77fb0f11a2ddc8584a1ebe8d68fb0cccf3b959a6](https://github.com/ioccc-src/temp-test-ioccc/commit/77fb0f11a2ddc8584a1ebe8d68fb0cccf3b959a6)`index.html` +and `hint.html` files were removed in favour of `README.md` files; +[commit +851e191519953c743cdd363dc19099e89210319c](https://github.com/ioccc-src/temp-test-ioccc/commit/851e191519953c743cdd363dc19099e89210319c) +renamed `hint.txt` and `hint.text` to `README.md`. There were most likely other +commits that fixed some issues with this. + +Other files were also renamed, though, sometimes being converted to markdown as +well. Shell scripts were often renamed to end with `.sh` to indicate it is a +shell script and to help browsers know how to deal with it (this was before the +method of how to display files was devised). + +Another example is for more consistency, sometimes to do with alternate code and +other times something else. + +There were certainly other reasons as well. + +Jump to: [top](#) + +
+
+ + +
+## Section 9: Helping the IOCCC +
+ +Jump to: [top](#) + + +
+
+### Q: How can I help the IOCCC? +
+
+ +#### We welcome your help in fixing IOCCC entries + +The [known bugs](bugs.html) file, order by IOCCC years, contains a +list of known bugs & (mis)features. If you are looking for an IOCCC entry +to try and fix, this file is a good place to start. + +See the +FAQ on "[fixing an entry](#fix_an_entry)" +for information on how to submit a fix to +an IOCCC entry. Before you consider trying to fix an IOCCC winning entry, +please check the [known bugs](bugs.html) file for the IOCCC entry +in question. Note that in several cases what you may have discovered, +while a (mis)feature is not considered a bug and should **not be fixed**. +In cases where the bug is known, the entry's [known bugs](bugs.html) file +section may offer you important fixing clues. + +#### We welcome your help on fixing the IOCCC website + +Jump to: [top](#) + + +
+
+
+### Q: Is there a list of known bugs and (mis)features of IOCCC entries? +
+
+
+ +Yes! Please see [bugs.html](bugs.html) for a list of known bugs and/or issues of a +variety of kinds. + +Note that just because an entry is not in the bugs file does not mean there is +not an issue and note that some issues are simply missing files, dead URL(s) or +something like that. + +Jump to: [top](#) + + +
+
+### Q: How can I submit a fix to an IOCCC entry? +
+
+ +If you see a problem with an IOCCC entry, first check the [known bugs](bugs.html) +file. In some cases what you might think of as a bug is instead a known +feature. In some cases the bug is known, but no fix has ever been submitted. +In other cases you may have found a new problem. + +If you do have a fix, and the [known bugs](bugs.html) file **does not recommend +against fixing it**, then please consider opening a [GitHub pull +request](https://github.com/ioccc-src/winner/pulls) against the master +[branch](https://github.com/ioccc-src/winner/branches) of the [ioccc-src/winner +repo](https://github.com/ioccc-src/winner). + +BTW: A **problem** is not limited to the code itself. Fixing typos in files +such as "_index.html_" files, fixing issues in a "_Makefile_", or otherwise +correcting an IOCCC entry is **VERY MUCH WELCOME**! Please use the same +[GitHub pull request](https://github.com/ioccc-src/winner/pulls) process against +the [master branch](https://github.com/ioccc-src/winner/branches) of the +[ioccc-src/winner repo](https://github.com/ioccc-src/winner). + +**NOTE**: some of the issues in the [bugs.html](bugs.html) file includes just missing +files and we welcome these too! + +**Please also help us fix typos and / or otherwise improve the write-up** of how +IOCCC winning entries are presented! + +In any event we will happily add you to the +[thanks](thanks-for-help.html) file for your help! + +And of course, an IOCCC author may update their own entries +(metadata as well as source code and any extra files) by opening a +[GitHub pull request](https://github.com/ioccc-src/winner/pulls) +against the [master branch](https://github.com/ioccc-src/winner/branches) +of the [ioccc-src/winner repo](https://github.com/ioccc-src/winner). + +Please see the +FAQ on "[fixing an entry](#fix_an_entry)". +See also the +FAQ on "[GitHub pull request](#pull_request)" +for more information about pull requests. + +Note that we're much more inclined to accept an author's fixes but the judges +have the final say in the matter. + +Jump to: [top](#) + + +
+
+### Q: How do I make a pull request to the GitHub repo? +
+
+ +First, if you do not already have a GitHub account or you have not installed an +ssh key to your account you must do so. For this we will assume you do not have +a GitHub account. For the steps following creating a GitHub account you will +have to be logged into your account. + +To help you out here is a navigation menu in this FAQ entry: + +- [Creating a GitHub account](#creating-a-github-account) +- [Installing an ssh key to GitHub](#installing-an-ssh-key) +- [Forking the IOCCC winner repo](#forking-the-ioccc-winner-repo) +- [Cloning the IOCCC winner repo](#cloning-the-ioccc-winner-repo) +- [Making changes, fixes etc.](#making-changes-fixes-etc) +- [Committing your changes](#committing-your-changes) +- [Opening a pull request](#opening-a-pull-request) +- [What to do after a merge](#what-to-do-after-a-merge) + + +#### Creating a GitHub account + +Go to [GitHub](https://github.com/) and click on 'Sign up'. Follow the +instructions. Once you've completed this task make sure you log in to GitHub. + +#### Installing an ssh key to GitHub + +Assuming you do not have an ssh key you should go to the command prompt and +type (if you already have one and are okay using it for GitHub you can use that +one): + +``` + ssh-keygen -t rsa -b 4096 -C "luser@example.com" +``` + +where `luser@example.com` is the email you want associated with your key. +Follow the instructions. It will tell you the key files. + +Once you have an ssh key you need to go to your [account +settings](https://github.com/settings/profile). Once there, in the menu +on the left you should see the item _SSH and GPG keys_. Click that and then +click (on the right side) the button that says _New SSH key_. You will see that +you have to specify a title, the key type and the PUBLIC key. Put whatever title +you want and keep the key type as _Authentication Key_. Now you need to put the +PUBLIC key in. + +If you used an rsa key the default file will likely be found in: +`~/.ssh/id_rsa.pub`. If you used a different algorithm the file name will be +different. For instance if you used `ed25519` the default PUBLIC key file would +be `~/.ssh/id_ed25519`. If, like some people do, you have a separate key for +GitHub, it could be anything you wish, as long as it's in `~/.ssh`. For instance +it might be `~/.ssh/github.pub`. + +Whatever the key file is, copy the contents and paste it into the GitHub field +labelled _Key_. Once you have done so click on _Add SSH key_. + +#### Forking the IOCCC winner repo + +Open in your browser the link: +. You now should follow the +instructions in forking the repo. + + +#### Cloning the IOCCC winner repo + +Once you have forked the repo you are ready to clone it to your system. For +instance Cody Boone Ferguson has the GitHub handle _xexyl_ so he would type in: + +``` + git clone https://github.com/xexyl/winner [target_dir] +``` + +Once that is completed you will need to change to that directory. The default +directory would be the name of the repo but if you specified a target directory +it will be that. For instance using the above example you might do: + +``` + cd winner +``` + +You're ready to make your changes now! + + +#### Making changes, fixes etc. + +Here you must use your wits, knowledge, creativity and whatever else you have. +Let's say that Cody wants to update his file +[2020/ferguson1/play.sh](%%REPO_URL%%/2020/ferguson1/play.sh) script. He would open it in +his editor of choice (in his case vim) and make the changes. He would then make +sure (as there is a last updated date) to update the last updated date. For +instance he might add the following: + +> BTW: did you know that some people believe in snake human hybrids? It's true! See +> http://www.macroevolution.net/snake-human-hybrids.html and have a laugh, shock +> or an exercise in sibilance! + +Then, assuming that the date is 1 March 2024, he would update the line that +starts with `# Last updated: ` to refer to `01 March 2024` rather than what it +is now (at the time of writing this), `15 April 2023`. + +But what if he wanted to add a file? He'd create the file and then type: + +``` + git add foo +``` + +where _foo_ is the file to add. + +When he's ready to make a commit he would need to create a new branch for the +pull request. + +#### Committing your changes + +First, as an aside, if this is your first pull request (which we assume is if you're +reading this :-) ) you need to make sure that you can push changes to GitHub +with your ssh key. To do this you need to do: + +``` + ssh -T git@github.com +``` + +Cody would see: + +> Hi xexyl! You've successfully authenticated, but GitHub does not provide shell access. + +Now, assuming that the forked repo is +, you'd type: + + +``` + git remote set-url origin git@github.com:xexyl/winner.git +``` + +Now you'd be ready to make your commits. + +Before doing anything else, however, a new branch needs to be created. +Continuing the example above for +[2020/ferguson1/play.sh](%%REPO_URL%%/2020/ferguson1/play.sh), it might be that: + + +``` + git checkout -B human-snakes +``` + +This would change the branch to the newly created branch `human-snakes` branch. +Now Cody could commit the changes: + +``` + git commit play.sh # if specifying specific files + git commit -a # if committing everything +``` + +He could also have done: + +``` + git add play.sh + git commit +``` + +In any case this would open an editor (in his case vim) to write a commit log. +It is recommended that the first line is <=51 chars and the next line is blank. +Then if necessary add a description for the log. For instance the above might +warrant the log: + +``` + Add fun link to 2020/ferguson1/play.sh + + Did you know some people believe in snake human hybrids? I added a link to the + script that discusses this and gives supposed examples. +``` + +Now a pull request has to be opened. + + +#### Opening a pull request + +To do this depends on the branch name. Assuming the branch from above, +`human-snakes`, you would type: + +``` + git push --set-upstream origin human-snakes +``` + +This might show: + +``` + Enumerating objects: 9, done. + Counting objects: 100% (9/9), done. + Delta compression using up to 10 threads + Compressing objects: 100% (5/5), done. + Writing objects: 100% (5/5), 739 bytes | 147.00 KiB/s, done. + Total 5 (delta 4), reused 0 (delta 0), pack-reused 0 + remote: Resolving deltas: 100% (4/4), completed with 4 local objects. + remote: + remote: Create a pull request for 'human-snakes' on GitHub by visiting: + remote: https://github.com/xexyl/winner/pull/new/human-snakes + remote: + To github.com:xexyl/winner.git + * [new branch] human-snakes -> human-snakes + branch 'human-snakes' set up to track 'origin/human-snakes'. +``` + +The link referred to above would then be opened to open a pull request. Just +follow the instructions at this point. If however it does not show a link it is +likely because the branch already exists in your GitHub account (for the repo). +In this case you can open the link: + which might show something +like: + +``` + xexyl:human-snakes had recent pushes 1 minute ago +``` + +and to the right of it you would see a button that says _Compare & pull request_ +which you could click on. Do that and follow the instructions. + +An important note is if you have more than one pull request opened it'll only +show the branch name as the summary. You should in that case copy paste the log +you put in into the website. For instance the line (on the website) _Add a +title_ could have: + +> Add fun link to 2020/ferguson1/play.sh + +and then the text field that is labelled _Add a description_ would have: + +> Did you know some people believe in snake human hybrids? I added a link to the +> script that discusses this and gives supposed examples. + +Once you've done this you should click on _Create pull request_. + +IMPORTANT NOTE: although the [Judges](https://www.ioccc.org/judges.html) will +give more deference to the authors of edited entries the +[Judges](https://www.ioccc.org/judges.html) also retain the final editorial say +in the matter. + + +#### What to do after a merge + +When the judges have merged the pull request you now need to make sure your fork +has the merge. To do this from the command line, assuming the fork in the above +example, you would type: + +``` + git checkout master && git pull https://github.com/ioccc-src/winner.git master && git push origin master +``` + +This will merge your pull request to your fork. + +Jump to: [top](#) + + +
+
+### Q: How can I report an IOCCC website problem? +
+
+ +If you discover a problem with the IOCCC website that is related +to a particular IOCCC entry, please see the +FAQ on "[report entry bug](#report_bug)" +for information about reporting a bug in an IOCCC entry, and see the +FAQ on "[fixing an entry](#fix_an_entry)" +for information on how to submit a fix to an IOCCC entry. + +If you discover a problem with the IOCCC website (such as a broken link, which +may or may not be specific to a particular IOCCC entry) that is **not related +to a particular IOCCC entry**, the best way you can help is to submit a fix to +the IOCCC website. See the +FAQ on "[fixing the website](#fix_web_site)" +for information on submitting fixes +to the IOCCC website. + +If you do not have an IOCCC website fix, and just wish to report a general IOCCC +website problem, we ask that you first look at the [IOCCC +issues](https://github.com/ioccc-src/winner/issues) to see if the problem has +already been reported. If it has been reported, feel free to add a comment to +the issue. Otherwise, if you do not see the same issue reported, then feel free +to [open a new IOCCC website issue](https://github.com/ioccc-src/temp-test-ioccc/issues/new?assignees=&labels=website&projects=&template=website_issue.yml&title=%5BWebsite%5D+%3Ctitle%3E). + +Jump to: [top](#) + + +
+### Q: How can I submit a fix to the IOCCC website? +
+ +For IOCCC website problems that relate to a particular IOCCC entry, please +see the +FAQ on "[fixing an entry](#fix_an_entry)" +for information on how submit a fix to an IOCCC entry. + +You may open a [GitHub pull request](https://github.com/ioccc-src/winner/pulls) +against the [master branch](https://github.com/ioccc-src/winner/branches) +of the [ioccc-src/winner repo](https://github.com/ioccc-src/winner) +to submit a fix. + +Please see the +FAQ on "[fixing an entry](#fix_an_entry)". +See also the +FAQ on "[GitHub pull request](#pull_request)" +for more information about pull requests. + +#### Some HTML files should NOT be directly modified + +Nearly all HTML files on the [IOCCC website](https://www.ioccc.org) +are built from [markdown](https://daringfireball.net/projects/markdown/) files. +If you see lines containing: + +``` + + + + + +``` + +This means that the file is generated by a tool from a [bin directory tool](bin/index.html). +You should **NOT** attempt to modify the file. + +You may also find lines slightly below the above set that suggest another file to edit. +For example, in [contact.html](contact.html), one may read: + +``` + + + + + +``` + +This means that you could consider editing the referenced markdown file +AND then run `make www` from the top level directory in your IOCCC pull +request. There are quicker ways but to be sure you get +everything built you should do this. If you modified a markdown and you do not +see the same file as a html file then you did not complete the fix. + +Please see the +FAQ on "[fixing an entry](#fix_an_entry)". + +See also the +FAQ on "[GitHub pull request](#pull_request)" +for more information about pull requests. + +In some cases, the HTML file is **NOT** based on markdown content, but instead +came from JSON and other data files. So instead of the above reference to a +markdown file, you will read: + +``` + + + + + + + +``` + +This means there is **NOT even a markdown file to edit**. Instead one must +modify JSON files and/or change a [bin directory tool](bin/index.html). + +If this happens, consider opening up an [IOCCC issue](https://github.com/ioccc-src/winner/issues) +and ask for help. See +FAQ on "[fixing an entry](#fix_an_entry)" +for information on opening up an IOCCC issue. + +Jump to: [top](#) + + +
+### Q: How can I correct or update an IOCCC author's information? +
+ +You may correct or update IOCCC author information by submitting a +GitHub pull request that modifies an author's `author_handle.json` file. + +For example, if a given `author_handle.json` file contained: + +``` + "url" : "https://www.example.com/employee/username", +``` + +and you knew that the author has long ago left the `www.example.com` company, +and that they have a new faculty web page at `www.example.edu`, then you should +submit a GitHub pull request to change the above line to: + +``` + "url" : "https://www.example.edu/faculty/deartment/user.name", +``` + +Authors of IOCCC winning entries are kept in JSON files of the form: + +``` + author/author_handle.json +``` + +where `author_handle` is an author handle. + +See the +FAQ on "[author handle](#author_handle_faq)" +for more information about author handles. + +See the +FAQ on "[author_handle.json](#author_json)" +for information about the contents of these JSON files and how they are used. + +See the +FAQ on "[finding author handles](#find_author_handle)" +for how to find an _author_handle_. + +You may update IOCCC author information in a `author_handle.json` file +by [submitting a pull request](#pull_request) +against the [master branch](https://github.com/ioccc-src/winner/branches) +of the [ioccc-src/winner repo](https://github.com/ioccc-src/winner). + +See the +FAQ on "[GitHub pull request](#pull_request)" +for more information. + +**IMPORTANT NOTE**: As these files are JSON you should verify that +they are validly formed (e.g., you didn't make a typo). + +Before you form your GitHub pull request that modifies a +`author_handle.json` file, please run the `make www` command. This +unfortunately takes quite a while but it is the safest way to do +it. So you may wish to test your edits by running the somewhat +quicker `make quick_www` as this can speed up your testing. + +The `make quick_www` rule will update the `authors.html` and +`location.html` pages and it will also check the timestamps of the `index.html` +files versus the `README.md` files. Since they were touched and thus the +timestamp was updated, the +[bin/quick-readme2index.sh](%%REPO_URL%%/bin/quick-readme2index.sh) tool would +only worry about those two files. This greatly speeds things along while testing. +Nevertheless, doing a final `make www` is still recommended best practice +before you form your pull request. + +Please see +FAQ on "[fixing an entry](#fix_an_entry)". + +See also the +FAQ on "[GitHub pull request](#pull_request)" +for more information about pull requests. + + +#### Important note about **XX - Anonymous location**: + +Unless you are the author who originally selected the **XX - Anonymous +location**, please do not attempt to change an **XX - Anonymous +location** without the permission of the original author, as sometimes they +want to have the location known but not their name and/or other details. + + +
+#### PLEASE HELP us identify proper locations for IOCCC authors +
+ +If you know the location of an author listed under: + +      **[ZZ - Unknown location](location.html#ZZ)** + +or if you find IOCCC author location that is incorrect, +then **please submit a pull request**, +or at least [inform the IOCCC judges](contact.html). + +**FYI**: The [ZZ - Unknown location](location.html#ZZ) is used for +historic winning authors whose location or country is not known, +whereas the [XX - Anonymous location](location.html#XX) is used when the +winning author does **not wish to disclose their location**. + +The contents of these JSON files contain the best known information +about authors of IOCCC entries. See +FAQ on "[author_handle.json](#author_json)" +for information about the contents of these JSON files and how they are used. + +For example, if a given `author_handle.json` file contained: + +``` + "location_code" : "ZZ", +``` + +and you knew that the author was located in [Australia](location.html#AU) +(location code **AU**), we encourage you to submit a **GitHub pull +request** to change that line to: + +``` + "location_code" : "AU", +``` + +See the +FAQ on "[fixing author information](#fix_author)" +for information about how to change author location codes. + +Jump to: [top](#) + + + + +We would appreciate if you try to fix the broken (the link goes nowhere) or wrong +(the link goes to something that clearly is not the original intent) web link. +If wish to fix such links, you may open a GitHub pull request as described in +FAQ on "[fixing the website](#fix_web_site)". +In the case of dead links or invalid links it doesn't matter +if it's a specific winner or not; the procedure is the same: open a pull request +to fix the problem. See also the +FAQ on "[GitHub pull request](#pull_request)" +for more information about pull requests. + +As far as how to find the updated link you can try using the [Internet Wayback +Machine](https://web.archive.org) and see if you can find the last non 4xx non +3xx page. Note, however, that just because it redirects, does not mean it's not +valuable. Other times you might find it with a web search. + +Some links were changed to more recent URLs by doing this exact +same thing. Some links, while they were a valid web page, no longer +reach the intended web page (for example when the domain is sold +and the new domain owner's content no longer provides the content +that was originally intended .. and while the content of the web +page may be humorous to some, the original content may have literally +gone "up in smoke"). + +In cases where the original content is lost, try searching for it on +the [Internet Wayback Machine](https://web.archive.org). When searching +look back for dates that are around the year of given IOCCC contest. +If you do find the original content in Internet archive history, +please consider submitting a change to replace the link accordingly. + +If there is no alternative that you can find you might want to remove the link +instead by replacing the link with just phrase of text. For example, +if the text in some `index.html` file was: + +``` + See the [author's description of the program](https://example.com) for more information. +``` + +Assuming that the author's description cannot be found in the +[Internet Wayback Machine](https://web.archive.org) archive, then +replace that text with: + +``` + See the **author's description of the program** (sorry the content is no longer available) for more information. +``` + +If you just wish to report the bad link issue, see +FAQ on "[report website problem](#report_web_problem)". + +Jump to: [top](#) + + +
+
+### Q: How can I support the IOCCC? +
+
+ +The [IOCCC judges](judges.html) run the IOCCC entirely out of +their own funds. This includes paying for IOCCC related hardware, +services, registration, software and related technical items. + +There is **NO** requirement for anyone to support the [IOCCC](index.html). +Nevertheless, it has been shown that receiving **anonymous** gifts +provides the [IOCCC judges](judges.html) with a nice +[dopamine](https://en.wikipedia.org/wiki/Dopamine) +boost, and happy [IOCCC judges](judges.html) help make the IOCCC +better for everyone. :-) + +If you wish to express your support and/or appreciation for our +efforts, we suggest making an **Anonymous** gift via the +[IOCCC Amazon wishlist](https://www.amazon.com/hz/wishlist/ls/3HSNTEL8RQ1M0?ref_=wl_share). + +Jump to: [top](#) + + +
+
+
+
+### Q: I deobfuscated some entry code, may I contribute the source? +
+
+
+
+ +**PLEASE NOTE**: **many [winning authors](authors.html)** have unobfuscated code +of their **own entries** and you should look for this first, often on GitHub or on +their website; see the FAQ on [how to find more information about a winning +author of an entry](#author-information) for how you might find this +information. We ask you to, if you can find them, please ask them what they +think as they can often provide invaluable information; this is less of an issue +for fixes of bugs - not features - found in the [bugs.html](bugs.html) file. + +The [IOCCC judges](judges.html) welcome those who wish to contribute a +**deobfuscated** version of a winning IOCCC entry: from either the [author or +authors](authors.html) (**which is much, much preferred**) or from people such +as yourself (assuming you are not the author :-) ) who are willing to contribute +**deobfuscated** code. We also welcome contributions to improve existing +**deobfuscated** code. You might wish to look at their URL or alt URL (see below +for more details) **first** as quite a few [authors](authors.html) have provided +unobfuscated code of their entries and this is far more fair to the [winning +authors](authors.html) (and it is much more likely to be identical functionality +as well, though many [authors](authors.html) are experienced and skilled enough +to add features **after or during obfuscation!** and many in fact do). + +**HISTORICAL NOTE**: The IOCCC website has shifted to a more +educational theme: preferring to explain entries rather than hiding +things under the guise of such information being a "_spoiler_". We +now use the term **deobfuscated** instead of "_spoiler_" for this reason, at +least in most cases; other terms might be used, including on a rare occasion +_spoiler_, this depending on context. + +We ask that the **deobfuscated** code be **identical in functionality** +to the winning IOCCC entry code. + +**_PLEASE_ NOTE**: Be aware that IOCCC entry code may contain **extremely subtle and +obscure side effects** (i.e., features). Those wishing to contribute a +**deobfuscated** version of code should **strive to mimic** the original (or +existing) IOCCC entry code as much as possible. Some authors can be contacted +(see above for more details on this) and you could ask them for details and if +possible it would be good to include them in the discussion as well (see below) +as it is **very likely** there are things that will be missed when trying to +deobfuscate the code, some of which might be important to the author. + +To contribute your **deobfuscated** code, please open up a +[Show and tell new discussion](https://github.com/ioccc-src/temp-test-ioccc/discussions/new?category=show-and-tell) +with a title of the form: + +> Enhancement: deobfuscated code for YYYY/dirname + +where "`YYYY/dirname`" refers to the winning IOCCC entry for which you are deobfuscating. + +In the **body** of your new discussion, **PLEASE** provide us with a **URL** of +your **deobfuscated** code, along with whatever notes and/or comments you +think might be helpful. If the author has a GitHub handle **please** mention +them in the discussion (see above part for how you might find out if they have a +GitHub account)! + +If you are providing an improved version of some existing **deobfuscated** code, please +mention that in the **body** of your new discussion as well. + +If there are **limitations** to how well the your **deobfuscated** code mimics +the original (or existing) IOCCC entry code, **PLEASE** mention those **limitations** +in the **body** of your new discussion as well. + +Any questions that may arise will be added as comments to the discussion. + +**SUGGESTION**: **PLEASE** try to make your **deobfuscated** code readable. **PLEASE** +add comments as needed to help the reader of your **deobfuscated** code understand it. + +**SUGGESTION**: Where useful, consider providing, as **C comments**, +code fragments of from the original (or existing) IOCCC +entry code. While it is **NOT** necessary to include the entire +original code as **C comments**, including key parts from the +original (or existing) IOCCC entry code may be helpful +to others who wish to read your **deobfuscated** code. + +If your **deobfuscated** is accepted (in some form), the [IOCCC judges](judges.html) +will be happy to **thank you** for your contribution in the +[thanking people for their help file](thanks-for-help.html). + +The [IOCCC judges](judges.html) will do the rest of the work in integrate your +**deobfuscated** code as an "_alt_" code for the entry **AND** will reference +your **deobfuscated** code in the entry's `index.html` file. We will be +happy to include any whatever notes and/or comments from your new discussion +that be prove helpful. + +**THANK YOU** in advance for your willingness to assist! + +Jump to: [top](#) + + +
+
+### Q: How do I report a bug in an IOCCC entry? +
+
+ +We do not 'maintain' the contest entries as such. The code is made available on an 'AS +IS' basis. If you have a FIX for an entry, we suggest that you submit your fixes in a [GitHub pull +request](https://github.com/ioccc-src/winner/pulls) as we welcome pull requests that have a +minimal impact on the entry while improving the portability, functionality, and/or addressing known problems. + +If you do submit a pull request, we ask that each pull request address just one IOCCC entry at a time. + +Note that just because you have a fix does not mean it'll be accepted. This +might be because the author objects or it doesn't fit in some way or another. Of +course if the entry does not work we'll certainly be more inclined to accept the +fix. If it is accepted we'll be happy to credit you in the +[thanks](thanks-for-help.html) file. If you're a previous author of a winning IOCCC entry we will happily +link to your entries; if you're not we can link to your website if you wish. + +Please see the +FAQ on "[fixing an entry](#fix_an_entry)" +for information on how to submit a fix to an +IOCCC entry. See also the +FAQ on "[GitHub pull request](#pull_request)" +for more information about pull requests. + +Jump to: [top](#) + +
+
+ + +
+## Section 10: Miscellaneous IOCCC +
+ +Jump to: [top](#) + + +
+
+
+### Q: May I mirror the IOCCC website? +
+
+
+ +There are a few steps in mirroring the website: + +0. First of all, open the website on your device, preferably one you can hold +and aim somewhere. +1. Then, turn your device towards a mirror. This should mirror it. :-) +2. If you can, take a picture of the mirror image. It might help if you can put +your device down facing the mirror, so that it is easier to get a picture. + +Okay, backing up, on a more serious note: we are not accepting mirror requests at +this time, sorry. However you are free to fork the [IOCCC winner +repo](https://github.com/ioccc-src/winner). + +Yes we are aware that some people have previously made their own repo of the +winning entries but these **ARE UNOFFICIAL** and **VERY LIKELY** out of date or +incorrect. What's more, this repo is the source of the [**Official** IOCCC +website](https://www.ioccc.org) so whenever a push is made to this repo the +**Official IOCCC website** is updated. When new winners are announced, this will +happen. + +To put it simply, please do **NOT** fork those repos, as they are **UNOFFICIAL** +and certainly **OUT OF DATE**. + +If you do make a new fork of **THIS** repo, we do ask that your fork keep up to +date with the latest changes when possible. Thank you. + +Jump to: [top](#) + + +
+ +
+ +While IOCCC judges look favorably on most requests to use IOCCC material, +we request that you ask the [IOCCC judges](judges.html) first. Of course, if +you're the winner of the entry you can make use of it as you want (make a shirt, +put it on your website etc.). + +Please send your request using the instructions on the [contacting +the IOCCC Judges](contact.html) page. + +Please note that the content of the IOCCC +**Copyrighted and is under the CC BY-SA 4.0 License**. +See the [Copyright](#copyright) at the bottom of IOCCC web pages for more details. + +See +FAQ on "[using IOCCC content](#license)". +For additional information on the [Copyright and CC BY-SA 4.0 License](license.html). + +Jump to: [top](#) + + +
+
+
+### Q: Why do you sometimes use the first person plural? +
+
+
+ +As a precedent for [first person +plural](https://en.wikipedia.org/wiki/Nosism), we may cite [Two-, +Three-, and Four-Atom Exchange Effects in bcc in +3He](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.35.1442) and +the co-authorship of [F. D. C. +Willard](https://en.wikipedia.org/wiki/F._D._C._Willard) as well +as the [APS New Open Access +Initiative](https://journals.aps.org/2014/04/01/aps-announces-a-new-open-access-initiative). + +The number of [IOCCC judges](https://www.ioccc.org/judges.html) has +always been "> 1" such that IOCCC judges often refer to themselves +in the plural, sometimes [in the common +plural](https://en.wikipedia.org/wiki/Plural), sometimes in the +[first person plural](https://en.wikipedia.org/wiki/Nosism), there +may be some who reject such a practice. Therefore please consider +that when you believe that just one of the [IOCCC +judges](judges.html) is in action, you may +consider that [F. D. C. +Willard](https://en.wikipedia.org/wiki/F._D._C._Willard) has been +consulted, agreed, and has authorized the statement thus allowing +the [in the common plural](https://en.wikipedia.org/wiki/Plural) +to be used without offense. + +And while some might claim that [F. D. C. +Willard](https://en.wikipedia.org/wiki/F._D._C._Willard) died in +1982, we suggest that the [Schrödinger's +cat](https://en.wikipedia.org/wiki/Schrödinger%27s_cat) superposition +may still be in effect and the 1982 [report of death was an +exaggeration](https://books.google.com/books?id=ms3tce7BgJsC&lpg=PA134&vq=%22the%20report%20of%20my%20death%20was%20an%20exaggeration%22&pg=PA134#v=onepage&q=%22the%20report%20of%20my%20death%20was%20an%20exaggeration%22&f=false). + +p.s. Here is an image of F. D. C. Willard: + +image of F.D.C.Willard.png + +Jump to: [top](#) + + +
+
+
+
+
+### Q: What is the purpose of the `.top`, `.allyear`, `.year` and `.path` files? +
+
+
+
+
+ +The [.top](%%REPO_URL%%/.top) file resides at the top directory. This file contains the complete list +of IOCCC years. + +Under each IOCCC year, one will find a `.year` file. These files contain directory paths from the top directory, +of the IOCCC entry directories for a given year. For example, see the [1984/.year](%%REPO_URL%%/1984/.year) file. + +The [.allyear](%%REPO_URL%%/.allyear) file contains the contents of all `.year` files for all IOCCC years. + +Under each IOCCC entry directory, you will find a `.path` file. +These files contain the directory path from the top directory. +For example see [1984/anonymous/.path](%%REPO_URL%%/1984/anonymous/.path). + +The .top, .allyear, .year and .path files are generated from the top level Makefile, by: + +``` + make genpath +``` + +Jump to: [top](#) + + +
+### Q: What is the current meaning of the IOCCC terms Author, Entry, and Submission? +
+ +The IOCCC is now attempting to use the following terms: + +- Author + +An _author_ is someone who has submitted an entry that has won the IOCCC. + +An entry can have more than one authors. A number of authors have submitted +entries that have won the IOCCC, sometimes in the same IOCCC contest year. + +**An apology for being inconsistent**: In the past, the IOCCC used the term _winner_ to +refer to what is now an _author_. In a number of historical cases, +such as old rules and old guidelines, terms such as _winner_ may still be +found. Moreover, out of habit, the IOCCC judges sometimes use old +names such as _winner_ when they should use _author_. Sorry (tm Canada)! :-) + +- Entry + +An _entry_ is a _submission_ that won the IOCCC. + +An _entry_ has one or more _authors_. + +An _entry_ includes all of the files needed to compile it, +plus sample input files, a `Makefile`, an `.entry.json` file +describing the entry, a compressed tarball containing all of +files in the entry, etc. Under the IOCCC tree, an _entry_ +that win the IOCCC in year _YYYY_ is located under the +directory `YYYY/entry`. + +**An apology for being inconsistent**: In the past, the IOCCC used the term _winner_ to +refer to what is now an _entry_. In a number of historical cases, +such as old rules and old guidelines, terms such as _winner_ may still be +found. Moreover, out of habit, the IOCCC judges sometimes use old +names such as _winner_ when they should use _entry_. Sorry (tm Canada)! :-) + +- Submission + +A _submission_ is something given to the IOCCC judges +for consideration when the IOCCC is open. + +When the IOCCC is open for submissions, those who register +to enter the IOCCC may use the [mkiocccentry tool](https://github.com/ioccc-src/mkiocccentry) +to package their code into a compressed tarball that may be +uploaded to the [IOCCC submit server](https://submit.ioccc.org). +This compressed tarball is formatted in such a way that +the IOCCC judges do not see who wrote the code. + +A _submission_ that the IOCCC judges deem to have won the IOCCC +becomes an _entry_. Only then do the IOCCC judges look into +the special JSON file to discover who the _author_(s) are. + +**An apology for being inconsistent**: In the past, the IOCCC used the term _entry_ to +refer to what is now a _submission_. In a number of historical cases, +such as old rules and old guidelines, terms such as _entry_ may still be +found. Moreover, out of habit, the IOCCC judges sometimes use old +names such as _entry_ when they should use _submission_. Sorry (tm Canada)! :-) + +Jump to: [top](#) + + +
+
+### Q: Am I allowed to use IOCCC content? +
+
+ +**Disclaimer**: This FAQ is **not a license**, has **no legal +value**, and only highlights some of the key features and terms of +the actual [CC BY-SA 4.0 +license](https://creativecommons.org/licenses/by-sa/4.0/legalcode.en). + +The content of the IOCCC is [Copyrighted and is under the CC BY-SA 4.0 License](#copyright). + +As long as you abide by the terms of the [CC BY-SA 4.0 +License](https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1) +you may copy and redistribute the material in any medium or format +for any purpose, even commercially. + +As long as you abide by the terms of the [CC BY-SA 4.0 +License](https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1) +you may remix, transform, and build upon the material for any +purpose, even commercially. + +This FAQ is an incomplete summary of how you may use IOCCC content. +You should review the [highlights of some of the key features and terms](license.html) +and this may help clarify some aspects of the +[CC BY-SA 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1). + +The [Copyright and CC BY-SA 4.0 License](#copyright) applies to all +IOCCC content. We use this to help ensure that we can all +enjoy hat those working on the IOCCC have proper Attribution +including, of course, the IOCCC winners themselves! It is designed +to help ensure that everyone may enjoy the IOCCC. + +Jump to: [top](#) + + +
+### Q: What is Mastodon and why does IOCCC use it? +
+ +The [IOCCC uses Mastodon](https://fosstodon.org/@ioccc) for news updates, +announcements, and for various other social media purposes. + +**Please follow the [IOCCC on Mastodon](https://fosstodon.org/@ioccc)**. + +> The IOCCC no longer uses twitter, or whatever that someone who appears to have +poor impulse control (allegedly) calls their platform these days. + +The IOCCC prefers to reside in the [fediverse](https://fediverse.info). + +**For help with Mastodon**: + +There is [help with Mastodon](https://mastodon.help) available for +those who might wish to [get started with Mastodon](https://fosstodon.org/deck/getting-started). + +While there are many fine Mastodon server instances out there, the [IOCCC judges](judges.html) +use [fosstodon.org](https://fosstodon.org/about) where lots of fun folk hang out, +and topics like science, technology, [free and open source](https://en.wikipedia.org/wiki/Free_and_open-source_software) +have a good home. The [fosstodon.org](https://fosstodon.org/@fosstodon) folk made the IOCCC feel welcome. + +While using Mastodon is free, the [IOCCC judges](judges.html) are pleased to +[support the Fosstodon Hub](https://hub.fosstodon.org/support/). + +If you have a phone or tablet there is also an official app that you can get +from the App Store or whatever equivalent your device has. Please note that the +app does not at this time seem to give push notifications when someone you +follow posts something so you will have to check the IOCCC feed manually. + +**HINT to mastodon users**: You may wish to refresh the [@IOCCC +mastodon feed](https://fosstodon.org/@ioccc) page and/or mastodon +app from time to time to view IOCCC mastodon updates. + +Jump to: [top](#) + + +
+### Q: How do I set certain tabstops for viewing source code in vi(m)? +
+ +Sometimes an author will state that for best viewing purposes you should have +your tabstop set at say 4 or 8. If you use vim or vi or vim in no compatible +mode you can do this easily: make sure you're in command mode (in most cases you +can hit ESC to do this) and then type the command: + + +``` + :set tabstop=4 +``` + +where `4` is the value you wish to set the tabstop to. + +Jump to: [top](#) + + + + +
+#### Menu on desktops or laptop computers +
+ +The way the menu works on desktops or laptops is that you should simply see the +menu directly without the need of JavaScript or any intervention on your part. +It should look something like: + +screenshot of IOCCC menu on desktops + +Simply move your mouse cursor over the category you want and then click on the +item you wish to view that drops down from the category. + +This is likely how it will appear with a [tablet device in landscape +mode](#tablet_menu), too, unless [JavaScript is +disabled](#no_javascript_menu). + + +
+#### Mobile menus +
+ +If, however, you're on a mobile device, it can vary, depending on the dimensions +and whether or not you have JavaScript enabled. + +
+##### Menus on mobile phones +
+ +For instance, on an iPhone 14 +Pro Max or similar device (in dimensions), you should see at the top right of +every page, something that looks like: + + +screenshot of IOCCC menu on iPhone 14 Pro Max + +In this case click on the icon at the top right corner that looks like: + +menu open icon + +to activate the menu. + +
+##### Menu on mobile devices if JavaScript is disabled +
+ +If JavaScript is disabled on any mobile device, tablet or phone, you should see +the words: + +``` + Please Enable JavaScript +``` + +at the top right corner; clicking on this will take you to the [no JavaScript +menu](nojs-menu.html) which is a plaintext menu. You of course can use this if +you like, even if you do not have JavaScript enabled, by pointing your browser +to . + +
+##### Menus on tablet devices (e.g. iPads) +
+ +With tablets, it likely depends on the orientation you have your device in. If it's +in portrait mode you likely will see the [menu that one will get on a mobile +phone](#mobile_phone_menu). + +If, on the other hand, you are using landscape mode, say on an iPad Pro 11 inch +4th generation, then you will likely see the [menu as you would on a desktop or +laptop](#desktop_menu). + + +
+##### Menus on mobile devices wider than 1024 pixels +
+ +Finally, if you're on a mobile device that is wider than 1024 pixels, you will +very possibly have to **press and hold** the menu icon: + +menu open icon + +to activate it. You can then use it [as you would on a mobile +phone](#mobile_phone_menu). + + +
+##### Browsing the website on mobile devices with a browser bug +
+ +It was noticed that in iOS 16 Safari (both on an iPhone 8 Plus and in simulation +mode in macOS) the menu does not work at all. That is to say one might see: + +browser bug where menu icon does not show up + +Notice how the menu icon is not even there! This happens in both portrait mode +and landscape mode. + +In this case one will have to use the [no JavaScript +menu](#no_javascript_menu). If you have a fix for this that **does NOT +affect the usability of desktops, laptops or other mobile devices**, please +consider fixing it and [opening a pull request](#pull_request) or at +least [report it as an +issue](https://github.com/ioccc-src/temp-test-ioccc/issues/new/choose) (choose +the category _Website issue_). + +Jump to: [top](#) + + +
+### Q: How do I find more information about a winning author of an entry? +
+ +At the top of the index.html file of a winning entry with the author you want +information on, you should see a section called `Author`. All you have to do is +click on the author's name (it's a link) and it will take you to their +information in the [authors.html](authors.html) page. + +There you will find various information including a link to their +[authors.html](authors.html) information which includes various things like +their GitHub account (if known), a URL or alternate UL, mastodon handle, +location (if known and not anonymous location) and a link to their JSON author file. + +**NOTE**: you might wish to search google (or some other search engine) by their +name as sometimes you can find out their GitHub account even if it's not in our +JSON files. + +Of course if you know the author's name you can go directly to +[authors.html](authors.html) and click on their surname's/last name's/second +name's initial and then scroll down (if necessary) to the author in question. + +Jump to: [top](#) + + +
+### Q: What is this cb tool that is mentioned in the IOCCC? +
+ +This was a C beautifier for Unix, both AT&T and Berkeley, but it seems to no +longer be available, code wise, except for Plan 9, but Plan 9 was never used for +judging the IOCCC. A Unix man page for `cb` +[still exists](https://www.ibm.com/docs/en/aix/7.3?topic=c-cb-command). + +Jump to: [top](#) + +
+
@@ -6416,6 +6448,7 @@ Share and enjoy! ☺️ Jump to: [top](#) +
@@ -6501,6 +6534,7 @@ P.S. Part of the inspiration for making the IOCCC a contest goes to the Jump to: [top](#) +
### Q: Why are some years missing IOCCC entries?
@@ -6515,6 +6549,7 @@ make it much more likely for the IOCCC to be held on a yearly basis later on. Jump to: [top](#) +
### Q: What is the history of the IOCCC website? @@ -6711,6 +6746,7 @@ to the [official IOCCC website](https://www.ioccc.org). Jump to: [top](#) +
### Q: How has the IOCCC size limit rule changed over the years? @@ -6781,6 +6817,7 @@ In later years, Rule 2 was split into two parts. These two parts of Rule 2 are: Jump to: [top](#) +
### Q: What is the **Great Fork Merge**?
@@ -6796,6 +6833,7 @@ for more information. Jump to: [top](#) +
### Q: What is an IOCCC BOF? @@ -6811,8 +6849,58 @@ announced in the early years of the IOCCC. Jump to: [top](#) +
+### Q: I do not understand the IOCCC, can you explain it to me? +
+ +The IOCCC stands for the International Obfuscated C Code Contest. +The IOCCC is a C programming contest. + +The goals of the IOCCC are: + +* To write the most Obscure/Obfuscated C program within the rules. +* To show the importance of programming style, in an ironic way. +* To stress C compilers with unusual code. +* To illustrate some of the subtleties of the C language. +* To provide a safe forum for poor C code. :-) +* To have fun with C! + +See the +FAQ on "[start of the IOCCC](#ioccc_start)" +and the +FAQ on "[history of the IOCCC](#website_history)" +for more information the background of the IOCCC. + +See the +FAQ on "[entering the IOCCC](#submit)" +for information on how to enter and submit to the IOCCC. + +If you are still confused, consider the nature of +the [IOCCC rules](next/rules.html) and of the [IOCCC +guidelines](next/guidelines.html). You will see a dose of the technical, +mixed with "nerd humor" (or humour if you prefer 🤓). + +If after all that you are still confused, sorry (tm Canada 😉). +Consider this: While the IOCCC often attempts to be presentable, +it is under no obligation to be wholly understandable. One might +say that to truly understand the IOCCC is problematic. And if +someone did manage to fully understand the IOCCC, then perhaps +this **modified** quote from the [The Hitchhiker's Guide to the +Galaxy](https://en.wikipedia.org/wiki/The_Hitchhiker's_Guide_to_the_Galaxy) +may apply: + +> "There is a theory which states that if ever anyone discovers +exactly what the IOCCC is for and why it is here, it will +instantly disappear and be replaced by something even more bizarre +and inexplicable. +> +> There is another theory which states that this has +[already happened](#great_fork_merge)." 😜 + +Share and enjoy! ☺️ + +Jump to: [top](#) -