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/076c72b/$(git rev-parse HEAD)/travissbcl
+ - wget http://frank.kank.net/travissbcl/clnl/213ed30/$(git rev-parse HEAD)/travissbcl
- chmod +x travissbcl
script:
- - ./travissbcl --script bin/travis.lisp
+ - ./travissbcl --script bin/all.lisp
* mt19937
* nibbles
* trivial-features
+ * strictmath
+ * ieee-floats
[bin/nl](bin/nl) and [bin/run.lisp](bin/run.lisp) have been added for convenience to run the netlogo instance. It boots up the ncurses command line with an opengl view. Not very many commands are implemented, but it should alert you to that. A good test is
-(when (not (find-package :clnl)) (asdf:load-system :clnl))
-(when (not (find-package :clnl-test)) (asdf:load-system :clnl-test))
+(setf *compile-print* nil)
+(require 'asdf)
+(asdf:initialize-source-registry `(:source-registry (:tree ,(car (directory "src"))) :INHERIT-CONFIGURATION))
+(asdf:load-system :clnl)
+(asdf:load-system :clnl-test)
+#-travis(asdf:load-system :style-checker)
+#-travis(asdf:load-system :docgen)
(format t "~%~c[1;33mRunning Tests~c[0m~%" #\Esc #\Esc)
(when (not (clnl-test:run-all-tests))
tar zxf ../../deps/common-lisp/mt19937-latest.tar.gz &&
tar zxf ../../deps/common-lisp/nibbles-v0.12.tar.gz &&
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/cl-charms-9bb94ef.tar.gz &&
+ tar zxf ../../deps/common-lisp/ieee-floats-92e481a.tar.gz &&
+ tar zxf ../../deps/common-lisp/strictmath_0.1.tar.gz
)
SBCL_HOME="" tmp/sbcl/bin/sbcl --core tmp/sbcl/lib/sbcl/sbcl.core \
tar zxf ../../deps/common-lisp/mt19937-latest.tar.gz &&
tar zxf ../../deps/common-lisp/nibbles-v0.12.tar.gz &&
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/cl-charms-9bb94ef.tar.gz &&
+ tar zxf ../../deps/common-lisp/ieee-floats-92e481a.tar.gz &&
+ tar zxf ../../deps/common-lisp/strictmath_0.1.tar.gz
)
SBCL_HOME="" tmp/sbcl/bin/sbcl --core tmp/sbcl/lib/sbcl/sbcl.core --no-sysinit --no-userinit \
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.1.tar.gz
+ tar zxf ../../deps/common-lisp/docgen_0.1.tar.gz &&
+ tar zxf ../../deps/common-lisp/ieee-floats-92e481a.tar.gz &&
+ tar zxf ../../deps/common-lisp/strictmath_0.1.tar.gz
)
SBCL_HOME="" tmp/sbcl/bin/sbcl --core tmp/sbcl/lib/sbcl/sbcl.core \
--eval "(asdf:load-system :cl-charms)" \
--eval "(asdf:load-system :style-checker)" \
--eval "(asdf:load-system :docgen)" \
+ --eval "(asdf:load-system :strictmath)" \
--eval "(asdf:clear-output-translations)" \
+ --eval "(push :travis *features*)" \
--eval '(sb-ext:save-lisp-and-die "travissbcl" :executable t)' \
chmod +x travissbcl
travisname=travissbcl-$(git rev-parse --short HEAD)
mv travissbcl $travisname
-echo "You should upload via the command: scp $travisname nami:/opt/travis/sbcls/clnl/"
+echo "You should upload via the command: scp $travisname nami:/var/travis/sbcls/clnl/"
echo "You should also set travisname in .travis.yml to $travisname"
rm -rf tmp
tar zxf ../../deps/common-lisp/mt19937-latest.tar.gz &&
tar zxf ../../deps/common-lisp/nibbles-v0.12.tar.gz &&
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/cl-charms-9bb94ef.tar.gz &&
+ tar zxf ../../deps/common-lisp/ieee-floats-92e481a.tar.gz &&
+ tar zxf ../../deps/common-lisp/strictmath_0.1.tar.gz
)
cur_dir=$(cygpath -d $PWD)
+++ /dev/null
-(setf *compile-print* nil)
-(require 'asdf)
-;(setf asdf:*central-registry* (list #p"deps/"))
-(asdf:initialize-source-registry `(:source-registry (:tree ,(car (directory "src"))) :IGNORE-INHERITED-CONFIGURATION))
-(asdf:load-system :clnl.internal)
-(asdf:load-system :clnl-test.internal)
-
-(load "bin/all.lisp")
-; The systems are split up into two because travis will run more smoothly
-; if we use a custom built sbcl that has all the deps pre-loaded since
-; we are sure those will work just fine :)
-;
-; You should link to this file in your systems directory, or however you
-; handle your asdf configurations. Then just (asdf:load-system :clnl)
-;
-; There's probably a better way, but I don't know it
-
(asdf:defsystem clnl
- :name "Experiment"
- :version "0.0.0"
- :maintainer "Frank Duncan (frank@kank.com)"
- :author "Frank Duncan (frank@kank.com)"
- :depends-on (:cl-ppcre :mt19937 :cl-opengl :cl-glut :cl-charms :clnl.internal))
+ :name "Experiment"
+ :version "0.0.0"
+ :maintainer "Frank Duncan (frank@kank.com)"
+ :author "Frank Duncan (frank@kank.com)"
+ :components ((:file "package")
+ (:file "model")
+ (:file "lex")
+ (:file "parse")
+ (:file "nvm")
+ (:file "transpile")
+ (:file "random")
+ (:file "interface")
+ (:file "cli")
+ (:file "main"))
+ :depends-on #-travis (:cl-ppcre :mt19937 :cl-opengl :cl-glut :cl-charms :strictmath) #+travis nil)
+++ /dev/null
-; The systems are split up into two because travis will run more smoothly
-; if we use a custom built sbcl that has all the deps pre-loaded since
-; we are sure those will work just fine :)
-;
-; You should link to this file in your systems directory, or however you
-; handle your asdf configurations. Then just (asdf:load-system :clnl)
-;
-; There's probably a better way, but I don't know it
-
-(asdf:defsystem clnl.internal
- :serial t
- :components ((:file "package")
- (:file "model")
- (:file "lex")
- (:file "parse")
- (:file "nvm")
- (:file "transpile")
- (:file "random")
- (:file "interface")
- (:file "cli")
- (:file "main")))
See http://ccl.northwestern.edu/netlogo/docs/dictionary.html#forward"
(when (not (turtle-p *self*)) (error "Gotta call fd in turtle scope, dude (~A)" *self*))
- (setf (turtle-xcor *self*) (+ (turtle-xcor *self*) (* n (sin (* pi (/ (turtle-heading *self*) 180))))))
- (setf (turtle-ycor *self*) (+ (turtle-ycor *self*) (* n (cos (* pi (/ (turtle-heading *self*) 180)))))))
+ (setf
+ (turtle-xcor *self*)
+ (+ (turtle-xcor *self*) (* n (strictmath:sin (strictmath:to-radians (turtle-heading *self*))))))
+ (setf
+ (turtle-ycor *self*)
+ (+ (turtle-ycor *self*) (* n (strictmath:cos (strictmath:to-radians (turtle-heading *self*)))))))
(defun create-turtles (n)
"CREATE-TURTLES N => RESULT
-; For why this is the way it is, see src/main/clnl.asd
(asdf:defsystem clnl-test
:name "Experiment Tests"
:maintainer "Frank Duncan (frank@kank.com)"
:author "Frank Duncan (frank@kank.com)"
:serial t
- :depends-on (:ironclad :clnl clnl-test.internal))
+ :components ((:file "package")
+ (:file "main")
+ (:file "simpletests")
+ (:file "viewtests"))
+ :depends-on (#-travis :ironclad :clnl))
+++ /dev/null
-; For why this is the way it is, see src/main/clnl.asd
-(asdf:defsystem clnl-test.internal
- :components ((:file "package")
- (:file "main")
- (:file "simpletests")
- (:file "viewtests")))