common-lisp Questions
3
Solved
I have a sorted list of integers, (1 2 4 5 6 6 7 8 10 10 10). I want to group them all, so that I get ((1) (2) (4) (5) (6 6) (7) (8) (10 10 10)).
So far I have this, which works:
(let ((current-g...
Croaker asked 25/5, 2014 at 16:38
1
Solved
LISP has the setf function to assign a value to a variable. Now I have been wondering about the function's name: The set part is obvious, but what does the f suffix stand for?
Diena asked 22/5, 2014 at 13:24
1
Solved
I've been trying to build a lispy interface to the CFFI bindings (https://gitorious.org/dh-misc/hdf5/source/cb616fd619a387e3cdc927994b9ad12b6b514236:) but I ran into a situation where code runs cor...
Zachariahzacharias asked 10/10, 2013 at 21:5
1
Solved
I wish to print the tab character with the format function. I can achieve this with ~C and then placing #\tab as an argument to format, but this seems a bit verbose as for a newline one can simply ...
Mcgrath asked 10/5, 2014 at 4:47
2
Solved
I am teaching myself Common Lisp. I have been looking at an example of Conway's game of life, and there is a piece of syntax I do not understand.
The complete code is available here. The part in p...
Brinker asked 5/5, 2014 at 22:52
1
Solved
I'd like to expand all symbols x in a certain fragment into (value x). E.g.
(lambda ()
(* x x))
should become
(lambda ()
(* (value x) (value x)))
A simple use of symbol-macrolet wouldn't wo...
Laaland asked 30/4, 2014 at 17:39
2
Solved
In my code below , I only want r.
(let* ((frac (multiple-value-bind (f r) (floor amt 100) r)))
..use frac..)
I get compilation warnings saying unused variable f.
Is there an idiomatic way of w...
Blackfoot asked 26/4, 2014 at 23:52
1
Solved
On this line ((pointerp (first args)) (mem-aref (%vector-float-to-c-array (first args)) :float (second args))) in the below code the (second args) compiles with the warning This is not a number NIL...
Echidna asked 26/4, 2014 at 4:47
4
Solved
I just started writing this function and I was wondering if there was a way, that if just the &key argument was entered, the &optional list could be ignored.
(defun test (&optional arg...
Periapt asked 21/4, 2014 at 16:43
3
Solved
I have been using Clojure alot recently but I still don't understand what functionality I do not get that common lisp reader macros provide. Can explain explain this to me in simple terms?
Warrantor asked 21/4, 2011 at 16:9
2
Solved
In the following program, removing the line
(declare (type (simple-array bit) arr))
makes running time increase by more than a factor of 3, using SBCL. The type information given in the defclas...
Podium asked 14/4, 2014 at 13:3
1
Solved
This passage from On Lisp is genuinely confusing -- it is not clear how returning a quoted list such as '(oh my) can actually alter how the function behaves in the future: won't the returned list b...
Zucker asked 11/4, 2014 at 2:7
3
Is there a common lisp library for creating excel spreadsheets? I'd much much prefer that it output one of the XML formats.
Update:
To add some more context, creating a csv file from common lisp ...
Amarette asked 27/12, 2010 at 20:45
1
Solved
I am trying to run a common lisp script from the command line, on Ubuntu 12.04, using SBCL 1.1.7. I start the script with
$ sbcl --script <my-script.lisp>
Since the script is UTF_8 encoded...
Weldonwelfare asked 2/4, 2014 at 20:52
2
I am fairly new to CL coming from R and Python.
I want to define a function to which I can pass an arbitrary number of arguments and also have keywords with default values that I can set if I want...
Hoedown asked 2/4, 2014 at 8:39
3
Solved
Is the values function in Common Lisp just syntactic sugar for packaging multiple values into a list that gets destructured by the caller?. I am asking because I thought Common Lisp supports "true"...
Maida asked 1/4, 2014 at 19:52
1
Solved
I'm writing my own x86-64 assembler in Common Lisp and it produces correct binary code for a subset of x86-64. I use a custom reader macro to convert assembly code to a syntax tree, and it works as...
Lock asked 28/3, 2014 at 20:48
2
Solved
I am trying to get the current system date in Common Lisp through following function
(defun current-date-string ()
"Returns current date as a string."
(multiple-value-bind (sec min hr day mon y...
Nita asked 2/1, 2014 at 3:10
4
Solved
I want to do
(filter-list-into-two-parts #'evenp '(1 2 3 4 5))
; => ((2 4) (1 3 5))
where a list is split into two sub-lists depending on whether a predicate evaluates to true. It is easy to ...
Leshia asked 8/8, 2013 at 2:25
5
Solved
Lisp - Is it good for web programming/applications (interactive) ? The way ruby is ? The way php is?
Is Lisp good for web programming/applications (interactive), the way ruby and php are?
Things to take into consideration would be:
Ease of use
Deployability
Difficulty (especially for a beginner...
Cushiony asked 30/4, 2011 at 10:44
1
Solved
In lisp, I need to define a set of functions, all with the same number of arguments.
However, the functions may or may not use all the arguments, leading to a spur of warning messages. For example:...
Kiesha asked 6/3, 2014 at 17:18
1
In the article Technical Issues of Separation in Function Cells and Value Cells, Kent Pitman and Richard Gabriel explains the decision of making Common Lisp a Lisp-2:
There are two ways to look ...
Synaeresis asked 1/3, 2014 at 5:33
1
Solved
I have download a emacs package for to format python codes with autopep8.
This package is named py-autopep8
this is the lisp code
can you se in the line number 78 this common lisp function
(inc...
Erdrich asked 1/3, 2014 at 20:17
2
Solved
While using the REPL it would be helpful to undefine defined functions and macros, exspecially if you tried to make a macro for something, and then simulate it as function, and the macro is called ...
Author asked 26/2, 2014 at 0:5
2
Solved
So I'm practicing lisp with Project Euler, and I'm collecting little utility functions into a separate file to reduce duplication, and I expect that it might get pretty huge, so I've gone ahead and...
Ratline asked 24/2, 2014 at 22:26
© 2022 - 2024 — McMap. All rights reserved.