freenode/#sbcl - IRC Chatlog
Search
16:34:52
phoe
A global property of our implementation (which unfortunately seems impossible to enforce with assertions or other in-the-code checks and constraints) is that subclasses which don't contain other types correspond to disjoint subsets (except of course for the NAMED-TYPE T, which covers everything). So NUMBER-TYPE is disjoint from CONS-TYPE is is disjoint from MEMBER-TYPE and so forth. But types which can contain
16:35:03
phoe
that is from https://github.com/sbcl/sbcl/blob/e3522369b5fa3fe78a597a64f5b5d8eca4e13bcf/src/code/type-class.lisp?ts=8#L144
16:36:38
phoe
so setting this to true on conses sounds reasonable for me - I'd need to hear some good reasoning for why a cons might *not* contain other types
16:37:26
phoe
so https://github.com/sbcl/sbcl/blob/a3991ed12c026b82d3242b5a5da3d1382dd7920c/src/code/early-type.lisp?ts=8#L685 does seem incorrect to me
16:42:17
pkhuong
phoe: if I declare that a value is of type (cons (eql 0)), its CAR may not always be 0.
17:02:26
phoe
if it has neighboring subtypes (neighboring as in with their exclusive rational bounds being the same number), and if that missing number is a subtype of the rest of the type
17:05:24
phoe
this would also fix ANSI-TEST subtypep.cons.43 but approaching it from a different side
17:06:12
phoe
so it's arguably better than fixing sbcl to answer nil nil instead - but might also require more time and digesting of sbcl type system
20:49:25
stylewarning
is there a higher-level API to get something into static space other than rolling with SB-KERNEL:ALLOCATE-STATIC-VECTOR?
20:53:09
stylewarning
I want to make use of static space and I'm not sure if there's a way to allocate data that doesn't require fiddling with widetags and bytes
20:57:43
stylewarning
Bike: i specifically want objects managed in the heap, which means they can't be C allocatedx
20:58:04
stylewarning
and static-vectors just ensures the objects won't move around (AFAIK) and not about their management, but I could be wrong
21:11:59
Shinmera
stylewarning: static-vectors may be gced (they are on ECL, for instance, but not on SBCL)
21:14:22
Shinmera
anyway, I regularly have fast-paths in my stuff that pins the array on SBCL (if it can be pinned and accessed directly)
21:17:08
saturn2
CFFI also has this interface https://gitlab.common-lisp.net/cffi/cffi/raw/master/doc/shareable-vectors.txt
21:21:45
phoe
stylewarning: so I guess that this is what you want, the provided objects will not be moved in the dynamic scope of that operator
22:28:06
phoe
and then it takes the header of the sap, meaning that it grabs and understands the fixnum as a header...