Commit | Line | Data |
---|---|---|
e7f85ce1 IA |
1 | * Implementation of MAL in Common Lisp |
2 | ||
3 | ** Introduction | |
4 | ||
269ce7ff IA |
5 | This is a portable implementation of MAL in Common Lisp. It has been tested to |
6 | work with following Common Lisp implementations | |
e7f85ce1 | 7 | |
96b93a97 IA |
8 | - Steel Bank Common Lisp [[http://sbcl.org/]] |
9 | - Clozure Common Lisp [[http://ccl.clozure.com/]] | |
10 | - CMU Common Lisp [[https://www.cons.org/cmucl/]] | |
11 | - GNU CLISP [[http://www.clisp.org/]] | |
12 | - Embeddable Common Lisp [[https://common-lisp.net/project/ecl/]] | |
269ce7ff | 13 | - ManKai Common Lisp https://common-lisp.net/project/mkcl/ |
96b93a97 IA |
14 | - Allegro CL [[http://franz.com/products/allegro-common-lisp/]] |
15 | - Armed Bear Common Lisp [[http://abcl.org/]] | |
16 | ||
269ce7ff | 17 | [[http://www.cliki.net/cl-launch][cl-launch]] to build executable/wrapper scripts for most of the above implementations. |
e7f85ce1 IA |
18 | |
19 | ** Dependencies | |
20 | ||
96b93a97 IA |
21 | - cl-launch |
22 | For building command line executable scripts. See [[http://www.cliki.net/cl-launch][cl-launch]] | |
e7f85ce1 | 23 | |
96b93a97 IA |
24 | - quicklisp |
25 | For installing dependencies. See [[https://www.quicklisp.org/beta/][quicklisp]] | |
e7f85ce1 | 26 | |
96b93a97 IA |
27 | - readline |
28 | For readline integration. You can install it on Ubuntu using apt the package | |
29 | is ~libreadline-dev~. If you wish to run the implementation using Allegro CL, | |
30 | you will also have to install the 32 bit version of readline | |
31 | (~lib32readline-dev~ on Ubuntu) | |
32 | ||
33 | - (Optional) asdf | |
34 | This is needed if you want to run the implementation using GNU CLISP, since | |
35 | GNU CLISP does not ship with ~asdf~ and ~cl-launch~ depends on it. You can | |
36 | install it on Ubuntu using apt the package is ~cl-asdf~ | |
e7f85ce1 IA |
37 | |
38 | ** Running using different implementations | |
39 | ||
40 | By default the MAL is built using ~sbcl~, you can control this using ~LISP~ | |
41 | environment variable. The variable should be set to the cl-launch "nickname" for | |
42 | implementation. The nicknames that work currently are | |
43 | ||
44 | |------------------------+----------| | |
45 | | Implementation | Nickname | | |
46 | |------------------------+----------| | |
47 | | Steel Bank Common Lisp | sbcl | | |
48 | | Clozure Common Lisp | ccl | | |
49 | | CMU Common Lisp | cmucl | | |
50 | | GNU CLISP | clisp | | |
51 | | Embeddable Common Lisp | ecl | | |
269ce7ff | 52 | | ManKai Common Lisp | mkcl | |
e7f85ce1 | 53 | | Allegro CL | allegro | |
96b93a97 | 54 | | Armed Bear Common Lisp | abcl | |
e7f85ce1 IA |
55 | |------------------------+----------| |
56 | ||
57 | For example to build with GNU CLISP, you need to do the following | |
58 | ||
59 | #+BEGIN_SRC sh | |
60 | cd common-lisp ; LISP=clisp make | |
61 | #+END_SRC | |
62 | ||
63 | You can control the implementation binary used for the build using environment | |
64 | variables. For a given implementation nickname, the environment variable will | |
65 | be the capitalization of the given nickname. | |
66 | ||
67 | |------------------------+-------------| | |
68 | | Implementation | Binary Path | | |
69 | |------------------------+-------------| | |
70 | | Steel Bank Common Lisp | SBCL | | |
71 | | Clozure Common Lisp | CCL | | |
72 | | CMU Common Lisp | CMUCL | | |
73 | | GNU CLISP | CLISP | | |
74 | | Embeddable Common Lisp | ECL | | |
269ce7ff | 75 | | ManKai Common Lisp | MKCL | |
e7f85ce1 | 76 | | Allegro CL | ALLEGRO | |
96b93a97 | 77 | | Armed Bear Common Lisp | ABCL | |
e7f85ce1 IA |
78 | |------------------------+-------------| |
79 | ||
80 | For example to build MAL with Clozure CL installed in | |
81 | ~\~/.roswell/impls/x86-64/linux/ccl-bin/1.11/lx86cl64~, you need to do the | |
82 | following | |
83 | ||
84 | #+BEGIN_SRC sh | |
85 | cd common-lisp ; LISP=ccl CCL=~/.roswell/impls/x86-64/linux/ccl-bin/1.11/lx86cl64 make | |
86 | #+END_SRC | |
87 | ||
88 | You can use the variables ~*cl-implementation*~ and ~*cl-version*~ can be used | |
89 | to in MAL REPL to check the Common Lisp implementation and the version used for | |
90 | building it. | |
91 | ||
92 | ** Interop | |
93 | ||
96b93a97 | 94 | There is some basic interop in the form ~cl-eval~ which takes a string and |
e7f85ce1 | 95 | evaluates it as Common Lisp code, the result is returned in form of a MAL value, |
96b93a97 | 96 | as such you are limited to code that produces values that have MAL counterparts. |
269ce7ff IA |
97 | |
98 | ** Known Issues | |
99 | ABCL takes a long to boot as such it needs to be run with ~TEST_OPTS~ set to | |
100 | ~--start-timeout 120~ |