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

Re: [racket-users] opt/c behaves inconsistently with respect to flat-contract?-ness

2018-02-17 Thread Robby Findler
Sorry for the delay in looking into this. I've pushed a fix. FWIW, opt/c definitely needs a lot of love before I would recommend using it seriously. I think it is a good idea and the approach in the implementation is certainly reasons, but it can certainly use a tune up. Robby On Sun, Dec 24,

Re: [racket-users] Making print act like display

2018-02-17 Thread Robby Findler
One can certainly debate the merits of the names, and perhaps that's worth doing, but I'll refrain from it myself, except to point out that Racket inherited the names "write" and "display" from Scheme, and "print" is a name that we added. Here is how to think about these functions: "write" is a

Re: [racket-users] Making print act like display

2018-02-17 Thread Matthew Butterick
Perhaps `display-to-file`? #lang racket (require racket/file) (define (write-to-file path string-list) (for ([line string-list]) (display-to-file line path #:exists 'append))) > On Feb 17, 2018, at 9:56 AM, Zelphir Kaltstahl > wrote: > > > I am writing

Re: [racket-users] big-bang + right click?

2018-02-17 Thread Jay McCarthy
FWIW Stephen, I have another package called `lux` that tries to be a "professional" big-bang and it supports stuff like this. The documentation is here: http://docs.racket-lang.org/lux/index.html But I suggest checking out the two examples first. val-demo ---

Re: [racket-users] racket/draw unable to load some font-weights on macOS?

2018-02-17 Thread Matthew Flatt
We're using Pango 1.36.6. I try to keep track of the versions in https://github.com/racket/racket/blob/master/racket/src/native-libs/README.txt At Sat, 17 Feb 2018 09:20:14 -0800 (PST), Joel Dueck wrote: > I wouldn’t know for sure, but looking at the github repo for racket/draw > [1] …it

Re: [racket-users] racket/draw unable to load some font-weights on macOS?

2018-02-17 Thread Joel Dueck
I wouldn’t know for sure, but looking at the github repo for racket/draw [1] …it looks like, maybe, 1.0.0?? If so, maybe that’s the problem. [1]: https://github.com/racket/draw/blob/master/draw-lib/racket/draw/unsafe/pango.rkt On Saturday, February 17, 2018 at 4:56:28 AM UTC-6, Jens Axel

Re: [racket-users] Reverse proxy in racket

2018-02-17 Thread Philip McGrath
I have implemented a small reverse proxy in Racket, also based on http-sendrecv/url. It is mostly for a specific application (I know there are some considerations I have not addressed), but I can list some considerations I've encountered along the way: - A proxy is supposed to remove

[racket-users] Reverse proxy in racket

2018-02-17 Thread Andrea Giardina
Hi all, I'd need to write a very simple reverse proxy and I'm wondering what's the best way to do it in racket. I don't have any requirements but performance (not even security and reliability, since I'm writing basically a testing tool). I came out with this solution (using http-sendrecv/url).

Re: [racket-users] racket/draw unable to load some font-weights on macOS?

2018-02-17 Thread Jens Axel Søgaard
Which version of Pango is Racket using? 2018-02-17 5:27 GMT+01:00 Joel Dueck : > I appreciate it. I had already tried bold and italic, but your note did > give me the idea to try specifying the weights directly, e.g. "IBM Plex > Sans, weight=700" —which, sadly, didn't