packages feed

language-dickinson-1.4.1.0: examples/divinationBot.dck

%-

; @botmancy from twitter but more sensical
; http://phrontistery.info/divine.html
; https://en.wikipedia.org/wiki/Methods_of_divination
; crystallo-
tydecl means = Fish
             | Stars
             | Plants
             | Books
             | Birds
             | Snakes
             | Sun
             | Animals
             | Lips
             | Dreams
             | Fire
             | Air
             | Placenta
             | Poo
             | Fingers
             | Cat
             | Number
             | Wood
             | Walk
             | Anthro
             | Bark
             | Rock
             | Large
             | Pearl
             | Small
             | Teeth
             | Bones
             | Land
             | Nails

(:def prefix
  (:lambda x means
    (:match x
      [Fish "ichthyo"]
      [Stars "astro"]
      [Plants "botano"]
      [Books "biblio"]
      [Birds "ornitho"]
      [Snakes "ophio"]
      [Sun "helio"]
      [Animals "zoo"]
      [Lips "labio"]
      [Dreams "oneiro"]
      [Fire "pyro"]
      [Air "aero"]
      [Placenta "amnio"]
      [Poo "scato"]
      [Fingers "dactylo"]
      [Cat "ailuro"]
      [Number "numero"]
      [Wood "xylo"]
      [Walk "ambulo"]
      [Anthro "anthro"]
      [Bark "ololyg"]
      [Rock "litho"]
      [Large "marco"]
      [Pearl "margarito"]
      [Small "micro"]
      [Teeth "odonto"]
      [Bones "osteo"]
      [Land "topo"]
      [Nails "onycho"])))

(:def english
  (:lambda x means
    (:match x
      [Fish "fish"]
      [Stars "stars"]
      [Plants "plants"]
      [Books "the Bible"]
      [Birds "birds"]
      [Snakes "snakes"]
      [Sun "sun"]
      [Animals "animals"]
      [Lips "lips"]
      [Dreams "dreams"]
      [Fire "fire"]
      [Air "the weather"]
      [Placenta "placenta"]
      [Poo "excrement"]
      [Fingers "finger movements"]
      [Cat "cats"]
      [Number "numbers"]
      [Wood "pieces of wood"]
      [Walk "walking"]
      [Anthro "human entrails"]
      [Bark "howling of dogs"]
      [Rock "rocks"]
      [Large "large objects"]
      [Pearl "pearls"]
      [Small "small objects"]
      [Teeth "teeth"]
      [Bones "bones"]
      [Land "landforms"]
      [Nails "fingernails"])))

(:def mod
  (:branch
    (| 1.0 "")
    (| 0.2 "inspection of ")
    (| 0.2 "observation of ") ; observing?
    (| 0.3 "means of ")))

(:def means
  (:pick means))

(:def postfix
  (:branch
    (| 1.0 "mancy")
    (| 0.065 "scopy")
    (| 0.03 "spication")
    (| 0.06 "logy")))

(:def main
  (:bind
    [means means]
      "${$prefix means}${postfix} - divination by ${mod}${$english means}"))