dariusk / NaNoGenMo

National Novel Generation Month. Because.
184 stars 16 forks source link

"Nif" by Cat's Eye Technologies #58

Open catseye opened 10 years ago

catseye commented 10 years ago

https://gist.github.com/catseye/7336582

Repeating the README here for convenience:


Nif is a novel generated for NaNoGenMo 2013. It is about a petulant child (possibly named Nif) who has just discovered palindromes. It is one long palindrome.

It was inspired by, and draws heavily from, Nick Montfort's "The Utterance of the Petulant Child," as well as from the life ambition of one of the characters on the terrible 80's sitcom Head of the Class, which was: to write a novel that was one long palindrome.

wc -w tells me that Nif is 50,346 words long.

The script that generated it, and the script that checked it for palindromicity, are included below.

I place these works firmly into the public domain.

MichaelPaulukonis commented 10 years ago

Able dear I ere I read Elba.

MichaelPaulukonis commented 10 years ago

Neat trick.

"The Utterance of the Petulant Child" is a trick, certainly. That does not make it an invalid text, but it's punch relies upon its trickery. As a text, it's very monochromatic (not showing much variation).

You've extended it, so it's not as tricky as before. Much less tricky. But still kinda sorta tricky.

I would like to see this extended. How many more palindromic sentences can be added in that makes it less monochromatic?

Have you read Bruce Sterling's Zeitgeist? It has a character who speaks only in palindromes. Mostly contextually.

catseye commented 10 years ago

Well, it would seem that I am not above a cheap laugh.

It is dangerously close to "meow meow meow" ("The Utterance of a Cat with an Empty Food Bowl"?) but on the other hand it does (for me) succeed in evoking a certain... annoyance. (If I had the time/energy I'd make a cover illustration for it -- a small hand tugging a sleeve.)

As for messing with it, the code is public domain and you should be able to populate the E and P tuples with whatever palindromes you like, and still get a (symmetrical and thus not terribly exciting) palindrome result. I went with only one entry in P because (a) someone who has just discovered palindromes probably doesn't know too many, and (b) it's much funnier that way. (Again, to me)

Having characters speak in palindromes is an interesting idea. Perhaps if I ever add the detective character to my other story, this would lend them a certain... inscrutability.

catseye commented 10 years ago

Actually, let me float another idea for extending this: rewrite the generator program so that it is a palindrome too.

This could be done in Python or many other programming languages, by doing something like this:

program
program
program
sys.exit(0)
# (0)tixe.sys margorp margorp margorp

But this too is kind of a "trick" and not terribly satisfying. Ideally, you'd want the second half of the program text to actually not be a comment and to actually be executed.

This is where using an esoteric (read: weird) programming language would come in handy. In Befunge, for instance, you can execute code forwards and backwards. For example, there is this Befunge program which is itself a palindrome, and which produces a palindrome as output (actually it produces itself as output; it's a quine. And I just realized I have no idea who wrote this beautiful little thing. Damn.) Although, looking at it, I'm not sure it executes the right-hand half of the program, either, or whether that's just data or filler. This is also complicated by Befunge being a two-dimensional language, without words (only atomic symbols), so in practice "symmetrical" is a better adjective for programs in it than "palindromic".

At any rate, I wanted to write this out in the hopes that it might seed some evil ideas.

MichaelPaulukonis commented 10 years ago

I ganked your code, and extended it with some more palindromes. I tried to find ones more suited to a child, but it hasn't been weeded thoroughly. Sample output