<div dir="ltr">This won't work either, unfortunately. The constraint on racket/gui/base not being instantiated twice holds even across multiple places. You can see this in DrRacket, for example by writing this program:<div>
<br></div><div><div>#lang racket</div><div>(begin-for-syntax</div><div> (dynamic-require 'racket/gui/base #f))</div></div><div><br></div><div>online check syntax chokes with the "cannot instantiate `racket/gui/base' a second time in the same process" error.</div>
<div><br></div><div>Robby</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 6, 2014 at 11:40 AM, Spencer florence <span dir="ltr"><<a href="mailto:spencerflorence@gmail.com" target="_blank">spencerflorence@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>Annother option is for ,run to spin up a place, and then have the emacs repl pass commands over the channel. That should allow GUI to be instantiated as much as one wants. Im not sure how passing a "C-c" over to the place would work however. C-c could just kill the place, but that would come at the cost of loosing the backtrace. Also if emacs were to crash the place might not shutdown.</span><div class="HOEnZb">
<div class="h5"><br><br><div class="gmail_quote"><p>On Sun, Apr 6, 2014 at 12:35 PM, Robby Findler <span dir="ltr"><<a href="mailto:robby@eecs.northwestern.edu" target="_blank">robby@eecs.northwestern.edu</a>></span> wrote:<br>
</p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br>On Sunday, April 6, 2014, Greg Hendershott <<a href="mailto:greghendershott@gmail.com" target="_blank">greghendershott@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
>> How does this handle dynamic and lazy requires?<br><br>
It doesn't.<br><br>
> Also: how do you know if the cache is stale?<br><br>
I don't.<br><br>
So my other idea was to do what dynamic-rerequire does and<br>
parameterize current-load/use-compiled, and examine the dependencies.<br>
However in the case where it detects racket/gui/base being loaded for<br>
the first time, it would somehow need to abort the load,<br>
dynamic-require racket/gui/base on the main custodian, then restart<br>
the load as usual. That felt icky, so instead I tried the above, but<br>
if it's the only way to handle dynamic and lazy requires, it's the<br>
only way.<br></blockquote>
<div><br></div>
<div>I think you would need to abort the program and start it over to really do that properly. </div>
<div><br></div>
<div>Avoiding the focus shift at the OS level seems easier (altho I don't know if what the right Mac OS X calls to do it are).<span></span>
</div>
<div><br></div>
<div>Robby </div>
</blockquote></div><br></div></div></blockquote></div><br></div>