Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Galler
Matthias, The DSL text would be of significant interest. On the subject of texts, I also think a book called "The Jumpy Racketeer" introducing reified control primitives in the same format as "The Little Lisper" would receive significant popular interest. R./ Zack On Aug 7, 2012, at 3:36 PM, Ga

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Robby Findler
On Tue, Aug 7, 2012 at 2:36 PM, Galler wrote: > Robby, > > Thanks for the prompt answer. > > I suspected that would be the case. > > Is 'Semantics Engineering with PLT Redex' where I should get started on > language-engineering? That book does, in a very indirect way, prepare you to answer quest

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Galler
Thanks Danny On Tue, Aug 7, 2012 at 4:58 PM, Danny Yoo wrote: ;; Question to others: how can this be simplified? (splicing-let-syntax ([get-literal-metadata (lambda (stx) #`(#%datum . #,(format "~s" I did a slight s

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Ryan Culpepper
BTW, there's almost never a need to refer to '#%datum'. Just use 'quote' instead. Ryan On 08/07/2012 04:58 PM, Danny Yoo wrote: ;; Question to others: how can this be simplified? (splicing-let-syntax ([get-literal-metadata (lambda (stx)

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Matthias Felleisen
On Aug 7, 2012, at 3:36 PM, Galler wrote: > Is 'Semantics Engineering with PLT Redex' where I should get started on > language-engineering? No, this book is about engineering the mathematical semantics of a language (existing or to be designed) so that you can test properties (such as well-d

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Danny Yoo
>;; Question to others: how can this be simplified? >(splicing-let-syntax ([get-literal-metadata > (lambda (stx) > #`(#%datum . #,(format "~s" I did a slight simplification of the code. I'm putting up the revised versi

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Danny Yoo
> Is 'Semantics Engineering with PLT Redex' where I should get started on > language-engineering? Concretely, I think Robby's suggestion will look something like this: ;; #lang racket ;; Let's create a custom structure for procedures that remember certain

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Galler
Robby, Thanks for the prompt answer. I suspected that would be the case. Is 'Semantics Engineering with PLT Redex' where I should get started on language-engineering? On Tue, Aug 7, 2012 at 3:22 PM, Robby Findler wrote: No, but you could define your own language that had its own define

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Robby Findler
No, but you could define your own language that had its own define that cooperated with some-useful-... to do that. You would probably want to do this with a macro, tho, so that you get the lexical property. I guess. Robby On Tue, Aug 7, 2012 at 1:15 PM, Galler wrote: > Is there a function or s

[racket] obtaining name of module-level binding

2012-08-07 Thread Galler
Is there a function or syntax to obtain the module-level binding of a function? For example: (define (my-function) (display (some-useful-function-which-captures-name-of-module-level-binding))) ;-> 'my-function Thanks very much. R./ Zack Racket Users list: http://l