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
43
votes
4 answers

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?
Shenal Silva
  • 1,955
  • 5
  • 26
  • 37
34
votes
4 answers

How can I simply "run" lisp files

Python When I learned Python I installed it on windows with a nice gui installer and all .py files would automatically run in python, from the command line or explorer. I found this very intuitive and easy, because I could instantly make plain text…
AnnanFay
  • 9,573
  • 15
  • 63
  • 86
29
votes
2 answers

Reset state in Common Lisp

Newbie Common Lisp question here. Is there a way to reset the state of the environment? What I mean, is there some command that brings the REPL back to the same state it was right after it started up, that is, uninterning all variables, functions,…
Tamas Czinege
  • 118,853
  • 40
  • 150
  • 176
27
votes
3 answers

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 have gathered from the links I have read a bit…
lord.garbage
  • 5,884
  • 5
  • 36
  • 55
25
votes
6 answers

(Emacs) Text is read only?

So I was working in emacs and the 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?
Fderal
  • 457
  • 1
  • 6
  • 11
24
votes
2 answers

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 will need the runtime. So there are two ways to…
David James
  • 635
  • 6
  • 16
24
votes
6 answers

How to convert byte array to string in Common Lisp?

I'm calling a funny API that returns a byte array, but I want a text stream. Is there an easy way to get a text stream from a byte array? For now I just threw together: (defun bytearray-to-string (bytes) (let ((str (make-string (length…
Ken
  • 561
  • 2
  • 5
  • 8
21
votes
8 answers

How do I disable warnings in lisp (sbcl)

How do I disable all warnings in sbcl? The extra output is rather annoying.
Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406
20
votes
1 answer

A simple example of using the stepper in SBCL

Going through the computation with the LispWorks stepper is rather intuitive, but I cant figure it out in SBCL. Can somebody please give me a step-by-step example of how to use the SBCL stepper in the REPL on some simple function? Thanks.
muuh-gnu
  • 415
  • 4
  • 8
20
votes
2 answers

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 setting break points, adding watches, and do…
Jian Xu
  • 328
  • 2
  • 6
20
votes
2 answers

why defun is not the same as (setq )?

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 will not be treated by interpreter as function in…
Filipp
  • 859
  • 1
  • 6
  • 20
17
votes
3 answers

(Random) in Common Lisp Not So Random?

Okay, final question and I'll have finished my number guessing game in Common Lisp! :D Whenever the game starts (or a new game begins after the first game), the following function is called. ;;; Play the game (defun play () ;; If it's their…
Andy
  • 3,132
  • 4
  • 36
  • 68
17
votes
2 answers

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 or Python's REPL). Is there a way to enable this…
cwallenpoole
  • 79,954
  • 26
  • 128
  • 166
17
votes
4 answers

SBCL standard library documentation?

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, so that I don't re-implement things? After…
culebrón
  • 34,265
  • 20
  • 72
  • 110
16
votes
2 answers

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 about the --script option and it works flawlessly…
hijarian
  • 2,159
  • 1
  • 28
  • 34
1
2 3
56 57