[#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/7/07, David Flanagan <david@davidflanagan.com> wrote:
> Nikolai Weibull wrote:
> > On 2/7/07, Sam Roberts <sroberts@uniserve.com> wrote:
> >
> >> Is creating a temporary 1-byte String really that expensive? Some
> >> benchmarks showing an algorithm that uses a long binary string as a data
> >> structure performs much faster with String#ord(i) than String#[i].ord
> >> would probably convince everybody.
> >
> > May I beg for an /important/ algorithm?
>
> Geez! What does it take to satisfy you guys! :-)
A lot, which is why most of us are using Ruby in the first place!
> Seriously, though, I thought that my suggestion for an optional index
> argument to ord was a modest and sensible one. Actually, I thought I
> was just pointing out an oversight and I'm surprised at the resistance
> it has faced. Given the richness of the core Ruby API, I assume that
> decisions about adding methods are based on elegance, and that is
> permitted or even desirable to have more than one way to do something.
>
> The objections so far have seemed to be "why would you want to do that?"
> and "isn't it fast enough as it is?". I would have expected objections
> to be more like: "That isn't the Ruby way, you newbie!" That is, I
> wouldn't have been surprised to be told simply "that doesn't feel
> right", but I am surprised by the request for benchmarks and algorithms.
I thought my initial response was along the lines of it not feeling right.
> >> Btw, isn't ruby 1.9 going to have character set information associated
> >> with strings? Would #ord(idx) return the value of the byte at a
> >> particular byte offset idx, or a codepoint at a character idx?
> >
> > It's worse for other methods like #[], where one can wonder how
> > grapheme clusters are to be dealt with. My idea was that you would
> > have encodings layered over other encodings for this kind of thing.
>
> I thought I knew a lot about Unicode, but I haven't heard about
> graphemes. Are those things that come up in Arabic?
No. A grapheme is simply what most people would refer to as a character:
Grapheme. (1) A minimally distinctive unit of writing in the
context of a particular writing system. For example, <b> and <d> are
distinct graphemes in English writing systems because there exist
distinct words like big and dig. Conversely </a/> and <a> [where
/.../ denotes an italic form of the letter 'a'] are not distinct
graphemes because no word is distinguished on the basis of these two
different forms. (2) What a user thinks of as a character.
-- The Unicode Standard, Version 5.0
A grapheme cluster is a set of character followed by pseudo-characters
like accents and other types of modifiers:
Grapheme Cluster. A maximal character sequence consisting of a
grapheme base followed by zero or more grapheme extenders or,
alternatively, by the sequence <CR, LF>. (See definition D60 in
Section 3.6, Combination.) A grapheme cluster represents a
horizontally segmentable unit of text, consisting of some grapheme
base (which may consist of a Korean syllable) together with any number
of nonspacing marks applied to it.
-- The Unicode Standard, Version 5.0
You often want to deal with grapheme clusters as a unit, but not many
programs currently do that.
> > Say that you have a string s = {abc}, where a, b, and c are Unicode
> > characters and the {...} syntax means the string of these characters
> > in some encoding, and that it is encoded using UTF-8, and that a and b
> > constitute a grapheme cluster. Under certain conditions you may want
> > to work with each codepoint separately, under other conditions each
> > grapheme cluster. Normally, s.encoding would be "utf-8", but if I
> > want to work with grapheme clusters I may set s.encoding =
> > "utf-8.graphemes", where the dot introduces another "encoding axis".
> > In the first case, s[0] would give you the string {a}. In the second
> > case, s[0] would give you the string {ab}. Sometimes you may want to
> > work with the individual bytes of s. You could then set s.encoding =
> > 'ascii' or s.encoding = 'bytes' or something like that (ascii wouldn't
> > be great, as it is 7-bit and perhaps some implementation may depend on
> > this), then s[0] would give you the string {a_1}, where a_1 is the
> > first byte of the encoding of a in UTF-8.
>
> What's the thinking behind the encoding= method, do you know?
Well, I can't actually say that there's going to be an #encoding=
method, but my thought was that the whole encoding business would be
based on a pluggable system and encodings could be changed on the fly
for any given object where it is relevant, like String and IO.
> The way I would have imagined it would be to have methods like as_euc,
> as_unicode, and as_bytes which return objects that provide a new "view"
> on the same underlying bytes. (Allowing multiple views of the same
> bytes raises hairy isues of concurrent modifications, of course)
The Ruby-on-Rails people have done something like that, sort of. The
way to access the UTF-8 characters of a String is by invoking
String#chars. That method will return a proxy that treats the
original String as a UTF-8-encoded sequence of Unicode characters.
I guess one can use a similar scheme for when dealing with graphemes
versus grapheme clusters, i.e., have methods like String#bytes,
String#chars, and String#clusters (while still retaining #encoding, of
course).
I personally don't like this set-up, as it only really makes sense for
a couple of encodings.
> Speaking of concurrent modifications, what happens if one thread changes
> the encoding of a string while another thread is iterating through it?
Well, what happens when you iterate through an array or hash that's
being modified by another thread? Unless you employ thread-safe
data-structures, it seems to be a free-for-all.
> Anyway, I can see why encoding issues and multi-byte character issues
> argue strongly for representing characters as a kind of String. Has
> anyone argued for creating a Character class that extends String? This
> would be a natural place to put methods like ord and digit? alpha?, etc.
> Also, I tend to think that characters should be immutable (I'm not sure
> why) and having a subclass would probably allow that.
I don't have an answer to this question, sorry.
nikolai