cdep.illabout_slack
2020-11-4 11:46:38

@lexi.lambda’s 2018 strangeloop presentation on Hackett was the most persuasive argument I’ve seen as to why you’d want powerful macros as a Haskell programmer:

https://www.youtube.com/watch?v=5QQdI3P7MdY


soegaard2
2020-11-4 12:30:57

@wanpeebaw The cpu loads for regex-redux looks odd.


soegaard2
2020-11-4 12:31:29

In the other benchmarks the cpu loads for BC and CS are similar.


yanyingwang1
2020-11-4 12:38:08

A vim plugin formerly written for clojure is rewritten for racket now


yanyingwang1
2020-11-4 12:41:49

He was using traditional Chinese, simplified Chinese is more popular now


torsten.grust
2020-11-4 14:31:48

@torsten.grust has joined the channel


torsten.grust
2020-11-4 14:32:43

Hi everyone.


torsten.grust
2020-11-4 14:33:07

We’ve just started a new semester here at U Tübingen. Almost 700 new Racketeers incoming.


torsten.grust
2020-11-4 14:34:09

Some of our students see a bytes->string/locale: string is not a well-formed UTF-8 encoding error with Racket 7.8 on Windows 10 when they try to open/save .rkt files.


torsten.grust
2020-11-4 14:34:23

Is this a problem with a known workaround?


torsten.grust
2020-11-4 14:34:28

Might 7.9 fix that?


mflatt
2020-11-4 14:43:04

I recall an earlier report: https://groups.google.com/g/racket-users/c/ewvudAxrAtI/m/8B0CPBgaBwAJ Unfortunately, I don’t recall a resolution; I don’t think we figured out how to replicate or fix the problem, yet.


torsten.grust
2020-11-4 14:49:53

Uh, thanks, Matt. That could turn out to be a major problem this semester… let’s see.


mflatt
2020-11-4 14:53:56

One thing that puzzles us is that it does not appear to be a new problem, since old versions have the same problem (according to the previous report). So, both the problem and the reason people are hitting it now remain unclear. In any case, if anyone can figure out how to replicate the problem, that will help a lot.


torsten.grust
2020-11-4 14:55:01

Same problem with Racket 7.9, by the way.


mflatt
2020-11-4 15:01:03

Here’s something to try: change “collects/racket/private/path.rkt” adding a line between 27 and 28: s #; I’m curious whether that changes the error message. My guess is that it could change the error message, but it’s unlikely to allow a file to be opened.


mflatt
2020-11-4 15:02:12

I am unclear from previous reports on whether it’s a problem with the file dialog, or a general file-opening problem. I wonder, for example, when dragging a “.rkt” file onto DrRacket opens it successfully versus selecting a “.rkt” file from a file dialog.


torsten.grust
2020-11-4 15:03:56

I’ll have the student try that. Thanks!


torsten.grust
2020-11-4 15:05:05

By the way, this also affects saving new files.


mflatt
2020-11-4 15:09:15

Thanks for that. Along the same lines as above, I wonder whether saving works if an existing file is opened (possibly by drag-and-drop), modified, and saved — that is, avoiding the file-save dialog.


torsten.grust
2020-11-4 15:25:33

No luck with drag and drop. Same error message.


caente
2020-11-4 15:51:31

btw I just tried and it is very, very nice, exactly the sort of tools I was hoping to find in the racket/list world


samth
2020-11-4 16:40:54

That suggests that places scale a little less well on Racket CS, which is not that surprising to me.


samth
2020-11-4 16:42:19

might be that futures would work better on Racket CS for that benchmark since using regexps might be future-safe


alexharsanyi
2020-11-4 21:52:32

It seems like on Linux, the Racket GUI library uses Control-Y for paste instead of Control-V as it does on Windows. Is this a common keybinding for GUI applications on Linux? Also, can this be changed at Racket GUI level (instead of updating every text field?)

Someone reported this issue for my application, but I am not familiar enough with Linux to tell if this is an issue or not: https://github.com/alex-hhh/ActivityLog2/issues/53


laurent.orseau
2020-11-4 22:01:07

Ctl-y is emacs-style, and yes I would very much prefer Ctl-v instead, which is what most modern GUI tools use anyway.


alexharsanyi
2020-11-4 22:02:12

I guess my question is about the GUI convention on Linux. Modern GUI tools do use Ctrl-V on windows, but on Mac OS they don’


