freenode/#clim - IRC Chatlog
Search
10:09:56
scymtym
jackdaniel: it doesn't seem like i published the code. i try can to work towards that today
10:10:43
jackdaniel
basically there were two slightly different atan* definitions (the second one did not coerce y to float), and the caller of atan* called the second definition while relying on type inference information from the first definition
10:17:47
jackdaniel
hm, apparently my minimal case is too simple and sbcl works correctly so you may need to load mcclim to reproduce
10:19:18
jackdaniel
put (defun atan* (x y) (let ((r (atan y x))) (if (< r 0) (+ r (* 2 pi)) r))) in region-utilities (notice that atan* is previously defined in transforms.lisp)
10:19:45
jackdaniel
quickload mcclim and invoke from climi package (bounding-rectangle (make-ellipse* 0 0 10 0 0 15 :start-angle 0 :end-angle (/ pi 2)))
10:20:51
jackdaniel
if you skip the second definition all works, likewise if you skip the first one or if you recompile untransform-angle by hand after loading
10:23:54
scymtym
i see, so the problem is related to redefinition. then why the COERCE instead of defining the function only once?
10:24:50
jackdaniel
coerce is still there because it proves to be more accurate in practice (I've mentioned that in the review discussion)
10:25:39
jackdaniel
i.e = works just fine when we use the same type as pi; when we take the type as is we have mismatches like /= 15.0 14.9999999999999999997
10:25:41
scymtym
ok, i'm probably getting ahead of myself here. i will try to read the discussion later
10:27:32
jackdaniel
n.b: I'd appreciate if you could find the time to publish the c99 thing when you have some time; no rush of course
10:28:11
scymtym
i didn't try to reproduce it yet but it seems likely that i will be able to. redefining a function after the inferred type of the previous definition has been used is something that causes problems in SBCL
10:28:43
scymtym
sure, i just have to remind myself what the state of the code is and potentially clean up a few things
13:35:40
scymtym
silly experiment: a module (mathematics) trait and an implementation for strings: (loop :for s :from 0 :to 1 :by 1/10 :collect (lerp s "Jackdanial" "Beach")) ; => ("Jackdanial" "Jackdania" "JackdaniB" "JackdanBe" "JackdaBe" "JackdBe" "JackBea" "JacBeac" "JaBeac" "JBeac" "Beach")
14:00:08
jackdaniel
we have a PiggyBea here, a pig masquotte which flies and does bzzzz (and chrm in the end), the little one likes it
14:04:50
jackdaniel
(flying and audio effects are produced by me, it is not a mechanical/electronic toy)