Search
Tuesday, 14th of January 2020, 19:21:15 UTC
19:37:15
Bike
when i have this code in a function it's broken. when i put it back in the body of the function where it was it works fine. the types match up. this is frustrating.
19:38:12
Bike
maybe it's this stupid cast
19:55:12
Bike
it's the stupid cast. god damn it.
19:55:42
Bike
it works with a Symbol_sp and not a Symbol_O*. i don't know how that's even possible.
20:34:41
Bike
https://pastebin.com/PiB42mxJ If I switch in the commented line the function returns a stupid number instead of 0, and things segfault. I don't understand how this is possible. drmeister, any idea?
22:04:31
kpoeck
I am a lot further building sbcl with clasp
22:04:43
kpoeck
It now stops compiling something like
22:04:57
kpoeck
(defstruct foo (bar 42 :read-only t))
22:05:25
kpoeck
(defstruct (ifoo (:include foo (bar 43))))
22:05:41
kpoeck
Condition of type: SIMPLE-ERRORMutable slot BAR cannot override read-only included slot.
22:06:39
kpoeck
Looking at clhs 8.1.1 defstruct it seems to clasp is correct and sbcl uses incorrect code
22:06:46
specbot
Couldn't find anything for 8.1.1.
22:07:00
Bike
is that just the defstruct page?
22:08:41
Bike
i'm not sure if it's really incorrect
22:08:43
kpoeck
sorry I meant the text "A normally writable slot can be made read-only. If a slot is read-only in the included structure, then it must also be so in the including structure. "
22:08:57
kpoeck
You seem to have implemented that
22:09:04
Bike
i did, but now i'm wondering
22:09:21
kpoeck
From the text it seems that you did the right thing
22:09:38
Bike
it could also be read as indicating that it should just silently accept it and generate only a reader
22:11:12
kpoeck
the code that errors is here:
22:11:14
kpoeck
https://github.com/stassats/sbcl/blob/master/src/code/type-class.lisp#L593
22:12:04
kpoeck
hash-value switches from read-only t to read-only not defined -> nil
22:12:36
Bike
yeah, it's the "not defined means nil" thing i'm wondering about.
22:13:14
Bike
could accept it by changing (when (and accessor old-reader) (error ...)) to (when (and accessor old-reader) (setq reader accessor accessor nil)), probably
22:13:53
Bike
or perhaps a bit more intelligently to distinguish a lack of read-only from :read-only nil
22:14:03
Bike
but nobody will do that and i'm honestly pretty sick of defstruct after this rewrite
22:14:34
selwyn
clasp can't load quicklisp https://www.irccloud.com/pastebin/JPBEt9TG/
22:17:03
kpoeck
I can load quicklisp fine, something must be different
22:20:10
kpoeck
is quicklisp loaded from your .clasprc?
22:20:30
cracauer
is one of you on mac and the other on Linux or freebsd?
22:23:26
cracauer
symbol lookup with the llvm9 change and the associated JIT change is a bit different on the platforms.
22:23:32
selwyn
yes it is loaded from .clasprc
22:25:39
kpoeck
I also have an ubuntu box, so let me try there
22:39:13
kpoeck
trying build/clasp --eval "(require :asdf)" --load "~/quicklisp/setup.lisp" on my ubuntu virtual machine
22:40:52
kpoeck
trying (ql:quickload :alexandria :verbose t)
22:50:25
selwyn
well, it worked after i deleted .clasprc and clasp --eval '(load "~/quicklisp/setup.lisp")'
22:52:26
selwyn
now it works after (ql:add-to-init-file). how strange.
22:52:45
selwyn
well, thanks for checking
22:58:51
kpoeck
but great that it worked
22:59:32
kpoeck
getting too late here goodnight
4:55:25
beach
Good morning everyone!
Wednesday, 15th of January 2020, 7:21:15 UTC