[racket] How to fit web-server/dispatchers/dispatch-files into dispatch-rules?

2013-01-23 Thread Limbo Peng
Hi all, As the Racket Web Server doc shows, we can define URL dispatching rules as follows: (define-values (blog-dispatch blog-url) (dispatch-rules [("") list-posts] [("posts" (string-arg)) review-post] [("archive" (integer-arg) (integer-arg)) review-archive]

Re: [racket] Wildcard Macro Names?

2013-01-23 Thread Danny Yoo
On Wed, Jan 23, 2013 at 1:32 PM, Scott Klarenbach wrote: > Is it possible to have a macro bound to an identifier with wildcards in it? > > So, for example, a macro (@*) that would be used for (@x) and (@y), where > the symbols x and y are available during expansion. > > Or is this something that w

Re: [racket] Wildcard Macro Names?

2013-01-23 Thread Jens Axel Søgaard
2013/1/23 Scott Klarenbach : > Is it possible to have a macro bound to an identifier with wildcards in it? > > So, for example, a macro (@*) that would be used for (@x) and (@y), where > the symbols x and y are available during expansion. > > Or is this something that would have to be done at the r

[racket] Wildcard Macro Names?

2013-01-23 Thread Scott Klarenbach
Is it possible to have a macro bound to an identifier with wildcards in it? So, for example, a macro (@*) that would be used for (@x) and (@y), where the symbols x and y are available during expansion. Or is this something that would have to be done at the reader level? ie, (@ ...) is the macro,

Re: [racket] variables within macros

2013-01-23 Thread John Clements
On Jan 19, 2013, at 11:39 AM, Matthias Felleisen wrote: > > -- you need the same abstractions over and over again: this calls for a > library system with proper linguistic support. Contrary to rumors, you can't > really build this support from lambdas and S-expression macros. Is our syntax >

[racket] [ragg] omit escaped tokens from syntax

2013-01-23 Thread Lorenz Köhl
The idea is to introduce a kind of soft skip for tokens. Ragg will accept them in the grammar but leave them out of the syntax object for the production. I've had the opportunity to discover that it's really hard to parse syslog messages properly. Especially since I want to accept the traditiona

Re: [racket] Declarative Prototype Object Extension - looking for feedback

2013-01-23 Thread Ryan Culpepper
On 01/23/2013 08:57 AM, Lewis wrote: I'd always found prototype object systems interesting, and thought they might be a good fit for racket - so I made one about a month or so ago Features: - Prototype based, no distinction between classes and instances. - Multiple inheritance, methods are looke

Re: [racket] Many datums in syntax-parse

2013-01-23 Thread Jens Axel Søgaard
2013/1/22 Danny Yoo : >> Is there an equivalent to #:datums (old-timestamp time-of-day …) >> in syntax-parse? A nice puzzle. Now Ryan added #literal-datums that's of course the way to go, but here is a solution. First define a syntax class that matches a literal datum. (define-syntax-class (

[racket] Declarative Prototype Object Extension - looking for feedback

2013-01-23 Thread Lewis
I'd always found prototype object systems interesting, and thought they might be a good fit for racket - so I made one about a month or so ago Features: - Prototype based, no distinction between classes and instances. - Multiple inheritance, methods are looked up in depth first search - Declarativ

Re: [racket] define-match-expander and embedded racket

2013-01-23 Thread Sam Tobin-Hochstadt
On Wed, Jan 23, 2013 at 7:10 AM, Tim Brown wrote: > > I am trying to embed racket into a C program, and have a module which uses > "define-match-expander" (in conjunction with match). > > The attached scripts seem to show an inconsistency between a module > that has been declared with declare_modu

[racket] define-match-expander and embedded racket

2013-01-23 Thread Tim Brown
Folks, I am trying to embed racket into a C program, and have a module which uses "define-match-expander" (in conjunction with match). The attached scripts seem to show an inconsistency between a module that has been declared with declare_modules(...) and one that has been imported with scheme_n