common-lisp Questions
1
Solved
I am currently working my way through Graham's On Lisp and find this particular bit difficult to understand:
Binding. Lexical variables must appear directly in the source code. The
first argume...
Lemuellemuela asked 12/3, 2018 at 21:53
1
Solved
Goal
I would like to have my Common Lisp (SBCL + GNU Emacs + Slime) environment be sort of like a Smalltalk image in that I want to have a big ball of mud of all my code organized in packages and ...
Luthuli asked 9/3, 2018 at 9:23
3
Solved
I am reading Hackers and Painters and am confused by a problem mentioned by the author to illustrate the power of different programming languages.
The problem is:
We want to write a function th...
Subchloride asked 1/3, 2018 at 9:31
1
Solved
I need to generate a space-padded string with a variable string length. The not-so-clever solution that works involved nesting of format:
(format nil (format nil "~~~d,,a" 10) "asdf")
Now, I wan...
Cylindroid asked 19/2, 2018 at 14:44
2
I am not satisfied to find files matching a string like this:
(remove-if-not (lambda (it)
(search "wildcard" (namestring it)))
(uiop:directory-files "./"))
;; I'll ignore case with str:contains?...
Sorrow asked 16/2, 2018 at 18:22
1
Solved
Recently, I have come across the so-called hash-dot Common Lisp reader macro and am wondering how it works and what it does. Using search engines was not of much help, so any examples, explanations...
Ptomaine asked 14/2, 2018 at 18:9
4
Solved
I'm using OpenMCL on Darwin, and I'd like to do something like:
(loop for f in (directory "somedir")
collect (some-per-file-processing f))
But I can't get directory to return anything other tha...
Heterodox asked 10/9, 2009 at 6:50
2
Solved
I have this association-list in Common Lisp:
(defvar base-list (list (cons 'a 0) (cons 2 'c)))
I have to call assoc when my argument is of type string.
For the pair (A . 0) I have to convert "a...
Jordanjordana asked 17/6, 2012 at 11:33
2
Solved
Is there a way I can get SBCL to take the value of a CPU register at a certain point in my program and print it as an integer?
Would I have to use gdb?
Argus asked 11/3, 2013 at 23:11
7
I am researching programming language design, and I am interested in the question of how to replace the popular single-dispatch message-passing OO paradigm with the multimethods generic-function pa...
Pairoar asked 4/3, 2012 at 7:27
2
Solved
How do I detect if a lexical variable is bound in a scope? I basically want boundp for lexical variables.
Concretely, say I have:
(defvar *dynamic* 1)
(defconstant +constant+ 2)
(let ((lexical 3...
Afterbody asked 5/6, 2016 at 15:53
3
Solved
I am wondering how one goes about deploying a Common Lisp web application written in, say, Hunchentoot, Wookie, Woo, or even Clack.
That is, suppose I write an app that contains some files, packag...
Aparri asked 4/1, 2018 at 20:59
4
I am looking for a way to output a character
a number of times using format. Is this possible? Can someone fill
in the _?_'s, so that the example works?
(let ((n 3))
(format nil "_?_" _?_ #\* _?_...
Extemporaneous asked 19/11, 2013 at 13:34
4
The split-list function takes a list and returns a list of two lists consisting of alternating elements of the input. I wrote the following:
(defun split-list (L)
(cond
((endp L) (list NIL NIL))...
Leverage asked 22/10, 2015 at 21:25
1
Solved
In trying to gather a deeper familiarity with Common Lisp's tools, I found myself struggling when reading the documentation. Namely, it is difficult to comprehend what the usage of the macro in que...
Kwan asked 20/12, 2017 at 17:43
2
How do I build a standalone executable in SBCL? I've tried
; SLIME 2.20
CL-USER> (defun hullo ()
(format t "hullo"))
HULLO
CL-USER> (sb-ext:save-lisp-and-die "hullo" :toplevel #'hullo :exec...
Aida asked 19/12, 2017 at 14:13
4
Solved
In Python we have the del statement for deleting variables.
E.g:
a = 1
del a
What the equivalent of this in Lisp?
(setq foo 1)
;; (del foo) ?
Foliose asked 20/1, 2014 at 10:40
2
I use paredit on emacs with SLIME's repl. This means that at any point during my typing on the repl, my s-expressions are balanced.
However, they may not be complete, and I might want to continue...
Selfpossessed asked 14/11, 2017 at 10:57
4
Solved
I'm programming on Ubuntu using GCL. From the documentation on Common Lisp from various sources, I understand that let creates local variables, and setq sets the values of existing variables. In ca...
Edelweiss asked 28/9, 2013 at 13:44
2
While reading Peter Seibel's "Practical Common Lisp", I learned that aside from the core parts of the language like list processing and evaluating, there are macros like loop, do, etc that were wri...
Buber asked 27/10, 2017 at 16:30
4
Several months ago, I was inspired by the magnificent book ANSI Common Lisp written by Paul Graham, and the statement that Lisp could be used as a secret weapon in your web development, published b...
Housewifery asked 24/5, 2010 at 7:29
3
How do I start Hunchentoot on a project? I looked over Edi Weitz's guide and everything went smoothly until after installation. The listed tutorials were either broken or skimmed over actual server...
Belsen asked 2/11, 2013 at 6:24
1
Solved
I realize there are many places I can ask this question at but I thought I'd try here. I've already seemingly attained as much help as I can from the good people at Maxima.
I run Maxima with SBCL ...
Caprine asked 9/10, 2017 at 2:3
7
Solved
Is there a mocking/stubbing framework for Common Lisp?
EmacsLispMock looks great, but it is an Emacs lisp framework, and I'm looking for something to use from Common Lisp.
Any suggestions?
Hoxie asked 1/11, 2010 at 11:11
4
Solved
Is there a way to have quicklisp load a library without sending:
To load "drakma":
Load 1 ASDF system:
drakma
; Loading "drakma"
To standard out? I've tried adding :verbose nil and :explain ni...
Excipient asked 5/6, 2011 at 20:49
© 2022 - 2024 — McMap. All rights reserved.