[#99115] [Ruby master Bug#17023] How to prevent String memory to be relocated in ruby-ffi — larskanis@...
Issue #17023 has been reported by larskanis (Lars Kanis).
22 messages
2020/07/10
[#99375] [Ruby master Feature#17055] Allow suppressing uninitialized instance variable and method redefined verbose mode warnings — merch-redmine@...
Issue #17055 has been reported by jeremyevans0 (Jeremy Evans).
29 messages
2020/07/28
[#101207] [Ruby master Feature#17055] Allow suppressing uninitialized instance variable and method redefined verbose mode warnings
— merch-redmine@...
2020/12/02
Issue #17055 has been updated by jeremyevans0 (Jeremy Evans).
[#101231] Re: [Ruby master Feature#17055] Allow suppressing uninitialized instance variable and method redefined verbose mode warnings
— Austin Ziegler <halostatue@...>
2020/12/03
What does this mean?
[ruby-core:99235] [Ruby master Feature#16812] Allow slicing arrays with ArithmeticSequence
From:
matz@...
Date:
2020-07-20 07:04:24 UTC
List:
ruby-core #99235
Issue #16812 has been updated by matz (Yukihiro Matsumoto). The basic bahavior seems OK. Probably we need to investigate some corner cases, but you can commit (and we experiment). Matz. ---------------------------------------- Feature #16812: Allow slicing arrays with ArithmeticSequence https://bugs.ruby-lang.org/issues/16812#change-86620 * Author: zverok (Victor Shepelev) * Status: Assigned * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) ---------------------------------------- I believe when concepts of ArithmeticSequence and `Range#%` were introduced, one of the main intended usages was array slicing in scientific data processing. So, it seems to make sense to allow this in `Array#[]`: ```ruby ary[(5..20) % 2] # each second element between 5 and 20 ary[(0..) % 3] # each third element ary[10.step(by: -1)] # elements 10, 9, 8, 7 .... ``` PR is [here](https://github.com/ruby/ruby/pull/3055). My reasoning is as follows: 1. As stated above, ArithmeticSequence and `Range#%` seem to have been introduced exactly for this goal 2. Python has its slicing syntax as `begin:end:step` (with a possibility to omit either), and it seems to be well respected and used feature for data processing. So I believe it is useful, and relatively easy to integrate into existing functionality I expect the usual "it is ugly and unreadable!" backlash. I don't have an incentive, nor energy, to "defend" the proposal, so I would not. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>