Consider this code:
if (specific_condition())
{
if (detail())
{
act();
}
}
elsif (general_condition())
{
act();
}
Logically, this turns into:
if ((my $sc = specific_condition()) && detail())
|| (!$sc && general_condition())
{
act();
}
Both look
Austin Hastings wrote:
Both look horrible, of course. I'd like to rewrite them as
if (specific_condition() :: && detail()) || general_condition()
{
act();
}
so that if specific_condition() succeeded, it would cause the entire
expression to fail if detail() failed.
The use of :: comes, o
> All you really need is:
>
> if ( specific_condition() ? detail() : general_condition() )
Oops! That's the Perl 5 version. In Perl 6, of course, it's:
if ( specific_condition() ?? detail() :: general_condition() )
Which means you *do* get to use the :: after all!
(Just not where you mi
> -Original Message-
> From: Damian Conway [mailto:[EMAIL PROTECTED]
>
> > Since paren's aren't required with keywords, can they still serve as rex
> > delimiters?
>
> No. For other syntactic reasons parens aren't allowed as rule
> delimiters at all. And only /.../ delimit "raw" matches. Ev
[EMAIL PROTECTED] (Austin Hastings) writes:
> > if (specific() ?? detail1() && detail2() :: general()) {...}
>
> For some value of "correct" I suppose. Using ??:: within an if/else context
> makes my skin crawl, stylistically. :-(
Ah, then use if!
if (if(specific()) { detail() } else { ge
I am considering dropping support for Perl 5.6 in Devel::Cover. Whilst
Devel::Cover basically works with Perl 5.6.1 and Perl 5.6.2, there are
many parts which are difficult or impossible to implement, leading to
certain constructs which cannot be covered.
I realise that some people, especially th
> I am considering dropping support for Perl 5.6 in Devel::Cover. Whilst
> Devel::Cover basically works with Perl 5.6.1 and Perl 5.6.2, there are
> many parts which are difficult or impossible to implement, leading to
> certain constructs which cannot be covered.
I think something like D::C is pr
Paul Johnson wrote:
I am considering dropping support for Perl 5.6 in Devel::Cover. Whilst
Devel::Cover basically works with Perl 5.6.1 and Perl 5.6.2, there are
many parts which are difficult or impossible to implement, leading to
certain constructs which cannot be covered.
I realise that some pe
--- Paul Johnson <[EMAIL PROTECTED]> wrote:
> I am considering dropping support for Perl 5.6 in Devel::Cover.
> [snip]
> I realise that some people, especially those in a corporate environment
> may not be able to simply upgrade.
That's the problem that I am facing at work. I see from glancing at
Is there any syntactic sugar in IMCC for making a tail call? Right
now, AFAICT, the trick is to do:
.pcc_begin
.arg Foo
.arg bar
.pcc_call sub, P1 # Or whatever the syntax is to get
# the current continuation
.pcc_end
But, looking at the PASM generated by pcc_4
Hi all,
attached is a first working development version of a Stream library.
A stream is a continuous source of strings. A string can be read with the
"read" method.
The stream class has per design no "seek" or "tell" methods. A later version
will support cloning in order to replay the content
Leopold Toetsch <[EMAIL PROTECTED]> writes:
> Piers Cawley <[EMAIL PROTECTED]> wrote:
>
>> When you make a full continuation with clone, can't you chase up its
>> continuation chain and mark its reachable continuations (and only those
>> continuations) as non recyclable? (This is one of the reason
Piers Cawley <[EMAIL PROTECTED]> wrote:
> Well, I ported the following Scheme code to PIR. (The PIR is appended
> to this message...
I've cleaned up the whole freelist handling code now and added your code
as a test, which exposed one more bug: it didn't run with --gc-debug.
That's fixed now too-
Bernhard Schmalhofer <[EMAIL PROTECTED]> wrote:
> I noticed that I couldn't use compound keys for setting values in a
> PerlHash.
> Retrieving values seems to work OK.
Thanks, applied.
leo
Adam Thomason sent the following bits through the ether:
> No troubles here (see the palaeodictyoptera tinderbox). Is procps
> up-to-date? Is NPTL causing different PIDs to show up?
OK, chalk it up to dodgy Fedora in that case. Please do not apply
patch.
Leon
--
Leon Brocard..
Piers Cawley <[EMAIL PROTECTED]> wrote:
> Is there any syntactic sugar in IMCC for making a tail call?
No.
> Right now, AFAICT, the trick is to do:
>.pcc_begin
>.arg Foo
>.arg bar
>.pcc_call sub, P1 # Or whatever the syntax is to get
> # the current continuat
On 04/01/04 Goplat wrote:
> > I read in the FAQ, vis a vis using the .NET instead of writing your own
> > "The .NET VM didn't even exist when we started development, or at least we
> > didn't know about it when we were working on the design. We do now, though
> > it's still not suitable."
[...]
> T
Thanks all, I'll give said paper a read and see if it has the details I'm digging for.
I was already passively aware of the static typing issue, but wondered if there were
others.
kt
From: Paolo Molaro [mailto:[EMAIL PROTECTED]
Sent: Fri 4/2/2004 5:09 AM
To: [
Jerome Quelin wrote:
> Dan Sugalski wrote:
>> That'd be about three to four for the CPU you've got, and when you
>> throw in swapping I can see the compile time for that module hitting
>> 15-20 minutes.
>
> At least. FYI, I ran into the same problem some months ago. I had 128 Mb
> on my P4 1.3GHz
# New Ticket Created by Andy Dougherty
# Please include the string: [perl #28170]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org:80/rt3/Ticket/Display.html?id=28170 >
ALl of the big-endian tinderboxes are currently failing t/pmc/perlnum.t
test 36 (th
The PIR subroutine call syntax
_f()
expands (besides other instructions) to something like:
newsub P0, .Sub, _f
invokecc
I've now hacked together this sequence:
1) a new opcode (in dynoplibs/myops.ops for quick testing)
op pmc_const(out PMC, inlabelconst INT) {
$1 = PCONST($2)->u.key;
Art Haas wrote:
Jerome Quelin wrote:
Dan Sugalski wrote:
That'd be about three to four for the CPU you've got, and when you
throw in swapping I can see the compile time for that module hitting
15-20 minutes.
At least. FYI, I ran into the same problem some months ago. I had 128 Mb
o
On Fri, Apr 02, 2004 at 07:02:52AM -0600, Art Haas wrote:
: Newer GCC releases are _much_ better at compiling this file than older
: releases. GCC-3.3 is better than GCC-3.2, GCC-3.4 is better than GCC-3.3,
: but best of all is GCC-3.5, as it compiles this file in usually less than
: 5 minutes and
K Stol <[EMAIL PROTECTED]> wrote:
>>
> Thanks for your tips, all!
> I just had to be patient with the old computer. It compiles now (eventually)
And if you want fast recompiles (w/o code changes) then install ccache.
,--[ man ccache ]--
| DESCRIPTIO
On Fri, 2004-04-02 at 12:26, Larry Wall wrote:
> Hmm, if it's getting better for you and worse for others [...] it
> might well be that they've performed a miracle.
Actually, they may well just be optimizing that work for memory, rather
than CPU, and could be making some tragic choices with respe
# New Ticket Created by Simon Glover
# Please include the string: [perl #28180]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org:80/rt3/Ticket/Display.html?id=28180 >
When I try to run hello-dwim.imc from examples/assembly/, it dies with:
error:im
# New Ticket Created by Simon Glover
# Please include the string: [perl #28182]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org:80/rt3/Ticket/Display.html?id=28182 >
examples/assembly/thr-primes.imc dies with a segfault. gdb says that it
dies at:
On Fri, Apr 02, 2004 at 03:05:30PM +0100, Simon Cozens wrote:
: [EMAIL PROTECTED] (Austin Hastings) writes:
: > > if (specific() ?? detail1() && detail2() :: general()) {...}
: >
: > For some value of "correct" I suppose. Using ??:: within an if/else context
: > makes my skin crawl, stylistic
On Fri, 2004-04-02 at 10:01, Larry Wall wrote:
> Even an almost purely RPN language
> like Japanese likes to use honorifics and/or a bunch of particles to
> mark the ends of its sentences, yo?
Hai, and it's not just there to help in error reporting. Imagine the
case:
if if if if if ... {.
> -Original Message-
> From: Larry Wall [mailto:[EMAIL PROTECTED]
>
> On Fri, Apr 02, 2004 at 03:05:30PM +0100, Simon Cozens wrote:
> : [EMAIL PROTECTED] (Austin Hastings) writes:
> : > > if (specific() ?? detail1() && detail2() :: general()) {...}
> : >
> : > For some value of "correc
30 matches
Mail list logo