Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
56 views

I'm reading a file with uiop:read-file-lines The documentation says: beware: be sure to use with-safe-io-syntax, or some variant thereof This is what I tried: (defun sample-input () (uiop:with-...
user1785730's user avatar
  • 3,841
Tooling
0 votes
0 replies
42 views

I have created a plugin for lazy: .config/nvim/lua/plugins/slimv.lua: return { "kovisoft/slimv" } Now, how do I start a REPL in neovim? I have also created a minimal common lisp file: ...
user1785730's user avatar
  • 3,841
2 votes
1 answer
87 views

When I use the REPL I get this result: * (block my-block (print "We see this") (return-from my-block 10) (print "We will never see this")) "We see this" 10 * ...
Retufom's user avatar
  • 45
Advice
0 votes
6 replies
84 views

Lisp beginner. I am trying to add an element to a list inside a function. (defun add-element (e lst) (setf lst (cons e lst))) I cannot use the return of the function to change the original list but ...
user2319244's user avatar
2 votes
1 answer
101 views

I tried to debug the function below (find-3rd-largest), and wanted to execute expressions step by step from (break), as I did for other programming languages. So, I compiled the function with C-u C-c ...
dhnam's user avatar
  • 163
Advice
2 votes
2 replies
61 views

In a package I am developing I often get lists of lists. The single lists are very long and I would like to write them on a file controlling the output length as in the example. If I simply use (write ...
ponipei's user avatar
  • 23
0 votes
1 answer
64 views

I am trying to understand why when I declare types, things seem to go very wrong in SBCL. Here's a little file I created to reproduce the problem: (defpackage p1 (:use :cl) (:export #:do-it #:keytype))...
Renato's user avatar
  • 13.8k
-1 votes
1 answer
67 views

About three years ago I tried to follow the GTK3 tutorial for Common Lisp. I had different problems then, but many of the examples worked without any complains. Now I took the time to reconsider it, ...
Demihm Seinname's user avatar
2 votes
0 answers
82 views

When I compile (with (speed 3)) the following (example) code with SBCL Common Lisp, the compiler issues this warning in relation with function triple returning a double-float: "doing float to ...
Nicolas56's user avatar
  • 186
Advice
2 votes
16 replies
206 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
3 votes
3 answers
246 views

I need to process 100 Gigabytes of logs in a weird format, then do some analysis on the results. Initial parts of parsing and CLI done, tried on some test data with 1 GB and it took around a minute. I ...
nemo nemo's user avatar
1 vote
1 answer
79 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
3 votes
3 answers
128 views

Context In Common Lisp, symbols are how names are bound to functions and variables and macros and a bunch of other stuff. I've been working with Parenscript, which is a DSL that compiles to Javascript....
Dan Passaro's user avatar
  • 4,446
1 vote
1 answer
35 views

While working on the REPL I didn't encounter this error, but when building my program or running it from sources I did: SWANK::*READTABLE-ALIST* is unbound
Ehvince's user avatar
  • 18.7k
2 votes
1 answer
182 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
5 votes
2 answers
279 views

I'm trying to revive Hemlock, which now appears abandoned (original author has been absent for some time now). Mostly this has been a straightforward process of clearing out the bit rot, but I'm now ...
CL-USER's user avatar
  • 848
-1 votes
1 answer
104 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
0 answers
132 views

Please correct any misapprehensions about Common Lisp syntax/parsing you see below ; I am not sure I fully understand it. In Common Lisp, it seems you cannot have (unescaped) function or variable ...
cjs's user avatar
  • 27.9k
1 vote
1 answer
67 views

This code creates an error: The slot COMMON-LISP-USER::NAME is unbound in the object #<THING {1002B830F3}>. I tried sbcl and clisp, both creating same problem. I can initialize instance of ash ...
nadirkazan's user avatar
1 vote
1 answer
89 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
1 vote
0 answers
64 views

Anyone got this issue? A working HTTP request with Dexador now fails: (dex:get url) 0: (FAST-HTTP.PARSER:PARSE-RESPONSE #<unavailable argument> #<unavailable argument> #<...
Ehvince's user avatar
  • 18.7k
3 votes
2 answers
76 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
2 votes
2 answers
145 views

I need to parse a word that contains combining diacritics, namely the #\COMBINING_ACUTE_ACCENT. The following string "Changement de Régime" contains 21 characters, since the 16th is the ...
Leo's user avatar
  • 1,962
1 vote
2 answers
103 views

I'm stumbling on a problem to capture special variables: This works: (let ((a 2)) (declare (special a)) (funcall (lambda (x) (declare (special a)) (+ a (* x 3))) 3)) => 11 But ...
Orm Finnendahl's user avatar
1 vote
2 answers
133 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
0 votes
1 answer
70 views

I noticed that both compile-bundle-op and monolithic-compile-bundle-op work as expected on traditional projects. That is, generating the FASL files: # compile-bundle-op FASL <asdf-fasl-project-...
Sebastian Carlos's user avatar
1 vote
2 answers
96 views

You can use the #. reader macro to get symbolic case labels in Common Lisp. Example: (defconstant +foo+ 1) (defconstant +bar+ 2) (defun quux (x) (ecase x (#.+foo+ "Foo!") (#.+bar+ ...
Chris's user avatar
  • 4,215
1 vote
2 answers
66 views

I have a macro to define initialization variables to the program. The macro is ... (defmacro defparm (var value &key (frequency nil) (date nil date-supplied-p)) "Macro to define starting ...
GregF's user avatar
  • 43
1 vote
1 answer
115 views

I have this macro: (defmacro if (test-form &body body) (let ((test (gensym))) `(let ((,test (cl:if (booleanp ,test-form) (cl-truth ,test-form) ...
Demihm Seinname's user avatar
2 votes
2 answers
80 views

I once read somewhere, that we can set a global Emacs variable to T (or NIL, I don't know) in order to (roughly) make Emacs accessible from Common Lisp. This information was in company with the ...
Demihm Seinname's user avatar
3 votes
1 answer
73 views

The output of the following function is suppressed: (defun foo () () (values)) So in the REPL this happens of course: CL-USER> (foo) ; No value I don't get the idea how to test that a ...
Demihm Seinname's user avatar
1 vote
1 answer
77 views

I'm starting to delve into Common Lisp's ASD Facility and am wondering, whether asdf:require-system is still useful in the described way. That is: With this function it is "appropriate to load ...
Demihm Seinname's user avatar
0 votes
1 answer
85 views

I am testing a minimal web server in SBCL using usocket: (defun create-server (port) (let* ((socket (usocket:socket-listen *hostname* port)) (connection (usocket:socket-accept socket :element-...
Tambarskjelve's user avatar
1 vote
1 answer
110 views

I've noticed an interesting difference between WITH-SLOTS and WITH-ACCESSORS in Common Lisp: WITH-SLOTS allows a shorthand syntax: (with-slots (slot1 (var-name slot2)) instance ...) But WITH-...
Sebastian Carlos's user avatar
3 votes
2 answers
35k views

I'm missing an obvious part of ASDF / quickload / sly, and it's starting to drive me nuts. It's mostly about the developer experience, but as I can't go past the very first steps, I'm unable to work ...
phtrivier's user avatar
  • 13.5k
1 vote
1 answer
88 views

I am working with Allegro CL 11.0 Express Edition on Linux (Ubuntu 16.04). I am seeing behavior from READ-SEQUENCE which is surprising to me. Is the following conforming to the CLHS? EDIT: Franz, Inc. ...
Robert Dodier's user avatar
1 vote
1 answer
67 views

In SBCL when I describe a lambda I get a bunch of detail: * (setf f (lambda (a b) (* a b))) #<FUNCTION (LAMBDA (A B)) {535B3C3B}> ...
jshrager's user avatar
  • 319
2 votes
0 answers
161 views

The Common Lisp standard includes bit arrays and logical operations on them, such as bit-ior, bit-and,... What the standard does not seem to offer is logical shifting of bit arrays. Of course, this ...
BitTickler's user avatar
  • 12.2k
2 votes
2 answers
115 views

Thanks in advance for the help! Here's the situation: I want to capitalize the first word in a sentence. I have the individual words in a sentence, stored as strings. In the case of the first word, I ...
Oliver Cox's user avatar
2 votes
1 answer
46 views

I have this lisp file: (load "constants.lisp") (defpackage :my-package (:use :cl)) (in-package :my-package) (format t "Constant value: ~A~%" my-constants:+my-constant+) And ...
Ignacio's user avatar
  • 367
0 votes
3 answers
94 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
150 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
1 vote
1 answer
76 views

I think I did this right in the past, but this time, I am kind of stuck... The code below is the CLOS style structure of a rope. Which in essence is a binary tree. For printing purposes, I would like ...
BitTickler's user avatar
  • 12.2k
0 votes
1 answer
125 views

I have created a search function following the BFS algorithm but found a problem, it works fine on other problem domains but on this problem domain I am only getting stack overflows. This specific ...
hrodric's user avatar
  • 435
1 vote
1 answer
61 views

i have a use case for a code walker. in my case, I want something that can analyse an expression at runtime and determine if it directly calls any of a small set of functions (let's say a single ...
Zoey Hewll's user avatar
  • 5,543
0 votes
0 answers
63 views

I'm following the instructions from the following website, to install their Theorem Proving System software, to complement a book that's recommended to my course. This can be found here: Downloading ...
Lime's user avatar
  • 766
4 votes
3 answers
250 views

The code I am working on is single threaded, but for the sake of this question, this is secondary. In Common Lisp, there is a (in my eyes) cool feature, called special variables and it goes like this: ...
BitTickler's user avatar
  • 12.2k
0 votes
1 answer
116 views

When interfacing with C libraries, in this case win32 in particular, there may be a large number of defined constants. In a C/C++ program these are just literal numbers when compiler sees them, the ...
myname's user avatar
  • 368
1 vote
1 answer
94 views

Given a class definition, is it possible to define one slot in terms of another, similar to how I would do it with let*? For example, I would like to be able to do something like this (which obviously ...
kflak's user avatar
  • 89

1
2 3 4 5
129