Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
67 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
0 votes
1 answer
52 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
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
-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
2 votes
1 answer
73 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
2 answers
94 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
2 votes
0 answers
140 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.1k
0 votes
0 answers
31 views

I work with SBCL Common lisp. Sometimes I need to open a file for writing or reading. When these files are saved by Excel to One Drive, which is required for continuous updating, I don't know how to ...
ponipei's user avatar
  • 23
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
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
0 votes
1 answer
22 views

(setq *print-circle* T) ;; then create some list with a large number of items, of which a bunch ;; of them repeat If you then try to print the list in the repl, you will see a lot of unfamiliar text....
JEPrice's user avatar
  • 713
1 vote
1 answer
68 views

I successfully did load clsql with quicklisp. Loading of a source file with function definitions, which use clsql, was also successfull. When executing a clsql function I am getting this error. (clsql:...
klk2ptx's user avatar
  • 99
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
1 vote
2 answers
190 views

As a preamble, I am implementing two simple commands I can use via a little package in SBCL, which emulates Allegro repl. The package is sb-aclrepl, found in the contrib folder in SBCL sources. The ...
myname's user avatar
  • 368
1 vote
1 answer
228 views

In Common Lisp, is it possible to programmatically manipulate a lexical environment at runtime? If I create a closure, typical let-over-lambda, as described in D. Hoytes LOL-book, how can I augment ...
myname's user avatar
  • 368
1 vote
1 answer
120 views

My goal is something akin to Chapter 12 of Land Of Lisp: using the usocket package in SBCL I want to write a local server that I can connect to with my browser. I started from a helpful example: #!/...
Dominik Mokriš's user avatar
1 vote
0 answers
49 views

I got this weird issue that log4cl output duplicate logs in thread functions when running as script: #!/usr/bin/sbcl --script (require :asdf) (require :log4cl) (log:config :debug) (log:info "...
xiepan's user avatar
  • 782
3 votes
1 answer
233 views

The UTF-8 string in example seems to be coded with too many bytes! The input string: "👉TEST📍TEST" “👉” (U+1F449): A hand pointing right “T”, “E”, “S”, “T”: Basic Latin letters “📍” (U+...
Robert's user avatar
  • 2,812
2 votes
1 answer
68 views

I noticed that if I setf *print-circle* to T, then it prints circular list: CL-USER> (setf *print-circle* t) T CL-USER> (let ((x (list 1))) (setf (cdr x) x) x) #1=(1 . #1#)...
xdavidliu's user avatar
  • 3,118
3 votes
1 answer
83 views

What's going on in the interaction with SBCL REPL below (the last form)? TEST> (acons 'k 'v1 nil) ((K . V1)) TEST> (assoc 'k *) (K . V1) TEST> (push 'v2 (cdr *)) (V2 . V1) TEST> (cdr '(K . ...
John Badie's user avatar
1 vote
0 answers
146 views

I wrote a custom reader macro for printing hash tables: #| Custom printer for hash tables |# ;; object = hash table ;; stream = output stream (defmethod print-object ((object hash-table) stream) (...
myselfesteem's user avatar
2 votes
1 answer
168 views

I'm finding that SBCL (2.4.0, on x86-64 Linux) is having trouble optimizing character accesses in strings. The following code (compile nil '(lambda (s) (declare (optimize (speed 3)) ...
nose26's user avatar
  • 21
0 votes
0 answers
56 views

I used to have a function in GNU clisp like this: (defun showVersion() (let ((currentVersion 1.0)) (format t "My software current version: ~a.~%" currentVersion)) ) ; End of ...
Michel's user avatar
  • 11.9k
2 votes
2 answers
123 views

I am trying to write a macro that would generate code that looks like: (defun test () (let* ((_ (exp1)) (_ (exp2)) ... (_ (expn))))) The (expn) calls might be ...
marked-off-topic's user avatar
1 vote
0 answers
108 views

I'd like to be able to pause the execution of a computationally intensive thread when the user clicks a pause button and pick up where it left off when the user clicks on a button to resume ...
Duncan Britt's user avatar

1
2 3 4 5
19