Re: [racket-users] Distributing application with run-time configuration

2018-09-13 Thread 'Paulo Matos' via Racket Users
OK, I sat down and re-read: https://docs.racket-lang.org/guide/phases.html Then I noticed I made a stupid mistake in my first attempt. I didn't need to provide the binding at different levels, I needed only to require it at different levels. So doing (require s10/arch-choice (for-syntax s

Re: [racket-users] Distributing application with run-time configuration

2018-09-13 Thread 'Paulo Matos' via Racket Users
On 12/09/2018 16:37, Matthew Flatt wrote: > As you > say, you could have a macro expand to the result of `(getenv "ARCH")` > to pin it down at compile time, but you'll need to import that macro > into two phases, since the right-hand side of > `define-runtime-module-path-index` is implicitly use

Re: [racket-users] Distributing application with run-time configuration

2018-09-12 Thread Matthew Flatt
Hi Paulo, Some of your problems come from working with filesystem paths, instead of module paths. That's a problem because the deployment filesystem isn't necessarily anything like the build filesystem, and you have to do work to manage the difference. The simplest solution is to write things in t

[racket-users] Distributing application with run-time configuration

2018-09-12 Thread 'Paulo Matos' via Racket Users
Hi, I am trying to create racket distribution for my application, except I am tripping on my first few steps - that of generating the binary. First, the architecture of the application. There is a driver program that is configured with a backend at run-time (although one can argue this should be