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
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 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
Hello,
I noticed recently a discusion about *printf*() function.
I wish to be able to specify formating of groups of parameters.
Eg.
printf("Date: %11{%d.%d. %4d}, City: %s\n", $day, $mounth, $year);
Variables $day and $mounth could be one or two digits. There should not
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
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
[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") }
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
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
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
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, 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
--- 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: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
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, 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:
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
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 <[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.
> [...]
>
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
--- 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 Monday 12 July 2004 22:40, Nicholas Clark wrote:
> osname= darwin
> osvers= 7.0
> arch= darwin-thread-multi-2level
> cc= cc
> ---
> Flags:
[...]
> ---
> Summary of my parrot 0.1.0 configuration:
[...]
> ---
> Environment:
[...]
Eh! It looks like parrotbug is working!
*And* that someone i
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
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 08:04:01PM +0200, Jerome Quelin wrote:
> On Monday 12 July 2004 22:40, Nicholas Clark wrote:
> > osname= darwin
> > osvers= 7.0
> > arch= darwin-thread-multi-2level
> > cc= cc
> > ---
> > Flags:
> [...]
> > ---
> > Summary of my parrot 0.1.0 configuration:
> [...]
> >
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}"'
Jerome Quelin <[EMAIL PROTECTED]> wrote:
> On Monday 12 July 2004 22:40, Nicholas Clark wrote:
[ bug report ]
> Eh! It looks like parrotbug is working!
> *And* that someone is using it! :-)
Is that on the resources page in the web or in the README?
Fixes welcome.
And thanks to Jerome for provi
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
# New Ticket Created by TOGoS
# Please include the string: [perl #30694]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org:80/rt3/Ticket/Display.html?id=30694 >
Just a quick little addition to the compiler_faq like
so:
=head2 How am I supposed to imple
hi!
I did some research on GMP and LGPL, the results are attached. I don't know if
this is a go/nogo for GMP, but it is pretty clear now.
Further the FSF asks for perl6/parrot to use Artistic 2.0, what is the discussion
state on that? (RFC 346)
If somebody else wants to talk to FSF please use "
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, 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
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
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 (.
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
> >--- 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
36 matches
Mail list logo