akalenuk
akalenuk

Reputation: 3845

Can I run a script with LispWorks, like with SBCL's "--script" option?

I mean with SBCL I can run a script as easy as sbcl --script piece-of-code.lisp. But I can't find an obvious way to do so with LispWorks. Of course there's always a deploy and run option, but it requires a build script for every little exercise.

Is there a way to run a script with LispWorks without building an executable or running it from listener manually?

Upvotes: 1

Views: 879

Answers (3)

Spec
Spec

Reputation: 847

I'd recommend you create lispworks console, like in: http://www.lispworks.com/documentation/lw60/LW/html/lw-177.htm#83244

Then, you can use lw-console -init foo.lisp without IDE.

Upvotes: 3

Rainer Joswig
Rainer Joswig

Reputation: 139271

The various command line option for the latest LispWorks 6.1 are described here:

http://www.lispworks.com/documentation/lw61/LW/html/lw-517.htm#pgfId-891723

Upvotes: 2

Sylwester
Sylwester

Reputation: 48755

The sbcl --script is to make sbcl aware the first line of your code might be #!/usr/bin/sbcl ... and LispWorks doesn't seem to have that.

However, if you just want to run a script and not make it executable, then you can write:

lispworks -init my-lisp-init

And it will load my-lisp-init.lisp if I understood the documentation right

Upvotes: 2

Related Questions