problem about sbcl-Collection of common programming errors


  • Rainer Joswig
    lisp common-lisp sbcl
    (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 compile Common Lisp code.First is to make huge binaries which is explained in SBCL documentation. No SBCL needed on target machine.The other way is a more flexible one, which is to create machine code in a fasl (FASt Load) format. The SBCL runtime is needed o

  • Pillsy

  • Joshua Taylor
    common-lisp sbcl
    When I run the following code: (defun countdown (n)(if (>= n 0)(cons n (countdown (- n 1)))))(countdown 100000)I get the following message : INFO: Control stack guard page unprotected Control stack guard page temporarily disabled: proceed with cautiondebugger invoked on a SB-KERNEL::CONTROL-STACK-EXHAUSTED in thread #<THREAD “main thread” RUNNING {1002B03653}>:Control stack exhausted (no more space for function call frames). This is probably due to heavily nested or infinitely recursive

  • Red Lv
    lisp sbcl
    How to install sbcl in os linux for a freshman of lisp.I found just use the command sh install.sh the error info is: src/runtime/sbcl not found, aborting installation

  • Svante
    lisp common-lisp cross-compiling sbcl
    I have SBCL running on a Ubuntu machine. I want to write a little program that I want to give to a friend who has only Windows running. What is the quickest way to cross-compile it on my machine into a “standalone” windows program (i.e. the usual runtime+core combination)?

  • Filippo
    pointers lisp sbcl let cffi
    I’ve build some toy C++ library to quickly create a Qt window from Lisp. I know that common-qt exists, I’m just trying to learn how to use cffi.Right now, I have 4 binded functions :create-application : create a QApplication and return a pointer create-window : create a QMainWindow and return a poiner show : show the window specified as argument exec : Qt exec functionHere is a lisp code that work perfectly :(defctype t-app :pointer) (defctype t-window :pointer)(defcfun (create-application “crea

  • Rainer Joswig
    debugging common-lisp sbcl
    I’m using SBCL. When something goes wrong in my program, SBCL will print a long list of back trace informations. This is annoying sometimes, and I have to scroll back and back to find out what the error message was. Can I customize the error outputs(e.g., shorten the back trace list)?

  • lindes
    opengl common-lisp sbcl slime
    I’d like to do some OpenGL programming in Common Lisp, under Emacs and SLIME. I’m not set on it, but I’m currently trying to use SBCL. If I open up emacs from the start, create a new file with just this one line:(ql:quickload :cl-opengl)And then I do M-x slime (and wait for it to load), followed by C-c C-c to compile and run that line, SBCL crashes immediately, every time, prompting a dialog box that says sbcl quit unexpectedly:I’ve saved the output that’s accessible by clicking the “Report…

  • avp
    windows-vista lisp crash sbcl
    I’ve searched a lot for an answer for this question in the web: they say it’s true, SBCL doesn’t work under Vista. But I really need to work with lisp on my home Vista laptop and VM doesn’t help really… And CL is not so interesting because of speed…If you have any recommendation, please share!

  • Sim
    multithreading common-lisp sbcl
    I am currently playing with sb-thread API, provided by SBCL, wondering what happens if an error is thrown inside a started thread and how to ensure that only that process is affected (and dies), and no other process is, as apparently the debugger will be entered even though not the main thread throws an error.* (handler-case (sb-thread:join-thread (sb-thread:make-thread #'(lambda()(error ‘simple-error))))(sb-thread:join-thread-error (err)(sb-thread:thread-error-thread err)(FORMAT t “allemeineent

  • Rainer Joswig
    lisp common-lisp unhandled-exception sbcl
    I am a lisp noob trying to learn lisp using sbcl v1.0.50.I am writing a simple logger and running into a memory fault which I do not understand, but which seems to be related to how I compile my script. I have boiled it down to the following:===logger.lisp===(defparameter *log-stream* (open “/tmp/global-log”:direction :output:if-does-not-exist :create:if-exists :append))===main.lisp===(load “logger.lisp”)(defun main ()(format *log-stream* “Hello world~%”))==compile.lisp==#! /usr/bin/sbcl –scri

  • Rainer Joswig
    common-lisp sbcl
    I am using sbcl 1.0.57.0 and want to start a program via –eval which should generate some output, but in case that there is an uncaught error it shall exit.I figured the easiest way to accomplish that would be by using unwind-protect:(unwind-protect (error ‘simple-error) (progn (FORMAT t “IAMREACHED~%”) (sb-ext:exit)))As (sb-ext:exit) should be executet incase there is an uncaught error.But it doesn’t!* (unwind-protect (error ‘simple-error) (progn (FORMAT t “IAMREACHED~%”) (sb-ext:exit)))debugg

  • Joshua Taylor
    lisp common-lisp sbcl clisp
    I’ve written an ad hoc parser generator that creates code to convert an old and little known 7-bit character set into unicode. The call to the parser generator expands into a bunch of defuns enclosed in a progn, which then get compiled. I only want to expose one of the generated defuns–the top-level one–to the rest of the system; all the others are internal to the parser and only get called from within the dynamic scope of the top-level one. Therefore, the other defuns generated have uninterne

  • z_axis
    lisp common-lisp sbcl
    Suppose we use SBCL’s #’save-lisp-and-die to create an server applicatioon App1, which works very well. Now we want to replace a function #’func1 with a new version without stopping App1. How can we do it in Common Lisp ?Any suggestion is appreciated !

  • wvxvw
    lisp common-lisp packages slime sbcl
    I’m trying to import some functions from SBCL non-standard builtins to use with a socket. When I do this outside slime, with bare interactive shell + SBCL it works, but not in SLIME.What I did:(import ‘sb-bsd-sockets:host-ent-address) (import ‘sb-bsd-sockets:get-host-by-name)or(use-package :sb-bsd-sockets)After doing either one, SLIME greets me with an error, saying that I’m trying to import something already in cl-user package. This is a correctable error, which I proceed to correct by choosing

  • Joshua Taylor
    common-lisp sbcl
    I’m new to Lisp so when I wrote the function in SBCL(defun subst (new old l)(cond ((null l) ‘())((eq old (car l)) (cons new (cdr l)))((cons (car l) (subst new old (cdr l))))))it gives error SYMBOL-PACKAGE-LOCKED-ERROR,a Style-Warning and a Warning, please help to resolve it

  • Giles Roberts
    emacs lisp slime sbcl
    I’m having trouble getting SBCL to start under slime. I’ve messed things up and I don’t know how to recover. This was working fine until I…Had a problem loading a package via asdf. At which point I started debugging the asdf.lisp provided with SBCL to see what was going wrong. The sole change I made was to put a (break) in which I removed once I’d figured out what was wrong. All was fine until the next time I tried to start SBCL. Then I got a swank compilation error saying that the asdf.

  • sudo
    common-lisp sbcl asdf
    I’m trying to install cffi package into sbcl. First, I tried clbuild that is recommended on the cffi installation page. When I tried to run :clbuild quickload cffiI was given an error saying :The function ASDF::SOURCE-REGISTRY is undefined.I then tried asdf-install, it end up complaining about Component “cffi-examples” not foundAny help on this would be appreciated.UPDATEFor asdf-install, I’m running sbcl with slime. It seems that whenever it complains about a component that is missing, that c

  • nrz
    lisp common-lisp sbcl asdf quicklisp
    I’m a Lisp beginner trying to understand how to properly use Lisp package system while learning LTK for GUI programming, using SBCL 1.0.55.0.debian and Limp 0.3.4 (and Debian Wheezy if that matters). I have installed ASDF using aptitude package manager (packages cl-asdf & cl-common-lisp-controller), then I installed Quicklisp using the instructions on Quicklisp website (http://www.quicklisp.org/beta/index.html) (not from Debian repository) and then I have installed LTK with (ql:quickload ‘lt

  • gary
    macros lambda elisp sbcl
    During the first example (the database example) in Practical Common Lisp, the author uses a macro and a couple support functions in order to replace a larger function, named where. The code works fine when where is a function, but the macro setup returns “undefined variable” and “unbound variable” errors. (Note that I commented out the original function, restarted Emacs and recompiled my file once adding the where macro.) The caught style-warning in the REPL is most suspect to me since the macro

  • weidi
    emacs common-lisp slime sbcl
    I want to configure my emacs to work with SLIME and SBCL. The .emacs file looks like this:(add-to-list ‘load-path “D:/app/slime/”) (setq inferior-lisp-program “sbcl”) (require ‘slime) (slime-setup)Now i’m able to start emacs, but if i type M-x slime, there would be an error complaining something like: “function SWANK-BACKEND: fd-stream-input-buffer-empty-p is undefined” so that the connection to swank fails.What problem could that be? ThanksThe version of emacs is 23.3. The version of sbcl is t

  • Joshua Taylor
    common-lisp sbcl suppress-warnings
    I can’t figure out how to do it with sb-ext:muffle-conditions. I want to do something like this: (declaim #+sbcl(sb-ext:muffle-conditions sb-kernel:redefinition-warning))Except I want to muffle the “undefined variable” warning instead of redefinition, of course. If anyone knows what parameter this is or has a link to the documentation/various options for sb-ext:muffle-conditions, please share 🙂 Thanks

  • Robin B
    common-lisp swig sbcl
    Doing a SWIG tutorial, and using the example.c, example.i as they provided there. I generated lisp file with swig -cffi example.i. But when I run test.lisp with SBCL, i get a complaint about undefined alien function, as well as complaints when compiling the example.lisp itself. I’m pretty sure I still have to compile my example.c into a library and then somehow tell SBCL to load it! But the docs are very scant on this, except for this. Can somebody tell me how to do this or is there a better way

  • wrongusername
    lisp common-lisp sbcl
    I am reading “On lisp” and encountered this code (I simplified it a bit).CL-USER> (defun foo () ‘(a b c)) FOO CL-USER> (foo) (A B C) CL-USER> (nconc * ‘(D E)) (A B C D E) CL-USER> (foo) (A B C D E) CL-USER> (

  • Mehrdad
    lambda common-lisp sbcl
    Why is this an error in SBCL? How do you call a lambda passed to your function?* (defun call-foo (foo) (foo)) ; in: DEFUN CALL-FOO ; (SB-INT:NAMED-LAMBDA CALL-FOO ; (FOO) ; (BLOCK CALL-FOO (FOO))) ; ; caught STYLE-WARNING: ; The variable FOO is defined but never used.; in: DEFUN CALL-FOO ; (FOO) ; ; caught STYLE-WARNING: ; undefined function: FOO ; ; compilation unit finished ; Undefined function: ; FOO ; caught 2 STYLE-WARNING conditionsCALL-FOO

  • wvxvw
    common-lisp slime sbcl
    I’ve made a mistake and forgot to specify keyword arguments in defgeneric the first time I’ve compiled it. Now I really don’t want to restart SLIME only to redefine this one defgeneric to include more arguments. Is there a way to “undefine” it somehow?Oh, sorry, never mind, after removing all methods defined for that generic, SBCL redefined it, so it’s all good now:(remove-method #’some-generic (find-method #’some-generic ‘() (list of method types)))For posterity.

  • IsaacS
    common-lisp sbcl clisp
    Loading the following 2 functions on clisp goes successful.(defun func1 (l)(defvar *count* nil)(setq count 1)(cond ((null l) 0)((atom l) (+ count 1))((atom (car l)) (+ count (func1 (cdr l))))((listp (car l)) (+ (func1 (car l)) (func1 (cdr l))))(t nil)) ) (defun func2 (l)(defvar *resLis* nil)(setq resLis ‘((0 0)))(anotherFunc l resLis) )However, sbcl causes error:warning: undefined variable: COUNT warning: undefined variable: RESLIS Compilation failed.I prefer using sbcl (since my slime only

Web site is in building