Guest User

Untitled

a guest
Nov 14th, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. ;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Author: joswig@lisp.de; Coding: latin-1; Base: 10; Readtable: CL -*-
  2.  
  3. ; Shakesperian insults by Jerry Maguire
  4. ; Lisp code: Rainer Joswig, 2018, joswig@lisp.de
  5.  
  6. (defparameter *insult-data*
  7. #(#("artless" "bawdy" "beslubbering" "bootless" "churlish" "cockered" "clouted"
  8. "craven" "currish" "dankish" "dissembling" "droning" "errant" "fawning"
  9. "fobbing" "froward" "frothy" "gleeking" "goatish" "gorbellied"
  10. "impertinent" "infectious" "jarring" "loggerheaded" "lumpish" "mammering"
  11. "mangled" "mewling" "paunchy" "pribbling" "puking" "puny" "quailing" "rank"
  12. "reeky" "roguish" "ruttish" "saucy" "spleeny" "spongy" "surly" "tottering"
  13. "unmuzzled" "vain" "venomed" "villainous" "warped" "wayward" "weedy"
  14. "yeasty")
  15. #("base-court" "bat-fowling" "beef-witted" "beetle-headed" "boil-brained"
  16. "clapper-clawed" "clay-brained" "common-kissing" "crook-pated"
  17. "dismal-dreaming" "dizzy-eyed" "doghearted" "dread-bolted" "earth-vexing"
  18. "elf-skinned" "fat-kidneyed" "fen-sucked" "flap-mouthed" "fly-bitten"
  19. "folly-fallen" "fool-born" "full-gorged" "guts-griping" "half-faced"
  20. "hasty-witted" "hedge-born" "hell-hated" "idle-headed" "ill-breeding"
  21. "ill-nurtured" "knotty-pated" "milk-livered" "motley-minded" "onion-eyed"
  22. "plume-plucked" "pottle-deep" "pox-marked" "reeling-ripe" "rough-hewn"
  23. "rude-growing" "rump-fed" "shard-borne" "sheep-biting" "spur-galled"
  24. "swag-bellied" "tardy-gaited" "tickle-brained" "toad-spotted"
  25. "unchin-snouted" "weather-bitten")
  26. #("apple-john" "baggage" "barnacle" "bladder" "boar-pig" "bugbear"
  27. "bum-bailey" "canker-blossom" "clack-dish" "clotpole" "coxcomb" "codpiece"
  28. "death-token" "dewberry" "flap-dragon" "flax-wench" "flirt-gill"
  29. "foot-licker" "fustilarian" "giglet" "gudgeon" "haggard" "harpy"
  30. "hedge-pig" "horn-beast" "hugger-mugger" "jolthead" "lewdster" "lout"
  31. "maggot-pie" "malt-worm" "mammet" "measle" "minnow" "miscreant" "moldwarp"
  32. "mumble-news" "nut-hook" "pigeon-egg" "pignut" "puttock" "pumpion"
  33. "ratsbane" "scut" "skainsmate" "strumpet" "varlot" "vassal" "whey-face"
  34. "wagtail")))
  35.  
  36. (defun random-insult (&optional (print-p nil))
  37. "Generates a 'Shakesperian' insult, according to Jerry Maguire.
  38. If PRINT-P is a stream or T, then the output will be printed, otherwise it will
  39. be returned as a string."
  40. (flet ((random-element (sequence)
  41. (elt sequence (random (length sequence)))))
  42. (or (format print-p
  43. "Thou ~a ~a ~a!"
  44. (random-element (aref *insult-data* 0))
  45. (random-element (aref *insult-data* 1))
  46. (random-element (aref *insult-data* 2)))
  47. (values))))
  48.  
  49. ;;; End of File
Add Comment
Please, Sign In to add comment