[plt-dev] new language dialog, iii

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sat Jan 30 11:51:37 EST 2010

On Fri, Jan 29, 2010 at 3:58 PM, Eli Barzilay <eli at barzilay.org> wrote:
>> > I'm thinking of something like
>> >
>> >
>> >  #lang some-language #!bleh
>> >
>> > where the `#!bleh' is part of the `some-language' specification.
>>
>> But the string is limited to what was consumed, so the regexp won't be
>> applied to that part of the string or so I thought.
>
> The thing that gets consumed is *anything* that the language reader
> decides to read to make a decision about all of its settings.  In the
> above case, the code dispatches to the reader in
> `some-language/lang/reader' after reading `some-lang', then that code
> can read *anything* it wants and return the info function.  So the
> point where reading reached is the point that marks all the necessary
> text to determine the language and its settings.

Oh, of course. I see. That's fixed now.

On Fri, Jan 29, 2010 at 10:03 PM, Eli Barzilay <eli at barzilay.org> wrote:
> On Jan 29, Robby Findler wrote:
>> You are suggesting that planet and drscheme collaborate directly via
>> some parameter that planet exports that tells it to parse the line
>> but return a dummy info if the package is not installed? (and use
>> various security measures to forbid network access in addition)
>>
>> I think that makes sense.
>
> No, I'm saying that if you forbid network access (via a security
> guard), then you don't even need to extend planet.  It was a little
> tricky since the first thing I tried got caught by planet (see big
> comment), but the following should be a fine version.  It seems to me
> like this works even better than a planet hook, since it will work
> with any kind of network hook in the resolver (for example, some
> future (require (url ...)) thing or whatever).

Okay, that's fine.

I probably should be using a sandbox too, so that when I run this
untrusted code I always get a result back.

That's probably a useful thing to package up into a library, ie
(read-language/sandbox ...) which is guaranteed to terminate without
killing anything and perhaps the function it returns also does the
calls inside the same sandbox.

Robby


Posted on the dev mailing list.