freenode/#sbcl - IRC Chatlog
Search
13:31:38
stassats
that slot-definition doesn't appear in class-slots, but that's why i'm using slot-definition-using-class
13:34:14
stassats
so how the hell do i change the instance slot protocol, if i can't do anything to it
13:59:00
Xof
I think it is a generic function, but you need to have all the applicable methods defined before you make anything that those methods might be applicable to
13:59:12
stassats
"The results are undefined if the slot argument does not appear among the set of effective slots associated with the class argument."
13:59:29
stassats
it's (defun slot-value-using-class-dfun (class object slotd) (declare (ignore class)) (funcall (slot-info-reader (slot-definition-info slotd)) object))
14:03:06
stassats
basically, i can't have a virtual slot without it allocating an unused space in the slot vector
14:09:40
stassats
i just use slot-value-using-class throughout, when iterating over class slots, as going definition-name->slot-value would just start at searching for the slot definition
14:17:49
Xof
I think you can have virtual slots; you just need to override slot-definition-location so that compute-slots doesn't allocate a location for it in the slot vector
14:18:30
stassats
i'm thinking of actually using the slot vector, since i have to actually control at runtime whether it's virtual or real
14:19:55
stassats
i could generate different classes at runtime with different slot arrangements and change-class...
14:20:11
specbot
slot-definition-location: http://metamodular.com/CLOS-MOP/slot-definition-location.html
18:39:01
makomo
stassats: i'm passing information between to an outer from its inner macros (contained within the body argument to the outer macro). the only way to do that involves manually expanding the body within the outer macro.
18:42:52
makomo
sure, but after expanding the body i need to traverse the body and find the "stashed away" results
19:02:23
scymtym
makomo: since you probably control the circumstances under which the dsl code is READ, you could use fare-quasiquote or eclector to control how ` is read
19:09:35
makomo
pfdietz: i know about the "incident" where the internal implementation of SBCL's backquote changed from the "usual list-based" to "structure-based" and a lot of people complaining
19:09:58
makomo
i get that macroexpand-all isn't a standard thing anyway, but what's the point of "-all" if it doesn't really expand everything :(
19:18:06
makomo
you could, but isn't it a bit of a stretch? the difference between this thing and other non-standard special operators is that they're all "list-based" afaik
19:19:16
Bike
i mean you don't know the semantics for the internal special operators. so you can't walk them unless you treat them specially anyway.
19:20:23
makomo
yeah, but that's where i rely on macroexpand-all to take care of that. my inner macros will leave bits of code with special markers in them in places that were supposed to be evaluated
19:20:53
makomo
only quasiquote "hides" the subforms within a structure which i would have to specially handle
19:24:51
makomo
yeah, i did get sb-walker working, but it's implementation-specific so i wanted something more general
19:29:26
makomo
Bike: hm, but even if my macros did find their way into a non-standard special operator, wouldn't they have to be expanded fully as part of compilation?
19:30:06
Bike
for example, if you had a defun in there, it would get expanded into something involving (function (sb-int:named-lambda ...)), last i checked
19:31:02
makomo
"walking" is really "traversing" here, because after macroexpand-all-ing, all i do is treat the code as a simple tree
19:34:03
makomo
are you saying that non-standard special operators could, just as quasiquote, use weird syntax?
19:36:35
Bike
or your macros or markers or whatever could be in an inappropriate context. like if they're part of a quotation, or the name of a variable
19:37:28
makomo
Bike: if would be the same problem as in fare's quasiquote then. if the user really wants to screw with the "parser", he could insert and use these internal markers, but that's insane
19:40:54
makomo
Bike: i don't think it would matter if it was behind a quotation or not -- if the macro was expanded in the first place (and then the expansion ended up quoted within a non-standard special operator), then it was in a context where it was supposed to be evaluated, no?