popa.bogdanp
2019-12-13 10:33:26

Here’s a little video showing the difference between 7.4, 7.5 and 7.5.0.11 on my end: https://www.youtube.com/watch?v=gGnPfXbAgvE

Apologies for the vertical video. It was the only way I could self-film and get the screen and my scrolling hand into frame. The biggest issues seem to be related to accelerated scrolling. Even in the snapshot, it doesn’t quite behave like I would expect it compared to other macOS applications. I’m on macOS 10.14.5 (18F132).


popa.bogdanp
2019-12-13 11:13:06

The biggest problem with 7.4 and 7.5 for me is that scrolling doesn’t stop and reverse the moment I begin scrolling in the opposite direction, instead it finishes scrolling and then reverses, as if it’s queueing the scroll events. After that is the fact that the scrolling doesn’t accelerate as I would expect it to: it’s too slow.

I’m not sure if the stopping-when-I-reverse problem is still present in the snapshot or not because it accelerates too quickly, but the experience is definitely better than the other two.

Hope that helps.


capfredf
2019-12-13 12:09:44

@alexknauth what’s the name you gave to your guest os in virtual box?


capfredf
2019-12-13 12:10:20

is it “pkg-build”?


capfredf
2019-12-13 12:12:08

I think in (vbox-vm #:name "pkg-build" #:host "192.168.99.100") the value for #:name should be the same as the VM’s name


capfredf
2019-12-13 12:20:16

mflatt
2019-12-13 13:32:20

Thanks!


mflatt
2019-12-13 13:32:43

Anyone not using a Mac?


laurent.orseau
2019-12-13 14:07:15

On linux I don’t see much difference myself


laurent.orseau
2019-12-13 14:07:41

That is, it’s not horrible, but not really smooth either


robby
2019-12-13 14:09:19

Are you using a trackpad where you can “throw” the display (scrolling very quickly to the top or bottom), @laurent.orseau ?


laurent.orseau
2019-12-13 14:09:47

The optimization coach in verbose mode highlights in red things like (in-heap ...) and (in-sequences ...) in for loops. Is it just because it doesn’t know, or is it really because it could be optimized?


laurent.orseau
2019-12-13 14:12:14

I can put the scrolling wheel in freewheel mode if that’s what you mean. I tested both modes


robby
2019-12-13 14:12:33

Thanks.


alexknauth
2019-12-13 14:15:25

The #:host "192.168.99.100" is supposed to be the IP address taken from running hostname -I on the VM, right?

I’m having some problems with that, getting this error where 10.0.2.15 is both hostname -I on the VM and #:host in run.rkt, after archiving, downloading, packing, and writing checksums for all the packages: Waiting for VM "racket-pkg-build" to power on... VM "racket-pkg-build" has been successfully started. /usr/bin/ssh -R 18333:localhost:18333 racket@10.0.2.15 '/usr/bin/env' 'PLTUSERHOME=/home/racket/build-pkgs/user' 'PLT_PKG_BUILD_SERVICE=1' 'CI=true' 'PLTSTDERR=debug@pkg error' 'PLT_INFO_ALLOW_VARS=;PLT_PKG_BUILD_SERVICE' '/bin/sh' '-c' 'echo hello' ssh: Could not resolve hostname 10.0.2.15: nodename nor servname provided, or not known /usr/bin/ssh -R 18333:localhost:18333 racket@10.0.2.15 '/usr/bin/env' 'PLTUSERHOME=/home/racket/build-pkgs/user' 'PLT_PKG_BUILD_SERVICE=1' 'CI=true' 'PLTSTDERR=debug@pkg error' 'PLT_INFO_ALLOW_VARS=;PLT_PKG_BUILD_SERVICE' '/bin/sh' '-c' 'echo hello' ssh: Could not resolve hostname 10.0.2.15: nodename nor servname provided, or not known /usr/bin/ssh -R 18333:localhost:18333 racket@10.0.2.15 '/usr/bin/env' 'PLTUSERHOME=/home/racket/build-pkgs/user' 'PLT_PKG_BUILD_SERVICE=1' 'CI=true' 'PLTSTDERR=debug@pkg error' 'PLT_INFO_ALLOW_VARS=;PLT_PKG_BUILD_SERVICE' '/bin/sh' '-c' 'echo hello' ssh: Could not resolve hostname 10.0.2.15: nodename nor servname provided, or not known /usr/bin/ssh -R 18333:localhost:18333 racket@10.0.2.15 '/usr/bin/env' 'PLTUSERHOME=/home/racket/build-pkgs/user' 'PLT_PKG_BUILD_SERVICE=1' 'CI=true' 'PLTSTDERR=debug@pkg error' 'PLT_INFO_ALLOW_VARS=;PLT_PKG_BUILD_SERVICE' '/bin/sh' '-c' 'echo hello' ssh: Could not resolve hostname 10.0.2.15: nodename nor servname provided, or not known ssh: failed context...: /Users/Alex/Library/Racket/snapshot-7.5.0.3--2019-10-21/pkgs/remote-shell-lib/ssh.rkt:180:2: loop /Applications/Racket/2019-10-21/Racket v7.5.0.3/collects/racket/contract/private/arrow-val-first.rkt:555:3 /Users/Alex/Library/Racket/snapshot-7.5.0.3--2019-10-21/pkgs/pkg-build/main.rkt:452:5 /Users/Alex/Library/Racket/snapshot-7.5.0.3--2019-10-21/pkgs/pkg-build/main.rkt:445:2: install64 /Users/Alex/Library/Racket/snapshot-7.5.0.3--2019-10-21/pkgs/pkg-build/main.rkt:515:2: check-and-install70 /Users/Alex/Library/Racket/snapshot-7.5.0.3--2019-10-21/pkgs/pkg-build/main.rkt:123:0: build-pkgs57 "/Users/Alex/racket-pkg-build/run.rkt": [running body] temp37_0 for-loop run-module-instance!125 perform-require!78 Stopping VirtualBox machine "racket-pkg-build"


laurent.orseau
2019-12-13 14:17:20

Just tested again in freewheel mode, and it seems a little more reactive actually. It stops scrolling before reaching the end after scrolling then blocking, but it’s also not instantaneous.


laurent.orseau
2019-12-13 14:19:00

I can also see the garbage collection sign flashing constantly why scrolling (I assume these are the snippets that are now hidden?). What about collecting garbage once done scrolling?


robby
2019-12-13 14:19:50

It might make sense to try to allocate less while scrolling possibly, true.


popa.bogdanp
2019-12-13 14:22:03

FWIW, I linked gui-lib locally and dropped the GC calls from the scroll event handler of the editor-canvas. That didn’t make a difference in my case. I think the scroll handler needs to be able to merge different events and only perform scrolls on a timer (i.e. once every 1/60s).


alexknauth
2019-12-13 14:22:41

Though I suppose it’s also possible I did the OpenSSH step wrong


popa.bogdanp
2019-12-13 14:25:28

I tried making the cocoa layer do that automatically but ran into segfaults because I was retaining the NSEvents and then ran out of free time for the day, but I think something like that, either at the cocoa level or at the editor-canvas level might help.


capfredf
2019-12-13 14:27:32

what’s the network mode your VM is using?


capfredf
2019-12-13 14:35:44

I confused bridge mode for host-only adapter yesterday. Sorry about that

In the setting for network, you can add a new adapter using host-only


capfredf
2019-12-13 14:36:14

capfredf
2019-12-13 14:36:42

then start your vm again run hostname -I in the vm


capfredf
2019-12-13 14:36:51

you should be able to see two addresses


capfredf
2019-12-13 14:39:31

use the one starting with “192.” in your run.rkt


samth
2019-12-13 15:47:23

I think it just doesn’t know


ben
2019-12-13 16:02:27

make-sure-remote-is-ready is now timing out for me: /usr/bin/ssh -R 18333:localhost:18333 racket@192.168.99.100 '/usr/bin/env' 'PLTUSERHOME=/home/racket/build-pkgs/user' 'PLT_PKG_BUILD_SERVICE=1' 'CI=true' 'PLTSTDERR=debug@pkg error' 'PLT_INFO_ALLOW_VARS=;PLT_PKG_BUILD_SERVICE' '/bin/sh' '-c' 'echo hello'


ben
2019-12-13 16:05:10

hm, maybe ssh was waiting for a “yes/no” to add a known host


ben
2019-12-13 16:08:16

maybe the vm & host need to exchange authorized keys? (I only put the host key in the vm’s .ssh/ dir)


capfredf
2019-12-13 16:09:27

yes


ben
2019-12-13 16:11:46

or does the host need to change its .ssh/known_hosts file? (would both work?)


laurent.orseau
2019-12-13 16:17:49

That’s my impression too. Thanks


capfredf
2019-12-13 16:40:08

I don’t think you need to change the host’s .ssh/known_hosts


capfredf
2019-12-13 16:43:44

if you can ssh into the vm as the user racket (or any other user you specify in (vbox-vm …) ) without answering yes or no, then I think there is nothing else to be done for the ssh part


ben
2019-12-13 17:31:28

ugh I should have changed the #:snapshot-url


accelerato1994
2019-12-13 18:21:12

@accelerato1994 has joined the channel


popa.bogdanp
2019-12-13 18:35:06

I couldn’t resist. This patch to gui-lib fixes the scrolling issues for me: https://gist.github.com/Bogdanp/db5795634941ef4744461432ac290591

@mflatt @robby if I clean this up, would this be an acceptable approach?

demo: https://www.youtube.com/watch?v=868J22UnoFc&feature=youtu.be


mflatt
2019-12-13 18:50:14

It looks like you’re calling scrolling methods of canvases in a thread. Is that right? If so, that’s a problem. You can switch back to the main thread with queue-callback, but that may interfere with the timing you want; I don’t know.


popa.bogdanp
2019-12-13 18:53:30

Yes, I’m using the thread to time the updates so they happen roughly once every 16ms. I think queue-callback should also work. I think it’s the combination of collecting the events, folding them and only doing the scrolling work once per “frame” that’s making it responsive. I’ll change it up to use queue-callback tomorrow morning and see if that still works.


notjack
2019-12-13 18:57:30

You are all wonderful people. This scrolling thing is seriously the biggest frustration I have with Racket.


popa.bogdanp
2019-12-13 19:11:14

Using a timer% works great, too. I’ll clean up the code and make a PR tomorrow.


samdphillips
2019-12-13 20:49:31

Just remembered another trick is (error 'oops)


capfredf
2019-12-13 20:58:07

did you guys make your package building work?


ben
2019-12-13 21:13:36

I did (it’s still running). Alex is having very strange issues with the VM host network.

[[ He adds a vboxnet0, notes the hostname -I , restarts the machine, and now the hostname -I is different ]]

I’m going to send Alex my output so that he can start fixing any TR-opaque-related errors


capfredf
2019-12-13 22:00:23

@alexknauth can you post the content of /etc/network/interfaces on the vm?


alexknauth
2019-12-13 22:31:31

it says command not found


alexknauth
2019-12-13 22:33:28

Oh that’s because it’s a file, not a command. The file has the contents: # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback