> >--- 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
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Larry Wall) wrote:
>On Tue, Jun 29, 2004 at 10:52:34AM -0500, Jonathan Scott Duff wrote:
>: :u0 # use bytes (. is byte)
>: :u1 # level 1 support (. is codepoint)
>: :u2 # level 1 support (.
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 Tue, 13 Jul 2004, Larry Wall wrote:
> On Tue, Jul 13, 2004 at 07:24:55AM -0600, Luke Palmer wrote:
> : But in Perl 6, you don't have to specify things like that through the
> : mode string: you can specify them through named parameters:
> :
> : my $fh = open ">$filename" :excl;
>
> While tha
Larry Wall skribis 2004-07-13 14:04 (-0700):
> The combined form is definitely problematic in various ways, and we haven't
> really redesigned open yet, since we haven't got to A29 yet. :-)
Well, open being much like IO::All::io would really make me happy.
That is:
my $fh = open 'foo.txt';
On Tue, Jul 13, 2004 at 09:25:52PM +0200, Juerd wrote:
: Luke Palmer skribis 2004-07-13 7:24 (-0600):
: > But in Perl 6, you don't have to specify things like that through the
: > mode string: you can specify them through named parameters:
: > my $fh = open ">$filename" :excl;
:
: I was hopin
Luke Palmer skribis 2004-07-13 10:28 (-0600):
> for outer(1..3, 4..6) -> $x, $y {
> say "$x,$y";
> }
> 1,4
> 1,5
> 1,6
> 2,4
> 2,5
> 2,6
> 3,4
> 3,5
> 3,6
So outer is somewhat like {} in shell globs?
perl -le'print for glob "{1,2,3},{4,5,6}"'
Luke Palmer skribis 2004-07-13 7:24 (-0600):
> But in Perl 6, you don't have to specify things like that through the
> mode string: you can specify them through named parameters:
> my $fh = open ">$filename" :excl;
I was hoping we could finally get rid of mode characters, and especially
combi
On Tue, Jul 13, 2004 at 10:41:32AM -0700, Austin Hastings wrote:
: --- Larry Wall <[EMAIL PROTECTED]> wrote:
: > While that probably works, I think better style would be to use a
: > comma:
: >
: > my $fh = open ">$filename", :excl;
: >
: > That explicitly passes :excl to open as a term in a
--- Larry Wall <[EMAIL PROTECTED]> wrote:
> While that probably works, I think better style would be to use a
> comma:
>
> my $fh = open ">$filename", :excl;
>
> That explicitly passes :excl to open as a term in a list rather
> than relying on the magical properties of :foo to find the preced
On Tue, Jul 13, 2004 at 07:24:55AM -0600, Luke Palmer wrote:
: But in Perl 6, you don't have to specify things like that through the
: mode string: you can specify them through named parameters:
:
: my $fh = open ">$filename" :excl;
While that probably works, I think better style would be to
--- Michele Dondi <[EMAIL PROTECTED]> wrote:
> On Tue, 13 Jul 2004, Austin Hastings wrote:
>
> > Using google(+perl6 +"cartesian product") would have led you to the
> > conclusion that this is already included. I hope this is horribly
> > wrong, since the syntax is a little bewildering.
> [...]
>
Jonathan Scott Duff writes:
> On Tue, Jul 13, 2004 at 03:31:57PM +0200, Michele Dondi wrote:
> > Put more clearly, it is now common to see things like:
> >
> > for my $x (1..10) {
> > for my $y (5..20) {
> > for my $text (qw/foo bar baz/) {
> > do_stgh_with $x, $y, $text;
>
Michele Dondi writes:
> On Tue, 13 Jul 2004, Michele Dondi wrote:
>
> > I rather have a much "bigger" wish for an open-like operator that to be
>
>
> Of course that should be "function".
>
> > I'm thinking of an operator that returns
On Tue, 13 Jul 2004, Austin Hastings wrote:
> Using google(+perl6 +"cartesian product") would have led you to the
> conclusion that this is already included. I hope this is horribly
> wrong, since the syntax is a little bewildering.
[...]
> See Luke Palmer's "Outer product considered useful" post:
On Tue, 13 Jul 2004, Jonathan Scott Duff wrote:
> > I rather have a much "bigger" wish for an open-like operator that to be
> > fair I would like to see *also* in Perl5: nothing that one can do in well
> > more than one way in any case (also including creating a module that will
^^
On Tue, Jul 13, 2004 at 03:31:57PM +0200, Michele Dondi wrote:
> Put more clearly, it is now common to see things like:
>
> for my $x (1..10) {
> for my $y (5..20) {
> for my $text (qw/foo bar baz/) {
> do_stgh_with $x, $y, $text;
> }
> }
> }
>
> and it
--- Michele Dondi <[EMAIL PROTECTED]> wrote:
> I apologize in advance for posting yet another "suggestion" without
> having full knowledge of all apocalypses, and I fear (for a very
> positive meaning of "fear") that the answer will be: "but that is
> already available".
Using google(+perl6 +"c
On Tue, Jul 13, 2004 at 03:41:54PM +0200, Michele Dondi wrote:
> On Tue, 13 Jul 2004 [EMAIL PROTECTED] wrote:
>
> > I have a wish for Perl 6. I would like if the open-funktion
> > opens only a file if it doesn't exist.
> > Of course, I can first test if the file exist.
>
> I rather have a much
On Tue, 13 Jul 2004, Michele Dondi wrote:
> I rather have a much "bigger" wish for an open-like operator that to be
Of course that should be "function".
> I'm thinking of an operator that returns a "magical" FH working like the
On Tue, 13 Jul 2004 [EMAIL PROTECTED] wrote:
> I have a wish for Perl 6. I would like if the open-funktion
> opens only a file if it doesn't exist.
> Of course, I can first test if the file exist.
I rather have a much "bigger" wish for an open-like operator that to be
fair I would like to see
I apologize in advance for posting yet another "suggestion" without having
full knowledge of all apocalypses, and I fear (for a very positive
meaning of "fear") that the answer will be: "but that is already
available".
Well, the point is that I wonder wether Perl6 will support cartesian
produc
Luke Palmer writes:
> Hans Ginzel writes:
> > Hello,
> >
> >I am missing, in Perl5, some shortcut for matching not whole word,
> > e.g.:
> >
> > /^--v(?:e(?:r(?:s(?:i(?:on?)?)?)?)?)?$/
> >
> > Would there be something in Perl6?
>
> Well, I don't think there's an *exact* substitute f
[EMAIL PROTECTED] writes:
>Hello,
>
> I have a wish for Perl 6. I would like if the open-funktion
> opens only a file if it doesn't exist.
> Of course, I can first test if the file exist.
>
> if (-e $filename)
> { print "file already exists!"; }
> else
> { open (FH, ">$filename") }
Hans Ginzel writes:
> Hello,
>
>I am missing, in Perl5, some shortcut for matching not whole word,
> e.g.:
>
> /^--v(?:e(?:r(?:s(?:i(?:on?)?)?)?)?)?$/
>
> Would there be something in Perl6?
Well, I don't think there's an *exact* substitute for that maximally
efficient pattern (b
> > > my $newfile = "$str.subst(rx|\.\w+$|, '')\.bin";
>
>But what about the value of $str after interpolation?
> In shall it stays it's original value! I would often need,
> to use a little modified value of $str for a particular expression.
> I like the way shell does it, to be able
Hello,
I am missing, in Perl5, some shortcut for matching not whole word,
e.g.:
/^--v(?:e(?:r(?:s(?:i(?:on?)?)?)?)?)?$/
Would there be something in Perl6?
For Perl5 I suggest somenthing like this /--v(?-ersion)$/
Best regards
On Fri, Jul 09, 2004 at 05:02:48PM +0100, Jonathan Worthington wrote:
> > >Are there plans in Perl 6 for string modifiers?
> > Not exactly. But method calls can be interpolated into strings, so most
> > > As they are in bash eg.:
> > > ${var%glob_or_regexp}
> > > ${var%%glob_or_regexp}
> >
> >
Hello,
I have a wish for Perl 6. I would like if the open-funktion
opens only a file if it doesn't exist.
Of course, I can first test if the file exist.
if (-e $filename)
{ print "file already exists!"; }
else
{ open (FH, ">$filename") }
My suggestion is to have a character for t
30 matches
Mail list logo