343519265
2019-3-31 12:08:01

I didn’t change the default value of it, I change it according to how many events are received and restore it immediately after the composed wheel event emitted. For example, If 10 wheel-down events are received, I increased it to 10 times and call the on-char from super class with a single wheel-up event.


343519265
2019-3-31 12:14:23

It seems the reason of scrolling problems is that the os deliver wheel events much more quick than DrRacket’s redrawing. My code just limits the frequency of redrawing for wheel events, and it works well for me.


soegaard2
2019-3-31 14:04:35

Why not put it in DrRacket?


soegaard2
2019-3-31 14:58:37

Huh. Using \epsilon in DrRacket inserts an epsilon as expected. But if I copy paste it - I get a prompt to normalize the inserted string - and then I get a different epsilon!


343519265
2019-3-31 15:36:27

I think DrRacket would need similar things, but my solutions, which only use public APIs, are really ugly hacks. It would be better to be built into DrRacket deeply, which I am unfamiliar with.


shu--hung
2019-3-31 17:49:09

$\epsilon$ and $\varepsilon$, interesting


jbclements
2019-3-31 20:16:40

vincent: ping!


jbclements
2019-3-31 20:16:49

@stamourv ping!


stamourv
2019-3-31 20:18:47

@jbclements: Here!


stamourv
2019-3-31 20:18:53

Let’s move to PMs.


jbclements
2019-3-31 20:21:12

yeah… uh… tell me how that works on slack …


oskar982
2019-3-31 20:29:38

@oskar982 has joined the channel


lexi.lambda
2019-3-31 21:52:54

Will (call-with-output-bytes newline) return #"\r\n" on Windows? I don’t have a Windows machine to check.


samdphillips
2019-3-31 21:57:58

Not on my system


samdphillips
2019-3-31 21:58:06

DrRacket 7.1


lexi.lambda
2019-3-31 21:59:13

Thanks. I wonder if there’s a way to get the right newline sequence for the current platform.


samdphillips
2019-3-31 21:59:22
(call-with-output-bytes newline)
#"\n"

lexi.lambda
2019-3-31 22:00:11

I know that normally it doesn’t matter, since reading/writing a file in text mode automatically converts as-needed in Racket. But in my case I’m just looking at some bytes, and I can’t depend on the automatic conversion.


notjack
2019-3-31 22:40:14

What I usually do is I implement hash-proc by extracting a list of the fields in the struct I care about and calling the recur function on that list. I also toss in a gensym so that struct instances have a different hash code than actual lists. Something like this:

#:methods gen:equal+hash
[(define (this->list this) (list ... important fields only ...))
 (define datatype-gensym (gensym))
 (define (equal-proc this other recur)
   (recur (this->list this) (this->list other)))
 (define (hash-proc this recur)
   (recur (cons datatype-gensym (this->list this)))
 ;; the recur argument given to hash2-proc
 ;; returns different codes than the one given
 ;; to hash-proc, so using the same implementation
 ;; for both still gives us a different secondary
 ;; hash code
 (define hash2-proc hash-proc)]

notjack
2019-3-31 22:41:57

This allocates lists every time equal? is called or hash codes are computed, but… oh well. It’s simple, easy to maintain, and gets the job done.


ben
2019-4-1 00:53:55

hey, if anyone has thoughts on plots & color maps please comment on this pull request: https://github.com/racket/plot/pull/52


shu--hung
2019-4-1 02:20:40

for \r\n: looks like it is converted at the rktio layer https://github.com/racket/racket/blob/master/racket/src/rktio/rktio_fd.c#L947 so perhaps you have to look at (system-type 'os) and repeat what open-input-file documented


philip.mcgrath
2019-4-1 02:36:06

I played with a #lang a little, a while ago. I remember there being a few annoying things: for example, wasm exposes the payloads of nan values, which Racket doesn’t.