Merge pull request #1845 from xexyl/birken2013-alt

Reword alt code suggestion in 2013/birken
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2024-01-10 14:04:45 -08:00
commit 66a1c2efee
13 files changed
+86 -72

No files matched your search

+3 -3
View File
@@ -18,9 +18,9 @@ see below and the [Original code](#original-code) section.
### Try: ### Try:
This alternate version, which we recommend you you try first, prior to the This alternate version, which we recommend you you try first, prior to the
original, so that you can see what it did back in 1985, slows down the output original, slows down the output so that you can see what it looked like back in 1985.
which will provide more fun output. It is slowed down by the `usleep(3)` library This will be more enjoyable. It is slowed down by the `usleep(3)` library
call with a configurable time to sleep. The default is 500 but you can call with a configurable time to sleep. The default is 500 microseconds but you can
reconfigure it like: reconfigure it like:
+10 -8
View File
@@ -6,11 +6,9 @@ If your machine support the X Window System, Version 11:
make alt make alt
``` ```
We recommend the alt version first as the so you can see more what it looked We recommend that you try the alt version first so you can get a better idea of
like back in 1992, with modern systems. See [original code](#original-code) for what this looked like back in 1992. See [original code](#original-code) for the
the original should you wish to see what we mean. original should you wish to see what we mean.
You can reconfigure the value to `usleep(3)`; see [try](#try) section below.
### Bugs and (Mis)features: ### Bugs and (Mis)features:
@@ -24,7 +22,7 @@ STATUS: known bug - please help us fix
For more detailed information see [1992 kivinen in bugs.md](/bugs.md#1992-kivinen). For more detailed information see [1992 kivinen in bugs.md](/bugs.md#1992-kivinen).
### Try: ## To use:
```sh ```sh
./kivinen.alt ./kivinen.alt
@@ -36,8 +34,12 @@ For more detailed information see [1992 kivinen in bugs.md](/bugs.md#1992-kivine
See also the author's remarks for other variations. See also the author's remarks for other variations.
Also try changing the speed this game moves. For instance if you wish to change
the `usleep(3)` value to `30000` from `20000`, try: ## Try:
Also try changing the speed that the game moves. For instance if you wish to
change the `usleep(3)` value to `30000` from `20000`, try:
```sh ```sh
make clobber SLEEP=30000 alt # make it slower make clobber SLEEP=30000 alt # make it slower
+1 -1
View File
@@ -38,7 +38,7 @@ include ../../var.mk
# Common C compiler warnings to silence # Common C compiler warnings to silence
# #
CSILENCE= -Wno-return-type -Wno-deprecated-non-prototype CSILENCE= -Wno-return-type -Wno-deprecated-non-prototype -Wno-implicit-int
# Common C compiler warning flags # Common C compiler warning flags
# #
+12 -8
View File
@@ -1,24 +1,25 @@
## To build: ## To build:
We recommend you try the alt version first as with modern systems the original We recommend you try the alt version first so you can get a better idea of what
goes too fast. See the [original code](#original-code) section below to run the this entry was like back in 1993. See the [original code](#original-code)
original. section below to run the original.
```sh ```sh
make alt make alt
``` ```
NOTE: this entry requires the `X11/Xlib.h` header file and the X11 library to
compile. If you're under macOS and do not know how to install and use X11
programs see [FAQ 3.7 - How do I compile and use on macOS, an IOCCC winner that
requires X11?](/faq.md#faq3_7).
To configure how many microseconds to sleep before updates try: To configure how many microseconds to sleep before updates try:
```sh ```sh
make clobber SLEEP=200 alt make clobber SLEEP=200 alt
``` ```
NOTE: this entry requires `X11/Xlib.h` header file and the X11 library to
compile. macOS users running Mountain Lion and later will need to download and
install [XQuartz](https://www.xquartz.org) in order to compile and run this
entry.
### Bugs and (Mis)features: ### Bugs and (Mis)features:
@@ -45,6 +46,9 @@ where:
`speed` is update speed from 1 to 9 (default is 9). `speed` is update speed from 1 to 9 (default is 9).
NOTE: in most cases `DISPLAY` should already be set.
## Original code: ## Original code:
We recommend the version that uses `usleep(3)` to more easily see what is going We recommend the version that uses `usleep(3)` to more easily see what is going
+4 -1
View File
@@ -56,9 +56,12 @@ CSTD= -std=gnu90
# #
ARCH= ARCH=
# Variable to simplify reconfiguring sleep time for alt code
#
SLEEP=3000
# Defines that are needed to compile # Defines that are needed to compile
# #
CDEFINE= -DZ=3000 CDEFINE= -DZ=${SLEEP}
# Include files that are needed to compile # Include files that are needed to compile
# #
+10 -10
View File
@@ -1,17 +1,18 @@
## To build: ## To build:
We recommend that you try this alternate version first. For reasons why this is We recommend that you try the alternate version first so you can see what this
see the [original code](#original-code) section below. entry looked like back in 1995 (with a configurable speed). See the [original
code](#original-code) section below for the original entry.
```sh ```sh
make alt make alt
``` ```
This alternate version uses `usleep(3)` with `Z` (defined in the Makefile, The alternate version uses `usleep(3)` with `SLEEP` (defined in the Makefile,
default `3000`) microseconds to make it easier to see the maze being solved in default `3000`) microseconds to make it easier to see the maze being solved in
real time. You can redefine `Z` to reconfigure it in case it's going too slow, real time. You can redefine `SLEEP` at compile time to reconfigure it in case
too fast :-) or you're doing some strange experiment like making it 100000 it's going too slow, too fast :-) or you're doing some strange experiment like
(which is actually fun :-) ). making it 100000 (which is actually fun :-) ).
### Bugs and (Mis)features: ### Bugs and (Mis)features:
@@ -34,10 +35,9 @@ For more detailed information see [1995 cdua in bugs.md](/bugs.md#1995-cdua).
### Try: ### Try:
To use 1500 for `Z` do:
```sh ```sh
make CFLAGS="-DZ=1500" clobber alt make SLEEP=1500 clobber alt
./cdua.alt # press enter and watch it go much faster! ./cdua.alt # press enter and watch it go much faster!
``` ```
@@ -45,12 +45,12 @@ make CFLAGS="-DZ=1500" clobber alt
You might also like to try: You might also like to try:
```sh ```sh
make CFLAGS="-DZ=65000" clobber alt make SLEEP=65000 clobber alt
./cdua.alt # press enter and watch it go much slower! ./cdua.alt # press enter and watch it go much slower!
``` ```
Do you see anything strange in this version when `Z` is a high value like Do you see anything strange in this version when `SLEEP` is a high value like
`65000`? What happens if you use `100000`? Is this strange output still there? `65000`? What happens if you use `100000`? Is this strange output still there?
Why? Why?
+4 -1
View File
@@ -56,9 +56,12 @@ CSTD= -std=gnu90
# #
ARCH= ARCH=
# Variable to simplify reconfiguring sleep time for alt code
#
SLEEP= 35000
# Defines that are needed to compile # Defines that are needed to compile
# #
CDEFINE= -DZ=35000 CDEFINE= -DZ=${SLEEP}
# Include files that are needed to compile # Include files that are needed to compile
# #
+8 -9
View File
@@ -4,6 +4,10 @@
make alt make alt
``` ```
We recommend that you use the alt version to see what the entry looked like back
in 1996. For the original version see the [original code](#original-code)
section.
## To use: ## To use:
@@ -11,8 +15,7 @@ make alt
./eldby.alt ./eldby.alt
``` ```
To see why we recommend the alternate version instead of the original version, To quit send intr (typically ctrl-c).
see the [original code](#original-code) section.
NOTE: to reset the sanity of your terminal after this program ends try `reset`. NOTE: to reset the sanity of your terminal after this program ends try `reset`.
@@ -22,26 +25,22 @@ NOTE: to reset the sanity of your terminal after this program ends try `reset`.
This alternate version, which we recommend that you use in order to see what is This alternate version, which we recommend that you use in order to see what is
happening with modern systems, and to not flash too quickly, which can be happening with modern systems, and to not flash too quickly, which can be
problematic for some people, can be configured to different speeds by way of the problematic for some people, can be configured to different speeds by way of the
value used in `usleep()`. The default is `-DZ=35000` but you can easily change value used in `usleep()`. The default is `35000` but you can easily change
it. To do so try: it. To do so try:
```sh ```sh
make CFLAGS+="-DZ=20000" clobber alt make SLEEP=20000 clobber alt
./eldby.alt ./eldby.alt
``` ```
## Original code: ## Original code:
Besides the fact that modern systems make it impossible to see what this program This version is the original which has no sleep time in between updates.
does the rapid movement can be a problem for some people. It is for these
reasons that we recommend you first try the alternate version as described
above.
### Original build: ### Original build:
If however you wish to see the original version in modern systems, try:
```sh ```sh
make all make all
+13 -12
View File
@@ -1,17 +1,17 @@
## To build: ## To build:
If you don't have curses or SDL1 installed both modes will fail to compile. In
that case see the [FAQ 3.8 - How do I compile an IOCCC winner that requires SDL1
or SDL2?](/faq.md#SDL) and [FAQ 3.9 - How do I compile an IOCCC winner that
requires (n)curses?](/faq.md#faq3_9) for more information.
```sh ```sh
make alt make alt
``` ```
We recommend that you use the alternate code in modern systems. See the NOTE: if you don't have curses or SDL1 installed both modes will fail to compile. In
[original code](#original-code) section for more details on why this is. that case see the [FAQ 3.8 - How do I compile an IOCCC winner that requires SDL1
or SDL2?](/faq.md#SDL) and [FAQ 3.9 - How do I compile an IOCCC winner that
requires (n)curses?](/faq.md#faq3_9) for more information.
We recommend that you use the alternate code so you can see what this entry
looked like back in 2000 (with a configurable speed). See the
[original code](#original-code) section for the original entry.
## To use: ## To use:
@@ -34,7 +34,7 @@ If you have SDL1 installed:
Whereas the curses version has an early exit the SDL version does not. You will Whereas the curses version has an early exit the SDL version does not. You will
have to kill it yourself. have to kill it yourself.
You might also care to reconfigure the speed at which the programs run. The code You might also wish to reconfigure the speed at which the programs run. The code
calls `usleep(3)` with two default values, one for SDL and one for curses. The calls `usleep(3)` with two default values, one for SDL and one for curses. The
curses and SDL macros are defined in the Makefile in a way that makes it easy to curses and SDL macros are defined in the Makefile in a way that makes it easy to
redefine the values: `SLEEP` is how long the program sleeps (in microseconds) redefine the values: `SLEEP` is how long the program sleeps (in microseconds)
@@ -67,9 +67,10 @@ what is going on then please use the alternate code as described above. If you
wish to see the original entry see below. wish to see the original entry see below.
NOTE: in curses mode you might want to type `reset` after execution of this NOTE: in curses mode you might want to type `reset` after execution of this
program as the program does not call `endwin()`. Using `reset` will clear the program if your terminal is messed up after exiting the program (send intr,
screen. The alt code, as noted above, allows one to quit early so this is not a typically ctrl-c) as the program does not call `endwin()`. Using `reset` will
problem there. clear the screen. The alt code, as noted above, allows one to quit early so this
is not a problem there.
### Original build: ### Original build:
+6 -5
View File
@@ -4,6 +4,10 @@
make alt make alt
``` ```
We recommend the alt version so that you can see what this looked like back in 2006.
If you wish to see the original faster version see [original
code](#original-code) below.
## To use: ## To use:
@@ -11,16 +15,13 @@ make alt
./slone.alt ./slone.alt
``` ```
To see why we recommend the alternate version instead of the original version,
see the [original code](#original-code) section.
### Try: ### Try:
This alternate version, which we recommend that you use in order to see what is The alternate version, which we recommend that you use in order to see what is
happening with modern systems, and to not flash too quickly, which can be happening with modern systems, and to not flash too quickly, which can be
problematic for some people, can be configured to different speeds by way of the problematic for some people, can be configured to different speeds by way of the
value used in `usleep()`. The default is `-DS=75000` but you can easily change value used in `usleep()`. The default is `75000` but you can easily change
it. To do so try: it. To do so try:
```sh ```sh
+13 -7
View File
@@ -4,8 +4,9 @@
make alt make alt
``` ```
To see why we recommend the alternate version instead of the original version, We recommend that you use the alt version first to see what this entry looked
see the [original code](#original-code) section. like back in 2013 (with a configurable speed). If you wish to use the original
version see the [original code](#original-code) section below.
## To use: ## To use:
@@ -14,13 +15,18 @@ see the [original code](#original-code) section.
./birken.alt < 17_columns_wide_paint_by_numbers_file ./birken.alt < 17_columns_wide_paint_by_numbers_file
``` ```
NOTE: if your terminal is messed up after running this (perhaps from exiting
before it finishes) try using `reset` to restore the terminal. This will clear
the screen.
### Try: ### Try:
This alternate version, which we recommend that you use in order to see what is This alternate version, which we recommend that you use in order to see what is
happening with modern systems, and to not flash colours too quickly, which can happening with modern systems, and to not flash colours too quickly, which can
be problematic for some people, can be configured to different speeds by way of be problematic for some people, can be configured to different speeds by way of
the value used in `usleep(3)`. The default is `-DZ=13500`. the value used in `usleep(3)`. The default is `13500` but you can reconfigure
it should you wish (see below).
To see the program run on each text file, try: To see the program run on each text file, try:
@@ -44,10 +50,10 @@ make clobber SLEEP=7500 alt
and then try `birken.alt` as above. and then try `birken.alt` as above.
If you wish to speed that up 200% you can use instead `-DZ=3750`. Doing this you If you wish to speed that up 200% (300% total) you can use instead try
might find the right value to your liking; use ctrl-c to terminate the program `SLEEP=3750`. Doing this you might find the right value to your liking; use
early but note that the terminal is likely to be messed up. Try: ctrl-c to terminate the program early but note that the terminal is likely to be
messed up. In that case try:
```sh ```sh
reset reset
+1 -1
View File
@@ -3583,7 +3583,7 @@ these were not done.
Cody also added the alt version that lets one control how fast the painting is Cody also added the alt version that lets one control how fast the painting is
done, based on the author's recommendations, except that Cody made it done, based on the author's recommendations, except that Cody made it
configurable at compile time. The Makefile was modified in such a way as to make configurable at compile time. The Makefile was modified in such a way as to make
it very easy to redefine them at compile time. it very easy to redefine it at compile time.
Cody also added the [try.sh](/2013/birken/try.sh) script for the entry and the Cody also added the [try.sh](/2013/birken/try.sh) script for the entry and the
[try.alt.sh](/2013/birken/try.alt.sh) script for the alt code. [try.alt.sh](/2013/birken/try.alt.sh) script for the alt code.
+1 -6
View File
@@ -1,5 +1,5 @@
# A todo list of known things to check and/or do # A todo list of known things to check and/or do
*Last updated: Sat 30 Dec 2023 17:37:08 UTC* *Last updated: Wed 10 Jan 2024 18:02:07 UTC*
This document is primarily for [Cody Boone This document is primarily for [Cody Boone
Ferguson](/winners.html#Cody_Boone_Ferguson) as he (that is I :-) ) wanted a way Ferguson](/winners.html#Cody_Boone_Ferguson) as he (that is I :-) ) wanted a way
@@ -44,11 +44,6 @@ run) or else they'll have to be put above the compilation.
1615962832](https://github.com/ioccc-src/temp-test-ioccc/issues/3#issuecomment-1615962832) 1615962832](https://github.com/ioccc-src/temp-test-ioccc/issues/3#issuecomment-1615962832)
for links about the todo items wrt the [FAQ](/faq.md). for links about the todo items wrt the [FAQ](/faq.md).
- With the entries that we recommend the alt code first when it comes to it
going too fast we should say not what it looks like in modern systems but rather
what it LOOKED LIKE AT THE TIME. At Wed 22 Nov 2023 13:02:04 UTC the only entry
that has had this done is [1985/lycklama](1985/lycklama/README.md).
- Check 2001/westley for making `main()` have two args. Easy to make it have two - Check 2001/westley for making `main()` have two args. Easy to make it have two
args but harder to make it function right. args but harder to make it function right.