[racket] Places acting differently in DrRacket and Racket

From: Nick Shelley (nickmshelley at gmail.com)
Date: Thu Oct 18 12:48:10 EDT 2012

So, to clarify for my sake, is it safe to say that places should never be
created at the top level of any module (I haven't really looked into how
dynamic places work, so this statement may not apply there)? For instance,
when I wrap the previous top-level code in a module+ main, I get a contract
violation, but when I put it in a function like Matthew's code, it works
fine.

On Thu, Oct 18, 2012 at 6:21 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:

> That's right, and it's awkward, but it's not broken in the sense of an
> overlooked mistake in the implementation. It's the intended semantics
> --- the best we know how to implement, for now.
>
> I use a `main' submodule to avoid creating too many places:
>
>  #lang racket
>
>  (define (go)
>    (place-wait (place x (system "touch /tmp/file"))))
>
>  (module+ main (go))
>
> It seems like there should a nicer syntactic form for this pattern, but
> I haven't found one that I like enough to recommend.
>
> At Thu, 18 Oct 2012 10:05:19 +0200, Tobias Hammer wrote:
> > The whole enclosing module (file) is executed again on every call to
> place.
> > Add a print before the place start to see it. Seems to be broken since <
> > 5.2.1.
> >
> > On Thu, 18 Oct 2012 06:39:56 +0200, Nick Shelley <nickmshelley at gmail.com
> >
> > wrote:
> >
> > > It looks like that was the problem. Thanks!
> > >
> > > However, if I add (place-wait p) after defining p as the place,
> DrRacket
> > > runs out of memory (and never prints anything), while Racket gives a
> > > "place: scheduler pipe failed" error and runs the place body about 50
> > > times. Anything else obvious I'm missing?
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121018/7b188541/attachment.html>

Posted on the users mailing list.