Index: botsoc.scm ================================================================== --- botsoc.scm +++ botsoc.scm @@ -1,7 +1,8 @@ (include "lib/lisp-macro.scm") (include "lib/bot.scm") +(import (chicken process-context)) (rule (base-ideology) ("liberalism") ("socialism") ("capitalism") ("anarchism") ("marxism") ("marxism-leninism") ("nazism") ("feminism") ("stalinism") @@ -12,10 +13,12 @@ ("demonology") ("linguistics") ("voluntary human extinction") ("onanism") ("anthropology") ("authoritarianism") ("totalitarianism") ("social justice") ("identity politics") ("idpol") ("terrorism") ("islamism") ("hedonism") ("libertinism") ("computer science") + ("transhumanism") ("posthumanism") ("humanism") + ("humanitarianism") ("libertarianism"); ("static typing") ("dynamic typing") ("neoliberalism")) (rule (ideology-prefix) ("neo-") ("social ") ("democratic ") ("paleo-") ("retro-") ("anarcho-") @@ -47,11 +50,12 @@ ("vaccination") ("autism") ("the alt-right") ("authoritarianism") ("freedom of speech") ("tooth decay") ("neurodivergence") ("abortion") ("healthcare") ("the war") ("islamophobia") ("sexting") ; ("static typing") ("dynamic typing") - ("heterophobia") ("heterosexuality")) + ("apotheosis") ("theodicy") ("the problem of evil") + ("heterophobia") ("heterosexuality") ("Crooked Hillary")) (rule (adjective) ("racist") ("homophobic") ("misogynist") ("bigoted") ("anti-" (thing)) ("evil") ("insane") ("impossible") ("contradictory") ("illogical") ("revolutionary") ("self-contradictory") @@ -63,16 +67,31 @@ ("postfurry") ("eugenicist") ("alt-right") ("furry") ("problematic") ("totalitarian") ("unlikely") ("compromised") ("authoritarian") ("useless") ("useful") ("neurodivergent") ("desirable") ("undesirable") ("dialectic") - ("undialectical")("undefined") ("imperialist") + ("undefined") ("undialectical") ("imperialist") ("good") ("bad") ("colonialist") ("acausal") ("black") ;("statically-typed") ("emergent") ("libertarian") ("unreconstructed") ("teenage") ("Lacanian") ("intersectional") - ("horny") ("thirsty")) + ("horny") ("thirsty") ("necessary") + ("forbidden") ("electronic")) + +(rule (action) + ("live") ("die") ("breathe") ("hope") ("speak freely") + ("survive" (problem)) ("kill " (group)) ("destroy " (thingss)) + ("use " (thingss)) ("steal " (things)) ("murder " (group)) + ("create " (thingss)) ("build " (thingss)) ("make " (things)) + ("labor") ("work") ("exploit " (group)) ("produce " (things)) + ("undermine " (thing)) ("overthrow " (group)) ("be free of "(thingss)) + ("have " (one-of "money" "bodies" "homes" "food" (thingss))) + ("exploit " (group) " for cheap labor") ("perform sorcery") + ("perform augury") ("see the future") ("prophesy") + ("enchant " (things)) ("perform wizardry") ("engage in witchcraft") + ("have sex") ("fuck" (: ((group)))) ("own " (thingss)) + ("declare war") ("deprive " (group) " of " (necessity))) (rule (trait) ("power") ("influence") ("wealth") ("solidarity") ("hope") ("conviction") ("autonomy") ("freedom") ("liberty") ("faith") ("humanity") ("sapience")) @@ -80,11 +99,11 @@ (rule (necessity) ("sex") ("water") ("food") ("money") ("wealth") ("income") ("welfare") ("tea") ("therapy") ("pain relief") ("medical care") ("medicine") ("reproduction") ("hope") ("faith") - ("love")) + ("love") ("pain") ("love") ("oxygen") ("nutrition")) (rule (thing) ((problem)) ((necessity)) ("Russia") ("Mars") ("activism") ((thing) " activism") ("anti-" (thing) " activism") @@ -95,58 +114,68 @@ ("transit") ("public transit") ("public transportation") ("meth") ("heroin") ("dialectics") ("the dialectic") ("the Discourse") ("medical care") ("psychiatry") ("influenza") ("alien life") ("mind control") ("terrorism") ("identity") ("healthcare") - ("literature") ("grass") ("catnip") + ("literature") ("grass") ("catnip") ("virginity") ("television") ("romance") ("finance") - ("opium") ("law") ("dating") ("online dating") ("friendship")) + ("opium") ("law") ("dating") ("online dating") ("friendship") + ("the Resistance")) (rule (things) ("pandas") ("lasers") ("toasters") ("kulaks") ("opiates") ("painkillers") ("teacups") ("umbrellas") ((thing) " rights") - ((adjective) " rights") - ((thing) " activists") ("anti-" (adjective) " activists") - ((ideology) " activists") ((adjective) " activists") + ((adjective) " rights") (group) ("humans") ("vaccines") ("doctors") ("drugs") ("hospitals") ("UFOs") ("aliens") ("flowers") ("pumpkins") ("guns") ("babies") - ("friends") + ("friends") ("bitcoins") ) (rule (thingss) ((thing)) ((things))) (rule (group) - ("gays") ("whites") ("African-Americans") + ("gays") ("whites") ("African-Americans") ("the poor") ("the rich") ("Jewish people") - ("natives") ("otherkin") ("psychics") - ("furries") ("immigrants") ("trans people") - ("men") ("women") ("the bourgeoisie") - ("boys") ("girls") ("the proletariat") - ("activists") ("stirnerites") ("proletarians") + ("natives") ("otherkin") ("psychics") + ("furries") ("immigrants") ("trans people") + ("men") ("women") ("the bourgeoisie") + ("boys") ("girls") ("the proletariat") + ("activists") ("stirnerites") ("proletarians") ("extremists") ((thing) " extremists") ((thing) " activists") - ("addicts") ("junkies") ("tweakers") - ("potheads") ("acid heads") ("meth addicts") - ("doctors") ("gamers") ("marijuana users") - ("dentists") ("fascists") ("marijuana addicts") - ("nazis") ("wizards") ("heroin addicts") - ("hackers") ("LSD addicts") ("disabled people") - ("criminals") ("teenagers") ("the differently-abled") - ("teens") ("cissexuals") ("the working class")) + ("addicts") ("junkies") ("tweakers") + ("potheads") ("acid heads") ("meth addicts") + ("doctors") ("gamers") ("marijuana users") + ("dentists") ("fascists") ("marijuana addicts") + ("nazis") ("wizards") ("heroin addicts") + ("hackers") ("LSD addicts") ("disabled people") + ("criminals") ("teenagers") ("the differently-abled") + ("teens") ("cissexuals") ("the working class") + ("lizards") ("bureaucrats") ("politicians") + ("catholics") ("methodists") ("mormons") + ("kulaks") ("slaves") ("human trafficking vitims") + ("victims") ("crime victims") ("victims of " (problem)) + ("losers") ("thieves") ("queer people") + ("queers") ("senators") ("presidents") + ("queens") ("kings") ("emperors") + ("aliens") + ((thing) " activists") ("anti-" (adjective) " activists") + ((ideology) " activists") ((adjective) " activists")) ; utility fns (rule (adjfor adj con g) (adj) (adj con g)) (rule (modal) - ("will") ("could") ("might") ("will likely") ("can") - ("surely will") ("undoubtedly will") ("may")) + ("will") ("could") ("might") ("will likely") ("can") ("must") + ("surely will") ("undoubtedly will") ("may") ("should")) (rule (modal-not) ("will not") ("could not") ("might not") ("will likely not") ("cannot") - ("surely will not") ("undoubtedly will not") ("may not")) + ("surely will not") ("undoubtedly will not") ("may not") ("shouldn't") + ("must not") ("mustn't")) (rule (modal-rnd) ((modal)) ((modal-not))) (rule (cause-provoke) ("cause") ("lead to") ("provoke the development of") @@ -186,22 +215,29 @@ (i " is the source of " (problem)) (i " is the cause of " (problem)) (i " is the the reason for " (problem)) (i " is the the reason " (group) " suffer from " (problem)) - (i " excludes " (group)) ((cause (group) i) " be excluded from " (thing)) - (i " dehumanizes " (group)) - (i " alienates " (group)) - (i " marginalizes " (group)) - + (i " " (one-of "dehumanizes" + "alienates" + "marginalizes" + "pathologizing" + "ignores" + "harms" + "disenfranchises" + "excludes" + "perpetuates the alienation of" + "perpetuates the marginalization of" + "perpetuates the dehumanizationn of") " " (group)) + (i " pathologizes " (problem)) (i " pathologizes " (thingss)) (i " " (modal) " deny " (group) " access to " (thingss)) - ((group) " are " (adjective)) - ((group) " are not " (adjective)) + ((group) " are " (? "not ") (? "actually ") (@ (adjective) + (group))) ((thing) " " (causes-provokes) " " (thingss)) ((things) " " (cause-provoke) " " (thingss)) ((thingss) " " (modal) " cause " (problem)) (i " " (causes-provokes) " " (problem)) @@ -220,38 +256,69 @@ (i " fails to address " (problem)) (i " does not address " (problem)) (i " disregards " (problem)) (i " is not a solution for " (problem)) - (i " does not solve " (problem)) - (i " cannot solve " (problem)) - ("basically, " (predicate-or-claim ii)) + (i " " (one-of "does not" "cannot") " " + (one-of "solve" + "deal with " + "cope with " + "handle " + "offer a solution for ") + (one-of "" "the issues posed by " "the problem of ") + (problem)) + ("basically, " (predicate-or-claim i)) ) (rule (predicate i) - (i " was developed after " (ideology)) - (i " was developed before " (ideology)) - (i " was developed before " (problem) " was recognized") - (i " was developed before " (problem) " was recognized as a problem") - (i " was developed before the issue of " (problem) " came into focus") - (i " developed before general awareness of " (problem)) - (i " was built on " (ideology)) - (i " was inspired by " (ideology)) - (i " was influenced by " (ideology)) - (i " is an ideological descendent of " (ideology)) - (i " is an ideological descendent of " (ideology) " and " (ideology)) - (i (one-of - " was developed by " " was designed by " - " is in the class interests of " - " only addresses the needs of " - " was developed to address the needs of " - " centers " " uplifts " " only liberates " - " centers the needs of " " only cares about " - " centers the struggles of " - " centers the struggle of ") - (group) (one-of "" (string-append ", not " (group)))) - + (i " was " (one-of "created" + "developed" + "designed") " " + (@ ((one-of "after" + "before" + "prior to" + "at the same time as" + "without knowledge of" + "without awareness of" + "concurrently with" + "as a consequence of" + "due to" + "due to the failure of" + "in response to") " " (ideology)) + ("before " (one-of "" + "the issue of " + "the matter of ") (problem) + (one-of " was recognized" + " came into focus" + " was well-understood") + (one-of "" " as a problem" " as an issue" + " as a factor" " as a threat")) + ("prior to general awareness of " + (@ ((problem)) ((things)))))) + (i " was " (one-of "built on" + "inspired by" + "influenced by") " " (ideology)) + (i " is an ideological descendent of " (ideology) (: (" and " (ideology)))) + (i (@ + (" was " (one-of "developed" "designed" "created" ) + (@ (" by ") + (" for ") + ( (: (" by " (group))) + (one-of " to address the needs of " + " in the class interests of ")))) + (" only " (one-of "centers" "uplifts" "liberates" + "cares about" "addresses the needs of")) + ((one-of " only" "") (one-of " centers " " cares about ") + (? "the " (one-of "needs" + "struggles" + "voices" + "experiences" + "suffering" + "struggle") " of ")) + (" is in the class interests of ")) + (group) (? ", not " (group))) + (i (one-of " disregards " " disregards the needs of " " cannot address the struggles of " " does not liberate " " disrespects " @@ -262,102 +329,112 @@ " does not center " " fails to center " " does not center the needs of" " fails to center the needs of ") (group)) ("the main contradiction of " i " is " (problem)) - + ((group) " believe that " (pc claim i)) - ((group) " have an inherent right to " - (one-of "be a part of " " ") - (one-of (thing) (problem)))) - -(rule (claim i) - ((problem) " " (modal) " inevitably arise") - ((problem) " " (modal) " still exist") - ((problem) " " (modal) " " (cause-provoke) " " (problem)) - ((problem) " " (modal) " " (cause-provoke) " the defeat of " i) - ((problem) " cannot be distinguished from " i) - (i " and " (ideology) " cannot be distinguished") - (i " and " (ideology) " will produce the same result") + ((group) " have an inherent right to " (@ ((? "be a part of ") + (one-of (thing) (problem))) + (action))) - ((group) " " (modal) " be exploited") - ((group) " " (modal) " still be exploited") - ((group) " " (modal) " be exploited under " i) - ((group) " " (modal) " still be exploited under " i) - ((group) " " (modal) " face " (problem)) + ((group) " " (one-of "should" "must" "have to") " be " + (one-of "able" "allowed" "permitted") " to " (action)) - (i " " (modal) " kill " (group)) - - ((thing) " is " (adjfor (adjective) " for " (group))) - ((things) " are " (adjfor (adjective) " for " (group))) - ((thing) " is actually " (adjfor (adjective) " for " (group))) - ((things) " are actually " (adjfor (adjective) " for " (group))) - - ((problem) " " (modal) " benefit " (group)) - ((problem) " " (modal) " harm " (group)) - ((problem) " " (modal) " destroy " (group)) - ((problem) " " (modal) " incite " (group) " against " (group)) - ((problem) " " (modal) " incite " (group) " against " (problem)) - ((problem) " is unfair to " (group)) - - ((problem) " is likely to result") - ((thing) " is likely to result") - ((things) " are likely to result") - ((thing) " is likely to be involved") - ((things) " are likely to involved") + ((group) " " (modal-rnd) " " + (one-of "be destroyed" "be eradicated" "be wiped out" "be obliterated")) + ) + +(rule (claim i) + ((problem) " " (modal) (@ (" inevitably arise") + (" still exist") + (" " (cause-provoke) " " (problem)) + (" " (cause-provoke) " the defeat of " i))) + ((problem) " cannot be distinguished from " i) + (i " and " (ideology) " cannot be distinguished") + (i " and " (ideology) " will produce the same result") + + ((group) " " (modal) (@ (" be exploited") + (" still be exploited") + (" be exploited under " i) + (" still be exploited under " i) + (" face " (problem)))) + + ((group) " " (modal-rnd) " " (action)) + + (i " " (modal) " kill " (group)) + + ((thing) " is " (adjfor (adjective) " for " (group))) + ((things) " are " (adjfor (adjective) " for " (group))) + ((thing) " is actually " (adjfor (adjective) " for " (group))) + ((things) " are actually " (adjfor (adjective) " for " (group))) + + ((problem) " " (modal) " benefit " (group)) + ((problem) " " (modal) " harm " (group)) + ((problem) " " (modal) " destroy " (group)) + ((problem) " " (modal) " incite " (group) " against " (group)) + ((problem) " " (modal) " incite " (group) " against " (problem)) + ((problem) " is unfair to " (group)) + + ((problem) " is likely to result") + ((thing) " is likely to result") + ((things) " are likely to result") + ((thing) " is likely to be involved") + ((things) " are likely to involved") + + ((problem) " is to blame") + ((thing) " is to blame") + ((things) " are to blame") + + ((thing) " is harmful to " (group)) + ((things) " are harmful to " (group)) + ((thingss) " " (modal) " " (cause-provoke) " the oppression of " (group)) + ((cause (group) i) " face " (problem)) + ((cause (group) i) " suffer " (problem)) + ((cause (group) i) " suffer from " (problem)) + ((cause (group) i) " experience " (problem)) + ((cause (group) i) " no longer experience " (problem)) - ((problem) " is to blame") - ((thing) " is to blame") - ((things) " are to blame") - - ((thing) " is harmful to " (group)) - ((things) " are harmful to " (group)) - ((thingss) " " (modal) " " (cause-provoke) " the oppression of " (group)) - ((cause (group) i) " face " (problem)) - ((cause (group) i) " suffer " (problem)) - ((cause (group) i) " suffer from " (problem)) - ((cause (group) i) " experience " (problem)) - ((cause (group) i) " no longer experience " (problem)) - - ((cause (group) i) " suffer") - ((cause (group) i) " be marginalized") - ((cause (group) i) " become marginalized") - ((cause (group) i) " become exploited") - ((cause (group) i) " become addicted to " (thingss)) - ((cause (group) i) " lose their " (trait)) - ((cause (group) i) " lose their " (things)) - ((cause (group) i) " " (@ - ("no longer " (@ ("have ") - ("be able to " (@ ("get ") - ("get access to ") - ("have "))))) - ("not have ")) - (necessity) - (one-of " in their lives" " anymore" " in their lives anymore" "")) - ((cause (group) i) " lose access to " (necessity)) - ) + ((cause (group) i) " suffer") + ((cause (group) i) " be marginalized") + ((cause (group) i) " become marginalized") + ((cause (group) i) " become exploited") + ((cause (group) i) " become addicted to " (thingss)) + ((cause (group) i) " lose their " (@ (trait) (thingss) + ((one-of "ability" "right") " to " (action)))) + ((cause (group) i) " " (@ + ("no longer " (@ ("have ") + ("be able to " (@ ("get ") + ("get access to ") + ("have "))))) + ("not have ")) + (necessity) + (one-of " in their lives" " anymore" " in their lives anymore" "")) + ((cause (group) i) " lose access to " (necessity)) + ) (rule (pc p i) ((p i)) ((predicate-or-claim (one-of "it" i)))) (rule (statement i) - ((pc predicate i)) - ((pc claim i)) - ("i think " (pc claim i)) - ("it is my considered opinion that " (pc claim i)) - ("i think we all know that " (pc claim i)) - ("nobody would deny that " (pc claim i)) - ((pc predicate i) ", therefore " (pc claim i)) - ((pc claim i) " because " (predicate i)) - ("if " (pc predicate i) ", " (pc claim i)) - ("if " (pc predicate i) ", then " (pc claim i)) - ("because " (pc predicate i) ", " (pc claim i)) - ("since " (pc predicate i) ", " (pc claim i)) - ("as a result of " (problem) ", " (pc claim i)) - ("due to " (problem) ", " (pc claim i)) - ("despite what " (group) " think, " (pc claim i)) - ("despite what " (group) " think about " (problem) ", " (pc claim i)) - ("while " (group) " think " (pc claim i) ", the reality is that " (pc claim i)) - ) + ((pc predicate i)) + ((pc claim i)) + ("i think " (pc claim i)) + ("i strongly believe that " (pc claim i)) + ("it is my considered opinion that " (pc claim i)) + ("i think we all know that " (pc claim i)) + ("nobody would deny that " (pc claim i)) + ((pc predicate i) ", therefore " (pc claim i)) + ((pc claim i) " because " (predicate i)) + ("if " (pc predicate i) ", " (pc claim i)) + ("if " (pc predicate i) ", then " (pc claim i)) + ("because " (pc predicate i) ", " (pc claim i)) + ("since " (pc predicate i) ", " (pc claim i)) + ("as a result of " (problem) ", " (pc claim i)) + ("due to " (problem) ", " (pc claim i)) + ("despite what " (group) " think, " (pc claim i)) + ("despite what " (group) " think about " (problem) ", " (pc claim i)) + ("while " (group) " think " (pc claim i) ", the reality is that " (pc claim i)) + ) (rule (punct) (".") ("…") (" —") (",") (",") ("...") (" -") (" --") ("?") ("!") ("!?") (";")) @@ -373,13 +450,20 @@ (i (punct) " checkmate, " (atheists) (end-punct)) (i (punct) " checkmate " (atheists) (end-punct)) (i (punct) " checkmate" (punct) " " (atheists) (end-punct)) (i (punct) " #checkmate" (atheists)) (i (punct) " #CheckmateAtheists") - (i (punct) " #CheckmateAthiests")) + (i (punct) " #CheckmateAthiests") + (i (punct) " #ThanksObama")) (define (checkmate-athiests i) - (if (eqv? (pseudo-random-integer 9) 0) - (checkmate-atheists i) ; else - i)) + (if (eqv? (pseudo-random-integer 9) 0) ;then + (checkmate-atheists i) + ; else + i)) -(print (checkmate-athiests (statement (ideology)))) +(let* ([args (command-line-arguments)] + [argc (length args)]) + (if (= argc 1) ;then + (print (statement (car args))) + ;else + (print (checkmate-athiests (statement (ideology)))))) Index: lib/bot.scm ================================================================== --- lib/bot.scm +++ lib/bot.scm @@ -47,10 +47,17 @@ ; with the inner macro (@) (define-macro (rule . body) (let ([decl (car body)] [patterns (cdr body)]) `(define ,decl - (define-macro (@ . tree) (@rewrite-patterns tree)) + (define-macro (@ . tree) (@rewrite-patterns tree)) ;choice point + (define-macro (: . tree) (@rewrite-patterns (cons (list "") tree))) ;optional choice + (define-macro (? . tree) (@rewrite-patterns (cons (list "") (list tree)))) ;optional - TODO: rewrite ,(@rewrite-patterns patterns)))) - + ; generate simple word-banks + (define-macro (bank . body) + (let ([decl (car body)] + [patterns (cdr body)]) + `(define (,decl) + (one-of ,@patterns)))) (define (pick ar) (vector-ref ar (pseudo-random-integer (vector-length ar))))