From da9064d95b9c01a582d55303fe1ce69198541e3a Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sat, 1 Mar 2025 14:37:13 -0800 Subject: [PATCH] Fixes in rules This includes the FAQ as there is an FAQ about Rule 17. --- faq.html | 114 +++++++++++++++++-------------- faq.md | 120 +++++++++++++++++--------------- next/rules.html | 170 +++++++++++++++++++++++++++------------------- next/rules.md | 177 +++++++++++++++++++++++++++++------------------- 4 files changed, 335 insertions(+), 246 deletions(-) diff --git a/faq.html b/faq.html index 19222a2d5..a5edbe407 100644 --- a/faq.html +++ b/faq.html @@ -922,7 +922,7 @@ FAQ on “submission Makefiles.

Q 0.6: What permissions may my files be and what if I need different permissions?

-

As Rule 17 states, files in your submission tarball MUST be +

Files in your submission tarball MUST be specific permissions. In particular: directories MUST be drwxr-xr-x (i.e. 0755), the optional files, try.sh or try.alt.sh, if provided, MUST be -r-xr-xr-x (i.e. 0555) and all other files MUST be -r--r--r-- (i.e. @@ -931,6 +931,9 @@ specific permissions. In particular: directories MUST be the appropriate place in your Makefile. See the FAQ on “submission Makefile” for more details.

+

See the +FAQ on “Rule 17” +and Rule 17 itself.

Do remember that if your submission requires different filenames, then you MUST make a COPY of them in your Makefile. See also Rule 11.

@@ -1114,10 +1117,11 @@ as how you them to help write you submission in your remarks.md fil

The following are the details behind Rule 17.

TL;DR Rule 17 - Use mkiocccentry(1)

-This is a COMPLEX rule. Violating this rule will cause your submission to REJECTED! -To help you avoid such a rejection, you are HIGHLY ENCOURAGED to use the mkiocccentry(1) tool, -based on the latest release of the mkiocccentry repo, -to form your submission’s xz compressed tarball. +This is a COMPLEX rule. Violating this rule will cause your submission to +be REJECTED! To help you avoid such a rejection, you are HIGHLY ENCOURAGED +to use the mkiocccentry(1) tool, based on the latest release of the +mkiocccentry repo, to form your +submission’s xz compressed tarball.

The mkiocccentry repo @@ -1153,17 +1157,6 @@ additional details of each tool, see its man page, and in some cases, the .

-There is no need to use jparse(1) but the jparse(3) library -library will be linked when compiling the tools as they use various functions -provided by it, and chkentry uses the JSON parser API as well. -

-

-Of course you may invoke jparse(1) if you wish to validate a JSON file but -the only JSON files you might want to validate for the IOCCC are validated -by chkentry(1), and that is what you should use to make sure you conform to -this rule. -

-

The maximum number of extra files is 31. See the maximum number of extra files section below for finer details and the FAQ on “including additional files” @@ -1175,6 +1168,10 @@ Extra files are defined as files that are not the required files (prog.c.auth.json) and files that are also not the optional files (try.sh, prog.alt.c and try.alt.sh).

+

+NOTE: optional filenames are only optional if they are in the submission top +level directory. +

Jump to: top

Rule 17 - The COMPLEX details

@@ -1186,7 +1183,7 @@ The xz compressed tarball filename must be of the form: UUID (see RFC 9562 for details), and where slot_num is a single decimal digit integer -(i.e., >= 0 and < 9). +(i.e., >= 0 and <= 9).

In particular, username is in the form of: @@ -1245,12 +1242,13 @@ and the CommonMark Spec.

The .auth.json file is created by mkiocccentry(1) and it holds information about the author(s) of the submission. It will ONLY be looked at if your -submission wins but it MUST still be valid according to chkentry(1). +submission wins but it MUST still be valid according to jparse(3) AND +chkentry(1).

The .info.json file is created by mkiocccentry(1) and it holds information -about the submission itself. It also MUST be valid according to -chkentry(1). +about the submission itself. It also MUST be valid according to BOTH +jparse(3) AND chkentry(1).

For the complete mkiocccentry(1) process, see the @@ -1262,6 +1260,9 @@ any other tool detects ANY problem, you are HIGHLY

+On the other hand, some issues are errors and you MUST fix those). +

+

If you do use mkiocccentry(1) and you run into a problem, you might see the FAQ on “how to ask a question about the IOCCC rules, guidelines and tools”. @@ -1273,10 +1274,15 @@ page. The xz compressed tarball file MUST be <= 3999971 octets in size.

-When your submission’s xz compressed tarball is uncompressed, -the total size of your submission (the sum of the size of the program, -hints, comments, build and info files) MUST be <= -28314624 octets (27651K) in size. +When your submission’s xz compressed tarball is uncompressed, the total size of +your submission (the sum of the size of the program source code, +remarks/comments, Makefile and all other files) MUST be <= 28314624 +octets (27651K) in size. +

+

+One of the many checks txzchk(1) performs is summing up the total size. Of +course if you manipulate the tarball to get past this you risk violating this +rule.

Your submission’s xz compressed tarball MUST pass the txzchk(1) test. See @@ -1296,13 +1302,14 @@ more details on this tool and the -Your entry may have subdirectories, depending on the depth and total length of -the filenames. Certain directories like .git, RCCS, CVS and .svn are -skipped. For more information, see the guidelines. +Your entry MAY have subdirectories, depending on the depth and total length of +the filenames. Certain directories like .git, RCCS, CVS and .svn +(amongst others) are skipped. For more information, see the +guidelines.

-Filenames in your entry (that is, not including the files generated by the -mkiocccentry(1) tool or the tools it or any other tool invokes) MUST: +With the exception of those generated by the mkiocccentry(1) tool or the tools +it or any other tool invokes, files in your submission MUST:

The chkentry(1) tool will validate these two JSON files, and do other checks -on your submission directory as well, prior to forming the tarball. +on your submission directory as well, prior to mkiocccentry(1) forming the +tarball.

