Re: [racket-users] How to check if a symbol is defined before calling it?

2018-02-18 Thread Robby Findler
Glad you found something that works! For the record, being in a pkg and being an app are not mutually exclusive. DrRacket, for example, enjoys both statuses. Robby On Sun, Feb 18, 2018 at 5:41 PM Alex Harsanyi wrote: > > Hi Robby, > > On Sunday, February 18, 2018 at

Re: [racket-users] How to check if a symbol is defined before calling it?

2018-02-18 Thread Alex Harsanyi
Hi Robby, On Sunday, February 18, 2018 at 10:33:09 AM UTC+8, Robby Findler wrote: > > FWIW, the approach that is less friendly to your clients but perhaps > easier for you (and maybe good enough for them) is to declare a > dependency on a specific version in the info.rkt file of your pkg. The

Re: [racket-users] How to check if a symbol is defined before calling it?

2018-02-17 Thread Robby Findler
FWIW, the approach that is less friendly to your clients but perhaps easier for you (and maybe good enough for them) is to declare a dependency on a specific version in the info.rkt file of your pkg. The pkg system will ensure that the latest version is used. Robby On Sat, Feb 17, 2018 at 8:31

Re: [racket-users] How to check if a symbol is defined before calling it?

2018-02-17 Thread Alex Harsanyi
Hi Philip, Thanks for the quick reply, yes this strategy seemed to solve the problem. Best Regards, Alex. On Sunday, February 18, 2018 at 10:03:07 AM UTC+8, Philip McGrath wrote: > > You could do it with dynamic-require: > > (let ([point-pict (dynamic-require 'plot 'point-pict (λ () #f))]) >

Re: [racket-users] How to check if a symbol is defined before calling it?

2018-02-17 Thread Philip McGrath
You could do it with dynamic-require: (let ([point-pict (dynamic-require 'plot 'point-pict (λ () #f))]) (when point-pict (point-pict ...))) -Philip On Sat, Feb 17, 2018 at 7:57 PM, Alex Harsanyi wrote: > > The recent plot library introduces a new function,

[racket-users] How to check if a symbol is defined before calling it?

2018-02-17 Thread Alex Harsanyi
The recent plot library introduces a new function, `point-pict` which is not yet available as part of a Racket distribution, and the plot package has to be installed separately from GitHub for this function. In my code I would like to be able to check if this function is available before