Re: [racket-users] Require the same file repeatedly for debugging on command line

2017-03-15 Thread Marc Kaufmann
Ha, very nice. That's exactly what I was looking for - at least it works if
I drop the "#lang racket" at the beginning of the file. If I do include it
and thus, if I understand correctly, make it a module, it somehow does not
seem to load it properly. Short example for file test.rkt:

#lang racket

(define (blob x) 7)

(provide blob)

In xrepl:
> ,rr test.rkt
; reloading "test.rkt"
> blob
; blob: undefined;
;  cannot reference undefined identifier
; [,bt for context]

What am I missing? It does work if I drop the #lang and the `provide.

Marc

On Wed, Mar 15, 2017 at 10:35 AM, Greg Hendershott <
greghendersh...@gmail.com> wrote:

> Have you tried using XREPL -- perhaps its ,enter command or
> ,require-reloadable?
>
>   https://docs.racket-lang.org/xrepl/index.html
>
> On Mon, Mar 13, 2017 at 9:44 PM, Marc Kaufmann
>  wrote:
> > Hi all,
> >
> > while trying to debug, I often change the code in the text file and then
> want to do a (require "file-with-code.rkt") on the command line to test the
> new code. This never works, because I cannot redefine imported modules.
> Thus I always use Dr Racket for this, where I can hit the "Run" button,
> which reruns everything and all is good. Since I prefer to use Vim for
> editing, I was wondering if there is an equivalent of the "Run" button for
> the command line (well, for the require at least)?
> >
> > Thanks,
> > Marc
> >
> > --
> > 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.


[racket-users] Require the same file repeatedly for debugging on command line

2017-03-13 Thread Marc Kaufmann
Hi all,

while trying to debug, I often change the code in the text file and then want 
to do a (require "file-with-code.rkt") on the command line to test the new 
code. This never works, because I cannot redefine imported modules. Thus I 
always use Dr Racket for this, where I can hit the "Run" button, which reruns 
everything and all is good. Since I prefer to use Vim for editing, I was 
wondering if there is an equivalent of the "Run" button for the command line 
(well, for the require at least)?

Thanks,
Marc

-- 
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.