Merge pull request #1845 from xexyl/birken2013-alt
Reword alt code suggestion in 2013/birken
This commit is contained in:
13 files changed
+86
-72
No files matched your search
@@ -18,9 +18,9 @@ see below and the [Original code](#original-code) section.
|
||||
### Try:
|
||||
|
||||
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
|
||||
which will provide more fun output. It is slowed down by the `usleep(3)` library
|
||||
call with a configurable time to sleep. The default is 500 but you can
|
||||
original, slows down the output so that you can see what it looked like back in 1985.
|
||||
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 microseconds but you can
|
||||
reconfigure it like:
|
||||
|
||||
|
||||
|
||||
+10
-8
@@ -6,11 +6,9 @@ If your machine support the X Window System, Version 11:
|
||||
make alt
|
||||
```
|
||||
|
||||
We recommend the alt version first as the so you can see more what it looked
|
||||
like back in 1992, with modern systems. See [original code](#original-code) for
|
||||
the original should you wish to see what we mean.
|
||||
|
||||
You can reconfigure the value to `usleep(3)`; see [try](#try) section below.
|
||||
We recommend that you try the alt version first so you can get a better idea of
|
||||
what this looked like back in 1992. See [original code](#original-code) for the
|
||||
original should you wish to see what we mean.
|
||||
|
||||
|
||||
### 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).
|
||||
|
||||
|
||||
### Try:
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./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.
|
||||
|
||||
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
|
||||
make clobber SLEEP=30000 alt # make it slower
|
||||
|
||||
@@ -38,7 +38,7 @@ include ../../var.mk
|
||||
|
||||
# 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
|
||||
#
|
||||
|
||||
+12
-8
@@ -1,24 +1,25 @@
|
||||
## To build:
|
||||
|
||||
We recommend you try the alt version first as with modern systems the original
|
||||
goes too fast. See the [original code](#original-code) section below to run the
|
||||
original.
|
||||
|
||||
We recommend you try the alt version first so you can get a better idea of what
|
||||
this entry was like back in 1993. See the [original code](#original-code)
|
||||
section below to run the original.
|
||||
|
||||
```sh
|
||||
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:
|
||||
|
||||
```sh
|
||||
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:
|
||||
@@ -45,6 +46,9 @@ where:
|
||||
`speed` is update speed from 1 to 9 (default is 9).
|
||||
|
||||
|
||||
NOTE: in most cases `DISPLAY` should already be set.
|
||||
|
||||
|
||||
## Original code:
|
||||
|
||||
We recommend the version that uses `usleep(3)` to more easily see what is going
|
||||
|
||||
+4
-1
@@ -56,9 +56,12 @@ CSTD= -std=gnu90
|
||||
#
|
||||
ARCH=
|
||||
|
||||
# Variable to simplify reconfiguring sleep time for alt code
|
||||
#
|
||||
SLEEP=3000
|
||||
# Defines that are needed to compile
|
||||
#
|
||||
CDEFINE= -DZ=3000
|
||||
CDEFINE= -DZ=${SLEEP}
|
||||
|
||||
# Include files that are needed to compile
|
||||
#
|
||||
|
||||
+10
-10
@@ -1,17 +1,18 @@
|
||||
## To build:
|
||||
|
||||
We recommend that you try this alternate version first. For reasons why this is
|
||||
see the [original code](#original-code) section below.
|
||||
We recommend that you try the alternate version first so you can see what this
|
||||
entry looked like back in 1995 (with a configurable speed). See the [original
|
||||
code](#original-code) section below for the original entry.
|
||||
|
||||
```sh
|
||||
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
|
||||
real time. You can redefine `Z` to reconfigure it in case it's going too slow,
|
||||
too fast :-) or you're doing some strange experiment like making it 100000
|
||||
(which is actually fun :-) ).
|
||||
real time. You can redefine `SLEEP` at compile time to reconfigure it in case
|
||||
it's going too slow, too fast :-) or you're doing some strange experiment like
|
||||
making it 100000 (which is actually fun :-) ).
|
||||
|
||||
|
||||
### Bugs and (Mis)features:
|
||||
@@ -34,10 +35,9 @@ For more detailed information see [1995 cdua in bugs.md](/bugs.md#1995-cdua).
|
||||
|
||||
### Try:
|
||||
|
||||
To use 1500 for `Z` do:
|
||||
|
||||
```sh
|
||||
make CFLAGS="-DZ=1500" clobber alt
|
||||
make SLEEP=1500 clobber alt
|
||||
|
||||
./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:
|
||||
|
||||
```sh
|
||||
make CFLAGS="-DZ=65000" clobber alt
|
||||
make SLEEP=65000 clobber alt
|
||||
|
||||
./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?
|
||||
Why?
|
||||
|
||||
|
||||
+4
-1
@@ -56,9 +56,12 @@ CSTD= -std=gnu90
|
||||
#
|
||||
ARCH=
|
||||
|
||||
# Variable to simplify reconfiguring sleep time for alt code
|
||||
#
|
||||
SLEEP= 35000
|
||||
# Defines that are needed to compile
|
||||
#
|
||||
CDEFINE= -DZ=35000
|
||||
CDEFINE= -DZ=${SLEEP}
|
||||
|
||||
# Include files that are needed to compile
|
||||
#
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
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:
|
||||
|
||||
@@ -11,8 +15,7 @@ make alt
|
||||
./eldby.alt
|
||||
```
|
||||
|
||||
To see why we recommend the alternate version instead of the original version,
|
||||
see the [original code](#original-code) section.
|
||||
To quit send intr (typically ctrl-c).
|
||||
|
||||
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
|
||||
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
|
||||
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:
|
||||
|
||||
```sh
|
||||
make CFLAGS+="-DZ=20000" clobber alt
|
||||
make SLEEP=20000 clobber alt
|
||||
./eldby.alt
|
||||
```
|
||||
|
||||
|
||||
## Original code:
|
||||
|
||||
Besides the fact that modern systems make it impossible to see what this program
|
||||
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.
|
||||
This version is the original which has no sleep time in between updates.
|
||||
|
||||
|
||||
### Original build:
|
||||
|
||||
If however you wish to see the original version in modern systems, try:
|
||||
|
||||
```sh
|
||||
make all
|
||||
|
||||
+13
-12
@@ -1,17 +1,17 @@
|
||||
## 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
|
||||
make alt
|
||||
```
|
||||
|
||||
We recommend that you use the alternate code in modern systems. See the
|
||||
[original code](#original-code) section for more details on why this is.
|
||||
NOTE: 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.
|
||||
|
||||
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:
|
||||
@@ -34,7 +34,7 @@ If you have SDL1 installed:
|
||||
Whereas the curses version has an early exit the SDL version does not. You will
|
||||
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
|
||||
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)
|
||||
@@ -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.
|
||||
|
||||
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
|
||||
screen. The alt code, as noted above, allows one to quit early so this is not a
|
||||
problem there.
|
||||
program if your terminal is messed up after exiting the program (send intr,
|
||||
typically ctrl-c) as the program does not call `endwin()`. Using `reset` will
|
||||
clear the screen. The alt code, as noted above, allows one to quit early so this
|
||||
is not a problem there.
|
||||
|
||||
|
||||
### Original build:
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
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:
|
||||
|
||||
@@ -11,16 +15,13 @@ make alt
|
||||
./slone.alt
|
||||
```
|
||||
|
||||
To see why we recommend the alternate version instead of the original version,
|
||||
see the [original code](#original-code) section.
|
||||
|
||||
|
||||
### 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
|
||||
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:
|
||||
|
||||
```sh
|
||||
|
||||
+13
-7
@@ -4,8 +4,9 @@
|
||||
make alt
|
||||
```
|
||||
|
||||
To see why we recommend the alternate version instead of the original version,
|
||||
see the [original code](#original-code) section.
|
||||
We recommend that you use the alt version first to see what this entry looked
|
||||
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:
|
||||
@@ -14,13 +15,18 @@ see the [original code](#original-code) section.
|
||||
./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:
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
@@ -44,10 +50,10 @@ make clobber SLEEP=7500 alt
|
||||
|
||||
and then try `birken.alt` as above.
|
||||
|
||||
If you wish to speed that up 200% you can use instead `-DZ=3750`. Doing this you
|
||||
might find the right value to your liking; use ctrl-c to terminate the program
|
||||
early but note that the terminal is likely to be messed up. Try:
|
||||
|
||||
If you wish to speed that up 200% (300% total) you can use instead try
|
||||
`SLEEP=3750`. Doing this you might find the right value to your liking; use
|
||||
ctrl-c to terminate the program early but note that the terminal is likely to be
|
||||
messed up. In that case try:
|
||||
|
||||
```sh
|
||||
reset
|
||||
|
||||
+1
-1
@@ -3583,7 +3583,7 @@ these were not done.
|
||||
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
|
||||
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
|
||||
[try.alt.sh](/2013/birken/try.alt.sh) script for the alt code.
|
||||
|
||||
+1
-6
@@ -1,5 +1,5 @@
|
||||
# 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
|
||||
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)
|
||||
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
|
||||
args but harder to make it function right.
|
||||
|
||||
|
||||
Reference in new issue
Block a user