bennn / iPoe

Interactive POetry Editor
27 stars 0 forks source link

replace the line/stanza search DSL with a real query language #90

Open bennn opened 7 years ago

bennn commented 7 years ago

Yo! The #:constraint for things like villanelle are B.S.

#lang ipoe

#:name villanelle
#:rhyme-scheme {[R1 B R2]
                [A  B R1]
                [A  B R2]
                [A  B R1]
                [A  B R2]
                [A  B R1 R2]}
#:syllables 10
#:constraint
  (line=? (line 0 (stanza 0))
          (line 2 (stanza 1))
          (line 2 (stanza 3))
          (line 2 (stanza 5)))
#:constraint
  (line=? (line 2 (stanza 0))
          (line 2 (stanza 2))
          (line 2 (stanza 4))
          (line 3 (stanza 5)))

Instead I want to write

#:constraint  (line=? R1)

And it should know what I mean by R1 : all the lines in the poem at the positions labeled R1 in the rhyme scheme.