elfs: (Default)
[personal profile] elfs
A poem is:
A collection of words all of which are in collision with each other.
When a word is moved:
If it belonged to the poem, we must decide if it has left the poem.
If it does not belong to the poem, we must decide if it has joined the poem.
When the last two words of a poem are pulled apart
We must see if where the last word to be moved landed starts a new poem
Seems simple enough. Annoying that it's nonetheless broken.

It probably needs unit testing.

Date: 2012-03-10 03:59 pm (UTC)
From: [identity profile] patcat.livejournal.com
Your abstract description is practically a poem in itself.

Date: 2012-03-10 04:20 pm (UTC)
From: [identity profile] atheorist.livejournal.com
what is this supposed to model, fridge poetry?

You use 'the poem' and 'a new poem' - how many poems are there? Are there such things as free-floating words which are not part of a poem, or are those single-word poems?

Date: 2012-03-10 05:13 pm (UTC)
From: [identity profile] elfs.livejournal.com
what is this supposed to model, fridge poetry?

Correct! Good guess.

There is always only one poem. When it's down to two words, if the last word moved is in collision with another word, that starts a new poem.

I have the algorithm almost right. I just need to do a mark-and-sweep now of the poem's bounding box if someone takes a word out of the middle of the poem because that could fragment the poem into two parts, and I need to decide which part is "the" poem at that point.

My first programming guru, Eugene Jarvis, once said that the way for software to appear smart was to not do anything stupid. So far, so good...

Profile

elfs: (Default)
Elf Sternberg

December 2025

S M T W T F S
 12345 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 28th, 2025 06:09 pm
Powered by Dreamwidth Studios