4fd0b91c-25fb-4682-8bfc-d986492c26cf [openid.stackexchange.com]
Recent Actions
-
Commented on PDL features I'd like to see in Perl 6
If you happen to assign to such a slice, you can overwrite the values. That's not exactly true: @data = ('a' .. 'l'); @slice = @data[2, 3, 5, 7, 11]; print "@slice\n"; $_++ for @slice; print "@slice\n@data <-- no change!\n";...
-
Commented on Problems logging in to blogs.perl.org?
See also GitHub issue #291. Moreover, it seems we can't use our Google accounts to sign in anymore, either....
-
Commented on Some Perl modules cross-referenced by Purpose
The link to nestoria is broken....
-
Commented on CPAN Testers from Github?
Similar to http://travis-ci.org, but providing more than one OS? Sounds like a great idea....
Comment Threads
-
David Mertens commented on
PDL features I'd like to see in Perl 6
@Salvador, I have written quite a bit of autolooping code for PDL using PDL::PP. While I agree that it might be nice for the compiler to automatically figure things out, I have seen many circumstances in which the autolooping behavior is ambiguous, and I needed some way to specify how to autoloop.
As for the unnamed person talking about assigning to slices, you identify exactly what I want in Perl 6, but not what I meant we have in Perl 5. I was talking about using the slice itself as an lvalue, i.e.
@data = ('a' .. 'l'); # Assigning directly to the slice overwrites: @data…
-
6ae7ba33-d12b-49cf-89f9-34434fe68707 [openid.stackexchange.com] commented on
PDL features I'd like to see in Perl 6
smls here. (Using stackexchange OpenID since logging in normally is borked right now for me.)
Type checks against array dimensions/sizes
This seems to be firmly planned, but not yet implemented:
➜ perl6 -e 'sub foo (@a($x, $y)) { ... };' ===SORRY!=== Error while compiling -e Shape declaration with () is reserved ...
Aliasing slices
The following already works in Perl 6 right now (with Rakudo on MoarVM):
my int @a = 2, 4, 6, 8; # create a compact native array my @b := @a[1, 3]; # take a slice, and bind …
-
Aristotle commented on
PDL features I'd like to see in Perl 6
I think the new
refaliasing
feature (experimental in 5.22) will allow you to alias slices like so:\( @slice[ 0 .. 4 ] ) = \( @data[ 2, 3, 5, 7, 11 ] );
Obviously it’s ugly to have to count out the LHS slice by hand:
\( @slice[ 0 .. $#$_ ] ) = \( @data[ @$_ ] ) for [2, 3, 5, 7, 11];
That’s quite a mouthful, but at least you can package it up in a function:
sub alias_slice { my ( $src, @dst ) = shift; \( @dst[ 0 .. $#_ ] ) = \( @$src[ @_ ] ); \@dst; }
\my @slice = al…
-
therflabs commented on
PDL features I'd like to see in Perl 6
Call me crazy, but I had a freelance gig converting Python numpy/scipy to Perl PDL... And barely knowing Python it was a lot easier to understand than PDL.
I can see why numpy/scipy has gained a lot of traction.
I'd like to see P6 PDL to be like numpy/scipy to ease crossover to Perl 6 and lower the entry level for beginners. In my opinion usability and clear documentation for the non-math scholar has hurt what PDL could have been and could be a lesson for PDL Perl 6.
-
lajandy commented on
Problems logging in to blogs.perl.org?
Test comment? If you can see this, the login link above worked for me!
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.