<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16434"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=699260216-30082011><FONT color=#0000ff
size=2 face=Arial>May be the following observation helps:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=699260216-30082011><FONT color=#0000ff
size=2 face=Arial>when running without saving the definitions I get an
error.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=699260216-30082011><FONT color=#0000ff
size=2 face=Arial>when running after saving all goes well.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=699260216-30082011><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=699260216-30082011><FONT color=#0000ff
size=2 face=Arial>Windows 7, DrRacket, version 5.1.3.6--2011-08-28(c97b314/a)
[3m]</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=699260216-30082011><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=699260216-30082011><FONT color=#0000ff
size=2 face=Arial>Jos</FONT></SPAN></DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> users-bounces@racket-lang.org
[mailto:users-bounces@racket-lang.org] <B>On Behalf Of </B>David
Mitchell<BR><B>Sent:</B> martes, 30 de agosto de 2011 16:55<BR><B>To:</B>
users@racket-lang.org<BR><B>Subject:</B> Re: [racket] racket/place seems to be
incompatible with DrRacket<BR></FONT><BR></DIV>
<DIV></DIV>Steps:
<DIV><BR></DIV>
<DIV>1. Open DrRacket</DIV>
<DIV>2. In the definitions window, paste in</DIV>
<BLOCKQUOTE
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 0px 40px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0px"
class=webkit-indent-blockquote>
<DIV>
<DIV>
<DIV>#lang racket</DIV>
<DIV><BR></DIV>
<DIV>(define (super-simple)</DIV>
<DIV> (define p</DIV>
<DIV> (place ch</DIV>
<DIV> (place-channel-put ch 5)))</DIV>
<DIV> (place-channel-get p))</DIV></DIV></DIV></BLOCKQUOTE>3. Click the
"Run" button in the toolbar
<DIV>4. In the REPL, type "(super-simple)"</DIV>
<DIV><BR></DIV>
<DIV>The call to provide is necessary when loading code in the Terminal, but it
doesn't seem necessary with DrRacket. In fact, based on the comment I saw in IRC
about DrRacket reloading the module, I wonder if that has something to do with
it. (although I'm new enough to Racket to not put much stock in my
intuitions)</DIV>
<DIV>
<DIV><BR></DIV></DIV>
<DIV>— Dave<BR>
<DIV><BR>
<DIV class=gmail_quote>On Tue, Aug 30, 2011 at 7:19 AM, Robby Findler <SPAN
dir=ltr><<A
href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>I'm not seeing bad behavior so probably I'm doing something
slightly differently than you, which is making the difference. If you have the
energy to send a precise set of steps I'm happy to try them on my machine and
maybe that'll help us sort it out.<BR><FONT color=#888888><BR>Robby</FONT>
<DIV>
<DIV></DIV>
<DIV class=h5><BR><BR>On Tuesday, August 30, 2011, David Mitchell <<A
href="mailto:dave@fallingcanbedeadly.com"
target=_blank>dave@fallingcanbedeadly.com</A>> wrote:<BR>> I tried
saving the module and putting a require in the DrRacket window, and that works
correctly. I think this will be an acceptable workaround for the time being,
but I'd really like to know more about what's going on.<BR>><BR>> --
Dave (on the iPhone)<BR>><BR>> On Aug 30, 2011, at 4:44 AM, Robby
Findler <<A href="mailto:robby@eecs.northwestern.edu"
target=_blank>robby@eecs.northwestern.edu</A>> wrote:<BR>><BR>>>
I'm sorry; I was wrong.<BR>>><BR>>> I don't see the behavior
you're seeing, tho. If I add parens around<BR>>> 'all-defined-out', and
save the file in tmp.rkt, then this is the<BR>>> behavior I see at the
command-line racket:<BR>>><BR>>> Welcome to Racket
v5.1.3.6.<BR>>>> (require "tmp.rkt")<BR>>>>
(super-simple)<BR>>> 5<BR>>><BR>>> and I see similar
behavior in DrRacket:<BR>>><BR>>> Welcome to DrRacket, version
5.1.3.6--2011-08-25(7bb8c6c4/d) [3m].<BR>>> Language: racket; memory
limit: 128 MB.<BR>>>> (super-simple)<BR>>>
5<BR>>>><BR>>><BR>>> FWIW, in 5.1.3, I get an error
that's surprising to me, as I don't see<BR>>> how the sandbox gets
involved in this program, but here it is:<BR>>><BR>>> car: expects
argument of type <pair>; given '#((module program
racket/base))<BR>>><BR>>> === context ===<BR>>>
/Applications/Racket v5.1.3/collects/racket/sandbox.rkt:572:17: ns<BR>>>
/Applications/Racket v5.1.3/collects/racket/sandbox.rkt:584:20<BR>>>
/Applications/Racket v5.1.3/collects/racket/sandbox.rkt:334:0:
call-with-limits<BR>>> /Applications/Racket
v5.1.3/collects/racket/sandbox.rkt:564:0: evaluate-program<BR>>>
/Applications/Racket<BR>>>
v5.1.3/collects/racket/private/more-scheme.rkt:151:2:<BR>>>
call-with-break-parameterization<BR>>> /Applications/Racket
v5.1.3/collects/racket/sandbox.rkt:704:2: user-process<BR>>>
/Applications/Racket
v5.1.3/collects/mred/private/wx/common/queue.rkt:430:6<BR>>>
/Applications/Racket
v5.1.3/collects/mred/private/wx/common/queue.rkt:470:32<BR>>><BR>>>
Robby<BR>>><BR>>> On Mon, Aug 29, 2011 at 8:55 PM, David
Mitchell<BR>>> <<A href="mailto:dave@fallingcanbedeadly.com"
target=_blank>dave@fallingcanbedeadly.com</A>> wrote:<BR>>>> You
might have to unpack that a little bit more for me, as I don't see how that's
the case. Additionally, why would it work from Terminal and not
DrRacket?<BR>>>><BR>>>> -- Dave (on the
iPhone)<BR>>>><BR>>>> On Aug 29, 2011, at 6:32 PM, Robby
Findler <<A href="mailto:robby@eecs.northwestern.edu"
target=_blank>robby@eecs.northwestern.edu</A>>
wrote:<BR>>>><BR>>>>> I think what's happening is that
you're creating a place whose first<BR>>>>> action is to create
that same place again (over and over).<BR>>>>><BR>>>>>
Robby<BR>>>>><BR>>>>> On Mon, Aug 29, 2011 at 8:17 PM,
David Mitchell<BR>>>>> <<A
href="mailto:dave@fallingcanbedeadly.com"
target=_blank>dave@fallingcanbedeadly.com</A>>
wrote:<BR>>>>>> I've been trying to experiment with
racket/place, but it seems to have<BR>>>>>> significant
incompatibilities with DrRacket. I've defined a module based
on<BR>>>>>> a code snippet in <A
href="http://www.cs.utah.edu/plt/publications/dls11-tsffd.pdf"
target=_blank>http://www.cs.utah.edu/plt/publications/dls11-tsffd.pdf</A><BR>>>>>>
that looks like this:<BR>>>>>><BR>>>>>> #lang
racket<BR>>>>>> (provide
all-defined-out)<BR>>>>>> (define (fib
n)<BR>>>>>> (define (fib-inner n-remaining i
i+1)<BR>>>>>> (if (= n-remaining
1)<BR>>>>>>
i+1<BR>>>>>> (fib-inner (-
n-remaining 1) i+1 (+ i i+1))))<BR>>>>>> (if (<= n
0)<BR>>>>>> 0<BR>>>>>>
(fib-inner n 0 1)))<BR>>>>>> (define
(start-fib n)<BR>>>>>> (define p<BR>>>>>>
(place ch<BR>>>>>>
(define n (place-channel-get ch))<BR>>>>>>
(place-channel-put ch (fib
n))))<BR>>>>>> (place-channel-put p
n)<BR>>>>>> p)<BR>>>>>> (define
(super-simple)<BR>>>>>> (define
p<BR>>>>>> (place ch<BR>>>>>>
(place-channel-put ch
5)))<BR>>>>>> (place-channel-get
p))<BR>>>>>><BR>>>>>> If I run racket in my
Terminal and load this module, I'm able to use<BR>>>>>>
start-fib and super-simple as expected. However, if I define this module
in<BR>>>>>> the DrRacket editor and access the functions
through the repl, attempts to<BR>>>>>> rec
</DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></DIV></BODY></HTML>