alexharsanyi
2020-11-4 22:02:19

don’t. They use Command-V


laurent.orseau
2020-11-4 22:03:22

Yes, that’s what i’m saying. Ctl-v is very common for ‘paste’ in GUI tools on Linux (Ubuntu at least).


laurent.orseau
2020-11-4 22:04:06

(even the default, basic calculator uses Ctl-v)


laurent.orseau
2020-11-4 22:04:53

I’d be happy to have Ctl-v be the default for paste on linux, as changing the keymap is cumbersome


alexharsanyi
2020-11-4 22:47:13

I could not find where Control-Y is bound to “paste” for the text field… Maybe the GTK library binds that value on Linux?


laurent.orseau
2020-11-4 22:52:24

@robby may know more about this?


mflatt
2020-11-4 23:15:01

mflatt
2020-11-4 23:16:07

I’m as surprised as anyone that it’s still C-y, which I guess means that it has been a very long time since I last used Linux/Unix as my main environment.


mflatt
2020-11-4 23:16:43

(You can get a sense of the age of that code by the fact that the preceding line has both macos and macosx.)


robby
2020-11-4 23:16:51

and the fact that control-y works on a mac is something my fingers actually probably occasionally do without me noticing!


laurent.orseau
2020-11-4 23:18:08

Would it be a bad idea to change these to more ‘modern’ values?


mflatt
2020-11-4 23:19:53

No objection from me.


robby
2020-11-4 23:36:33

Note that the menu-based key bindings are elsewhere (and take precedence over these ones when there is a conflict)


laurent.orseau
2020-11-4 23:37:40

I know. But text-field%s use these values by default


mflatt
2020-11-4 23:38:02

I’ll push the change, and we’ll see how it goes with snapshots.


laurent.orseau
2020-11-4 23:38:53

@alexharsanyi :point_up:


mflatt
2020-11-4 23:41:42

The C-a start-of-line and C-e end-of-line bindings will have to go away, since that conflicts with Ctl-a for Select All. There’s always Home and End.


robby
2020-11-4 23:44:47

People will notice that one I guess but perhaps in a good way.


robby
2020-11-4 23:45:10

Are the word movement keys also worth looking at? And shift-movement to select?


mflatt
2020-11-4 23:45:54

None of those are in the keymap used by the default current-text-keymap-initializer.


mflatt
2020-11-4 23:46:06

Shift to select with plain arrows is built into text%, of course.


alexharsanyi
2020-11-5 00:16:02

Thanks for making this change. I tried to use current-text-keymap-initializer to override these for the application itself, but it is easier to have them by default in the GUI library (especially since everyone seems to agree that they are better defaults even for Linux)


alexharsanyi
2020-11-5 00:36:04

Hi @torsten.grust, I am using Racket on Windows and never encountered this problem with opening rkt files.

Could this be a problem with the actual files themselves? If you can share one of the files that has this problem, I can try it out.

Also, do these students edit the .rkt files with other editors?



robby
2020-11-5 00:57:52

I believe it also adds c:x, etc.


robby
2020-11-5 00:58:05

But I see that it makes the opposite decision that Matthew did for c:a!


robby
2020-11-5 00:58:12

Probably also showing its age….


alexharsanyi
2020-11-5 01:03:55

I was just starting to look at overriding the keybindings for the application only, when I noticed that Matthew changed the defaults in the GUI library, so I stopped investigating it.

In general I think it is a good idea for the GUI libraries to use the platform defaults, I was just not sure what those platform defaults are on Linux…


robby
2020-11-5 01:04:28

I believe that keymap function I linked to will do the platform defaults.


robby
2020-11-5 01:05:13

Matthew’s improvement is certainly better, tho, but that function is there in older versions.


alexharsanyi
2020-11-5 01:05:56

But it is not clear how to call this function. Basicaly the application contains a lot of text-field% instances, and I don’t want to have to update each of them individually, so I was looking for something which would setup the defaults before the GUI widgets are created…


ryanc
2020-11-5 01:41:07

I will definitely notice if emacs-style keybindings go away, but if it’s possible to restore the old behavior by adding custom keybindings I suppose I have no grounds to complain. FWIW, GTK has key themes, and the gnome-tweaks tool allows setting the key theme to support emacs-style keybindings.


robby
2020-11-5 01:42:08

@alexharsanyi yeah, you’d have to set up an abstraction.


robby
2020-11-5 01:42:14

It is definitely awkward.