Skip to main content
-1 votes
0 answers
63 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
2 votes
0 answers
44 views

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: ...
QianruZhou's user avatar
Advice
1 vote
16 replies
198 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
1 vote
1 answer
74 views

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 ...
user31676144's user avatar
0 votes
1 answer
57 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
2 answers
56 views

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 ...
vmonteco's user avatar
  • 15.9k
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
2 votes
1 answer
171 views

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 ...
Iñaki Viggers'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
3 answers
135 views

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)) (...
david's user avatar
  • 1,593
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
2 votes
1 answer
74 views

I don't know if I am clear in the title, but here me out. I have a package in which I bind *read-default-float-format* to 'double-float. So far so good. When I load the library into fresh SBCL process ...
myname's user avatar
  • 368
3 votes
2 answers
73 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
2 answers
126 views

I have a class, in which I want some slots to be nil when object is created, but they should be only setable with objects of some certain type. Something like: (defclass Something () ((foo :initarg :...
myname's user avatar
  • 368
1 vote
1 answer
128 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

15 30 50 per page
1
2 3 4 5
470