Re: [racket-users] syntax write using @-syntax

2015-10-05 Thread Greg Hendershott
> I think you're right. My application is the replacement tool for McFly, and > I want to eliminate the need for distributed packages to need a package > dependency like on `mcfly-runtime`. Maybe you don't need to eliminate that? It would only be a build dependency: A using package's info.rkt wou

Re: [racket-users] syntax write using @-syntax

2015-10-05 Thread Greg Hendershott
I was hoping you'd chime in, Eli. > > (match stx-or-sepxr > > [(? syntax? stx) (print/at-exp (syntax->datum stx))] > That's a major mistake! Well, syntax->datum usually is. :) But the usual reason why it's a mistake, seemed N/A here, to produce a plain text .scrbl file. Thanks for pointing

Re: [racket-users] syntax write using @-syntax

2015-10-04 Thread Neil Van Dyke
Eli Barzilay wrote on 10/04/2015 03:06 AM: The *reader* ignores uniform indentation, so when you write something like: That's what I was remembering. Thanks. Right -- that was the reason for my comment: maybe there's some way to keep the source code where it is, and refer to it from the file

Re: [racket-users] syntax write using @-syntax

2015-10-04 Thread Eli Barzilay
On Sun, Oct 4, 2015 at 2:53 AM, Neil Van Dyke wrote: > Thanks, Eli. That's one of the things I was afraid of. > > The other thing is: does a Scribble formatter ever look at the > line/column position information in the syntax objects? (I thought I > recalled it seeming to do this years ago, mayb

Re: [racket-users] syntax write using @-syntax

2015-10-03 Thread Neil Van Dyke
Thanks, Eli. That's one of the things I was afraid of. The other thing is: does a Scribble formatter ever look at the line/column position information in the syntax objects? (I thought I recalled it seeming to do this years ago, maybe for the start of a multi-line verbatim-like markup.) I

Re: [racket-users] syntax write using @-syntax

2015-10-03 Thread Eli Barzilay
On Wed, Sep 30, 2015 at 1:54 PM, Greg Hendershott wrote: > So a kind of pretty-printing for at-expressions? > > I'm not aware of an existing procedure to do this. When I wrote about the reader implementation, I did it with a cute hack that: * Uses backslash as the command character instead of @

Re: [racket-users] syntax write using @-syntax

2015-09-30 Thread Neil Van Dyke
Thanks, Greg. Greg Hendershott wrote on 09/30/2015 01:54 PM: I'm not aware of an existing procedure to do this. It has some interesting wrinkles. Following is my "Greenspun's Tenth Rule" version. [...] -- You received this message because you are subscribed to the Google Groups "Racket Users

Re: [racket-users] syntax write using @-syntax

2015-09-30 Thread Greg Hendershott
So a kind of pretty-printing for at-expressions? I'm not aware of an existing procedure to do this. It has some interesting wrinkles. Following is my "Greenspun's Tenth Rule" version. (An ad hoc, informally-specified, bug-ridden, slow implementation of half of what's probably needed.) I've comme

Re: [racket-users] syntax write using @-syntax

2015-09-30 Thread Neil Van Dyke
Clarification: The goal is to write a Scribble file, in @-syntax, so that it looks much like a human would write, with the at-signs and (ideally) curly braces. The input to this writing would be a tree of syntax objects. Neil Van Dyke wrote on 09/30/2015 06:25 AM: Is there already a way to pr

[racket-users] syntax write using @-syntax

2015-09-30 Thread Neil Van Dyke
Is there already a way to programmatically write syntax objects using @-syntax, such that the output could be read with the @-reader? I want to write a `.scrbl` file in @-syntax, from syntax objects that mostly came from `scribble/reader` `read-syntax-inside`. Neil V. -- You received this me