ecb10
2020-3-18 12:37:44

that did massively improve things for me, thanks!


ecb10
2020-3-18 12:38:15

might get interesting when it’s all of Idris and not just the parser though…


samth
2020-3-18 12:41:36

The reason it does that is the long Chez compile times


ecb10
2020-3-18 13:18:39

Curious, I’m finding Chez is noticeably quicker. But I’m still only generating relatively small things. So we’ll see what happens…


greg
2020-3-18 13:20:12

@xuuexu If multiple values works for you, great. You could also “unwrap a list” with append* (“unwrap one level”) or flatten (“unwrap completely”): (append* '((1) (2) ((3 4)))) ; '(1 2 (3 4)) (flatten '((1) (2) ((3 4)))) ; '(1 2 3 4)


laurent.orseau
2020-3-18 16:29:21

Calling the linux command timeout inside racket’s system* hangs.

For example the following program hangs on the second system* call: #lang racket (displayln "sleep") (system* "/bin/sleep" "5") ; works fine (displayln "timeout sleep") (system* "/usr/bin/timeout" "2" "/bin/sleep" "5") ; hangs (displayln "end") Any clue why or how to fix this?


laurent.orseau
2020-3-18 16:30:32

From the command line repl, the commands hangs until pressing Enter: (system* "/usr/bin/timeout" "2" "/bin/sleep" "5")

Running the corresponding command without racket works fine


mflatt
2020-3-18 16:58:44

Setting subprocess-group-enabled to #t makes that work for me. Maybe timeout expects to be in a new group, as it would be when started from a shell.


laurent.orseau
2020-3-18 17:07:12

that works indeed, thanks!


samth
2020-3-18 17:37:23

The man page suggests that maybe the —foreground option is needed


laurent.orseau
2020-3-18 18:25:05

the foreground option also works, probably the preferred option actually


laurent.orseau
2020-3-18 18:25:22

(I didn’t think it could come from the command itself, silly me)


spdegabrielle
2020-3-18 18:27:40

Thank you @hazemalhalabi I’ll follow your advice for the online racket London meet-up


leif
2020-3-18 20:24:14

@mflatt Okay, this file seems to cause the bug in DrRacket’s arrows mentioned earlier: https://gist.github.com/LeifAndersen/b7bb404dd0ee08950f61ceffff5753a3


leif
2020-3-18 20:24:16

leif
2020-3-18 20:24:21

(On linux anyway)


leif
2020-3-18 20:24:35

Where the arrows disappear in the middle.


leif
2020-3-18 20:25:16

Basically, it only seems to happen with syntax ? arrows, and requires a LONG distance (of about 800 or so) lines.


leif
2020-3-18 20:25:41

Oh wait, it actually happens with both types of arrows.


leif
2020-3-18 20:27:11

soegaard2
2020-3-18 20:32:21

On macOS:


leif
2020-3-18 20:33:16

Ya, last I checked it worked fine on mac and windows.


leif
2020-3-18 20:33:19

Its just linux. :disappointed:


leif
2020-3-18 20:33:32

(Which is why I think its a racket+gtk bug)


soegaard2
2020-3-18 20:34:28

At first I thought the color fade in your screenshot was on purpose.


leif
2020-3-18 20:35:47

Oh, no, lol.


leif
2020-3-18 20:35:52

That’s the actual bug.


leif
2020-3-18 20:35:58

Eventually it becomes entirely transparent.


leif
2020-3-18 21:27:58

Although this bug doesn’t seem to show up on fedora 31 (racket v2.4)


blerner
2020-3-18 21:43:29

@leif which DrR version is this? with 7.6 on Ubunbu 18.04 for me, I see the arrows all the way through — they’re purple (not blue), but they don’t fade out


leif
2020-3-18 21:44:02

Eep, I’m also using 7.6 on Ubuntu 18.04. :confused:


leif
2020-3-18 21:44:53

Just to make sure. what version of gtk are you using?


leif
2020-3-18 21:45:22

I’m seing 3.22.30-1ubuntu4


leif
2020-3-18 21:45:35

(And 2.24.32-1ubuntu1)


leif
2020-3-18 21:45:49

As determined by: dpkg -l libgtk* \| grep -e '^i' \| grep -e 'libgtk-*[0-9]'


blerner
2020-3-18 21:50:35

blerner@bsl-laptop ~> dpkg -l "libgtk*" \| grep -e '^i' \| grep -e 'libgtk-*[0-9]' ii libgtk-3-0:amd64 3.22.30-1ubuntu4 amd64 GTK+ graphical user interface library ii libgtk-3-bin 3.22.30-1ubuntu4 amd64 programs for the GTK+ graphical user interface library ii libgtk-3-common 3.22.30-1ubuntu4 all common files for the GTK+ graphical user interface library ii libgtk2-perl 2:1.24992-1build1 amd64 Perl interface to the 2.x series of the Gimp Toolkit library ii libgtk2.0-0:amd64 2.24.32-1ubuntu1 amd64 GTK+ graphical user interface library ii libgtk2.0-bin 2.24.32-1ubuntu1 amd64 programs for the GTK+ graphical user interface library ii libgtk2.0-cil 2.12.40-2 amd64 CLI binding for the GTK+ toolkit 2.12 ii libgtk2.0-common 2.24.32-1ubuntu1 all common files for the GTK+ graphical user interface library ii libgtk3-perl 0.032-1 all Perl bindings for the GTK+ graphical user interface library


blerner
2020-3-18 21:50:40

so, looks like the same versions


leif
2020-3-18 21:56:26

Hmm….well I guess that rules out just racket+gtk…. :confused:


leif
2020-3-18 21:56:45

I also tried turning off all of my accessibility software, still happened.


mflatt
2020-3-18 23:53:04

I haven’t been able to replicate the problem, either, using Ubuntu 18.04 in a VirtualBox VM on Mac OS. I think the relevant layer from Racket’s perspective is Cairo, not Gtk. And I think the relevant Cairo backend in this case is cairo-xlib, which means that drawing depends on the X server and whatever hardware-specific drivers it may use. You should be turn of cairo-xlib / hardware use by changing “gui-lib/mred/private/wx/gtk/dc.rkt” line 198 to disable that first cond clause and make canvas backing use a bitmap with a cairo-image backend. Maybe also disable the case in make-screen-bitmap at “procs.rkt” line 169. Does that change anything?


leif
2020-3-19 00:01:42

@mflatt and @blerner So…..after plugging in an external monitor the problem goes away, on both the external monitor and laptop monitor.


leif
2020-3-19 00:02:03

So maybe its a resolution+anti-aliasing problem?


leif
2020-3-19 00:02:29

So that makes me wonder, what resolution are you using.


leif
2020-3-19 00:02:42

I’m currently using 1600x900


leif
2020-3-19 00:02:52

(Due to low vision)


leif
2020-3-19 00:04:14

But I also have the bug in the monitors default resulotion of 3840x2160.


blerner
2020-3-19 00:04:19

Complete brainstorming for a moment: In your screenshots, it kinds looks to me like the arrow’s line gets thinner to the point of fading out, rather than getting fainter. I vaguely wonder whether the bounding box that draws the arrow is somehow crossed-over into a bowtie shape, rather than a rectangle shape. that might do it. also if the arrow’s line is a curve, I know that Racket has had issues with bounding boxes of curves…


leif
2020-3-19 00:04:43

And yes, I am downscaling a 4k monitor to sub-hd (or at least sub–1080p)…one of the ‘perks’ of being blind.


leif
2020-3-19 00:05:21

@blerner Oh interesting. That would make sense.


leif
2020-3-19 00:05:58

And ya, it does get thinner rather than just fade out. You can see that if you have, say, 100 arrows right next to each other, they all get thinner before they disappear.


leif
2020-3-19 00:06:22

@robby Can you point us to the code where DrRacket draws its arrows?



leif
2020-3-19 01:35:06

@robby Are you saying that DrRacket calls that function directly?


leif
2020-3-19 01:36:03

As in:

leif@FEM ~/rsrc/drracket (master) $ ag 'draw-arrow' drracket-plugin-lib/drracket/private/drsig.rkt 28: drracket:draw-arrow^ 307:(define-signature drracket:draw-arrow-cm^ 309:(define-signature drracket:draw-arrow^ extends drracket:draw-arrow-cm^ 310: (draw-arrow)) drracket/drracket/private/unit.rkt 852: (draw-arrow dc dx dy pt1 pt2 858: (define/private (draw-arrow dc dx dy pt1 pt2 pen-width arrow-head-size arrow-root-radius) 863: (drracket:arrow:draw-arrow dc x1 y1 x2 y2 dx dy drracket/drracket/arrow.rkt 5:(provide draw-arrow) drracket/drracket/private/syncheck/gui.rkt 1158: (let ([draw-arrow2 1164: (drracket:arrow:draw-arrow dc start-x start-y end-x end-y dx dy 1211: (draw-arrow2 arrow))) 1224: (draw-arrow2 ele)] 1230: (for-each-tail-arrows draw-arrow2 tail-arrows))