7,051 questions
0
votes
0
answers
20
views
AutoCad lisp routine has unexpected behavour with multiline attribute
I'm have problems with a Lisp routine that returns an error when it meets a multiline attribute. I ask it to pause for user imput and it just returns " \ unkown imput" andthen stops. I have ...
1
vote
1
answer
69
views
When to use formatter?
I have looked a bit on the so called format compiler, the formatter macro. I have seen the discussion here, and I think I understand the theory. However the practice is a little-bit muddy. Or rather ...
2
votes
2
answers
115
views
Late binding in Racket Scheme can't be found in a let-environment
I am starting to learn the Scheme programming Language with Racket. I have a function in which another function is called, however this inner-function is not defined until after the definition of the ...
0
votes
1
answer
51
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
4
answers
161
views
Evaluation of expression in operator position of a list
I am trying to learn Lisp, but it seems like I can not quite get behind how the quotes and the evaluation works. Why does the following expression
((car '(car)) '(a b))
not evaluate to a in the REPL? ...
2
votes
0
answers
75
views
issues with set-car! when implementing SICP evaluator in Racket
I am implementing circular evaluator in Chapter 4 SICP with racket, it seems that the code running fine only it cannot add new frames to the environment due to set-car! issue.
I tried the followings:
...
Advice
2
votes
16
replies
6k
views
In Common Lisp, replacing "get-setf-method" with "get-setf-expansion" is not always working
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 ...
1
vote
1
answer
104
views
OpenBLAS gemm 2x slower in Lisp CFFI compared to direct C calls with same BLAS library
I'm experiencing a significant performance difference where OpenBLAS matrix multiplication runs 2x slower when called through Lisp CFFI compared to direct C calls, despite using the exact same ...
0
votes
1
answer
92
views
How does Lisp’s macro system differ from regular functions, and when should I use macros instead? [duplicate]
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 ...
0
votes
2
answers
67
views
Can I conditionally select a special-form at the beginning of an expression?
If I want to make a special-form conditional (making its value depend on a condition) in an expression like (FUNC ARGS) by making FUNC a conditional expression (if).
I ended up trying with something ...
0
votes
1
answer
90
views
How to include a file with shadow-cljs/inline, but preprocess it first?
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 ...
2
votes
1
answer
231
views
How do I measure performance of Lisp code?
I'm trying to discern how much performance gains I would achieve by converting Lisp (SBCL) code to assembly language. The time function on SBCL keeps giving counterintuitive results even for trivial ...
-1
votes
1
answer
125
views
I can't see why Steel-Bank Common Lisp thinks a string is a function in my code [closed]
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 ...
1
vote
3
answers
157
views
Scheme evaluation of list
I wrote a simple intersection function on two lists:
(define (intersection l1 l2)
(if (null? l1) '()
(if (member (car l1) l2)
(cons (car l1) (intersection (cdr l1) l2))
(...
1
vote
1
answer
105
views
LISP macro indentation for sub-expressions?
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 ...
