Re: [racket-users] Is there a predefined (define-runtime-path "this_file")?

2016-09-23 Thread David Storrs
Brilliant. Thanks, Alex. On Fri, Sep 23, 2016 at 8:15 AM, Alex Knauth wrote: > > > On Sep 23, 2016, at 10:53 AM, David Storrs > wrote: > > > > Is there a Racket equivalent of Perl's __FILE__ token? > > Yes, it's called `quote-source-file`, in syntax/location. > http://docs.racket-lang.org/synt

Re: [racket-users] Is there a predefined (define-runtime-path "this_file")?

2016-09-23 Thread Alex Knauth
> On Sep 23, 2016, at 10:53 AM, David Storrs wrote: > > Is there a Racket equivalent of Perl's __FILE__ token? Yes, it's called `quote-source-file`, in syntax/location. http://docs.racket-lang.org/syntax/Source_Locations.html#%28form._%28%28lib._syntax%2Flocation..rkt%29._quote-source-file%29%2

[racket-users] Is there a predefined (define-runtime-path "this_file")?

2016-09-23 Thread David Storrs
Is there a Racket equivalent of Perl's __FILE__ token? In Perl I can do this: I'd like to be able to access files at runtime that have a path known in relation to the current file. I can do this: (define-runtime-path this-dir ".") (file-exists? (build-path this-dir (some-func-that-retu