[racket] using scribble/eval in conjunction with scribble/lp

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Dec 16 15:04:45 EST 2014

... after the next build, at least.

Problems related to the repository split have prevented the snapshots
from being up-to-date for the past few days, but I'm optimistic that
the next snapshot will be right.

At Tue, 16 Dec 2014 14:54:06 -0500, Matthias Felleisen wrote:
> 
> You probably want the current snapshot: 
> 
>   http://www.cs.utah.edu/plt/snapshots/
> 
> 
> 
> 
> On Dec 16, 2014, at 1:28 PM, Joel McCracken <mccracken.joel at gmail.com> wrote:
> 
> > Forwarding to users, since I forgot to reply-all.
> > 
> > 
> > ---------- Forwarded message ----------
> > From: Joel McCracken <mccracken.joel at gmail.com>
> > Date: Tue, Dec 16, 2014 at 1:27 PM
> > Subject: Re: [racket] using scribble/eval in conjunction with scribble/lp
> > To: Matthew Flatt <mflatt at cs.utah.edu>
> > 
> > 
> > Hmm, I'm having trouble finding this new release of Racket that will
> > allow a #lang scribble/lp2 -- I'll keep looking later. This is awesome
> > though, thank you for the prompt response!
> > 
> > On Mon, Dec 15, 2014 at 8:15 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> >> At Mon, 15 Dec 2014 15:49:38 -0700, Matthew Flatt wrote:
> >>> Meanwhile, I'll work on changing `scribble/lp` so that a module
> >>> implemented with `#lang scribble/lp` can be passed directly to
> >>> Scribble.
> >> 
> >> That turned out to be `scribble/lp2`, since the changes would be
> >> incompatible with existing uses of `scribble/lp`.
> >> 
> >> With the development versions of the "drracket" and "scribble"
> >> packages, and with the program below, you can click "Run" to run the
> >> program and interact with `f`, or you can click one of the "Scribble"
> >> buttons to render the document.
> >> 
> >> ----------------------------------------
> >> 
> >> #lang scribble/lp2
> >> @(require scribble/base
> >>          scribble/eval)
> >> 
> >> @title{An Example}
> >> 
> >> This would be a @bold{wonderful} way to accomplish things!
> >> 
> >> @chunk[<*>
> >>        (define (f x)
> >>          <f-body>)]
> >> 
> >> @chunk[<f-body>
> >>        (* x x)]
> >> 
> >> 
> >> And then, I could show an example:
> >> 
> >> @(begin
> >>   (require syntax/location)
> >>   (define here (quote-source-file))
> >>   (define evaluator (make-base-eval))
> >>   (evaluator `(begin
> >>                (dynamic-require '(file ,here) #f)
> >>                (current-namespace
> >>                 (module->namespace '(file ,here))))))
> >> 
> >> @examples[
> >>        #:eval evaluator
> >>        (f 10)
> >> ]
> >> 
> > ____________________
> >  Racket Users list:
> >  http://lists.racket-lang.org/users
> 
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Posted on the users mailing list.