
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).

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.

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

is it “pkg-build”?

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


Thanks!

Anyone not using a Mac?

On linux I don’t see much difference myself

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

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

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?

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

Thanks.

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"

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.

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?

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

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).

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

I tried making the cocoa layer do that automatically but ran into segfaults because I was retaining the NSEvent
s 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.

what’s the network mode your VM is using?

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


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

you should be able to see two addresses

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

I think it just doesn’t know

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'

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

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

yes

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

That’s my impression too. Thanks

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

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

ugh I should have changed the #:snapshot-url

@accelerato1994 has joined the channel

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

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.

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.

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

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

Just remembered another trick is (error 'oops)

did you guys make your package building work?

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

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

it says command not found

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