Re: [racket-users] Code generation options for a self-made compiler

2019-08-22 Thread Matthew Flatt
At Tue, 20 Aug 2019 17:53:45 +0300, Dmitry Pavlov wrote: > > Your tool would use `make-compilation-manager-load/use-compiled-handler` > > In what way my tool would use that? I think you probably don't want to go this way. But if you want to support multiple build variants within the same tree,

Re: [racket-users] Code generation options for a self-made compiler

2019-08-20 Thread Dmitry Pavlov
Matthew, Thank you and Matthew Butterick for advice. I was offline for a while. I did not know about raco-commands. I think this is a reasonable compromise for my task. I am not concerned about co-existence of files produced by the compiler in different modes. I am not sure I got the idea

Re: [racket-users] Code generation options for a self-made compiler

2019-08-15 Thread Matthew Flatt
I don't have a great answer for this situation, either. If the compilation mode makes sense as a global configuration of an installation, then one possibility would be to add to "etc/config.rktd". Editing that file is less convenient in some ways than command-line arguments, but it's nicer in

Re: [racket-users] Code generation options for a self-made compiler

2019-08-12 Thread Matthew Butterick
+ use the `raco-commands` key in "info.rkt" to create new `raco myprog ยทยทยท` commands + use `racket/cmdline` to parse the input options to these commands. > On 12 Aug 19, at 7:34 AM, Dmitry Pavlov wrote: > > With C, everyone is happy with macros and built-in options, e. g. > > gcc -O3

[racket-users] Code generation options for a self-made compiler

2019-08-12 Thread Dmitry Pavlov
Hello, I posted this question once, nobody answered, this is a second try. I believe there should be a solution because the problem seems rather common. See, I have a DSL compiler implemented in Racket as a #lang, syntax-parse etc. Like most compilers, it can emit somewhat diifferent code from