Files
ioccc/2000/anderson
Landon Curt Noll 2b92c89be8 fix and improve links within the web site
Entry source is now prog.c for IOCCC years 2014 thru 2020,
or is now dirname.c IOCCC years 1984 thru 2013.

To achieve this state, we renamed the following:

renamed:    2004/hibachi/src/hibachi.c -> 2004/hibachi/hibachi.c
renamed:    2012/omoikane/nyaruko.alt.c -> 2012/omoikane/omoikane.alt.c
renamed:    2012/omoikane/nyaruko.alt2.c -> 2012/omoikane/omoikane.alt2.c
renamed:    2012/omoikane/nyaruko.c -> 2012/omoikane/omoikane.c
renamed:    2012/omoikane/nyaruko.orig.c -> 2012/omoikane/omoikane.orig.c

Modified `bin/subst.entry-index.sh` to add to entry `index.html` file,
links to the `Makefile` and the _C code_ to the top navigation bar.
Changed `bin/subst.entry-index.sh` VERSION from "1.2.2 2024-02-25"
to "1.3 2024-03-02".

Moved printing the Inventory link in the top navigation bar
from `bin/subst.entry-navbar.awk` to `bin/subst.entry-index.sh`.
Changed `bin/subst.entry-navbar.awk` VERSION from "1.0.1 2024-02-23"
to "1.1 2024-03-02".

Moved printing the Inventory link in the top navigation bar
from `bin/subst.year-navbar.awk` to `bin/subst.year-index.sh`.
Changed `bin/subst.year-index.sh` VERSION from "1.0 2024-02-11"
to "1.1 2024-03-02".
Changed `bin/subst.year-navbar.awk` VERSION from "1.0 2024-02-11"
to "1.1 2024-03-02".

Added location names (both default and common) to `author.html`.
Changed `tmp/gen_author_json.sh` VERSION from "1.0 2023-06-06"
to "1.1 2024-03-04".

Added location names (both default and common) to `author.html`.
Changed `bin/gen-authors.sh` VERSION from "1.2 2024-03-09"
to "1.3 2024-03-04".

The manifest and the resulting `.entry.json` files have been changed
for `2004/hibachi` and `2012/omoikane`.

The Makefiles for  `2004/hibachi` and `2012/omoikane` copy the
source file into the "previously used location".  The `make clobber`
rule removes the copied source.  The `.gitignore` files have been
updated accordingly.

Improved how the concept of IOCCC terms _entry_, _author_ and _submission_ are
used in markdown files.

Links to markdown files (files ending in .md) within the repo were
changed to link to HTML files (files ending in .html).  Special cases
where `README.md` became `index.html` were modified accordingly.

Fixed URL for `bugs.html` in Makefile comments.

Fixed name of `bin/sgi.sh` referenced in comments in `.gitignore` files.

Links to locations within the repo are now relative.  For example a
link to `/contact.html` may become `../contact.html' or '../../contact.html`
depending on the directory level of the markdown file.

Nearly all links with absolute URLs under _https://www.ioccc.org_
or `https://ioccc-src.github.io/temp-test-ioccc_ have been changed to
relative paths within the repo.  Some exceptions to this (such as
referring to a GitHub repo) were preserved.

Fixed a number of inside `faq.md` and `bugs.md`.

Added HTML name tags (in the form of an _entry_id_) for each entry
referenced in `bugs.md`.  Fixed links from outside of `bugs.html`
into `bugs.html` accordingly.

Where FAQ entries are referenced, a named tag is used so that if a
FAQ is ever renumbered, links outside of `faq.html` will still work.

Changed the _inventory_order_ of a compressed tarball from _300_
to _100000_.  While this may have been done for the manifest,
this changed had not yet been propagated into the `.entry.json` files.

Links to web sites that were in the for <URL> are now [URL](URL).

Performed `name www` to process all of the above.

Improved format of `authors.html`.  Full names are now bold.
Location codes are now links back into `location.html` and
location names (both default and common) are now italics.
Added _author_handle_ each author.

Changed `bin/gen-authors.sh` VERSION from "1.1 2024-02-25"
to "1.2 2024-03-09".

Improved format of `location.html` as location codes are now bold,
author counts in a given location are now bold, and location names
(both default and common) are now italics.

Changed `bin/gen-location.sh` VERSION from "1.0.1 2024-02-23"
to "1.1 2024-03-04".

Added italic location name after location code in entry
`index.html` files.

Changed `bin/output-index-author.sh` VERSION from "1.4.1 2024-02-23"
to "1.5 2024-03-04".

Added _Location of authors_ to the sidebar as a link to `location.html`.

TODO: While nearly all of the above mentioned changes are likely correct,
      they likely introduced a few errors that need correcting.
2024-03-04 23:45:28 -08:00
..
2024-02-27 23:21:32 -08:00
2023-07-06 21:49:38 -07:00
2024-01-15 04:29:39 -08:00

To build:

make

To use:

echo something | ./anderson

Try:

./try.sh

Judges' remarks:

This small program might be a nice addition to a digital personal organizer; just in case you are stranded on a desert island and need to signal your distress to passing ships.

The obfuscation in this program is truly masterful. The program is very cleverly obscured without the use of a single #define! Reformatting this program by hand :-) is the easiest way to understand what is going on.

Note about #defines not being used:

In 2023 due to annoying warnings triggered at different times, sometimes interspersed with the output of the program (this happens in macOS), many entries were changed to use fgets(3) instead. However to make the entries more like the original we redefined gets to use fgets. Unfortunately it's not possible to do it through -Dfoo compiler options so there is a #define in the code now.

Author's remarks:

This program is a simple filter that translates ASCII text into semaphore code. It reads from standard input and converts all alphanumeric characters to their corresponding semaphore codes. Consecutive whitespace is translated as a single 'break' code. Newlines also cause the next code to be output on a new line. All other characters are ignored. The codes themselves are written to standard output as a depiction of a person holding two flags, using only ASCII characters (semaphore smileys, if you will). For example, given the input "Hello, world!", the output will be:

	      <>       <>       <>    <>                  <>     <>
  _()       ()/      ()/      ()/     _\)       ()       (/_     _\)
[] /^      |^^      /^^      /^^    [] ^^      |^^|      ^^ [] [] ^^
  <>[      [][     <>][     <>][       ][      [][]      ][       ][


	      <>    []
  _()_      ()/     |()       ()
[] ^^ []   /^^       ^^|     |^^|
   ][     <>][       ][]     [][]

The program is obfuscated without the use of the preprocessor or any special compilation parameters. In fact, the program doesn't even bother using any keywords, save the single char at the beginning. This program was crafted using only operator precedence rules, short-circuit evaluation and recursion. Each function contains a single, non-empty statement. (I did have to add a couple of empty statements to format the code properly.) There is a single string constant which encodes the flag positions and other data needed for drawing the semaphore codes.

The preprocessor will provide no help in de-obfuscating this code, and a C beautifier won't get you very far either. You just have to crunch through it.

An ANSI C compiler will generate several warnings when it compiles this program, as none of the functions declare their return type, nor do they return anything. This was necessary to keep the program free of keywords. It's valid in K&R C, and compiles in ANSI C. There are also warnings about conversion from int to char and the resulting loss of data. Again, if it's OK with K&R, it's OK with me.

This program is a great teaching tool for learning the semaphore code; and if you don't have any flags handy you can just use two copies of the source file.

This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. You are free to share and adapt this file under the terms of this license:

Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)

For more information, see: https://creativecommons.org/licenses/by-sa/4.0/