Re: [racket] Getting started with Scribble

2012-03-18 Thread Hendrik Boom
On Sat, Mar 17, 2012 at 02:02:22PM -0700, Mark Engelberg wrote: > > semi-literate-programming seems an apt name. > > I don't think Javadoc would even qualify for that label though. In my > mind, "semi-literate" at least implies a focus on building a narrative > exposition of why the functions wo

Re: [racket] Getting started with Scribble

2012-03-17 Thread Robby Findler
On Sat, Mar 17, 2012 at 4:03 PM, Mark Engelberg wrote: > On Sat, Mar 17, 2012 at 5:36 AM, Robby Findler > wrote: >> >> That is now how scribble/lp works. You need to make another file and >> use @lp-include on the first to get a document that actually >> scribbles. There is more explanation of th

Re: [racket] Getting started with Scribble

2012-03-17 Thread Mark Engelberg
On Sat, Mar 17, 2012 at 11:44 AM, Eli Barzilay wrote: > Note that what Haskell does is *semi*-literate-programming, something > that has little to do with literate programming. Neil Van Dyke is > working on a tool that is going to be more like > semi-literate-programming. > > I understand that l

Re: [racket] Getting started with Scribble

2012-03-17 Thread Mark Engelberg
On Sat, Mar 17, 2012 at 5:36 AM, Robby Findler wrote: > That is now how scribble/lp works. You need to make another file and > use @lp-include on the first to get a document that actually > scribbles. There is more explanation of this in the docs, right below > that first example. > > Robby > > OK

Re: [racket] Getting started with Scribble

2012-03-17 Thread Eli Barzilay
Just now, Neil Van Dyke wrote: > Eli Barzilay wrote at 03/17/2012 02:44 PM: > > Note that what Haskell does is *semi*-literate-programming, something > > that has little to do with literate programming. Neil Van Dyke is > > working on a tool that is going to be more like > > semi-literate-programm

Re: [racket] Getting started with Scribble

2012-03-17 Thread Neil Van Dyke
Eli Barzilay wrote at 03/17/2012 02:44 PM: Note that what Haskell does is *semi*-literate-programming, something that has little to do with literate programming. Neil Van Dyke is working on a tool that is going to be more like semi-literate-programming. My forthcoming tool, McFly, is for *

Re: [racket] Getting started with Scribble

2012-03-17 Thread Eli Barzilay
Yesterday, Mark Engelberg wrote: > I'm sort of thinking along the lines of Haskell's version of > literate programming, where if you use the file suffix of lhs > instead of hs, rather than having a file that is mostly code with > occasional comments, you can easily write a document that is mostly >

Re: [racket] Getting started with Scribble

2012-03-17 Thread Vincent St-Amour
At Sat, 17 Mar 2012 00:52:21 -0700, Mark Engelberg wrote: > One thing I still haven't figured out is how to get a comment (introduced > with a semicolon) that is in the code block to show up in the scribbled > output. (In the example below, the comment ";; the zero test" doesn't show > up in the s

Re: [racket] Getting started with Scribble

2012-03-17 Thread Robby Findler
That is now how scribble/lp works. You need to make another file and use @lp-include on the first to get a document that actually scribbles. There is more explanation of this in the docs, right below that first example. Robby On Sat, Mar 17, 2012 at 12:03 AM, Mark Engelberg wrote: > OK, I pasted

Re: [racket] Getting started with Scribble

2012-03-17 Thread Mark Engelberg
I'm still curious to get scribble/lp working, but I've figured out an immediate solution to my question. I was able to get the behavior I want with just a simple macro: @(define-syntax-rule (code l) (begin @schemeblock[l] l)) Below is a sample of its use to get the behavior I want wh

Re: [racket] Getting started with Scribble

