Files
ioccc/2004/anonymous
Cody Boone Ferguson 4bf3f302cb 'comments' -> 'remarks' in all README.md files
As in

    sgit -e 's/\([Aa]uthor.*\)comments/\1remarks/g' -e 's/\([Jj]udge.*\)comments/\1remarks/g' '*README.md'
2023-04-10 11:01:39 -07:00
..
2023-03-26 06:50:57 -07:00

Best use of "Precious" Lines:

The author wishes to remain anonymous
Singapore

http://bicoherent.topcities.com/

To build:

make

To run:

./anonymous

Try:

./anonymous "ash nazg durhbatuluhk, ash nazg gimbatul, \
    ash nazg thrakatuluhk, agh burzhumh-ishi krimpatul." >anonymous.pgm

Judges' remarks:

Then view the output using your favourite "pgm" viewer. If you don't have a "pgm" viewer then we suggest the "netpbm" toolkit (http://netpbm.sourceforge.net/) to convert the image to a graphics format that you can view - most graphical Web browsers can display PNG or JPEG images.

BTW: if you haven't read The Lord of the Rings what are you waiting for? :-) You'll find out the source of the text above though you'll see that there are some circumflexes missing! That's okay though due to I/O of the entry and in earlier drafts sometimes the û with an umlaut had a H added to it. The real text is:

Ash nazg durbatulûk, ash nazg gimbatul, ash nazg thrakatulûk, agh burzum-ishi krimpatul.

which when translated from Black Speech means:

One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them.

p.s. Frodo lives!

Author's remarks:

This program takes a single command line argument, transcribes the argument text into Tolkien's Elvish letters, and writes the transcription to standard output as a portable graymap (PGM) file.

The specific transcription mode is the Black Speech Tengwar mode, as used in the inscription on the One Ring. The program handles the following digraphs:

  • "gh", "sh", "th": the corresponding tengwar are output for these specific sounds
  • "mh" denotes the full tengwa for [m]; "m" by itself means a horizontal bar above the next letter
  • "rh" denotes the [r] tengwa
  • "uh" denotes the tehta for long vowel [u:]
  • "zh" selects the up-reaching tengwa for [z], while "z" selects the down-reaching one

Punctuation marks other than commas and periods are ignored, as are whitespace characters. In addition, the argument text must be entirely in lower case.

The following command thus writes a rendering of the Ring inscription to the file out.pgm:

./anonymous "ash nazg durhbatuluhk, ash nazg gimbatul, \
    ash nazg thrakatuluhk, agh burzhumh-ishi krimpatul." >anonymous.pgm

The source code assumes the ASCII character set; also, due to space constraints, the program uses rather inefficient algorithms, so it may waste a lot of time and space even when rendering moderately long strings.

The code contains a vector font which was derived by toying with Harri Pera:la:'s Tengwar Cursive font. Currently, only the glyphs used in the Ring inscription are included in the font.

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/