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
0
votes
1 answer

Why are the number of bytes consed reported by TIME differing for different calls?

Using SBCL 1.4.12, I am looking at Exercise 17.9 from Stuart Shapiro's Common Lisp: An Interactive Approach, and timing a reverse function applied to a list of 10,000 elements. When I time this function using the same list, the time function reports…
ad absurdum
  • 19,498
  • 5
  • 37
  • 60
0
votes
0 answers

How to invoke restart on condition from Sly/REPL?

Once after I made some error condition, I get a prompt looks like: [1] CL-USER> It seems like, the number in square bracket indicates number of restart conditions of current REPL. But, IDK how can I (re-)invoke the restart from REPL. (I'm using…
0
votes
1 answer

GNU Emacs Calculator with SBCL

I've been reading the GNU Emacs Calculator manual in search of directions for how to programmatically call the existing functions in a lisp program. I've examined the section called 'Programming', but it seems to be more related to extending the…
myselfesteem
  • 733
  • 1
  • 6
  • 23
0
votes
3 answers

Not sure why let function isn't properly returning the value in sbcl lisp

So I have written a function to sort a list of Unordered pairs by their 'value' (the second part of the pair). Here is my attempt at a recursive function (I know it has a rudimentary design): *Edit function design: the function works by: Taking a…
EliSquared
  • 1,409
  • 5
  • 20
  • 44
0
votes
1 answer

CLSQL timestamp Column Type

I'm using CLSQL with MySQL. What combination of keywords do I have to pass to create-table in order to give it a column with the timestamp column type? (create-table [foo] `(([bar] timestamp))) is unrecognized (it just creates a varchar 255 column,…
Inaimathi
  • 13,853
  • 9
  • 49
  • 93
0
votes
1 answer

SBCL error: "No debug variables for current frame: using EVAL instead of EVAL-IN-FRAME."

I am new to Lisp, using SBCL 1.2.11 from the terminal. Could any one help me figure out where I should start looking to get rid of the above error? I think it is causing me the following error: (setf x (list 'a 'b 'c)) ; No debug variables for…
aaronson
  • 1
  • 2
0
votes
1 answer

Circular pointers in lisp

In working through the CLRS Intro to Algorithms book and attempting to implement a red-black binary search tree in common lisp, I came across the following issue with circular pointers: (defstruct node (ptr nil)) (defparameter *x*…
PeteL
  • 61
  • 4
0
votes
1 answer

Common Lisp: Why does this create circular list: (setf (car ) (append ))?

I am trying to understand why this produces what seems to be circular list. * (progn (setf (car *x*) (append '(3) *x*)) 2) 2 ;; No "apparent issue setting the value. Hence it is related to printing `*x*` *x* ;; infinite loop, perhaps due to the…
Makketronix
  • 1,389
  • 1
  • 11
  • 31
0
votes
1 answer

More than one argument for predicate in delete-if

Suppose I want to delete one step (element) from the states list. (defparameter *states* '((:top nil nil) (:subjects nil nil))) ;predicate (defun equal-state? (step state) (equal (car step) state)) If I use (delete-if #'equal-state? *states*)…
Bilal Qadri
  • 131
  • 11
0
votes
2 answers

sbcl (and clisp): When is a character not a character? (using defconstant)

This question is about sbcl -- or so I thought originally. The question: When is a character not a character? Consider the following code: (defconstant +asc-lf+ #\Newline) (defconstant +asc-space+ #\Space) (prin1 (type-of #\Newline ))…
Bill Evans at Mariposa
  • 3,590
  • 1
  • 18
  • 22
0
votes
0 answers

sbcl: end-of-line format specification

In clisp, I can do something like this: (with-open-file (fred "fred-unix" :direction :output :if-exists :supersede :external-format :unix) (format fred "lf only~%")) (with-open-file (fred…
Bill Evans at Mariposa
  • 3,590
  • 1
  • 18
  • 22
0
votes
1 answer

Undefined variable in function declaration while it is clearly defined

I'm working on a function that will let you measure the run-time of a passed function run-n-time. It's not close to finished, because while writing the code, I came across a strange error. Note that I'm quite new to common lisp. Inputting this into…
Azeirah
  • 6,176
  • 6
  • 25
  • 44
0
votes
1 answer

Debugging live stack frames in Common Lisp ( SBCL) .How does the debugger/compiler implement this capability?

Lisp allows one to recompile segments of code during debugging producing live stack frames. I know that lisp is dynamic and that it's easy to rebind a symbol associated to a method. However Lisp also easily allows to redefine single forms inside a…
0
votes
2 answers

Lisp - Type Error in Do Form When Reading from File

[SBCL] I'm trying to read char-by-char from a text file that looks like this: :table E E E E E E C C C E E E E E E My code (some omitted for clarity): (defun read-txt (path) (with-open-file str path :direction :input …
plishplop
  • 11
  • 4
0
votes
1 answer

SBCL statistical profiler warns of undefined function

SBCL 1.3.9 produces the following error when I attempt to run the statistical profiler. Is start-profiling not exported? * (in-package :cl-user) * (require :sb-sprof) * (sb-sprof:with-profiling (:report :flat) (bnb::solve)) ; in:…
davypough
  • 1,847
  • 11
  • 21