Files and directories in your submission tarball MUST be specific permissions and mkiocccentry(1) does this for you. In particular: directories -MUST be drwxr-xr-x (i.e. 0755), the optional files, try.sh or -try.alt.sh, if provided, MUST be -r-xr-xr-x (i.e. 0555) and all other -files MUST be -r--r--r-- (i.e. 0444). If the files do not have these -permissions, your submission WILL be rejected for violating Rule -17! In addition to mkiocccentry(1) creating and copying the -directories and files with these modes, it also verifies them after the fact and -if they are not correct it is an error. +MUST be drwxr-xr-x (i.e. 0755), the optional files, not counting +prog.alt.c (i.e. try.sh and try.alt.sh), if provided, MUST be +-r-xr-xr-x (i.e. 0555) and all other files MUST be -r--r--r-- (i.e. +0444). If the files do not have these permissions, your submission WILL +be rejected for violating Rule 17! In addition to +mkiocccentry(1) creating and copying the directories and files with these +modes, it also verifies them after the fact and if they are not correct it is an +error.

If you do need different permissions, then see the @@ -1368,9 +1377,10 @@ FAQ on “file permissions”. Also keep in mind

The txzchk(1) tool will also verify file/directory permissions (and many other -things) for you and so will chkentry(1) (along with validating the JSON files -and running semantics checks on them). If these checks fail it is an error -and mkiocccentry(1) will fail. In this case (it fails and you used +things) for you, and so will chkentry(1) (along with other checks on files and +directories in your submission directory, including the two required JSON files, +.auth.json and .info.json). If these checks fail it is an error +and mkiocccentry(1) will abort. In this case (it fails and you used mkiocccentry(1)) it is very possibly a bug; please report it as a bug at the mkiocccentry issues page. @@ -1422,7 +1432,7 @@ created!

Tarballs MUST only create files and directories under the submission directory. They may NOT contain absolute paths (paths that start with /)! -txzchk only checks the submission tarball so you must verify these details +txzchk does NOT check other tarballs so YOU MUST verify these details yourself.

@@ -1449,23 +1459,23 @@ submission will result in violating this rule. MAKE SURE you use the correct release of the repository; you should do this AFTER the contest opens (pull any changes or if you prefer download the repository via the download option at GitHub). See the -FAQ on “obtaining mkiocccentry” +FAQ on “obtaining the latest release of mkiocccentry” for more help on ensuring you do have the most up to date release.

We recommend that you run make and then install the tools (and man pages) via -make install (as root or using sudo(1)) to help you run these tools from +make install (as root or using sudo(8)) to help you run these tools from your submission’s directory (or any other directory). The make install will install in /usr/local. However, you do not have to install them, but in that case you’ll have to run it from the toolkit’s directory or use the correct options to specify the path to the necessary tools, and also specify the path to -your files. +your files, which can be problematic.

-These tools will link in the jparse(3) library and the dbg library and the -dyn_array library; chkentry(1) uses the JSON parser (jparse) to validate -and parse the JSON but the other tools use -parts of the jparse utility functions as well. +These tools will link in the jparse(3) library, the dbg library and the +dyn_array library; chkentry(1) uses the JSON parser (jparse(3)) to +validate and parse the JSON files but the +other tools use parts of the jparse utility functions as well.

If you run into a problem with one or more of these tools, PLEASE report it @@ -1476,7 +1486,7 @@ for help here and also read our FAQ on “mkiocccentry repo bugs”.

-At the risk of stating the obvious: submissions that violate Rule +At the risk of stating the obvious: submissions that violate Rule 17 WILL BE REJECTED, so BE SURE to use the latest release of the mkiocccentry repo, to form and test your submission’s xz compressed tarball. Do NOT assume you have the most diff --git a/faq.md b/faq.md index 62b73d750..963cce9d7 100644 --- a/faq.md +++ b/faq.md @@ -596,7 +596,7 @@ Jump to: [top](#) ### Q 0.6: What permissions may my files be and what if I need different permissions? -As [Rule 17](next/rules.html#rule17) states, files in your submission tarball **MUST** be +Files in your submission tarball **MUST** be specific permissions. In particular: directories **MUST** be `drwxr-xr-x` (i.e. `0755`), the optional files, `try.sh` or `try.alt.sh`, if provided, **MUST** be `-r-xr-xr-x` (i.e. `0555`) and all other files **MUST** be `-r--r--r--` (i.e. @@ -607,6 +607,10 @@ the appropriate place in your Makefile. See the FAQ on "[submission Makefile](#makefile)" for more details. +See the +FAQ on "[Rule 17](#rule17)" +and [Rule 17](next/rules.html#rule17) itself. + Do remember that if your submission requires different filenames, then you **MUST** make a **COPY** of them in your `Makefile`. See also [Rule 11](next/rules.html#rule11). @@ -867,10 +871,11 @@ The following are the details behind [Rule 17](next/rules.html#rule17). ### TL;DR Rule 17 - Use `mkiocccentry(1)`

-This is a **COMPLEX** rule. **Violating this rule will cause your submission to REJECTED!** -To help you avoid such a rejection, you are **HIGHLY ENCOURAGED** to use the `mkiocccentry(1)` tool, -based on the latest release of the [mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry), -to form your submission's xz compressed tarball. +This is a **COMPLEX** rule. **Violating this rule will cause your submission to +be REJECTED!** To help you avoid such a rejection, you are **HIGHLY ENCOURAGED** +to use the `mkiocccentry(1)` tool, based on the latest release of the +[mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry), to form your +submission's xz compressed tarball.

@@ -896,19 +901,6 @@ additional details of each tool, see its man page, and in some cases, the [IOCCC guidelines](next/guidelines.html).

-

-There is no need to use `jparse(1)` but the `jparse(3)` library -library will be linked when compiling the tools as they use various functions -provided by it, and `chkentry` uses the JSON parser API as well. -

- -

-Of course you **may** invoke `jparse(1)` if you wish to validate a JSON file but -the only JSON files you might want to validate for the IOCCC are validated -by `chkentry(1)`, and that is what you should use to make sure you conform to -this rule. -

-

The maximum number of **extra files** is 31. See the [maximum number of extra files section](#max-files) below for finer details and the @@ -923,6 +915,11 @@ and `.auth.json`) and files that are also not the optional files (`try.sh`, `prog.alt.c` and `try.alt.sh`).

+

+**NOTE**: optional filenames are only optional if they are in the submission top +level directory. +

+ Jump to: [top](#) @@ -938,7 +935,7 @@ The xz compressed tarball filename must be of the form: [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier)** (see [RFC 9562](https://datatracker.ietf.org/doc/html/rfc9562) for details), and where _`slot_num`_ is a single decimal digit integer -(i.e., >= `0` and < `9`). +(i.e., >= `0` and <= `9`).

@@ -993,13 +990,14 @@ and the [CommonMark Spec](https://spec.commonmark.org/current/).

The `.auth.json` file is created by `mkiocccentry(1)` and it holds information about the author(s) of the submission. It will **ONLY** be looked at if your -submission wins but it **MUST** still be valid according to `chkentry(1)`. +submission wins but it **MUST** still be valid according to `jparse(3)` **AND** +`chkentry(1)`.

The `.info.json` file is created by `mkiocccentry(1)` and it holds information -about the submission itself. It also **MUST** be valid according to -`chkentry(1)`. +about the submission itself. It also **MUST** be valid according to **BOTH** +`jparse(3)` **AND** `chkentry(1)`.

@@ -1014,6 +1012,10 @@ any other tool detects **ANY** problem, you are **HIGHLY** encouraged to fix it and try again.

+

+On the other hand, some issues are errors and you **MUST** fix those). +

+

If you do use `mkiocccentry(1)` and you run into a problem, you might see the FAQ on "[how to ask a question about the IOCCC rules, guidelines and @@ -1028,10 +1030,16 @@ The xz compressed tarball file **MUST** be <= **3999971** octets in size.

-When your submission's xz compressed tarball is uncompressed, -the total size of your submission (the sum of the size of the program, -hints, comments, build and info files) **MUST** be <= -**28314624** octets (**27651K**) in size. +When your submission's xz compressed tarball is uncompressed, the total size of +your submission (the sum of the size of the program source code, +remarks/comments, Makefile and all other files) **MUST** be <= **28314624** +octets (**27651K**) in size. +

+ +

+One of the many checks `txzchk(1)` performs is summing up the total size. Of +course if you manipulate the tarball to get past this you risk violating this +rule.

@@ -1056,27 +1064,28 @@ repo](https://github.com/ioccc-src/mkiocccentry).

-Your entry may have subdirectories, depending on the depth and total length of -the filenames. Certain directories like `.git`, `RCCS`, `CVS` and `.svn` are -skipped. For more information, see the [guidelines](next/guidelines.html). +Your entry **MAY** have subdirectories, depending on the depth and total length of +the filenames. Certain directories like `.git`, `RCCS`, `CVS` and `.svn` +(amongst others) are skipped. For more information, see the +[guidelines](next/guidelines.html).

-Filenames in your entry (that is, not including the files generated by the -`mkiocccentry(1)` tool or the tools it or any other tool invokes) **MUST**: +With the exception of those generated by the `mkiocccentry(1)` tool or the tools +it or any other tool invokes, files in your submission **MUST**:

*

Be <= **38** characters in length.

*

**NOT** have a leading **`/`**.

*

**NOT** contain a path component of: **`.`** (that is, with the exception of files generated by `mkiocccentry(1)` itself, it must have -**NO** **`.`** an **NO** dot file).

+**NO** dot file including `.` itself).

*

**NOT** contain a path component of: **`..`** (that is, **NO** **`..`**).

*

Match the regular expression `^[0-9A-Za-z]+[0-9A-Za-z_+.-]*$` (again, excluding files generated by `mkiocccentry(1)`).

-*

**NOT** be a directory depth > 4.

+*

**NOT** have a directory depth > 4.

*

**NOT** have a total **path** length > 99 characters.

@@ -1087,23 +1096,25 @@ the additional files that are generated by the `mkiocccentry(1)` tool: *

`.auth.json` which contains information about the author or authors (that will only be looked at if the submission wins).

*

`.info.json` which contains information about the -entry.

+submission.

The `chkentry(1)` tool will validate these two JSON files, and do other checks -on your submission directory as well, _prior to_ forming the tarball. +on your submission directory as well, _prior to_ `mkiocccentry(1)` forming the +tarball.

Files and directories in your submission tarball **MUST** be specific permissions and `mkiocccentry(1)` does this for you. In particular: directories -**MUST** be `drwxr-xr-x` (i.e. `0755`), the optional files, `try.sh` or -`try.alt.sh`, if provided, **MUST** be `-r-xr-xr-x` (i.e. `0555`) and all other -files **MUST** be `-r--r--r--` (i.e. `0444`). If the files do not have these -permissions, your submission **WILL** be rejected for violating [Rule -17](next/rules.html#rule17)! In addition to `mkiocccentry(1)` creating and copying the -directories and files with these modes, it also verifies them after the fact and -if they are not correct it is an **error**. +**MUST** be `drwxr-xr-x` (i.e. `0755`), the optional files, not counting +`prog.alt.c` (i.e. `try.sh` and `try.alt.sh`), if provided, **MUST** be +`-r-xr-xr-x` (i.e. `0555`) and all other files **MUST** be `-r--r--r--` (i.e. +`0444`). If the files do not have these permissions, your submission **WILL** +be rejected for violating [Rule 17](next/rules.html#rule17)! In addition to +`mkiocccentry(1)` creating and copying the directories and files with these +modes, it also verifies them after the fact and if they are not correct it is an +**error**.

@@ -1114,9 +1125,10 @@ FAQ on "[file permissions](#file_perms)". Also keep in mind

The `txzchk(1)` tool will also verify file/directory permissions (and many other -things) for you and so will `chkentry(1)` (along with validating the JSON files -and running semantics checks on them). If these checks fail it is an **error** -and `mkiocccentry(1)` will fail. In this case (it fails and you used +things) for you, and so will `chkentry(1)` (along with other checks on files and +directories in your submission directory, including the two required JSON files, +`.auth.json` and `.info.json`). If these checks fail it is an **error** +and `mkiocccentry(1)` will abort. In this case (it fails and you used `mkiocccentry(1)`) it is very **possibly** a bug; please [report it as a bug at the mkiocccentry issues page](https://github.com/ioccc-src/mkiocccentry/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=%5BBug%5D+%3Ctitle%3E). @@ -1176,7 +1188,7 @@ created!

Tarballs **MUST** only create files and directories _under_ the submission directory. They may **NOT** contain absolute paths (paths that start with `/`)! -`txzchk` only checks the submission tarball so you must verify these details +`txzchk` does **NOT** check other tarballs so **YOU MUST** verify these details yourself.

@@ -1212,25 +1224,25 @@ submission will result in violating this rule. **MAKE SURE** you use the correct release of the repository; you should do this **AFTER** the contest opens (pull any changes or if you prefer download the repository via the download option at GitHub). See the -FAQ on "[obtaining mkiocccentry](#obtaining_mkiocccentry)" +FAQ on "[obtaining the latest release of mkiocccentry](#obtaining_mkiocccentry)" for more help on ensuring you do have the most up to date release.

We recommend that you run `make` and then install the tools (and man pages) via -`make install` (as root or using `sudo(1)`) to help you run these tools from +`make install` (as root or using `sudo(8)`) to help you run these tools from your submission's directory (or any other directory). The `make install` will install in `/usr/local`. However, **you do not have** to install them, but in that case you'll have to run it from the toolkit's directory or use the correct options to specify the path to the necessary tools, and also specify the path to -your files. +your files, which can be problematic.

-These tools will link in the `jparse(3)` library and the `dbg` library and the -`dyn_array` library; `chkentry(1)` uses the JSON parser (`jparse`) to validate -and parse the [JSON](https://www.json.org/json-en.html) but the other tools use -parts of the `jparse` utility functions as well. +These tools will link in the `jparse(3)` library, the `dbg` library and the +`dyn_array` library; `chkentry(1)` uses the JSON parser (`jparse(3)`) to +validate and parse the [JSON](https://www.json.org/json-en.html) files but the +other tools use parts of the `jparse` utility functions as well.

@@ -1243,7 +1255,7 @@ FAQ on "[mkiocccentry repo bugs](#mkiocccentry_bugs)".

At the risk of stating the obvious: submissions that violate [Rule -17](#rule17) **WILL BE REJECTED**, so **BE SURE** to use the latest release of the +17](next/rules.html#rule17) **WILL BE REJECTED**, so **BE SURE** to use the latest release of the [mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry), to form and test your submission's xz compressed tarball. Do **NOT** assume you have the most recent release without pulling or downloading via GitHub and do **MAKE SURE** you diff --git a/next/rules.html b/next/rules.html index daf9add47..6e091392b 100644 --- a/next/rules.html +++ b/next/rules.html @@ -566,7 +566,7 @@ as well as

Rule 0

-Just as C starts at 0, so the IOCCC starts at rule 0. :-) +Just as C starts at 0, so the IOCCC starts at Rule 0. :-)

The “Important IOCCC dates” section above is part of this rule. @@ -578,57 +578,63 @@ The “Important IOCCC dates” section above is part of th

Your submission must be a C program.

+

+You see, the contest is not called the International Obfuscated JSON Contest +(IOJSONC), even if the so-called JSON +spec might be called obfuscated. :-) +

Jump to: top

Rule 2

The size rule requires your submission to satisfy BOTH Rule 2a and Rule 2b:

-

Jump to: top

-
-

Rule 2a

-
-

-The size of your program source should not exceed 4993 bytes. -

If you use the most recently released official IOCCC submission packaging tool (hereby referred to as mkiocccentry(1)), which we STRONGLY recommend you do (see also Rule 17), then the mkiocccentry(1) tool will warn you if there appears to be a Rule 2a violation.

+

Jump to: top

+
+

Rule 2a

+

-The mkiocccentry(1) tool will give you the option of overriding the Rule 2a warning. -Overriding a Rule 2a warning carries a fair amount of risk that your submission -will be rejected. Be sure to consult the IOCCC guidelines -ahead of time if you plan to override the Rule 2a warning. +The size of your program source should NOT exceed 4993 bytes.

-If you do override the Rule 2a warning from the -mkiocccentry(1) tool, or otherwise plan to violate Rule 2a, then -you MUST CLEARLY EXPLAIN THE RATIONALE of why you are doing so in your -remarks.md file. Even if you do explain this in your remarks.md file your -submission may still be rejected. +The mkiocccentry(1) tool will give you the option of overriding the Rule +2a warning. Overriding the Rule 2a warning carries a +fair amount of risk that your submission will be rejected. Be sure to +consult the IOCCC guidelines ahead of time if you plan to +override the Rule 2a warning. +

+

+If you do override the Rule 2a warning from the mkiocccentry(1) +tool, or otherwise plan to violate Rule 2a, then you MUST CLEARLY +EXPLAIN THE RATIONALE of why you are doing so in your remarks.md file. +Even if you do explain this in your remarks.md file you submission may +still be rejected.

You may check your code prior to submission by giving the filename as a command like argument to the iocccsize(1) tool. For example:

-
    ./iocccsize prog.c
+
    iocccsize prog.c

Alternatively, you may use the mkiocccentry(1) option -d to verify that -things check out without having to answer all the questions. See the -FAQ on “how to test your submission without having to answer -questions” -for more details. +things check out okay (i.e. no problems are detected) without having to answer +all the questions. See the +FAQ on “how to test your submission without having +to answer questions” for more details.

Jump to: top

Rule 2b

-When the filename of your program source is given as a command line argument to the latest version -of the official IOCCC size tool (hereby referred to as iocccsize(1)), the -value printed should NOT exceed 2503. +When the filename of your program source is given as a command line argument to +the latest version of the official IOCCC size tool (hereby referred to as +iocccsize(1)), the value printed should NOT exceed 2503.

The source to iocccsize(1) may be found in the @@ -637,25 +643,28 @@ The source to iocccsize(1) may be found in the

If you use the mkiocccentry(1) tool, which we STRONGLY recommend you do (again, see also Rule 17), -then mkiocccentry(1) will invoke iocccsize(1) before packaging your submission. +then mkiocccentry(1) will invoke the iocccsize(1) checks before packaging +your submission.

-The mkiocccentry(1) tool will give you the option of overriding the Rule 2b warning. -Overriding a Rule 2b warning carries a fair amount of risk that your submission -will be rejected. Be sure to consult the IOCCC guidelines -ahead of time if you plan to override the Rule 2b warning. +The mkiocccentry(1) tool will give you the option of overriding the Rule +2b warning. Overriding the Rule 2b warning carries a fair +amount of risk that your submission will be rejected. Be sure to consult the +IOCCC guidelines ahead of time if you plan to override the +Rule 2b warning.

-If you do override the Rule 2b warning from the mkiocccentry(1) tool, -or otherwise plan to violate Rule 2a, then you MUST CLEARLY EXPLAIN THE RATIONALE -of why you are doing so in your remarks.md file. Even if you do explain this in your remarks.md file -your submission may still be rejected. +If you do override the Rule 2b warning from the mkiocccentry(1) +tool, or otherwise plan to violate Rule 2b, then you MUST CLEARLY +EXPLAIN THE RATIONALE of why you are doing so in your remarks.md file. +Even if you do explain this in your remarks.md file your submission may +still be rejected.

You may check your code prior to submission by giving the filename as a command like argument to the iocccsize(1) tool. For example:

-
    ./iocccsize prog.c
+
    iocccsize prog.c

Jump to: top

Rule 3

@@ -673,7 +682,7 @@ for instructions on registering and participating in the IOCCC, as the process h

When the contest is open, an IOCCC judge will email you your submit server -Username and Initial password. This takes some time (maybe even a few days) for an +Username and Initial password. It takes some time (maybe even a few days) for an IOCCC judge to process your registration and email you your initial login and password.

@@ -696,10 +705,10 @@ The IOCCC judges are NOT responsib or for those who wait until the last minute to try to register!

-If you have registered and received by email their +If you have registered and received by email your submit server Username and Initial password from an IOCCC judge, you may upload your submission to -the submit server only while the +the submit server ONLY while the contest is open.

@@ -755,8 +764,8 @@ will become a README.md which will be used to generate an ind

Your source code will be the file prog.c. The compiled binary will be called prog. If you submission requires different filenames, -then modify your submission’s Makefile to COPY (NOT move!) -the files accordingly. +then modify your submission’s Makefile to COPY (NOT move!) the files +accordingly.

See also Rule 5, Rule 18 and Rule 21. @@ -765,19 +774,19 @@ See also Rule 5, Rule 18 and

Rule 5

-

Your submission MUST not modify the content or filename of any part of your +

Your submission must NOT modify the content or filename of any part of your original submission including, but not limited to prog.c, the Makefile -(that we create from your how to build instructions), as well as any data -files you submit.

-

If you submission needs (or wishes :-) ) to modify such content, it MUST first copy the -file to a new filename and then modify that copy.

+as well as any data files you submit.

+

If you submission needs (or wishes :-) ) to modify such content, it MUST +first copy the file to a new filename and then modify that copy.

-You may use your submission to form a copy, or you can make use of your Makefile to form that copy. +You may use your submission (program) to form a copy, or you can make use of +your Makefile to form that copy.

-If you do make a copy and then modify that copy, please be sure that +If you do make a copy and then modify that copy, PLEASE be sure that the clobber rule of your Makefile removes that copy in order to -restore the contents if your submission to its original submission. +restore the contents of your submission to its original submission.

Jump to: top

@@ -813,7 +822,11 @@ permission you obtained.

Please note that the IOCCC size tool, the tools in the mkiocccentry repo and the tools and library in the jparse repo (that the -mkiocccentry repo clones) are +mkiocccentry repo clones) or the +dbg repo (that the mkiocccentry +repo clones) or the dyn_array +repo (that the mkiocccentry +repo clones) are NOT original works, unless of course you’re the respective authors, in which case they are. Of course, neither are any of the previous winning entries, unless of course you’re the winner! :-) @@ -830,14 +843,14 @@ Submissions may only be uploaded to the IOCCC while the contest is open.

