Re: [racket-users] Need help improving a macro

2017-08-30 Thread Philip McGrath
On Wed, Aug 30, 2017 at 11:08 AM, wrote: > How did other people learn Racket meta programming? > I don't consider myself a huge expert in macros, but personally I found the "Examples" section of the syntax/parse documentation very helpful (

Re: [racket-users] Need help improving a macro

2017-08-30 Thread hiphish
> I would love to see some library provide better abstractions for > fairly common cases of keywords like this Honestly, I don't think I need a library, I need better knowledge. Your macro works, but I have no idea how I could have come up with it. The Racket guide gives a good introduction to the

Re: [racket-users] Need help improving a macro

2017-08-29 Thread Philip McGrath
I would love to see some library provide better abstractions for fairly common cases of keywords like this, but here is how I might write this: #lang racket (require (for-syntax syntax/parse syntax/define )) (define-syntax (register-nvim-function! stx)

[racket-users] Need help improving a macro

2017-08-29 Thread hiphish
Hello, I have a working macro written using `syntax-parse`, but it still has some kinks that need to be worked out. What I want the macro to do is define a function and as it as input to another function. Example: (define-nvim-function (foo bar baz) #:name "foo" #:sync #f (display bar)