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

2018-05-07 Thread Alex Harsanyi
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 on top of it. Once both dialog boxes are closed, the

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

2018-05-07 Thread 'John Clements' via Racket Users
Well, that was easy! As usual, can’t believe I didn’t know that was there. Many thanks to all, John > On May 7, 2018, at 5:00 PM, Daniel Prager wrote: > > ~r works nicely: > > > (~r 1.237472387 #:precision 2) > "1.24" -- You received this message because you

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

2018-05-07 Thread Daniel Prager
~r works nicely: > (~r 1.237472387 #:precision 2) "1.24" -- 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

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

2018-05-07 Thread Alexis King
I second ~r. It will round when given a precision. > On May 7, 2018, at 18:56, Stephen Chang wrote: > > Oops, I didnt see the rounding. > > On Mon, May 7, 2018 at 7:53 PM, Ben Greenman > wrote: >> I use this: >>

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

2018-05-07 Thread Stephen Chang
Oops, I didnt see the rounding. On Mon, May 7, 2018 at 7:53 PM, Ben Greenman wrote: > I use this: > http://docs.racket-lang.org/gtp-util/index.html#%28def._%28%28lib._gtp-util%2Fmain..rkt%29._rnd%29%29 > > I didn't know about SRFI 54 --- looking forward to reading

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

2018-05-07 Thread Stephen Chang
~r http://docs.racket-lang.org/reference/strings.html?q=~r#%28def._%28%28lib._racket%2Fformat..rkt%29._~7er%29%29 On Mon, May 7, 2018 at 7:46 PM, 'John Clements' via Racket Users wrote: > Okay, how many times have I written the function that accepts 1.237472387 and

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

2018-05-07 Thread Ben Greenman
I use this: http://docs.racket-lang.org/gtp-util/index.html#%28def._%28%28lib._gtp-util%2Fmain..rkt%29._rnd%29%29 I didn't know about SRFI 54 --- looking forward to reading other responses. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To

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

2018-05-07 Thread 'John Clements' via Racket Users
Okay, how many times have I written the function that accepts 1.237472387 and returns “1.24” ? What do you folks use? I see that SRFI 54 covers this use case, and a lot of others besides. Is this the most commonly used package for formatting numbers? John -- You received this message

Re: [racket-users] Problems with dynamic loading and `raco exe` executables

2018-05-07 Thread Tony Fischetti
Thanks, Shu-Hung With your help, I got it working for the application I was using this for. The main thing that made the difference for me was the (require racket/runtime-path (for-syntax .) thing and including *a lot* of libs in the call to `raco exe` I'm still using `load` because I need

Re: [racket-users] Problems with dynamic loading and `raco exe` executables

2018-05-07 Thread Shu-Hung You
#lang racket/load and (load PATH) are less idiomatic and more low-level in Racket. I don't know how did racket/load and load interact with ``raco exe'' but here's another way to make it work. Everything is placed inside modules. $ racket test.rkt ... ok ... $ raco exe ++lib

Re: [racket-users] Problems with dynamic loading and `raco exe` executables

2018-05-07 Thread Tony Fischetti
This is some really great advice! Thanks! I'm still confused about why making an executable isn't working. Am I doing something wrong? Even if I choose the framework option for *this* project (it seems like a really helpful thing) I'd like to be able to distribute, for example, `.app`

Re: [racket-users] Problems with dynamic loading and `raco exe` executables

2018-05-07 Thread Neil Van Dyke
Regarding overriding globals, a Racket `parameter` is more idiomatic: https://docs.racket-lang.org/reference/parameters.html And/or, you could load your config file as a module, like `info.rkt` is. You might find `dynamic-require` and friends interesting:

[racket-users] Problems with dynamic loading and `raco exe` executables

2018-05-07 Thread Tony Fischetti
Hi all! I read all the documentation and relevant threads (I promise) I could on the topic but I'm still stuck. Basically, I'm writing an application that I'd like to be able to read an "config" file that's valid racket code and can override globals set in the driver racket module. Here's a