check libraries installed on common lisp ???

Discussion of Common Lisp
Post Reply
b-RAM
Posts: 1
Joined: Mon May 17, 2010 12:52 am

check libraries installed on common lisp ???

Post by b-RAM » Mon May 17, 2010 1:11 am

Hi all, i'm just born to lispforum.com :) , and just learn about common lisp, btw is there any way to check what libraries installed on common lisp, how do i check ?.
And is it only one way to running .lisp file is using the interpreter and do command compile and load the file .lisp?, is there any other way than to do that so we can make executable in linux/maybe Win* ?.
My last question is when i try to create lisp file but using extension .cl why it is not work when i load the file from interpreter common lisp instead if use .lisp, actually i never try to use .lsp(i just know when i join this forum and see some post :) ).

Sorry about this question and need some enlightment please.

gugamilare
Posts: 406
Joined: Sat Mar 07, 2009 6:17 pm
Location: Brazil
Contact:

Re: check libraries installed on common lisp ???

Post by gugamilare » Mon May 17, 2010 6:33 am

b-RAM wrote:Hi all, i'm just born to lispforum.com :) , and just learn about common lisp, btw is there any way to check what libraries installed on common lisp, how do i check ?.
To be able to manipulate (load / compile / check) libraries you need ASDF. Then you can check whether a library (or system) exists you can use find-system:

Code: Select all

CL-USER> (asdf:find-system :bordeaux-threads nil)
NIL
CL-USER> (asdf:find-system :iterate nil)
#<ASDF:SYSTEM "iterate" {22769E21}>
Some Common Lisp implementations already have ASDF installed by default (SBCL and ECL, for instance), in others you will need to install it yourself in ASDF's page.
b-RAM wrote:And is it only one way to running .lisp file is using the interpreter and do command compile and load the file .lisp?, is there any other way than to do that so we can make executable in linux/maybe Win* ?.
It depends on the implementation you are using. Most implementations provide a way to save the current Lisp image into a file. Saving an image means saving everything, including the lisp implementation itself, so the result is likely going to be large even for simple programs. You can learn more about creating images for some implementations in this page.

An exception which must be noted is ECL. In ECL, you can create small executable programs or dynamic libraries that will only need link to ECL's dynamic library in order to run. This way the executables created are small. For more information check this section of ECL's manual.
b-RAM wrote:My last question is when i try to create lisp file but using extension .cl why it is not work when i load the file from interpreter common lisp instead if use .lisp, actually i never try to use .lsp(i just know when i join this forum and see some post :) )..
You might be committing some typographic mistake or something because you should be able to load lisp files regardless of their extension. Note that you must specify explicitly the extension when it isn't .lisp, like in

Code: Select all

(load #p"/path/to/some-file.cl")

Post Reply