Scribble and examples can't read racket-prefs.rktd

32 views
Skip to first unread message

Deren Dohoda

unread,
Aug 16, 2020, 3:45:46 AM8/16/20
to Racket Users
Hi Racketeers,

I'm going in absolute circles trying to understand what I might be doing wrong. I can use the command line scribble to generate html, which works fine except a problem showing #<pict> instead of an actual plot/pict image. And for that matter the package installs fine using a local install. But trying to run the scribble file in DrRacket always gives me errors like "cannot read racket-prefs.rkt" or other errors like "cannot reference an identifier without a definition" and sometimes it will give me errors like I have used (protect-out ...) somewhere but I am definitely not as I didn't even learn about this kind of provide until I saw this error.

Does anyone using Windows have experience getting rid of this message or have an idea what I might be doing wrong? I have a feeling that this message isn't actually the problem and it's something to do with sandbox somehow.

@(define this-eval (parameterize ((sandbox-output 'string)
                                  (sandbox-error-output 'string)
                                  (sandbox-memory-limit 100))
                     (make-evaluator 'racket/base #:requires '("main.rkt" "fit.rkt" plot/pict)
                                     (print-as-expression #f) 
                                     )))

Thanks,
Deren

Matthew Flatt

unread,
Aug 16, 2020, 8:06:49 AM8/16/20
to Deren Dohoda, Racket Users
Sandboxed filesystem and unsafety access is too strict for many
purposes. For documentation, I recommend using a trusted sandbox by
wrapping the sanebox creation with
`call-with-trusted-sandbox-configuration`.

Matthew

Deren Dohoda

unread,
Aug 16, 2020, 2:21:46 PM8/16/20
to Racket Users
Thank you Matthew, that did resolve the problem, though I was unable to ever determine why I could not display a plot from plot/pict. It seems that it was somehow related to (sandbox-output 'string) which could never be coerced display a bitmap, pict, etc. Ultimately I just used (make-base-eval) instead and skipped the sandbox.

Deren

Etan Wexler

unread,
Aug 16, 2020, 2:46:08 PM8/16/20
to Racketeers
Matthew Flatt recommended “wrapping the sanebox creation”. Matthew, these saneboxes that you’ve invented seem to be just the devices that we’ve needed. We’d like an initial batch of 5000 saneboxes, as soon as you can manage, even if unwrapped. Please send the bill to 1500, Pennsylvania Avenue, Northwest, District of Columbia, 20220, United States of America. We appreciate your timely help!

Tim Meehan

unread,
Aug 17, 2020, 2:14:57 PM8/17/20
to Etan Wexler, Racketeers
Perhaps you meant 1600 Pennsylvania ave.?

> On Aug 16, 2020, at 13:46, Etan Wexler <racket-...@r-6.org> wrote:
>
> Matthew Flatt recommended “wrapping the sanebox creation”. Matthew, these saneboxes that you’ve invented seem to be just the devices that we’ve needed. We’d like an initial batch of 5000 saneboxes, as soon as you can manage, even if unwrapped. Please send the bill to 1500, Pennsylvania Avenue, Northwest, District of Columbia, 20220, United States of America. We appreciate your timely help!
>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/2020-08-16_saneboxes%40r-6.org.
Reply all
Reply to author
Forward
0 new messages