1989/fubar updates

Format fix the README.md file including removing some '\'s at end of
lines (in the remarks).

Document feature that if the arg is a large number or < 0 (the latter of
which I discovered a few minutes ago as I was working on this) it will
enter an infinite loop trying to compile code that has syntax errors.
This was noted by the judges at the time so it is not a bug but a
feature. This has been added to the bugs.md and the README.md file.
This commit is contained in:
Cody Boone Ferguson committed 2023-10-19 09:53:28 -07:00
1 parent c6ff25ac17
commit 3ed32862d8
2 files changed
+21 -10

No files matched your search

+12 -10
View File
@@ -25,34 +25,36 @@ make all
./fubar 2 ./fubar 2
``` ```
### INABIAF - it's not a bug it's a feature! :-)
If you use either `fubar` or `ouroboros.c` (it's executable, see below) with a
number < 0 or larger than, say 20, it's very likely that the program will turn
into an infinite loop trying to compile code with syntax errors.
## Judges' remarks: ## Judges' remarks:
Run this with a single digit argument (or wait a long time). Run this with a single digit argument (or wait a long time and risk an infinite
loop as described above).
The blank line at the beginning of the source is mandatory. The blank line at the beginning of the source is mandatory.
Do you know why? Do you know why?
NOTE: don't try running `ouroboros.c` (note that it's executable)
directly with an arg as it'll turn into an infinite loop. The same will happen
with larger numbers.
NOTE: the file `ouroboros.c` is created by the program itself so this is why it NOTE: the file `ouroboros.c` is created by the program itself so this is why it
is not in the repository. is not in the repository.
## Author's remarks: ## Author's remarks:
In a nutshell, this is probably the slowest and most In a nutshell, this is probably the slowest and most
obnoxious factorial program ever written. Unfortunately,\ obnoxious factorial program ever written. Unfortunately,
the name of the C source must be "ouroboros.c"; the name is\ the name of the C source must be `ouroboros.c`; the name is
hard-coded into the program. hard-coded into the program.
The source is a legal shell script and a legal C program.\ The source is a legal shell script and a legal C program.
The shell script compiles itself, and then executes the The shell script compiles itself, and then executes the
resulting binary, giving the source as input. The program\ resulting binary, giving the source as input. The program
works by successively modifying #define lines each pass through. works by successively modifying #define lines each pass through.
Both `indent` and `cb` will damage the program, `indent`\ Both `indent` and `cb` will damage the program, `indent`
much more so. much more so.
## Copyright and CC BY-SA 4.0 License: ## Copyright and CC BY-SA 4.0 License:
+9
View File
@@ -558,6 +558,15 @@ so, the program drops a core file into the directory.
# 1989 # 1989
## [1989/fubar](1989/fubar/fubar.c) ([README.md](1989/fubar/README.md))
## STATUS: INABIAF - please **DO NOT** fix
Specifying too large a number (or < 0) to either `fubar` or the source code file
(it's executable) that it generates will cause the program to enter an infinite
loop, trying to compile code with syntax errors. At least in one system any
number larger than 20 did this.
## [1989/robison](1989/robison/robison.c) ([README.md](1989/robison/README.md)) ## [1989/robison](1989/robison/robison.c) ([README.md](1989/robison/README.md))
## STATUS: INABIAF - please **DO NOT** fix ## STATUS: INABIAF - please **DO NOT** fix