[gambit-list] Segfault while running Gambit; values/receive efficiency
andrew cooke
andrew at acooke.org
Sat Aug 18 15:51:37 EDT 2007
The segfault seems to be caused by a misplaced paren in
(define (nap-transform-point transform point)
(receive (a b c d e f) (unpack6 transform)
(receive (x y) (unpack2 point)
(list (dot (row1 a b c d e f) (xyz x y))
(dot (row2 a b c d e f) (xyz x y))))))
(this is the corrected version - the previous code has an additional close
at the end of the line with the second receive).
I would still appreciate comments on whether this is a reasonable approach.
Thanks,
Andrew
> Hi,
>
> Well, first of all this segfaults:
> qp6 napito: ./napito-base.scm
> Segmentation fault
> which I guess is a bug.
>
> But also, I got a bit carried away trying to remove function calls in
> matrix multiplication. I'd appreciate some advice - if the code worked,
> would it be efficient? In particular, do the values/receive pairs get
> "compiled away"?
>
> I hope the code is fairly obvious - I'm trying to unpack a list with
> contains the non-zero elements from a typical 2D geometric transform and
> then do the matrix multiplication on a point.
>
> Thanks,
> Andrew
>
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>
More information about the Gambit-list
mailing list