packages feed

language-dickinson-1.3.0.2: examples/fortune.dck

#!/usr/bin/env emd

; This is a riff on the Unix fortune program.
; See https://en.wikipedia.org/wiki/Fortune_%28Unix%29 for more context

%-

(:def quote
  (:lambda q (text, text)
    (:match q
      [(qu, name)
        "${qu}\n    — ${name}"])))

(:def fortune
  (:oneof
    (| "Fight god constantly.")
    (| "You will be let down by someone close to you.")
    (| "I'm not high-strung. I'm strung precisely as I am meant to be.")
    (| "Do not fail.")
    (| "Empathy opposes impartiality")
    (| "Trim the fat.")
    (| "The world rewards vigilance")
    (| "Wash your hands with soap and water for at least 20 seconds.")
    (| "Cleanliness is next to godliness.")
    (| "Do not complain.")
    (| "Correction is mercy.")
    (| "Guilt redeems, not love.")
    (| "There is no such thing as metaphors.")
    (| "Compliments turn to insults when you're insolent enough to believe your input matters.")
    (| "Excess is a sin.")
    (| "Hunger is hope.")
    (| "Spurn your family.")
    (| "Salvation is finality.")
    (| "If you go outside today, you will become nauseous")
    (| "Knowledge begets humility.")
    (| "Mushrooms are made of flesh.")
    (| "Love animals.")
    (| "Today is a good day to practice bilocation.")
    (| "Drugs have no mystic content.")
    (| "Irony is the weakest brand of pessimism")
    (| "Sin rots the flesh.")
    (| "Sex wastes the male body.") ; male sexuality is fundamentally weak
    (| "Did you remember to put apotheosis on your to-do list?")
    (| "Cultivate weakness.")
    (| "Beauty is a moral imperative.")
    (| "What do you know about dietetics?")
    (| "Hobbies are sublunary")
    (| "To err is immoral.")
    (| "No man is holy.")
    (| "Bats can give humans rabies.")
    ; contrition and certitude
    (| $ quote
      ('''
       No more pennies to fill my pockets
       ''', "Arrow de Wilde"))
    (| $ quote ("\"I never made it with moderation.\"", "Florence Welch"))
    (| $ quote ("« Le beau est ce qu'on désire sans vouloir le manger. »", "Simone Weil"))
    (| $ quote ("\"You're more likely to get cut with a dull tool than a sharp one.\"", "Fiona Apple"))
    (| $ quote ("\"You forgot the difference between equanimity and passivity.\"", "Fiona Apple"))
    (| $ quote ("\"I don't believe in empirical science. I only believe in a priori truth.\"", "Kurt Gödel")) ; german? hm
    (| "Obedience is a virtue.")
    (| "\"You have potential,\" is an insult.")
    (| "Leisure is a sin")
    (| "Strive on all fronts")))

(:def main
  fortune)