2012-03-16 Thread Mark Engelberg
OK, I pasted in the code from the docs just to make sure it wasn't something in my code. Then I hit the "Scribble HTML" button that appears in the upper-right corner of DrRacket. I see the following in the interactions window: Welcome to DrRacket, version 5.2 [3m]. Language: scribble/lp; memory

Re: [racket] Getting started with Scribble

2012-03-16 Thread Robby Findler
The example from the beginning of the docs works for me when I run it in DrRacket. Can you say more about what's going wrong when you try? Thanks, Robby On Fri, Mar 16, 2012 at 9:48 PM, Mark Engelberg wrote: > Ugh, scratch my scratching that.  I'm still getting the error. > > > On Fri, Mar 16, 2

Re: [racket] Getting started with Scribble

2012-03-16 Thread Tom Maynard
On 3/16/2012 9:24 PM, Mark Engelberg wrote: when I hit Run, it doesn't seem to recognize factorial in the interactions window. I think you're missing the point a little: don't do this in DrRacket, do it at the command line using "scribble" as your command: /usr/foo/scribble ./lit-scrib.rkt

Re: [racket] Getting started with Scribble

2012-03-16 Thread Mark Engelberg
Ugh, scratch my scratching that. I'm still getting the error. On Fri, Mar 16, 2012 at 7:47 PM, Mark Engelberg wrote: > On Fri, Mar 16, 2012 at 7:45 PM, Mark Engelberg > wrote: > >> scribble/lp is related, but more involved to use. Specifically, I just >> tried it and it doesn't seem to work wi

Re: [racket] Getting started with Scribble

2012-03-16 Thread Mark Engelberg
On Fri, Mar 16, 2012 at 7:45 PM, Mark Engelberg wrote: > scribble/lp is related, but more involved to use. Specifically, I just > tried it and it doesn't seem to work with the scribble html button that > appears in DrRacket. I keep getting the following error: > scribble: loading xref > scribble

Re: [racket] Getting started with Scribble

2012-03-16 Thread Mark Engelberg
I'm sort of thinking along the lines of Haskell's version of literate programming, where if you use the file suffix of lhs instead of hs, rather than having a file that is mostly code with occasional comments, you can easily write a document that is mostly text with occasional code. In that mode,

Re: [racket] Getting started with Scribble

2012-03-16 Thread Robby Findler
What you're asking for is not what Scribble does, mostly speaking. Running a scribble program just builds a datastructure for the rendering process. You might try the scribble/lp library, tho. I think that comes closest. Robby On Fri, Mar 16, 2012 at 9:24 PM, Mark Engelberg wrote: > This doesn'

Re: [racket] Getting started with Scribble

2012-03-16 Thread Mark Engelberg
This doesn't appear to do what I'm asking. I tried this as per your suggestion: #lang scribble/manual @(require scribble/eval) @title{My Scribblings} I'm going to write a really amazing factorial function now. @interaction[ (define (factorial n) (cond [(zero? n) 1] ;; The zero t

Re: [racket] Getting started with Scribble

2012-03-16 Thread Danny Yoo
> Second attempt: > Use scribble/manual and put @racketblock[] around any Racket code. > Looks great when you scribblize, but code doesn't evaluate. > Another nuisance: IDE auto-converts opening bracket after @racketblock into > a paren. Oh! Try the keybinding: "Altl-[", which should add brackets

Re: [racket] Getting started with Scribble

2012-03-16 Thread David Van Horn
On 3/16/12 8:42 PM, Mark Engelberg wrote: So I'm trying to figure out the simplest way to create a document that is mostly text with a few Racket snippets. When I hit Run, I want the code to be evaluated for the interactions window. When I hit the scribble button, I want it to generate html tha

[racket] Getting started with Scribble

2012-03-16 Thread Mark Engelberg
So I'm trying to figure out the simplest way to create a document that is mostly text with a few Racket snippets. When I hit Run, I want the code to be evaluated for the interactions window. When I hit the scribble button, I want it to generate html that displays the formatted text along with the