freenode/#clasp - IRC Chatlog
Search
4:30:47
Bike
er, maybe i'm misremembering. the thing with turning generic functions into things that have behavior for all possible argument dispatches
4:32:31
Bike
anyway, i wrote a method class and function that can do everything an effective method does (unless it has a really weird method combination, because i'm not clear on those details
4:35:49
Bike
But, I mean you can get a regular function that takes the same parameters as the generic function, and does its behavior (without dispatching)
4:37:54
beach
I see. Well, drmeister thinks that turning a generic function into a function is related to satiation, but it isn't. That idea comes from phoe and it has no name (yet).
4:38:30
Bike
I thought satiation was to take care of things so you could load fasls into an image without CLOS.
4:38:33
beach
So you are not just turning an effective method into a function, but the entire generic function?
4:39:08
Bike
no, just an effective method. you basically do (multiple-value-call #'static-effective-method (compute-effective-method ...))
4:42:49
Bike
effective-method returns a form made of call-method and make-method, which are local macros.
4:44:05
Bike
compute- i mean. Like, if there's only one primary method and it's standard method combination you get back (call-method #<METHOD> ())
4:46:13
Bike
i'm thinking of optimizations i can do with make-instance so i'm getting deep into mop stuff for a bit
4:46:31
beach
I am sure it is, and I am just not understanding what it is you did and how it is related to satiation.
4:49:11
Bike
You can do (eval (static-effective-method (mop:compute-effective-method gf mc methods) nil)) and get back a normal function f such that (gf ...) and (f ...) do the same thing, if the ... have the same applicable methods as passed to compute-effective-method.
4:50:45
beach
But you are saying that a single effective method does what the generic function does.
4:51:09
Bike
nono, that's what the "if" is supposed to mean. if the arguments to the gf had different applicable methods the static method won't work.
4:51:13
beach
Despite my asking before whether you turn the entire generic function into a function.
4:52:22
Bike
it's all pretty confusing, but i think i can use this. plus using make-method-lambda was surprisingly non painful
4:56:08
beach
I think it is good that you are looking into the MOP. Don't hesitate to look at the CLOS directory of SICL, or to contribute to it.
14:25:39
Bike
is compute-effective-method allowed to return funcalls and stuff instead of call-method and stuff?
14:28:04
beach
At the risk of being unclear once more, in the method that specializes only on classes specified in the MOP, you can do what you want, since there is no conforming way for client code to observe what is done.