[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 
> )
>  
> 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
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 
>> 
>>  
>> 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 Alex Harsanyi


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 
> 
>  
> 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: 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.


[racket-users] Re: Concise way to get completions for Racket code?

2018-02-09 Thread HiPhish
I'm afraid that's not possible. The functionality that gets the completion
candidates is written in Racket:

  #lang racket/base
 
  (require nvim/rplugin framework)
 
  (define (complete prefix)
(define completions (text:get-completions/manuals #f))
(filter (λ (x) (regexp-match (regexp-quote prefix) x)) completions))
 
  (nvim-function "RacketCompletions"
(λ (args)
  (complete (vector-ref args 0

Neovim has this feature called "remote plugins": a plugin can be written in 
any
language as long as there is an API client for it:
https://github.com/neovim/neovim/wiki/Related-projects#api-clients

I wrote the Racket client for cases like these where I can use a Racket 
library
to solve a problem in Neovim. In the future if someone implements proper
semantic auto-completion for DrRacket I will be able to take that 
functionality
and use it in Neovim as well.


On Friday, February 9, 2018 at 10:55:56 PM UTC+1, noch...@gmail.com wrote:
>
> Will your omni-completion also work in Vim?
>

-- 
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: Concise way to get completions for Racket code?

2018-02-09 Thread nocheroot
Will your omni-completion also work in Vim?

On Friday, February 9, 2018 at 3:52:30 PM UTC-6, HiPhish wrote:
>
> Thank you for finding that. I have used your snippet to add 
> omni-completion to
> Neovim now. I need to file down some rough patches before I make it a 
> plugin,
> but it works. Not as useful as having proper semantic completion would have
> been, it does not include identifiers from the current module and includes 
> all
> sorts of identifiers that haven't been imported. Still, better than 
> nothing I
> guess.
>
>
>
> 
>
>
> 
>
>
> On Thursday, February 8, 2018 at 11:28:21 PM UTC+1, noch...@gmail.com 
> wrote:
>>
>> 
>>
>

-- 
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: Concise way to get completions for Racket code?

2018-02-09 Thread HiPhish


Thank you for finding that. I have used your snippet to add omni-completion 
to
Neovim now. I need to file down some rough patches before I make it a 
plugin,
but it works. Not as useful as having proper semantic completion would have
been, it does not include identifiers from the current module and includes 
all
sorts of identifiers that haven't been imported. Still, better than nothing 
I
guess.







On Thursday, February 8, 2018 at 11:28:21 PM UTC+1, noch...@gmail.com wrote:
>
> 
>

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


Re: [racket-users] documentation and tests not running on racket pkgs

2018-02-09 Thread Matthew Flatt
The pkg-build service is having trouble, probably related to an OS
upgrade. I've kicked it again, and I'll try to figure out what's going
wrong.

At Fri, 9 Feb 2018 12:15:04 -0500, Ben Greenman wrote:
> I'm having a similar problem with the documentation for this package:
> https://pkgd.racket-lang.org/pkgn/package/gtp-measure
> 
> On Fri, Feb 9, 2018 at 12:11 PM,   wrote:
> > Hello,
> >
> > I uploaded my package 3 days ago https://pkgs.racket-lang.org/package/peg
> > but the documentation and tests have not been run. I was told it should
> > happen every 24 hours.
> >
> > I am not sure if I created my package slightly wrong or if the build server
> > has a bug.
> >
> > --
> > 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.
> 
> -- 
> 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.

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


Re: [racket-users] documentation and tests not running on racket pkgs

2018-02-09 Thread Ben Greenman
I'm having a similar problem with the documentation for this package:
https://pkgd.racket-lang.org/pkgn/package/gtp-measure

On Fri, Feb 9, 2018 at 12:11 PM,   wrote:
> Hello,
>
> I uploaded my package 3 days ago https://pkgs.racket-lang.org/package/peg
> but the documentation and tests have not been run. I was told it should
> happen every 24 hours.
>
> I am not sure if I created my package slightly wrong or if the build server
> has a bug.
>
> --
> 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.

-- 
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] documentation and tests not running on racket pkgs

2018-02-09 Thread rain1

Hello,

I uploaded my package 3 days ago 
https://pkgs.racket-lang.org/package/peg but the documentation and tests 
have not been run. I was told it should happen every 24 hours.


I am not sure if I created my package slightly wrong or if the build 
server has a bug.


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