HaloO,
Carl Mäsak wrote:
I expected this to DWIM today:
$ perl6 -e 'my $cl = { "$^name upcased becomes {$^name.uc}" }; say $cl("larry")'
...but it doesn't in Rakudo r32938:
too few arguments passed (0) - 1 params expected
...and for understandable (if not good) reasons: the closure inside
th
# New Ticket Created by Chris Dolan
# Please include the string: [perl #60718]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=60718 >
If you accidentally try to instantiate a class that has not been
defined, but the names
# New Ticket Created by Chris Dolan
# Please include the string: [perl #60716]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=60716 >
This code works in Rakudo rev 32970:
grammar GrammarOne { token foo { 'foo' }; }
g
Will Coleda wrote:
> On Thu, Nov 20, 2008 at 4:12 PM, Will Coleda <[EMAIL PROTECTED]> wrote:
>> On Thu, Nov 20, 2008 at 3:45 PM, Peter Schwenn <[EMAIL PROTECTED]> wrote:
>>> Will Coleda
>>>
>>> You can drop this thread if you like. This is a waste of your time. What I
>>> need to do is to find so
On Thu, Nov 20, 2008 at 4:25 PM, Wolfgang Laun <[EMAIL PROTECTED]> wrote:
> So, calling sqrt with a real < 0, should not come back with a complex
> number.
Again, I think this should depend on context. In Perl5, simply
use'ing "Math::Complex" changes the behavior of sqrt such that
sqrt(-1) return
Reading S16, I was struck by the lack of abstraction over the
underlying Unix API for chown and chmod. Nothing wrong with having the
existing functions lying about in a module that people can "use Unix"
for; but I do feel that the variants in the global namespace should be
more user-friendly.
chow
On Fri, Nov 21, 2008 at 08:44:51AM -0800, dpuu wrote:
: Reading S16, I was struck by the lack of abstraction over the
: underlying Unix API for chown and chmod. Nothing wrong with having the
: existing functions lying about in a module that people can "use Unix"
: for; but I do feel that the varian
On Nov 21, 9:16 am, [EMAIL PROTECTED] (Larry Wall) wrote:
> Please feel free to whack on the spec
OK, working on it.
Question: is it appropriate to P6 look&feel to have methods on
functions?
The definition of C includes the statement that it's not
available on most system unless you're superuser
On Fri, Nov 21, 2008 at 09:57:30AM -0800, dpuu wrote:
: On Nov 21, 9:16 am, [EMAIL PROTECTED] (Larry Wall) wrote:
: > Please feel free to whack on the spec
:
: OK, working on it.
:
: Question: is it appropriate to P6 look&feel to have methods on
: functions?
:
: The definition of C includes the
dpuu wrote:
> Question: is it appropriate to P6 look&feel to have methods on
> functions?
I don't think that's such a good idea in this case. If a file is
chown'able is not a property of the chown function, but of the file.
> The definition of C includes the statement that it's not
> available on
On Fri, Nov 21, 2008 at 07:30:08PM +0100, Moritz Lenz wrote:
: For chmod() I could imagine an interface like this:
:
: $file.chmod(:8<540>);
: $file.chmod( :set, :user => :r & :x, :group => :r)
:# both same as 'chmod 540 $file'
:
: $file.chmod( :modifiy, :other => :!x)
:# same as
Larry Wall wrote:
> On Fri, Nov 21, 2008 at 07:30:08PM +0100, Moritz Lenz wrote:
> : For chmod() I could imagine an interface like this:
> :
> : $file.chmod(:8<540>);
> : $file.chmod( :set, :user => :r & :x, :group => :r)
> :# both same as 'chmod 540 $file'
> :
> : $file.chmod( :modifiy,
(Sorry if this dbl-posts, sent it from the wrong account the first time)
Hi all, what's wrong with this code:
use v6;
sub multireturn($x, $y)
{
my $a = $x * 2;
my $b = $y * 2;
return($a, $b);
}
my($a, $b) = multireturn(2, 3);
using:
This is Rakudo Perl 6, revision 329
Andy Colson wrote:
Hi all, what's wrong with this code:
use v6;
sub multireturn($x, $y)
{
my $a = $x * 2;
my $b = $y * 2;
return($a, $b);
}
my($a, $b) = multireturn(2, 3);
Nothing that I can see.
using:
This is Rakudo Perl 6, revision 32970 built on parrot 0.8.1-devel
for i486-
Andy Colson wrote:
> (Sorry if this dbl-posts, sent it from the wrong account the first time)
>
> Hi all, what's wrong with this code:
>
> use v6;
>
> sub multireturn($x, $y)
> {
> my $a = $x * 2;
> my $b = $y * 2;
> return($a, $b);
> }
>
> my($a, $b) = multireturn(2, 3);
The
Moritz Lenz wrote:
Andy Colson wrote:
(Sorry if this dbl-posts, sent it from the wrong account the first time)
Hi all, what's wrong with this code:
use v6;
sub multireturn($x, $y)
{
my $a = $x * 2;
my $b = $y * 2;
return($a, $b);
}
my($a, $b) = multireturn(2, 3);
Th
before I attempt to change the POD, would this wording be appropriate?
=item chown
our multi chown (Int $uid, Int $gid, Str|IO [EMAIL PROTECTED])
our multi chown (Str $user, Str $group, Str|IO [EMAIL PROTECTED])
Changes the owner (and/or group) of a list of files. The new
ownership can b
Andy Colson wrote:
> Moritz Lenz wrote:
>> Andy Colson wrote:
>>> (Sorry if this dbl-posts, sent it from the wrong account the first time)
>>>
>>> Hi all, what's wrong with this code:
>>>
>>> use v6;
>>>
>>> sub multireturn($x, $y)
>>> {
>>> my $a = $x * 2;
>>> my $b = $y * 2;
>>> retur
TSa (>):
> I just want to make sure that I got the problem right. Would
>
> my $cl = { "$^name upcased becomes {$^OUTER::name.uc}" };
> say $cl("larry")
>
> work? The idea is that the embedded closure refers to the strings
> $^name. And now the dwimmyness shall make that implicit, right?
I gue
On Fri, Nov 21, 2008 at 08:16:21PM +0100, Moritz Lenz wrote:
> Andy Colson wrote:
> (The thing that's still wrong with your code is that you need a
> whitespace after the 'my', otherwise my(...) should be parsed as a
> function call).
Also this, I think:
> > return($a, $b);
-ryan
On Fri, Nov 21, 2008 at 09:42:41AM +0100, TSa wrote:
> HaloO,
>
> Carl Mäsak wrote:
>> I expected this to DWIM today:
>>
>> $ perl6 -e 'my $cl = { "$^name upcased becomes {$^name.uc}" }; say
>> $cl("larry")'
>>
>> ...but it doesn't in Rakudo r32938:
>>
>> too few arguments passed (0) - 1 params ex
Ryan (>), Moritz (>>), Andy (>>>):
>> (The thing that's still wrong with your code is that you need a
>> whitespace after the 'my', otherwise my(...) should be parsed as a
>> function call).
>
> Also this, I think:
>
>> > return($a, $b);
...except that that _is_ a function call.
// Carl
On Fri, Nov 21, 2008 at 11:46:48AM -0800, dpuu wrote:
: before I attempt to change the POD, would this wording be appropriate?
It's a good first whack, though we might want to think about making
it a little less P5ish/Unixish in changing a list of files, and rely
instead of one of P6's distributio
Author: larry
Date: Fri Nov 21 15:16:01 2008
New Revision: 14607
Modified:
doc/trunk/design/syn/S02.pod
doc/trunk/design/syn/S06.pod
Log:
various clarifications
Modified: doc/trunk/design/syn/S02.pod
==
--- doc/tr
Author: larry
Date: Fri Nov 21 15:40:52 2008
New Revision: 14608
Modified:
doc/trunk/design/syn/S06.pod
Log:
typo
Modified: doc/trunk/design/syn/S06.pod
==
--- doc/trunk/design/syn/S06.pod(original)
+++ doc/t
Hi all, what's wrong with this code:
use v6;
sub multireturn($x, $y)
{
my $a = $x * 2;
my $b = $y * 2;
return($a, $b);
}
my($a, $b) = multireturn(2, 3);
using:
This is Rakudo Perl 6, revision 32970 built on parrot 0.8.1-devel
for i486-linux-thread-multi.
I get:
Method
The restriction of chown to the superuser is a property of the OS, not the
files. The example from the pod is:
use POSIX qw(sysconf _PC_CHOWN_RESTRICTED);
my $can_chown_giveaway = not sysconf(_PC_CHOWN_RESTRICTED);
Thinking about it, perhaps that means that it's a method on $*OS.
The use of fil
Larry Wall wrote:
On Fri, Nov 21, 2008 at 11:46:48AM -0800, dpuu wrote:
: before I attempt to change the POD, would this wording be appropriate?
It's a good first whack, though we might want to think about making
it a little less P5ish/Unixish in changing a list of files, and rely
instead of one
In my ongoing quest to create a PDF parser in Perl6, I have some
Rakudo/PGE/parrot questions. These are low-urgency and some of these
may not be implemented yet...
1) byte orientation
PDF's syntax is inherently an 8-bit ASCII superset. Some subsections
may be interpreted as some multi-by
# New Ticket Created by Moritz Lenz
# Please include the string: [perl #60732]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=60732 >
>From #perl6 today:
19:33 < moritz_> rakudo: my $x = [ 42 ]; say $x<0>
19:33 < p6eval> r
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #60734]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=60734 >
This should output "dito" twice:
$ ./perl6 -e '{ say $^same; say $same }.("dito")'
Scop
On Fri, Nov 21, 2008 at 10:43, via RT Moritz Lenz
<[EMAIL PROTECTED]> wrote:
> # New Ticket Created by Moritz Lenz
> # Please include the string: [perl #60732]
> # in the subject line of all future correspondence about this issue.
> # http://rt.perl.org/rt3/Ticket/Display.html?id=60732 >
>
>
> Fr
32 matches
Mail list logo