[racket-users] Proper handling for a custom current-read-interaction?

2016-06-06 Thread Alexis King
I am trying to write a custom current-read-interaction for a language with non-s-expression syntax, and I’m not sure I completely understand the protocol for how to detect the end of input across both the command line and DrRacket. I first wrote an implementation for DrRacket, which appears to

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-06 Thread George Neuner
On 6/6/2016 8:36 PM, David Christiansen wrote: > That seems overly complicated. Can you not just compare the mouse's > coordinates to the picture's location in the canvas? I don't have a good way to know where the picture itself is - only its bounding box. So if the picture consists of a

[racket-users] Constructor-style printing for sets?

2016-06-06 Thread Alex Knauth
If I run this program: #lang racket (set 1 2 3) It prints out the value: (set 1 2 3) That's wonderful! It uses nice constructor-style printing, just like I wanted. That was without changing the printing settings from the default print mode. However, if I change DrRacket's printing settings

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-06 Thread Matthias Felleisen
Why don’t you check the location of the mouse movement? The coordinates are close enough. > On Jun 6, 2016, at 4:45 PM, David Raymond Christiansen > wrote: > > Hi all, > > I'm looking for a way to check whether a mouse pointer is on top of a > particular pict

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-06 Thread David Christiansen
> That seems overly complicated. Can you not just compare the mouse's > coordinates to the picture's location in the canvas? I don't have a good way to know where the picture itself is - only its bounding box. So if the picture consists of a doughnut shape, I want the center of the doughnut and

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-06 Thread David Christiansen
> If I understand the goal, you could render to one bitmap that has an > alpha channel, and then check whether the pixel under the mouse ends up > with a non-zero alpha. That's a good simplification. Thanks! I had kind of been hoping that there was an alternative approach that I was missing, but

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-06 Thread George Neuner
On 6/6/2016 4:45 PM, David Raymond Christiansen wrote: I'm looking for a way to check whether a mouse pointer is on top of a particular pict that has been drawn to a canvas%. Right now, the best I've been able to do is to render the pict to two off-screen bitmaps with different background

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-06 Thread Matthew Flatt
At Mon, 6 Jun 2016 16:45:33 -0400, David Raymond Christiansen wrote: > I'm looking for a way to check whether a mouse pointer is on top of a > particular pict that has been drawn to a canvas%. > > Right now, the best I've been able to do is to render the pict to two > off-screen bitmaps with

[racket-users] ultimate performance tuning

2016-06-06 Thread 'John Clements' via Racket Users
Having trouble making the most use of your machine during Racket setup tasks? Try specifying a non-integer number of CPUs! clements@desmond:~/git-clements/pkgs/jbc-utils$ raco setup -j 6.972 shelly

[racket-users] Detecting mouse events on top of picts?

2016-06-06 Thread David Raymond Christiansen
Hi all, I'm looking for a way to check whether a mouse pointer is on top of a particular pict that has been drawn to a canvas%. Right now, the best I've been able to do is to render the pict to two off-screen bitmaps with different background colors, and then check whether or not the pixel

Re: [racket-users] Strange Loop registration

2016-06-06 Thread Vincent St-Amour
Thanks John! We've fixed the front page. RacketCon registration is now open at (linked from the RacketCon page): https://www.eventbrite.com/e/racketcon-2016-tickets-24349152972 We're very excited to announce that Emina Torlak will be giving the keynote this year, on Synthesis and

[racket-users] Strange Loop registration

2016-06-06 Thread 'John Clements' via Racket Users
Strange Loop Registration is opening this Wednesday at Noon, and as I found out to my chagrin last year, those tickets do sell out *extremely* quickly. I see that the page for RacketCon is up, but I don’t think I’ve seen notice of it on the users mailing list, and it also looks to me like the

Re: [racket-users] Flat Contract Value Generator

2016-06-06 Thread Matthias Felleisen
> On Jun 6, 2016, at 1:19 PM, Matthew Butterick wrote: > > > On Jun 5, 2016, at 1:33 PM, Matthias Felleisen wrote: > >> when I taught a Sw Dev course and the students voted to use JSON as the data >> exchange language. > > I always thought the reason

