Add Licensing and Contributing
[clnl] / README.md
1 # clnl
2
3 This is an experiment at creating an alternate implementation of NetLogo in Common Lisp.
4
5 # Using standalone executables
6
7 Find the latest version, [0.1.0](https://code.consxy.com/gitweb/gitweb.cgi/clnl/commit/v0.1.0) on the [releases page](https://consxy.com/clnl/releases):
8 * [linux](https://consxy.com/clnl/releases/v0.1.0/clnl)
9 * [windows](https://consxy.com/clnl/releases/v0.1.0/clnl.exe)
10 * [mac](https://consxy.com/clnl/releases/v0.1.0/CLNL.dmg)
11
12 # Running from source
13
14 If you'd like to run it from source, you're going to need a few things:
15
16 * A copy of the clnl source from the [releases page](https://consxy.com/frankduncan/clnl/releases), version [0.1.0](https://consxy.com/clnl/releases/v0.1.0/clnl_0.1.0.tar.gz)
17 * An implementation of sbcl with threads enabled
18 * The following common lisp libraries (included in [deps/common-lisp](deps/common-lisp) folder)
19   * alexandria
20   * babel
21   * cffi
22   * clnl-gltk
23   * cl-opengl
24   * cl-ppcre
25   * ironclad
26   * mt19937
27   * nibbles
28   * trivial-features
29   * strictmath
30   * ieee-floats
31
32 [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
33
34 ```
35 crt 10
36 ask turtles [ fd 1 ]
37 show random 5
38 ask turtles [ fd 5 ]
39 ```
40
41 ## Running on OSX
42
43 In order to run on OSX, you may have to build your own sbcl instance with threads enabled.  See [bin/buildosxexec.sh](bin/buildosxexec.sh) for how it's done when releasing/testing.
44
45 ## Running on Windows
46
47 In order to run on Windows, you will need to install a copy of 32bit sbcl with threads enabled, as well as putting a copy of freeglut in that directory.  See [bin/buildwindowsexec.sh](bin/buildwindowsexec.sh) for how it's done when releasing/testing.
48
49 # Running in a common lisp instance
50
51 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:
52
53 ```lisp
54 (asdf:load-system :clnl)
55 (clnl:run)
56 ```
57
58 # strictmath
59
60 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.
61
62 ## Limitations
63
64 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:
65
66 * Double precision only
67 * Bounded to [0,360] or [0,2pi] only
68 * The following StrictMath methods
69   * sin
70   * cos
71   * abs
72   * toRadians
73
74 Anything else that works can be considered a pleasant surprise.
75
76 ## License
77
78 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.
79
80 ## Dependencies
81
82 The following are depended on by strictmath
83
84 * ieee-floats
85
86 # clnl-gltk
87
88 This is a small experiment in creating some of the underlying tools that allows CLNL to implement NetLogo UI functionality.