
that did massively improve things for me, thanks!

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

The reason it does that is the long Chez compile times

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

@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)

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?

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

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.

that works indeed, thanks!

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

the foreground option also works, probably the preferred option actually

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

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

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


(On linux anyway)

Where the arrows disappear in the middle.

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

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


On macOS:

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

Its just linux. :disappointed:

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

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

Oh, no, lol.

That’s the actual bug.

Eventually it becomes entirely transparent.

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

@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

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

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

I’m seing 3.22.30-1ubuntu4

(And 2.24.32-1ubuntu1
)

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

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

so, looks like the same versions

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

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

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?

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

So maybe its a resolution+anti-aliasing problem?

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

I’m currently using 1600x900

(Due to low vision)

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

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…

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

@blerner Oh interesting. That would make sense.

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.

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


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

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))