171 lines
11 KiB
HTML
171 lines
11 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<title>CLiki: SBCL</title>
|
||
|
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
|
||
|
href="https://www.cliki.net/site/feed/article.atom?title=SBCL">
|
||
|
<link rel="stylesheet" href="static/css/style.css">
|
||
|
<link rel="stylesheet" href="static/css/colorize.css">
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<span class="hidden">CLiki - SBCL</span>
|
||
|
<div id="content"><div id="content-area"><div id="article-title">SBCL</div><div id="article">Steel Bank Common Lisp is an open source / free software <a href="Common Lisp implementation.html" class="category">Common Lisp implementation</a>. It provides an integrated native compiler,
|
||
|
interpreter, and debugger.<p>SBCL is a fork off of the main branch of <a href="CMUCL.html" class="category">CMUCL</a>. SBCL is
|
||
|
distinguished from CMUCL by a greater emphasis on maintainability.
|
||
|
In particular, the SBCL system can be built directly from its
|
||
|
source code, so that the output corresponds to the source code in
|
||
|
a controlled, verifiable way, and arbitrary changes can be made to
|
||
|
the system without causing bootstrapping problems. SBCL also
|
||
|
places less emphasis than CMU CL does on new non-<a href="ANSI.html" class="internal">ANSI</a>
|
||
|
extensions, or on backward compatibility with old non-ANSI
|
||
|
features.<p>More information at the project page at <a href="http://sbcl.sourceforge.net/">http://sbcl.sourceforge.net/</a>,
|
||
|
and on the <a href="SBCL Internals.html" class="internal">SBCL Internals</a> CLiki<p><a href="Common-Lisp-Controller.html" class="internal">Common-Lisp-Controller</a>-compatible SBCL Debian (.deb) packages are
|
||
|
part of Debian GNU/Linux 3.0/Woody and Debian GNU/Linux 3.1/Sarge for Alpha, x86, PPC, and SPARC. Later releases
|
||
|
will include more architectures.<p><h3>Local pages</h3><p><ul>
|
||
|
<li>
|
||
|
<a href="boinkmarks.html" class="internal">boinkmarks</a> -
|
||
|
<a href="Benchmark.html" class="category">Benchmark</a>s of the current & of old versions of <a href="SBCL.html" class="category">SBCL</a>, as related in <a href="https://boinkor.net/2020/02/somewhere-between-8-and-11-years-without-boinkmarks/">Somewhere between 8 and 11 years without boinkmarks</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="CAPTURED-STREAM.html" class="internal">CAPTURED-STREAM</a> -
|
||
|
captured-stream is a small Common Lisp library for viewing <a href="stream.html" class="category">stream</a>s as sequences
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="cl-competitive.html" class="internal">cl-competitive</a> -
|
||
|
A code collection maintained mainly for competitive programming, and partly for just understanding <a href="algorithm.html" class="category">algorithm</a>s
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="cl-textmagic.html" class="internal">cl-textmagic</a> -
|
||
|
CL-TEXTMAGIC is a Common Lisp interface to the TextMagic
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="CLORB.html" class="internal">CLORB</a> -
|
||
|
<a href="CLORB.html" class="internal">CLORB</a> is a <a href="CORBA.html" class="category">CORBA</a> ORB that implements the <a href="https://www.omg.org/spec/LISP/">OMG Lisp Language Mapping</a> for CORBA
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="CloserLookAtCharacters.html" class="internal">CloserLookAtCharacters</a> -
|
||
|
Characters are not their codes -- Encodings and external format in Common Lisp
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="CMUCL Hints.html" class="internal">CMUCL Hints</a> -
|
||
|
A collection of miscellaneous hints and tips for <a href="CMUCL.html" class="category">CMUCL</a> users - some also apply to the <a href="CMUCL.html" class="category">CMUCL</a> spin-off, <a href="SBCL.html" class="category">SBCL</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="lep.html" class="internal">lep</a> -
|
||
|
Provides a LEP server for <a href="SBCL.html" class="category">SBCL</a> as well as command line clients eval and listener
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="lisp-network-server.html" class="internal">lisp-network-server</a> -
|
||
|
<a href="http://www.thangorodrim.de/software/lisp-network-server/index.html">lisp-network-server</a> is a simple framework for writing Common Lisp <a href="networking.html" class="category">networking</a> applications
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="quickapp.html" class="internal">quickapp</a> -
|
||
|
A project for generating template projects that use <a href="SBCL.html" class="category">SBCL</a> and <a href="buildapp.html" class="category">buildapp</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="ROTATE-BYTE.html" class="internal">ROTATE-BYTE</a> -
|
||
|
Function ROTATE-BYTE
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="sb-heapdump.html" class="internal">sb-heapdump</a> -
|
||
|
sb-heapdump is a library for <a href="SBCL.html" class="category">SBCL</a> which writes graphs of Lisp objects to
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="sb-sequence.html" class="internal">sb-sequence</a> -
|
||
|
An <a href="SBCL.html" class="category">SBCL</a> implementation of the protocol for user defined sequences
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="sb-texinfo.html" class="internal">sb-texinfo</a> -
|
||
|
<a href="https://nikodemus.github.io/sb-texinfo//">sb-texinfo</a> was originally written for processing the <a href="SBCL.html" class="category">SBCL</a> docstrings by Rudi Sclatte in 2004, and has been maintained as part of SBCL since then
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="SB-X86-PORTIO.html" class="internal">SB-X86-PORTIO</a> -
|
||
|
SB-X86-PORTIO is a module for doing raw port I/O on <a href="SBCL.html" class="category">SBCL</a>/x86/x86-64
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="SBCL Internals.html" class="internal">SBCL Internals</a> -
|
||
|
<a href="SBCL Internals.html" class="internal">SBCL Internals</a> was another <a href="CLiki.html" class="category">CLiki</a> installation for <a href="SBCL.html" class="category">SBCL</a> hackers to document bits of the internals of said CL implementation
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="Steeldump.html" class="internal">Steeldump</a> -
|
||
|
<a href="https://common-lisp.net/project/steeldump/">Steeldump</a> is an unofficial <a href="https://en.wikipedia.org/wiki/APT_%28software%29">APT</a> repository for applications written in Common Lisp, providing binary packages based on <a href="SBCL.html" class="category">SBCL</a>
|
||
|
</li>
|
||
|
</ul><p><h3>Building 0.8.4 on SPARC</h3><p>The Sun's assembler doesn't like the GNU syntax used in the SBCL assembler sources, so something like the following is required:<p><pre>$ ln -s `which gcc` ~/bin/gcc
|
||
|
$ ln -s `which gas` ~/bin/as
|
||
|
$ export COMPILER_PATH=~/bin</pre><p>Also, when building from CMUCL you need to add the following stanza to src/cold/ansify.lisp:<p><pre>#+(and cmu sparc)
|
||
|
(ext:set-floating-point-modes :traps '(:overflow :invalid :divide-by-zero))</pre><p><h3>SBCL Advocacy Haiku</h3><p><pre>(unless (equalp
|
||
|
(lisp-implementation-type)
|
||
|
"SBCL") (quit))</pre><p><pre>#-sbcl(quit)</pre><p><h3>Scripts</h3>
|
||
|
As of SBCL 1.0.22, shebang-scripts are supported via the --script option (add #!/usr/bin/sbcl --script as the first line). However, --script option changes the way initialization is performed (no sysinit (/etc/sbclrc) and no userinit (~/.sbclrc)).<p>Older versions of SBCL don't tolerate shebang lines (CLISP does). To create an SBCL script,
|
||
|
<a href="http://www.sbcl.org/manual/Shebang-Scripts.html">manual/Shebang-Scripts.html</a>
|
||
|
suggests using an external trampoline or init hair. That's silly.
|
||
|
An executable file without a shebang line defaults to sh. So an SBCL script is simply
|
||
|
<pre>$ cat foo
|
||
|
#|
|
||
|
exec sbcl --noinform --load $0 --end-toplevel-options "$@"
|
||
|
|#
|
||
|
(format t "hi~%")
|
||
|
(quit)
|
||
|
$ chmod a+x foo
|
||
|
$ ./foo
|
||
|
hi
|
||
|
$ </pre>
|
||
|
To compile, simply
|
||
|
<pre>#|
|
||
|
fasl=`dirname $0`/`basename $0 .lisp`.fasl
|
||
|
[ $fasl -ot $0 ] && sbcl --noinform --eval "(compile-file \"$0\")" --eval "(quit)" > /dev/null
|
||
|
exec sbcl --noinform --load $fasl --end-toplevel-options "$@"
|
||
|
|#</pre><p><p><h3>Installing SBCL from source not in /usr/local</h3><p>Unpack the source tarball. <p>Set INSTALL_ROOT to where you want it to go.<p><pre>
|
||
|
export INSTALL_ROOT=$HOME
|
||
|
</pre><p>Now use this hack so it will look for the core file in the right place<p><pre>
|
||
|
export CC="cc '-DSBCL_HOME=\"$INSTALL_ROOT/lib/sbcl/\"'"
|
||
|
sh make.sh
|
||
|
sh install.sh
|
||
|
</pre><p>
|
||
|
<h3>Using Common Lisp Controller with a self installed SBCL</h3><p>Put this in your .sbclrc<p><pre>
|
||
|
|
||
|
(require 'sb-bsd-sockets) ; needed now because it does not gel well with the path munging by the common-lisp-controller
|
||
|
|
||
|
(load "/usr/share/common-lisp/source/common-lisp-controller/common-lisp-controller.lisp")
|
||
|
(common-lisp-controller:init-common-lisp-controller-v4 "sbcl")
|
||
|
</pre><p><h3>Adding GNU Readline support</h3>
|
||
|
Evgeniy Zhemchugov has written a GNU readline loader to get uparrow history and tab completion like in CLISP. Download or clone and load it from your ~/.sbclrc<p>http://jini-zh.org/sbcl-readline/sbcl-readline.html</div></div>
|
||
|
<div id="footer" class="buttonbar"><ul><li><a href="SBCL.html">Current version</a></li>
|
||
|
<li><a href="https://www.cliki.net/site/history?article=SBCL">History</a></li>
|
||
|
<li><a href="https://www.cliki.net/site/backlinks?article=SBCL">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=SBCL&from-revision=3693764308">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
|
||
|
</div>
|
||
|
<div id="header-buttons" class="buttonbar">
|
||
|
<ul>
|
||
|
<li><a href="https://www.cliki.net/">Home</a></li>
|
||
|
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
|
||
|
<li><a href="CLiki.html">About</a></li>
|
||
|
<li><a href="Text Formatting.html">Text Formatting</a></li>
|
||
|
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
|
||
|
</ul>
|
||
|
<div id="search">
|
||
|
<form action="https://www.cliki.net/site/search">
|
||
|
<label for="search_query" class="hidden">Search CLiki</label>
|
||
|
<input type="text" name="query" id="search_query" value="" />
|
||
|
<input type="submit" value="search" />
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="pageheader">
|
||
|
<div id="header">
|
||
|
<span id="logo">CLiki</span>
|
||
|
<span id="slogan">the common lisp wiki</span>
|
||
|
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
|
||
|
<label for="login_name" class="hidden">Account name</label>
|
||
|
<input type="text" name="name" id="login_name" class="login_input" />
|
||
|
<label for= "login_password" class="hidden">Password</label>
|
||
|
<input type="password" name="password" id="login_password" class="login_input" />
|
||
|
<input type="submit" name="login" value="login" id="login_submit" /><br />
|
||
|
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
|
||
|
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body></html>
|