rostislav.svoboda
2021-6-4 11:41:09

@rostislav.svoboda has joined the channel


rostislav.svoboda
2021-6-4 11:41:35

laurent.orseau
2021-6-4 11:44:46

DrRacket editors support images, which is probably a pain to deal with, with text in the middle.


laurent.orseau
2021-6-4 11:51:56

DrRacket supports multiple keybinding styles which seems to be far from a trivial matter. It’s also multiplatform, which has to be rather painful (different GUI frameworks for different platforms). Supporting utf–8 and various (human and machine) languages doesn’t make it easier probably.


rostislav.svoboda
2021-6-4 12:11:45

I just quickly tried out some of the examples from the <https://gankra.github.io/blah/text-hates-you/|Text Rendering Hates You> … and it looks like DrRacket has a few weak spots here.


mflatt
2021-6-4 12:41:59

@mflatt has joined the channel


joel
2021-6-4 12:48:51

@joel has joined the channel


samth
2021-6-4 12:50:00

Reporting bugs for those would be great


mflatt
2021-6-4 12:51:36

Definitely. DrRacket and the underlying drawing libraries build on Pango+Harfbuzz these days, but Pango+Harfbuzz can do better than the way DrRacket’s editor uses it.

At a lowish level, the difference is the combine? argument to the draw-text method of dc&lt;%&gt;. The editor uses draw-text with combining disabled, which means that it doesn’t do ligatures at all, and various other kinds of combining characters don’t combine. In other words, the editor in DrRacket embraced the “text is individual characters” approach early on.

Why disable combining characters? The original intent was to keep things simple in the sense that if you separately measure text A and and text B, then that tells you the boundary between the, in the text AB. That has all sorts of helpful implications for the data structures and algorithms used in the editor — but it was the wrong way to go in the long run.

Libraries like Pango provide APIs to help editors deal with layout and editing in the middle of text, but the editor API in DrRacket predated most of those. And no one has gotten around to adapting and rewriting the editor.


mflatt
2021-6-4 12:53:07

The “defniitely” above was meant to reply to “DrRacket has a few weak spots”. Bug reports are always welcome, but not dealing with combining characters (or bidirectional text) is going to be the root issue in many potential bug reports.


samth
2021-6-4 12:55:36

I think a bug report that combines all the examples from that article featuring combining characters would be useful, and definitely if there are other issues you find that are not about combining bug reports for them are also helpful.


aowens5189
2021-6-4 18:20:51

@aowens5189 has joined the channel


sschwarzer
2021-6-4 19:02:32

@sschwarzer has joined the channel


sschwarzer
2021-6-4 19:34:03

Is there a way to locally disable formatting when using Racket/Reindent All? Something like a special comment before and after some lines to leave them alone?


hoshom
2021-6-4 22:52:59

@hoshom has joined the channel