need help with lispworks

Discussion of Common Lisp
alikim
Posts: 3
Joined: Sun Aug 02, 2009 4:20 am

need help with lispworks

Post by alikim » Sun Aug 02, 2009 4:34 am

Hi all,

I've installed LispWorks personal edition and I'm trying to figure out how to compile a working program... There are two windows "listener" and "editor" in the GUI where I can type some commands and write a source code respectively.

I can not find any way to create an *.exe file though (I'm working under Win XP).
All I have is Compile and Load options in the menu and when I compile my source code it creates an *.ofasl file on the disk and this is as far as I can go.

I can not load any of these two files into "listener" or "editor" windows as it produce the following error:
"End of file while reading stream #<Concatenated Stream, Streams = ()>."

Can anyone explain me please how to make a program work inside LispWorks, what's the procedure for it or how to make a stand alone *.exe file?

blandest
Posts: 19
Joined: Mon Jun 30, 2008 1:22 am

Re: need help with lispworks

Post by blandest » Tue Aug 04, 2009 7:09 am

If you are using the personal license for LispWorks then that is probably why you cannot create executables. Clozure CL and CLISP can create Win32 executables and have no artificial limitations (as far as I know).

skypher
Posts: 34
Joined: Thu Jul 03, 2008 6:12 am

Re: need help with lispworks

Post by skypher » Tue Aug 04, 2009 7:32 am

Are you new to Common Lisp?

Paul Donnelly
Posts: 148
Joined: Wed Jul 30, 2008 11:26 pm

Re: need help with lispworks

Post by Paul Donnelly » Tue Aug 04, 2009 1:43 pm

alikim wrote:Can anyone explain me please how to make a program work inside LispWorks, what's the procedure for it or how to make a stand alone *.exe file?
Is this a distribution requirement, or habit? I ask because many people get hung up on the way they did things in C, and you seem like you may be new to Lisp.

alikim
Posts: 3
Joined: Sun Aug 02, 2009 4:20 am

Re: need help with lispworks

Post by alikim » Wed Aug 05, 2009 3:26 am

Thanks, as my post had been delayed by the moderator for two days before publishing I already dug a bit into it and found out that you can't create execs with that license as it's crippleware and deleted LispWorks. Now I'm giving a try to CLISP..

Yes, I'm new to LISP so all I want to have is some LISP environment where I could create console and window applications under XP and also I need this LISP program to be compiled for running under a Unix like OS as I might need to make it work like a CGI.. not sure if this is possible though..

As to the question about my habits - I want to make a stand alone program running on any PC under (at least) XP so it has to be an executable file, do you have other habits?

Harnon
Posts: 78
Joined: Wed Jul 30, 2008 9:59 am

Re: need help with lispworks

Post by Harnon » Wed Aug 05, 2009 6:29 am

I think usually they're not in the habit of making executables.
Anyways, you have some options. If you know the sbcl, clisp, or whatever is going to be on the computer, you can use cl-launch
. "CL-Launch will create a shell script that, when invoked, will evaluate the specified Lisp software with an appropriate Common Lisp implementation.

A suggested short-hand name for cl-launch is cl (you may create a symlink if it isn't included in your operating system's cl-launch package). " Not quite an exe, but then you could create a bat to invoke the shell script. I'm sure you could also create an exe program using c which also invokes the shell program. The creation of the c program and compiling could be easily automated in lisp. Could be a good task for a newcomer.

You're other options are creating clisp/sbcl executables. However, these executables are packed with the whole clisp.sbcl system. Thus, a small program will eb around 25 mb. It doesn't scale up, the clisp.sbcl system (around 25 mb) is only included once, but still...

There is also the option of ecl. Ecl takes a different approach and compmiles lisp to c programs. I haven't used it, so don't know how stable it is. I have compiled version 9.4.1, but since then some newer ones have come out, though i'm not sure if they're compatable with windows yet. With ecl, you can also produce dlls in addition to exes and the size will be in accordance with the program size (well, atleast i think. the ecl runtime which is probably included is much smaller?) You should check this out.

That's about all i know....

Harnon
Posts: 78
Joined: Wed Jul 30, 2008 9:59 am

Re: need help with lispworks

Post by Harnon » Wed Aug 05, 2009 6:32 am

Oh, and i know that cusp, an eclipse plugin for lisp, can automatically create sbcl exes. But, then again, its not exactly hard, so might not be worth the trouble of downloading...

EDIT: reading cl-launch, it says
"Fully supported, including standalone executables:
sbcl: SBCL 1.0 (1.0.21.24 needed for standalone executable)
clisp: GNU CLISP 2.44 (no standalone exec before 2.48, broken before 2.36)
ecl: ECL 0.9l (Beware! cache needs be cleared before to dump asd images)

"

skypher
Posts: 34
Joined: Thu Jul 03, 2008 6:12 am

Re: need help with lispworks

Post by skypher » Wed Aug 05, 2009 6:36 am

alikim wrote:Thanks, as my post had been delayed by the moderator for two days before publishing I already dug a bit into it and found out that you can't create execs with that license as it's crippleware and deleted LispWorks. Now I'm giving a try to CLISP..

Yes, I'm new to LISP so all I want to have is some LISP environment where I could create console and window applications under XP and also I need this LISP program to be compiled for running under a Unix like OS as I might need to make it work like a CGI.. not sure if this is possible though..
Yes, it is.
As to the question about my habits - I want to make a stand alone program running on any PC under (at least) XP so it has to be an executable file, do you have other habits?
Not necessarily for deployment, but for development one usually does not create stand-alone executables like you'd do with C. Instead you're always in your Lisp executable (or image) and incrementally working on your program inside it.

dmitry_vk
Posts: 96
Joined: Sat Jun 28, 2008 8:01 am
Location: Russia, Kazan
Contact:

Re: need help with lispworks

Post by dmitry_vk » Wed Aug 05, 2009 6:38 am

Harnon wrote: You're other options are creating clisp/sbcl executables. However, these executables are packed with the whole clisp.sbcl system. Thus, a small program will eb around 25 mb. It doesn't scale up, the clisp.sbcl system (around 25 mb) is only included once, but still...
SBCL executables compress really well with tools like gzexe (an ELF executables compressor). Size goes about 4 times to ~6M.

alikim
Posts: 3
Joined: Sun Aug 02, 2009 4:20 am

Re: need help with lispworks

Post by alikim » Wed Aug 05, 2009 7:20 am

Thanks for replies, now I'm more confused though.. anyway I don't know much about how you work with images but the final product for is exe file so that I could send it to other people who know nothing about programming, lisp and such to test.
I've found a way to create exe files using lisp.exe, lispinit.mem and some cmd script and it seems to be working ok.
It created a windowed application executable 3Mb in size which also seems ok so I just need to check if I can build console appp with that.

And can anyone plz gimme a link to how create a CGI with CLISP?
I mean I can google it but it seems that you have to use some custom packages/libraries and I'm not sure which one is preferable.

Post Reply