I'm guessing this is not rocket science, but how can I run a compiled lisp file? I am using emacs and SLIME under Windows. From the SLIME menu it is straightforward to compile the file and, once it does, it spits out a wx64fsl in the same directory as my lisp source. How do I load/run this file? I've been running files by eval-ing whole blocks of code and I've been told that running the compiled version performs far better.
Step 1: After logging into a CUIT machine, enter "lisp" after the $ shell prompt and then hit <return>. Another way is to run lisp via emacs: Meta-x run-lisp (i.e. hit 'esc' followed by 'x', type "run-lisp" and you'll be in lisp mode from which you can load files of lisp code...)
With CLISP under a unix (like Ubuntu) you can simply add a shebang to the top of your file #!/path/to/clisp and in Ubuntu that would be #!/usr/bin/clisp and it will execute the code as a script. You need the file to contain proper Common Lisp file like: #!/usr/bin/clisp (princ "Hello, world!")
Double click on the icon to launch the interpreter. The prompt of LISP interpreter is [n]> where n is a sequence number. You may write LISP program directly on the prompts. The interpreter will execute the program right away.
From the SLIME REPL:
,cd
to change directories into the one with your lisp file(load (compile "filename.lisp"))
OR from the SLIME Menu:
SLIME > Compilation > Compile \ Load
So basically it was embarrassingly easy and there was even a menu option for it, I was just initially confused by the nomenclature. Hopefully this will help someone in the future.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With