LinuxCommandLibrary

sbcl

Run the Steel Bank Common Lisp compiler

TLDR

Start a REPL (interactive shell)

$ sbcl
copy

Execute a Lisp script
$ sbcl --script [path/to/script.lisp]
copy

SYNOPSIS

sbcl [options] [lisp-files]

PARAMETERS

--help
    Display help message and exit.

--version
    Display SBCL version and exit.

--core
    Specify the core file to use.

--dynamic-space-size
    Set the initial size of the dynamic space (in MB).

--control-stack-size
    Set the control stack size (in KB).

--no-rc
    Do not load the user's .sbclrc file.

--load
    Load the specified Lisp file after startup.

--eval
    Evaluate the specified Lisp expression after startup.

--batch
    Run in batch mode (non-interactive).

DESCRIPTION

SBCL (Steel Bank Common Lisp) is a free, open-source, high-performance Common Lisp compiler. It is known for its speed, efficiency, and ANSI compliance. SBCL compiles Common Lisp source code to native machine code, resulting in very fast execution speeds. It supports a wide range of Common Lisp features and extensions, making it a powerful tool for developing sophisticated applications.

SBCL features a sophisticated garbage collector, incremental compilation, and a rich set of debugging tools. It is actively maintained and widely used in both academic and industrial settings. SBCL is available for various platforms, including Linux, macOS, and Windows.

CAVEATS

SBCL can consume significant memory, especially when dealing with large data structures or complex computations. Understanding Lisp's memory management is important for optimizing performance. Some platforms may require specific configuration for optimal performance.

<B>STARTUP FILES</B>

SBCL loads initialization files in the following order:
1. site-init.lsp
2. .sbclrc (if --no-rc is not specified)

HISTORY

SBCL's development began as a fork of CMUCL (Carnegie Mellon University Common Lisp) in the early 2000s. It focused on improving portability, performance, and maintainability. Over the years, SBCL has become one of the most popular and respected Common Lisp implementations. It continues to be actively developed with contributions from a global community of developers. Its robust compiler and memory management have made it a popular choice for demanding applications.

SEE ALSO

clisp(1), ecl(1)

Copied to clipboard