Search
Friday, 15th of January 2021, 6:28:25 UTC
12:24:56
VincentVega
Hmm, why does closer-mop:slot-definition-writers accept only a direct-slot-definition as an argument? What if I have a derived class and want to see writers for an inherited slot?
12:28:02
jmercouris
Hi everyone, I'm having a bit of an issue with GIR
12:28:02
jmercouris
http://dpaste.com/48K5L8AVL
12:28:25
jmercouris
I don't understand why it cannot find that which exists, do I hvae the repository wrong? the signature wrong?
12:29:09
jmercouris
VincentVega: perhaps you will have to go up the inheritance tree and query the object which has the slot itself
12:29:49
jmercouris
well I assume classes are also objects?
12:30:04
jmercouris
I don't see why they wouldn't be...
12:32:09
VincentVega
jmercouris: well, that could be a solution, but I am wondering what's the reason for this, because it's weird to see this work
12:32:12
VincentVega
(c2mop:slot-definition-writers (first (c2mop:class-direct-slots (find-class class-name))))
12:32:22
VincentVega
(c2mop:slot-definition-writers (first (c2mop:class-slots (find-class class-name))))
12:32:40
jmercouris
I'm not sure what the rationale behind it is I am afraid
12:32:53
jmercouris
maybe the slots are referenced to the original object or something
12:33:10
jmercouris
and that way when you change something in a inherited class it updates in its descendants
12:33:14
jmercouris
purely a guess of course
12:33:56
jmercouris
my other guess is that this behavior is due to an implementation detail of CLOS within most implementations
12:35:39
VincentVega
but walking up the inheritence tree won't give me the effective list of writers/readers of the derived class unless I manually merge and that's a bother
12:36:03
jmercouris
VincentVega: what is your ultimate goal in doing this
12:36:06
jmercouris
perhaps we can solve it another way
12:36:44
VincentVega
I am generating :before methods for writers of those slots which invalidate cache of other slots
12:37:26
jmercouris
I don't think there is another way
12:37:39
jmercouris
because you need have access to all writers
12:37:45
VincentVega
yeah, I gotta have the wiretrs : )
12:38:34
jmercouris
maybe you could make an instance of an object and inspect that more easily than the classes
12:38:48
jmercouris
and then at runtime generate the new methods
12:39:26
VincentVega
i don't think it would even have to be runtime w/ eval-when :compile-toplevel, right?
12:39:34
VincentVega
but I will look for a more direct approach first
12:39:53
jmercouris
good luck, hopefully someone else has better ideas than me
13:12:12
mfiano
jmercouris: I think you have a slight mistake
13:14:52
devon
pjb: Earlier you mentioned a C to CL compiler…
13:15:57
mfiano
Ignore me. I would dig into GIR's hash table and see what it expects
13:31:18
jmercouris
mfiano: that is what I am doing, but it is not exactly the most cooperative interface...
13:46:48
mfiano
I feel your pain. Just looking at those APIs reminds me why I declined the offer...
16:50:56
Lord_of_Life_
** NICK Lord_of_Life
17:47:33
slyrus
shka_: how about just vellum:table instead of vellum:to-table?
Friday, 15th of January 2021, 18:28:25 UTC