[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Two questions



1. I found yesterday that (floor x) returns
   a. an inexact number if the language option is Full
   b. an exact integer if the language option is Student
   (a) seems to be the "official" behaviour.
   Is it judicious to keep this difference?
   (Of course, you might have explained it somewhere in the doc, but
    still, I feel uneasy about this...)

2. Something funny happens with the GC.
   I gave to my students a silly exercise, to fill-up a triangle
   with colours interpolated linearly between RGB at vertices.
   (Well, not so silly. They learn a bit about colour spaces, and
   also about the decomposition of a vector in a non-cartesian
   frame... But it was just a double loop.)

   Under sixlib it was so slow, that we passed to the standard MrEd
   library. And it was still slow. Concretely: from time to time,
   just after the green recycling message the system froze for
   several dozens seconds, sometimes more...

   I started to cut everything into pieces, and I found the following.

   You can't change the colour of a selected pen.
   So, we generated a new coloured pen for each pixel.

   When, instead, I 
   A. Deselected the pen
   B. sent set-color to it
   C. selected it back to the current dc

   the drawing loop went smoothly, without these mad interrupts.

Does it mean that garbage-collecting of the WX objects (under Windows
at least) is so resource consuming that the system itself suffers??
Why?

Jerzy Karczmarczuk
Caen, France