Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rasp #NNNGM #18

Open
nervousdata opened this issue Nov 2, 2022 · 5 comments
Open

Rasp #NNNGM #18

nervousdata opened this issue Nov 2, 2022 · 5 comments

Comments

@nervousdata
Copy link

This is an entry for Nano-NaNoGenMo. I started to write something in Bash/Shell that uses /dev/urandom (method normally used for password generation) and a really crude auto-correction with Hunspell. So far 117 characters, which means there is some more space left for tinkering.

cat /dev/urandom | tr -dc " thingy" | fold -w 6 | head -c 270 | tr '\n' ' ' | tr -s " " | hunspell -U -d en_USO

A first sample:

in g shiny hottie timothy ninth t hymn chinning tangy h gin yytgtg intent gnat n ht h n hgt hitting tn ti nynhgn mighty thirty i digitize length yin h rhythm thigh tn g hymn y huh y yeti n ii rt nigh tinny thingy ngnyyi tit ii i chg gt g hiya y antigen nigh

I modified the dictionary, took out everything starting with or only consisting of capital letters.

Also, I think that someone must have done something similar before. Please let me know.

Does code used for layout stuff also count in the limit of 256 characters?

@hugovk hugovk added the preview label Nov 2, 2022
@hugovk
Copy link
Member

hugovk commented Nov 2, 2022

I can't recall anyone generating random chars and putting them through autocorrect before.

Does code used for layout stuff also count in the limit of 256 characters?

That's a question for the Chairperson of the Nano-NaNoGenMo Subcommittee @nickmontfort
(or Nano-NaNoGenMo-SubCoChairpo-NickMoFo for short).

@nickmontfort
Copy link

nickmontfort commented Nov 3, 2022

I like how my abbreviated name is quickly going to exceed 256 characters itself!

Since we’re taking a very classic perspective here and working with the idea of the “novel,” as opposed to say an artist book or something like that, the writing/generation process is in the editorial department. After editorial the text goes to design where what is officially called the “layout stuff” happens. Then, there is some sort of a production process which can range from just uploading a PDF to printing a book block and binding it in a cover.

With that in mind, the 256-character Nano-NaNoGenMo generator just has to do the editorial work. It doesn’t have to lay the text out (design), nor does it have to send it to the printer or anything like that (production). In fact the design/layout stage doesn’t have to be automated at all, although even in books that are written by humans, it almost always is.

I’d say it’s a bonus, though, if you end up with a generated novel that has already been through design. You could possibly cheat on this by starting with something in HTML format and processing that instead of a text file.

@hugovk
Copy link
Member

hugovk commented Nov 3, 2022

Definitely agree, even without the nanonano limit, people have often applied manual formatting and layout afterwards.

(I'd also welcome works partially written by computer, partially written or edited by human.)

@nervousdata nervousdata changed the title nigh tinny thingy (Nano-NaNoGenMo) Rasp #NNNGM Nov 20, 2022
@nervousdata
Copy link
Author

nervousdata commented Nov 20, 2022

Finished! With 50.612 words.
Every paragraph in Rasp is made of three sentences. Each sentence is derived from a random sequence of max. 7 characters including space. The available characters are defined in three sets: " string", " frozen" and " wreath".

for c in {0..750}
do
a=(" string" " frozen" " wreath")
for i in {0..2}
  do
      cat /dev/urandom | tr -dc "${a[$i]}" | fold -w 7 | head -c 110 | tr "\n" " " | tr -s " " | hunspell -U -d en_USO >> r.txt
  done
done
sed -i "s/ $;s/^ ;s/$/.&/" r.txt

Result (HTML page): Rasp. A novel Code/Documentation

Excerpt

s snagging s terr striking ginning tn tin gratin s guy trying ringing i angst stressors en sin snugger t mg girt trinity. nuzzle n nonzero horizon z fennel e freeze confrere nine ref forefeet forenoon fen oz z o e fennel no zoo f fore. shortwave ere r whetted etch hr tr t rt tartar a ah rte ha hew her err wallah whitewash erstwhile wow i trotter r.

And I made a poem in German language, Haspeln, with this technique.

@nickmontfort
Copy link

nickmontfort commented Nov 22, 2022

Excellent! I particularly like this paragraph:

i martini net ran gigs sight git ts jr n n nursing rt sign gr grit sis sin vignettist rnsnsni lengths t truants. brr err eofrzrn of non oz e f z bf e freeze ff o r f err terrorize ozffnoo snooze greenroom fezzes on urn. t yet w hr here wetter rarer hat ere art we rt eh thwart tr at rehears whereat hearer warrior r wet eye.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants