diff --git a/1996/august/README.md b/1996/august/README.md index 54b91b789..0b341fc1f 100644 --- a/1996/august/README.md +++ b/1996/august/README.md @@ -5,17 +5,6 @@ ``` -### Bugs and (Mis)features: - -The current status of this entry is: - -``` - STATUS: doesn't work with some compilers - please provide alternative code or fix for more compilers -``` - -For more detailed information see [1996/august in bugs.html](../../bugs.html#1996_august). - - ## To use: ``` diff --git a/1996/august/index.html b/1996/august/index.html index a8db8b438..19f51877d 100644 --- a/1996/august/index.html +++ b/1996/august/index.html @@ -397,10 +397,6 @@ Location: SE - Kingdom of Sweden (

To build:

    make all
-

Bugs and (Mis)features:

-

The current status of this entry is:

-
    STATUS: doesn't work with some compilers - please provide alternative code or fix for more compilers
-

For more detailed information see 1996/august in bugs.html.

To use:

    cat august.c test.oc | ./august > test.oo
     ./august < test.oo
diff --git a/1996/schweikh2/Makefile b/1996/schweikh2/Makefile index 9f7b36c43..e438813d4 100644 --- a/1996/schweikh2/Makefile +++ b/1996/schweikh2/Makefile @@ -203,6 +203,7 @@ clean: clobber: clean ${RM} -f ${TARGET} ${ALT_TARGET} ${RM} -rf *.dSYM + ${RM} -f obfus.c @-if [ -e sandwich ]; then \ ${RM} -f sandwich; \ echo 'ate sandwich'; \ diff --git a/1996/schweikh2/README.md b/1996/schweikh2/README.md index bf4d88267..339033c75 100644 --- a/1996/schweikh2/README.md +++ b/1996/schweikh2/README.md @@ -57,6 +57,10 @@ appropriately. Try: perl ./hunni.pl < hunni.c ``` +NOTE: the [try.sh](%%REPO_URL%%/1996/schweikh2/try.sh) does this if you have +`perl(1)` installed to show how the output is the same as +[schweikh2.c](%%REPO_URL%%/1996/schweikh2/schweikh2.c) itself. + This entry was another crowd pleaser at the IOCCC BOF. diff --git a/1996/schweikh2/index.html b/1996/schweikh2/index.html index 6f201b983..b95d3baca 100644 --- a/1996/schweikh2/index.html +++ b/1996/schweikh2/index.html @@ -422,6 +422,9 @@ appropriately. Try:

    less hunni.c
 
     perl ./hunni.pl < hunni.c
+

NOTE: the try.sh does this if you have +perl(1) installed to show how the output is the same as +schweikh2.c itself.

This entry was another crowd pleaser at the IOCCC BOF.

Author’s remarks:

Note: the source must be viewed with tabstop 8. To appreciate the diff --git a/1996/schweikh2/try.sh b/1996/schweikh2/try.sh index 6e8fc68da..da7a34f41 100755 --- a/1996/schweikh2/try.sh +++ b/1996/schweikh2/try.sh @@ -29,3 +29,30 @@ read -r -n 1 -p "Press any key to run grep -v '#' schweikh2.c (space = next page echo 1>&2 grep -v '#' schweikh2.c | less -rEXF echo 1>&2 + +PERL="$(type -P perl)" +if [[ -n "$PERL" ]]; then + read -r -n 1 -p "Press any key to run: less hunni.c (space = next page, q = quit): " + echo 1>&2 + less -rEXF hunni.c + echo 1>&2 + + echo "$ perl ./hunni.pl < hunni.c > obfus.c" 1>&2 + read -r -n 1 -p "Press any key to obfuscate hunni.c as obfus.c (space = next page, q = quit): " + echo 1>&2 + perl ./hunni.pl < hunni.c > obfus.c + + read -r -n 1 -p "Press any key to run: diff -s obfus.c schweikh2.c: " + echo 1>&2 + diff -s obfus.c schweikh2.c + rm -f obfus.c +fi + +read -r -p "Do you want to run the author's suggested command (Y/N)? " +if [[ "$REPLY" = "y" || "$REPLY" = "Y" ]]; then + echo "Warning: this command is an infinite loop. Press ctrl-c or whatever your" 1>&2 + echo "intr is to end it." 1>&2 + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 + while :; do grep -v '#' schweikh2.c; sleep 2; echo; done +fi diff --git a/2020/kurdyukov4/README.md b/2020/kurdyukov4/README.md index 8fc86240c..d74f0f688 100644 --- a/2020/kurdyukov4/README.md +++ b/2020/kurdyukov4/README.md @@ -62,7 +62,7 @@ Example: Try using the same random seed and varying the context size. BTW: what on Middle-earth is `lámatyávë`? It's Quenya, one of the languages of -the Elves in Tolkien's Legendarium. It means sound taste (plural is lámatyáver) +the Elves in Tolkien's Legendarium. It means sound taste (plural is `lámatyáver`) and it refers to phonaesthesia - in other words, it refers to the pleasure of sound and form of words. It's discussed in [Morgoth's Ring](https://en.wikipedia.org/wiki/Morgoth%27s_Ring), volume X of [History of diff --git a/2020/kurdyukov4/index.html b/2020/kurdyukov4/index.html index 6e8be673b..60d2d2a9d 100644 --- a/2020/kurdyukov4/index.html +++ b/2020/kurdyukov4/index.html @@ -426,7 +426,7 @@ Example:


Try using the same random seed and varying the context size.

BTW: what on Middle-earth is lámatyávë? It’s Quenya, one of the languages of -the Elves in Tolkien’s Legendarium. It means sound taste (plural is lámatyáver) +the Elves in Tolkien’s Legendarium. It means sound taste (plural is lámatyáver) and it refers to phonaesthesia - in other words, it refers to the pleasure of sound and form of words. It’s discussed in Morgoth’s Ring, volume X of History of diff --git a/authors.html b/authors.html index f6752b164..16f7f8941 100644 --- a/authors.html +++ b/authors.html @@ -408,7 +408,7 @@ Jump to authors sorted by: [


-

a is for atoi

+

a is for atoi


@@ -643,7 +643,7 @@ author_handle:
-

b is for break

+

b is for break


@@ -1056,7 +1056,7 @@ author_handle:
-

c is for const

+

c is for const


@@ -1181,7 +1181,7 @@ author_handle:
-

d is for do

+

d is for do


@@ -1438,7 +1438,7 @@ author_handle:
-

e is for else

+

e is for else


@@ -1528,7 +1528,7 @@ author_handle:
-

f is for float

+

f is for float


@@ -1662,7 +1662,7 @@ author_handle:
-

g is for getc

+

g is for getc


@@ -1802,7 +1802,7 @@ author_handle:
-

h is for hypot

+

h is for hypot


@@ -2112,7 +2112,7 @@ author_handle:
-

i is for int

+

i is for int


@@ -2134,7 +2134,7 @@ author_handle:
-

j is for jmp_buf

+

j is for jmp_buf


@@ -2190,7 +2190,7 @@ author_handle:
-

k is for killchar

+

k is for killchar


@@ -2350,7 +2350,7 @@ author_handle:
-

l is for long

+

l is for long


@@ -2533,7 +2533,7 @@ author_handle:
-

m is for malloc

+

m is for malloc


@@ -2792,7 +2792,7 @@ author_handle:
-

n is for nullptr

+

n is for nullptr


@@ -2863,7 +2863,7 @@ author_handle:
-

o is for open

+

o is for open


@@ -2940,7 +2940,7 @@ author_handle:
-

p is for printf

+

p is for printf


@@ -3082,13 +3082,13 @@ author_handle:
-

q is for qsort

+

q is for qsort


-

r is for return

+

r is for return


@@ -3249,7 +3249,7 @@ author_handle:
-

s is for switch

+

s is for switch


@@ -3551,7 +3551,7 @@ author_handle:
-

t is for true

+

t is for true


@@ -3666,13 +3666,13 @@ author_handle:
-

u is for union

+

u is for union


-

v is for volatile

+

v is for volatile


@@ -3731,7 +3731,7 @@ author_handle:
-

w is for while

+

w is for while


@@ -3860,13 +3860,13 @@ author_handle:
-

x is for xor

+

x is for xor


-

y is for y0

+

y is for y0


@@ -3899,7 +3899,7 @@ author_handle:
-

z is for zlib

+

z is for zlib


diff --git a/bin/gen-authors.sh b/bin/gen-authors.sh index 2dfb74985..b2cd4d8ca 100755 --- a/bin/gen-authors.sh +++ b/bin/gen-authors.sh @@ -114,32 +114,32 @@ export EXIT_CODE="0" # unset IS_FOR declare -Ag IS_FOR -IS_FOR[a]="a is for atoi" -IS_FOR[b]="b is for break" -IS_FOR[c]="c is for const" -IS_FOR[d]="d is for do" -IS_FOR[e]="e is for else" -IS_FOR[f]="f is for float" -IS_FOR[g]="g is for getc" -IS_FOR[h]="h is for hypot" -IS_FOR[i]="i is for int" -IS_FOR[j]="j is for jmp_buf" -IS_FOR[k]="k is for killchar" -IS_FOR[l]="l is for long" -IS_FOR[m]="m is for malloc" -IS_FOR[n]="n is for nullptr" -IS_FOR[o]="o is for open" -IS_FOR[p]="p is for printf" -IS_FOR[q]="q is for qsort" -IS_FOR[r]="r is for return" -IS_FOR[s]="s is for switch" -IS_FOR[t]="t is for true" -IS_FOR[u]="u is for union" -IS_FOR[v]="v is for volatile" -IS_FOR[w]="w is for while" -IS_FOR[x]="x is for xor" -IS_FOR[y]="y is for y0" -IS_FOR[z]="z is for zlib" +IS_FOR[a]="a is for atoi" +IS_FOR[b]="b is for break" +IS_FOR[c]="c is for const" +IS_FOR[d]="d is for do" +IS_FOR[e]="e is for else" +IS_FOR[f]="f is for float" +IS_FOR[g]="g is for getc" +IS_FOR[h]="h is for hypot" +IS_FOR[i]="i is for int" +IS_FOR[j]="j is for jmp_buf" +IS_FOR[k]="k is for killchar" +IS_FOR[l]="l is for long" +IS_FOR[m]="m is for malloc" +IS_FOR[n]="n is for nullptr" +IS_FOR[o]="o is for open" +IS_FOR[p]="p is for printf" +IS_FOR[q]="q is for qsort" +IS_FOR[r]="r is for return" +IS_FOR[s]="s is for switch" +IS_FOR[t]="t is for true" +IS_FOR[u]="u is for union" +IS_FOR[v]="v is for volatile" +IS_FOR[w]="w is for while" +IS_FOR[x]="x is for xor" +IS_FOR[y]="y is for y0" +IS_FOR[z]="z is for zlib" # clear options we will add to tools # diff --git a/bin/gen-status.sh b/bin/gen-status.sh index 65a7071ba..766b83d35 100755 --- a/bin/gen-status.sh +++ b/bin/gen-status.sh @@ -111,6 +111,18 @@ if [[ -z "$JPARSE_TOOL" ]]; then echo "$0: FATAL: jparse tool is not installed or not in \$PATH" 1>&2 exit 5 fi +STAT_TOOL=$(type -P stat) +if [[ -z "$STAT_TOOL" ]]; then + echo "$0: FATAL: stat tool is not installed or not in \$PATH" 1>&2 + exit 5 +fi + +LS_TOOL=$(type -P ls) +if [[ -z "$LS_TOOL" ]]; then + echo "$0: FATAL: ls tool is not installed or not in \$PATH" 1>&2 + exit 5 +fi + export IOCCC_STATUS_VERSION="1.0 2024-03-09" # export NOOP= @@ -153,11 +165,11 @@ function output_modtime # macOS stat # macos_stat) - TZ=UTC stat -f '%Sm' -t '%FT%T+00:00' "$FILENAME" + TZ=UTC "$STAT_TOOL" -f '%Sm' -t '%FT%T+00:00' "$FILENAME" status="$?" if [[ $status -ne 0 ]]; then echo "$0: ERROR: in output_modtime:" \ - "TZ=UTC stat -f '%Sm' -t '%FT%T+00:00' $FILENAME failed, error code: $status" 1>&2 + "TZ=UTC $STAT_TOOL -f '%Sm' -t '%FT%T+00:00' $FILENAME failed, error code: $status" 1>&2 exit 1 fi ;; @@ -165,12 +177,12 @@ function output_modtime # RHEL Linux stat # RHEL_stat) - TZ=UTC stat -c '%y' "$FILENAME" | sed -e 's/ /T/' -e 's/\.[0-9]* //' -e 's/\([0-9][0-9]\)$/:&/' + TZ=UTC "$STAT_TOOL" -c '%y' "$FILENAME" | sed -e 's/ /T/' -e 's/\.[0-9]* //' -e 's/\([0-9][0-9]\)$/:&/' status0="${PIPESTATUS[0]}" status1="${PIPESTATUS[1]}" if [[ $status0 -ne 0 || $status1 -ne 0 ]]; then echo "$0: ERROR: in output_modtime:" \ - "TZ=UTC stat -c '%y' $FILENAME | sed .. failed, error codes: $status0 and $status1" 1>&2 + "TZ=UTC $STAT_TOOL -c '%y' $FILENAME | sed .. failed, error codes: $status0 and $status1" 1>&2 exit 1 fi ;; @@ -181,12 +193,12 @@ function output_modtime # SC2012 (info): Use find instead of ls to better handle non-alphanumeric filenames. # https://www.shellcheck.net/wiki/SC2012 # shellcheck disable=SC2012 - TZ=UTZ ls -D '%FT%T+00:00' -ld "$FILENAME" | awk '{print $6;}' + TZ=UTZ "$LS_TOOL" -D '%FT%T+00:00' -ld "$FILENAME" | awk '{print $6;}' status0="${PIPESTATUS[0]}" status1="${PIPESTATUS[1]}" if [[ $status0 -ne 0 || $status1 -ne 0 ]]; then echo "$0: ERROR: in output_modtime:" \ - "TZ=UTZ ls -D '%FT%T+00:00' -ld $FILENAME | awk .. failed, error codes: $status0 and $status1" 1>&2 + "TZ=UTZ $LS_TOOL -D '%FT%T+00:00' -ld $FILENAME | awk .. failed, error codes: $status0 and $status1" 1>&2 exit 1 fi ;; @@ -687,12 +699,12 @@ export NEXT_DIR="next" # # TZ=UTC stat -f '%Sm' -t '%FT%T+00:00' filename # -TZ=UTC stat -f '%Sm' -t '%FT%T+00:00' "$TOP_FILE" > /dev/null 2>&1 +TZ=UTC "$STAT_TOOL" -f '%Sm' -t '%FT%T+00:00' "$TOP_FILE" > /dev/null 2>&1 status="$?" if [[ $status -eq 0 ]]; then MODTIME_METHOD="macos_stat" if [[ $V_FLAG -ge 5 ]]; then - echo "$0: debug[5]: TZ=UTC stat -f '%Sm' -t '%FT%T+00:00' works, MODTIME_METHOD: $MODTIME_METHOD" 1>&2 + echo "$0: debug[5]: TZ=UTC $STAT_TOOL -f '%Sm' -t '%FT%T+00:00' works, MODTIME_METHOD: $MODTIME_METHOD" 1>&2 fi else @@ -703,12 +715,12 @@ else # # NOTE: We only need to test the stat command. # - TZ=UTC stat -c '%y' "$TOP_FILE" > /dev/null 2>&1 + TZ=UTC "$STAT_TOOL" -c '%y' "$TOP_FILE" > /dev/null 2>&1 status="$?" if [[ $status -eq 0 ]]; then MODTIME_METHOD="RHEL_stat" if [[ $V_FLAG -ge 5 ]]; then - echo "$0: debug[5]: TZ=UTC stat -c '%y' works, MODTIME_METHOD: $MODTIME_METHOD" 1>&2 + echo "$0: debug[5]: TZ=UTC $STAT_TOOL -c '%y' works, MODTIME_METHOD: $MODTIME_METHOD" 1>&2 fi else @@ -717,12 +729,12 @@ else # # TZ=UTZ ls -D '%FT%T+00:00' -ld # - TZ=UTZ ls -D '%FT%T+00:00' -ld "$TOP_FILE" > /dev/null 2>&1 + TZ=UTZ "$LS_TOOL" -D '%FT%T+00:00' -ld "$TOP_FILE" > /dev/null 2>&1 status="$?" if [[ $status -eq 0 ]]; then MODTIME_METHOD="ls_D" if [[ $V_FLAG -ge 5 ]]; then - echo "$0: debug[5]: TZ=UTZ ls -D '%FT%T+00:00' -ld works, MODTIME_METHOD: $MODTIME_METHOD" 1>&2 + echo "$0: debug[5]: TZ=UTZ $LS_TOOL -D '%FT%T+00:00' -ld works, MODTIME_METHOD: $MODTIME_METHOD" 1>&2 fi else diff --git a/bugs.html b/bugs.html index de307c5c4..b6f597369 100644 --- a/bugs.html +++ b/bugs.html @@ -1846,10 +1846,6 @@ even if you can but it cannot compile as an ELF binary (not elf binary :-) ) you run it on the compiled
anonymous.ten.c but if nothing else it will not modify the target executable (this part of the fix at least should be correct).

-

The file 2001/anonymous/anonymous.ten.32 is a pre-compiled -2001/anonymous/anonymous.ten.c as a 32-bit ELF binary in case you -can run ELF binaries but cannot compile 32-bit binaries.

-

Other BSD Unices were not tested.

Note also that if you don’t specify a file or you specify a non-32-bit ELF file this program will very likely crash or do something strange like slaughter the elves of Imladris :-(

diff --git a/bugs.md b/bugs.md index c9daa1b33..174497c28 100644 --- a/bugs.md +++ b/bugs.md @@ -2156,12 +2156,6 @@ you run it on the compiled [anonymous.ten.c](%%REPO_URL%%/2001/anonymous/anonymo if nothing else it will not modify the target executable (this part of the fix at least should be correct). -The file `2001/anonymous/anonymous.ten.32` is a pre-compiled -[2001/anonymous/anonymous.ten.c](%%REPO_URL%%/2001/anonymous/anonymous.ten.c) as a 32-bit ELF binary in case you -can run ELF binaries but cannot compile 32-bit binaries. - -Other BSD Unices were not tested. - Note also that if you don't specify a file or you specify a non-32-bit ELF file this program will very likely crash or do something strange like slaughter the elves of Imladris :-( diff --git a/faq.html b/faq.html index 8d1a33054..983e3c16d 100644 --- a/faq.html +++ b/faq.html @@ -463,6 +463,7 @@ other inconsistencies with the original entry?
  • 6.11 - Am I allowed to use IOCCC content?
  • 6.12 - What is Mastodon and why does IOCCC use it?
  • 6.13 - How may I find my author handle?
  • +
  • 6.14 - How do I set certain tabstops for viewing source code in vi(m)?
  • The IOCCC FAQ

    @@ -737,11 +738,11 @@ See also CommonMark Spec.

    One day (1984 March 23 to be exact), Larry Bassel and I (Landon Curt -Noll) were working for National Semiconductor’s Genix porting group, we +Noll) were working for National Semiconductor’s Genix porting group, and we were both in our offices trying to fix some very broken code.

    Larry had been trying to fix a bug in the classic Bourne shell (C code #defined -to death to sort of look like Algol) and I had been working on the finger -program from early BSD (a bug ridden finger implementation to be sure).

    +to death to sort of look like Algol) and I had been working on the finger(1) +program from early BSD (a bug ridden finger implementation to be sure).

    We happened to both wander (at the same time) out to the hallway in Building 7C to clear our heads.

    We began to compare notes: ‘You won’t believe the code I am trying to fix’.

    @@ -795,7 +796,7 @@ and the tradition continues as the longest running contest on the Internet.

    Some years, such as 1997, 1999, 2002-2003, 2007-2010, 2016-2017, 2021-2023, no IOCCC was held.

    While we try to hold the IOCCC every year, sometime the other demands on the IOCCC judges -so not permit us to hold a new IOCCC.

    +do not permit us to hold a new IOCCC.

    The pause during the 2021-2023 period was due to the IOCCC judges developing tools to make is much more likely for the IOCCC to be held in a yearly basis later on.

    @@ -2908,6 +2909,10 @@ and topics like science, technology, fosstodon.org folk made the IOCCC feel welcome.

    While using Mastodon is free, the IOCCC judges are pleased to support the Fosstodon Hub.

    +

    If you have a phone or tablet there is also an official app that you can get +from the App Store or whatever equivalent your device has. Please note that the +app does not at this time seem to give push notifications when someone you +follow posts something so you will have to check the IOCCC feed manually.

    FAQ 6.13: How may I find my author handle?

    @@ -2932,6 +2937,17 @@ and/or correct IOCCC author information.

    See FAQ 6.6 for information about the contents of these JSON file and how they are used.

    See FAQ 6.9 for more information on terms such as author, entry, and submission.

    +
    +
    +

    FAQ 6.14: How do I set certain tabstops for viewing source code in vi(m)?

    +
    +
    +

    Sometimes an author will state that for best viewing purposes you should have +your tabstop set at say 4 or 8. If you use vim or vi or vim in no compatible +mode you can do this easily: make sure you’re in command mode (in most cases you +can hit ESC to do this) and then type the command:

    +
        :set tabstop=4
    +

    where 4 is the value you wish to set the tabstop to.


    Jump to: top