Search
3:06:52
beach
Good morning everyone!
13:20:58
scymtym
is there anything useful (coerce … 'real) could do? i don't see it
13:25:17
beach
Take the real part of a complex number? Doesn't sound that useful though.
13:28:41
scymtym
do you have an example? i can't find one. (complex 1 0) returns a real and (coerce (complex 1 NOT-ERROR) 'real) returns an error
13:29:49
jackdaniel
that wouldn't be coerce though, you'd lose imaginary part
13:30:01
scymtym
(context: i'm investigating why CLIM:MAKE-BOUNDING-RECTANGLE is slow)
13:30:18
scymtym
maybe it uses COERCE as an (expensive) type check
13:31:21
jackdaniel
I can help with that, coerce there was implemented for rounding to floats at the beginning
13:31:32
jackdaniel
and it is permissible by the spec (I can't remember where it is written)
13:31:41
jackdaniel
for sake of making operations faster
13:31:59
jackdaniel
but it was commented and as an oposite to double-float someone changed that to real
13:32:20
jackdaniel
Core/clim-basic/coordinates.lisp
13:32:31
jackdaniel
you may git-blame to investigate the commit messages there
13:33:16
jackdaniel
commit message goes like this:
13:33:16
jackdaniel
Took the easy route: I switched COORDINATE to being just REAL in an
13:33:16
jackdaniel
attempt to keep McCLIM running using the latest CMUCL. This is however
13:33:17
jackdaniel
a questionable thing as it hides the real type errors.
13:34:05
jackdaniel
also it should not call coerce but rather function coordinate
13:34:25
scymtym
ok, that's kind of a big deal for correctness as well as performance