New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Array accesses to the same location autoviv separately #2344
Comments
From @thundergnatWhen using a hyper += to fill in values in an array, you get different Some example code: my @h = (-8,-9); my @f = (-3,-6,-1); my @g = (24, 75, 62, 9); convolve(@f, @h); sub convolve (@f, @h) { my (@k, @l, @m); # set up three arrays @k[^@f X+ ^@h] >>+=<< (@f X* @h); # convolve into initialised array say ~@g; # correct answer (given) Output: |
From @moritzAm 03.02.2011 03:30, schrieb S. Schulze (via RT):
Since hyper operators are generally sensitive to the shape of the data Cheers, |
The RT System itself - Status changed from 'new' to 'open' |
From @MouqOn Thu Feb 03 02:30:10 2011, moritz wrote:
This is an old ticket, and I'm inclined to reject it… Hyper ops have a mixed order and are supposed be treated as though they were run in parallel, so running "»+=»" only makes sense when all of the arguments on the LHS are different containers. Assign-incrementing to each of @f[0, 1, 1, 2, 2, 3] in parallel is not likely to yield correct results, due to the replicated numbers. But, as Moritz said, this ticket may indicative of a bug that has to do more with initialization of Arrays than hyperops. This bug can be golfed to just: $ perl6 -e'my @f; @f[0,0].map({$_ += 1}); say @f' |
From @zoffixznetSome discussion on what's going on here: https://irclog.perlgeek.de/perl6-dev/2017-03-06#i_14215098 |
Migrated from rt.perl.org#83280 (status was 'open')
Searchable as RT83280$
The text was updated successfully, but these errors were encountered: