# clnl This is an experiment at creating an alternate implementation of NetLogo in Common Lisp. # Using standalone executables Find the latest version, [0.1.1](https://code.consxy.com/gitweb/gitweb.cgi/clnl/commit/0.1.1) on the [releases page](https://consxy.com/clnl/releases): * [linux](https://consxy.com/clnl/releases/0.1.1/clnl) # Running from source If you'd like to run it from source, you're going to need a few things: * A copy of the clnl source from the [releases page](https://consxy.com/frankduncan/clnl/releases), version [0.1.1](https://consxy.com/clnl/releases/0.1.1/clnl_0.1.1.tar.gz) * An implementation of sbcl with threads enabled * The following common lisp libraries (included in [deps/common-lisp](deps/common-lisp) folder) * alexandria * babel * cffi * clnl-gltk * cl-opengl * cl-ppcre * ironclad * 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. Not very many commands are implemented, but it should alert you to that. A good test is ``` crt 10 ask turtles [ fd 1 ] show random 5 ask turtles [ fd 5 ] ``` # Running in a common lisp instance If you'd like to run using your own sbcl instance, you can attach the clnl.asd file wherever you link asd files, and then use: ```lisp (asdf:load-system :clnl) (clnl:run) ``` # strictmath Pure common lisp implentation of Java's StrictMath class. StrictMath is based on the pure software math library fdlibm, and as such, this solution should be equivalent and portable. ## Limitations In the true "scratch an itch" category of software development, this library only does things as strictly needed by clnl in order to be consistent with regard to the JVM implementation of NetLogo. Only the following things are implemented and tested: * Double precision only * Bounded to [0,360] or [0,2pi] only * The following StrictMath methods * sin * cos * abs * toRadians Anything else that works can be considered a pleasant surprise. ## License This library lifts substantially from the evita-common-lisp implementation, as is noted in the LICENSE file. Outside of that, functions are attempted ports of fdlibm functions, in as close as possible to a line for line translation. As such, the files are similarly bound by the licenses included therein. ## Dependencies The following are depended on by strictmath * ieee-floats # clnl-gltk This is a small experiment in creating some of the underlying tools that allows CLNL to implement NetLogo UI functionality.