[racket-users] reporting contract violations in executable programs

2018-11-01 Thread Alexander McLin
I’m a little confused here, to me it looks like the second contract violation is completely different from the first one. You were expecting `foo` to raise a contract violation but in your executable example it appears that contract violation is being raised by the `build-path` function not

[racket-users] Re: reporting contract violations in executable programs

2018-11-01 Thread Alex Harsanyi
On Thursday, November 1, 2018 at 7:38:29 PM UTC+8, Alexander McLin wrote: > > I’m a little confused here, to me it looks like the second contract > violation is completely different from the first one. > My program is only seven lines of code and does not call `build-path`. Also, if I fix

[racket-users] Doing file I/O from within a macro

2018-11-01 Thread Alex Knauth
Is it possible to create a temporary file, write to it, run a command on it, and the possibly delete the file from within a macro? Or is it possible to run a command (as in `system`) in a context where it pretends that some file exists? And, how does this play with DrRacket's background

Re: [racket-users] Doing file I/O from within a macro

2018-11-01 Thread Robby Findler
DrRacket disallows network and filesystem access during its online expansion. Partly for security reasons and partly because it seems unlikely that the code one writes that does that would be kill safe. You might be able to bike the abstractions you news via the FFI but I guess it will be hard to

Re: [racket-users] Doing file I/O from within a macro

2018-11-01 Thread George Neuner
On 11/1/2018 8:32 PM, Robby Findler wrote: DrRacket disallows network and filesystem access during its online expansion. Partly for security reasons and partly because it seems unlikely that the code one writes that does that would be kill safe. You might be able to bike the abstractions you

Re: [racket-users] Re: Typing lag with DrRacket on Linux

2018-11-01 Thread evdubs
*Resurrecting an old thread.* I recently tried to see what would happen if I changed the interactions-canvas% and definitions-canvas% to be the following: (define interactions-canvas% (class editor-canvas% (init [style '(transparent)]) (super-new (style (cons 'auto-hscroll

Re: [racket-users] Re: reporting contract violations in executable programs

2018-11-01 Thread Shu-Hung You
Thanks for catching this! This is a bug in the setup/dirs library, which the contract system transitively depends on to compute the path in the error message. I opened a pull request and let's see how it goes (#2352). On Thu, Nov 1, 2018 at 5:23 PM Alex Harsanyi wrote: > > > > On Thursday,

Re: [racket-users] Doing file I/O from within a macro

2018-11-01 Thread Alex Knauth
> On Nov 1, 2018, at 8:32 PM, Robby Findler wrote: > > DrRacket disallows network and filesystem access during its online expansion. > Partly for security reasons and partly because it seems unlikely that the > code one writes that does that would be kill safe. You might be able to bike >

Re: [racket-users] Doing file I/O from within a macro

2018-11-01 Thread George Neuner
Hi Alex, On 11/1/2018 6:57 PM, Alex Knauth wrote: Is it possible to create a temporary file, write to it, run a command on it, and the possibly delete the file from within a macro? Yes it is possible [see below].  What you need to do depends on whether you want to keep the file open in