[#4522] Undefined Errno::EPROTO and the like raises NameError — "Florian Frank" <flori@...>
Hi,
[#4533] giving acces readline to rl_line_buffer — "Cs. Henk" <csaba-ml@...>
Hi!
[#4548] Ruby 1.8.2 array of hash entries functions incorrectly — noreply@...
Bugs item #1613, was opened at 2005-03-09 19:49
[#4561] rb_reg_quote weirdness — Nikolai Weibull <mailing-lists.ruby-core@...>
(Two weirdnesses in one day.)
Hi,
[#4567] Immutable Ropes — Nikolai Weibull <mailing-lists.ruby-core@...>
Note how I didn't write "Immutable Strings" in the subject.
[#4575] Allowing "?" in struct members — "Berger, Daniel" <Daniel.Berger@...>
Hi all,
[#4587] 0**0==1? — Bertram Scharpf <lists@...>
Hi,
[#4595] New block syntax — Daniel Amelang <daniel.amelang@...>
I'm really sorry if this isn't the place to talk about this. I've
Daniel Amelang wrote:
Hi --
On Monday 21 March 2005 16:17, David A. Black wrote:
Hi --
Hey David, I think that we've had some misunderstandings due to
Hi --
On Wednesday 30 March 2005 20:55, David A. Black wrote:
On Sunday 20 March 2005 21:31, Daniel Amelang wrote:
[#4601] Re: New block syntax — "Berger, Daniel" <Daniel.Berger@...>
> -----Original Message-----
[#4611] want_object? - possible? — "Berger, Daniel" <Daniel.Berger@...>
Hi all,
[#4619] Re: want_object? - possible? — Daniel Berger <djberg96@...>
--- nobu.nokada@softhome.net wrote:
Hi --
On 3/24/05, David A. Black <dblack@wobblini.net> wrote:
Hi --
On 4/14/05, David A. Black <dblack@wobblini.net> wrote:
On 14 Apr 2005, at 22:20, Mark Hubbart wrote:
On 4/15/05, Eric Hodel <drbrain@segment7.net> wrote:
[#4622] tempfile.rb — Tilman Sauerbeck <tilman@...>
Hi,
[#4648] about REXML::Encoding — speakillof <speakillof@...>
Hi.
On Thursday 31 March 2005 09:44, speakillof wrote:
Hi.
I've tested, applied, and committed your Encoding patch, Nobu.
Hi,
Re: Immutable Ropes
It would be useful in decoding large files like iCalendars or .vcf
with many cards, because as you decode into objects, those objects
would hold reference to main Rope, memory would not have to be
duplicated.
I used <rope> from SGI STL lib when doing a RFC822 decoder in C++. It
made the claim about how a rope could actually be on disk... but didn't
implement it. Too bad, that too would be useful when decoding large
files on disk, to avoid brining them into memory except as needed.
Are there any implementation of Rope that actually do the disk cacheing?
Sam
Quoting mailing-lists.ruby-core@rawuncut.elitemail.org, on Tue, Mar 15, 2005 at 10:18:28PM +0900:
> Note how I didn't write "Immutable Strings" in the subject.
>
> Boehm describes in [1] a data structure, called a _rope_, that can be
> used to represent very long strings efficiently. The way they are
> implemented, where operations that modify the rope return a new rope
> that shares as much data as possible with the old one (i.e., a
> functional interface), also leads to the nice property that ropes may be
> heavily altered without wasting a lot of memory. Another nice property
> is that as one abstracts away the pointer-to-char, ropes can be created
> lazily from IO or other generators of data. As an example, say that we
> want a String of one million a's
>
> s = "a" * 1000000
>
> With a Rope, we could have written this as:
>
> r = Rope.new("a", 1000000)
>
> and that could be represented very efficiently. A better example is if
> we would like to search the concatenation of two strings for a regular
> expression. Using only Strings, we would have to write this as:
>
> s1 + s2 =~ /.../
>
> where the whole concatenation of s1 and s2 has to be created before the
> matching can take place, taking both O(max(s1.length, s2.length)) time
> and space, whereas with ropes this could be written as:
>
> r1 + r2 =~ /.../
>
> and the concatenation would simply be a O(1) time and space operation of
> creating a new concatenation node, representing the concatenation of the
> two ropes.
>
> The implementation of ropes is rather straight-forward and fits well
> with the garbage-collection model of memory allocation, so I was
> wondering if there was any interest in seeing a Rope object in Ruby 2.0.
> It would give us that immutable string representation that everyone is
> always talking about as a plus for choosing Python. Ropes are also a
> lot more memory-friendly than Strings for cases where the text sequence
> is long, or is to be heavily modified.
>
> Comments?,
> nikolai
>
> [1] Hans-J Boehm, "Ropes: an Alternative to Strings", Software--Practice
> and Experience, vol. 25(12), 1315--1330, Dec. 1995.
>
> --
> ::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
> ::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
> ::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
> main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
>