-Once the contest is in the judging state (or closed), -you may NOT upload submissions. +Once the contest is in the judging state (or +closed), you may NOT upload submissions.

While the contest is open or in the judging state, -the IOCCC judges may (but are not required to) modify the slot comment of your submission to indicate +the IOCCC judges MAY (but are not required to) modify the slot comment of your submission to indicate that they have received it. If uploaded submission is malformed, the IOCCC judges -may (but are not required to) modify the slot comment accordingly. +MAY (but are not required to) modify the slot comment accordingly.

See the “Important IOCCC dates” section above for when these contest states are scheduled. @@ -850,8 +863,8 @@ See also Rule 17.

Rule 9

-Each person may register ONLY one account and each account may submit up to -and including 10.000000 (ten in base 10) entries per contest. +Each PERSON may register ONLY ONE account and each account may submit up to +and including 10.000000 (ten in base 10) submissions PER contest.

Each submission must be submitted separately.

@@ -885,7 +898,7 @@ it is needed in your submission’s remarks.md file.

Rule 12

Legal abuse of the rules is somewhat encouraged. A submission that, in -the opinion of the judges, violates the rules will be disqualified. +the opinion of the judges, violates the rules WILL BE DISQUALIFIED. Submissions that attempt to abuse the rules MUST try to justify why their rule abuse is legal, in the remarks.md file.

