sbcl

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 something, that provides good (as in quality) resources/tutorials, for Lisp users, possib...

SBCL initialization file

Hi! 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 asdf-install, that is why I'm mucking around with the initialization file. Thanks for your time. ...

sbcl runs forever on second call of function

The function: Given a list lst return all permutations of the list's contents of exactly length k, which defaults to length of list if not provided. (defun permute (lst &optional (k (length lst))) (if (= k 1) (mapcar #'list lst) (loop for item in lst nconcing (mapcar (lambda (x) (cons item x)) (permute (remov...

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 literal equivalent of piping). I've tried using a number of combinations of the :INPUT, :OUTPUT and :WAIT keyword arguments, but nothing I've...

nohup SBCL ubuntu couldn't read from standard input

On Ubuntu I compiled sbcl 1.0.35 with threading. I can happily use sbcl from the command line and my hunchentoot website works with threading but when I logout it's gone. When I attempt to nohup sbcl nohup ./src/runtime/sbcl --core output/sbcl.core I get (SB-IMPL::SIMPLE-STREAM-PERROR "couldn't read from ~S" # 9) I've attempted va...

Create a polynomial object from a number using change-class

I have written a polynomial class along the lines described in SICP 2.5.3 (except using defclass). I would like to be able to seamlessly add and multiply polynomials and regular numbers but I can't make change-class accept a number. I tried to simplify the problem by changing class from an integer to a float: (change-class 4 'float) ...

How do I disable warnings in lisp (sbcl)

How do I disable all warnings in sbcl? The extra output is rather annoying. ...

How do I reuse a previously-opened port, using SBCL's sockets?

Creating a server-side socket will fail if I'm trying to use the same port I've used before. An address-in-use error occurs. (make-instance 'sb-bsd-sockets:inet-socket :type :stream :protocol :tcp) How do I stop this from happening? Hints and code snippets very welcome! (CL newbie here.) Thanks! ...

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 files and run them. Lisp I'm starting to learn lisp and have decided (from reviews) th...

"GNU Make not found. Try setting the environment variable GNUMAKE."

I am trying to install Steel Bank Common Lisp as described in this article. However, when I do this step: sh-3.2# INSTALL_ROOT=/usr/local sh install.sh I get this error: GNU Make not found. Try setting the environment variable GNUMAKE. How, exactly, do I install GNU Make and set the environment variable GNUMAKE on Mac OS X? ...

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 turn it off temporarily when I'm playing around. ...

auto indentation on common lisp emacs + slime + sbcl in windows

Hello, all! I can't use auto indentation function on emacs + slime + sbcl when I define my function and so on. My .emacs file configuration is this: (setq inferior-lisp-program "D:/emacs/sbcl_1.0.37/sbcl.exe" lisp-indent-function 'common-lisp-indent-function slime-complete-symbol-function 'slime-fuzzy-complete-symbol ...

Error starting sbcl under slime on Vista

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 ...

Why does format happen after read in this example from Paul Graham Book

Possible Duplicate: Lisp format and force-output I'm reading Paul Grahams book ANSI common lisp and on page 19 (haven't gotten far yet) there is an example that I tried in sbcl. (defun askem (string) (format t "~A" string) (read)) When I run it in REPL, I have to input something before the prompt is printed. If I save ...

Function Erroneously Returning Nil

I'm trying to learn Lisp now, as a supplement to my CS1 course because the class was moving too slow for me. I picked up "Practical Common Lisp," which so far has turned out to be a great book, but I'm having some trouble getting some examples to work. For instance, if I load the following file into the REPL: ;;;; Created on 2010-09-01 ...

Is there a simple method for writing traces from multiple sbcl threads to standard output through MCLIDE/swank?

Using SBCL, I'm writing a small server and I would like to trace the server thread, but when I use mclide/swank, I do not see any output from the server thread. ? (require 'sb-posix) NIL ? (sb-thread:make-thread (lambda () (format t "hi from the thread"))) ? When I try the same thing from sbcl directly, I see what I expect: (requi...

How big is a class in memory?

How do I figure out how many bytes a defclass object has in Common Lisp? ...

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, etc. Or if that's not in the Common Lisp standard, is there some extension in SBCL (the im...

Common Lisp: deleting unreachable code.

This is an easy one. (let ((x)) (if (typep x 'null) "a" "b")) generate a warning about unreachable code deletion. Presumably the compiler was smart enough to figure that it is only executed once and the type will always be null. I wouldn't normally write that code, but in this case I just don't want the code deletion notice in my outp...

Common Lisp Error Not Understood

I'm trying to write a number guessing game in Lisp as a time-killing project. However, when I try to load up the program using SBCL, I get the following error: debugger invoked on a SB-C::INPUT-ERROR-IN-COMPILE-FILE in thread #<THREAD "initial thread" RUNNING ...