From d0778905607453fdf46f56f8dbc94d58def4622e Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 12 Dec 2023 09:15:22 -0800 Subject: [PATCH] Format/typo check 2018/giles/README.md --- 2018/giles/README.md | 92 ++++---------------------------------------- 1 file changed, 8 insertions(+), 84 deletions(-) diff --git a/2018/giles/README.md b/2018/giles/README.md index 930f41533..c443e1df8 100644 --- a/2018/giles/README.md +++ b/2018/giles/README.md @@ -1,82 +1,13 @@ ## To build: -This entry requires SDL2 to be installed. +This entry requires SDL2 to be installed. See [FAQ 3.8: How do I compile an +IOCCC winner that requires SDL1 or SDL2?](/faq.md#SDL) if you don't have it +installed and don't know how to do so. ```sh make ``` -### To install SDL and SDL2: - -#### macOS users (Homebrew) - -If you have not already done so, install [Homebrew](https://brew.sh). - -Then to install SDL and SDL2, execute the following command: - -```sh -brew install sdl2 sdl12-compat -eval "$(/opt/homebrew/bin/brew shellenv)" -``` - -#### macOS users (MacPorts) - -Install [MacPorts](https://www.macports.org/install.php). - -Then to install SDL and SDL2: - -```sh -sudo port install libsdl libsdl2 -``` - -#### Red Hat Linux users: - -To install SDL and SDL2, execute the following command as root: - -```sh -dnf install SDL2 SDL2-devel sdl12-compat sdl12-compat-devel -``` - -It was once possibly necessary to use `make` like: - -```sh -make ... SDL2_INCLUDE_ROOT=/usr -``` - -or set the following environment variable: - -```sh -export SDL2_INCLUDE_ROOT=/usr -``` - -but this is most likely unneeded as we use `sdl-config` and `sdl2-config` in the -Makefiles. - -#### Debian users - -To install SDL and SDL2, execute the following command as root: - -```sh -apt install libsdl1.2debian libsdl1.2-dev libsdl2-dev -``` - -It was once possibly necessary to use `make` like: - -```sh -make ... SDL2_INCLUDE_ROOT=/usr -``` - -or set the following environment variable: - -```sh -export SDL2_INCLUDE_ROOT=/usr -``` - -but this is most likely unneeded as we use `sdl-config` and `sdl2-config` in the -Makefiles. - -See also the judges' remarks below. - ## To use: @@ -97,20 +28,12 @@ See also the judges' remarks below. ## Judges' remarks: -Can you explain the behavior of the program when ioccc.txt is given to it as input? +Can you explain the behavior of the program when [ioccc.txt](ioccc.txt) is given +to it as input? How would the description of the state machine look like when translated from Polynomish to English? -You may have to install libsdl2-dev on your system to compile and use this code: - -```sh -sudo dnf install SDL2 SDL2-devel # Linux -sudo apt install libsdl2-dev # Debian -brew install sdl2 # macOS via Homebrew -sudo port install libsdl2 # macOS via MacPorts -``` - ## Author's remarks: @@ -121,7 +44,8 @@ It uses SDL to draw the interface. The code makes the following assumptions about the underlying system: -* SDL2 is installed from [https://libsdl.org](https://libsdl.org). +* SDL2 is installed from [https://libsdl.org](https://libsdl.org) or your +package manager. * `double` is an IEEE 754 floating-point type and `sizeof(double)==8`. * The compiler supports the C99 standard. @@ -129,7 +53,7 @@ In order to simulate the motion of the sand, a cellular automaton is used. The state transition table is not stored directly. Instead, the program stores the coefficients of a polynomial that map each state to the correct one. These coefficients are stored as raw hexadecimal in the `V[]` array, and they are -reinterpreted as doubles when used. This allows more numeric precision in fewer +reinterpreted as `double`s when used. This allows more numeric precision in fewer characters (base 16 > base 10), and makes the purpose of the array less clear. The code is laid out graphically as a bucket pouring sand, and it is far easier