common-lisp

Cross-compiling with 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)? ...

Automatically create ASDF files for a Common Lisp project

Are there any libraries out there that do this? Playing around with Common Lisp it seems like this would be one of the most useful things to lower barrier of entry for newcomers. ASDF seems mostly designed for deployment, not for rapid prototyping and development. Following threads on comp.lang.lisp it seems like people agree that CL's...

How do I get Ltk to display what the user is writing and what the functions print?

The kind of functions are of the sort of: (defun display-all () "Display all items in the database." (dolist (item database) (format t "~{~a:~10t~a~%~}~%" item))) (defun prompt-read (prompt) (format query-io "~a: " prompt) (force-output query-io) (read-line query-io)) (defun prompt-for-item () (make-database (prompt...

Beginner at Common Lisp: Macro Question For Defining Packages on the Fly

Still struggling to understand what best practices are with respect to macros. I'm attempting to write a macro which defines packages on the fly. (defmacro def-dynamic-package (name) `(defpackage ,(intern (string-upcase name) "KEYWORD") (:use :common-lisp))) This works fine only for expressions such as: (def-dynamic-package "...

"Package LISP-UNIT is not loaded" error in Cusp Eclipse plug-in

I'm getting the following error in Eclipse using the Cusp plug-in: Package LISP-UNIT is not loaded How do I fix it? ...

Function persistence in Common Lisp

Is there any persistence solution for Common Lisp, such as Elephant, that allows function persistence? Currently my app stores an identifier on the db and later searches in a function table which it is, but this method does not allow dynamically created functions to be stored. ...

Project Euler #211 - efficiency issue

I've been slowly working my way through the list of Project Euler problems, and I've come to one that I know how to solve, but it seems like I can't (given the way my solution was written). I am using Common Lisp to do this with and my script has been running for over 24 hours (well over their one minute goal). For the sake of concisen...

"No MAKE-LOAD-FORM" error with OpenMCL Common Lisp

I'm trying to run the ray tracing code form Paul Graham's ANSI Common Lisp on OS X using SLIME with OpenMCL (well, now called CCL). In that code, there's a constant defined whose value is a structure, and when I call either slime-compile-and-load-file or slime-compile-defun on any function that uses the constant, I get an error message: ...

What makes you want to learn Common Lisp? What do you want from it?

I'm working on a toolkit (sort of a live-CD Lisp-in-a-Box) for people new to Common Lisp, and I want to make sure it is broadly satisfying. What is attractive to you about Lisp? What do/did/would you need to get you started and keep you interested? What I have so far: SBCL 10.22, Emacs 22.3, SLIME, and LTK bundled together and config...

Common Lisp's symbol-name in Clojure?

Is there anything in Clojure that is equivalent to Common Lisp's symbol-name function? ...

Getting started with SLIME and SWANK: Lisp connection closed unexpectedly: connection broken by remote peer

Hello people. 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 connection for slime. This is after already starting the swank server on the remote machine. I did it like this: ssh -L 4005...

CGI post handling differences on Hiawatha and Apache

I'm trying to set up a light development environment to allow straight CGI in Common Lisp, and I'd like to use Hiawatha instead of the much larger Apache. I have code that works for both GET and POST in Apache, but only GET in Hiawatha; is there a difference in the way Apache and Hiawatha handle POST? ...

What are some recommended Common Lisp Web Servers options?

So far I've only tried Hunchentoot and heard about AllegroServe, ABCLweb, though I wouldn't know how they compare in performance. I was wondering, what is currently the best option for deploying a Common Lisp web app in a production environment? ...

How can I pad an argument with zeroes using the lisp format function?

I am playing around with lisp's format function, but I have hit a snag because although I can get it to write the list of numbers aligned nicely, I can't seem to get it to zero pad it: (defun inc (a) (+ 1 a)) (dotimes (i 10) (format t "~3@:D ~:*~R~%" (inc i))) This produces the following output: +1: one +2: two +3: three +4: four +...

What's the best way to learn LISP?

Hi, I have been programming in Python, PHP, Java and C for a couple or years now, and I just finished reading Hackers and Painters, so I would love to give LISP a try! I understand its totally diferent from what i know and that it won't be easy. Also I think (please correct me if I'm wrong) there's way less community and development aro...

Array upgrading

If I understand Section 15.1.2.1 of the Common Lisp standard correctly, it is perfectly legal for (upgraded-array-element-type '(unsigned-byte 8)) to be '(unsigned-byte 16), or even t. My question is therefore about the actual behavior of implementations. Are there any implementations in use today where '(unsigned-byte 8) or '(unsigned...

What are some examples of LISP being used in production, outside of AI and academia?

Possible Duplicate: Lisp in the real world A search query on Google reveals that the search term 'practical lisp' returns a link for Practical Common LISP, which is a very nice starter book. However, this is not what I was looking for or had in mind when I set out to search those terms. ...

Can I Easily Use Lisp Without Emacs?

I'm currently reading Practical Common Lisp. The book is great and the language interesting, but I'm not enamored of learning Emacs. I've learned Vim and that's enough text-mode editors for one brain. I don't want to learn another. Double-control commands hurt my head. What's the best non-Emacs solution for programming Lisp on Windo...

asdf-installing libraries from the command-line

Coming from a Perl background, I have to say I prefer cpan Foo::Bar to the having to start sbcl, (require :asdf-install) and finally (asdf-install:install :foo-bar). Is there anything more convenient than this around? ...

How does one use SBCL's SB-SPROF allocation profiling?

Update: Upgrading to SBCL 1.0.24 fixed my problem. (Though I also needed to upgrade SLIME to the 11-23-2008 revision. The stable 2006-04-20 revision, as well as the head of CVS don't seem to work with SBCL 1.0.24.) The documentation for the SBCL statistical profiler indicates that you can profile memory allocation in addition to CPU u...