Re: [racket-users] canvas% mouse event handling difference in Racket CS?

2021-05-22 Thread schle...@gmail.com
Actually the flag version does not work for me. (I thought it did because on-paint was fast enough not to be noticed that it was sequentially processing every mouse event with a paint call) #(struct:v2 109 80) ;; mouse pos draw ;; beginning of draw cpu time: 8 real time: 8 gc time: 0 ;;

[racket-users] Registered on irc.libera.chat

2021-05-22 Thread Tony Garnock-Jones
Hi all, I just registered the Racket project on irc.libera.chat with ownership of #racket and #racket-*. Would those who have served as chanops on freenode who are willing to also do the same for libera.chat please email me privately to let me know your nick etc.? Thanks! Tony -- You

Re: [racket-users] How to write a program to catch every SIGINT and print "hello"

2021-05-22 Thread Nathaniel W Griswold
Ok, i think i found in the kernel where this is set up. ``` (define 1/check-for-break ... (let ((exn:break*_0 (let ((tmp_0 (thread-pending-break t_0))) (if (eq? tmp_0 'hang-up)

Re: [racket-users] canvas% mouse event handling difference in Racket CS?

2021-05-22 Thread Jens Axel Søgaard
Den lør. 22. maj 2021 kl. 05.37 skrev schle...@gmail.com < schleesi...@gmail.com>: > I have a racket gui app that uses a canvas% with overridden on-event and > on-paint methods. > When the user hovers over drawn elements the on-paint is called via (send > this refresh) > to display the element

Re: [racket-users] Freenode -> libera.chat

2021-05-22 Thread Yury Bulka
A more general remank on the governance of these channels (freenode / libera, but also other non-IRC venues like Discord or Slack). I think it is important that there is no ambiguisty as to whether the Racket project has meaningful control over a given communication channel. For instance, if

[racket-users] Re: canvas% mouse event handling difference in Racket CS?

2021-05-22 Thread schle...@gmail.com
I tried your flag version too, I like it, it works without delay and is simple. But theoretically you can have situations where the drawn output doesn't fully represent the current state (if some things were already done and the data was changed afterwards). Unless I misunderstand your

[racket-users] Re: canvas% mouse event handling difference in Racket CS?

2021-05-22 Thread Alex Harsányi
On Saturday, May 22, 2021 at 12:42:30 PM UTC+8 schle...@gmail.com wrote: > Maybe someone has a clever solution to collapse the calls to refresh less > manually. > I experienced a similar problem as you, where I have to refresh a canvas on a mouse event and the paint method is somewhat slow

[racket-users] Re: canvas% mouse event handling difference in Racket CS?

2021-05-22 Thread schle...@gmail.com
The difference between 23ms and 50ms was that the memoization wasn't doing its job. I removed some calls to get-brush and set-brush, only calling set-brush when the color changes. (only writing the value not reading it) Specialized a function that returned an ignored argument, to not calculate