libera/#commonlisp - IRC Chatlog
Search
23:17:39
_death
jasom: well, looking at say https://github.com/lz4/lz4 it's not a huge library and the code doesn't seem so obfuscated
23:37:13
_death
apparently there was an actual (court) battle between stacker and dblspace (microsoft).. https://en.wikipedia.org/wiki/Stac_Electronics#Microsoft_lawsuit .. anyway, offtopic
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.