Updates to 1992/gson (new script, README.md fixes)

Add the obfuscated script that the author provided to make a dictionary
file (with example use) as mkdict.sh.

Moved some of the judges' comments to new try section.

Format fixes.

Updated .gitignore with file name (from example command of mkdict.sh).
This commit is contained in:
Cody Boone Ferguson committed 2023-04-09 11:07:03 -07:00
1 parent ddf8c5be37
commit 111910480e
3 files changed
+56 -31

No files matched your search

+1
View File
@@ -1,2 +1,3 @@
gson gson
ag ag
words
+51 -31
View File
@@ -1,18 +1,22 @@
# Most Humorous Output: # Most Humorous Output:
Andreas Gustafsson Andreas Gustafsson
Helsinki University of Technology Helsinki University of Technology
Arentikuja 1 D 305 (home address) Arentikuja 1 D 305
00410 Helsinki 00410 Helsinki
FINLAND Finland
## To build: ## To build:
make all ```sh
make all
```
## To run: ## To run:
./ag word word2 word3 < /path/to/dictionary ```sh
./ag word word2 word3 < /path/to/dictionary
```
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) changed the buffer size [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) changed the buffer size
in such a way that gets() should be safe (theoretically) as it comes from the in such a way that gets() should be safe (theoretically) as it comes from the
@@ -30,58 +34,74 @@ to be read (in case the `gets()` was not used in a loop). Thank you Cody for
your assistance! your assistance!
## Judges' comment: ## Try:
Determine where your system dictionary is located. You may find Determine where your system dictionary is located. You may find
it located in one of the following places: it located in one of the following places:
```
/usr/share/dict/words /usr/share/dict/words
/usr/share/lib/spell/words /usr/share/lib/spell/words
/usr/ucblib/dict/words /usr/ucblib/dict/words
/dev/null # <-- for machines with nothing to say /dev/null # <-- for machines with nothing to say
```
Then using the proper dictionary: Then using the proper dictionary:
./ag free software foundation < /usr/share/dict/words ```sh
./ag obfuscated c contest < /usr/share/dict/words ./ag free software foundation < /usr/share/dict/words
./ag unix international < /usr/share/dict/words ./ag obfuscated c contest < /usr/share/dict/words
./ag george bush < /usr/share/dict/words ./ag unix international < /usr/share/dict/words
./ag bill clinton < /usr/share/dict/words ./ag george bush < /usr/share/dict/words
./ag ross perot < /usr/share/dict/words ./ag bill clinton < /usr/share/dict/words
./ag paul e tsongas < /usr/share/dict/words ./ag ross perot < /usr/share/dict/words
./ag paul e tsongas < /usr/share/dict/words
```
## Judges' comment:
Recently some newspapers printed amusing anagrams of one of the Recently some newspapers printed amusing anagrams of one of the
names listed above. Run this program to find the anagrams they names listed above. Run this program to find the anagrams they
weren't allowed to print! weren't allowed to print!
The author provided an obfuscated script that can be used to construct
dictionaries which has been put in as [mkdict.sh](mkdict.sh). To use try:
```sh
cat README.md | ./mkdict.sh > words
```
Then try using the program as shown above with the file `words`.
## Author's comments: ## Author's comments:
The name of the game: The name of the game:
AG is short for either Anagram Generator or simply AnaGram. AG is short for either Anagram Generator or simply AnaGram. It might also be
It might also be construed to mean Alphabet Game, and by pure construed to mean Alphabet Game, and by pure coincidence it happens to be the
coincidence it happens to be the author's initials. author's initials.
### What it does: ### What it does:
AG takes one or more words as arguments, and tries to find AG takes one or more words as arguments, and tries to find anagrams of those
anagrams of those words, i.e. words or sentences containing words, i.e. words or sentences containing exactly the same letters.
exactly the same letters.
### How to use it: ### How to use it:
To run AG, you need a dictionary file consisting of distinct words To run AG, you need a dictionary file consisting of distinct words in the
in the natural language of your choice, one word on each line. If natural language of your choice, one word on each line. If your machine doesn't
your machine doesn't have one already, you can make your own have one already, you can make your own dictionary by concatenating a few
dictionary by concatenating a few hundred of your favourite Usenet hundred of your favourite Usenet articles and piping them through the following
articles and piping them through the following obfuscated shell obfuscated shell script:
script:
```sh
#!/bin/sh
z=a-z];tr [A-Z\] \[$z|sed s/[\^$z[\^$z*/_/g|tr _ \\012|grep ..|sort -u
```
#!/bin/sh
z=a-z];tr [A-Z\] \[$z|sed s/[\^$z[\^$z*/_/g|tr _ \\012|grep ..|sort -u
Using articles from alt.folklore.computers is likely to make Using articles from alt.folklore.computers is likely to make
a more professional-looking dictionary than rec.arts.erotica. a more professional-looking dictionary than rec.arts.erotica.
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
z=a-z];tr [A-Z\] \[$z|sed s/[\^$z[\^$z*/_/g|tr _ \\012|grep ..|sort -u