Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
34 views

I just started playing around with Common Lisp and tried the first euler problem which states to sum all the divisors of 3 OR 5 under some given parameter x. I would like to use a recursive solution ...
Patrick Donegan's user avatar
Advice
1 vote
16 replies
191 views

The sortf function from Chapter 12 of the book "On Lisp" originally used get-setf-method, which is currently unavailable in a recent SBCL by default. Therefore, get-setf-expansion was used ...
dhnam's user avatar
  • 163
0 votes
1 answer
56 views

I’ve been reading about Lisp programming languages and trying to understand the core difference between macros and regular functions. From what I gather, Lisp’s macro system allows developers to ...
Mike Pyskin's user avatar
0 votes
1 answer
57 views

Shadow-cljs has a resource loader that can include literal files into the Clojurescript code (ns app.my (:require [shadow.resource :as rc])) (rc/inline "file.txt") I need a macro that ...
user2649762's user avatar
-1 votes
1 answer
101 views

I am using a Windows 11 computer, running Steel Bank Common Lisp (version 2.0.0) in PowerShell by inputting functions directly into the SBCL.exe REPL to see if they work. In the process, I have hit ...
Ashley Ben Story's user avatar
1 vote
1 answer
88 views

I'm using Emacs, and I have a macro that's like a switch for regexes, and runs an expression with variables bound to match results. The indentation isn't what I'd like but I can't find if there's a ...
John Graham's user avatar
3 votes
2 answers
70 views

With this: (defclass test-class () ((data :initarg :data) (other :initarg :other))) (defmethod test ((tc test-class) &key) (macrolet ((print-slot (slot) `(with-slots (,slot) ...
John Graham's user avatar
1 vote
1 answer
127 views

I'm learning syntax-case macro system. This is what I have so far: (define-syntax loop (lambda (x) (syntax-case x () [(_ (var val x ...) body) (with-syntax ([recur (datum->syntax ...
jcubic's user avatar
  • 67.1k
1 vote
1 answer
64 views

Suppose I'm setting a var like this: (setq var '((:item1 "stringA") (:item2 "stringB"))) (this works) Now I would like "stringA" be a conditional, like this: (setq var '(...
Alexander Shcheblikin's user avatar
-1 votes
2 answers
112 views

I've never used LISP before and I'm using AI to try to create simple automations for autocad so I can speedup the proccess. Everything works fine to the point where I have a let expression which takes ...
user29889914's user avatar
0 votes
3 answers
91 views

I have been learning Common Lisp for a short while, using the SBCL 2.0.0 REPL on a Windows 10 machine. At one point in time I inputted the 2 following lines into a REPL: (defvar var-string (print (* 5 ...
Ashley Ben Story's user avatar
1 vote
1 answer
135 views

(Edit 2025-02-27: I should note that there isn’t a difference between how CLISP and SBCL handle this situation the way I initially thought there was; see the comments to this question, and the answer ...
Tina Russell's user avatar
0 votes
1 answer
200 views

I work with lots of rectangles(POLYLINE) with an ID name(TEXT) inside them. I need to separate each Recatngles by Layer depending on their ID name. So to make things a bit easier, I want to be able to ...
Joseph Romero's user avatar
0 votes
1 answer
56 views

Does a Lisp or Scheme cons bear any similarities or theoretical kinship to a dot product? In the Lisp family (cons 1 2) produces (1 . 2) which looks a lot like a dot product. Just coincidence?
147pm's user avatar
  • 2,289
7 votes
1 answer
408 views

Consider the following Common Lisp code. (print (let* ((x nil) (y x)) (setq x t) (and y x))) ; T (print (let* ((x nil) (y x)) (setq x t) (and x y))) ; NIL (print (let* ((x nil) (y t)) (setq y x) (...
single-question-123's user avatar
1 vote
1 answer
132 views

Inspired by a post on Reddit (someone wanted to count frequencies in commonlisp forum), I wanted to write a list-based one for the fun and practice, hash-based one is of course more efficient. I got ...
myname's user avatar
  • 368
1 vote
1 answer
87 views

Solving a challenge in www.codewars.com. It uses sbcl and rove for testing the answers. I want to translate a string to a symbol. Codewars requires code inside a package to see it. This is a sample (...
xvan's user avatar
  • 4,849
2 votes
1 answer
96 views

I'm new on lisp and I'm trying to solve some basic exercises. I'm trying to make a list of elements in an input list that are out of max and min limits. I've been trying to do this by creating two ...
M1ctl4nt3cutl1's user avatar
0 votes
0 answers
72 views

I am trying to use Dog Hoyte's Let over Lambda, Chapter 3, named let with some touch from EmacsLisp (named-let from subr-x.el). Neither his original, nor mine slightly modified version macroexpand in ...
myname's user avatar
  • 368
3 votes
2 answers
99 views

As the title says, how do I (programmatically) check in a portable way (if possible) if a symbol stands for a symbol-macro? CL-USER> (define-symbol-macro some-macro some) SOME-MACRO CL-USER> (...
myname's user avatar
  • 368
4 votes
2 answers
116 views

So I'm studying systems engineering and we're currently going over different programming paradigms. We started playing with functional programming last class and we were asked to code a recursive '...
Franco Moreno's user avatar
0 votes
0 answers
122 views

I have just upgraded to SBCL 1.4.3, and I'm having trouble loading foreign libraries while loading my package with Quicklisp. Everything worked before the upgrade. I get this error: (CFFI::FL-ERROR &...
Oliver Cox's user avatar
0 votes
1 answer
130 views

This seems like an obvious question but my Googling suggests the answer is no, which I find hard to believe. I'm just starting out using examples from textbooks, and get the following. I have to type &...
Sridhar Sarnobat's user avatar
2 votes
1 answer
66 views

I am a beginner lisp programmer, and I'm following the Practical Common Lisp book, specifically chapter 9. After finishing the chapter, I've tried to expand the unit-testing environment. Specifically, ...
banana bajanana's user avatar
0 votes
2 answers
104 views

I have a question, whether this is intended by the language or whether this is kind of an unexpected/unwanted behavior/ BUG in Common Lisp. However, I observed it in both: CLISP and SBCL: I thought, (...
Gwang-Jin Kim's user avatar

1
2 3 4 5
141