Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-30 Thread Danny Yoo
On Mon, Apr 30, 2012 at 6:12 PM, Eli Barzilay wrote: > A few minutes ago, Danny Yoo wrote: >> I'll be releasing an update to my "outer" tutorial shortly, but >> would like to double check that the result I'm aiming toward is of >> good quality before I finish the text. > > I still think that the s

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-30 Thread Eli Barzilay
A few minutes ago, Danny Yoo wrote: > I'll be releasing an update to my "outer" tutorial shortly, but > would like to double check that the result I'm aiming toward is of > good quality before I finish the text. I still think that the splicing stuff is unnecessarily(?) complicating things... (I'm

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-30 Thread Danny Yoo
I'll be releasing an update to my "outer" tutorial shortly, but would like to double check that the result I'm aiming toward is of good quality before I finish the text. I've ended up with: https://github.com/dyoo/outer-tutorial/blob/master/outer.rkt which takes components of Eli's solution

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-20 Thread Danny Yoo
Hi Brian, I wanted to revisit this! Reading back your comments and Eli's, I think I see now that syntax-parameterize is not what I want, because it doesn't respect lexical boundaries. The whole point of the 'outer' I'm trying to define is to respect those boundaries, even as I'm drilling holes in

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-11 Thread Brian Mastenbrook
On Apr 11, 2012, at 11:09 AM, Danny Yoo wrote: >> This problem still remains in your newest version of `def', since as a user >> of `m' I still need to know that it uses `def' internally. > > Oh! I thought I designed the revised outer so that it should be > agnostic to how 'm' works. Sorry abo

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-11 Thread Danny Yoo
> This problem still remains in your newest version of `def', since as a user > of `m' I still need to know that it uses `def' internally. Oh! I thought I designed the revised outer so that it should be agnostic to how 'm' works. Let me double check this to be more sure about that assumption.

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-11 Thread Eli Barzilay
Just now, Brian Mastenbrook wrote: > On Apr 11, 2012, at 9:41 AM, Eli Barzilay wrote: > > >> Is there a way to make (outer (outer x)) do the right thing while > >> still using syntax parameters? > > > > That's an obvious bait, right? > > [...] > > Maybe I'm still a little groggy this morning, bu

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-11 Thread Brian Mastenbrook
On Apr 11, 2012, at 9:41 AM, Eli Barzilay wrote: >> Is there a way to make (outer (outer x)) do the right thing while still >> using syntax parameters? > > That's an obvious bait, right? > > (define-syntax (def stx) >(syntax-case stx () > [(_ (name args ...) body ...) > #`(defin

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-11 Thread Eli Barzilay
10 minutes ago, Brian Mastenbrook wrote: > On Apr 11, 2012, at 7:45 AM, Danny Yoo wrote: > > > Yikes. Yes, that's unexpected. Nice catch! > > Hi Danny, > > I confess that I had hidden motives in raising this scenario. Heh, this came in as I wrote the other reply. > What happened in this cas

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-11 Thread Eli Barzilay
Yesterday, Brian Mastenbrook wrote: > > I find it interesting that you used a separate syntax parameter > instead of just making `outer' the syntax parameter. I think that > the semantics are the same with either strategy, but for some reason > the latter seems more obvious to me - perhaps because

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-11 Thread Brian Mastenbrook
On Apr 11, 2012, at 7:45 AM, Danny Yoo wrote: > Yikes. Yes, that's unexpected. Nice catch! Hi Danny, I confess that I had hidden motives in raising this scenario. What happened in this case is most definitely intended behavior for syntax parameters. This particular kind of weirdness is exact

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-11 Thread Danny Yoo
> Is there a way to make (outer (outer x)) do the right thing while still > using syntax parameters? > > Do you consider this behavior to be surprising? Would you expect as the > author of `m' that your macro affects the behavior of `outer'? > > (define-syntax m >  (syntax-rules () >    ((_ val) >

Re: [racket] tutorial: exploring the boundaries of outer space

2012-04-10 Thread Brian Mastenbrook
On 04/10/2012 03:33 PM, Danny Yoo wrote: Hi everyone, Here's a tutorial that shows how to use Racket macros to create a lexical-scoping hole. http://hashcollision.org/outer-tutorial/index.html The tutorial is intended to be an introduction to Racket's macro system as well. Any suggestio

[racket] tutorial: exploring the boundaries of outer space

2012-04-10 Thread Danny Yoo
Hi everyone, Here's a tutorial that shows how to use Racket macros to create a lexical-scoping hole. http://hashcollision.org/outer-tutorial/index.html The tutorial is intended to be an introduction to Racket's macro system as well. Any suggestions and comments would be greatly appreciated