Re: [racket-users] rel-string module path suffix not added automatically?

2019-08-20 Thread Matthew Flatt
At Tue, 20 Aug 2019 22:01:11 +0200, Štěpán Němec wrote: > I notice that (require "../file.rkt") inside a module (#lang racket, > v7.4) works, but (require "../file") doesn't ("no such file or > directory" error). > > As per , > 'If the path

Re: [racket-users] Splicing the result of one macro into another

2019-08-20 Thread Brian Adkins
On Tuesday, August 20, 2019 at 9:11:54 PM UTC-4, Brian Adkins wrote: > > On Tuesday, August 20, 2019 at 8:43:07 PM UTC-4, Sorawee Porncharoenwase > wrote: >> >> >>1. You will need a cooperation of phone-numbers macro. There are two >>ways I am aware of >>1.1 You could hard code in

Re: [racket-users] Splicing the result of one macro into another

2019-08-20 Thread Brian Adkins
On Tuesday, August 20, 2019 at 8:43:07 PM UTC-4, Sorawee Porncharoenwase wrote: > > >1. You will need a cooperation of phone-numbers macro. There are two >ways I am aware of >1.1 You could hard code in phone-numbers to deal with add-prefix >directly. >1.2 A more general

Re: [racket-users] Splicing the result of one macro into another

2019-08-20 Thread Ben Greenman
On 8/20/19, Brian Adkins wrote: > Consider the following two macros: > > (require (for-syntax syntax/parse)) > > (define-syntax (phone-numbers stx) > (syntax-parse stx > [(_ ((~literal number) phone) ...) > #'(list phone ...)])) > > (define x (phone-numbers >(number "1212")

Re: [racket-users] Splicing the result of one macro into another

2019-08-20 Thread Sorawee Porncharoenwase
1. You will need a cooperation of phone-numbers macro. There are two ways I am aware of 1.1 You could hard code in phone-numbers to deal with add-prefix directly. 1.2 A more general approach is to use local-expand in phone-numbers to partially expand macros in the body of

[racket-users] Splicing the result of one macro into another

2019-08-20 Thread Brian Adkins
Consider the following two macros: (require (for-syntax syntax/parse)) (define-syntax (phone-numbers stx) (syntax-parse stx [(_ ((~literal number) phone) ...) #'(list phone ...)])) (define x (phone-numbers (number "1212") (number "2121"))) ; ==> '("1212" "2121")

[racket-users] rel-string module path suffix not added automatically?

2019-08-20 Thread Štěpán Němec
Hello, I notice that (require "../file.rkt") inside a module (#lang racket, v7.4) works, but (require "../file") doesn't ("no such file or directory" error). As per , 'If the path has no suffix, ".rkt" is added automatically.' Does the

Re: [racket-users] running the wrong sqlite3

2019-08-20 Thread Jens Axel Søgaard
And if you are on macOS: mbp:metapict soegaard$ export DYLD_PRINT_LIBRARIES=1 mbp:metapict soegaard$ export DYLD_PRINT_LIBRARIES_POST_LAUNCH=1 mbp:metapict soegaard$ export DYLD_PRINT_RPATHS=1 /Jens Axel Den tir. 20. aug. 2019 kl. 18.49 skrev 'John Clements' via Racket Users <

Re: [racket-users] running the wrong sqlite3

2019-08-20 Thread 'John Clements' via Racket Users
In that case, perhaps you can watch the calls to dlopen with strace? See https://stackoverflow.com/questions/5103443/how-to-check-what-shared-libraries-are-loaded-at-run-time-for-a-given-process for something that might be helpful. John > On Aug 20, 2019, at 11:30, James Platt wrote: > >

Re: [racket-users] running the wrong sqlite3

2019-08-20 Thread James Platt
On Aug 19, 2019, at 9:24 PM, John Clements wrote: > Perhaps you need to configure your lib-search-dir setting? > > https://docs.racket-lang.org/raco/config-file.html?q=lib-search-dir#%28idx._%28gentag._65._%28lib._scribblings%2Fraco%2Fraco..scrbl%29%29%29 Thanks for the help but I think

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