laurent.orseau
2022-4-22 19:17:55

All tests pass with the latest snapshot, with --drdr. I ran them 6 times.


laurent.orseau
2022-4-22 19:18:52

Apparently the tests now pass on DrDr too: http://drdr.racket-lang.org/60351/racket/share/pkgs/quickscript-test/drracket.rkt Not sure what was happening :thinking_face:


samth
2022-4-22 19:19:50

That’s very odd


laurent.orseau
2022-4-22 20:07:43

What does “me” mean in “wxme”? It seems to be a common base on top of the platform-specific “wx” implementation, is that right?


mflatt
2022-4-22 20:11:27

“Media editor”. The editor% class was originally wxMediaEditor, or something like that, which the idea of maybe being useful for other wxWindows users. Such ancient history.


spdegabrielle
2022-4-22 20:11:27

*Me*dia? I’m only guessing


mflatt
2022-4-22 20:12:00

Good guess! :slightly_smiling_face:


spdegabrielle
2022-4-22 20:12:17

Lol


laurent.orseau
2022-4-22 20:13:01

wow, that must be fairly close to the beginnings of PLT Scheme!


laurent.orseau
2022-4-22 20:17:54

Is there a place where I can read about the rationale of the complexity of the keymap% implementation? In particular the scoring algorithm: https://github.com/racket/gui/blob/master/gui-lib/mred/private/wxme/keymap.rkt#L196

(I think a lot of my keybinding issues with DrRacket are due to this complexity)


mflatt
2022-4-22 20:18:14

Yes, the very very beginning


mflatt
2022-4-22 20:20:31

No, that’s all there is. There’s nothing more to say beyond it being an attempt to make sense of the way that a key combination can mean different things, and you have to pick among the possible meanings.


laurent.orseau
2022-4-22 20:24:53

I see, thanks.

I’m strongly considering attempting a different approach, a la Emacs, where the user merely types the keybinding they want to see associated with a particular event. This makes it easy to deal with the specificities of the various platforms.

I think the current keymap% is trying too hard to guess the intent of the key combination, and this grabs too many combinations at the same time (e.g., my custom c:s:t doesn’t work because it’s grabbed by the non-modifiable c:t)


mflatt
2022-4-22 20:29:00

If you have exactly the keys you want to match, it seems like you should be able to add ~ modifiers to maximize the specificity/score. But c:s:t should already have a higher score than c:t, so probably I’m missing something.


laurent.orseau
2022-4-22 21:56:29

Unless c:s:t is lower on the keymap chain maybe?


dan.ml.901
2022-4-22 21:58:35

Is there a general technique for referencing a binding introduced later? Simple example: (define a (+ 1 b)) (define b 2)


dan.ml.901
2022-4-22 22:03:33

I remembered the let* technique… using set!. Is there something else?


sorawee
2022-4-22 22:09:47

What’s the actual problem that you are trying to solve?


dan.ml.901
2022-4-22 22:10:57

Users of my Racket based DSL want to have a bit definition at the top of the file and supplemental definitions later.


dan.ml.901
2022-4-22 22:11:19

I realize how I can use delay and force too


sorawee
2022-4-22 22:12:40

Or just a simple thunking


dan.ml.901
2022-4-22 22:12:50

yeah