Title: Re: [racket-users] Is this running in DrRacket or as a script?
Hello Laurent and Sorawee,

this is exactly what I was looking for and it works like a charm.

I never realised that "Submodules to run" was an active UI element.
Probably one of the places where I should have RTExcellentM a bit more.

Thanks a lot,
s.


Wednesday, September 2, 2020, 10:48:32 AM, you wrote:


Using Laurent’s suggestion, you can also create a global variable / parameter that will be set by the drracket submodule. That way, you can create running-in-drracket? and use it inside functions.

On Wed, Sep 2, 2020 at 12:54 AM Laurent <
laurent.ors...@gmail.com> wrote:

You can use a `drracket` submodule:

(module+ drracket
 (foo)
 (bar))

but you need to configure DrRacket to recognize it: Click on the bottom-left button about languages, and at the bottom of "Dynamic Properties", click on "Submodules to run", then "Add submodule option" and add "drracket".

After this, when you run a module from within DrRacket, it will automatically run the `drracket` submodule, but this submodule will *not* be run from the command line (by default).

(I also uncheck the "main" submodule as I use this one only for the command line.)

HTH,
Laurent




On Wed, Sep 2, 2020 at 8:44 AM Stefan Schmiedl <
stefan.schmi...@gmail.com> wrote:

Greetings,

I find myself coding some more in DrRacket on my local Win10 PC.
The finished program is to be run on a remote linux server.

I like to keep the code set up for the production environment
but to test it locally I need to configure some things differently.

Currently I'm doing this manually by commenting/uncommenting a sexp
with the required modifications.

Is there a function around that allows me to do something like

(when (running-in-dr-racket?)
  (foo)
  (bar))

Thanks,
s.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-users/26327196.20200902094324%40gmail.com.
--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-users/CABNTSaHRMNb8_efegWNC4x68tgo3Q96-ja7ZKHTgSi0Ap86K1g%40mail.gmail.com.


--
Best regards,
Stefan Schmiedl

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/361439838.20200902135614%40gmail.com.

Reply via email to