Hi Robby Thanks for this!
Dan On Sun, May 29, 2016 at 9:57 AM, Robby Findler <ro...@eecs.northwestern.edu> wrote: > I've pushed another attempt. This one special cases 2htdp/image images > so they should be now equally efficient in both write and display. It > also makes things so that write and print both work the same now > (print is being called implicitly when you just return a value at the > top level). > > Robby > > On Tue, May 17, 2016 at 8:12 PM, Robby Findler > <ro...@eecs.northwestern.edu> wrote: > > Ah, thanks for the clarification. I don't see how I can reasonably > > support this for picts (because the `dc` procedure is used a lot), but > > maybe DrRacket can collude with the 2htdp/image library to get > > display's speed and print's safety. I'll think more about it. > > > > Robby > > > > > > On Tue, May 17, 2016 at 7:54 PM, Daniel Prager > > <daniel.a.pra...@gmail.com> wrote: > >> Hi Robby > >> > >> I only used the same bitmap for convenience of example. > >> > >> I have cases where every bitmap is different! > >> > >> I hope that the eventual outcome is fast *and* secure! > >> > >> At the moment my workaround is to > >> (display ...). > >> > >> Dan > >> > >> On May 18, 2016 8:52 AM, "Robby Findler" <ro...@eecs.northwestern.edu> > >> wrote: > >>> > >>> Sorry it is taking me so long to look into this. One piece of (not so > >>> useful to you who want an actual solution!) information is that you've > >>> pointed out a security hole in DrRacket that I thought I'd closed, but > >>> apparently have only partly closed. If you run the program below, then > >>> DrRacket itself will exit and that's not supposed to be able to > >>> happen. (The worst a program should be able to do is kill itself, not > >>> kill the whole IDE.) > >>> > >>> Fixing this makes both of these ways of printing just as slow as each > >>> other, however. The basic issue is that DrRacket has to "sanitize" the > >>> values that come across and that process involves copying the bitmaps > >>> in your example and there are a lot of them. Since they are all the > >>> same bitmap, however, maybe there's a way to shortcircuit that. > >>> > >>> Robby > >>> > >>> #lang racket > >>> (require racket/gui/base) > >>> > >>> (define s% > >>> (class snip% > >>> (super-new) > >>> (define/override (copy) (new s%)) > >>> (define/override (draw . args) > >>> (queue-callback > >>> (λ () '(exit)))))) > >>> > >>> (new s%) > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.