freenode/#lisp - IRC Chatlog
Search
19:05:41
emaczen
when trying to install SBCL I get the error output/prefix.def: No such file or directory
19:53:44
aeth
Incompatible changes in m.n.k releases is why distros typically never update SBCL until their next distro version, months/years later, in effect creating de facto stable versions (and probably different ones for each distro)
19:54:42
aeth
But they generally are afaik minor standards violations and the CL community takes the spec seriously
20:06:15
verisimilitude
Those minor violations tend to be related to CLOS, from the last times I've checked.
20:19:06
aeth
Generally if you can run your code in multiple implementations (e.g. SBCL and CCL) you shouldn't have trouble running it in new SBCL versions afaik.
20:19:37
aeth
If you rely on SBCL internals directly without a portability library, that's where things tend to be messy. Or, I guess, if you rely on assumptions about SBCL's implementation details of CLOS
20:22:59
emaczen
Is there a possibility of strange caching that makes compilation successful on the older version?
20:23:44
aeth
If you (1) rebooted, (2) didn't install *over* an older SBCL, and (3) cleared your cache, that's probably 99.9% of errors at the implementation level.
20:27:12
aeth
rebooting might help if something somewhere at some level got cached to an older version for some strange reason
20:32:00
aeth
emaczen: After that the only thing I can think of is to make sure you're using the correct SBCL.
20:33:17
scymtym
emaczen: if you paste the code, somebody else can verify that it does not compile in SBCL 1.4.16
20:37:41
scymtym
can you paste that part of the code? maybe it can be reduced to demonstrate the problem without depending on the rest of your code
20:42:50
emaczen
scymtym: I'm evaluating (typecase l1 l2) where MATCHING::L1 = :?LAMBDA-LIST MATCHING::L2 = (VERTEX (G DIRECTED-GRAPH) &KEY (KEY #'IDENTITY) (TEST #'EQ) IN ...)
20:44:20
emaczen
:?var is a custom deftype that succeeds when a type is a symbol with the first character being a ?
20:45:28
emaczen
The error in the backtrace is taking me to the next case down which is: (cons cons atom) which makes no sense anyway since l1 is not a cons
20:49:38
sukaeto
beach: re: a non-tiling WM in Lisp - what's wrong with just improving on StumpWM's floating window mode
20:50:36
aeth
emaczen: I would try writing the simplest possible case and putting it in a pastebin (Github and Gitlab have pastebins built-in)
20:51:26
emaczen
I got into this in the first place because I was just going to upgrade SBCL instead of trying to find older sources
20:56:52
aeth
emaczen: one thing you could try doing is compiling an SBCL half way between the current version and your last-working version, and continue doing a binary search until it breaks
20:59:19
verisimilitude
If I were you, I'd check my use with the relevant parts of the standard and, if I'm using it correctly, cease caring.
21:00:01
emaczen
verisimilitude: Yeah, I'm going to try what aeth said, and download and try other newer versions than 1.4.6
21:03:01
aeth
Because if that doesn't work, and it's a problem with SBCL, then that halves the range where things could have changed
22:28:18
dxtr
If I have to construct a separate list for it first then that's fine - but is there a suitable function for that?
22:32:10
actuallybatman
dxtr: I would do: `for i from 0 to (-1 (length list))` instead of `for elt in list` and offset the pointer as needed. maybe do a macro that captures prev and next per iteration to hide the loop details.
22:32:12
no-defun-allowed
(defun mapold (function &rest lists) (apply #'mapcar (lambda (&rest args) (list args (apply function args))) lists))
22:32:51
pillton
dxtr: (reduce (lambda (last current) (print (list last current)) current) (list 2 3 4 5) :initial-value 1)
22:36:34
tempate
is this function well written or can it be improved? https://bpaste.net/show/4f85298c746e
22:37:52
tempate
on a different note, is it possible to change where a cons should point to in a list? That is, can I make the second element point to the fourth, removing therefore the third from the list?
22:39:11
verisimilitude
Yes, tempate; there are RPLACA and RPLACD functions for this, although you'll usually want to use (SETF CAR) and (SETF CDR).
22:42:31
pjb
tempate: otherwise, it does exactly the same as yours, how can you say it's hard to follow?
22:47:33
makomo
tempate: it's like FLET, except it allow recursion and one function referencing another
22:54:37
aeth
prog and go instead of labels? something something lambda the ultimate something something
22:55:01
pjb
tempate: so the micro-optimization here is to choose between two local variable and a list, knowing that sometimes you will just throw away the list (ie. when the run length is 1).
22:55:53
pjb
tempate: also, since having a list is so important here, I would avoid `(1 ,i) and use instead (list 1 i). (actually I would use (setf run-length 1 item i)
1:11:05
Xach
dxtr: i have a trick i use but i don't know if it fits your situation, just curious about it.
5:58:25
fiddlerwoaroof
dxtr: one trick I've thought of is to use a cons cell where the car is a stack of previous items and the cdr is the remaining list
6:09:40
fiddlerwoaroof
here's a non-mutating version: https://fwoar.co/pastebin/676375393d12b9ba8ad525c85363b732e5c9604c.lisp.html