Overview
Comment: | updates |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d425e8a7c7bd5645dd4427dd4a9c0741 |
User & Date: | lexi on 2019-06-24 09:24:06 |
Other Links: | manifest | tags |
Context
2019-07-27
| ||
06:29 | add structure macro check-in: e856b9f3a8 user: lexi tags: trunk | |
2019-06-24
| ||
09:24 | updates check-in: d425e8a7c7 user: lexi tags: trunk | |
2019-06-11
| ||
22:01 | add dotorg check-in: a250db5fda user: lexi tags: trunk | |
Changes
Modified pharma.ml from [f8230bde94] to [764d55bf37].
1 -let suffixes = [| "tine"; "zone"; "done"; "dol"; "mycin"; "pentin"; "nine"; "cillin"; "mab"; "xone"; "xine"; "zine"; "dine"; "nyl"; "nil"; "codone"; "morphone"; "drene"; "phine"; "thine"; "toxin"; "xin"; "dioxin"; "lene"; "ne"; "pine"; "relin"; "gen"; "phen"; "fen"; "dem"; "lone"; "fen"; "line"; "but"; "te"; "xate"; "tal"; "mate"; "norphine"; "dal"; "phetamine"; "amphetamine"; "quel"; |] 1 +let suffixes = [| "tine"; "zone"; "done"; "dol"; "mycin"; "pentin"; "nine"; "cillin"; "mab"; "xone"; "xine"; "zine"; "dine"; "nyl"; "nil"; "codone"; "morphone"; "drene"; "phine"; "thine"; "toxin"; "xin"; "dioxin"; "lene"; "ne"; "pine"; "relin"; "gen"; "phen"; "fen"; "dem"; "lone"; "fen"; "line"; "but"; "te"; "xate"; "tal"; "mate"; "norphine"; "dal"; "phetamine"; "amphetamine"; "quel"; "fol"; |] 2 2 let salts = [| "chloride"; "acetate"; "phosphate"; "hydrochloride"; "succinate"; "sulphate"; |] 3 -let prefixes = [| "neo"; "retro"; "nor"; "tri"; "cycli"; "tetra"; "penta"; "methyl"; "nal"; "pro"; "metha"; "fenta"; "meta"; "hydro"; "fluoro"; "thieno"; "mal"; "eroto"; "diablo"; "miso"; "propy"; "ethy"; "buta"; "hexa"; "benzo"; "piperi"; "sado"; "maso"; "philo"; "theo"; "iso"; "cyclo"; "klepto"; "pyro"; "carba"; "ibu"; "masculo"; "phos"; "estro"; "endo"; "poly"; "bi"; "tri"; "cumulo"; "strato"; "dextro"; "sinistro"; "levo"; "dextra"; "sinistra"; "ecto"; "myco"; "canna"; "am"; |] 3 +let prefixes = [| "neo"; "retro"; "nor"; "tri"; "cycli"; "tetra"; "penta"; "methyl"; "nal"; "pro"; "metha"; "fenta"; "meta"; "hydro"; "fluoro"; "thieno"; "mal"; "eroto"; "diablo"; "miso"; "propy"; "ethy"; "buta"; "hexa"; "benzo"; "piperi"; "sado"; "maso"; "philo"; "theo"; "iso"; "cyclo"; "klepto"; "pyro"; "carba"; "ibu"; "masculo"; "phos"; "estro"; "endo"; "poly"; "bi"; "tri"; "cumulo"; "strato"; "dextro"; "sinistro"; "levo"; "dextra"; "sinistra"; "ecto"; "myco"; "canna"; "am"; "di"; "diclo"; "triclo"; "nazi"; "commu"; "communo"; |] 4 4 let onsets = [| "f"; "fl"; "fr"; "p"; "pr"; "pl"; "c"; "cr"; "cl"; "s"; "sc"; "scl"; "scr"; "ph"; "sph"; "phr"; "phl"; "ch"; "chr"; "chl"; "z"; "th"; "thr"; "r"; "x"; |] 5 5 let vowels = [| "a"; "e"; "i"; "o"; "u"; "y"; |] 6 6 let codas = [| "n"; "m"; "r"; "s"; "f"; |] 7 7 let pick a = a.(Random.int(Array.length a)) 8 8 let range min max = min+(Random.int(max-min)) 9 9 10 10 let syl () = match range 0 3 with
Modified threat.scm from [c3beb2da63] to [e796932c22].
1 -(include "bot.scm") 1 +(include "lib/lisp-macro.scm") 2 +(include "lib/bot.scm") 2 3 3 -(define actors 4 - '#(me you thou they him her myself "your mother" "your mom" "your father" 5 - "your dad" "your aunt" "your uncle" "your dog")) 4 +(rule (maybe x) (x) ("")) 5 +(rule (maybe_ x) (x " ")) 6 +(rule (maybe* x) ((x)) ("")) 7 +(rule (maybe_* x) ((x) " ") ("")) 6 8 9 +(bank pronoun 'me 'you 'thou 'they 'him 'her 'myself) 7 10 (define pronouns '( 8 - (you (nom . "you") (acc . "you") (gen . "your") (poss . "yours") ) 9 - (thou (nom . "thou") (acc . "thee") (gen . "thy") (poss . "thine") ) 10 - (they (nom . "they") (acc . "them") (gen . "their") (poss . "theirs") ) 11 - (him (nom . "he") (acc . "him") (gen . "his") (poss . "his") ) 12 - (her (nom . "her") (acc . "her") (gen . "hers") (poss . "hers") ) 13 - (me (nom . "I") (acc . "me") (gen . "my") (poss . "mine") ) 14 - (myself (nom . "I") (acc . "myself") (gen . "my own") (poss . "my own")))) 11 + (you (nom . "you") (acc . "you") (gen . "your") (poss . "yours") (cop . "you're")) 12 + (thou (nom . "thou") (acc . "thee") (gen . "thy") (poss . "thine") (cop . "thou art")) 13 + (they (nom . "they") (acc . "them") (gen . "their") (poss . "theirs") (cop . "they're")) 14 + (her (nom . "her") (acc . "her") (gen . "her") (poss . "hers") (cop . "she's")) 15 + (him (nom . "he") (acc . "him") (gen . "his") (poss . "his") (cop . "he's")) 16 + (me (nom . "I") (acc . "me") (gen . "my") (poss . "mine") (cop . "I'm")) 17 + (myself (nom . "I") (acc . "myself") (gen . "my own") (poss . "my own") (cop . "I'm")))) 18 + 19 +(define (thy x) (string-append (inflect 'gen (pronoun)) " " x)) 20 + 21 +(bank article 'def 'indef 'dem-prox 'dem-dist) 22 +(define (decline art nm n) 23 + ; art = (def indef dem-prox dem-dist) 24 + (let* ([sg (if (pair? (cdr n)) (cadr n) (cdr n))] 25 + [pl (if (pair? (cdr n)) (cddr n) (string-append sg "s"))] 26 + [vwl (car n)] 27 + [sel (if (eq? nm 'sg) sg pl)]) 28 + (apply string-append (case art 29 + ((def) (list "the " sel)) 30 + ((indef) (case nm 31 + ((sg) (case vwl 32 + ((a) (list "a " sel)) 33 + ((an) (list "an " sel)))) 34 + ((pl) (list sel)))) 35 + ((dem-prox) (case nm 36 + ((sg) (list "this " sel)) 37 + ((pl) (list "these " sel)))) 38 + ((dem-dist) (case nm 39 + ((sg) (list "that " sel)) 40 + ((pl) (list "those " sel)))))))) 41 + 42 +(bank relatives 43 + "mother" "mom" "father" "dad" "aunt" "uncle" "dog" "friend" "granny" 44 + "grandma" "grandfather" "grandpa" "grandmother") 45 +(bank jobs 46 + '(a . "banker") '(a ."porn star") '(a . "general") '(a . "president") 47 + '(a . "janitor") '(an ."executive") '(a . ("sheep" . "sheep")) '(a . ("spy" . "spies")) 48 + '(a . "fed") '(a . "war criminal")) 49 + 50 +(rule (actors) 51 + ((pronoun)) 52 + ((thy (relatives))) 53 + ((decline (article) (one-of 'sg 'pl) (jobs))) 54 + ((inflect 'gen (pronoun)) " " (relatives))) 15 55 16 56 (define (conjugate v t n) 17 57 (if (eq? v 'cop) 18 - (case (cons t n) 58 + (case (cons t n) ))) 19 59 20 60 21 61 (define (inflect c n) 22 62 (if (string? n) 23 63 (case c 24 64 ((nom acc) n) 25 65 ((gen poss cop) (string-append n "'s"))) 26 66 ; else 27 - (cdr (assq c (cdr (assq n pronouns)))))) 67 + (cdr (assq c (cdr (assq n pronouns)))))) 68 + 69 +(bank organ 70 + "balls" "gut" "face" "head" "nose" "brain" "heart" 71 + "ass" "tits" "duodenum" "kidneys" "pooper") 28 72 29 73 (rule (action victim) 30 - ("port " victim " to lisp") 31 - ("rain on " victim "'s parade")) 74 + ("port " (inflect 'acc victim) " to lisp") 75 + ("rain on " (inflect 'gen victim) " parade") 76 + ((one-of "shoot" "stab") " " (inflect 'acc victim) " in the " (organ)) 77 + ("impale " (inflect 'acc victim) 78 + (@ ("") (" on " (one-of "the flagpole" "a spike" "the terrorspike")))) 79 + ("demolish " (inflect 'gen victim) " house") 80 + ("have " (inflect 'acc victim) " " (one-of "sent" "deported") " " 81 + (maybe "straight ") "to " 82 + (one-of "Siberia" "the north pole" "Betelgeuse" "the moon" "Cleveland"))) 32 83 33 84 (rule (subject actor) 34 85 ((inflect 'cop actor) " gonna") 35 - ((inflect 'nom actor) " swear")) 86 + ((inflect 'cop actor) " " (one-of "fixing" "plotting" "planning" "scheming") " to")) 87 + ; ((inflect 'nom actor) " swear to")) 88 + 89 +(rule (clause actor victim) 90 + ((subject actor) " " (action victim))) 36 91 37 -(print 38 - (inflect 39 - (pick '#(nom acc gen poss)) 40 - (pick actors))) 92 +(print (clause (actors) (actors))) 93 + ; ((inflect 94 + ; (pick '#(nom acc gen poss)) 95 + ; (pick actors))) 41 96 42 97 ;(print (action "you"))