Re: [julia-users] Reducing algorithm obfuscation

2014-06-13 Thread Stefan Karpinski
Oh, right. Sorry. On Fri, Jun 13, 2014 at 7:13 PM, Carlo Baldassi wrote: > > > On Saturday, June 14, 2014 1:09:10 AM UTC+2, Stefan Karpinski wrote: >> >> But wait – if you don't assign things back at the end, how is this >> different than just assigning to a local variable? >> > > > Er, I think

Re: [julia-users] Reducing algorithm obfuscation

2014-06-13 Thread Carlo Baldassi
On Saturday, June 14, 2014 1:09:10 AM UTC+2, Stefan Karpinski wrote: > > But wait – if you don't assign things back at the end, how is this > different than just assigning to a local variable? > Er, I think I'm having a deja-vu here :) >> How is this different than just assigning fields to lo

Re: [julia-users] Reducing algorithm obfuscation

2014-06-13 Thread Stefan Karpinski
But wait – if you don't assign things back at the end, how is this different than just assigning to a local variable? On Fri, Jun 13, 2014 at 7:07 PM, Stefan Karpinski wrote: > Using a block seems like the right way to handle that. > > > On Fri, Jun 13, 2014 at 7:04 PM, Carlo Baldassi > wrote:

Re: [julia-users] Reducing algorithm obfuscation

2014-06-13 Thread Stefan Karpinski
Using a block seems like the right way to handle that. On Fri, Jun 13, 2014 at 7:04 PM, Carlo Baldassi wrote: > No, that's the main annoyance admittedly, even though I find that most of > the time I need to just read the values (or get a pointer to a mutable > container which gets updated anywa

Re: [julia-users] Reducing algorithm obfuscation

2014-06-13 Thread Carlo Baldassi
No, that's the main annoyance admittedly, even though I find that most of the time I need to just read the values (or get a pointer to a mutable container which gets updated anyway). For that, one would either need to enclose everything in a block as in the @with macro and do some more magic (b

Re: [julia-users] Reducing algorithm obfuscation

2014-06-13 Thread Stefan Karpinski
Does your @extract macro somehow assign values back to fields at the end of the scope? On Fri, Jun 13, 2014 at 5:29 PM, Carlo Baldassi wrote: > The point would be that it's not different, just more concise, so you're > still in control of what you're doing and don't risk braking code when > cha

Re: [julia-users] Reducing algorithm obfuscation

2014-06-13 Thread Carlo Baldassi
The point would be that it's not different, just more concise, so you're still in control of what you're doing and don't risk braking code when changing a type etc.; e.g. this is one typical function from some code I'm using: function foo(network::Network, i::Int) @extract network N H0 lamb

Re: [julia-users] Reducing algorithm obfuscation

2014-06-13 Thread Stefan Karpinski
How is this different than just assigning fields to local variables? On Friday, June 13, 2014, Carlo Baldassi wrote: > Sorry for spamming, but after reading the discussion it seems like a > (slightly polished) version of the @extract macro I mentioned above (I know > the name is not great) alrea

Re: [julia-users] Reducing algorithm obfuscation

2014-06-13 Thread Tom Short
This "obfuscation" is also tedious with DataFrames. I've been playing around with an `@with` macro to use symbols to reference DataFrame columns. I extended that idea to several macros to ease data manipulation: https://github.com/JuliaStats/DataFramesMeta.jl The tricky part with DataFrames and

[julia-users] Reducing algorithm obfuscation

2014-06-06 Thread Andrew Simper
In implementations where you want named data, I've noticed that the algorithm gets obfuscated by lots of variable names with dots after them. For example, here is a basic analog model of a state variable filter used as a sine wave generator: immutable SvfSinOscCoef g0::Float64 g1::Float