libera/#commonlisp - IRC Chatlog
Search
21:20:06
_death
I see.. but there you have two different treatments.. one tests using subtypep and another using eql
21:25:53
_death
sure, I was thinking (deftype f () 'single-float).. also note that unlike say (unsigned-byte 8) the single-float type has an implementation-dependent representation, but I guess it's not a disaster to assume ieee floats for single/double :)
21:29:34
shka
and absolutely don't look at the main project source code if you are scared of few safety 0 :D
21:30:35
shka
_death: one more think, i am using chipz/salza2 for compression, but it is not amazingly fast
21:32:16
_death
I think there was another one, based on Franz code.. don't know about their performance.. I guess it's always possible to optimize them and submit PRs ;)
21:43:08
_death
new compression schemes come out all the time, many about speed.. but Lisp community is too small to keep up and reimplement in pure lisp ;)
21:48:22
_death
but since it's algorithmic code, maybe translating from the plain C versions could be automated, somewhat
22:54:30
jasom
_death: I don't know about modern compression algorithms, but the C code for some older compression software I looked at was quite obfuscated from the algorithm. I suspect hand-tuning for pcc or early versions of gcc to generate fast code.
23:03:47
iisi
I only vaguely remember a compression battle between DiskDoubler and, uh, Stacker, maybe. The latter was a disk driver. Both, hand-optimised assembly.
23:06:04
iisi
ACTION tries in vane to think of a way tie this back to Lisp, retreats into a darkened corner
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.