Questions tagged [sbcl]

Steel Bank Common Lisp: an open-source compiler and runtime implementation of ANSI Common Lisp.

SBCL is an open-source implementation of ANSI Common Lisp (1994), the Common Lisp standard. It runs on Linux, FreeBSD and variants, MAC OS X, and recently on Windows (x64 support in progress). It features unicode support, native interface to C libraries (UFFI), threading (Windows support not official yet), and a native compiler.

849 questions
16
votes
4 answers

Squeeze more speed from Common Lisp / SBCL

This paper claims to make a certain Lisp program run faster than its C equivalent. Trying to reproduce the results, I was able to get close (Lisp is 50% slower than C) but wanted to know if anyone knows ways to squeeze more perf out of SBCL…
Reb.Cabin
  • 5,426
  • 3
  • 35
  • 64
15
votes
5 answers

How to change SBCL's current directory?

It is very easy to change CLisp's current working directory: >cat ~/.clisprc.lisp ;;; The following lines added by ql:add-to-init-file: #-quicklisp (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))) (when…
z_axis
  • 8,272
  • 7
  • 41
  • 61
15
votes
7 answers

Lisp Community - Quality tutorials/resources

As many other people interested in learning Lisp, I feel the resources available are not the best for beginners and eventually prevent many new people from learning it. Do you feel it could be created some sort of community, with a website, forum or…
Rui Costa
  • 167
  • 4
15
votes
4 answers

Running a Common Lisp function from a Terminal command prompt

I'm having some difficulty finding an answer to this, so maybe it isn't possible. I'd like the flexibility of being able to load/compile a lisp file from a command line, i.e. not inside emacs, and then also run one of the lisp functions in that file…
johnbakers
  • 24,158
  • 24
  • 130
  • 258
14
votes
1 answer

Common Lisp: Hunchentoot and the REPL - When I start the server I get log output in the REPL and can't use the REPL any more

Like a few of the askers on here, I'm new to Lisp. I'm going through the Practical Common Lisp book, but took a sidestep to see how easy it would be to set up a web app, so I've been following this tutorial, as well as the updated version here. When…
mkornblum
  • 534
  • 5
  • 18
13
votes
4 answers

Coping with, and minimizing, memory usage in Common Lisp (SBCL)

I have a VPS with not very much memory (256Mb) which I am trying to use for Common Lisp development with SBCL+Hunchentoot to write some simple web-apps. A large amount of memory appears to be getting used without doing anything particularly…
David Gardner
  • 6,952
  • 4
  • 35
  • 37
13
votes
2 answers

How to properly save Common Lisp image using SBCL?

If I want to create a Lisp-image of my program, how do I do it properly? Are there any prerequisites? And doesn't it play nicely with QUICKLISP? Right now, if I start SBCL (with just QUICKLISP pre-loaded) and save the image: (save-lisp-and-die…
mobiuseng
  • 2,326
  • 1
  • 16
  • 30
13
votes
2 answers

how to turn off the debugger in sbcl

I'm trying to learn common lisp currently and I've been using sbcl (I hope that's a decent implementation choice.) Coming from ruby and irb I find the automatic moved to a debugger on every mistake a little annoying at this time. Is there a way to…
nkassis
  • 5,285
  • 2
  • 21
  • 22
13
votes
2 answers

Confused about ``ql:quickload`` and executable scripts in SBCL

I've been trying to use Quicklisp packages in an executable script of mine. A (trivial) working example is: #!/usr/bin/sbcl --script (eval-when (:compile-toplevel :load-toplevel :execute) (ql:quickload "lisp-unit")) ;as explained by another…
Koz Ross
  • 3,040
  • 2
  • 24
  • 44
13
votes
2 answers

Understanding the SBCL entry/exit assembly boiler plate code

BACKGROUND When using 64bit Steel Bank Common Lisp on Windows for a trivial identity function: (defun a (x) (declare (fixnum x)) (declare (optimize (speed 3) (safety 0))) (the fixnum x)) I find the disassembly is given as: * (disassemble…
Peter de Rivaz
  • 33,126
  • 4
  • 46
  • 75
13
votes
1 answer

How to use packages installed by quicklisp?

I've installed the CL-PNG package using quicklisp. (ql:quicklisp 'png) Now I want to define my own package which depends on the CL-PNG package. Like so: (defpackage :FOO (:use :CL :PNG) (:export :BAR)) When compiling it I get this error: The…
Jan Deinhard
  • 19,645
  • 24
  • 81
  • 137
12
votes
2 answers

How to Configure SBCL to Use More RAM When Started Through Emacs?

How can I configure SBCL so that it uses more memory than the default when I start it by using "M-x slime" in Emacs? From what I've seen online, the answer appears to be to call SBCL, passing the argument "--dynamic-space-size ". Since…
sadakatsu
  • 1,255
  • 18
  • 36
12
votes
2 answers

How can I determine the operating system and hostname using common lisp?

To get my .sbclrc file working on the two computers I use, I'd like a way to get the hostname and/or operating system from within sbcl. I know I could set and then look for an environment variable, but is there a more direct approach? Update I…
Dan Becker
  • 1,196
  • 10
  • 18
12
votes
5 answers

Why doesn't a LISP defun require a quote before its parameter argument?

Take this function: (defun sum-greater (x y z) (> (+ x y) z)) It's my understanding that in LISP the first element in a list always represents a function to be performed on the subsequent atoms/lists. So why doesn't LISP treat the x in (x y z) as…
Peter Le Bek
  • 982
  • 8
  • 16
12
votes
1 answer

How to change class's metaclass

This happens to me time and again: I define the class and forget that I wanted it funcallable or it is, say, Gtk widget class, thus it's metaclass needs to be stated. Once it is defined, however, SBCL doesn't let me change me the metaclass (even if…
mobiuseng
  • 2,326
  • 1
  • 16
  • 30
1
2
3
56 57