#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 racket/base/lang/reader test.rkt
... ok ...
(define new-config "new-value")
;; (for-syntax racket/base) is for expansion-time
;; evaluation in define-runtime-path
(define *CHANGED-STRING* "old")
(define ns (namespace-anchor->namespace a))
inc-path (string->path "include.rkt"))
(parameterize ([current-namespace ns])
(set! *CHANGED-STRING* (dynamic-require inc-path 'new-config))))
(printf "~A~%" *CHANGED-STRING*)
On Mon, May 7, 2018 at 10:50 AM, 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` "executables" to
> MacOS users who
> just want stock configuration, etc...
> The existence of an `.app` executables is helpful in other ways, as well.
> For example,
> starting an application at startup, icons, etc...
> On Monday, May 7, 2018 at 11:16:32 AM UTC-4, Neil Van Dyke wrote:
>> Regarding overriding globals, a Racket `parameter` is more idiomatic:
>> And/or, you could load your config file as a module, like `info.rkt` is.
>> You might find `dynamic-require` and friends interesting:
>> For one different way to think about config files, especially if your
>> users are programmers, perhaps your application program could be a
>> framework, and the config file is the program that the user runs, and
>> that config file program instantiates the framework:
> 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
For more options, visit https://groups.google.com/d/optout.