--- Larry Wall <[EMAIL PROTECTED]> wrote:
>
> Hmm, maybe that means that language-dependent graphemes are called
> "langs", which I suppose is short for "langemes".
Dangerously close to "legumes", there. Perhaps we could refer to
entities matches by regexes as "peas"...
=Austin
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
On Mon, Jul 12, 2004 at 07:42:02AM +0200, Ph. Marek wrote:
: Of course the file must be opened in binary mode - else the line-endings etc.
: can be destroyed in the binary data, which is bad.
:
: So Perl/Parrot can't autodetect the kind of encoding.
: But maybe it should be possible to do somethi
--- 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
Luke Palmer <[EMAIL PROTECTED]> writes:
> Or, god forbid, a word?
>
> m:base/que mas/
>
> We're not mathematicians: we're allowed to use more than one letter
> in a row to designate something :-)
Well, if it were *me*, *I* would have voted for keeping the core
language 100% pure ASCII, untain
"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
Dan Hursh <[EMAIL PROTECTED]> writes:
> Ouch. I hadn't thought of that. I'm a big fan of litering loops with
>
> discard(),next if dontCareBecause(); # it don't matter here
I like the idea here, but I don't think we need the comma...
> type constructs. I was going to suggest
>
>
--- Juerd <[EMAIL PROTECTED]> wrote:
> Piers Cawley skribis 2004-07-12 12:20 (+0100):
> > method postcircumfix:[] is rw { ... }
>
> Compared to Ruby, this is very verbose.
>
> def [] (key)
> ...
> end
>
> # Okay, not entirely fair, as the Ruby version would also
> # nee
The Perl 6 Summary for the week ending 2004-07-10
Another week down, another summer summary. On a Monday no less. Last
week I even managed to get the summary to the mailing lists before the
Perl 5 Porters summary. I may have been even more surprised that Rafael
by that. Let's see if
Simon Cozens skribis 2004-07-12 12:58 (+0100):
> [EMAIL PROTECTED] (Juerd) writes:
> > Could methods like "[]" and "{}" *default* to "postcircumfix:"?
> A more interesting question is "does it mean anything for them *not* to be
> postcircumfix"?
Not as a method, I think.
> After all, the only oth
[EMAIL PROTECTED] (Juerd) writes:
> Could methods like "[]" and "{}" *default* to "postcircumfix:"?
A more interesting question is "does it mean anything for them *not* to be
postcircumfix"?
After all, the only other use would be "$foo.[]($bar, $baz)", which is
practically identical. Unless you w
Piers Cawley skribis 2004-07-12 12:20 (+0100):
> method postcircumfix:[] is rw { ... }
Compared to Ruby, this is very verbose.
def [] (key)
...
end
# Okay, not entirely fair, as the Ruby version would also
# need []= defined for the rw part.
Could methods like "[]" and
Luke Palmer <[EMAIL PROTECTED]> writes:
> Gautam Gopalakrishnan writes:
>> Hello,
>>
>> I've tried the archives and the 'Perl 6 essentials' book and I can't
>> find anything
>> about string subscripting. Since $a[0] cannot be mistaken for array subscripting
>> anymore, could this now be used to p
[snipped except for essentials :) ]
Book News
New Releases
***Perl 6 an
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(@
Alexey Trofimenko wrote:
I wonder about mixed synax:
%hash = ( :keyÂvalueÂ
:key2ÂvalueÂ
:key3
key4 => 'value',
'key5','value',
Âkey6 value key7 value )
Did I make mistakes here?
That depends. I asked Damian about this a few weeks ago. He said
19 matches
Mail list logo