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
the
# New Ticket Created by Chris Dolan
# Please include the string: [perl #60718]
# in the subject line of all future correspondence about this issue.
# URL: 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
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 someone who is
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) returns i.
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.
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
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 lookfeel to have methods on
functions?
The definition of Cchown includes the statement that it's not
available on most system unless you're
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 lookfeel to have methods on
: functions?
:
: The definition of Cchown includes
dpuu wrote:
Question: is it appropriate to P6 lookfeel 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 Cchown includes the statement that it's not
available
On Fri, Nov 21, 2008 at 07:30:08PM +0100, Moritz Lenz wrote:
: For chmod() I could imagine an interface like this:
:
: $file.chmod(:8540);
: $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(:8540);
: $file.chmod( :set, :user = :r :x, :group = :r)
:# both same as 'chmod 540 $file'
:
: $file.chmod( :modifiy, :other =
(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
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
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);
There's (nearly)
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);
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
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;
return($a, $b);
}
my($a, $b) =
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 guess that
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 expected
...and for
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
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
==
---
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)
+++
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:
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
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
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
# New Ticket Created by Moritz Lenz
# Please include the string: [perl #60732]
# in the subject line of all future correspondence about this issue.
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60732
From #perl6 today:
19:33 moritz_ rakudo: my $x = [ 42 ]; say $x0
19:33 p6eval
# New Ticket Created by Carl Mäsak
# Please include the string: [perl #60734]
# in the subject line of all future correspondence about this issue.
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60734
This should output dito twice:
$ ./perl6 -e '{ say $^same; say $same }.(dito)'
Scope
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.
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60732
From
31 matches
Mail list logo