Although I haven't tried to put the pieces together to do this, I
_think_ the pieces are:

1. It's easy to make a "REPL server". Following the early sections of
the tutorial from you
could something like the following. (For production you might want to
go further into the tutorial and e.g. use custodians.)

#lang racket/base

(require racket/tcp)

(define (serve port)
  (define listener (tcp-listen port 5 #t))
  (let loop ()
    (accept-and-handle listener)

(define (accept-and-handle listener)
  (define-values (in out) (tcp-accept listener))
  (parameterize ([current-input-port  in]
                 [current-output-port out])
  (close-input-port in)
  (close-output-port out))

2. When you connect to that REPL server, at its prompt you could use
`dynamic-rerequire` to (re)load your code.

As I mentioned on IRC last night before I had to run, one example of
wrapping up dynamic-rerequire is the racket-reloadable package:

I hope this helps a little? If not hopefully someone with more
hands-on experience could chime in.

(I love the idea of live-coding music and games! But how I actually
use Racket, my comfort zone is "version-controlled source files are
the single source of recreatable truth". So, I don't have a lot of
mileage with this.)

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 
For more options, visit

Reply via email to