[#8976] Insecure warnings on sticky-bit directories — "Laurent Sansonetti" <laurent.sansonetti@...>
Hi,
[#8978] Inheritance and Autorunner: Default_test causes a problem — <noreply@...>
Bugs item #5990, was opened at 2006-10-02 10:05
Hi,
[#8997] Re: [ruby-cvs:18323] ruby: * eval.c (splat_value): use "to_splat" instead of "to_ary" to — Mathieu Bouchard <matju@...>
On Tue, 3 Oct 2006, matz wrote:
Hi,
On Wed, 4 Oct 2006, Yukihiro Matsumoto wrote:
Hi,
Hi --
Yukihiro Matsumoto wrote:
Hi,
Hi --
Hi,
Hi --
Hi,
Hi --
On Oct 9, 2006, at 10:19 AM, dblack@wobblini.net wrote:
On 2006.10.10 00:31, James Edward Gray II wrote:
On Oct 9, 2006, at 11:50 AM, Eero Saynatkari wrote:
Hi --
dblack@wobblini.net wrote:
Thomas Enebo wrote:
Hi --
Hi --
Hi,
Hi --
Hi,
On 10/10/06, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
Hi,
On Oct 10, 2006, at 8:43 AM, Yukihiro Matsumoto wrote:
From: <dblack@wobblini.net>
Hi --
> to_a was too general. All enumerable objects (and even
Brown, Warren wrote:
> -----Original Message-----
[#8999] making FileUtils.rm_rf robust: is anyone interested? — Jim Meyering <list+ruby@...>
Hello,
Hi,
"Nobuyoshi Nakada" <nobu@ruby-lang.org> wrote:
[#9014] C#'s ?? Operator — "Nikolai Weibull" <now@...>
Hi!
[#9021] argument passing bug — Mathieu Bouchard <matju@...>
[#9024] — Shashank Date <sdate@...>
Hi All,
[#9077] how to create a NODE_ARGSPUSH? — Ryan Davis <ryand-ruby@...>
Is it possible for plain ruby code to create a NODE_ARGSPUSH? It
[#9104] Loop over array.delete breaks at first hit — <noreply@...>
Bugs item #6090, was opened at 2006-10-10 22:33
Hi,
[#9119] What about 'splay'? — dblack@...
Hi --
On 2006.10.12 02:32, dblack@wobblini.net wrote:
On Wednesday 11 October 2006 13:55, Eero Saynatkari wrote:
Hi --
dblack@wobblini.net wrote:
Hi --
On 2006.10.12 03:36, Sean Russell wrote:
On 10/11/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
[#9152] regular expressions tainting? — hadmut@... (Hadmut Danisch)
Hi,
Hi,
On Thu, Oct 12, 2006 at 01:01:36PM +0900, Nobuyoshi Nakada wrote:
It's worse:
Hi,
On Oct 15, 2006, at 1:20 AM, Hadmut Danisch wrote:
On Sun, Oct 15, 2006 at 05:33:16PM +0900, Eric Hodel wrote:
[#9158] Module#class_variable_defined? — Mauricio Fernandez <mfp@...>
[#9188] Symbol < String in Ruby > 1.8 — dblack@...
Hi --
Hi
Yukihiro Matsumoto wrote:
Charles Oliver Nutter wrote:
Charles Oliver Nutter wrote:
Jim Weirich wrote:
On Thu, Oct 19, 2006 at 05:06:02AM +0900, Charles Oliver Nutter wrote:
Hi,
Quoting matz@ruby-lang.org, on Thu, Oct 19, 2006 at 01:40:42PM +0900:
Hi,
Quoting matz@ruby-lang.org, on Thu, Oct 19, 2006 at 02:49:30PM +0900:
Hi,
Quoting matz@ruby-lang.org, on Thu, Oct 19, 2006 at 11:22:18PM +0900:
On 10/15/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
Hi --
On 10/15/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
Hi,
On 10/16/06, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
On Oct 16, 2006, at 3:06 PM, Rick DeNatale wrote:
On Tue, Oct 17, 2006 at 05:14:09AM +0900, James Edward Gray II wrote:
On 10/16/06, Sam Roberts <sroberts@uniserve.com> wrote:
Hi,
Hi --
On Oct 17, 2006, at 7:29 PM, dblack@wobblini.net wrote:
Hi --
On Oct 18, 2006, at 4:18 AM, dblack@wobblini.net wrote:
On 10/18/06, Eric Hodel <drbrain@segment7.net> wrote:
On 10/18/06, Nikolai Weibull <now@bitwi.se> wrote:
On 10/18/06, mathew <meta@pobox.com> wrote:
On Thu, Oct 19, 2006 at 04:24:24AM +0900, Nikolai Weibull wrote:
On 10/18/06, Mauricio Fernandez <mfp@acm.org> wrote:
Hi --
On 10/18/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
Hi -
Hi,
Hi --
Rick DeNatale wrote:
Hi --
Hi,
Hi --
On 10/19/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
Hi --
On 10/19/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
Hi --
dblack@wobblini.net wrote:
Hi --
Hi,
Hi --
Hi,
Hi --
On 10/20/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
Hi --
Hi,
On Sat, Oct 21, 2006 at 01:11:36AM +0900, dblack@wobblini.net wrote:
Hi,
On Oct 18, 2006, at 11:37 AM, Nikolai Weibull wrote:
[#9197] Ruby Threads — "Abhisek Datta" <abhisek@...>
Hello,
[#9282] Re: String not enumerable, what about IO? — "Michael Selig" <michael.selig@...>
I am fairly new to ruby, and I have just started listening to this mailing
[#9341] array.c - defining aliases as aliases — "Daniel Berger" <djberg96@...>
Hi all,
On Oct 27, 2006, at 11:12 AM, Daniel Berger wrote:
[#9351] Module#method_aliased and Module#singleton_method_aliased — "Daniel Berger" <djberg96@...>
Hi all,
Re: String not enumerable, what about IO? (was Re: Symbol < String in Ruby > 1.8)
On 10/20/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
> Hi --
>
> On Sat, 21 Oct 2006, Rick DeNatale wrote:
>
> > On 10/20/06, dblack@wobblini.net <dblack@wobblini.net> wrote:
> >
> >> On Sat, 21 Oct 2006, Yukihiro Matsumoto wrote:
> > ...
> >> > |Did you see Austin's by_* methods?
> >> > |
> >> > | string.lines # an array
> >> > | string.by_lines { } # enumeration (no intermediate array)
> >> > | string.by_lines # enumerator (or your "something"?)
> >> > |
> >> > |I really like that way of breaking it out.
> >> >
> >> > Hmm, you think that "by_" means THAT much.
> >>
> >> It seems like a good way of namespace-splitting, so that arrays (my
> >> naive "collections" :-) don't have to compete with enumerators or
> >> enumerator-like entities.
> >
> > Extending that logic do you also want, say:
> >
> > {:a => :b, :c => :d}.each_key => ERROR NO BLOCK GIVEN
>
> Yes. I don't like each* without a block (but I think I'm fighting a
> losing battle).
I don't really see the harm, as it doesn't seem incompatible with 1.8
usage since it was an error before for the most part, and I find
something like
a_hash.each_key.map {...}
quite natural.
> > {:a => :b, :c => :d}.by_keys {|k|} ... enumeration
> > {:a => :b, :c => :d}.by_keys => Enumerator
> >
> > And so on for the various each* method in the other classes in the
> > Core and standard library?
>
> Possibly, but possibly not: I'd want Matz to decide for each case.
>
> (What ever happened to to_enum or enum_for? Some overt reference to
> Enumerators [which seems reasonable, if they're there] might take some
> of the pressure off all the naming stuff.)
Yeah, but I like the new each* feature better.
> > I think that the issue is different for each* and other methods with
> > names like lines, chars, bytes, etc.
>
> I do too.
>
> > And I don't see it as Arrays competing with Enumerators. Arrays as
> > jack-of-all-trades collections are perhaps overused in Ruby.
>
> I mean specifically that there seems to be a winner-take-all
> competition for the lines/chars/bytes/* (plural objects) namespace.
I've sort of lost the thread here. I think that I'd already agreed
that lines/chars/bytes should return an array or array-like thing.
> > Sometimes, when some of the features of Array either aren't needed or
> > are less efficient than the same features in other classes, it's good
> > to let our friend Array have a rest on the bench and bring in a
> > specialist.
> >
> > Set is a good example, Arrays can be used a set with proper care, but
> > Set is often a better choice with a set is wanted.
> >
> > And an Enumerator, when you look at it in a certain way, is a kind of
> > collection itself.
>
> Yes -- so let's have methods that sound like they're returning
> Enumerators :-) I don't want arrays to have a rest when the
> overwhelming thrust of the method-name semantics is array-like. I'm
> not looking forward to seeing (or writing, for that matter) book
> passages like this:
>
> You'd think that calling lines would give you all the lines in the
> string, stored in a collection that you can print, inspect, and/or
> index. However, Ruby actually performs a kind of interception: what
> you get is not an ordered collection of lines, but a kind of handle
> on the collection that lets you perform some, but by no means all,
> of the operations you might expect.
>
> etc. (And this isn't just a "let's keep it simple for nubies" thing.)
Why do those method names have an overwhelming sense of returning an array?
To me they suggest that they return an collection, but why does that
collection need to be an array?
A collection of lines/chars/bytes yes, but not necessarily an array.
To my mind collections are things which have elements which can be
enumerable. But collections aren't necessarily indexable, or finite,
or have a defined enumeration order for their elements.
So, to my mind, Enumerators really ARE collections, which don't
provide indexing.
In some cases, an array is the natural return type for these methods
from some objects. But there are cases where that isn't clear, or even
possible. If we wanted to have lines, chars, and bytes methods for
IO, I don't think that it could return an array, since what's read
from an IO is in general unbounded, and random access can be either
problematical or very expensive.
One way to deal with this would be to not define those methods,
another would be to define them but to return an non-indexable
collection instead of an array. That non-indexable collection might
have a name which was named to invoke the notion of collection better
than Enumerator does, but it would look a lot LIKE an Enumerator.
Someone might argue that unbounded collections should be disallowed
because each wouldn't terminate, but I'd argue that this falls into
the same area as supporting loop..end, or while true ... end.
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
I