Re: [julia-users] Re: macro: with

2016-10-09 Thread Chris Rackauckas
It's a lot like unpacking a type, except instead of defining new variables for the unpacked values, your macro places the type instance designation (t. ...). On Sunday, October 9, 2016 at 10:55:45 AM UTC-7, Tom Breloff wrote: > > What about it? I don't think there's anything like this in Parame

Re: [julia-users] Re: macro: with

2016-10-09 Thread Tom Breloff
What about it? I don't think there's anything like this in Parameters. On Sun, Oct 9, 2016 at 1:27 PM, Chris Rackauckas wrote: > What about Parameters.jl ? > > > On Wednesday, September 7, 2016 at 7:23:47 AM UTC-7, Tom Breloff wrote: >> >> Hey all... I j

[julia-users] Re: macro: with

2016-10-09 Thread Chris Rackauckas
What about Parameters.jl ? On Wednesday, September 7, 2016 at 7:23:47 AM UTC-7, Tom Breloff wrote: > > Hey all... I just threw together a quick macro to save some typing when > working with the fields of an object. Disclaimer: this should not be used > i

[julia-users] Re: macro: with

2016-09-07 Thread Jeffrey Sarnoff
It is a good example for others who are looking to understand how to write a macro that facilitates field qualified access. On Wednesday, September 7, 2016 at 10:23:47 AM UTC-4, Tom Breloff wrote: > > Hey all... I just threw together a quick macro to save some typing when > working with the fiel

[julia-users] Re: Macro with varargs

2015-04-24 Thread Patrick O'Leary
On Friday, April 24, 2015 at 2:59:01 AM UTC-5, Kuba Roth wrote: > > Thanks, > So in order to create the quote/end block you use: > newxpr = Expr(:block) > And the newxpr.args is the array field of the QuoteNode which stores each > expression? > Yeah, I think there might be an easier way to do

[julia-users] Re: Macro with varargs

2015-04-24 Thread Kuba Roth
Thanks, So in order to create the quote/end block you use: newxpr = Expr(:block) And the newxpr.args is the array field of the QuoteNode which stores each expression? Edit: I can see now this is actually explained a bit in the advanced macro example in documentation. On Thursday, April 23,

[julia-users] Re: Macro with varargs

2015-04-23 Thread Patrick O'Leary
On Thursday, April 23, 2015 at 2:36:45 PM UTC-5, Kuba Roth wrote: > > This is my first time writing macros in Julia. I've read related docs but > could not find an example which works with the arbitrary number of > arguments. > So in my example below the args... works correctly with string lite