libera/#commonlisp - IRC Chatlog
Search
2:42:39
_jlk_
hello! I'm a bit stumped and could use a hand... if I define a metaclass with slots, I can supply initargs in the class by providing additional options to defclass, so far so good, even if they are wrapped in a list. If I do the same thing with a metaclass for a generic function, passing additional options through defgeneric causes an unsupported-option error. I guess the question is, how to I actually provide values to the generic
3:48:11
Nilby
_jlk_: i'm not sure, but if you're designing your own function metaclass i.e. your own class of generic functions, you probably have to make your own defgeneric like macro which supports your own options, which seems a bit tricky, but is basically a wrapper around make-instance and ensure-generic-function[-with-class]
3:56:23
Bike
yeah, you should pretty much just need to call ensure-generic-function. the macro layer isn't as flexible as the functional.
4:02:32
_jlk_
cheers for the responses, that's pretty much what I'm thinking. cltl suggests that implementations can extend defgeneric to include other options (with similar wording to defclass), but sbcl and ccl at least don't seem to allow user extensions. makes me wonder if the defclass version wouldn't be portable anyway.
13:02:54
Guest74
the word Lisp never seems to make searching easy. Couple that with Parts Of Speech and your lost in an entirely different domain.
13:04:38
flip214
Guest74: "Common Lisp" works better... and it only takes a few searches for Google to know your interests, too ;(
13:06:06
Guest74
actually I've switched to duckduckgo a while ago. Which makes me think I found that other library with google. I might try that.
14:00:07
Guest74
the only parts of BABEL I've seen people use are things like babel:octets-to-string. Who knew it's an "all-in-one toolkit for multi-agent experiments on emergent communication" and fluid construction grammars.