2

I could use packages installed with quick lisp: Using packages installed from quicklisp with clisp

I tried to execute the lisp code that uses packages using command line. The code is

(ql:quickload "yacc") (use-package 'yacc) 

When I tried it with clisp ex.lisp, I got this error message:

*** - READ from #<INPUT BUFFERED FILE-STREAM CHARACTER #P"ex.lisp" @2>: there is no package with name "QL" 

I had to use clisp < ex.lisp to load the package.

What makes the difference between the two approaches? Is clisp < ex.lisp the only way to use packages in command line?

I found this How to use quicklisp when CL program is invoked as a shell script?, but it's not for clisp.

2
  • 2
    I suspect clisp handles init files differently in interactive and non-interactive mode, so your quicklisp setup isn't loaded when you launch with an argument. Commented Jan 7, 2014 at 15:06
  • 1
    @molbdnilo -- I would second that. According to the CLISP man page, "No RC file will be executed", when the interpreter is started as clisp script.lisp. The OP should use the -i option to cause setup.lisp to be loaded. Commented Jan 7, 2014 at 15:47

1 Answer 1

1

Make a c.lisp that executes and exits the calculator.lisp.

(load "calculator.lisp") ;(in-package #:yacc-calculator) (yacc-calculator:calculator) (ext:exit) 

Run clisp with -i: clisp -i c.lisp.

Reference

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.