6,432 questions
0
votes
1
answer
73
views
Why is setting array values consing?
I have the following problem: Setting values of large arrays is consing in sbcl and since I have to do that frequently, the heap space fills up quite quickly. What is the reason for the consing and (...
0
votes
1
answer
42
views
Installation of ISLISP-MODE and ISLISP-REPL?
I am having issues with installing ISLISP-MODE and ISLISP-REPL within Emacs, to be able to use Emacs as my editor for tinkering with Easy-ISLISP (EISL).
I did follow the instructions in the two ...
1
vote
1
answer
64
views
Omitting character during the last iteration when iterating over a list of sublists with format
It is possible to omit a character for the last iteration with format by prepending it with the ~^ format directive:
(format nil "~{~A~^,~}" '(1 2 3))
;; -> "1,2,3"
It is also ...
0
votes
1
answer
46
views
Is it possible to make aref operator work with custom class in Common Lisp?
The standard does not allow to inherit from built-in classes, such as simple-string or vector. If we want custom vector or string, we have to wrap a vector or string in our own class or struct. At ...
1
vote
1
answer
76
views
Loading "cl+ssl": Unknown character encoding: `:KSC_5601`
I get this since… a few days. Can't relate to a particular change, it would be too easy. Does that ring a bell for you?
It happens when I "quickload" cl+ssl.
$ sbcl
* (ql:quickload "cl+...
4
votes
1
answer
137
views
Why does `member` seem to behave differently when called from a fiveam test environment?
When I run (member "foo" '("foo") :test #'eql), it seems to evaluate differently depending on the environment in which it's happening:
NIL in a "vanilla" common lisp ...
0
votes
1
answer
80
views
How to use with-safe-io-syntax?
I'm reading a file with
uiop:read-file-lines
The documentation says: beware: be sure to use with-safe-io-syntax, or some variant thereof
This is what I tried:
(defun sample-input
()
(uiop:with-...
Tooling
0
votes
0
replies
75
views
How to get started with slimv in neovim?
I have created a plugin for lazy:
.config/nvim/lua/plugins/slimv.lua:
return {
"kovisoft/slimv"
}
Now, how do I start a REPL in neovim?
I have also created a minimal common lisp file:
...
2
votes
1
answer
114
views
I get one return value from the REPL and another from the file in Common Lisp. Why?
When I use the REPL I get this result:
* (block my-block
(print "We see this")
(return-from my-block 10)
(print "We will never see this"))
"We see this"
10
*
...
Advice
0
votes
9
replies
127
views
Adding an element to list inside a function
Lisp beginner.
I am trying to add an element to a list inside a function.
(defun add-element (e lst)
(setf lst (cons e lst)))
I cannot use the return of the function to change the original list but ...
2
votes
1
answer
183
views
Common Lisp step-by-step debugging with SBCL and SLIME
I tried to debug the function below (find-3rd-largest), and wanted to execute expressions step by step from (break), as I did for other programming languages.
So, I compiled the function with C-u C-c ...
Advice
2
votes
2
replies
69
views
writing nicely a list of lists on disc SBCL
In a package I am developing I often get lists of lists. The single lists are very long and I would like to write them on a file controlling the output length as in the example. If I simply use (write ...
0
votes
1
answer
80
views
Why Common Lisp warns about unknown keyword argument in some cases but not others?
I am trying to understand why when I declare types, things seem to go very wrong in SBCL.
Here's a little file I created to reproduce the problem:
(defpackage p1 (:use :cl) (:export #:do-it #:keytype))...
-1
votes
1
answer
101
views
CL-CFFI-GTK: Is there a way to avoid FLOATING-POINT-INVALID-OPERATION?
About three years ago I tried to follow the GTK3 tutorial for Common Lisp. I had different problems then, but many of the examples worked without any complains.
Now I took the time to reconsider it, ...
2
votes
0
answers
151
views
Avoid compiler warnings linked to double-float boxing/unboxing in SBCL Common Lisp
When I compile (with (speed 3)) the following (example) code with SBCL Common Lisp, the compiler issues this warning in relation with function triple returning a double-float:
"doing float to ...