Jump to: top

@@ -893,7 +906,11 @@ their rule abuse is legal, in the remarks.md file.

Rule 13

-7 out of 13 UTF-8 characters in C code agree that this rule number is lucky enough to be a prime number. +7 out of 13 UTF-8 characters in C code agree that this rule number is lucky +enough to be a prime number. +

+

+Fun fact: the fear of the number 13 is called triskaidekaphobia.

Jump to: top

@@ -901,7 +918,7 @@ their rule abuse is legal, in the remarks.md file.

Any C source that fails to compile because of lines with trailing -control-M’s (i.e., lines with a tailing octet 015) might be rejected. +control-M’s (i.e., lines with a trailing octet 015) might be rejected.

Please do NOT put trailing control-M’s on remarks file lines. Please check to be sure, before submitting, that you have removed @@ -913,7 +930,7 @@ any control-M at the end of remark file lines.

In order to register for the IOCCC, you MUST have a valid email address.

-

The judges are not responsible for delays in email, please plan +

The judges are NOT responsible for delays in email, please plan enough time for the exchange of emails so you can upload your submission.

See the @@ -935,8 +952,8 @@ been published may be disqualified.

Your submission must be in the form of xz compressed tarball that mkiocccentry(1) tool would generate. The files, directories, -and paths must conform to the limits imposed by mkiocccentry(1) -including but not limited to their names, count, path length +and paths MUST conform to the limits imposed by mkiocccentry(1) +including but NOT LIMITED to their names, count, path length and directory tree depth.

