# HG changeset patch # User Steve Losh # Date 1517686816 18000 # Node ID 243f388e5efb62fd9dd9f1b21d95a766b3aaab56 # Parent 8ae9290fdd58f39002dc3c8a6d4beb5752368270 First stab at heightmaps. Needs work. diff -r 8ae9290fdd58 -r 243f388e5efb Makefile --- a/Makefile Sat Nov 11 13:10:41 2017 -0500 +++ b/Makefile Sat Feb 03 14:40:16 2018 -0500 @@ -22,8 +22,9 @@ # Server update-deps: - hg -R /home/sjl/lib/cl-losh -v pull -u - hg -R /home/sjl/lib/chancery -v pull -u + hg -R /home/sjl/lib/cl-losh -v pull -u + hg -R /home/sjl/lib/chancery -v pull -u + hg -R /home/sjl/lib/trivial-ppm -v pull -u # Local deploy: binary diff -r 8ae9290fdd58 -r 243f388e5efb magitek.asd --- a/magitek.asd Sat Nov 11 13:10:41 2017 -0500 +++ b/magitek.asd Sat Feb 03 14:40:16 2018 -0500 @@ -19,6 +19,7 @@ :sqlite :trivia :trivia.quasiquote + :trivial-ppm ) @@ -37,6 +38,7 @@ (:file "database") (:file "twitter") (:file "markov") + (:file "diamond-square") (:module "robots" :components ((:file "git-commands") (:file "lisp-talks") diff -r 8ae9290fdd58 -r 243f388e5efb package.lisp --- a/package.lisp Sat Nov 11 13:10:41 2017 -0500 +++ b/package.lisp Sat Feb 03 14:40:16 2018 -0500 @@ -33,6 +33,15 @@ :build-markov-generator :generate-sentence)) +(defpackage :magitek.diamond-square + (:use + :cl + :losh + :iterate + :magitek.quickutils) + (:export + :generate-heightmap)) + (defpackage :magitek.robots.git-commands (:use diff -r 8ae9290fdd58 -r 243f388e5efb src/main.lisp --- a/src/main.lisp Sat Nov 11 13:10:41 2017 -0500 +++ b/src/main.lisp Sat Feb 03 14:40:16 2018 -0500 @@ -41,7 +41,7 @@ (finding (funcall generator) :such-that #'tt-tweetable-p))) -(defun run-bot (bot &key (force nil) (dry nil)) +(defun run-bot (bot &key (force nil) (dry t)) (with-bot (bot) (format t "Running ~S~%" name) (when (or force @@ -52,9 +52,11 @@ (progn (format t "Tweeting as ~S: ~S~%" name tweet) (db-insert-tweet name tweet) - (unless dry - (tt-tweet name tweet) - (sleep 5.0)))))))) + (if dry + (format t "Skipping actual tweet (dry run).") + (progn + (tt-tweet name tweet) + (sleep 5.0))))))))) (defun spinup () @@ -65,7 +67,7 @@ (defun main () (setf *random-state* (make-random-state t)) (spinup) - (run-bot *frantic-barista*) - (run-bot *git-commands*) - (run-bot *lisp-talks*) - (run-bot *rpg-shopkeeper*)) + (run-bot *frantic-barista* :dry nil) + (run-bot *git-commands* :dry nil) + (run-bot *lisp-talks* :dry nil) + (run-bot *rpg-shopkeeper* :dry nil))