Merge pull request #950 from xexyl/faq-and-burley

Update FAQ about incongruent code & author remarks
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-09-10 23:30:27 -07:00
commit babc9a387b
5 files changed
+37 -12

No files matched your search

+2 -4
View File
@@ -1,9 +1,6 @@
# Best Small Program # Best Small Program
Brian Westley (aka Merlyn LeRoy) Brian Westley (aka Merlyn LeRoy)
Digi International
1026 Blair Ave.
St. Paul, MN 55104
US US
<http://www.westley.org> <http://www.westley.org>
@@ -60,7 +57,8 @@ This program and the alternate version will very likely crash or
[nuke](https://en.wikipedia.org/wiki/Nuclear_weapon) the [entire [nuke](https://en.wikipedia.org/wiki/Nuclear_weapon) the [entire
world](https://en.wikipedia.org/wiki/Earth) or just the world](https://en.wikipedia.org/wiki/Earth) or just the
[USA](https://en.wikipedia.org/wiki/United_States), respectively, without enough [USA](https://en.wikipedia.org/wiki/United_States), respectively, without enough
args. This should not be fixed. args. And not that we need any help with this or anything :-) but we do
encourage you to test it. This should not be fixed.
## Judges' remarks: ## Judges' remarks:
+3
View File
@@ -70,6 +70,9 @@ the program so this "strategy" no longer works?
Notice the clever use of `setjmp()` and `longjmp()` calls. Can you keep track Notice the clever use of `setjmp()` and `longjmp()` calls. Can you keep track
of what state is being saved and restored? of what state is being saved and restored?
NOTE: the author talks about how it is a single statement. This might not be
strictly true in 2023 for the fixes for it to work so you can look at the
original file [burley.orig.c](burley.orig.c) to see what is meant.
## Author's remarks: ## Author's remarks:
+7 -4
View File
@@ -712,9 +712,11 @@ welcome but it's not currently considered enough of a problem to fix.
## STATUS: doesn't work with some compilers - please provide alternative code ## STATUS: doesn't work with some compilers - please provide alternative code
We used a patch from [Yusuke Endoh](/winners.html#Yusuke_Endoh) to get this to We used a patch from [Yusuke Endoh](/winners.html#Yusuke_Endoh) to get this to
work but it only works with gcc. Unfortunately due to the way the entry works work but it only works with gcc. Cody removed the warnings of `gets()`.
and the fact that other compilers like clang have different warnings and errors
this simply does not work with them. Can you help us? Unfortunately due to the way the entry works and the fact that other compilers
like clang have different warnings and errors this simply does not work with
them. Can you help us?
## [1992/westley](1992/westley/westley.c) ([README.md](1992/westley/README.md)) ## [1992/westley](1992/westley/westley.c) ([README.md](1992/westley/README.md))
## STATUS: INABIAF - please **DO NOT** fix ## STATUS: INABIAF - please **DO NOT** fix
@@ -723,7 +725,8 @@ This program and the alternate version will very likely crash or
[nuke](https://en.wikipedia.org/wiki/Nuclear_weapon) the [entire [nuke](https://en.wikipedia.org/wiki/Nuclear_weapon) the [entire
world](https://en.wikipedia.org/wiki/Earth) or just the world](https://en.wikipedia.org/wiki/Earth) or just the
[USA](https://en.wikipedia.org/wiki/United_States), respectively, without enough [USA](https://en.wikipedia.org/wiki/United_States), respectively, without enough
args. This should not be fixed! :-) args. And not that we need any help with this or anything :-) but we do
encourage you to test it. This should not be fixed.
# 1993 # 1993
+14 -3
View File
@@ -33,6 +33,14 @@ By tradition, we do not say.
## Q: How many judging rounds do you have? ## Q: How many judging rounds do you have?
Are you trying to trick us? We will not say that either. Are you trying to trick us? We will not say that either.
## Q: How come some entries have code that is incongruent with what the author(s) wrote about the entry?
It is very likely in this case that the code was fixed to work for modern
systems as part of the reworking of the website. If you have this problem in
some entries you should look at the original code as in `winner.orig.c` or
`prog.orig.c`. Sometimes the original is in an alt version like `winner.alt.c`
or `prog.alt.c`.
## Q: I cannot get entry XYZZY from year 19xx to compile! ## Q: I cannot get entry XYZZY from year 19xx to compile!
Some winners, particularly winners from long ago, no longer compile on more Some winners, particularly winners from long ago, no longer compile on more
@@ -64,9 +72,12 @@ Mill](/winners.html#Christopher_Mills)'s entry
PDP-11/40 emulator. PDP-11/40 emulator.
Others are not so easy though we're working on this and over time have added Others are not so easy though we're working on this and over time have added
alternative code. Most entries do now work and the others we are working on. In alternative code and/or fixed them. Most entries do now work and the others we
some cases we replaced the original code with code that works for modern systems are working on (slowly as other things are also being done and this is on free
but one can view the original code in the `.orig.c` files (sometimes the time).
In some cases we replaced the original code with code that works for modern
systems but one can view the original code in the `.orig.c` files (sometimes the
original code is also in the directory as a `winner.alt.c` or `prog.alt.c`). original code is also in the directory as a `winner.alt.c` or `prog.alt.c`).
## Q: After running a program my terminal is all messed up! How do I restore my terminal? ## Q: After running a program my terminal is all messed up! How do I restore my terminal?
+11 -1
View File
@@ -594,10 +594,20 @@ different compiler messages. See [bugs.md](/bugs.md) for details.
## [1992/westley](1992/westley/westley.c) ([README.md](1992/westley/README.md])) ## [1992/westley](1992/westley/westley.c) ([README.md](1992/westley/README.md]))
Cody fixed this to work for clang by changing the third and fourth arg of Cody fixed this to work for clang by changing the third and fourth arg of
`main()` to be `char **` inside `main()`; clang requires args 2 - 4 to be `char **`. `main()` to be `char **` inside `main()`; clang requires args 2 - 4 to be `char
**` and some versions do not even allow a fourth arg.
He also added the alternate version that the author gave in the remarks that is He also added the alternate version that the author gave in the remarks that is
specifically for the USA rather than the world. specifically for the USA rather than the world.
NOTE: as noted in the README.md file and the bugs.md, this program and the
alternate version will very likely crash or
[nuke](https://en.wikipedia.org/wiki/Nuclear_weapon) the [entire
world](https://en.wikipedia.org/wiki/Earth) or just the
[USA](https://en.wikipedia.org/wiki/United_States), respectively, without enough
args (2). And not that we need the help or anything for this :-) but we do
encourage you to test this :-) This should not be fixed.
## [1993/jonth](1993/jonth/jonth.c) ([README.md](1993/jonth/README.md])) ## [1993/jonth](1993/jonth/jonth.c) ([README.md](1993/jonth/README.md]))