@@ -948,7 +965,7 @@ Your xz compressed tarball submission file must pass the tests

-Your xz compressed tarball submission file must pass the tests performed by: +Your xz compressed tarball submission filename must pass the tests performed by:

+txzchk(1) uses the fnamchk(1) tool on your tarball to obtain the proper +directory name. If either name is wrong, it will be flagged as an error. +

+

The resulting prog.c file must pass the Rule 2 size checked performed by:

+

+The Makefile must NOT be empty. +

+

+The remarks.md must NOT be empty. +

TL;DR Rule 17 - Use mkiocccentry(1) to form your submission

-

Let the mkiocccentry(1) tool form your xz compressed tarball -submission file and don’t try to override override its checks and -limits in order to be sure you submission conforms to this rule.

+

Let the mkiocccentry(1) tool form your xz compressed tarball submission +file and don’t try to override its checks and limits, in order to be sure you +submission conforms to this rule.

Warning

Using command line flags or input prompts to override checks and limits made by the above mentioned tools is NOT recommended @@ -1001,7 +1028,7 @@ for how to obtain and use the above mentioned tools.

IMPORTANT: See the -FAQ on “Rule17” +FAQ on “Rule 17” for very important details behind this rule.

Jump to: top

@@ -1044,13 +1071,13 @@ Makefile example, renamed as Makefile of course, for help in constr Makefile. See the Makefile section in the guidelines for more details.

-

The target of the Makefile must be called prog. The original +

The target of the Makefile must be called prog. The original C source file must be called prog.c.

To invoke the C compiler, use ${CC}. To invoke the C preprocessor use ${CPP}.

Do NOT assume that . (the current directory) is in the $PATH.

-When make clobber is invoked, we request that submission be restored +When make clobber is invoked, we request that submission directory be restored to its original submission state. For example, any temporary files created during the build process, or during execution should be removed by the clobber rule. @@ -1071,7 +1098,7 @@ available in the $PATH search path.

Rule 21

-

Your submission MUST NOT create or modify files above the current directory +

Your submission MUST NOT create or modify files ABOVE the current directory with the exception of the /tmp and the /var/tmp directories. Your submission MAY create subdirectories below the current directory, or in /tmp, or in /var/tmp provided that . is NOT the first octet in any @@ -1092,6 +1119,11 @@ identify the authors of your code. The judges Peter Honeyman or pretending to be Peter Honeyman) will be grounds for disqualification of your submission.

+

+And don’t assume that we won’t be able to determine your name even if it’s not +obvious, because you stand a significant chance of violating this rule if you +do. +

Yes, Virginia, WE REALLY MEAN IT!

Jump to: top

