918 questions
47
votes
4
answers
35k
views
Compiling Common Lisp to an executable
I recently started learning Common Lisp using SBCL. How can I compile my Lisp programs into a Windows binary?
30
votes
3
answers
24k
views
What are the main differences between CLISP, ECL, and SBCL?
I want to do some simulations with ACT-R and I will need a Common Lisp implementation. I have three Common Lisp implementations available: (1) CLISP [1], (2) ECL [1], and (3) SBCL [1]. As you might ...
28
votes
7
answers
12k
views
Text is read only?
I was working in Emacs and then suddenly, the slime-repl sbcl says text is read only. Well that's great because now I can't type anything into it. How do I fix this?
25
votes
2
answers
11k
views
How can I run SBCL code under a Unix-like operating system in a convenient way?
(David James both wrote the question and an answer. I'll edit it to conform to Stackoverflow standards.)
Using SBCL you can compile Lisp code to machine code.
Like Java, .net, C++ and even C you ...
22
votes
2
answers
6k
views
What are efficient ways to debug Common Lisp in Emacs and SLIME?
I'm wondering what are some efficient ways to debug Common Lisp interactively using Emacs and SLIME.
What I did before: As someone who learned C and Python using IDEs (VS and PyCharm), I am used to ...
20
votes
2
answers
2k
views
why defun is not the same as (setq <name> <lambda>)?
I'm confused about how defun macro works, because
(defun x () "hello")
will create function x, but symbol x still will be unbound.
If I'll bind some lambda to x then x will have a value, but it ...
19
votes
2
answers
4k
views
SBCL REPL use up arrow keys to show history
I have installed SBCL onto OSX through Macports.
When inside the REPL, it would be very convenient to be able to use ↑ and ↓ to iterate through the previous commands (similar to the behavior in bash ...
18
votes
4
answers
5k
views
SBCL standard library documentation? [closed]
I want to learn and use SBCL because of its ease of learning and speed. (I've been playing with Lisp 3 years ago, and now am refreshing it.) But how can I learn what's included in the standard library,...
16
votes
7
answers
2k
views
Lisp Community - Quality tutorials/resources [closed]
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 ...
16
votes
2
answers
4k
views
How to use quicklisp when CL program is invoked as a shell script?
I am currently have a small program in Common Lisp, which I want to run as a shell script. I am using the SBCL and perfectly fine with this so will prefer to stay on this platform. :)
I am aware ...
15
votes
2
answers
4k
views
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 ...
14
votes
4
answers
5k
views
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 ...
13
votes
2
answers
6k
views
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 ...
13
votes
1
answer
3k
views
SBCL initialization file
I would like to know where I should save my .sbclrc file. I tried saving it in my .sbcl folder, but it doesn't seem to be working. I'm using Windows XP with Emacs version 23.
I'm trying to set up ...
13
votes
2
answers
2k
views
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 ...
12
votes
5
answers
1k
views
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/...
12
votes
1
answer
1k
views
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 ...
11
votes
2
answers
1k
views
Evolving a lisp image
I love the idea of image-based languages, and lately I've been toying with Common Lisp via sbcl. I've read in a few places about how through being able to save and load back an image of the virtual ...
11
votes
3
answers
5k
views
Setting up SLIME on MacOSX
I've been dancing around LISP for decades, but now have decided to get serious. I'm going through the online version of Practical Common LISP.
This is my setup:
MacOSX 10.7.8
Xcode 4.5.2
SBCL 1.0.55....
10
votes
2
answers
1k
views
operator #+ and #- in .sbclrc
Anybody know what #+ and #- operators means in .sbclrc? I couldn't find it in the manual.
I see #- in .sbclrc after I installed quicklisp:
#-quicklisp
(let ((quicklisp-init (merge-pathnames "...
10
votes
2
answers
836
views
In Common Lisp why does the macro OR use a gensym, but not AND?
In Common Lisp (SBCL 1.0.58) why does the macro OR use a gensym, but not AND?
For example,
CL-USER> (macroexpand '(and 1 2 3 4 5))
(IF 1
(AND 2 3 4 5)
NIL)
T
CL-...
10
votes
5
answers
3k
views
Reading a character without requiring the Enter button pressed
read-line and read-char both require you press Enter key after typing something. Is there any mechanism in Common Lisp that would allow the program to continue upon the press of any single character ...
10
votes
2
answers
1k
views
SBCL: asdf:load-system fails when a string constant is defined
Using SBCL, I have the problem that my system defined via ASDF does not load, when the lisp code defines a string constant.
Here's the code:
constants.lisp
(defconstant A 1.0)
(defconstant B "B")
...
10
votes
4
answers
4k
views
How to process input and output streams in Steel Bank Common Lisp?
I'm trying to figure out how to use the output stream of one program I start with RUN-PROGRAM so it can be used as the input of another program started with RUN-PROGRAM (i.e., the moral and perhaps ...
10
votes
4
answers
6k
views
Getting started with SLIME and SWANK: Lisp connection closed unexpectedly: connection broken by remote peer
I was trying to use the slime-connect function to get access to a remote server with sbcl. I followed all the steps from the slime.mov movie from Marco Baringer, but I got stuck when creating the ssh ...