Re: compiling a Lisp source to exe



In article
<032f841d-c497-43df-b247-927d544b04c3@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
cartercc <cartercc@xxxxxxxxx> wrote:

On Sep 29, 3:28 pm, Rainer Joswig <jos...@xxxxxxx> wrote:
Well as I said, read the fine manuals.

As always very good advice, and as often happens, not done until
someone says RTFM. Okay, I did (and as a matter of fact had previously
printed the CMUCL manual).

I spent more than an hour last night trying to make it work, learned a
few things, but was unable to accomplish the task I set out. I just
need to get more familiar with these tools. I'm satisfied that this
can be done, and maybe in six months or so I will focus and getting it
done.


For me this works with CLISP - see this:


RJMBP:~ joswig$ clisp
i i i i i i i ooooo o ooooooo ooooo ooooo
I I I I I I I 8 8 8 8 8 o 8 8
I \ `+' / I 8 8 8 8 8 8
\ `-+-' / 8 8 8 ooooo 8oooo
`-__|__-' 8 8 8 8 8
| 8 o 8 8 o 8 8
------+------ ooooo 8oooooo ooo8ooo ooooo 8

Welcome to GNU CLISP 2.45 (2008-05-15) <http://clisp.cons.org/>

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2008

Type :h and hit Enter for context help.

[1]> (defun my-main () (print 'my-program-start))
MY-MAIN
[2]> (EXT:SAVEINITMEM "/tmp/c1" :executable t :init-function 'my-main)
;; Wrote the memory image into /tmp/c1 (4,180,924 bytes)
1866456 ;
931158
[3]> (quit)
Bye.
RJMBP:~ joswig$ /tmp/c1
i i i i i i i ooooo o ooooooo ooooo ooooo
I I I I I I I 8 8 8 8 8 o 8 8
I \ `+' / I 8 8 8 8 8 8
\ `-+-' / 8 8 8 ooooo 8oooo
`-__|__-' 8 8 8 8 8
| 8 o 8 8 o 8 8
------+------ ooooo 8oooooo ooo8ooo ooooo 8

Welcome to GNU CLISP 2.45 (2008-05-15) <http://clisp.cons.org/>

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2008

Type :h and hit Enter for context help.


MY-PROGRAM-START
[1]>



For CLISP for example:

http://clisp.cons.org/impnotes/image.html

see the :executable option to the function
EXT:SAVEINITMEM .

CMUCL:

http://common-lisp.net/project/cmucl/doc/cmu-user/extensions.html#toc47

See the :executable option to the function extensions:save-lisp .

My three competencies are Perl, Java, and C++. In the case of Perl,
all the machines I am responsible for have Perl. Ditto Java for the
JRE. As to C++, the compilers generate exe files directly.

I would like to achieve some competency in Lisp but Lisps do not
typically get installed on machines and do not have a 'LRE' (or do
they?) Therefore, the only easy way I can think of to run a script
written in Lisp is to compile and distribute it as an exe.

Thanks for your help, CC.

--
http://lispm.dyndns.org/
.



Relevant Pages

  • CLISP problem with MS-DOS console window code page
    ... I am a newbie in both LISP and CLISP. ... Copyright Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 ...
    (comp.lang.lisp)
  • Re: Lisp and Symbolic Integration
    ... If GCL is sloppy then so is R. ... you are the experts since you've been using lisp longer ... Clisp isn't much help there for me. ... Copyright Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 ...
    (comp.lang.lisp)
  • Re: Learning lisp
    ... The build script saves a core file. ... I have clisp 2.41 on redhat linux with 2.6.9 kernel here at ... (defun taxes (wage hours tax) ... Copyright Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 ...
    (comp.lang.lisp)
  • How to install the mcclim?
    ... 1.Install the clisp 2.47 on Ubuntu ... 3.make the symbol links to the registry directory ... Copyright Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 ...
    (comp.lang.lisp)
  • Re: disassemble in clisp
    ... Sam Steingold writes: ... >> this lisp assembly language and having clisp execute it. ... is to develop with a dynamic system that has extreme late binding in ...
    (comp.lang.lisp)