On Fri, 18 Mar 2005 00:20:57 -0500, Uri Guttman [EMAIL PROTECTED] wrote:
LW == Larry Wall [EMAIL PROTECTED] writes:
LW oct and hex are arguably misnamed, since most functions are named by
LW what they produce, not by what they take as input. I don't know what
LW the replacement
I suppose, generally ignore most of my last comments as they seem to
be ill-informed.
There's just one thing I need to know that will make everything clear:
Does 'return' always impose a scalar context on its arguments? Has
this been decided for sure, or is it still under debate?
If it does,
I was just informed by IRC that 'return' propagates the context of the caller.
If that's the case, then we can just drop this discussion, problems solved.
Sorry for wasting your time.
-- Darren Duncan
At 12:07 AM -0800 3/18/05, Darren Duncan wrote:
I suppose, generally ignore most of my last
Test::Inline 2.00_01 has been uploaded to CPAN.
Rough Status
- API documentation should be quite thorough
- User/Tutorial stuff is insufficient
- Adding files/dir is not as easy as it should be
- No support for =for
- As a standalone module, it's a bit too class-centric, needs to be a
bit more
# New Ticket Created by Nick Glencross
# Please include the string: [perl #34476]
# in the subject line of all future correspondence about this issue.
# URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34476
---
osname= linux
osvers= 2.4.21-14.elsmp
arch= i386-linux-thread-multi
cc=
On Thu, Mar 17, 2005 at 11:46:52PM +0200, Yuval Kogman wrote:
I think this should mean $_, and if the user really really really
wants to do .foo on the invocant, then why not just say:
method bar ($_:) {
.foo;
}
Because $_ can change.
method bar ($_:) {
hi, all
is there any way to import constants from other modules without
specifying scope everytime?
such like this:
module A;
use constant { PI = 3.14, VER = 1.1 }
...
module B;
my $var = A::PI; # this way is fine when A is 'short' or rare
imagination
module C;
use constant tag {
[ Sorry if my replies to this thread have seemed a little disjoint. I just
realized I'd unsubscribed myself from p6l last year when I started a $job$
and never resubscribed. So I'd only been seeing fragments of the
conversation. Catching up from the archives...
]
Larry's idea of making
Larry Wall skribis 2005-03-17 21:06 (-0800):
oct and hex are arguably misnamed, since most functions are named by
what they produce, not by what they take as input. I don't know what
the replacement should be, though. Maybe it's not worth fixing.
+0x$_ # hex
+0o$_ # oct
+0b$_ # bin (does
Michael G Schwern skribis 2005-03-17 14:42 (-0800):
Because $_ can change.
method bar ($_:) {
.foo;
map { .baz } 1..10; # whoops
}
The problem here is not specific to methods.
It is generic to all nested uses $_. We used to see this mostly with
François PERRAD [EMAIL PROTECTED] wrote:
In his Wiki
(http://wiki.kn.vutbr.cz/mj/index.cgi?Build%20Parrot%20with%20MinGW),
Michal Juroz lists 3 ways for building Parrot :
1) Build Parrot with MinGW, MSYS and MSYS-DTK
2) Build Parrot with MinGW and ActiveState Perl
3) Build Parrot with
Brent 'Dax' Royal-Gordon wrote:
Larry Wall [EMAIL PROTECTED] wrote:
: Cdo filename I'll tackle at the same time as Ceval. It's likely
: staying in some form. I use it from time to time when I'm patching
: together several automation scripts. (Remember that Perl gets used for
: the quick and
From S04:
It is possible to write
while =$*IN - $line {...}
But it won't do what you expect, because unary = does a slurp in
scalar context, so $line will contain the entire file.
So I expected this function to slurp the whole
[not directly related to this specific bug report]
On Friday 18 March 2005 00:28, Nick Glencross wrote:
Splicing an intlist seems to segfault.
...
The backtrace is
#0 0x080d5cf2 in list_splice (interpreter=0x98e8008, list=0x9ae7754,
value=0x9aaa3f0, offset=0, count=0) at src/list.c:1997
Larry Wall wrote:
On Thu, Mar 17, 2005 at 10:31:07PM -0600, Rod Adams wrote:
: Aaron Sherman wrote:
: Methods on numeric values (should be defined as pseudo-methods on
: unboxed numbers):
:
:chr
:hex
: oct
:
:
:
: Sigh... well, now I know what Ctrl-Return does in Evolution
On Fri, Mar 18, 2005 at 09:35:59PM +1100, Andrew Savige wrote:
What is the best way in Perl6/Pugs to slurp a file?
You use the slurp() primitive, implemented as r875. :)
Thanks,
/Autrijus/
pgpRvJPSFij0S.pgp
Description: PGP signature
Juerd wrote:
+0x$_ # hex
+0o$_ # oct
+0b$_ # bin (does not exist in Perl 5)
This does require that strings numify the same way literals do, but I
think that's a sane approach anyhow. Now that leading 0 no longer means
the number is octal, I can't think of a good reason to keep the contrast
Nick Glencross [EMAIL PROTECTED] wrote:
Splicing an intlist seems to segfault.
Ah, yep - fixed.
Thanks for reporting,
leo
MD == Matt Diephouse [EMAIL PROTECTED] writes:
MD Uri Guttman [EMAIL PROTECTED] wrote:
LW == Larry Wall [EMAIL PROTECTED] writes:
LW oct and hex are arguably misnamed, since most functions are named by
LW what they produce, not by what they take as input. I don't know what
LW the
--- Autrijus Tang [EMAIL PROTECTED] wrote:
Woot! I'd like to see that program once you finished it. :)
I've written up my experiences at:
http://www.perlmonks.org/?node_id=440685
I'll commit it to examples/golf after feedback is received.
Thanks for all your help!
/-\
Find local movie times
On Fri, 2005-03-18 at 05:42, Rod Adams wrote:
Hmm. maybe we just need a function that loads an entire file and returns
a string of it, then feeds that to eval.
Well, I wasn't getting into the IO stuff, but since you said it, this
crosses a line with many related IO operations. I would call
On Fri, 2005-03-18 at 10:28, Aaron Sherman wrote:
On Fri, 2005-03-18 at 05:42, Rod Adams wrote:
Hmm. maybe we just need a function that loads an entire file and returns
a string of it, then feeds that to eval.
Well, I wasn't getting into the IO stuff, but since you said it, this
On Thu, Mar 17, 2005 at 09:18:45PM -0800, Larry Wall wrote:
On Thu, Mar 17, 2005 at 06:11:09PM -0500, Aaron Sherman wrote:
: Chop removes the last character from a string. Is that no longer useful,
: or has chomp simply replaced its most common usage?
I expect chop still has its uses.
I've
# New Ticket Created by Franois PERRAD
# Please include the string: [perl #34483]
# in the subject line of all future correspondence about this issue.
# URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34483
Following patch on mswin32.pl, I update documentation.
Franois.---
Right. I believe the times one will want to do a method call on $_ when it
is *not* the invocant will be greatly outnumbered by the times when you
want to do a method call on the invocant. Thus adding ambiguity to .method
is not worth it.
I think this boils it all down nicely. It seems
eval read :file(foo)
How about:
eval slurp foo;
Paul Seamons
On Fri, Mar 18, 2005 at 03:27:04PM +0800, Autrijus Tang wrote:
: On Fri, Mar 18, 2005 at 12:25:26AM -0700, Luke Palmer wrote:
: Of course not. infix:Y refers to the infix Y operator, but you need
: the hashy subscript.
:
: So, what is the full name for the operator in the symbol table? :)
On Fri, Mar 18, 2005 at 05:01:50AM -0600, Rod Adams wrote:
: I'll try to come up with something decent, if no one beats me to it.
: Sadly, the C style hex2int, oct2int might be the least confusing, but
: heinously ugly.
Yes, though there are two difficulties right there in the names:
hardwiring
On Fri, Mar 18, 2005 at 08:21:07AM -0500, John Siracusa wrote:
: On 3/18/05 12:18 AM, Larry Wall wrote:
: Autochomping is one of the motivations for switching from while to
: for for the normal line input method, since while might think a
: blank line is false, while for only cares whether the
On Fri, Mar 18, 2005 at 12:00:32PM -0500, John Macdonald wrote:
: Generally when I do this I am not only deleting the character
: from the string, but also moving it to another scaler to use;
: so substr isn't a simple replacement because you'd have to
: use it twice.
Well, not lately. There's
On Fri, Mar 18, 2005 at 09:24:43AM -0800, Larry Wall wrote:
[...] And if
chomp is chomping and returning the terminator as determined by the
line input layer, then chimp would have to return the actual line and
leave just the terminator. :-)
With the mnemonic Don't monkey around with my
On Thu, Mar 17, 2005 at 03:59:43PM -0800, Michael G Schwern wrote:
: What it doesn't solve is the $.method vs .method issue. They look similar
: but one works on the invocant and one works on $_. Still a trap.
Yes, and that's probably the killer of the oc idea. So much for
Sleep Brain, heh,
On Fri, 18 Mar 2005 11:27:56 +0100, Juerd [EMAIL PROTECTED] wrote:
Larry Wall skribis 2005-03-17 21:06 (-0800):
oct and hex are arguably misnamed, since most functions are named by
what they produce, not by what they take as input. I don't know what
the replacement should be, though.
John Macdonald wrote:
On Thu, Mar 17, 2005 at 09:18:45PM -0800, Larry Wall wrote:
On Thu, Mar 17, 2005 at 06:11:09PM -0500, Aaron Sherman wrote:
: Chop removes the last character from a string. Is that no longer useful,
: or has chomp simply replaced its most common usage?
I expect chop still
Larry Wall wrote:
On Fri, Mar 18, 2005 at 10:28:18AM -0500, Aaron Sherman wrote:
: Thus:
:
: eval read :file(foo);
:
: There you have it.
The problem being that it will now report errors in some random
temporary string rather than at some line number in a file. Not good.
Orthogonality strikes
Larry Wall writes:
On Fri, Mar 18, 2005 at 03:27:04PM +0800, Autrijus Tang wrote:
: On Fri, Mar 18, 2005 at 12:25:26AM -0700, Luke Palmer wrote:
: Of course not. infix:Y refers to the infix Y operator, but you need
: the hashy subscript.
:
: So, what is the full name for the operator in
Larry Wall wrote:
On Fri, Mar 18, 2005 at 10:28:18AM -0500, Aaron Sherman wrote:
: Thus:
:
: eval read :file(foo);
:
: There you have it.
The problem being that it will now report errors in some random
temporary string rather than at some line number in a file. Not good.
Orthogonality strikes
I noticed this a while ago but forgot to report it.
While Pugs is happy with:
my @tt = (
'x',
'y'
);
it fails on:
my @tt = (
'x',
'y',
);
with the following error message:
unexpected )
expecting term
NonTerm SourcePos a.p6 4 1
I assume a trailing comma in such cases should
On Sat, Mar 19, 2005 at 02:49:31PM +1100, Andrew Savige wrote:
it fails on:
my @tt = (
'x',
'y',
);
[...]
I assume a trailing comma in such cases should be treated like p5
and ignored.
It should be. I just noticed this recently too (r818+819 are simple
tests for it).
There's
39 matches
Mail list logo