diff --git a/next/rules.md b/next/rules.md index a213ba187..38e635ff5 100644 --- a/next/rules.md +++ b/next/rules.md @@ -196,7 +196,7 @@ Jump to: [top](#)

-Just as C starts at 0, so the IOCCC starts at [rule 0](#rule0). :-) +Just as C starts at 0, so the IOCCC starts at [Rule 0](#rule0). :-)

@@ -215,6 +215,12 @@ Jump to: [top](#) Your submission must be a C program.

+

+You see, the contest is not called the **International Obfuscated JSON Contest** +(**IOJSONC**), even if the [so-called JSON +spec](https://github.com/xexyl/jparse/blob/master/json_README.md#so-called-json-spec) might be called obfuscated. :-) +

+ Jump to: [top](#) @@ -225,6 +231,12 @@ Jump to: [top](#) The size rule requires your submission to satisfy **BOTH** [Rule 2a](#rule2a) and [Rule 2b](#rule2b): +

+If you use the most recently released official IOCCC submission +packaging tool (hereby referred to as `mkiocccentry(1)`), which we **STRONGLY +recommend you do** (see also [Rule 17](#rule17)), then the `mkiocccentry(1)` +tool will warn you if there appears to be a [Rule 2a](#rule2a) violation. +

Jump to: [top](#) @@ -234,29 +246,23 @@ Jump to: [top](#)

-The size of your program source **should not exceed 4993 bytes**. +The size of your program source **should NOT exceed 4993 bytes**.

-If you use the most recently released official IOCCC submission -packaging tool (hereby referred to as `mkiocccentry(1)`), which we **STRONGLY -recommend you do** (see also [Rule 17](#rule17)), then the `mkiocccentry(1)` -tool will warn you if there appears to be a [Rule 2a](#rule2a) violation. +The `mkiocccentry(1)` tool will give you the option of overriding the [Rule +2a](#rule2a) warning. Overriding the [Rule 2a](#rule2a) warning carries a +**fair amount of risk that your submission will be rejected**. Be sure to +consult the [IOCCC guidelines](guidelines.html) ahead of time if you plan to +override the [Rule 2a](#rule2a) warning.

-The `mkiocccentry(1)` tool will give you the option of overriding the [Rule 2a](#rule2a) warning. -Overriding a [Rule 2a](#rule2a) warning carries a **fair amount of risk that your submission -will be rejected**. Be sure to consult the [IOCCC guidelines](guidelines.html) -ahead of time if you plan to override the [Rule 2a](#rule2a) warning. -

- -

-If you do override the [Rule 2a](#rule2a) warning from the -`mkiocccentry(1)` tool, or otherwise plan to violate [Rule 2a](#rule2a), then -you **MUST CLEARLY EXPLAIN THE RATIONALE** of why you are doing so in your -`remarks.md` file. **_Even if you do_ explain this in your `remarks.md` file your -submission may still be rejected**. +If you do override the [Rule 2a](#rule2a) warning from the `mkiocccentry(1)` +tool, or otherwise plan to violate [Rule 2a](#rule2a), then you **MUST CLEARLY +EXPLAIN THE RATIONALE** of why you are doing so in your `remarks.md` file. +**_Even if you do_ explain this in your `remarks.md` file you submission may +still be rejected**.

@@ -265,18 +271,17 @@ as a command like argument to the `iocccsize(1)` tool. For example:

``` - ./iocccsize prog.c + iocccsize prog.c ```

Alternatively, you may use the `mkiocccentry(1)` option `-d` to verify that -things check out without having to answer all the questions. See the -FAQ on "[how to test your submission without having to answer -questions](../faq.html#mkiocccentry_test)" -for more details. +things check out okay (i.e. no problems are detected) without having to answer +all the questions. See the +FAQ on "[how to test your submission without having +to answer questions](../faq.html#mkiocccentry_test)" for more details.

- Jump to: [top](#) @@ -285,9 +290,9 @@ Jump to: [top](#)

-When the filename of your program source is given as a command line argument to the latest version -of the official IOCCC size tool (hereby referred to as `iocccsize(1)`), the -value printed **should NOT exceed _2503_**. +When the filename of your program source is given as a command line argument to +the latest version of the official IOCCC size tool (hereby referred to as +`iocccsize(1)`), the value printed **should NOT exceed _2503_**.

@@ -298,21 +303,24 @@ The source to `iocccsize(1)` may be found in the

If you use the `mkiocccentry(1)` tool, which we **STRONGLY recommend you do** (again, see also [Rule 17](#rule17)), -then `mkiocccentry(1)` will invoke `iocccsize(1)` before packaging your submission. +then `mkiocccentry(1)` will invoke the `iocccsize(1)` checks before packaging +your submission.

-The `mkiocccentry(1)` tool will give you the option of overriding the [Rule 2b](#rule2b) warning. -Overriding a [Rule 2b](#rule2b) warning carries a **fair amount of risk that your submission -will be rejected**. Be sure to consult the [IOCCC guidelines](guidelines.html) -ahead of time if you plan to override the [Rule 2b](#rule2b) warning. +The `mkiocccentry(1)` tool will give you the option of overriding the [Rule +2b](#rule2b) warning. Overriding the [Rule 2b](#rule2b) warning carries a **fair +amount of risk that your submission will be rejected**. Be sure to consult the +[IOCCC guidelines](guidelines.html) ahead of time if you plan to override the +[Rule 2b](#rule2b) warning.

-If you do override the [Rule 2b](#rule2b) warning from the `mkiocccentry(1)` tool, -or otherwise plan to violate [Rule 2a](#rule2b), then you **MUST CLEARLY EXPLAIN THE RATIONALE** -of why you are doing so in your `remarks.md` file. **_Even if you do_ explain this in your `remarks.md` file -your submission may still be rejected**. +If you do override the [Rule 2b](#rule2b) warning from the `mkiocccentry(1)` +tool, or otherwise plan to violate [Rule 2b](#rule2b), then you **MUST CLEARLY +EXPLAIN THE RATIONALE** of why you are doing so in your `remarks.md` file. +**_Even if you do_ explain this in your `remarks.md` file your submission may +still be rejected**.

@@ -321,7 +329,7 @@ as a command like argument to the `iocccsize(1)` tool. For example:

``` - ./iocccsize prog.c + iocccsize prog.c ``` @@ -347,7 +355,7 @@ for instructions on registering and participating in the IOCCC, as the process h

When the contest is **[open](../faq.html#open)**, an [IOCCC judge](../judges.html) will email you your [submit server](https://submit.ioccc.org) -**Username** and **Initial password**. This takes some time (maybe even a few days) for an +**Username** and **Initial password**. It takes some time (maybe even a few days) for an [IOCCC judge](../judges.html) to process your registration and email you your initial login and password.

@@ -374,10 +382,10 @@ or for those who wait until the last minute to try to register!

-If you have [registered](register.html) and received by email their +If you have [registered](register.html) and received by email your [submit server](https://submit.ioccc.org) **Username** and **Initial password** from an [IOCCC judge](../judges.html), you may upload your submission to -the [submit server](https://submit.ioccc.org) only while the +the [submit server](https://submit.ioccc.org) **ONLY** while the contest is **[open](../faq.html#open)**.

@@ -447,8 +455,8 @@ will become a `README.md` which will be used to generate an `index.html` file.

Your source code will be the file `prog.c`. The compiled binary will be called `prog`. If you submission requires different filenames, -then modify your submission's `Makefile` to **COPY** (**NOT** move!) -the files accordingly. +then modify your submission's `Makefile` to **COPY** (**NOT** move!) the files +accordingly.

@@ -463,22 +471,22 @@ Jump to: [top](#) ## Rule 5 -Your submission **MUST** not modify the content or filename of any part of your +Your submission must **NOT** modify the content or filename of any part of your original submission including, but not limited to `prog.c`, the `Makefile` -(that we create from your how to build instructions), as well as any data -files you submit. +as well as any data files you submit. -If you submission needs (or wishes :-) ) to modify such content, it **MUST** first copy the -file to a new filename and then modify that copy. +If you submission needs (or wishes :-) ) to modify such content, it **MUST** +first copy the file to a new filename and then modify that copy.

-You may use your submission to form a copy, or you can make use of your `Makefile` to form that copy. +You may use your submission (program) to form a copy, or you can make use of +your `Makefile` to form that copy.

-If you do make a copy and then modify that copy, please be sure that +If you do make a copy and then modify that copy, **PLEASE** be sure that the `clobber` rule of your `Makefile` removes that copy in order to -restore the contents if your submission to its original submission. +restore the contents of your submission to its original submission.

@@ -529,7 +537,11 @@ permission you obtained**. Please note that the IOCCC size tool, the tools in the [mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry) and the tools and library in the [jparse repo](https://github.com/xexyl/jparse/issues) (that the -[mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry) clones) are +[mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry) clones) or the +[dbg repo](https://github.com/lcn2/dbg) (that the [mkiocccentry +repo](https://github.com/ioccc-src/mkiocccentry) clones) or the [dyn_array +repo](https://github.com/lcn2/dyn_array) (that the [mkiocccentry +repo](https://github.com/ioccc-src/mkiocccentry) clones) are **NOT** original works, unless of course you're the respective authors, in which case they are. Of course, neither are any of the previous winning entries, unless of course you're the winner! :-) @@ -553,15 +565,15 @@ while the contest is **[open](../faq.html#open)**.

-Once the contest is in the **[judging](../faq.html#judging)** state (or **[closed](../faq.html#closed)**), -you may **NOT** upload submissions. +Once the contest is in the **[judging](../faq.html#judging)** state (or +**[closed](../faq.html#closed)**), you may **NOT** upload submissions.

While the contest is **[open](../faq.html#open)** or in the **[judging](../faq.html#judging)** state, -the [IOCCC judges](../judges.html) may (but are not required to) modify the slot comment of your submission to indicate +the [IOCCC judges](../judges.html) **MAY** (but are not required to) modify the slot comment of your submission to indicate that they have received it. If uploaded submission is malformed, the [IOCCC judges](../judges.html) -may (but are not required to) modify the slot comment accordingly. +**MAY** (but are not required to) modify the slot comment accordingly.

@@ -581,8 +593,8 @@ Jump to: [top](#)

-Each person may register **ONLY** one account and each account may submit up to -and including **10.000000** (ten in base 10) entries per contest. +Each **PERSON** may register **ONLY ONE** account and each account may submit up to +and including **10.000000** (ten in base 10) submissions **PER** contest.

**Each submission _must be submitted separately_**. @@ -632,7 +644,7 @@ Jump to: [top](#) **Legal** abuse of the rules is somewhat encouraged. **A submission that, in -the opinion of the [judges](../judges.html), violates the rules will be disqualified**. +the opinion of the [judges](../judges.html), violates the rules WILL BE DISQUALIFIED**. Submissions that attempt to abuse the rules **MUST** try to justify why their rule abuse is legal, in the `remarks.md` file. @@ -645,9 +657,13 @@ Jump to: [top](#)

-7 out of 13 UTF-8 characters in C code agree that this rule number is lucky enough to be a prime number. +7 out of 13 UTF-8 characters in C code agree that this rule number is lucky +enough to be a prime number.

+

+Fun fact: the fear of the number 13 is called _triskaidekaphobia_. +

Jump to: [top](#) @@ -658,7 +674,7 @@ Jump to: [top](#)

Any C source that fails to compile because of lines with trailing -control-M's (i.e., lines with a tailing octet `015`) **_might_** be rejected. +control-M's (i.e., lines with a trailing octet `015`) **_might_** be rejected.

Please do **NOT** put trailing control-M's on remarks file lines. @@ -677,7 +693,7 @@ Jump to: [top](#) In order to register for the IOCCC, you **MUST** have a valid email address.

-The [judges](../judges.html) **are not responsible for delays in email**, please plan +The [judges](../judges.html) **are NOT responsible for delays in email**, please plan enough time for the exchange of emails so you can upload your submission.

@@ -710,8 +726,8 @@ Jump to: [top](#)

Your submission must be in the form of **xz compressed tarball** that `mkiocccentry(1)` tool would generate. The files, directories, -and paths must conform to the limits imposed by `mkiocccentry(1)` -including but not limited to their names, count, path length +and paths **MUST** conform to the limits imposed by `mkiocccentry(1)` +including but **NOT LIMITED** to their names, count, path length and directory tree depth.

@@ -722,7 +738,7 @@ Your **xz compressed tarball** submission file must pass the tests performed by: *

`txzchk(1)`

-Your **xz compressed tarball** submission file must pass the tests performed by: +Your **xz compressed tarball** submission filename must pass the tests performed by:

*

`fnamchk(1)`

@@ -734,6 +750,11 @@ must pass the checks performed by: *

`chkentry(1)`

+

+`txzchk(1)` uses the `fnamchk(1)` tool on your tarball to obtain the proper +directory name. If either name is wrong, it will be flagged as an error. +

+

The resulting `prog.c` file must pass the [Rule 2](#rule2) size checked performed by:

@@ -748,12 +769,20 @@ would produce as well as pass the tests performed by: *

`jparse(3)`

*

`chkentry(1)`

+

+The `Makefile` must **NOT** be empty. +

+ +

+The `remarks.md` must **NOT** be empty. +

+ ### TL;DR Rule 17 - Use `mkiocccentry(1)` to form your submission -Let the `mkiocccentry(1)` tool form your **xz compressed tarball** -submission file and don't try to override override its checks and -limits in order to be sure you submission conforms to this rule. +Let the `mkiocccentry(1)` tool form your **xz compressed tarball** submission +file and don't try to override its checks and limits, in order to be sure you +submission conforms to this rule. ### Warning @@ -771,7 +800,7 @@ for how to obtain and use the above mentioned tools.

**IMPORTANT**: See the -FAQ on "[Rule17](../faq.html#rule17)" +FAQ on "[Rule 17](../faq.html#rule17)" for very important details behind this rule.

@@ -836,7 +865,7 @@ Makefile example, renamed as `Makefile` of course, for help in constructing your guidelines for more details.

-The target of the Makefile must be called `prog`. The original +The target of the `Makefile` must be called `prog`. The original C source file must be called `prog.c`. To invoke the C compiler, use `${CC}`. To invoke the C preprocessor use @@ -845,7 +874,7 @@ To invoke the C compiler, use `${CC}`. To invoke the C preprocessor use Do **NOT** assume that `.` (the current directory) is in the `$PATH`.

-When `make clobber` is invoked, we request that submission be restored +When `make clobber` is invoked, we request that submission directory be restored to its original submission state. For example, any temporary files created during the build process, or during execution should be removed by the `clobber` rule. @@ -873,7 +902,7 @@ Jump to: [top](#) ## Rule 21 -Your submission **MUST NOT** create or modify files above the current directory +Your submission **MUST NOT** create or modify files **ABOVE** the current directory _with the exception of_ the `/tmp` and the `/var/tmp` directories. Your submission **MAY** create subdirectories below the current directory, or in `/tmp`, or in `/var/tmp` provided that `.` is **NOT** the first octet in any @@ -904,6 +933,12 @@ within your code, data, remarks or program output (unless you are **Peter Honeyman** or pretending to be **Peter Honeyman**) will be grounds for disqualification of your submission. +

+And don't assume that we won't be able to determine your name even if it's not +obvious, because you stand a significant chance of violating this rule if you +do. +

+ Yes, Virginia, **WE REALLY MEAN IT!**