freenode/#lisp - IRC Chatlog
Search
23:23:10
jasom
Is there a library that makes a non-seekable stream (somewhat) seekable by adding buffering on top? I'm thinking something that guarantees always allowing seeking back N elements (up to the beginning, where N >> 1 and is possibly configurable)
23:28:16
mfiano
A Gray stream wrapper for that would be only a couple lines of code not even worth a library
3:30:55
jasom
mfiano: it's not the number of lines of code, it's how long it takes to write the lines of code. I've written something similar before and I had some subtle bugs with my first implementation.
8:56:57
beach
RPLACA and RPLACD should be considered low-level functions to be used mainly by the person creating the Common Lisp system, just like SETQ.
10:28:38
splittist
seok: have you read https://www.common-lisp.net/project/asdf/asdf.html#Configuring-ASDF ?
11:07:01
pjb
moon-child: rplaca is a function; (setf car) is a function too. (let ((cs (list (cons nil nil) (cons nil nil)))) (values (mapc #'rplaca cs '(1 2)) (mapc #'(setf cdr) '(44 55) cs))) #| --> ((1 . 44) (2 . 55)) ; (44 55) |# your choice.
11:08:07
no-defun-allowed
Nope, Clozure does not implement (setf cdr) as a function, and that is allowed somewhere in the standard.
11:09:37
no-defun-allowed
(setf getf) would most likely not be a function, for example, as it might push a new property into the place without modifying list structure.
11:11:05
pjb
moon-child: however, it looks like (function (setf car)) is not conforming: implementations could have no such function, and just hack setf, like for defstruct accessors.
11:12:11
pjb
moon-child: https://termbin.com/27m4 ; so you can see that you have to use rplaca when you need a function.