I had assumed Perl6 will have copy-on-write references, so that
$x = [1,2,3];
@y = *$x;
would not require a copy. However, on thinking about it further, I
realized that that would get you in trouble here:
$x = [1,2,3];
%h{$x} = 1;
@y = *x;
$x[0]++;
print %h{$x
On Fri, May 10, 2002 at 12:12:41PM -0400, Dan Sugalski wrote:
> At 5:38 PM +0200 5/10/02, Peter Gibbs wrote:
> >The result is that the last header of a COWed string will still believe that
> >the buffer is shared until a GC collection run occurs, and therefore could
> >result in buffers being copi
At 5:38 PM +0200 5/10/02, Peter Gibbs wrote:
>The result is that the last header of a COWed string will still believe that
>the buffer is shared until a GC collection run occurs, and therefore could
>result in buffers being copied unnecessarily. Your system eliminates this
>problem; however, I bel
Hi Nicholas
The final design is now waiting on Dan, but it is always interesting to see
other ideas.
Like you, I rejected the parent/child technique. However, my proposed
solution did not use any links at all, because it relies on the garbage
collection system to determine when a shared buffer h
- Original Message -
From: "Dan Sugalski" <[EMAIL PROTECTED]>
> Actually, we don't. (Sez the man catching up on altogether too much
> mail) Since we're putting the COW stuff at the tail end, substrings
> of COW strings are fine. You set the bufstart to where the substring
> starts, buflen
At 10:58 AM +0200 5/6/02, Peter Gibbs wrote:
>The COWing of substrings requires a major interface change:
>*** All references to the data in a STRING must use the new strstart pointer
>instead of bufstart ***
Actually, we don't. (Sez the man catching up on altogether too much
mail) Since we're p
Although the tidying up of resources.c is not complete yet, I decided to
implement COW strings anyway.
This implementation handles the following:
Copied strings and substrings are COWed instead of copied (i.e. new string
header only); this applies to normal and constant strings.
Functions that al
On Saturday 01 December 2001 09:24 pm, Bryan C. Warnock wrote:
{snip}
Er, obviously, s/is/should be/g in my response.
--
Bryan C. Warnock
[EMAIL PROTECTED]
On Saturday 01 December 2001 01:50 pm, Jeff 'japhy' Pinyan wrote:
> $x = "_" x 100_000;
> $a = $x; $b = $x; $c = $x;
>
> $x is now copy-on-write, with three dependents.
>
> $x = "foo";
>
> According to you model, we've just co
At 09:30 AM 12/1/2001 -0800, Brent Dax wrote:
>First of all, you sent us this already. :^)
>
>Jeff 'japhy' Pinyan:
># I'm writing a simple language to embody the concept of
># copy-on-write, and
># so that I can learn how to implement it. The languag
>>>>> "J'P" == Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> writes:
J'P> $x = "_" x 100_000;
J'P> $a = $x; $b = $x; $c = $x;
J'P> $x is now copy-on-write, with three dependents.
J'P> $x =
On Dec 1, Brent Dax said:
>First of all, you sent us this already. :^)
Well, I sent it before I subscribed (and from a different account
entirely) and it hadn't showed up in the archives 12 hours after posting,
so I figured it was dixed.
># So what's copy-on-write? Basically,
First of all, you sent us this already. :^)
Jeff 'japhy' Pinyan:
# I'm writing a simple language to embody the concept of
# copy-on-write, and
# so that I can learn how to implement it. The language is
# called COW and
# it's at
#
# http://japhy.perlmonk.org/COW/
#
# B
I'm writing a simple language to embody the concept of copy-on-write, and
so that I can learn how to implement it. The language is called COW and
it's at
http://japhy.perlmonk.org/COW/
Ben Tilly suggested I contact the Perl6 Internals folk and let you know
that this is an importa
I'm writing a simple language to embody the concept of copy-on-write, and
so that I can learn how to implement it. The language is called COW and
it's at
http://japhy.perlmonk.org/COW/
Ben Tilly suggested I contact the Perl6 Internals folk and let you know
that this is an importa
15 matches
Mail list logo