Re: strings: "sequence-of-integer ... list of chunks"

2002-02-02 Thread Dave Storrs
On Thu, 31 Jan 2002, Bryan C. Warnock wrote: > print "There's a letter in here!\n" if (substr($pi, 0, 200) =~ /[a-z]/); *shrug* I actually did think of that when I first proposed this; doesn't substr make a fresh copy of the string? (I honestly don't know.) What happens if you take a s

Re: strings: "sequence-of-integer ... list of chunks"

2002-01-31 Thread Bryan C. Warnock
On Thursday 31 January 2002 22:03, Bryan C. Warnock wrote: junk. Too tired, I missed the point entirely. > On Thursday 31 January 2002 21:03, Dave Storrs wrote: > > Just a thought...the following would be *really* cool: > > > > my $pi = Pi::Generate; > > > > # Check the firs

Re: strings: "sequence-of-integer ... list of chunks"

2002-01-31 Thread Bryan C. Warnock
On Thursday 31 January 2002 21:03, Dave Storrs wrote: > > Just a thought...the following would be *really* cool: > > my $pi = Pi::Generate; > > # Check the first 200 characters only; halt w/success if NO match > print "There's a letter in here!\n" if ($pi =~ /[a-z]/h200t); p

Re: strings: "sequence-of-integer ... list of chunks"

2002-01-31 Thread Dave Storrs
On Thu, 31 Jan 2002, Dan Sugalski wrote: > There is an issue of time--what do we do, for example, in the case: > > my $pi = Pi::Generate; > if ($pi =~ /[a-z]) { > print "There's a letter in here!\n"; > } > > if Pi::Generate returns a generator object that will calculate pi for

Re: strings: "sequence-of-integer ... list of chunks"

2002-01-31 Thread Alex Gough
On Thu, 31 Jan 2002, Dan Sugalski wrote: > At 2:49 PM + 1/31/02, Tim Bunce wrote: > >On Wed, Jan 30, 2002 at 10:47:36AM -0800, Larry Wall wrote: > >> > >> For various reasons, some of which relate to the sequence-of-integer > >> abstraction, and some of which relate to "infinite" strings an

Re: strings: "sequence-of-integer ... list of chunks"

2002-01-31 Thread Dan Sugalski
At 5:34 PM + 1/31/02, Tim Bunce wrote: >On Thu, Jan 31, 2002 at 12:18:28PM -0500, Dan Sugalski wrote: >> At 2:49 PM + 1/31/02, Tim Bunce wrote: >> >On Wed, Jan 30, 2002 at 10:47:36AM -0800, Larry Wall wrote: >> >> >> >> For various reasons, some of which relate to the sequence-of-inte

Re: strings: "sequence-of-integer ... list of chunks"

2002-01-31 Thread Tim Bunce
On Thu, Jan 31, 2002 at 12:18:28PM -0500, Dan Sugalski wrote: > At 2:49 PM + 1/31/02, Tim Bunce wrote: > >On Wed, Jan 30, 2002 at 10:47:36AM -0800, Larry Wall wrote: > >> > >> For various reasons, some of which relate to the sequence-of-integer > >> abstraction, and some of which relate to "

Re: strings: "sequence-of-integer ... list of chunks"

2002-01-31 Thread Dan Sugalski
At 2:49 PM + 1/31/02, Tim Bunce wrote: >On Wed, Jan 30, 2002 at 10:47:36AM -0800, Larry Wall wrote: >> >> For various reasons, some of which relate to the sequence-of-integer >> abstraction, and some of which relate to "infinite" strings and arrays, >> I think Perl 6 strings are likely to b

strings: "sequence-of-integer ... list of chunks"

2002-01-31 Thread Tim Bunce
On Wed, Jan 30, 2002 at 10:47:36AM -0800, Larry Wall wrote: > > For various reasons, some of which relate to the sequence-of-integer > abstraction, and some of which relate to "infinite" strings and arrays, > I think Perl 6 strings are likely to be represented by a list of > chunks, where each ch