common-lisp

Common Lisp GUI Programming With System Calls

Can anyone tell me about using (Steel Bank) Common Lisp for writing GUIs via system calls? I know there are some libraries out there but this is a language learning exercise, so I want to do it myself. I'm developing on Kubuntu 8.10 and SBCL 1.0.18. Thanks. ...

Can one make CUSP use one's own SBCL?

I've already got slime+emacs+sbcl running (SBCL 1.0.23) on my Windows XP machine. CUSP installs with SBCL 1.0.6. Is there a way to make CUSP use the existing SBCL installation instead of its own? ...

Common Lisp: The Remove Function, how is it used?

I have a query request-uri in the form of "/node/143" (just an example of the format). I want to strip the first forward slash from the string, I looked up the function remove and had a try. I just can't seem to get it working (I'm using SBCL on Linux). I've set the request-uri using this code. (setq request-uri "/node/143") When I ...

Using ASDF to start Hunchentoot

I'm working on a web app using Hunchentoot (on SBCL and Linux), and usually I just run it from Emacs (SLIME), but for deployment I want something that's easier to automate. So I'm trying to figure out ASDF, because that seems to be what everybody's using these days. myapp.asd: (in-package #:asdf) (defsystem :myapp :name "my app" :...

CL-WHO-like HTML templating for other languages?

Common Lisp guys have their CL-WHO, which makes HTML templating integrated with the "main" language thus making the task easier. For those who don't know CL-WHO, it looks like this (example from CL-WHO's webpage): (with-html-output (*http-stream*) (:table :border 0 :cellpadding 4 (loop for i below 25 by 5 do (htm (:tr :a...

SBCL and LangUtils

Has anyone got langutils working with sbcl? ...

Adding values from a tab delimited string to a plist

How would I go about adding values from a tab delimited string to a plist? (dolist (x *lines*) (cl-ppcre:split "\t" x)) *lines* is a list of tab delimited strings loaded from a file, and I want to make a plist of the form (:a value1 :b value2 :c value 3) Thanks! ...

trvial-http usage

I can't work out how you pass arguments to an http post request with trivial-http library. I can make a post but I'm not sure how to pass post variables. as a character stream. http://common-lisp.net/project/trivial-http/user-guide.html#http-post ...

Coping with, and minimizing, memory usage in Common Lisp (SBCL)

I have a VPS with not very much memory (256Mb) which I am trying to use for Common Lisp development with SBCL+Hunchentoot to write some simple web-apps. A large amount of memory appears to be getting used without doing anything particularly complex, and after a while of serving pages it runs out of memory and either goes crazy using all...

Applicative programming and common lisp types.

I've just started learning Common Lisp--and rapidly falling in love with it--and I've just moved onto the type system. I seem to be developing a particular fondness for applicative programming. As I understand it, in CL strings and lists are both sequences, but there don't seem to be any standard functions for mapping over a sequence, ...

Clojure keyword arguments

In Common Lisp you can do this: (defun foo (bar &key baz quux) (list bar baz quux)) (foo 1 :quux 3 :baz 2) ; => (1 2 3) Clojure doesn't have keyword arguments. One alternative is this: (defn foo [bar {:keys [baz quux]}] (list bar baz quux)) (foo 1 {:quux 3 :baz 2}) ; => (1 2 3) That's too many nested brackets to have to typ...

Is it possible to deploy a Common Lisp (or other dialect) desktop application for several platforms?

I would like to develop a graphical application in Common Lisp or other Lisp dialect that could be deployed in Mac, Windows and Linux as a way of improving my knowledge of this language. Ideally: would compile the code would use a common graphical library wouldn't need installation of the runtime environment. I would like to make a l...

Does REMOVE ever return the same sequence, in practice?

Does REMOVE ever return the same sequence in any real implementations of Common Lisp? The spec suggests that it is allowed: The result of remove may share with sequence; the result may be identical to the input sequence if no elements need to be removed. SBCL does not seem to do this, for example, but I only did a crude (and...

Common Lisp: What's the best way to use libraries in a shared hosting environment?

I was thinking about this the other day and wanted to see what the SO community had to say about the subject. As it stands right now Common Lisp is getting some attention as a web development platform, and with good reason (of which I'm sure you are already convinced). I was wondering how one would go about using a library in a shared ...

How do I describe a local function to (trace)?

In common lisp, the function (trace name) can be used to see output about the calls to a function. If my function is declared with local scope, how do I describe it to trace? eg, how do I trace bar, below: (defun foo (x) (labels ((bar (y) (format t "bar: ~a~&" y))) (bar x))) ...

In a long running Common Lisp application, what strategy should be used to manage garbage?

If I am hosting a long running application such as a web server within a Common Lisp image, what strategy should I use to manage the garbage collector? I'm assuming that, by default, the garbage collector is entitled to spend long periods of time sorting out the heap, at times I can't predict. This may impact a particular browser reques...

Have you read Let Over Lambda?

I have been searching for references of this book, but haven't found much. It seems that it is a pretty advanced book, and I believe SO to be one of the best sites to ask for a little review. The questions follow: Do you consider it, as some say, to be the continuation of On Lisp? Which book would you read first, this one or The Art of...

Changing the package from the REPL in SLIME - is it broken?

I just recently started experiment with SLIME, and found a problem that makes me unsure whether it is something I am doing wrong or if the current snapshot of SLIME is broken. The problem: trying to change the package (using , !p) always throws an error, regardless of which backend is used. The error from SBCL looks like this: The...

Compiling Binaries with Clozure Common Lisp

Given a simple program such as the following, how would you: compile it as a seperate image file to be loaded by the implementation, and what command line arguments would you use to load it? Compile it as a standalone binary that can be loaded and run as is. Note: I tried adding ":prepend-kernel t" when saving the application only t...

Difference between "set", "setq", and "setf" in Common Lisp?

What is the difference between "set", "setq", and "setf" in Common Lisp? ...