[racket-users] Re: Typing lag with DrRacket on Linux

2018-02-09 Thread Evan Whitmer
I forgot to mention that I have a 4K display, and I think that's important 
to note here.

On Friday, February 9, 2018 at 7:00:18 PM UTC-10, Evan Whitmer wrote:
>
> I, too, am having typing latency issues in DrRacket in the definitions 
> window. As Dave noted, the size of the window seems to be related to the 
> issue, and, in my experience, it's not just an issue with the Definitions 
> window. Both the Interactions window and even the following code snippet 
> (taken from StackOverflow 
> <https://stackoverflow.com/questions/37583997/basic-code-editor-functionality-in-racket>)
>  
> will have this same lag:
>
> (define frame (new frame% [label "Simple Edit"]
>[width 1800]
>[height 1800]))
> (define canvas (new editor-canvas% [parent frame]))
> (define text (new text%))
> (send canvas set-editor text)
> (send frame show #t)
>
> (define delta (make-object style-delta% 'change-size 14))
> (send delta set-face "Menlo")
> (send text change-style delta)
>
> I am on Ubuntu 17.10 using Racket 6.11 with the proprietary nVidia drivers 
> and X.org. My GTK version is 3. I don't have this issue with any of the 
> other text editors that I've tried to use.
>
> I tried to profile the above text editor, but I am a novice Racketeer and 
> could not figure out a way to profile a thread managed in racket/gui. Does 
> anyone perhaps know of a way to hook the above into a profiler to see what 
> might be the cause of this lag?
>
> Has anyone happened to stumble onto this issue recently and solved it?
>
> Evan
>
> On Saturday, April 1, 2017 at 6:07:28 AM UTC-10, gneuner2 wrote:
>>
>> On Fri, 31 Mar 2017 13:34:38 -0700 (PDT), Dave Musicant 
>> <musi...@gmail.com> wrote: 
>>
>> >I'm using DrRacket on a 64-bit Ubuntu 16.04 system with the 
>> >default Unity windowing system, and am finding that typing 
>> >in the definitions window is laggy. 
>>
>> I've seen similar behavior on CentOS 6.5-6.8 under Gnome(2) - it has 
>> persisted across a number of OS and Racket versions.   
>>
>> I have seen the lag in Dr Racket with 6.1, 6.5, 6.7 and 6.8.  I 
>> compiled 6.1 and 6.5 myself, so there might have been something 
>> strange in those cases, but 6.7 and 6.8 were stock Linux x86_64 
>> downloads. 
>>
>> Turning off background expansion helps somewhat, but I have found that 
>> limiting memory seems to help the most.  On Linux I run Dr Racket with 
>> the limit set to 512MB.  That might be too low for some people, but it 
>> works fine for my typical (webserver app) uses. 
>>
>> George 
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Adding interactive overlays to racket plots

2018-02-09 Thread Evan Whitmer
Looks awesome!

On Friday, February 9, 2018 at 4:27:46 PM UTC-10, Alex Harsanyi wrote:
>
>
>
> On Saturday, February 10, 2018 at 10:00:29 AM UTC+8, Evan Whitmer wrote:
>>
>> Do you anticipate this playing well with charts that have multiple Y 
>> values for a given X value. For example, candlestick plotting 
>> <https://github.com/racket/plot/blob/9c8960d40772cc61211ff5d9ab185f9cf931b044/plot-lib/plot/private/plot2d/point.rkt#L254>
>>  
>> has recently landed in racket/plot. It would be great to be able to show 
>> all of the values, or at least specify which of the open/high/low/close 
>> values to display.
>>
>> Evan
>>
>>
> Yes.  The way this is implemented is that you will need to add a callback 
> to the returned plot and from the callback add as many overlays as you 
> want, where you want them (not necessarily at the X location). The 
> advantage of this method is that you can display any value you want on the 
> overlay, not just simply the value of the plotted function at the current 
> location.  The disadvantage is that the feature is not 'free", like the 
> zoom-unzoom functionality: the user has to add the callback and provide the 
> overlays.
>
> In my case, most of the interesting use cases do not involve simply 
> showing the value of a function at the current location.  I put some 
> examples here: 
> https://alex-hhh.github.io/2018/02/interactive-overlays-with-the-racket-plot-package.html
>
> I have not looked at candlestick plots, however, I imagine that you can 
> work out what the current value is from the X position and show the 
> open/low/high/close values either as a single badge or as markers on the 
> relevant positions of the candlestick.
>
> Best Regards,
> Alex.
>
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Typing lag with DrRacket on Linux

2018-02-09 Thread Evan Whitmer
I, too, am having typing latency issues in DrRacket in the definitions 
window. As Dave noted, the size of the window seems to be related to the 
issue, and, in my experience, it's not just an issue with the Definitions 
window. Both the Interactions window and even the following code snippet 
(taken from StackOverflow 
)
 
will have this same lag:

(define frame (new frame% [label "Simple Edit"]
   [width 1800]
   [height 1800]))
(define canvas (new editor-canvas% [parent frame]))
(define text (new text%))
(send canvas set-editor text)
(send frame show #t)

(define delta (make-object style-delta% 'change-size 14))
(send delta set-face "Menlo")
(send text change-style delta)

I am on Ubuntu 17.10 using Racket 6.11 with the proprietary nVidia drivers 
and X.org. My GTK version is 3. I don't have this issue with any of the 
other text editors that I've tried to use.

I tried to profile the above text editor, but I am a novice Racketeer and 
could not figure out a way to profile a thread managed in racket/gui. Does 
anyone perhaps know of a way to hook the above into a profiler to see what 
might be the cause of this lag?

Has anyone happened to stumble onto this issue recently and solved it?

Evan

On Saturday, April 1, 2017 at 6:07:28 AM UTC-10, gneuner2 wrote:
>
> On Fri, 31 Mar 2017 13:34:38 -0700 (PDT), Dave Musicant 
>  wrote: 
>
> >I'm using DrRacket on a 64-bit Ubuntu 16.04 system with the 
> >default Unity windowing system, and am finding that typing 
> >in the definitions window is laggy. 
>
> I've seen similar behavior on CentOS 6.5-6.8 under Gnome(2) - it has 
> persisted across a number of OS and Racket versions.   
>
> I have seen the lag in Dr Racket with 6.1, 6.5, 6.7 and 6.8.  I 
> compiled 6.1 and 6.5 myself, so there might have been something 
> strange in those cases, but 6.7 and 6.8 were stock Linux x86_64 
> downloads. 
>
> Turning off background expansion helps somewhat, but I have found that 
> limiting memory seems to help the most.  On Linux I run Dr Racket with 
> the limit set to 512MB.  That might be too low for some people, but it 
> works fine for my typical (webserver app) uses. 
>
> George 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Adding interactive overlays to racket plots

2018-02-09 Thread Evan Whitmer
Do you anticipate this playing well with charts that have multiple Y values 
for a given X value. For example, candlestick plotting 

 
has recently landed in racket/plot. It would be great to be able to show 
all of the values, or at least specify which of the open/high/low/close 
values to display.

Evan

On Monday, January 29, 2018 at 1:09:42 AM UTC-10, Alex Harsanyi wrote:
>
> The racket plot package produces interactive snip% objects which allow 
> zooming of the plot area. While this is a cool and sometimes useful 
> feature, the functionality is hard coded in the plot-snip% class inside the 
> package. I would like to extend the package to allow the user to customize 
> the interactive features of the plot -- most of the graphing packages for 
> the web support the display of additional information when the user hovers 
> the mouse over the plot.
>
> I have built a prototype implementation of adding interactive overlays to 
> plot snips, as shown in the image below, and I would like to ask if there 
> is interest in adding such a feature to the plot package distributed with 
> racket.
>
> At this point, the code is at a "proof of concept" stage, but ultimately, 
> I will add interactive features to the plots in my application and they 
> will be more complex than just showing the value of a function at a cursor 
> location. As part of that experience, I will better understand what actual 
> features I need, and hope to refine this interface. I am also looking for 
> feedback, in particular if this would be the right approach for doing this.
>
> The prototype implementation is here: 
> https://github.com/alex-hhh/plot/tree/ah/interactive-overlays
>
> The code to generate the plot below is here: 
> https://gist.github.com/alex-hhh/64f8af9c4bd5b5c65ada62dd9157e938 
>
> As it is implemented now, unless a "hover callback" is added to the plot 
> snip, the snip behaves as before, allowing zoom and unzoom when the mouse 
> is dragged over the plot area.
>
>
>
>
> 
>
>
> 
> Best Regards,
> Alex.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.