Hi lisp user
I just downloaded and installed clisp and from the shell on a debian
testing machine #lisp which displayed clisp. I just wanted to know what
the type of files created by the Lisp compiler is. is it file.bin or
what?
thanks
Gary Wessle <······@yahoo.com> writes:
> I just downloaded and installed clisp and from the shell on a debian
> testing machine #lisp which displayed clisp. I just wanted to know what
> the type of files created by the Lisp compiler is. is it file.bin or
> what?
You can use the function: COMPILE-FILE-PATHNAME
to know what file will be produced when compiling a source file.
So, to answer your question, you can evaluate this form:
(pathname-type (compile-file-pathname #P"TOTO.LISP"))
--
__Pascal Bourguignon__ http://www.informatimago.com/
"Specifications are for the weak and timid!"
Pascal Bourguignon <···@informatimago.com> writes:
> Gary Wessle <······@yahoo.com> writes:
> > I just downloaded and installed clisp and from the shell on a debian
> > testing machine #lisp which displayed clisp. I just wanted to know what
> > the type of files created by the Lisp compiler is. is it file.bin or
> > what?
>
> You can use the function: COMPILE-FILE-PATHNAME
> to know what file will be produced when compiling a source file.
>
> So, to answer your question, you can evaluate this form:
>
> (pathname-type (compile-file-pathname #P"TOTO.LISP"))
>
>
> --
> __Pascal Bourguignon__ http://www.informatimago.com/
>
> "Specifications are for the weak and timid!"
I created a file ~/my.lisp, in it I have
(+ 2 4)
went back to my clisp shell which I started from ~/mydir/$clisp
****************************************************************
[41]> COMPILE-FILE-~/my.lisp
*** - EVAL: variable COMPILE-FILE-~/MY.LISP has no value
The following restarts are available:
USE-VALUE :R1 You may input a value to be used instead of COMPILE-FILE -~/MY.LISP.
STORE-VALUE :R2 You may input a new value for COMPILE-FILE-~/MY.LISP.
ABORT :R3 ABORT
Break 1 [42]> quit
[43]> compile-file(~/my.lisp)
*** - EVAL: variable COMPILE-FILE has no value
The following restarts are available:
USE-VALUE :R1 You may input a value to be used instead of COMPILE-FILE .
STORE-VALUE :R2 You may input a new value for COMPILE-FILE.
ABORT :R3 ABORT
Break 1 [44]> quit
[45]> bye
*** - EVAL: variable BYE has no value
The following restarts are available:
USE-VALUE :R1 You may input a value to be used instead of BYE.
STORE-VALUE :R2 You may input a new value for BYE.
ABORT :R3 ABORT
Break 1 [46]>
****************************************************************
btw; how would one quit the clip shell? I tried both quit and bye for
no avail.
@Gary:
All commands (ahem, "functions") should be in parentheses:
(quit)
(bye)
Filenames are generalized as pathname objects, denoted by
#p"<path/to/file>":
(compile-file #p"~/my.lisp")
Many functions that accept filenames/pathnames will also accept
strings:
(compile-file "~/my.lisp")
CLISP has its own "standard" for compiled output - CLISP uses a virtual
machine. Its files have a ".fas" extension. What is more, I think
some other CL implementations also use a ".fas" extension, but have a
different compiled output - some have different virtual machines, some
compile to native code.