Re: [racket-users] define-serializable-cstruct with versions?

2016-06-06 Thread Matthew Flatt
Yes, but I think a different protocol will be needed than for `serializable-struct`. With (serializable-struct pond (depth)) it's clear that the deserializer receives a single value for the single field (or, more generally, N values for N fields). So, it's clear how to make a compatibility

Re: [racket-users] Flat Contract Value Generator

2016-06-06 Thread Matthew Butterick
On Jun 5, 2016, at 1:33 PM, Matthias Felleisen wrote: > when I taught a Sw Dev course and the students voted to use JSON as the data > exchange language. I always thought the reason you wisely prefer to keep politics out of programming was to avoid outcomes like this

Re: [racket-users] Re: I can't open my previous file

2016-06-06 Thread 'John Clements' via Racket Users
> On Jun 6, 2016, at 8:45 AM, George Neuner wrote: > > On Mon, 6 Jun 2016 13:34:41 +0100, Laurent > wrote: > >> Ah, so you meant MrEd Designer (MED) then, I wasn't sure :) >> (mred was the previous GUI lib, part of DrScheme, whereas MED is an >>

Re: [racket-users] I can't open my previous file

2016-06-06 Thread Matthew Flatt
Based on Robby's work tracking down the problem, I've pushed a repair for the next snapshot build. (I'm surprised that this bug escaped detection before.) Since the problem was in file reading, the next snapshot build will include a repaired DrRacket that is able to read your original file.

[racket-users] Re: I can't open my previous file

2016-06-06 Thread George Neuner
On Mon, 6 Jun 2016 13:34:41 +0100, Laurent wrote: >Ah, so you meant MrEd Designer (MED) then, I wasn't sure :) >(mred was the previous GUI lib, part of DrScheme, whereas MED is an >external package) Sorry for the confusion - I wasn't aware that the design editor went

Re: [racket-users] trying to use dump-memory-stats

2016-06-06 Thread Matthew Flatt
The GC's printer for `dump-memory-stats` is broken on Windows. It breaks in different ways depending on the compiler used to build Racket and for 32-bit vs. 64-bit. I've pushed a repair for the next snapshot build --- at least for the Utah snapshot, which uses MSVC. I'll probably have to

[racket-users] Potential small bugs on SEwPR

2016-06-06 Thread lfacchi2
1. On Section 14.4, The CK Machine, on page 243, there is a reference to /part I(6.4)/, mentioning the specification for the CK Machine: "Comparing the Redex specification with the specification in part I(6.4)". But I believe /part I(6.4)/ is about the CEK Machine. The CK Machine is the

Re: [racket-users] I can't open my previous file

2016-06-06 Thread 张可星
在 2016年6月6日星期一 UTC+8下午8:34:00,Robby Findler写道: > I'm not sure what happened, but there seems to be a bug in the way > DrRacket reads files somehow. I've not figured out exactly what that > is (but it appears to be somewhere in the get-a-string method in the > editor-stream-in% class). > >

Re: [racket-users] I can't open my previous file

2016-06-06 Thread Laurent
Ah, so you meant MrEd Designer (MED) then, I wasn't sure :) (mred was the previous GUI lib, part of DrScheme, whereas MED is an external package) Actually, it doesn't look like it was created by MED to me, at least not my versions (3.x), which generate only text files anyway (I think the previous

Re: [racket-users] I can't open my previous file

2016-06-06 Thread Robby Findler
I'm not sure what happened, but there seems to be a bug in the way DrRacket reads files somehow. I've not figured out exactly what that is (but it appears to be somewhere in the get-a-string method in the editor-stream-in% class). Meanwhile, I'm attaching a recovered version of the file. The only

Re: [racket-users] I can't open my previous file

2016-06-06 Thread George Neuner
I just realized that you are the author (or at least maintainer) of MrEd-Designer ... so you would know if that file was created by it. :-) George -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop

Re: [racket-users] I can't open my previous file

2016-06-06 Thread George Neuner
On 6/6/2016 6:29 AM, Laurent wrote: Although the file says: "Open this file in DrRacket version 6.5 or later to read it." So it doesn't look like it requires an old version of Racket. (not really helping, sorry) Yes, I was focused on other contents. But even if the file was created by 6.5,

Re: [racket-users] I can't open my previous file

2016-06-06 Thread Laurent
Although the file says: "Open this file in DrRacket version 6.5 or later to read it." So it doesn't look like it requires an old version of Racket. (not really helping, sorry) On Mon, Jun 6, 2016 at 9:00 AM, George Neuner wrote: > On 6/6/2016 3:27 AM, 张可星 wrote: > >> I

Re: [racket-users] I can't open my previous file

2016-06-06 Thread George Neuner
On 6/6/2016 3:27 AM, 张可星 wrote: I don't have MrEd installed, too.I think it is vim Did you have MrEd installed previously in another version of Racket? I think you mentioned that this was an old file you were trying to open. Your file is in a custom format defined by (lib"read.ss""wxme").

Re: [racket-users] I can't open my previous file

2016-06-06 Thread 张可星
I don't have MrEd installed, too.I think it is 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,

Re: [racket-users] I can't open my previous file

2016-06-06 Thread George Neuner
On 6/6/2016 2:51 AM, 张可星 wrote: 在 2016年6月6日星期一 UTC+8下午2:45:34,gneuner2写道: > On 6/6/2016 2:32 AM, 张可星 wrote: > > > Open the file with a text editor and insert a blank line at the > > > beginning. Then DrRacket will open it. I haven't seen this particular > > > issue previously, but obviously

Re: [racket-users] I can't open my previous file

2016-06-06 Thread 张可星
在 2016年6月6日星期一 UTC+8下午2:45:34,gneuner2写道: > On 6/6/2016 2:32 AM, 张可星 wrote: > > > Open the file with a text editor and insert a blank line at the > > > beginning. Then DrRacket will open it. I haven't seen this particular > > > issue previously, but obviously DrRacket is failing to parse the

Re: [racket-users] I can't open my previous file

2016-06-06 Thread George Neuner
On 6/6/2016 2:32 AM, 张可星 wrote: > Open the file with a text editor and insert a blank line at the > beginning. Then DrRacket will open it. I haven't seen this particular > issue previously, but obviously DrRacket is failing to parse the first line. > > George obviously DrRacket is failing to

Re: [racket-users] I can't open my previous file

2016-06-06 Thread 张可星
在 2016年6月6日星期一 UTC+8下午2:26:41,gneuner2写道: > On 6/6/2016 2:05 AM, 张可星 wrote: > > 在 2016年6月6日星期一 UTC+8下午1:44:39,gneuner2写道: > > > On 6/5/2016 11:18 PM, 张可星 wrote: > > > > When I open my file ,Dr racket told me as below > > > > > > > > `在读取/home/richard/桌面/TheGame.rkt时出现错误. > > > > insert-file in

Re: [racket-users] I can't open my previous file

2016-06-06 Thread George Neuner
On 6/6/2016 2:05 AM, 张可星 wrote: 在 2016年6月6日星期一 UTC+8下午1:44:39,gneuner2写道: > On 6/5/2016 11:18 PM, 张可星 wrote: > > When I open my file ,Dr racket told me as below > > > > `在读取/home/richard/桌面/TheGame.rkt时出现错误. > > insert-file in text%: error loading the file (read-from-file-failed)` > > > > all my

Re: [racket-users] I can't open my previous file

2016-06-06 Thread 张可星
在 2016年6月6日星期一 UTC+8下午1:44:39,gneuner2写道: > On 6/5/2016 11:18 PM, 张可星 wrote: > > When I open my file ,Dr racket told me as below > > > > `在读取/home/richard/桌面/TheGame.rkt时出现错误. > > insert-file in text%: error loading the file (read-from-file-failed)` > > > > all my code are lost ,what can I do now?