Address references to *.hint with some exceptions
In years < 2001 (with the exception of ferguson2/) that still have reference to *.hint files they have been changed to README.md with the following exception: in 1998/dorssel there was a dorssel.hint2. This was changed to dorssel.hint since the dorssel.hint was changed to README.md a while back. The references to dorssel.hint2 were changed to without the 2. There was an out of date reference in faq.html file to a .hint file as well that was updated to README.md; the dorssel2.hint in years.html was changed to the new name. With that the only files that have to be updated are those that are >= 2001. I still have to check for hint.* however.
This commit is contained in:
1 parent
67a3677763
commit
005fd79916
9 files changed
+79
-80
No files matched your search
+1
-1
@@ -40,7 +40,7 @@ The ideal 3rd judge would have all of the following:
|
|||||||
|
|
||||||
* thorough knowledge of the C language (ANSI and K&R)
|
* thorough knowledge of the C language (ANSI and K&R)
|
||||||
* thorough knowledge of common C libs (libc, libm, libcurses, ...)
|
* thorough knowledge of common C libs (libc, libm, libcurses, ...)
|
||||||
* reasonable written communication skills (able to write *.hint files)
|
* reasonable written communication skills (able to write README.md files)
|
||||||
* appreciation for well-written non-obfuscated code
|
* appreciation for well-written non-obfuscated code
|
||||||
* willing to devote ~4 weekend days in January (starting Jan 96) for judging
|
* willing to devote ~4 weekend days in January (starting Jan 96) for judging
|
||||||
* located in the San Francisco (California, USA) Bay Area, or
|
* located in the San Francisco (California, USA) Bay Area, or
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ ENTRY= dorssel
|
|||||||
PROG= ${ENTRY}
|
PROG= ${ENTRY}
|
||||||
#
|
#
|
||||||
OBJ= ${PROG}.o
|
OBJ= ${PROG}.o
|
||||||
DATA= dorssel.hint2
|
DATA= dorssel.hint
|
||||||
TARGET= ${PROG}
|
TARGET= ${PROG}
|
||||||
#
|
#
|
||||||
ALT_OBJ=
|
ALT_OBJ=
|
||||||
|
|||||||
+28
-26
@@ -10,12 +10,12 @@
|
|||||||
|
|
||||||
make all
|
make all
|
||||||
|
|
||||||
### To run
|
### To run:
|
||||||
|
|
||||||
echo Simple as 123 | ./dorssel
|
echo Simple as 123 | ./dorssel
|
||||||
echo '.... --- .-- -.. --- . ... .. - -.. --- - .... .- -' | ./dorssel
|
echo '.... --- .-- -.. --- . ... .. - -.. --- - .... .- -' | ./dorssel
|
||||||
|
|
||||||
## Judges' comments
|
## Judges' comments:
|
||||||
|
|
||||||
How does the program decide which way to convert?
|
How does the program decide which way to convert?
|
||||||
|
|
||||||
@@ -25,18 +25,22 @@
|
|||||||
The author suggests that you try to answer the following questions:
|
The author suggests that you try to answer the following questions:
|
||||||
|
|
||||||
- Which character in the initializing string is totally irrelevant?
|
- Which character in the initializing string is totally irrelevant?
|
||||||
- Which two relevant characters in the initializing string may be
|
|
||||||
exchanged without altering the behavior?
|
- Which two relevant characters in the initializing string may be exchanged
|
||||||
- Which characters in the initializing string are somewhat irrelevant,
|
without altering the behavior?
|
||||||
and to what values may they be changed without altering the behavior?
|
|
||||||
- Which characters may be used to enlarge the initializing string by
|
- Which characters in the initializing string are somewhat irrelevant, and to
|
||||||
one without altering the behavior ?
|
what values may they be changed without altering the behavior?
|
||||||
|
|
||||||
|
- Which characters may be used to enlarge the initializing string by one without
|
||||||
|
altering the behavior ?
|
||||||
|
|
||||||
|
|
||||||
Extra credit: Change the program so that it does not SHOUT IN ALL CAPS.
|
Extra credit: Change the program so that it does not SHOUT IN ALL CAPS.
|
||||||
|
|
||||||
You might also want to read the dorssel.hint2 file.
|
You might also want to read the [dorssel.hint](dorssel.hint) file.
|
||||||
|
|
||||||
## Author's comments
|
## Author's comments:
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
=====
|
=====
|
||||||
@@ -49,17 +53,15 @@
|
|||||||
followed by a new line character, they must not contain any NUL
|
followed by a new line character, they must not contain any NUL
|
||||||
characters. Otherwise, some characters may be lost in the conversion.
|
characters. Otherwise, some characters may be lost in the conversion.
|
||||||
|
|
||||||
- Encoding to Morse code:
|
- Encoding to Morse code: The program knows the Morse codes for all Latin
|
||||||
The program knows the Morse codes for all Latin letters (a-z, case
|
letters (a-z, case insensitive) and decimal digits (0-9). Any other characters
|
||||||
insensitive) and decimal digits (0-9). Any other characters are
|
are replaced by an ASCII space ' '. Morse code per converted character is
|
||||||
replaced by an ASCII space ' '. Morse code per converted character is
|
written as a sequence of '.' and '-' characters, each sequence followed by a
|
||||||
written as a sequence of '.' and '-' characters, each sequence
|
space.
|
||||||
followed by a space.
|
|
||||||
|
|
||||||
- Decoding from Morse code:
|
- Decoding from Morse code: Morse code should be typed as sequences of '.' and
|
||||||
Morse code should be typed as sequences of '.' and '-' characters,
|
'-' characters, separated by a space. Extra spaces will be echoed back (to
|
||||||
separated by a space. Extra spaces will be echoed back (to separate
|
separate words). Unknown sequences will be converted to a '?' character.
|
||||||
words). Unknown sequences will be converted to a '?' character.
|
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
=====
|
=====
|
||||||
@@ -71,15 +73,15 @@
|
|||||||
Hints
|
Hints
|
||||||
=====
|
=====
|
||||||
|
|
||||||
- Try
|
Try
|
||||||
|
|
||||||
./dorssel < dorssel.c | ./dorssel
|
./dorssel < dorssel.c | ./dorssel
|
||||||
|
|
||||||
to see what variables, numbers, and functions are used. (Does a
|
to see what variables, numbers, and functions are used. (Does a
|
||||||
better job than most C beautifiers).
|
better job than most C beautifiers).
|
||||||
|
|
||||||
- Filter your text twice (as in the previous sample) to obtain a version
|
- Filter your text twice (as in the previous sample) to obtain a version of your
|
||||||
of your text that can be reversibly morsified, i.e.
|
text that can be reversibly morsified, i.e.
|
||||||
|
|
||||||
./dorssel | ./dorssel | ./dorssel | ./dorssel
|
./dorssel | ./dorssel | ./dorssel | ./dorssel
|
||||||
|
|
||||||
@@ -87,7 +89,7 @@
|
|||||||
|
|
||||||
./dorssel | ./dorssel
|
./dorssel | ./dorssel
|
||||||
|
|
||||||
- The file "dorssel.hint2" contains all the information needed to
|
- The file "dorssel.hint" contains all the information needed to understand this
|
||||||
understand this program. For an obfuscated spoiler, try
|
program. For an obfuscated spoiler, try
|
||||||
|
|
||||||
./dorssel < dorssel.hint2
|
./dorssel < dorssel.hint
|
||||||
File renamed without changes.
+42
-43
@@ -16,13 +16,13 @@
|
|||||||
NOTE: This may take a while. Some systems may have problems building
|
NOTE: This may take a while. Some systems may have problems building
|
||||||
this entry because of the system resources it requires.
|
this entry because of the system resources it requires.
|
||||||
|
|
||||||
### To run
|
## To run
|
||||||
|
|
||||||
./fanf
|
./fanf
|
||||||
|
|
||||||
## Judges' comments
|
|
||||||
|
|
||||||
To use:
|
### To use:
|
||||||
|
|
||||||
Enter an expression on standard input. Here are some
|
Enter an expression on standard input. Here are some
|
||||||
sample expressions that you can use:
|
sample expressions that you can use:
|
||||||
|
|
||||||
@@ -46,15 +46,14 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
This program translares lambda expressions into combinator
|
## Judges' comments:
|
||||||
|
|
||||||
|
This program translates lambda expressions into combinator
|
||||||
expressions. But you do not need to know Lambda Calculus to be
|
expressions. But you do not need to know Lambda Calculus to be
|
||||||
impressed by this program!
|
impressed by this program!
|
||||||
|
|
||||||
See the file:
|
See the file [fanf.lambda](fanf.lambda) for more examples of lambda calculus
|
||||||
|
source.
|
||||||
fanf.lambda
|
|
||||||
|
|
||||||
for more examples of lambda calculus source.
|
|
||||||
|
|
||||||
Notice how large the code grows from the fanf.c into the final
|
Notice how large the code grows from the fanf.c into the final
|
||||||
fanftmp2.c C program. Take a look at that final C program again,
|
fanftmp2.c C program. Take a look at that final C program again,
|
||||||
@@ -72,12 +71,12 @@
|
|||||||
translates a single lambda expression on standard input into
|
translates a single lambda expression on standard input into
|
||||||
combinator expressions on standard output.
|
combinator expressions on standard output.
|
||||||
|
|
||||||
Extra credit question:
|
### Extra credit question:
|
||||||
|
|
||||||
What do you have to do to make this program work with an
|
What do you have to do to make this program work with an old non-ANSI C
|
||||||
old non-ANSI C preprocessor?
|
preprocessor?
|
||||||
|
|
||||||
## Author's comments
|
## Author's comments:
|
||||||
|
|
||||||
My program is a demonstration of some practical applications of
|
My program is a demonstration of some practical applications of
|
||||||
theoretical computer science. The application it implements is a program
|
theoretical computer science. The application it implements is a program
|
||||||
@@ -89,18 +88,18 @@
|
|||||||
|
|
||||||
The syntax of lambda expressions recognised by the program is as
|
The syntax of lambda expressions recognised by the program is as
|
||||||
follows: The basic atoms are variables which are single characters other
|
follows: The basic atoms are variables which are single characters other
|
||||||
than backslash or parentheses, e.g. `a' or `b' or `@'. Variables are
|
than backslash or parentheses, e.g. `a` or `b` or `@`. Variables are
|
||||||
combined by function application which is written e.g. `(f a)' which is
|
combined by function application which is written e.g. `(f a)` which is
|
||||||
the function `f' applied to the argument `a'. Application groups to the
|
the function `f` applied to the argument `a`. Application groups to the
|
||||||
left, so `(f a b c)' is equivalent to `(((f a) b) c)'. Functions are
|
left, so `(f a b c)` is equivalent to `(((f a) b) c)`. Functions are
|
||||||
created from lambda terms which are written in the form `\a(expr)' which
|
created from lambda terms which are written in the form `\a(expr)` which
|
||||||
is the function taking argument `a' and having value `expr'. Lambda is
|
is the function taking argument `a` and having value `expr`. Lambda is
|
||||||
spelt `\' because ASCII isn't good enough. Lambda binds tightly, so
|
spelt `\` because ASCII isn't good enough. Lambda binds tightly, so
|
||||||
`\a\bcd' is equivalent to `((\a(\b(c))) d)'. Whitespace is ignored.
|
`\a\bcd` is equivalent to `((\a(\b(c))) d)`. Whitespace is ignored.
|
||||||
|
|
||||||
For example, the identity function, called `I', is written `\x(x)'. A
|
For example, the identity function, called `I`, is written `\x(x)`. A
|
||||||
simple expression is `(I a)' which is equivalent to `(\x(x) a)', which
|
simple expression is `(I a)` which is equivalent to `(\x(x) a)`, which
|
||||||
has the value `a'. Another function called `K' is defined as `\x\y(x)'
|
has the value `a`. Another function called `K` is defined as `\x\y(x)`
|
||||||
and it evaluates as follows:
|
and it evaluates as follows:
|
||||||
|
|
||||||
K p q
|
K p q
|
||||||
@@ -108,12 +107,12 @@
|
|||||||
-> \y(p) q
|
-> \y(p) q
|
||||||
-> p
|
-> p
|
||||||
|
|
||||||
Another function of interest is `S', defined as `\f\g\x((f x) (g x))'.
|
Another function of interest is `S`, defined as `\f\g\x((f x) (g x))`.
|
||||||
My program demonstrates the fact that any lambda expression can be
|
My program demonstrates the fact that any lambda expression can be
|
||||||
translated into an equivalent "combinator expression" which involves
|
translated into an equivalent "combinator expression" which involves
|
||||||
only `S', `K', `I' (the combinators), and application, with no
|
only `S`, `K`, `I` (the combinators), and application, with no
|
||||||
variables or lambda abstractions. In fact, even `I' is unnecessary,
|
variables or lambda abstractions. In fact, even `I` is unnecessary,
|
||||||
since it is equivalent to `S K K':
|
since it is equivalent to `S K K`:
|
||||||
|
|
||||||
I z
|
I z
|
||||||
-> \a(a) z
|
-> \a(a) z
|
||||||
@@ -129,29 +128,29 @@
|
|||||||
expressions works as follows. There are three forms of lambda expression
|
expressions works as follows. There are three forms of lambda expression
|
||||||
to consider: variables, applications, and abstractions.
|
to consider: variables, applications, and abstractions.
|
||||||
|
|
||||||
trans `v' -> `v' (variable)
|
trans `v` -> `v` (variable)
|
||||||
trans `a b' -> (trans `a') (trans `b') (application)
|
trans `a b` -> (trans `a`) (trans `b`) (application)
|
||||||
trans `\ab' -> abs a (trans `b') (abstraction)
|
trans `\ab` -> abs a (trans `b`) (abstraction)
|
||||||
|
|
||||||
There are a further three cases to consider for the body of lambda
|
There are a further three cases to consider for the body of lambda
|
||||||
expressions, where we need to do the magic that transforms away the
|
expressions, where we need to do the magic that transforms away the
|
||||||
variables.
|
variables.
|
||||||
|
|
||||||
abs a `f x' -> `S' (abs a `f') (abs a `x')
|
abs a `f x` -> `S` (abs a `f`) (abs a `x`)
|
||||||
abs a `b' -> `K b' (b != a)
|
abs a `b` -> `K b` (b != a)
|
||||||
abs a `a' -> `I'
|
abs a `a` -> `I`
|
||||||
|
|
||||||
E.g. suppose we had combinator expressions for `+' and `3' and we wanted
|
E.g. suppose we had combinator expressions for `+` and `3` and we wanted
|
||||||
to see what the combinator expression for doubling 3 looked like:
|
to see what the combinator expression for doubling 3 looked like:
|
||||||
|
|
||||||
trans `\x(+ x x) 3'
|
trans `\x(+ x x) 3`
|
||||||
-> (trans `\x(+ x x)') (trans `3')
|
-> (trans `\x(+ x x)`) (trans `3`)
|
||||||
-> (abs x (trans `+ x x')) `3'
|
-> (abs x (trans `+ x x`)) `3`
|
||||||
-> (abs x `+ x x') `3'
|
-> (abs x `+ x x`) `3`
|
||||||
-> `S' (abs x `+ x') (abs x `x') `3'
|
-> `S` (abs x `+ x`) (abs x `x`) `3`
|
||||||
-> `S' (`S' (abs x `+') (abs x `x')) `I' `3'
|
-> `S` (`S` (abs x `+`) (abs x `x`)) `I` `3`
|
||||||
-> `S' (`S' (`K +') `I') `I' `3'
|
-> `S` (`S` (`K +`) `I`) `I` `3`
|
||||||
-> `S (S (K +) I) I 3'
|
-> `S (S (K +) I) I 3`
|
||||||
|
|
||||||
We can then check that this evaluates to the expected result:
|
We can then check that this evaluates to the expected result:
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
-- multi-character identifiers and uses ` instead of \ because that's
|
-- multi-character identifiers and uses ` instead of \ because that's
|
||||||
-- easier to enter inside a Haskell string). It also contains the Haskell
|
-- easier to enter inside a Haskell string). It also contains the Haskell
|
||||||
-- code I used to translate the lambda calculus into combinators using
|
-- code I used to translate the lambda calculus into combinators using
|
||||||
-- the fully optimising algorithm described in the .hint file.
|
-- the fully optimising algorithm described in the README.md file.
|
||||||
--
|
--
|
||||||
-- Tony Finch <dot@dotat.at>
|
-- Tony Finch <dot@dotat.at>
|
||||||
--
|
--
|
||||||
|
|||||||
+4
-4
@@ -102,7 +102,7 @@ syntax changing as we did to get old programs to compile on strict
|
|||||||
ANSI C compilers.
|
ANSI C compilers.
|
||||||
|
|
||||||
Last, read the judges' comments/spoilers on the program. Hints
|
Last, read the judges' comments/spoilers on the program. Hints
|
||||||
for `foo.c' are given in `foo.hint'. Often they will contain suggested
|
for `foo.c` are given in `README.md`. Often they will contain suggested
|
||||||
arguments or recommended data to use.
|
arguments or recommended data to use.
|
||||||
|
|
||||||
If you do gain some understanding of how a program works, go back to
|
If you do gain some understanding of how a program works, go back to
|
||||||
@@ -114,12 +114,12 @@ Regarding the source archive:
|
|||||||
|
|
||||||
Each sub-directory contains all the entries for a single year. Often
|
Each sub-directory contains all the entries for a single year. Often
|
||||||
the file names match one of the last names of the author. Judges'
|
the file names match one of the last names of the author. Judges'
|
||||||
hints are given in files of the form ``*.hint''.
|
hints are given in files of the form `README.md`.
|
||||||
|
|
||||||
You may need to tweak the Makefile to get everything to compile correctly.
|
You may need to tweak the Makefile to get everything to compile correctly.
|
||||||
Read the hint files for suggestions.
|
Read the README.md files for suggestions.
|
||||||
|
|
||||||
The rules for a given year are given in the file named ``rules''. Each
|
The rules for a given year are given in the file named `rules.txt`. Each
|
||||||
archive contains a copy of the rules for the upcoming contest.
|
archive contains a copy of the rules for the upcoming contest.
|
||||||
|
|
||||||
The following URL is the official archive of the winning entries:
|
The following URL is the official archive of the winning entries:
|
||||||
|
|||||||
@@ -447,9 +447,7 @@ Now, Microsoft makes AT&T look mild and kind in comparison. :-( (IMHO) ).
|
|||||||
|
|
||||||
BTW:
|
BTW:
|
||||||
See the story about the ''
|
See the story about the ''
|
||||||
<A
|
<A HREF="/1993/mills/README.md">Bill Gates</A>'' award. :-)
|
||||||
HREF="/1993/mills/mills.hint">Bill
|
|
||||||
Gates</A>'' award. :-)
|
|
||||||
|
|
||||||
</BLOCKQUOTE>
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2261,7 +2261,7 @@ Contest </I></FONT></CENTER>
|
|||||||
<UL TYPE=square>
|
<UL TYPE=square>
|
||||||
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/Makefile">Makefile</A>
|
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/Makefile">Makefile</A>
|
||||||
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/dorssel.c">dorssel.c</A>
|
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/dorssel.c">dorssel.c</A>
|
||||||
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/dorssel.hint2">dorssel.hint2</A>
|
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/dorssel.hint">dorssel.hint</A>
|
||||||
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/README.md">README.md</A>
|
<LI><A HREF="https://github.com/ioccc-src/temp-test-ioccc/blob/master/1998/dorssel/README.md">README.md</A>
|
||||||
</UL>
|
</UL>
|
||||||
<A NAME="1998_fanf"></A>
|
<A NAME="1998_fanf"></A>
|
||||||
|
|||||||
Reference in new issue
Block a user