[#10157] Re: Including classes — Pit Capitain <pit@...>
Ola Bini schrieb:
[#10167] SVN revision corresponding to 1.8.5_p12? — Charles Oliver Nutter <charles.nutter@...>
Simple question: what SVN revision corresponds to the 1.8.5_p12 release?
[#10185] Ruby 1.9: Why the change to the return values of #instance_variables? — "Austin Ziegler" <halostatue@...>
I have been preparing a release of Transaction::Simple 1.4 and want to
[#10193] String.ord — David Flanagan <david@...>
Hi,
Hi,
Yukihiro Matsumoto wrote:
David Flanagan wrote:
Daniel Berger wrote:
On 2/6/07, David Flanagan <david@davidflanagan.com> wrote:
Nikolai Weibull wrote:
On 2/6/07, David Flanagan <david@davidflanagan.com> wrote:
Nikolai Weibull wrote:
Quoting david@davidflanagan.com, on Wed, Feb 07, 2007 at 09:10:52AM +0900:
On 2/7/07, Sam Roberts <sroberts@uniserve.com> wrote:
Nikolai Weibull wrote:
Hi,
On 2/6/07, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
Hi --
On 2/6/07, dblack@wobblini.net <dblack@wobblini.net> wrote:
[#10230] Test::Unit::AutoRunner#parse_args bug, attributable to optparse documentation. — Mauricio Fernandez <mfp@...>
[#10254] uninitialized variable in function rb_syswait() — <noreply@...>
Bugs item #8538, was opened at 2007-02-09 17:25
On Sat, Feb 10, 2007 at 02:25:43AM +0900, noreply@rubyforge.org wrote:
[#10255] String:upto loops forever if argument is modified inside block — <noreply@...>
Bugs item #8539, was opened at 2007-02-09 17:27
[#10257] coredump when invoking Kernel:syscall — <noreply@...>
Bugs item #8541, was opened at 2007-02-09 17:31
On Sat, Feb 10, 2007 at 02:31:48AM +0900, noreply@rubyforge.org wrote:
[#10259] Segmentation fault: Ruby 1.8.5 Under VC++ express 2005 — "z wen" <zhimin.wen@...>
Hi
Hell,
Hello,
On 2/10/07, Masaki Suketa <masaki.suketa@nifty.ne.jp> wrote:
[#10276] fastthread now default in ruby_1_8 — "Akinori MUSHA" <knu@...>
Hi,
[#10284] Can't seem to run tests? — "Farrel Lifson" <farrel.lifson@...>
Hi there,
[#10288] Socket library should support abstract unix sockets — <noreply@...>
Bugs item #8597, was opened at 2007-02-13 16:10
On Wed, Feb 14, 2007 at 12:10:37AM +0900, noreply@rubyforge.org wrote:
Hi,
On Wed, Feb 14, 2007 at 08:38:50AM +0900, Yukihiro Matsumoto wrote:
On Wed, Feb 14, 2007 at 12:10:37AM +0900, noreply@rubyforge.org wrote:
[#10290] URI::Generic#userinfo — "Jonas Pfenniger" <zimbatm@...>
Hello,
Those are not errors. Username and password are not allowed in HTTP
[#10321] File.basename fails on Windows root paths — <noreply@...>
Bugs item #8676, was opened at 2007-02-15 10:09
Hi,
On 5/12/07, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
On 5/12/07, Austin Ziegler <halostatue@gmail.com> wrote:
Nikolai Weibull wrote:
[#10323] Trouble with xmlrpc — James Edward Gray II <james@...>
Some of the Ruby code used by TextMate makes use of xmlrpc/
> -----Original Message-----
On Feb 15, 2007, at 1:29 PM, Berger, Daniel wrote:
On Feb 15, 2007, at 1:33 PM, James Edward Gray II wrote:
On Feb 16, 2007, at 7:49 AM, James Edward Gray II wrote:
At Tue, 20 Feb 2007 22:33:08 +0900,
On Feb 20, 2007, at 7:50 AM, Akinori MUSHA wrote:
While I am complaining about xmlrpc, we have another issue. It's
James Edward Gray II wrote:
On Feb 16, 2007, at 12:08 PM, Alex Young wrote:
James Edward Gray II wrote:
On Feb 16, 2007, at 4:27 PM, Alex Young wrote:
On Feb 16, 2007, at 5:08 PM, James Edward Gray II wrote:
James Edward Gray II wrote:
[#10334] make Test::Unit output more Emacs friendly format — Kouhei Sutou <kou@...>
Hi,
[#10341] matz/knu: Requesting committer privileges to add Win32 NTLM authentication to net/http — "Justin Bailey" <jgbailey@...>
Matz, Mr. Musha, and All,
[#10357] Ruby 1.8.6 preview1 has been released — "Akinori MUSHA" <knu@...>
Hi,
[#10372] Stateful I/O interface — "Tony Arcieri" <tony@...>
Has anyone ever suggested adding a stateful I/O multiplexing interface which
[#10387] vendor_ruby support — Marcus Rueckert <mrueckert@...>
Hi,
[#10397] Ruby 1.8.5 not installing a working digest.rb on MacOSX — "Ryan Waldron" <ryan.waldron@...>
While trying to install a Rails app on my Mac (10.4 Tiger), I ran into
[#10413] Support for multiple-files breakpoint-management with Emacs — Martin Nordholts <enselic@...>
Hello!
Sorry for misformatting. This time it should be OK (enclosed in
It appears as if the debugger doesn't support 'b file.rb:25', but it
[#10414] Ruby 1.8.6 preview2 has been released — "Akinori MUSHA" <knu@...>
Hi,
On 2/24/07, Akinori MUSHA <knu@idaemons.org> wrote:
[#10420] Test::Unit shows result even if interrupted — Kouhei Sutou <kou@...>
Hi,
Kouhei Sutou <kou@cozmixng.org> writes:
[#10437] MIME decoding confused by non-MIME characters — Brian Candler <B.Candler@...>
Could someone who has bleeding-edge Ruby installed please test the
[#10442] Latest Update to RHG — Charles Thornton <ceo@...>
I am releasing the lastest version of the Ruby Hacker's Guide.
Hi,
[#10445] PATCH: Emacs support for 'ruby-debug' (rdebug) : rdebug.el — Martin Nordholts <enselic@...>
Hello,
This is a patch against trunk that also changes ./misc/README. The patch
[#10446] Potential RCR?: Array#join with block — "Farrel Lifson" <farrel.lifson@...>
Does anyone think Array#join with a block is a potential RCR?
Re: String.ord
On 2/6/07, David Flanagan <david@davidflanagan.com> wrote:
> Nikolai Weibull wrote:
> > Also, how often is it actually necessary to convert strings to their
> > ordinal value in their encoding table?
>
> If you're working on binary data and want to read the raw byte string
> instead of unpacking it into an array of Fixnums? I don't know how
> common this is in practice. I was using a string as a compact sequence
> of bytes to represent a Sudoku grid, which is what made me bring this up.
True. But binary data is evil! ;-)
> You say that characters-as-strings makes perfect sense:
>
> > Perhaps, but this is a tradeoff of keeping "characters" and "strings"
> > in the same class. As already mentioned, "characters" will currently
> > be represented by one-character-long Strings in 1.9/2.0. To me, this
> > makes perfect sense, considering that one of the main design goals for
> > Strings in 1.9/2.0 is that they should be able to handle most any
> > encoding scheme (as I've understood it).
> >
>
> But then you muse about a new type of Fixnum to represents characters!
No, what I go on to say is that perhaps we need a new class for
representing the /codepoint/, not the character.
> > Anyway, while we're on the topic, what exactly should String#ord
> > return? I'd argue that a subclass of Fixnum would make sense, which
> > would have methods like #alpha?, #digit?, and so on, according to what
> > information is provided by the encoding scheme. This can easily get a
> > bit too Unicode-centric, but I prefer writing
>
> I agree with the need for methods like this, but if that's going to
> happen, I'd say the class should just be called a Character, and there
> should be a way to get Character objects directly from strings without
> having to stick the ord method in the middle. Personally, I'd suggest
> that String.[x] with one argument should return a Character object, and
> String.[x,1] should return a String of length one.
>
> My own musings along these lines make characters a subclass of Symbol
> rather than of Fixnum. So ?A would be an object much like :A, but would
> have additional character-specific methods, such as #encoding, #alpha?, etc.
>
> > "a".ord.alpha?
> >
> > to
> >
> > Codepoint.alpha?("a".ord)
> >
> > or something similar. I guess a good name for this subclass would be
> > Codepoint, but then perhaps #ord isn't a very good name and #codepoint
> > would make more sense.
> >
> > Finally, perhaps the type of methods I've described above, i.e.,
> > #alpha?, #digit?, ..., should be methods of String for strings of
> > length one character, like #ord.
> >
> > Let's try it out:
> >
> > "a".alpha?
> >
> > yes, yes I like that. Still, String may be getting a bit overloaded by
> > then.
>
> I think it is asking too much to have the String class represent byte
> strings, multi-byte character strings, and individual characters.
Maybe so. It's not a matter to be taken lightly, considering that one
of the main complaints I've seen about Ruby 1.8 (and below) is the
poor support for Unicode (thank you very much, Tim Bray ;-). Now also
consider the fact that Ruby is a language born and bred in Japan and
you'll have to throw in a couple more encodings to the mix. You end
up with a lot of cases to cover, and different encodings can represent
different kinds of text that have different kinds of attributes. It's
not going to be easy, and I'm fearing that things such as character
properties are going to be left out.
> Let me also respond to a couple of things from other messages:
>
> > Like the fact that #ordAt isn't a very Rubyish name.
>
> My bad. That was a typo based on my background in Java and JavaScript.
> I don't actually like the idea of a separate method, but if one were
> needed, ord_at would obviously be a better name than ordAt.
I know it was only a "pseudo-named" method. But it's hard to come up
with a good name for the method you want, and I did want to make a
point about how well-named methods are in Ruby. Being able to keep
method names short and simple is often the result of well-thought
through APIs and also result in easy-to-follow code when used, in my
experience.
> David Black wrote:
>
> > It's not going to be backward compatible in any case, since [] will
> > have changed. I think the reasoning is that people use [].chr more
> > than they're likely to use [].ord, so offloading the less simple
> > behavior onto the ord case will save method calls in the long run.
>
> I would have thought that people would use s[x,1] instead of s[x].ord,
> avoiding the extra method call.
Why am I not following this? My understanding is that s[x,1] and s[x]
will give the same result in 1.9/2.0, i.e., a String containing the
character at offset x in s.
But I don't follow what David is saying, which is also why I didn't
respond to his message.
nikolai