@boris_stitnicky What about ~? x[3~4,1~5], for example. I don't like it as much as colon, but it looks a little more intuitive than %.mohawkjohn (John Woods)
Yes. 1:2 is the same as 1..2; it's inclusive of the begin and end indices. It is not equivalent to 1...2. I would think non-number indexing *should* be allowed — but you make a good point. This wouldn't work if implemented via Hash, b...mohawkjohn (John Woods)
@boris_stitnicky I don't think it matters if it collides. It's simple to convert a key-value pair into a range in C code or in Ruby. @david_macmahon It'd be nice if it could be done in other functions. In NMatrix, we have both [] and ...mohawkjohn (John Woods)
For NMatrix, we've implemented a range shorthand which relies on Hashes: `m[1=>3, 2=>4]`, for example, which returns rows 1 through 3 inclusive of columns 2 through 4 (also inclusive). The original goal was to be able to do `m[1:3, 2:4]`...mohawkjohn (John Woods)
This may or may not be related, but we here at NMatrix (part of SciRuby) would love to be able to index ranges in NMatrix using a 1:3 notation. This can be accomplished with a hash, but only if it will allow numeric (rather than symbolic...mohawkjohn (John Woods)