LinuxCommandLibrary

ecl

TLDR

Start ECL REPL

$ ecl
copy
Load and execute a file
$ ecl -load [file.lisp]
copy
Evaluate expression
$ ecl -eval "[(print \"Hello\")]"
copy
Compile file to binary
$ ecl -compile [file.lisp]
copy
Run script and exit
$ ecl -shell [script.lisp]
copy
Start without initialization
$ ecl -norc
copy

SYNOPSIS

ecl [options] [args]

DESCRIPTION

ECL (Embeddable Common Lisp) is an implementation of Common Lisp designed to be embedded in other applications. It compiles Lisp to C, enabling integration with C libraries and native code generation.
ECL supports the full ANSI Common Lisp standard with extensions for threading, FFI (Foreign Function Interface), and embedding. It can produce standalone executables and shared libraries.

PARAMETERS

-load file

Load Lisp file.
-eval expr
Evaluate expression.
-compile file
Compile file.
-shell script
Run as script, then exit.
-norc
Don't load init file.
-dir directory
Add directory to load path.
-q, -quiet
Suppress startup messages.
--help
Display help.

REPL COMMANDS

$ (quit)           ; Exit ECL
(load "file")    ; Load Lisp file
(compile-file)   ; Compile to object
(require :asdf)  ; Load ASDF
copy

CAVEATS

Compiling to C adds complexity. Some libraries may need adaptation for ECL. Debugging compiled code is harder than interpreted. Threading behavior may differ from other implementations.

HISTORY

ECL was originally developed at IRCAM (Paris) in the 1980s as KCL (Kyoto Common Lisp). It was forked and developed as ECL by Giuseppe Attardi and later maintained by the community. The focus on embeddability distinguishes it from other Common Lisp implementations.

SEE ALSO

sbcl(1), clisp(1), ccl(1), lisp(1)

Copied to clipboard