From f7e0f3036536d36f0b0aa15e41b46530ab70eaf7 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 31 May 2024 09:08:56 -0700 Subject: [PATCH 1/7] Add FAQ 4.6 - about changes to main() args As numerous entries had to have arg type or arg count in main() changed (usually to do with clang but not always) it seems like this should be added to the FAQ. --- faq.html | 16 ++++++++++++++++ faq.md | 21 +++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/faq.html b/faq.html index 850400b29..0be7313b5 100644 --- a/faq.html +++ b/faq.html @@ -442,6 +442,7 @@ other inconsistencies with the original entry?
In some cases it might be better to not have them but as noted this is a judgement call.
+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.
There MUST be one and only one email JSON member and the JSON value MUST
be a JSON string or it MUST be a JSON null.
If the author wishes to not specify an email address, or if the email address is -unknown, they should use the JSON null as the JSON value of this JSON member. +unknown, it should be the JSON null as the JSON value of this JSON member. For example:
"email" : null,
NOTE: The JSON null is NOT enclosed in quotes!
@@ -2529,24 +2529,24 @@ For example:This JSON member holds the URL of the author’s home page.
There MUST be one and only one url JSON member and the JSON value MUST
be a JSON string or it MUST be a JSON null.
If the author wishes to not specify an email address, or if the URL is -unknown, they should use the JSON null as the JSON value of this JSON member. -For example:
+If the author wishes to not specify a URL or if the URL is +unknown, it should be the JSON null as the JSON value of this JSON +member. For example:
"url" : null,
NOTE: The JSON null is NOT enclosed in quotes!
"alt_url" : null,
This JSON member holds an alternate or 2nd URL a home page for the author.
-There MUST be one and only one url JSON member and the JSON value MUST
+
There MUST be one and only one alt_url JSON member and the JSON value MUST
be a JSON string or it MUST be a JSON null.
In some cases the author may wish to record a special URL for their IOCCC entry, or a 2nd URL such as a work or school or personal home page. For example, Cody as of Thu Nov 30 23:51:12 UTC 2023 used:
"alt_url" : "https://ioccc.xexyl.net",
-If the author wishes to not specify an email address, or if the alternate URL is -unknown, they should use the JSON null as the JSON value of this JSON member. -For example:
- "url" : null,
+If the author wishes to not specify an alternate URL, or if the alternate URL is +unknown, it should be the JSON null as the JSON value of this JSON +member. For example:
+ "alt_url" : null,
NOTE: The JSON null is NOT enclosed in quotes!
This JSON member used to hold the twitter handle of the author.
@@ -2557,8 +2557,8 @@ and so thedeprecated_twitter_handle is no longer usedJSON null is kept for only historic reasons. For example, Anthony C. Howe
once used:
"deprecated_twitter_handle" : "@SirWumpus",
-If the author wishes to not specify an twitter handle, or if the twitter handle is -unknown, they should use the JSON null as the JSON value of this JSON member. +
If the author wishes to not specify a twitter handle, or if the twitter handle is +unknown, it should be the JSON null as the JSON value of this JSON member. For example:
"deprecated_twitter_handle" : null,
NOTE: The JSON null is NOT enclosed in quotes!
@@ -2581,7 +2581,7 @@ as the opening and closing of a new IOCCC, changes to the IOCCC web site, updates during the judging process, and when new IOCCC entries are selected. We recommend you follow us on Mastodon.If the author wishes to not specify an Mastodon handle, or if the Mastodon handle is -unknown, they should use the JSON null as the JSON value of this JSON member. +unknown, it should be the JSON null as the JSON value of this JSON member. For example:
"mastodon" : null,
NOTE: The JSON null is NOT enclosed in quotes!
@@ -2598,7 +2598,7 @@ For example, if the Mastodon handle is:Then the mastodon_url would be:
https://server.domain/@user
If the author wishes to not specify an Mastodon URL, or if the Mastodon URL is -unknown, they should use the JSON null as the JSON value of this JSON member. +unknown, it should be the JSON null as the JSON value of this JSON member. For example:
"mastodon_url" : null,
NOTE: The JSON null is NOT enclosed in quotes!
@@ -2615,7 +2615,7 @@ and hosts official IOCCC web site on GitHubThe IOCCC GitHub handle is:
@ioccc-src
If the author wishes to not specify an GitHub handle, or if the GitHub handle is -unknown, they should use the JSON null as the JSON value of this JSON member. +unknown, it should be the JSON null as the JSON value of this JSON member. For example:
"github" : null,
NOTE: The JSON null is NOT enclosed in quotes!
@@ -2629,7 +2629,7 @@ It is recommended that the affiliation JSON string be the formal affili For example, the affiliation for the IOCCC would be: The International Obfuscared C Code Contest
If the author wishes to not specify an affiliation, or if the affiliation is -unknown, they should use the JSON null as the JSON value of this JSON member. +unknown, it should be the JSON null as the JSON value of this JSON member. For example:
"affiliation" : null,
NOTE: The JSON null is NOT enclosed in quotes!
diff --git a/faq.md b/faq.md index 0bb3f692d..22f5988c2 100644 --- a/faq.md +++ b/faq.md @@ -3140,7 +3140,7 @@ There **MUST** be one and only one `email` _JSON member_ and the _JSON value_ ** be a _JSON string_ or it **MUST** be a _JSON null_. If the author wishes to not specify an email address, or if the email address is -unknown, they should use the _JSON null_ as the _JSON value_ of this _JSON member_. +unknown, it should be the _JSON null_ as the _JSON value_ of this _JSON member_. For example: ``` @@ -3161,9 +3161,9 @@ This _JSON member_ holds the URL of the author's home page. There **MUST** be one and only one `url` _JSON member_ and the _JSON value_ **MUST** be a _JSON string_ or it **MUST** be a _JSON null_. -If the author wishes to not specify an email address, or if the URL is -unknown, they should use the _JSON null_ as the _JSON value_ of this _JSON member_. -For example: +If the author wishes to not specify a URL or if the URL is +unknown, it should be the _JSON null_ as the _JSON value_ of this _JSON +member_. For example: ``` "url" : null, @@ -3180,7 +3180,7 @@ NOTE: The _JSON null_ is **NOT** enclosed in quotes! This _JSON member_ holds an alternate or 2nd URL a home page for the author. -There **MUST** be one and only one `url` _JSON member_ and the _JSON value_ **MUST** +There **MUST** be one and only one `alt_url` _JSON member_ and the _JSON value_ **MUST** be a _JSON string_ or it **MUST** be a _JSON null_. In some cases the author may wish to record a special URL for their IOCCC entry, @@ -3191,12 +3191,12 @@ Cody as of _Thu Nov 30 23:51:12 UTC 2023_ used: "alt_url" : "https://ioccc.xexyl.net", ``` -If the author wishes to not specify an email address, or if the alternate URL is -unknown, they should use the _JSON null_ as the _JSON value_ of this _JSON member_. -For example: +If the author wishes to not specify an alternate URL, or if the alternate URL is +unknown, it should be the _JSON null_ as the _JSON value_ of this _JSON +member_. For example: ``` - "url" : null, + "alt_url" : null, ``` NOTE: The _JSON null_ is **NOT** enclosed in quotes! @@ -3218,8 +3218,8 @@ once used: "deprecated_twitter_handle" : "@SirWumpus", ``` -If the author wishes to not specify an twitter handle, or if the twitter handle is -unknown, they should use the _JSON null_ as the _JSON value_ of this _JSON member_. +If the author wishes to not specify a twitter handle, or if the twitter handle is +unknown, it should be the _JSON null_ as the _JSON value_ of this _JSON member_. For example: ``` @@ -3260,7 +3260,7 @@ site, updates during the judging process, and when new IOCCC entries are selected. We recommend you follow us on Mastodon. If the author wishes to not specify an Mastodon handle, or if the Mastodon handle is -unknown, they should use the _JSON null_ as the _JSON value_ of this _JSON member_. +unknown, it should be the _JSON null_ as the _JSON value_ of this _JSON member_. For example: ``` @@ -3297,7 +3297,7 @@ Then the `mastodon_url` would be: ``` If the author wishes to not specify an Mastodon URL, or if the Mastodon URL is -unknown, they should use the _JSON null_ as the _JSON value_ of this _JSON member_. +unknown, it should be the _JSON null_ as the _JSON value_ of this _JSON member_. For example: ``` @@ -3332,7 +3332,7 @@ The IOCCC GitHub handle is: ``` If the author wishes to not specify an GitHub handle, or if the GitHub handle is -unknown, they should use the _JSON null_ as the _JSON value_ of this _JSON member_. +unknown, it should be the _JSON null_ as the _JSON value_ of this _JSON member_. For example: ``` @@ -3362,7 +3362,7 @@ For example, the affiliation for the IOCCC would be: ``` If the author wishes to not specify an affiliation, or if the affiliation is -unknown, they should use the _JSON null_ as the _JSON value_ of this _JSON member_. +unknown, it should be the _JSON null_ as the _JSON value_ of this _JSON member_. For example: ``` From 63e722ce5fc4ade0567b6456c30320f2edc4afae Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 31 May 2024 12:12:38 -0700 Subject: [PATCH 3/7] Restore bug status in 1984/laman The bugs.{md,html} files, 1984/laman/README.md (and index.html) file and thanks files were updated. The thanks file has some additional fixes that were already in place but are relevant to this commit. --- 1984/laman/README.md | 12 +++ 1984/laman/index.html | 4 + 1984/laman/laman.c | 4 +- bugs.html | 193 ++++++++++++++++++++++-------------------- bugs.md | 21 +++-- thanks-for-help.html | 65 +++++++++----- thanks-for-help.md | 77 ++++++++++++----- 7 files changed, 231 insertions(+), 145 deletions(-) diff --git a/1984/laman/README.md b/1984/laman/README.md index 67783ddf1..40d5e55d5 100644 --- a/1984/laman/README.md +++ b/1984/laman/README.md @@ -5,6 +5,18 @@ ``` +### Bugs and (Mis)features: + +The current status of this entry is: + +``` + STATUS: INABIAF - please **DO NOT** fix +``` + +For more detailed information see [1984/laman in bugs.html](../../bugs.html#1984_laman). + + + ## To use: ``` diff --git a/1984/laman/index.html b/1984/laman/index.html index 463351fc3..620199915 100644 --- a/1984/laman/index.html +++ b/1984/laman/index.html @@ -403,6 +403,10 @@ Location: ZZ - Unknown location make all
+The current status of this entry is:
+ STATUS: INABIAF - please **DO NOT** fix
+For more detailed information see 1984/laman in bugs.html.
./laman <positive number>
1984/mullender (see below and the FAQ -for a version that works in modern systems) is very system specific and was -before system specific winning entries were discouraged. This is an all time -personal favourite of Landon Curt Noll. Run the alternate code to understand why -this might be (along with how strange the source code is :-) ).
+1984/mullender (see below for a +version that works in modern systems) is very system specific and was before +system specific winning entries were discouraged. This is an all time personal +favourite of Landon Curt Noll. Run the alternate code to understand why this +might be (along with how strange the source code is :-) ).
An example where a crash is not a bug: 2019/endoh is supposed to crash. There are others that are also supposed to crash or that are known to segfault but are considered features.
@@ -702,10 +702,17 @@ you should see something like: '",x); /* \without a newline after the \. This is not a bug.
This program will very likely crash or do something funny without an arg.
Although there is an alt version and supplementary program added by Cody that @@ -732,7 +739,7 @@ emulator to test it) but running the code on the binary itself produces a
This entry is known to segfault after printing its output. It was documented by @@ -751,7 +758,7 @@ the judges and shouldn’t be fixed.
In linux it might happen that despite no error message or message about doing @@ -776,7 +783,7 @@ errors.
This program will very likely crash or break into tiny bits :-) if you feed it @@ -876,7 +883,7 @@ Enjoy! :-)
A point worth considering is that as the number passed into the program gets @@ -976,7 +983,7 @@ defeat the purpose. This would ideally be fixed.
The authors provided a list of features in the @@ -984,7 +991,7 @@ defeat the purpose. This would ideally be fixed.
Cody Boone Ferguson fixed many bugs that @@ -1000,7 +1007,7 @@ where this occurred was fixed but this one should not be fixed. Thank you.
If the maze file cannot be opened, either because the path specified does not @@ -1010,7 +1017,7 @@ file does not exist in the directory, this program will very likely crash.
There is a very simple way to always win. The program doesn’t catch you and as @@ -1027,7 +1034,7 @@ when you’re cheating it ends up winning! Can you figure that out as well?
The author stated that if the file cannot be opened then it will print a system @@ -1188,7 +1195,7 @@ than that. For instance this is what it looks like with clang:
When your own checkmate is imminent it prints "Har har" but does not exit so
@@ -1197,7 +1204,7 @@ it yourself through ctrl-c or killing it in some other fashion.
Cody improved the usability of this program by making it so that as long as the @@ -1223,7 +1230,7 @@ not a misunderstanding).
The author stated that:
@@ -1246,7 +1253,7 @@ system), this entry just shows a blank screen.This entry relied on a bug in gcc that was fixed with gcc version 2.3.3. This @@ -1256,7 +1263,7 @@ the index.html file for details.
Although the code checks if the file can be opened or not, badly formatted files @@ -1266,7 +1273,7 @@ through ctrl-c or such.
If the file cannot be opened it will very likely segfault. This should not be @@ -1292,7 +1299,7 @@ question you might cause an error. For instance don’t do this:
Of course if you do something like:
What is 'foo'?
it will work fine.
-No spaces are allowed in the expression.
@@ -1308,7 +1315,7 @@ notd-46.
When you initiate shooting via the s command you immediately lose an arrow
@@ -1318,7 +1325,7 @@ pit room you will end up dying even though you didn’t explicitly move there.
Cody Boone Ferguson fixed this to compile @@ -1421,7 +1428,7 @@ compiled!
This program will likely crash if the source code file (by the name of the file @@ -1468,7 +1475,7 @@ doesn’t break something else.
This did not originally compile under macOS and after it did compile under @@ -1500,7 +1507,7 @@ it would be good if it was fixed.
This program expects a POSITIVE number. If you specify a negative number it will @@ -1565,7 +1572,7 @@ almost be done except that some of the output of the
If X is not running this program will very likely crash or do something funny. @@ -1608,7 +1615,7 @@ to the page as well! You’ll have IOCCC fame for reviving a pootifier! :-)
A point worth considering is that as the number passed into the program gets @@ -1765,7 +1772,7 @@ on the stack at that point:
5which might (?) suggest that the + operator is unimplemented. Unfortunately it
has been many years since I have used perl and I was never a guru either.
The author states that in perl < 5.6.0 there is a bug with a core dump in what
they said is in Perl_sv_upgrade. As this is documented it is not considered a
bug to be fixed. For the curious this will crash in macOS. Cody notes that the
@@ -1807,7 +1814,7 @@ of 92 warnings! Nonetheless neither works okay and both crash.
This program does not do what you might think it does! Running it like:
@@ -1825,7 +1832,7 @@ make a pull request.If DISPLAY is not set the program will very likely crash, do something strange
@@ -1839,7 +1846,7 @@ fire! :-) ).
Cody Boone Ferguson fixed this so that it @@ -1858,7 +1865,7 @@ elves of Imladris :-(
This program will crash without an arg.
This program deliberately crashes if it loses (which is what it aims to do).
@@ -1935,7 +1942,7 @@ appreciate your help!Sometimes when one player presses q it will result in broken pipe on the other
@@ -1953,7 +1960,7 @@ set. In other words both have to be ASCII or EBCDIC - not one of each.
This program will very likely crash or do something unexpected if you do not @@ -1969,7 +1976,7 @@ wanted to install it as a tool but this is missing.
The glob pattern must match the whole string. See the author’s comments for @@ -2137,13 +2144,13 @@ compile under clang. The following patch was applied:
gavin_files: boot.b lilo.conf prim gavin_install.txtThe current (Makefile was modified to try and fit into the current IOCCC build environment.
-See known features in the index.html for things that are not bugs but documented (mis)features.
The author stated that:
@@ -2168,7 +2175,7 @@ things that are not bugs but documented (mis)features.The generated code will very likely segfault or do something not intended if not @@ -2181,7 +2188,7 @@ given the right args. See the index.html file for the correct syntax.
This program sometimes will create unsolvable puzzles :-) just to hook you.
@@ -2195,7 +2202,7 @@ dimensions. Try 100 100 100 for instance and see what happens!
This entry will very likely segfault or do something strange if the source code @@ -2204,7 +2211,7 @@ does not exist.
The author states:
@@ -2238,7 +2245,7 @@ for running itself.Cody Boone Ferguson notes that, though @@ -2252,7 +2259,7 @@ website itself.
The author stated the below points of interest.
@@ -2293,7 +2300,7 @@ with at leastcomputer.tofu input file:
The string specified must be <= 42 characters and may only consist of the @@ -2302,7 +2309,7 @@ with possibly corrupt GIF files.
This program will likely crash or do something funny without an arg.
@@ -2321,12 +2328,12 @@ but you are welcome to try and fix it. provide it as an additional alt version. Fixing this is very likely to be very challenging and in some systems it will not be possible to fix but you are welcome to try and fix it if you wish to! -Incorrect formulas will ungracefully crash the program.
This program will likely crash or do something funny if the file cannot be @@ -2334,7 +2341,7 @@ opened. The number of args is however checked.
The author stated:
@@ -2351,7 +2358,7 @@ opened. The number of args is however checked.Cody Boone Ferguson fixed this program to @@ -2398,7 +2405,7 @@ case-sensitive.
For a great amount of data points the program will crash, depending on your @@ -2421,7 +2428,7 @@ bins at the edges.
instead being something else entirely. The Internet Wayback Machine, although it archived it, did not load scripts. Do you know if the domain was moved? Do you have an archive or mirror? Please provide us it! Thank you. -The author states the following:
Bad input (e.g. nonexistent files, non-numeric number of iterations, etc.) @@ -2434,7 +2441,7 @@ tends to result in empty output.
The author stated that there are a number of features and limitations. As the @@ -2606,7 +2613,7 @@ defined.
The author stated that the program will crash if no argument is passed to the @@ -2620,7 +2627,7 @@ fire :-)
The author stated:
@@ -2629,7 +2636,7 @@ fire :-)The author stated:
@@ -2662,7 +2669,7 @@ fire :-)The author stated:
@@ -2676,7 +2683,7 @@ doesn’t make it possible to lock drawing to the display refresh rate.)The author stated:
@@ -2697,7 +2704,7 @@ doesn’t make it possible to lock drawing to the display refresh rate.)The author stated that the program will crash if no argument is passed to the @@ -2713,7 +2720,7 @@ fire :-)
The author stated:
@@ -2733,7 +2740,7 @@ and endianness conversion would make the source too large for IOCCC rule 2).This program will possibly crash or draw something strange with 0 args. Then @@ -2752,7 +2759,7 @@ used.
From the author:
@@ -2768,7 +2775,7 @@ section.From the author:
@@ -2781,14 +2788,14 @@ such asC2E2.
Invalid input files will very likely crash the program.
This program will not terminate on its own; you must kill hou (but not Qiming
@@ -2796,7 +2803,7 @@ Hou :-) ) yourself. This should not be fixed.
The author reminds us that if you kill the program you will have to wait a short @@ -2813,7 +2820,7 @@ it out as a known limitation it is not a bug but a feature.
The author noted that in macOS the colours might be wrong. They gave a solution. @@ -2837,7 +2844,7 @@ player become bigger, stay away from blocks!
This program will very likely crash if no arg is given.
@@ -2878,7 +2885,7 @@ rely on the entry as the below shows. One should be able to do:The author stated:
@@ -2903,7 +2910,7 @@ result. Error messages become garbled, though.The program doesn’t look at the header of files so if it’s passed something hat @@ -2912,7 +2919,7 @@ is not compressed data it’s likely to crash.
The program assumes that The author wrote: When you run it on a JSON file you will see something like:EOF is -1. This can be fixed but at this time it is
@@ -2945,7 +2952,7 @@ use 8 * sizeof(typ) bits per place. It does not work when CHA
2018/algmyr
STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2018/algmyr/prog.c
Information: 2018/algmyr/index.html
2018/hou
STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2018/hou/prog.c
Information: 2018/hou/index.html
where [] is the cursor. When this happens if you hit enter (this is necessary
or else it’ll happen again) and then exit again (ctrl-e) and run prog again
it’ll be okay.
The author stated that if you make a typo it can happen that the boot loader can crash and halt. If this is the case type ctrl-e to quit the emulator and try again.
@@ -3004,7 +3011,7 @@ in the case of compiled code it won’t be executable).The author wrote the following:
@@ -3054,7 +3061,7 @@ this program has nothing to do with a hand.Certain input can crash this program. The file @@ -3062,7 +3069,7 @@ this program has nothing to do with a hand.
The author pointed out that some implementations of wc(1) show different
@@ -3070,7 +3077,7 @@ values but his implementation matches that of macOS and FreeBSD.
Cody Boone Ferguson fixed the scripts so @@ -3102,7 +3109,7 @@ ideal if this was not the case.
There are two things to be aware of with this entry.
@@ -3131,7 +3138,7 @@ in the directory:As a backtrace quine this entry is SUPPOSED to segfault so this should not be @@ -3139,7 +3146,7 @@ touched either.
The author stated the following:
@@ -3169,7 +3176,7 @@ touched either.The author wrote that there are a number of differences from what one might @@ -3179,7 +3186,7 @@ remarks in the sections Syntax and
The author wrote that if you decide to change networks or use a different input @@ -3199,7 +3206,7 @@ a crash.
This program will not validate input so it might fail or get stuck if invoked @@ -3208,7 +3215,7 @@ erroneously.
The author noted that if the program runs out of memory it is likely to crash.
@@ -3223,7 +3230,7 @@ ignored except line feeds (preserved) and tabs (expanded to 8 spaces).’This entry is known to crash if no arg is specified. Although easy to fix it is @@ -3234,7 +3241,7 @@ either. But can you figure out why this happens?
The author stated that bad things happen if the entered move is outside of the @@ -3248,7 +3255,7 @@ move.
There are some things that might appear to be bugs but are actually features or @@ -3258,7 +3265,7 @@ things that are misinterpreted as bugs. See the
The author noted that the program only supports WAV files that have @@ -3267,7 +3274,7 @@ audio channels.
The author listed the following limitations:
diff --git a/bugs.md b/bugs.md index 702c5b1a1..9a0f6ba5a 100644 --- a/bugs.md +++ b/bugs.md @@ -401,11 +401,11 @@ something was noted by the author, the judges, a consequence of earlier requirements for winning entries or the purpose was to do something that might appear to be buggy. An example of system specific entries: -[1984/mullender](%%REPO_URL%%/1984/mullender/mullender.c) (see below and the [FAQ](faq.html) -for a version that works in modern systems) is very system specific and was -before system specific winning entries were discouraged. This is an all time -personal favourite of Landon Curt Noll. Run the alternate code to understand why -this might be (along with how strange the source code is :-) ). +[1984/mullender](%%REPO_URL%%/1984/mullender/mullender.c) (see below for a +version that works in modern systems) is very system specific and was before +system specific winning entries were discouraged. This is an all time personal +favourite of Landon Curt Noll. Run the alternate code to understand why this +might be (along with how strange the source code is :-) ). An example where a crash is not a bug: [2019/endoh](%%REPO_URL%%/2019/endoh/prog.c) is supposed to crash. There are others that are also supposed to crash or that are @@ -466,6 +466,17 @@ you should see something like: without a newline after the `\`. This is not a bug. +clang say that main() mus
args but these versions do not object to 1 arg. However as the char macro
seems more obscure and it is possible that a new version of clang will be even
more strict the int i parameter in main() was moved to be inside main(),
-set to non-zero (setting i to 0 will not work). This is way main() has zero
+set to non-zero (setting i to 0 will not work). This is why main() has zero
args.
Observe how on line 29 there is a call to main() which does pass in a
parameter. It has never been observed to be an error to pass in too many
@@ -487,10 +487,6 @@ but not clang - or at least some versions.
Cody also fixed this to not crash when no arg is specified. Note that if the arg -is not a positive number it will not do anything useful or anything at all. -This was fixed on 30 October 2023 after the bug status was changed from INABIAF -(it’s not a bug it’s a feature) to bug.
clang object to the number of args of main(), saying that it must
be 0, 2 or 3. The version this has been observed in does not actually object to
1 arg but it is entirely possible that this changes so a second arg (that’s not
-needed and is unused) has been added just in case.
+needed and is unused) has been added just in case. See FAQ 4.6 - Why was arg
+count and/or type changed in main() in some older
+entries? for more details.
Cody also added the script primes.sh which allows one
to check the output for the first N prime numbers of the output, where N is
either the default or user specified. The inspiration was the previous try
@@ -1749,7 +1747,9 @@ start and end character.
main() though when it comes to 1 arg it is
only in an error message if say 4 args are used. This is out of an abundance of
caution as it’s quite possible that clang or the ANSI C committee end up further
-changing this.
+changing this. See FAQ 4.6 - Why was arg
+count and/or type changed in main() in some older
+entries? for more details.
Yusuke also noted that there is a bug in the program where right after starting it moves towards the right but if you click the mouse it goes back.
clang whine about the number of args on top of what typ
In particular some versions claim that they only allow 0, 2 or 3 args. It
appears that they do allow 1 but for instance 4 is not allowed. However as it’s
quite possible they will ‘fix’ this defect it would be better to have this not
-be a problem at such a time.
+be a problem at such a time. See FAQ 4.6 - Why was arg
+count and/or type changed in main() in some older
+entries? for more details.
Cody also added the bas1.sh script to simplify running the program.
Cody also added a second arg to main() out of an abundance of caution as some
-versions of clang whine about the number of args to main(). These versions
+versions of clang complain about the number of args to main(). These versions
claim that only 0, 2 or 3 are allowed but it does allow 1 anyway. It is quite
possible though that this will change so it is fixed in case this happens. As it
is mostly just through the C pre-processor Cody added a new macro to make the
-code look like the original with just an extra arg.
In some versions of clang -Wno-int-conversion had to be added to the
CSILENCE variable of the Makefile.
Cody also added the try.sh script to show the output of some @@ -2513,7 +2519,9 @@ occurs.
Cody made main() have two args out of an abundance of caution as some versions
of clang say that main() can only have 0, 2 or 3 args. These versions accept 1
arg but it is entirely possible that they fix this so this should prevent it
-from breaking if that happens.
Cody added the try.sh script to make it easier to try the commands that we suggested. One command was not added, that of the to use command.
@@ -3039,7 +3047,9 @@ a lot of numbers this will be harder to see). discovered it will not work otherwise.Cody, out of an abundance of caution for clang, added a second arg to main()
as some versions complain about the number of args and although they accept 1 it
-is entirely possible it will eventually be that they don’t.
Cody also added the try.sh script and various data
files: kopczynski-a to demonstrate what happens when art more
like a letter is fed to the program and the kopczynski*-rev files which are
@@ -3424,7 +3434,9 @@ it to the repo as well.
Cody, out of an abundance of caution for clang’s defects, made main() have
2 args instead of 1 as some versions report that main() must have 0, 2 or 3
-args, even though at least one of those versions allows 1 arg only.
Cody also added the try.sh script for easier use of the entry to show the clock update in real time.
Cody, out of an abundance of caution, added a second arg to main() as some
versions of clang complain about not only the type of each arg to main() but
-the number of args as well.
Cody also added the try.sh script.
Cody added the video file boing-ball.mp4 which is the demo the +
Cody added the video file +boing-ball.mp4 which is the demo the author referred to.
ints to longs
and now it does work with 64-bit systems as well as 32-bit systems.
Cody also added the try.sh script.
-Cody added the following words of wisdom: '"this" is not a pipe but "!" is'.
Cody added the following words of wisdom: '"this" is not a pipe but "|" is'.
Cody also changed Cody also changed argv to be not const char ** butchar , mostly out of an
+argv to be not const char ** but char **, mostly out of an
abundance of caution in case clang, which already imposes restrictions on the
-types of args to main() including to do with `char
main() including to do with char **, decides to further
+restrict them. See FAQ 4.6 - Why was arg
+count and/or type changed in main() in some older
+entries? for more details.
Cody also restored the original code from the archive.
And although the URL works for now (via redirect), Cody changed the website linked to in the recipe file to the domain that the old one currently redirects @@ -3847,7 +3864,9 @@ not found.
Cody also (out of an abundance of caution for clang(1) which is strict with
-arg type and count to main()) added a second (unused) arg to main().
main()) added a second (unused) arg to main(). See
+FAQ 4.6 - Why was arg count and/or type changed in main() in some
+older entries? for more details.
clang object to the number of args of main(), saying that it
must be 0, 2 or 3. The version this has been observed in does not actually
object to 1 arg but it is entirely possible that this changes so a second arg
-(that’s not needed and is unused) has been added just in case.
+(that’s not needed and is unused) has been added just in case. See FAQ 4.6 -
+Why was arg count and/or type changed in main() in some older
+entries? for more details.
Cody also added explicit linking of libm (-lm) for systems that do not do this
(Linux doesn’t seem to but macOS does).
Cody also added alternate code that should diff --git a/thanks-for-help.md b/thanks-for-help.md index 00f23ca81..327f363d9 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -108,7 +108,7 @@ allow this. Some versions of `clang` say that `main()` must have either 0, 2 or args but these versions do not object to 1 arg. However as the `char` macro seems more obscure and it is possible that a new version of `clang` will be even more strict the `int i` parameter in `main()` was moved to be inside `main()`, -set to non-zero (setting `i` to 0 will not work). This is way `main()` has zero +set to non-zero (setting `i` to 0 will not work). This is why `main()` has zero args. Observe how on line 29 there is a call to `main()` which does pass in a @@ -140,11 +140,6 @@ To see the difference from start to fixed: [Cody](#cody) added the [try.sh](%%REPO_URL%%/1984/laman/try.sh) script. -Cody also fixed this to not crash when no arg is specified. Note that if the arg -is not a positive number it will not do anything useful or anything at all. -This was fixed on 30 October 2023 after the bug status was changed from INABIAF -(it's not a bug it's a feature) to bug. -
make
+The current status of this entry is:
+ STATUS: INABIAF - please **DO NOT** fix
+For more detailed information see 2011/konno in bugs.html.
./konno lower_case_word
The purpose of this program is to print out a string of rubbish. In particular you should see something like:
@@ -706,7 +706,7 @@ you should see something like:This program will very likely crash or do something funny without an arg.
This program will very likely crash or do something funny without an arg.
The author stated that the program will crash if no argument is passed to the @@ -2627,7 +2634,7 @@ fire :-)
The author stated:
@@ -2636,7 +2643,7 @@ fire :-)The author stated:
@@ -2669,7 +2676,7 @@ fire :-)The author stated:
@@ -2683,7 +2690,7 @@ doesn’t make it possible to lock drawing to the display refresh rate.)The author stated:
@@ -2704,7 +2711,7 @@ doesn’t make it possible to lock drawing to the display refresh rate.)The author stated that the program will crash if no argument is passed to the @@ -2720,7 +2727,7 @@ fire :-)
The author stated:
@@ -2740,7 +2747,7 @@ and endianness conversion would make the source too large for IOCCC rule 2).This program will possibly crash or draw something strange with 0 args. Then @@ -2759,7 +2766,7 @@ used.
From the author:
@@ -2775,7 +2782,7 @@ section.From the author:
@@ -2788,14 +2795,14 @@ such asC2E2.
Invalid input files will very likely crash the program.
This program will not terminate on its own; you must kill hou (but not Qiming
@@ -2803,7 +2810,7 @@ Hou :-) ) yourself. This should not be fixed.
The author reminds us that if you kill the program you will have to wait a short @@ -2820,7 +2827,7 @@ it out as a known limitation it is not a bug but a feature.
The author noted that in macOS the colours might be wrong. They gave a solution. @@ -2844,7 +2851,7 @@ player become bigger, stay away from blocks!
This program will very likely crash if no arg is given.
@@ -2885,7 +2892,7 @@ rely on the entry as the below shows. One should be able to do:The author stated:
@@ -2910,7 +2917,7 @@ result. Error messages become garbled, though.The program doesn’t look at the header of files so if it’s passed something hat @@ -2919,7 +2926,7 @@ is not compressed data it’s likely to crash.
The program assumes that The author wrote: When you run it on a JSON file you will see something like:EOF is -1. This can be fixed but at this time it is
@@ -2952,7 +2959,7 @@ use 8 * sizeof(typ) bits per place. It does not work when CHA
2018/algmyr
STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2018/algmyr/prog.c
Information: 2018/algmyr/index.html
2018/hou
STATUS: INABIAF - please DO NOT fix
+STATUS: INABIAF - please DO NOT fix
Source code: 2018/hou/prog.c
Information: 2018/hou/index.html
where [] is the cursor. When this happens if you hit enter (this is necessary
or else it’ll happen again) and then exit again (ctrl-e) and run prog again
it’ll be okay.
The author stated that if you make a typo it can happen that the boot loader can crash and halt. If this is the case type ctrl-e to quit the emulator and try again.
@@ -3011,7 +3018,7 @@ in the case of compiled code it won’t be executable).The author wrote the following:
@@ -3061,7 +3068,7 @@ this program has nothing to do with a hand.Certain input can crash this program. The file @@ -3069,7 +3076,7 @@ this program has nothing to do with a hand.
The author pointed out that some implementations of wc(1) show different
@@ -3077,7 +3084,7 @@ values but his implementation matches that of macOS and FreeBSD.
Cody Boone Ferguson fixed the scripts so @@ -3109,7 +3116,7 @@ ideal if this was not the case.
There are two things to be aware of with this entry.
@@ -3138,7 +3145,7 @@ in the directory:As a backtrace quine this entry is SUPPOSED to segfault so this should not be @@ -3146,7 +3153,7 @@ touched either.
The author stated the following:
@@ -3176,7 +3183,7 @@ touched either.The author wrote that there are a number of differences from what one might @@ -3186,7 +3193,7 @@ remarks in the sections Syntax and
The author wrote that if you decide to change networks or use a different input @@ -3206,7 +3213,7 @@ a crash.
This program will not validate input so it might fail or get stuck if invoked @@ -3215,7 +3222,7 @@ erroneously.
The author noted that if the program runs out of memory it is likely to crash.
@@ -3230,7 +3237,7 @@ ignored except line feeds (preserved) and tabs (expanded to 8 spaces).’This entry is known to crash if no arg is specified. Although easy to fix it is @@ -3241,7 +3248,7 @@ either. But can you figure out why this happens?
The author stated that bad things happen if the entered move is outside of the @@ -3255,7 +3262,7 @@ move.
There are some things that might appear to be bugs but are actually features or @@ -3265,7 +3272,7 @@ things that are misinterpreted as bugs. See the
The author noted that the program only supports WAV files that have @@ -3274,7 +3281,7 @@ audio channels.
The author listed the following limitations:
diff --git a/bugs.md b/bugs.md index 9a0f6ba5a..7bbe9759f 100644 --- a/bugs.md +++ b/bugs.md @@ -451,7 +451,7 @@ own fix or suggest that they're fixed!Cody fixed the program to not crash if no arg was specified as this was not a -documented feature.
-Cody also added the try.sh script.
+Cody added the try.sh script.
Cody also added the try.sh and the
try.alt.sh scripts. The try.alt.sh script will be
-helpful to test any fixes for Apple silicon chips (see 2011/richards in
+helpful to test any fixes for Apple silicon chips (see 2011/richards in
bugs.html for more details).
Cody also added an alternate version for Windows +
Cody also added an alternate version for Windows based on the author’s comments (along with looking up the function for the right -header files). To build try the alt rule of the Makefile.
+header files). To build try thealt rule of the Makefile.
Cody also added alternate code that should work on +
Cody also added alternate code that should work on
Windows, based on the author’s remarks that if the system distinguishes binary
and text then stdout needs to be set to binary mode.
Cody also added the PDF file diff --git a/thanks-for-help.md b/thanks-for-help.md index fe3ecf2ea..e4a5b79fd 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -4517,9 +4517,9 @@ controls, width and height. [Cody](#cody) added the [try.sh](%%REPO_URL%%/2011/vik/try.sh) script. -Cody also added an [alternate version](2011/vik/index.html#alternate-code) for Windows +Cody also added an [alternate version](%%REPO_URL%%/2011/vik/vik.alt.c) for Windows based on the author's comments (along with looking up the function for the right -header files). To build try the alt rule of the Makefile. +header files). To build try the `alt` rule of the `Makefile`.
hint.pdf and hello.pdf as well as c
Cody added the try.sh script and restored the original hint
+ Cody added the try.sh script and restored the original hint
markdown file as the changes made when converting to a GitHub
index.html made the generated html not look correct; it did not have a title, a
stylesheet etc. due to the fact that there is no # header (which specified
@@ -3682,20 +3682,22 @@ title and stylesheet) and other formatting changes.Winning entry: 2012/kang
Winning entry source code: kang.c
Cody added alternate code that fixes a problem where in German ‘v’ sounds like ‘f’ -which the program has as ‘f’: with the original version it would translate -‘fier’ to ‘4’ when the word is ‘vier’. But see below.
-Originally this was updated in the original code but it was noticed that this -caused other German (and maybe other languages?) words to be incorrect so it -was set as an alt version since the code was already there. It might also be -considered a feature and not a bug so an alt version is the better way to go -about it. Using both, however, allows one to experience different capabilities -and also enjoy or appreciate the entry even more, given how simple the -difference is.
-Cody also added six scripts: en.sh, -de.sh, en.alt.sh and -de.alt.sh which count from 0 through 13 in English and German -using the original entry and the alt version respectively.
+Cody added alternate code that fixes a problem where in German ‘v’ +sounds like ‘f’ which the program has as ‘f’: with the original version it would +translate ‘fier’ to ‘4’ when the word is ‘vier’. This was during a time that a +lot of entries that no longer worked were fixed and it was done without much +thought but having this alternate version allows one to appreciate the entry +even more so it was kept in.
+This change will actually break other translations. It also was a feature, not a +bug, even if it might seem like a bug. But having both versions allows one to +appreciate the entry even more, given how simple the difference is: as has been +seen in many entries over the years, a single character can drastically change +what happens, sometimes in surprising and delightful ways!
+Cody also added six scripts, starting with +en.sh, de.sh, +en.alt.sh and +de.alt.sh which count from 0 through 13 in +English and German using the original entry and the alt version respectively.
In the German scripts it uses the umlaut and also does it without the umlaut
(add an ‘e’). Notice how the program picks up on this! All scripts can use
either version but the .alt.sh versions default to the alt version whereas
@@ -3713,12 +3715,14 @@ respectively. Notice how a single letter changes so much!
Cody added the alternate versions
-which will, if no arg is specified, read in the program itself, rather than
-/dev/urandom. This is mostly useful for those without a /dev/urandom device
-file (the default for the entry). The second alternate version is like the first
-except that it also sets binary mode on stdin and stdout which should
-theoretically make it work in Windows.
Cody added the alternate
+versions which will, if no arg is
+specified, read in the program itself, rather than /dev/urandom. This is
+mostly useful for those without a /dev/urandom device file, which the author
+pointed out as being a problem, but which is the default for the entry . The
+second alternate version is like the first except that it also sets binary mode
+on stdin and stdout which should theoretically make it work in Windows. This
+comes from the author’s remarks.
Cody also added the try.sh and try.alt.sh scripts.
Based on the author’s description it should be able to get this entry to work -for Windows. With his instructions Cody also added the alternate version that -does this for the few who might use Windows.
+Based on the author’s description it should be possible to get this entry to work +for Windows. With his instructions Cody also added the alternate +version that does this.