p.s. Actually DrRacket probably won't give you that redef error if in
the Language dialog you un-check "Enforce constant definitions
(enables some inlining)".  So then you could copy and paste the new
function def from definitions to interactions.

On Mon, Feb 15, 2016 at 11:48 AM, Greg Hendershott
<greghendersh...@gmail.com> wrote:
> Well, racket-mode embraces the DrRacket approach that a Run will reset
> the REPL environment to match your source files.
>
> I love the sanity provided by this, plus having real modules, not just
> "load".  When I write Emacs Lisp or Clojure, eventually I need to
> restart or do an external byte-compile, to be sure. I think it's
> wonderful that DrRacket provides the benefit of a "restart" on every
> Run, and does so nearly instantaneously compared to restarting Emacs
> or Clojure/JVM.
>
> Having said that, Fred's case is one where poking at mutable REPL
> state seems more natural.  Although I agree with Neil that probably
> you'll want tests, so probably you should figure out how to capture
> the result, and may as well do it sooner rather than later. But very
> early on, exploring, I understand.
>
> Here's one tip: Although racket-mode embraces the DrRacket Run
> approach, it does provide typical Emacs shortcuts like C-x e and C-M-x
> to send pieces of the source file to the REPL. You can redefine a
> function like this. (You could also do this with copy and paste,
> including in DrRacket.  But DrRacket will give a constant-redef error;
> racket-mode won't.)
>
> This way you can extend your REPL exploration longer, in a case like
> this. But it will still get blown away and reset to the source file on
> your next racket-run.
>
>
>
>
>
>
> On Mon, Feb 15, 2016 at 11:35 AM, Matthias Felleisen
> <matth...@ccs.neu.edu> wrote:
>>
>> On Feb 15, 2016, at 11:25 AM, Fred Martin <fgmarti...@gmail.com> wrote:
>>
>>> Hi Neil, thanks.
>>>
>>> In my case presently, "long-computation" is gathering up results from a 
>>> bunch of net queries, and the result is a list of hash objects.
>>>
>>> I don't think your suggestion will work for this?
>>>
>>> Also the nature of your suggestion is making me nervous that I'm asking for 
>>> something that's really not there?
>>>
>>> I remember in MCL that you could re-evaluate a single procedure definition 
>>> -- does Racket have anything like that?
>>
>>
>> Yes. You are conflating Language and Development Context. If you wish to 
>> live in the Lisp mode of development, you may wish to skip over Racket + 
>> DrRacket and use Racket + Emacs instead (and Greg Hendershott has developed 
>> a good Racket mode for that).
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to