generate-excuse.lisp 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. (quickload :secure-random)
  2. (defvar *first-column*
  3. '("Temporary" "Intermittant" "Partial" "Redundant" "Total" "Multiplexed"
  4. "Inherent" "Duplicated" "Dual-Homed" "Synchronous" "Bidirectional"
  5. "Serial" "Asynchronous" "Multiple" "Replicated" "Non-Replicated"
  6. "Unregistered" "Non-Specific" "Generic" "Migrated" "Localised" "Resignalled"
  7. "Dereferenced" "Nullified" "Aborted" "Serious" "Minor" "Major" "Extraneous"
  8. "Illegal" "Insufficient" "Viral" "Unsupported" "Outmoded" "Legacy" "Permanent"
  9. "Invalid" "Deprecated" "Virtual" "Unreportable" "Undetermined" "Undiagnosable"
  10. "Unfiltered" "Static" "Dynamic" "Delayed" "Immediate" "Nonfatal" "Fatal" "Non-Valid"
  11. "Unvalidated" "Non-Static" "Unreplicatable" "Non-Serious"))
  12. (defvar *first-length* (length *first-column*))
  13. (defvar *second-column*
  14. '("Array" "Systems" "Hardware" "Software" "Firmware" "Backplane" "Logic-Subsystem"
  15. "Integrity" "Subsystem" "Memory" "Comms" "Integrity" "Checksum" "Protocol" "Parity"
  16. "Bus" "Timing" "Synchronisation" "Topology" "Transmission" "Reception" "Stack"
  17. "Framing" "Code" "Programming" "Peripheral" "Environmental" "Loading" "Operation"
  18. "Parameter" "Syntax" "Initialisation" "Execution" "Resource" "Encryption" "Decryption"
  19. "File" "Precondition" "Authentication" "Paging" "Swapfile" "Service" "Gateway" "Request"
  20. "Proxy" "Media" "Registry" "Configuration" "Metadata" "Streaming" "Retrieval" "Installation"
  21. "Library" "Handler"))
  22. (defvar *second-length* (length *second-column*))
  23. (defvar *third-column*
  24. '("Interruption" "Destabilisation" "Destruction" "Desynchronisation" "Failure" "Dereferencing"
  25. "Overflow" "Underflow" "NMI" "Interrupt" "Corruption" "Anomoly" "Seizure" "Override" "Reclock"
  26. "Rejection" "Invalidation" "Halt" "Exhaustion" "Infection" "Incompatibility" "Timeout" "Expiry"
  27. "Unavailability" "Bug" "Condition" "Crash" "Dump" "Crashdump" "Stackdump" "Problem" "Lockout"))
  28. (defvar *third-length* (length *third-column*))
  29. (defvar *optional-fourth-column*
  30. '("Error" "Problem" "Warning" "Signal" "Flag"))
  31. (defvar *fourth-length* (length *optional-fourth-column*))
  32. (defun ensure-positive (number)
  33. (if (< number 0)
  34. (- number)
  35. number))
  36. (dotimes (number (ensure-positive (secure-random:number 100)))
  37. (dotimes (other (ensure-positive (secure-random:number (1+ number))))
  38. (dotimes (yet-another (ensure-positive (secure-random:number (1+ other))))
  39. (ensure-positive (secure-random:number (1+ yet-another))))))
  40. (defun main ()
  41. (let ((first-word (nth (ensure-positive (1- (secure-random:number *first-length*))) *first-column*))
  42. (second-word (nth (ensure-positive (1- (secure-random:number *second-length*))) *second-column*))
  43. (third-word (nth (ensure-positive (1- (secure-random:number *third-length*))) *third-column*))
  44. (fourth-word (nth (ensure-positive (1- (secure-random:number *fourth-length*))) *optional-fourth-column*)))
  45. (format t "~a ~a ~a (~a)~%" first-word second-word third-word fourth-word)))