From 6fc4a1700ede4beee1d2a547d75be6b40488a1f5 Mon Sep 17 00:00:00 2001 From: Frank Duncan Date: Sun, 29 May 2016 22:53:54 -0500 Subject: [PATCH] Code reformat - Macro for functions implement commands to return :undefined --- .travis.yml | 2 +- bin/buildtravisexec.sh | 2 +- deps/common-lisp/docgen_0.2.tar.gz | Bin 6447 -> 0 bytes deps/common-lisp/docgen_0.3.tar.gz | Bin 0 -> 6435 bytes src/main/main.lisp | 3 ++- src/main/nvm/base.lisp | 3 +++ src/main/nvm/controlflow.lisp | 10 +++---- src/main/nvm/inout.lisp | 5 ++-- src/main/nvm/nvm.lisp | 4 +-- src/main/nvm/turtles.lisp | 41 ++++++++++++++++------------- src/main/nvm/world.lisp | 24 ++++++----------- 11 files changed, 47 insertions(+), 47 deletions(-) delete mode 100644 deps/common-lisp/docgen_0.2.tar.gz create mode 100644 deps/common-lisp/docgen_0.3.tar.gz diff --git a/.travis.yml b/.travis.yml index fa44e4a..d52b800 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ addons: before_install: - export DISPLAY=:99.0 - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x24 - - wget http://frank.kank.net/travissbcl/clnl/72aabe5/$(git rev-parse HEAD)/travissbcl + - wget http://frank.kank.net/travissbcl/clnl/31bdd7b/$(git rev-parse HEAD)/travissbcl - chmod +x travissbcl script: - ./travissbcl --script bin/all.lisp diff --git a/bin/buildtravisexec.sh b/bin/buildtravisexec.sh index a7757e2..5f8b14b 100755 --- a/bin/buildtravisexec.sh +++ b/bin/buildtravisexec.sh @@ -26,7 +26,7 @@ mkdir -p tmp/deps/ tar zxf ../../deps/common-lisp/trivial-features_0.8.tar.gz && tar zxf ../../deps/common-lisp/cl-charms-9bb94ef.tar.gz && tar zxf ../../deps/common-lisp/style-checker_0.1.tar.gz && - tar zxf ../../deps/common-lisp/docgen_0.2.tar.gz && + tar zxf ../../deps/common-lisp/docgen_0.3.tar.gz && tar zxf ../../deps/common-lisp/ieee-floats-92e481a.tar.gz && tar zxf ../../deps/common-lisp/strictmath_0.1.tar.gz ) diff --git a/deps/common-lisp/docgen_0.2.tar.gz b/deps/common-lisp/docgen_0.2.tar.gz deleted file mode 100644 index d1cc757d6c6ffe3a39cbc550d6e5a37476a8a934..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6447 zcmV+~8PMh*iwFR}X&F}l1MNL)bK6Fe{>)!71;sI`2wG8+ATAeMsRIweGC1*Dm z#|cCZMVv^20YJ+-$NKHp-SZv{K+4bT9*~Mf0y8~5-97!99%7UY&-whfo$cMf-TGA5 z4qW%{-o?NDdv|y2zv{Zx-@UhUuzRq7aPQu&o&IkB-rg;C_mg2{UCW|Oa>i~=cz%}h z`gW_H|C?ST!+-H{dzu!Dk2?l3_+Wp(hX4Kk{yoEg_zV2s-|O$+VmlufjqvsVod4Z) z9xsyNMRLyB#z2TbuhZ#{_&A;Oc$m#cX_;no_BxrSqXa+3<0PFfbI#`Jly$qa;+zfA zc?x8N5A-eP$%yBHE-^gr^*XGJBQ0lqUeaS0y(svIrSp>K^JF@`V&g1l0vWbQ^0HuM z#)|YD9rl?AZ^G*mvKvhlj_HUpzlL>A;BU^FV#tG&cu8WW}hHpP&2}dvfv!hCO`#=*5$x zr>7_E@aY2vgS>$52n)au*dbGBAoAH1?qlBpJE5{64ov{^fIZsS8)t$T$yv56slP<3(|K@oa{u}9v(w`rpArU@8JEcgF8~TnJ(-U* zu|OOqNy$J`2qJ$Yy@L_xI8&urXxND$u72_TUwM`1bCRt*%?PsLpg+A z@MQ@f0TN0gf3wK)5~j3`c>XvC0nO%I2p?O3q>F*sWeONU*PLT}fP_f0GM(`)LKbK< z1oY=gNuwa14AgCjbHs@xFc?Q<0aa*$)Z30gcxTBl&!)U2A-hb=Nn9+4Lm+r8m_bs` zzRo#-8lxyO_Iq~%6Pxlp9wr5+ThMutX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CRIPTION: (if (getf prim :macro) ; The reason we do this is because with macros, we want to evaluate them in ; this scope while preserving them for the generational purposes below (append (list :macro (eval (getf prim :macro))) prim) - prim)) prims)))))) + prim)) prims))) + :undefined))) (defun model->single-form-lisp (model &key (seed 15) initialize-interface netlogo-callback) (multiple-value-bind diff --git a/src/main/nvm/base.lisp b/src/main/nvm/base.lisp index 7fec1df..1a80dc3 100644 --- a/src/main/nvm/base.lisp +++ b/src/main/nvm/base.lisp @@ -38,6 +38,9 @@ DESCRIPTION: (stop (s) (declare (ignore s)) :stop) (death (d) (declare (ignore d)) :death))) +(defmacro defcommand (name args docstring &rest body) + `(defun ,name ,args ,docstring ,@body :undefined)) + (defstruct turtle who breed color heading xcor ycor (label "") label-color size shape own-vars) (defstruct patch color xcor ycor own-vars turtles) diff --git a/src/main/nvm/controlflow.lisp b/src/main/nvm/controlflow.lisp index a1df63b..b4368fd 100644 --- a/src/main/nvm/controlflow.lisp +++ b/src/main/nvm/controlflow.lisp @@ -1,14 +1,14 @@ (in-package #:clnl-nvm) -(defun ask (agent-or-agentset fn) +(defcommand ask (agent-or-agentset fn) "ASK AGENT-OR-AGENTSET FN => RESULT AGENT-OR-AGENTSET: AGENT | AGENTSET + RESULT: :undefined ARGUMENTS AND VALUES: FN: a function, run on each agent - RESULT: undefined, commands don't return AGENT: a NetLogo agent AGENTSET: a NetLogo agentset @@ -35,12 +35,10 @@ DESCRIPTION: (t (error "Ask requires an agentset or agent but got: ~A" agent-or-agentset)))) -(defun stop () +(defcommand stop () "STOP => RESULT -ARGUMENTS AND VALUES: - - RESULT: undefined + RESULT: :undefined DESCRIPTION: diff --git a/src/main/nvm/inout.lisp b/src/main/nvm/inout.lisp index 7a78cf2..b8f88d4 100644 --- a/src/main/nvm/inout.lisp +++ b/src/main/nvm/inout.lisp @@ -80,13 +80,14 @@ DESCRIPTION: "\"end1\",\"end2\",\"color\",\"label\",\"label-color\",\"hidden?\",\"breed\",\"thickness\",\"shape\",\"tie-mode\"" "")))) -(defun show (value) +(defcommand show (value) "SHOW VALUE => RESULT + RESULT: :undefined + ARGUMENTS AND VALUES: VALUE: a NetLogo value - RESULT: undefined DESCRIPTION: diff --git a/src/main/nvm/nvm.lisp b/src/main/nvm/nvm.lisp index 7927909..e3f582d 100644 --- a/src/main/nvm/nvm.lisp +++ b/src/main/nvm/nvm.lisp @@ -76,7 +76,7 @@ DESCRIPTION: ((= i (length copy)) (incf i) (car (last copy))) (t (let ((result agent)) (fetch) result))))))) -(defun create-world (&key dims globals turtles-own-vars patches-own-vars breeds) +(defcommand create-world (&key dims globals turtles-own-vars patches-own-vars breeds) "CREATE-WORLD &key DIMS GLOBALS TURTLES-OWN-VARS PATCHES-OWN-VARS BREEDS => RESULT DIMS: (:xmin XMIN :xmax XMAX :ymin YMIN :ymax YMAX) @@ -84,11 +84,11 @@ DESCRIPTION: TURTLES-OWN-VARS: TURTLES-OWN-VAR* PATCHES-OWN-VARS: PATCHES-OWN-VAR* BREEDS: BREED* + RESULT: :undefined GLOBAL: (GLOBAL-NAME GLOBAL-ACCESS-FUNC) ARGUMENTS AND VALUES: - RESULT: undefined XMIN: An integer representing the minimum patch coord in X XMAX: An integer representing the maximum patch coord in X YMIN: An integer representing the minimum patch coord in Y diff --git a/src/main/nvm/turtles.lisp b/src/main/nvm/turtles.lisp index cdaa2c7..49c1834 100644 --- a/src/main/nvm/turtles.lisp +++ b/src/main/nvm/turtles.lisp @@ -1,14 +1,15 @@ (in-package #:clnl-nvm) -(defun create-turtles (n &optional breed fn) +(defcommand create-turtles (n &optional breed fn) "CREATE-TURTLES N &optional BREED FN => RESULT + RESULT: :undefined + ARGUMENTS AND VALUES: N: an integer, the numbers of turtles to create BREED: a breed FN: A function, applied to each turtle after creation - RESULT: undefined DESCRIPTION: @@ -24,12 +25,10 @@ DESCRIPTION: ((new-turtles (loop :repeat n :collect (create-turtle breed)))) (when fn (ask (list->agentset new-turtles :turtles) fn)))) -(defun die () +(defcommand die () "DIE => RESULT -ARGUMENTS AND VALUES: - - RESULT: undefined, commands don't return + RESULT: :undefined DESCRIPTION: @@ -51,14 +50,15 @@ DESCRIPTION: (setf (patch-turtles patch) (remove *self* (patch-turtles patch)))) (error (make-condition 'death))) -(defun hatch (n &optional fn) +(defcommand hatch (n &optional fn) "HATCH N &optional FN => RESULT + RESULT: :undefined + ARGUMENTS AND VALUES: N: an integer, the numbers of turtles to hatch FN: A function, applied to each turtle after creation - RESULT: undefined DESCRIPTION: @@ -73,13 +73,14 @@ DESCRIPTION: ((new-turtles (loop :repeat n :collect (create-turtle nil *self*)))) (when fn (ask (list->agentset new-turtles :turtles) fn)))) -(defun forward (n) +(defcommand forward (n) "FORWARD N => RESULT + RESULT: :undefined + ARGUMENTS AND VALUES: N: a double, the amount the turtle moves forward - RESULT: undefined DESCRIPTION: @@ -153,14 +154,15 @@ DESCRIPTION: (max (+ (max-pycor) 0.5d0))) (+ min (clnl-random:next-double (- max min))))) -(defun set-default-shape (breed shape) +(defcommand set-default-shape (breed shape) "SET-DEFAULT-SHAPE BREED SHAPE => RESULT + RESULT: :undefined + ARGUMENTS AND VALUES: BREED: a valid breed SHAPE: a string - RESULT: undefined DESCRIPTION: @@ -173,14 +175,15 @@ DESCRIPTION: (when (not (breed-p breed)) (error "Need a valid breed")) (setf (breed-default-shape breed) shape)) -(defun setxy (x y) +(defcommand setxy (x y) "SETXY X Y => RESULT + RESULT: :undefined + ARGUMENTS AND VALUES: X: a double Y: a double - RESULT: undefined DESCRIPTION: @@ -212,13 +215,14 @@ DESCRIPTION: (if breed (remove breed patch-turtles :key #'turtle-breed :test-not #'eql) patch-turtles) (or breed :turtles)))) -(defun turn-right (n) +(defcommand turn-right (n) "TURN-RIGHT N => RESULT + RESULT: :undefined + ARGUMENTS AND VALUES: N: a double, the amount the turtle turns - RESULT: undefined DESCRIPTION: @@ -234,13 +238,14 @@ DESCRIPTION: ((>= new-heading 360) (mod new-heading 360)) (t new-heading))))) -(defun turn-left (n) +(defcommand turn-left (n) "TURN-LEFT N => RESULT + RESULT: :undefined + ARGUMENTS AND VALUES: N: a double, the amount the turtle turns - RESULT: undefined DESCRIPTION: diff --git a/src/main/nvm/world.lisp b/src/main/nvm/world.lisp index 6dfa214..5bac9b4 100644 --- a/src/main/nvm/world.lisp +++ b/src/main/nvm/world.lisp @@ -19,12 +19,10 @@ (defun clear-ticks () (setf *ticks* nil)) -(defun clear-all () +(defcommand clear-all () "CLEAR-ALL => RESULT -ARGUMENTS AND VALUES: - - RESULT: undefined + RESULT: :undefined DESCRIPTION: @@ -35,12 +33,10 @@ DESCRIPTION: (clear-patches) (clear-ticks)) -(defun display () +(defcommand display () "DISPLAY => RESULT -ARGUMENTS AND VALUES: - - RESULT: undefined + RESULT: :undefined DESCRIPTION: @@ -50,12 +46,10 @@ DESCRIPTION: See http://ccl.northwestern.edu/netlogo/docs/dictionary.html#display" nil) -(defun reset-ticks () +(defcommand reset-ticks () "RESET-TICKS => RESULT -ARGUMENTS AND VALUES: - - RESULT: undefined + RESULT: :undefined DESCRIPTION: @@ -64,12 +58,10 @@ DESCRIPTION: See http://ccl.northwestern.edu/netlogo/docs/dictionary.html#reset-ticks" (setf *ticks* 0d0)) -(defun tick () +(defcommand tick () "RESET-TICKS => RESULT -ARGUMENTS AND VALUES: - - RESULT: undefined + RESULT: :undefined DESCRIPTION: -- 2.25.1