Linux command
clisp 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start interactive REPL
clisp
Run a Lisp file
clisp [script.lisp]
Evaluate an expression
clisp -x "(print \"Hello World\")"
Load file and enter REPL
clisp -i [script.lisp]
Compile a file to bytecode
clisp -c [source.lisp]
Run without startup messages
clisp -q
Set memory limits
clisp -m [100MB]
说明
CLISP is an implementation of ANSI Common Lisp, providing an interactive development environment and compiler. It features a bytecode compiler, interpreter, debugger, and CLOS (Common Lisp Object System) support. The REPL (Read-Eval-Print Loop) provides interactive Lisp development with readline support, history, and completion. Files can be loaded, compiled to bytecode for faster execution, or combined into standalone executables. CLISP includes extensive standard library support, foreign function interface (FFI) for calling C code, socket and networking functions, and internationalization support including Unicode.
参数
- -c _file_
- Compile file to bytecode (.fas).
- -x _expression_
- Execute expression and exit.
- -i _file_
- Load file before entering REPL.
- -o _file_
- Output file for compilation.
- -q, --quiet
- Suppress banner and startup messages.
- -m _size_
- Set memory size limit.
- -M _file_
- Use memory image file.
- -modern
- Use modern (lowercase) symbol case.
- -ansi
- Comply with ANSI Common Lisp standard.
- -traditional
- Use traditional (pre-ANSI) behavior.
- -norc
- Do not load the user RC file (~/.clisprc.lisp).
- -repl
- Start a REPL regardless of other options.
- -on-error _action_
- Action on error: debug, exit, abort, appease.
- -disable-readline
- Do not use GNU readline for input.
- --help
- Display help.
- --version
- Display version information.
FAQ
What is the clisp command used for?
CLISP is an implementation of ANSI Common Lisp, providing an interactive development environment and compiler. It features a bytecode compiler, interpreter, debugger, and CLOS (Common Lisp Object System) support. The REPL (Read-Eval-Print Loop) provides interactive Lisp development with readline support, history, and completion. Files can be loaded, compiled to bytecode for faster execution, or combined into standalone executables. CLISP includes extensive standard library support, foreign function interface (FFI) for calling C code, socket and networking functions, and internationalization support including Unicode.
How do I run a basic clisp example?
Run `clisp` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c _file_ do in clisp?
Compile file to bytecode (.fas).