Skip to content

flimshaw/beatnik

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

beatnik

DISCLAIMER: There are some questionable code comments in here, but I was 20 years old at the time, so there's that.

Beatnik Box script for generating random Beatnik poetry. I made this for an experimental video project back in 2003, when I was like 20 years old. It was pretty much the first program I ever wrote. In the end, the device that used it looked sort of like a 386 threw up in a fishtank. See here: http://www.flickr.com/photos/mrquint15/550240120/

usage

This script requires PERL. Download the zip file and run:

perl bbv208.pl

This will start the poetry generator, and it will print a poem out one character at a time to the terminal.

how does it work?

The Beatnik script is pretty damn simple. It has a few dictionaries grouped by part of speech, all in text files in this case since I didn't know what a database was at the time, probably. So to generate a poem it:

  1. Generates a random length (in words) for each line, and a line count
  2. Generates a sentence by placing a random part of speech tag for the first word, then adding a part of speech that can follow it, and so on until the end of the sentence.
  3. Loops through and places a random word for each part of speech tag that makes up the sentence
  4. Prints out the poem

why are the poems actually kinda good?

Turns out, if you write poems using the same words Allen Ginsberg used to write Howl, along with some other words from The Lovesong of J. Alfred Prufrock, even a computer can sometimes write something pretty good.

You can try the poetry machine out at my website. A new poem is generated each time you refresh:

=> http://flimshaw.net/beatnik/

do you save the poems anywhere?

Nope. Isn't that sad? They all just go away, unless you save them. I do have a tumblr that generates a new one each day. You can follow it here:

=> http://beatnikbox.tumblr.com/

more questions!

Send an email to charlie.hoey@gmail.com and I'll answer all questions.

About

PERL script for generating random Beatnik poetry (aka my first program ever)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages