sorawee
2021-8-23 16:02:39

In a reddit post (https://www.reddit.com/r/Racket/comments/p9jr6e/problem_with_getting_min_value_from_list_of/), user bjoli made a point that (apply min xs) is going to be slower than a let loop that computes the minimum of xs manually. This appears to be true in Racket CS, but the opposite is true in Racket BC:

RacketCS (8.2) apply: 260ms let loop: 28ms RacketBC (7.9) apply: 102ms let loop: 489ms Is there any room of improvement for RacketCS’s apply?


mflatt
2021-8-23 16:32:47

I think what you’re seeing with very large lists is that rest-arg handling in min has to reconstruct a list of arguments that was copied to an argument stack; BC’s min uses the arguments directly from an argument stack, just because min is primitive enough. Compare with (define min (lambda args 0)), where the compiler sees that args is not used, so no list is re-created.


mflatt
2021-8-23 16:36:39

If I remember correctly, this paper is about an alternative: https://dl.acm.org/doi/10.1145/62678.62689


gknauth
2021-8-23 18:55:09

I have a text%, I highlighted a URL, or a filename, or an ID number. I made a popup-menu so I can do things like Visit URL, Visit File, Look Up ID, … When I right-click to bring up the popup, the highlight on the text goes away. Is there a way I can keep it? I need to keep the selection alive for what the popup will want to do with it.


massung
2021-8-23 19:34:40

How do you activate the popup menu? Does the selection actually go away (e.g. because you are clicking somewhere and the even goes through to the text% object and the selection changes) or does it just not render because of the focus loss?


jestarray
2021-8-23 20:14:00

if any of you guys are teachers here, can you send me some of the buggy/crashy student code that doesnt work? Just zip up a whole semesters worth? i’m making a programming course based off of HTDP2E and i’d like real world examples of what happens when they dont follow the design recipe


philip.mcgrath
2021-8-23 20:55:18

Are there known issues with DrRacket/racket/gui on Wayland? I’m finding, for example, that I can paste into DrRacket, and I can copy and paste within DrRacket, but I can’t paste from DrRacket to other applications. Specifically I’m on KDE, and it is very possible there could be issues with my local setup, but I thought I’d ask before I dig in much more deeply.


jestarray
2021-8-23 20:59:50

No issues for me, I’m on sway(i3) on arch linux running wayland


jestarray
2021-8-23 21:00:04

can copy between between both just fine


jestarray
2021-8-23 21:00:08

jestarray
2021-8-23 21:00:10

try installing that ^


notjack
2021-8-23 21:00:44

would you be willing to share the code you get? I’m making a static analysis tool and real world examples of buggy code would be great for mining tool improvements



jestarray
2021-8-23 21:02:29

hard to tell what applications are running on pure wayland or on xwayland compatibility layer


jestarray
2021-8-23 21:03:49

yeah no problem, hope some are willing to send


ben.knoble
2021-8-23 21:21:11

@notjack for a large-ish code base by a new-ish racket user, see https://github.com/benknoble/slack-archive-viewer; improvements welcome. (There are some design issues with the current implementation, but that shouldn’t affect it as an interesting place to try your tool.)


gknauth
2021-8-23 21:33:05

I’m capturing the event ’right-up in the text%. When I right-click after choosing some text, the highlighting vanishes. I didn’t actually check to see if the selection start and stop were still valid, but I’ll do that.


capfredf
2021-8-23 23:10:17

Is DrRacket an XWayland application? Copy-paste between XWayland and Wayland apps is still a work-in-progress in KDE.


philip.mcgrath
2021-8-23 23:16:29

As far as I can tell (with xwininfo) it is on Wayland, as are Konsole and Kate (two apps I tried to paste into).


philip.mcgrath
2021-8-23 23:19:36

But it does seem weird, because DrRacket mouseover tooltips are displaying in new windows.


philip.mcgrath
2021-8-23 23:22:30

To be even more specific, I’m trying this on Kubuntu 21.04 with the Kubuntu backports PPA, which gives me Plasma 5.22.4 and KDE Frameworks 5.85.0.


philip.mcgrath
2021-8-23 23:24:30

One way my local setup might be weird is that this is DrRacket installed via Guix, and thus linked against Guix’s GTK etc. rather than the system’s.