common-lisp Questions
8
Solved
How can i execute a shell (bash) command within a Common Lisp program and assign the output to a variable?
Valli asked 19/5, 2011 at 22:16
2
Solved
I'm currently trying to get an output of ... \hline in GNU Common lisp 2.49, but I can't get the format to work. This is what I've tried so far to get a single backslash:
(format nil "\ ") => "...
Gelderland asked 12/10, 2018 at 15:38
4
Hi I'm a beginner in Common Lisp. I want to check if two variables are integers. If both n and m are integers I want to it to return - if it is negative, 0 if it is zero, + if it is positive and NI...
Attorn asked 4/10, 2018 at 0:56
1
Solved
I found out, that in CL hash table has a type HASH-TABLE (surprisingly). However, a vector can be just VECTOR, but it also can be specified further as (vector number 12), for example.
It seems on...
Context asked 5/10, 2018 at 22:55
3
Solved
Recently, I started to learn cuis-smalltalk, and no I realize how profound and deep OOP with Smalltalk is compared to CLOS (I'm using Ruby). I learned the great idea of that Smalltalk is a reflecti...
Generally asked 10/8, 2018 at 13:28
2
Why happen this in sbcl? Maybe a bug?
(defclass myclass ()
((s1
:initform '((a . 1) (b . 2)))
(s2
:initform '((a . 1) (b . 2)))))
(defparameter ins (make-instance 'myclass))
(setf (cdr (ass...
Pleistocene asked 29/8, 2018 at 21:6
2
Solved
May I get recommendations or links to representative code repositories with good style for multiple related Common Lisp packages, please?
For instance, consider a high-level workflow library with ...
Glaciate asked 1/8, 2018 at 17:13
4
Solved
I want to map over a list, but keeping track of the element index in the list.
In Python I can do something along the lines of:
map(lambda (idx, elt): "Elt {0}: {1}".format(idx, elt), enumerate(m...
Virus asked 10/5, 2016 at 12:59
0
I am trying to call Haskell (ghc version 7.6.3) from Common Lisp (sbcl version 1.2.4) on a debian pc.
The Haskell code is
{-# LANGUAGE ForeignFunctionInterface #-}
module Safe where
import For...
Javanese asked 4/8, 2018 at 6:32
2
Solved
How do I know whether I'm calling an anaphoric macro? If I do so without knowing it, some seemingly unbound symbols might behave quite different from what one would expect.
Example
Collecting a...
Altruism asked 31/7, 2018 at 19:47
1
Solved
I want to sent some data from my program to a process executed via uiop:run-program.
The following works:
(require :asdf)
(asdf:load-system :uiop)
(uiop:with-temporary-file (:stream dot-program-s...
Hightail asked 14/7, 2018 at 20:4
1
This is a follow up to this previously asked question about the documentation function, which apparently deserved its own post.
Is there a way to dynamically get the docstring of either a function...
Worm asked 13/7, 2018 at 10:27
4
Solved
During my course on lisp programming I used the lispworks IDE trial version,
which is a very good IDE but it's still a trial version.
I searched for a new IDE.
And I saw this video https://www.yout...
Tagore asked 11/7, 2018 at 4:23
1
Solved
I am using Quicklisp to load libraries in my Common Lisp project and
I need to load a customised version of some library instead of the version provided by Quicklisp.
The customised version of th...
Many asked 24/6, 2018 at 10:3
9
Solved
what's the typical way to add an item to the end of the list?
I have a list (1 2 3) and want to add 4 to it (where 4 is the result of an evaluation (+ 2 2))
(setf nlist '(1 2 3))
(append nlist ...
Millur asked 22/6, 2011 at 12:39
1
Solved
In Edi Weitz's cl cookbook, for the pythonic join, this function is suggested:
(defun join (separator list)
(with-output-to-string (out)
(loop for (element . more) on list
do (princ element out...
Leucoderma asked 1/6, 2018 at 16:27
4
Solved
While looking through the "Common Lisp Quick Reference" by Bert Burgemeister, I stumbled over tailp.
First, I misunderstood the definitions of this function. And I tried:
(tailp '(3 4 5) '(1 2 3 ...
Arc asked 26/5, 2018 at 11:51
1
Solved
I am trying to get an understanding of how the ELT function works when it comes to different sequence types.
It seems obvious that when a list is passed to it, then the performance is of order O(...
Choral asked 23/5, 2018 at 17:31
2
How do I spawn off a background (named) sub-process/thread in ABCL? That is, I want to spawn the sub-process (or thread) to run in the background and leave the top-level evaluation free for other p...
Arundel asked 16/5, 2018 at 3:37
1
Every time I start work, I fire up Emacs, M-x cd to a working directory, M-x slime to start Slime, then do run (ql:quickload 'myproject) in the slime repl, (or , load-system myproject) followed by ...
Lowboy asked 2/5, 2018 at 18:35
2
Solved
I already have the code to generate all the permutations for a list of elements. However, I realized that if I want to manipulate the lists that are generated, I would need to traverse this list. T...
Hormonal asked 16/4, 2018 at 2:49
2
Solved
I have been unable to find any built-in method of checking if something is a valid type specifier.
Does such a predicate exist?
(I would make one myself, but alas, the consequences of passing so...
Ichthyosaur asked 9/4, 2018 at 2:35
1
Solved
On page 329 of Land of Lisp, Conrad Barski explains the technique of memoization with the following example code
(let ((old-neighbors (symbol-function 'neighbors))
(previous (make-hash-table)))
...
Torino asked 8/4, 2018 at 9:59
5
Solved
Assume that I have some array of data (a vector to be specific).
Can I plot it element by element sequentially using Gnuplot such that it seems as if it is a real life signal that is being traced t...
Formica asked 15/2, 2012 at 17:48
2
It's very simple program which just return the input as a list shuffled. I wrote this program in python. Now I want to convert this program to lisp code. but I couldn't. How do I write down this pr...
Penthouse asked 26/3, 2018 at 11:38
© 2022 - 2024 — McMap. All rights reserved.