common-lisp Questions

1

Solved

http://mop.lisp.se/concepts.html says: An implementation is free to add additional properties to the canonicalized slot specification provided these are not symbols accessible in the common-li...
Whitehead asked 24/2, 2014 at 11:52

2

Solved

I installed CLisp today on my Win7 PC. Please don't criticize my environment choices, but if this particular setup has flaws relating to Quicklisp and Hunchentoot feel free to point them out. I dow...
Vaules asked 30/6, 2012 at 3:24

1

Solved

I've been trying to write a macro that generates, among other things, a compiler macro of the same name. This is the minimal code I'm stuck with: (defmacro definline (name lambda-list &body b...
Selry asked 18/2, 2014 at 19:56

4

Solved

Is there an advantage to defining a function like (defun hi () "Hi!") and be able to call it by using (hi) or (HI) or (Hi), or to (setf a-number 5) and be able to access that number using a-number,...
Gertudegerty asked 11/9, 2011 at 0:25

3

Solved

What's the difference between eq, eql, equal and equalp, in Common Lisp? I understand that some of them check types, some of them check across types an all that, but which is which? When is one bet...
Gamophyllous asked 13/2, 2009 at 19:56

3

Solved

You all know the story: programmer reads other people's code, programmer sees symbol they don't understand, Google fails them because it's difficult to search for non-alphanumeric symbols. This ti...
Balboa asked 30/1, 2014 at 17:52

3

Solved

I'm learning Lisp from the book 'Practical Common Lisp'. At one point, I'm supposed to enter the following bit of code: [1] (remove-if-not #'evenp '(1 2 3 4 5 6 7 8 9 10)) (2 4 6 8 10) I suppose...
Cylinder asked 28/1, 2014 at 15:46

1

Solved

I am not sure what is going on here, a macro example in the text. Basically, not comfortable with how to use get-setf-method, a built-in macro (maybe function?). To be specific, how about the case ...
Headstream asked 28/1, 2014 at 13:39

2

Solved

I am struggling a little trying to figure out how to tell Lisp that I want to use double-float values. Suppose I have: (let ((x 1)) (format t "~A~%" (/ x 3.0))) Which gives: 0.33333334 If I w...
Unaccomplished asked 25/1, 2014 at 16:56

1

Solved

In Lisp FORMAT, all directives start with a tilde (~). If I just want to output string "~", how can I do that with FORMAT?
Calceiform asked 24/1, 2014 at 9:50

1

Solved

So... in an attempt to use preexisting wheels, rather than reinvent my own at every turn, I've been trying to get a decent Common Lisp environment working with [a particular Java's library]. My ABC...
Sitin asked 20/1, 2014 at 15:40

5

I have developed some Common Lisp functions in a couple of Lisp source files that I'd like easily available to other functions I write, or make available on github if I think they'd be useful for s...
Pushover asked 6/1, 2014 at 15:8

1

How do I trim leading and trailing whitespace in Common Lisp?
Cleptomania asked 7/1, 2014 at 3:19

1

Solved

In the SBCL user manual there are several references to the term "open code". Common Lisp hackers also use this term when referring to optimizing code. Could you please explain what it means to "o...
Jumbo asked 5/1, 2014 at 23:11

1

Solved

I recently encountered this line in some common LISP library code: (string-equal #1="http://" url :end2 (min (length url) #2=#.(length #1#))) Here, url was passed in as a string variable. I unde...
Loppy asked 2/1, 2014 at 4:4

1

I am using a Prolog query in a Common Lisp program to get the date of birth from a knowledge base. The query returns the value formatted as {1991-05-13}, and I assign to this value on dob variable ...
Splutter asked 29/12, 2013 at 15:58

1

Solved

I have created a graphic using Common Lisp, OpenGL, and glut. Specifically, I am using the library cl-opengl. I wish to save this graphic (which is made with connecting gl:vertex points) to an exte...
Scout asked 28/12, 2013 at 22:40

1

Solved

I have an array of (unsigned-byte 32) that contains quite a bit of data, some of it in floating point format. That is, some of the bytes are handled as integers containing bit fields, while some of...
Talipes asked 19/12, 2013 at 7:33

2

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...
Parmer asked 20/8, 2013 at 21:43

3

Solved

I'm trying to convert this Python code into Common Lisp: for a in xrange(1,1000): for b in xrange(a,1000): c = (a**2 + b**2) ** 0.5 s = a + b + c if s == 1000: return a * b * c My first att...
Mattiematting asked 25/12, 2012 at 7:9

1

Solved

So I can do this: CL-USER> (format t "~80<~a~;~a~;~a~;~a~>~%" "hello" "how are you" "i'm fine" "no you're not") hello how are you i'm fine no you're not It evenly spaces the 4 strings a...
Rustice asked 10/12, 2013 at 14:54

2

Solved

I am having problem with the LISP expression below. There is floating precision error while doing sum for floating point numbers. CL-USER> (+ -380 -158.27 -35.52) Actual: -573.79004 Expected: ...
Capet asked 10/12, 2013 at 9:5

1

Solved

I'm trying to connect to a mud client, so I'm using usockets to connect over tcp. But After I write I get a decoding error reading. I have reason to believe the encoding should ascii ,or least use ...
Shawnshawna asked 7/12, 2013 at 0:25

2

Solved

I'm testing out the code in this interesting answer. CL-USER> (defun literal-cons () (let ((cons '(1 . 2))) (incf (cdr cons)) cons)) ; in: DEFUN LITERAL-CONS ; (INCF (CDR CONS)) ; --> LET...
Homeless asked 3/12, 2013 at 4:16

2

Solved

I'm reading Let Over Lambda, which deals with some pretty deeply layered macro authoring. It's fascinating and I'm mostly managing to keep up with it. In Chapter 4 Hoyte implements reader macros f...
Phylactery asked 2/7, 2013 at 15:23

© 2022 - 2024 — McMap. All rights reserved.