[ Resending announcement since I missed a cc to the list ]
Karl et. al.,
I just implemented a PDLdb.pl debugger with support
for PDL::NiceSlice syntax. You can get it from the PDL
git repo and use it by placing it in your @INC path
somewhere and by setting the PERL5DB environment
variable to 'BEGIN { require "PDLdb.pl" }'
Let me know how it works and if it seems stable enough
we could consider adding it to the distribution. Maybe
even with something clever like 'pdl -d' calling it under
the hood...
Cheers,
Chris
On Sat, Oct 15, 2011 at 6:55 PM, chm <[email protected]> wrote:
> On 10/15/2011 5:58 PM, Karl Glazebrook wrote:
>>
>> On 15/10/2011, at 12:47 AM, Chris Marshall wrote:
>>
>>> Not yet. There are only two options that I know of:
>>>
>>> (1) use the original throw-away tmp syntax for slice
>>> assignments: E.g., ( my $tmp = $a(:) ) .= $b
>>>
>>> (2) use perl-5.15 which appears to have replaced the
>>> lvalue failure by a warning. I don't have that perl
>>> available to test so I cannot verify.
>>
>> Hi Chris
>>
>> I am not sure I understand your ref to lvalues?
>
> Sorry, I crossed wires with the lvalue subs problem
> with the debugger. It would be nice to use niceslice
> constructs from the perl debugger command line.
>
> Taking a look at the DB module, it seems that
> it might be possible to add niceslice processing
> to the evalcode feature (once it is working cleanly
> for our own evals).
>
> --Chris
>
>> For me it does not work even for rvalues
>>
>> e.g.
>>
>> DB<4> $r = random(10,10)
>>
>> DB<5> p $r(0:3,0:3)
>> syntax error at (eval 52)[/System/Library/Perl/5.10/perl5db.pl:638] line
>> 2, near "$r("
>>
>> DB<6> p $r->slice('0:3,0:3')
>>
>> [
>> [ 0.43491887 0.9474565 0.41647159 0.79907819]
>> [0.0043885932 0.043438065 0.86013387 0.21898749]
>> [ 0.13279017 0.44450159 0.77473655 0.10607898]
>> [ 0.26784251 0.77686852 0.58402126 0.45321226]
>> ]
>>
>>
>> BTW how come you have no profile on
>>
>> http://sourceforge.net/apps/mediawiki/pdl/index.php?title=Team
>> ?
>>
>> You are the main contribution!
>>
>> Karl
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl