common-lisp Questions
2
Solved
I am reading the cl-fad/load.lisp code tonight, and I found there are symbols #+: and #-: in the front of expression or string.
What's these symbols meaning?
Tribadism asked 23/10, 2016 at 2:33
1
Solved
Currently, I'm developing 2 web-based tools for my own need with hunchentoot.
Before starting hunchentoot, I want to set some special variable with let so there values will be available while hunch...
Pennyworth asked 22/10, 2016 at 9:33
1
Solved
Using common lisp you can add many docs strings for example:
CL-USER> (defun foo ()
"doc string for foo"
nil)
FOO
CL-USER> (documentation 'foo 'function)
"doc string for foo&...
Lundin asked 18/10, 2016 at 15:31
3
Solved
In Common Lisp it is relatively easy to create a macro-defining macro. For example, the following macro
(defmacro abbrev (short long)
`(defmacro ,short (&rest args)
`(,',long ,@args)))
is ...
Ultrasonic asked 27/10, 2014 at 21:15
3
Solved
ok I tried this translate-from-foreign method and it did work
I have these defined in my structs.lisp file in my library which loads first before all my other dependencies
(cffi:defcstruct (cv-siz...
Putrefaction asked 2/10, 2013 at 9:24
3
Solved
First question ever here, and newbie in both Common LISP and Haskell, please be kind.
I have a function in Common LISP - code below - which is intended to tell whether the area of a triangle is an ...
Mayonnaise asked 6/10, 2016 at 22:51
3
Solved
When writing Common Lisp code, I use SLIME. In particular, I compile the buffer containing definitions of functions by using C-C C-k, and then switch to the REPL to run those functions. Putting exe...
Rusch asked 20/3, 2012 at 23:3
2
Solved
I'm following an article where the author defines the following macro:
(defmacro make-is-integral-multiple-of (n)
(let ((function-name (intern (concatenate
'string
(symbol-name :is-integral-mul...
Russellrusset asked 2/10, 2016 at 16:0
4
Solved
Im looking for a way to extract all the elements of a list in common lisp. Like this
[194]> (break-out-of-list '(a b c d))
A
B
C
D
Edit: The usage example I gave was not thought out very well...
Haver asked 23/11, 2011 at 14:27
1
Solved
I am using Emacs with SLIME for my development environment. When I type (write-to and then C-M-i I get the following autocompletions:
Click on a completion to select it.
In this buffer, type RET t...
Mariannemariano asked 27/9, 2016 at 7:9
3
Where can I find a list of the common Lisp keywords, that's the list of reserved words used in Common Lisp, words like ash, setf, etc.. It would be nice if the list had the usage of the keywords, a...
Guinness asked 18/9, 2016 at 17:3
1
Solved
I've been trying to understand proper use of restarts and handlers in Common Lisp by reading Peter Seibel's Beyond Exception Handling: Conditions and Restart chapter of Practical Common Lisp, Kent ...
Awlwort asked 13/9, 2016 at 8:25
3
Solved
Here's a function I was writing that will generate a number list based on a start value, end value and a next function.
(defun gen-nlist (start end &optional (next #'(lambda (x) (+ x 1))))
(l...
Goodsell asked 12/9, 2016 at 10:51
3
Often when I try to write a macro, I run up against the following difficulty: I need one form that is passed to the macro to be evaluated before being processed by a helper function that is invoked...
Molding asked 10/9, 2016 at 14:10
4
Solved
Here is the back story skip to the bottom if you do not care and only want to see the question.
So I have been playing around in LISP for a little while. Some basic functions, some classes ,and fi...
Obstreperous asked 10/7, 2009 at 13:49
2
Solved
If I want to create a Lisp-image of my program, how do I do it properly? Are there any prerequisites? And doesn't it play nicely with QUICKLISP?
Right now, if I start SBCL (with just QUICKLISP pre...
Awakening asked 24/8, 2016 at 21:37
3
Solved
I was reading Roots of Lisp by Paul Graham where he claims that any lisp functionality can be build with the combination of this 7 base functions: quote, atom, eq, cond, cons, car, cdr.
Question:...
Tooling asked 23/8, 2016 at 6:8
5
Solved
I want to apply the function (* x 2) to every other element in a list and return the entire list using the loop macro. The solution I've come up with so far is this:
(defun double-every-other (xs)...
Aldric asked 7/8, 2016 at 17:52
1
Solved
This happens to me time and again: I define the class and forget that I wanted it funcallable or it is, say, Gtk widget class, thus it's metaclass needs to be stated. Once it is defined, however, S...
Doting asked 7/8, 2016 at 7:27
2
Recently I have a task to process a large file, the file size is 460MB, and contains 5777672 lines. When I use the linux built-in command 'wc' to calculate the file line numbers, it is blazing fast...
Soloist asked 29/7, 2016 at 21:37
1
Solved
I am trying to write the CFFI wrapper for Sundials CVODE library. SWIG was choking on Sundials headers since they are quite interconnected and SWIG couldn't find the right headers, so I did it by h...
Incorrect asked 7/3, 2016 at 10:48
3
Solved
I tried to find a lisp function to convert between numbers and strings and after a little googling I fond a function with the same name. when I entered (itoa 1) SLIME printed:
Undefined function ...
Dahlia asked 25/4, 2013 at 16:59
4
Solved
I got an unexpected result while solving Problem 75 in Project Euler. My code does find the correct solution, but it behaves strangely.
My solution consists of traversing a Pythagorean tree (Barni...
Carlitacarlo asked 20/7, 2016 at 23:42
1
Solved
The generic function slot-definition-readers gets an argument that must be a direct-slot-definition. If an object is an instance of a class that inherits from another class how can I get hold of th...
Placoid asked 19/7, 2016 at 7:43
1
Solved
I'm looking for a simple way to return a new structure which is a copy of an existing one with some fields changed, without modifying the original.
I get that you can use setf to change the data i...
Journalize asked 17/7, 2016 at 13:25
© 2022 - 2024 — McMap. All rights reserved.