Re: [racket] Redex question: parameterizing a language definition

2013-06-04 Thread Robby Findler
Oh: one other gotcha to watch out for. When Racket compiles a file to .zo, it discards source location information in syntax object templates. This means that these trick also won't work in that case. It is possible to preserve this syntax location information. ... long story short: various things

Re: [racket] Redex question: parameterizing a language definition

2013-06-04 Thread Lindsey Kuper
On Mon, Jun 3, 2013 at 11:29 PM, Robby Findler wrote: > I've written three little examples [...] Thanks, Robby, this is an enormous help. I'll play with these and see what can be done. Lindsey Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Redex question: parameterizing a language definition

2013-06-03 Thread Robby Findler
I've written three little examples, extracted from the macro you pointed us to. The first just reproduces the problem you're seeing, I expect. Note that if you reverse the "a ..." and the "x" line, you don't get an error anymore, but you do get strange output. This is because of the interaction bet

Re: [racket] Redex question: parameterizing a language definition

2013-06-03 Thread Lindsey Kuper
Hi, Racketeers, On Thu, Apr 4, 2013 at 9:32 PM, Robby Findler wrote: > One thing to watch out for, tho, is that redex uses source location > information to typeset grammars and when macros are involved, the source > locations (naturally) get mixed up. Since a macro can do arbitrary > computation

Re: [racket] Redex question: parameterizing a language definition

2013-04-05 Thread Lindsey Kuper
On Thu, Apr 4, 2013 at 6:32 PM, Lindsey Kuper wrote: > On Thu, Apr 4, 2013 at 11:15 AM, Matthias Felleisen > wrote: >> So, I think that you could use _Racket_'s syntax system to compute >> the grammar. This is quite different from extending a base grammar >> with new features or value clauses but

Re: [racket] Redex question: parameterizing a language definition

2013-04-04 Thread Robby Findler
On Thu, Apr 4, 2013 at 5:32 PM, Lindsey Kuper wrote: > On Thu, Apr 4, 2013 at 11:15 AM, Matthias Felleisen > wrote: > > > > Lindsey, in your case, I believe the 'rabbit hole' can be avoided. > > > > From what I understand each family in lambdaLVar is (almost) uniformly > > generated from a gramm

Re: [racket] Redex question: parameterizing a language definition

2013-04-04 Thread Matthias Felleisen
On Apr 4, 2013, at 6:48 PM, Lindsey Kuper wrote: > lambdaLVar is a minimal substrate for LVars, but it's not > too pleasant to write programs in (although the #lang decoupling could > help). That's why I proposed a #lang lambdaLVar in the first place. You might be able to get all of Racket's i

Re: [racket] Redex question: parameterizing a language definition

2013-04-04 Thread Matthias Felleisen
On Apr 4, 2013, at 6:32 PM, Lindsey Kuper wrote: > On Thu, Apr 4, 2013 at 11:15 AM, Matthias Felleisen > wrote: >> >> Lindsey, in your case, I believe the 'rabbit hole' can be avoided. >> >> From what I understand each family in lambdaLVar is (almost) uniformly >> generated from a grammar 'fun

Re: [racket] Redex question: parameterizing a language definition

2013-04-04 Thread Lindsey Kuper
On Thu, Apr 4, 2013 at 11:19 AM, David Van Horn wrote: > On 4/4/13 11:15 AM, Matthias Felleisen wrote: >> On an unrelated note, you may wish to experiment with lambdaLVar >> as a #lang so that you can write programs. Since you seem to be >> designing a PL, I consider the practical evaluation as at

Re: [racket] Redex question: parameterizing a language definition

2013-04-04 Thread Lindsey Kuper
On Thu, Apr 4, 2013 at 11:15 AM, Matthias Felleisen wrote: > > Lindsey, in your case, I believe the 'rabbit hole' can be avoided. > > From what I understand each family in lambdaLVar is (almost) uniformly > generated from a grammar 'functor' that receives a lattice (let's say > one for now), compu

Re: [racket] Redex question: parameterizing a language definition

2013-04-04 Thread David Van Horn
On 4/4/13 11:15 AM, Matthias Felleisen wrote: ;; --- On an unrelated note, you may wish to experiment with lambdaLVar as a #lang so that you can write programs. Since you seem to be designing a PL, I consider the practical evaluation as at least as important as a reduction semantics. Just a thou

Re: [racket] Redex question: parameterizing a language definition

2013-04-04 Thread Matthias Felleisen
Lindsey, in your case, I believe the 'rabbit hole' can be avoided. >From what I understand each family in lambdaLVar is (almost) uniformly generated from a grammar 'functor' that receives a lattice (let's say one for now), computes some grammatical clauses -- and may add some primitive operati

Re: [racket] Redex question: parameterizing a language definition

2013-04-04 Thread Prabhakar Ragde
Robby wrote: Yes, David's right. The (a bit more long-term than I hoped) plan is to essentially improve and automate parts of what you call the rabbit hole in your stackoverflow question (as also discussed in the link David posted). I ran into this problem in a much simpler context while teach

Re: [racket] Redex question: parameterizing a language definition

2013-04-03 Thread Lindsey Kuper
On Wed, Apr 3, 2013 at 7:08 PM, David Van Horn wrote: > This is a recurring issue with no current solution (as far as I know). > > http://lists.racket-lang.org/users/archive/2012-December/055488.html Okay, thanks for the answers, David and Robby. It sounds like transitive reinterpretation, as Da

Re: [racket] Redex question: parameterizing a language definition

2013-04-03 Thread Robby Findler
Yes, David's right. The (a bit more long-term than I hoped) plan is to essentially improve and automate parts of what you call the rabbit hole in your stackoverflow question (as also discussed in the link David posted). Robby On Wed, Apr 3, 2013 at 7:08 PM, David Van Horn wrote: > On 4/3/13 8:

Re: [racket] Redex question: parameterizing a language definition

2013-04-03 Thread David Van Horn
On 4/3/13 8:02 PM, Lindsey Kuper wrote: I have a rather involved Redex question that I was originally going to send to this list, but it got long enough that it was crying out for hyperlinks and code formatting. So, here it is on Stack Overflow: http://stackoverflow.com/questions/15800167/plt-re