Re: [racket-users] Unbound identifier error with syntax transformer that uses syntax-generating helper procedure

2018-05-08 Thread Greg Rosenblatt
Thanks, that explanation helped. I had gaps in my knowledge. I also ended up daisy-chaining yet another submodule nested within the first, to require it both normally and for-template due to braid-shaped phase dependencies. Nothing seems to have gone wrong. On Tuesday, May 8, 2018 at

Re: [racket-users] GUI problem -- main window loosing focus when two dialog boxes are opened

2018-05-08 Thread George Neuner
Hi Alex, fwiw:  I tried with 32-bit 6.11 on Win7 and it messes up also. On 5/8/2018 6:24 AM, Alex Harsanyi wrote: I had a look at the application windows using Spy++ and all three windows (the main frame and the two dialog ones) are toplevel windows, as expected; however they are linked

Re: [racket-users] Unbound identifier error with syntax transformer that uses syntax-generating helper procedure

2018-05-08 Thread Alexis King
The short answer is that you need a (require (for-template racket/base)) in your utilities submodule: (module utilities racket/base (provide compile-test) (require (for-template racket/base)) (define (compile-test) #`(lambda (i) (displayln `(input: ,i) But this answer

[racket-users] Unbound identifier error with syntax transformer that uses syntax-generating helper procedure

2018-05-08 Thread Greg Rosenblatt
Hi, I'm having trouble writing a syntax transformer that uses a syntax-generating procedure defined elsewhere. When the procedure is defined locally, everything is fine. When the procedure is defined outside the transformer, I have to do a dance to make the procedure visible at the right

Re: [racket-users] GUI problem -- main window loosing focus when two dialog boxes are opened

2018-05-08 Thread George Neuner
Hi Alex, On 5/7/2018 8:46 PM, Alex Harsanyi wrote: I have a problem with the Racket GUI where the main application window looses focus if two dialog boxes are opened than closed.  The problem occurs when the main window opens the first dialog box and the first dialog box opens the second one

Re: [racket-users] GUI problem -- main window loosing focus when two dialog boxes are opened

2018-05-08 Thread Alex Harsanyi
On Wednesday, May 9, 2018 at 7:25:34 AM UTC+8, gneuner2 wrote: > > > Ignoring Racket's extraneous added panels, a better organization would be: > > Window 00010010 "" #32769 (Desktop) > : > Window 0017076E "Hello World" PLTFrame > Window 000F03D2 "Dialog 1" #32770 (Dialog) >

Re: [racket-users] GUI problem -- main window loosing focus when two dialog boxes are opened

2018-05-08 Thread Alex Harsanyi
On Tuesday, May 8, 2018 at 2:08:02 PM UTC+8, gneuner2 wrote: > > Hi Alex, > > > So I guess the 1st question to answer is: does the GDI object have the > correct parent HWND? [The Racket dialog% object has a parent, but does > the underlying display object?] If it does, there's something

[racket-users] question on quasisyntax/loc

2018-05-08 Thread Luke Whittlesey
I'm having trouble understanding quasisyntax/loc in some cases. If I have the following example code: #lang racket (define here #'here) (define stx0 (syntax/loc here #'Y)) (define y #'Y) (define stx1 (quasisyntax/loc here #,y)) (displayln (format "here : line ~a" (syntax-line here)))

Re: [racket-users] GUI problem -- main window loosing focus when two dialog boxes are opened

2018-05-08 Thread James Platt
No problem on macOS 10.11.6 "El Capitan", Racket 6.10, or on macOS 10.13.4 "High Sierra", Racket 6.12. On May 7, 2018, at 8:46 PM, Alex Harsanyi wrote: > I have a problem with the Racket GUI where the main application window looses > focus if two dialog boxes are opened than closed. The

[racket-users] Provide form generator

2018-05-08 Thread Dexter Lagan
Hi folks, I developed a provide form generator to take the pain out of writing module headers: https://github.com/dexterlagan/provide-generator It works great, but I wonder if there wouldn’t be a simpler and more standard way to write this. My original idea was to parse the module syntax

Re: [racket-users] question on quasisyntax/loc

2018-05-08 Thread Luke Whittlesey
Very nice explanation. Thank you! On Tue, May 8, 2018 at 11:08 AM, Alexis King wrote: > This behavior is intentional, though it could perhaps be more clearly > documented. The behavior is hinted at in the documentation for > syntax/loc: > > > Like syntax, except that the

Re: [racket-users] question on quasisyntax/loc

2018-05-08 Thread Alexis King
This behavior is intentional, though it could perhaps be more clearly documented. The behavior is hinted at in the documentation for syntax/loc: > Like syntax, except that the immediate resulting syntax object takes > its source-location information from the result of stx-expr (which > must

Re: [racket-users] GUI problem -- main window loosing focus when two dialog boxes are opened

2018-05-08 Thread George Neuner
Hi Alex, On 5/8/2018 6:24 AM, Alex Harsanyi wrote: On Tuesday, May 8, 2018 at 2:08:02 PM UTC+8, gneuner2 wrote: So I guess the 1st question to answer is: does the GDI object have the correct parent HWND?  [The Racket dialog% object has a parent, but does the underlying

RE: [racket-users] Provide form generator

2018-05-08 Thread Dexter Lagan
Thanks Matthias. I'm fairly new to Racket, and I thought the provide form was just a way to indicate which functions to expose. I'll look into it. Dexter -Original Message- From: Matthias Felleisen Sent: Tuesday, May 8, 2018 12:11 PM To: Dexter Lagan

Re: [racket-users] what do people use for number formatting?

2018-05-08 Thread Neil Van Dyke
My ancient, half-finished R4RS Scheme number-formatting library is still used by at least one program.  When I moved that library to the Racket new package system, I made an effort to deprecate it. But anyone improving modern-day idiomatic Racket formatting might want to take a quick peek at

Re: [racket-users] Provide form generator

2018-05-08 Thread Matthias Felleisen
Neat. Keep in mind that the API of a module should be considered a specification (purpose, signature) that the module body (generated later) lives up to. No, this is not how we always work in practice because software evolves, but that is the principle. > On May 8, 2018, at 11:21 AM,

Re: [racket-users] Provide form generator

2018-05-08 Thread Neil Van Dyke
Thank you for contributing.  A few suggestions: * You probably want to put your unit tests, and the `(require rackunit)`, inside `(module+ test ...)` forms.  That makes it better as a library or program, and also is what Racket expects for testing. * You can make this a full-fledged Racket

[racket-users] Re: what do people use for number formatting?

2018-05-08 Thread Sanjeev Sharma
SRFI 54 - ever need a 4-character "thousands" separator? Bharat has units called lakhs & crores, instead of thousands I think there was a numberphile episode on it. French, Dutch, Babylonian, Indian ... Just one of the things I needed recently; I've used a bunch of SRFI 54 features over

RE: [racket-users] Provide form generator

2018-05-08 Thread Dexter Lagan
Thanks a lot for your insights. I'll look into (module+test ...). Progedit looks great as well, it'd streamline a large part of my program. I need to get familiar with Scribble and write proper documentation, but my time is very limited. As soon as I got a free weekend I'll give Scribble a

[racket-users] Can the embedded interpreter load modules not included using ++lib?

2018-05-08 Thread Colin James
So, basically, I was wondering how one could go about requiring modules in /usr/share/racket/collects from the embedded interpreter. My current program links against a base.c file generated with raco ctool base.c ++lib racket/base and simply runs REPL, it's essentially copied from the Racket

[racket-users] markdown for embedded racket package documentation

2018-05-08 Thread Neil Van Dyke
Does anyone have experience using Markdown format for embedded documentation in Racket, including generating Scribble docs (to be the most cooperative Racket citizen)? How well has that worked, in practice?  Do you end up having to kludge things, and do you find you can't express things you