On Fri, 2004-07-16 at 12:10 -0400, Jonadab the Unsightly One wrote:
> Austin Hastings <[EMAIL PROTECTED]> writes:
>
> > Half of all numbers in [0, Inf) are in the range [Inf/2, Inf). Which
> > collapses to the range [Inf, Inf).
>
> It's not that simple. By that reasoning, 10% of all numbers in
On Mon, 19 Jul 2004, Jonadab the Unsightly One wrote:
> > If I extend the natural numbers N with Inf to a new set NI (N with
> > Inf)
>
> The problem is, NI is not a group with respect to addition for any
> definition of addition of which I am aware. Translated from mathese
In other words, or m
On Mon, Jul 19, 2004 at 09:55:14PM -0400, Jonadab the Unsightly One wrote:
: It is possible to construct a group that includes infinities, but NI
: isn't it, and for Perl purposes it doesn't seem necessary.
Though if someone wants to hack surreals into 6.1, that'd be cool. :-)
Larry
"Ph. Marek" <[EMAIL PROTECTED]> writes:
>> This is obviously some new definition of Inf of which I was not
>> previously aware.
> Well, after reading my sentence one more, I see what may have caused
> some troubles. Inf is not in N; but *in my understanding* it fits
> naturally as an extension t
On Friday 16 July 2004 18:23, Jonadab the Unsightly One wrote:
> > Please take my words as my understanding, ie. with no connection to
> > mathmatics or number theory or whatever. I'll just say what I
> > believe is practical.
>
> [...]
>
> > I'd believe that infinity can be integer, ie. has no num
[EMAIL PROTECTED] (David Storrs) writes:
> Does it even make sense to take the Infiniteth element of an array?
You should have used a hash in the first place.
--
BASH is great, it dumps core and has clear documentation. -Ari Suntioinen
"Ph. Marek" <[EMAIL PROTECTED]> writes:
> Please take my words as my understanding, ie. with no connection to
> mathmatics or number theory or whatever. I'll just say what I
> believe is practical.
[...]
> I'd believe that infinity can be integer, ie. has no numbers after
> the comma; and infinity
David Storrs <[EMAIL PROTECTED]> writes:
> Does it even make sense to take the Infiniteth element of an array?
No. At best, it would be undefined, so we could define it to return
undef.
> I think I would prefer if using Inf as an array index resulted in a
> trappable error.
Or that, yeah.
--
Austin Hastings <[EMAIL PROTECTED]> writes:
> Half of all numbers in [0, Inf) are in the range [Inf/2, Inf). Which
> collapses to the range [Inf, Inf).
It's not that simple. By that reasoning, 10% of all numbers in
[0,Inf) would be in [Inf/10,Inf), also reducing to the range
[Inf,Inf). For tha
On Wednesday 14 July 2004 12:58 pm, Brent 'Dax' Royal-Gordon wrote:
> Andrew Rodland wrote:
> > So if we have @x = [1, 3, 5, 6 .. 9, 10 .. Inf, 42];
>
> ...
>
> > 42 is just one number, so questions of indexing
> > it are moot, but its "distance" from the left is Inf. So, there's no way
> > to acce
On Wed, 14 Jul 2004, Ph. Marek wrote:
> Please take my words as my understanding, ie. with no connection to
> mathmatics or number theory or whatever. I'll just say what I believe is
> practical.
As a side note, being what one would probably call a mathematically
oriented person, it is very nat
On Wednesday 14 July 2004 04:55 am, Ph. Marek wrote:
> On Wednesday 14 July 2004 08:39, David Storrs wrote:
> > > To repeat Dave and myself - if
> > > @x = 1 .. Inf;
> > > then
> > > rand(@x)
> > > should be Inf, and so
> > > print $x[rand(@x)];
> > > should give Inf, as the infinite element
On Wednesday 14 July 2004 08:39, David Storrs wrote:
> > To repeat Dave and myself - if
> > @x = 1 .. Inf;
> > then
> > rand(@x)
> > should be Inf, and so
> > print $x[rand(@x)];
> > should give Inf, as the infinite element of @x is Inf.
Please take my words as my understanding, ie. wi
On Wed, Jul 14, 2004 at 07:40:33AM +0200, Ph. Marek wrote:
>
> To repeat Dave and myself - if
> @x = 1 .. Inf;
> then
> rand(@x)
> should be Inf, and so
> print $x[rand(@x)];
> should give Inf, as the infinite element of @x is Inf.
Does it even make sense to take the Infiniteth
> >--- Larry Wall <[EMAIL PROTECTED]> wrote:
> >> The hard part being to pick a random number in [0,Inf) uniformly. :-)
> >
> >Half of all numbers in [0, Inf) are in the range [Inf/2, Inf). Which
> >collapses to the range [Inf, Inf). Returning Inf seems to satisfy the
> >uniform distribution requi
David Green writes:
> On 7/12/04, Austin Hastings wrote:
> >--- Larry Wall <[EMAIL PROTECTED]> wrote:
> >
> >> The hard part being to pick a random number in [0,Inf) uniformly. :-)
> >
> >Half of all numbers in [0, Inf) are in the range [Inf/2, Inf). Which
> >collapses to the range [Inf, Inf). Retu
On 7/12/04, Austin Hastings wrote:
--- Larry Wall <[EMAIL PROTECTED]> wrote:
The hard part being to pick a random number in [0,Inf) uniformly. :-)
Half of all numbers in [0, Inf) are in the range [Inf/2, Inf). Which
collapses to the range [Inf, Inf). Returning Inf seems to satisfy the
uniform dist
On Mon, Jul 12, 2004 at 11:11:58AM -0700, Austin Hastings wrote:
: --- Larry Wall <[EMAIL PROTECTED]> wrote:
: > The hard part being to pick a random number in [0,Inf) uniformly. :-)
:
: Half of all numbers in [0, Inf) are in the range [Inf/2, Inf). Which
: collapses to the range [Inf, Inf). Retur
--- Larry Wall <[EMAIL PROTECTED]> wrote:
> On Mon, Jul 12, 2004 at 10:12:03AM -0700, Austin Hastings wrote:
> : --- Dave Whipp <[EMAIL PROTECTED]> wrote:
> :
> : > rand(@x) == @x.rand == @x[ rand int @x ] == @x[ rand(1) * @x ]
> : >
> : > guaranteeing a uniform distribution unless adverbial mo
On Mon, Jul 12, 2004 at 10:12:03AM -0700, Austin Hastings wrote:
: --- Dave Whipp <[EMAIL PROTECTED]> wrote:
:
: > rand(@x) == @x.rand == @x[ rand int @x ] == @x[ rand(1) * @x ]
: >
: > guaranteeing a uniform distribution unless adverbial modifiers are
: > used.
The hard part being to pick a r
--- Dave Whipp <[EMAIL PROTECTED]> wrote:
> rand(@x) == @x.rand == @x[ rand int @x ] == @x[ rand(1) * @x ]
>
> guaranteeing a uniform distribution unless adverbial modifiers are
> used.
Meaning I can do:
$avg_joe = rand @students :bell_curve;
?
=Austin
"Ph. Marek" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thursday 08 July 2004 05:25, Larry Wall wrote:
> > : say @x[rand]; # how about now?
> >
> > Well, that's always going to ask for @x[0], which isn't a problem.
> > However, if you say rand(@x), it has to calculate the numb
Ph. Marek wrote:
On Thursday 08 July 2004 05:25, Larry Wall wrote:
: say @x[rand]; # how about now?
Well, that's always going to ask for @x[0], which isn't a problem.
However, if you say rand(@x), it has to calculate the number of
elements in @x, which could take a little while...
I'd expect to be
On Thursday 08 July 2004 05:25, Larry Wall wrote:
> : say @x[rand]; # how about now?
>
> Well, that's always going to ask for @x[0], which isn't a problem.
> However, if you say rand(@x), it has to calculate the number of
> elements in @x, which could take a little while...
I'd expect to be rand(@
> On Wed, Jul 07, 2004 at 11:50:16PM -0400, JOSEPH RYAN wrote:
>
> To answer the latter first, rand (with no arguments) returns a number
> greater than or equal to 0 and less than 1 which when used as an index
> into an array gets turned into a 0.
>
> As to why the second pop would take forever, I
On Wed, Jul 07, 2004 at 11:50:16PM -0400, JOSEPH RYAN wrote:
>
>
> - Original Message -
> From: Larry Wall <[EMAIL PROTECTED]>
> Date: Wednesday, July 7, 2004 11:25 pm
> Subject: Re: push with lazy lists
>
> > On Fri, Jul 02, 2004 at 09:32:07PM -0500, D
- Original Message -
From: Larry Wall <[EMAIL PROTECTED]>
Date: Wednesday, July 7, 2004 11:25 pm
Subject: Re: push with lazy lists
> On Fri, Jul 02, 2004 at 09:32:07PM -0500, Dan
Hursh wrote:
> : how 'bout
> :
> : @x = gather{
> : loop{
> : take
On Fri, Jul 02, 2004 at 09:32:07PM -0500, Dan Hursh wrote:
: how 'bout
:
: @x = gather{
: loop{
: take time
: }
: } # can this be @x = gather { take time loop }
: push @x, "later";
: say pop @x;# "later"
Can probably be made to work right.
: say pop @x;# heat death?
Ye
- Original Message -
From: Dan Hursh <[EMAIL PROTECTED]>
Date: Friday, July 2, 2004 10:32 pm
Subject: Re: push with lazy lists
>> Joseph Ryan wrote:
> I guess that's true with X..Y lazy lists. I
thought there were
> other
> ways to make lazy lists, like giv
Joseph Ryan wrote:
The way I understand the magicness of lazy lists, I'd expect:
@x = 3..Inf;
say pop @x; # prints Inf
@x = 3..Inf;
push @x, 6; # an array with the first part being
# lazy, and then the element 6
say pop @x; # prints 6
say pop @x; # prints Inf
say pop @x; # prints Inf
- Original Message -
From: Dan Hursh <[EMAIL PROTECTED]>
Date: Friday, July 2, 2004 2:23 pm
Subject: push with lazy lists
> Hi,
>
> If I can assume:
>
> @x = 3..5;
> say pop @x;# prints 5
>
> @x = 3..5;
> push @x, 6;
Hi,
If I can assume:
@x = 3..5;
say pop @x;# prints 5
@x = 3..5;
push @x, 6;
say pop @x;# prints 6
say pop @x;# prints 5
What should I expect for the following?
@x = 3..Inf;
say pop @x;# heat death?
32 matches
Mail list logo