Oh "try"! I like that! But is CATCH implemented in pugs? Anyone care
to give a working example of try/CATCH?
--michael
On 25/05/06, Yuval Kogman <[EMAIL PROTECTED]> wrote:
To complement string eval with eval { } (now called try):
try {
die "foo";
} or say "error
On 5/25/06, David Cantrell <[EMAIL PROTECTED]> wrote:
I might be able to host a virtual machine with perl6 on it and give out
accounts. I need to think about how to stop people being naughty
though.
Probably the easy part is to to remove the most dangerous calls such as
eval and system and the
On Wed, May 24, 2006 at 06:54:53PM +0300, Gabor Szabo wrote:
: if eval "command" fails, where can I get the error message ?
:
: aka $@ in P5 ?
All error variables have been unified into $!, so it should show up there.
Larry
On Wed, May 24, 2006 at 11:43:59AM +0100, Daniel Hulme wrote:
: shouldn't the >>*<< be >>* as the right-hand operand is a scalar?), then
It used to be like that once upon a time, but we later changed it
so infix operators are always written with "hypers" on both sides,
and only the prefix and post
Hi Ovid,
On 5/24/06, Ovid <[EMAIL PROTECTED]> wrote:
As an aside for those who, like me, wanted to see support for logic
programming: the only significant disappoinment I have with Perl6 is also,
oddly enough, accompanied by a sigh of relief. Perl6 will easily support
imperative, functional
* Michael Mathews <[EMAIL PROTECTED]> [2006-05-25 00:45]:
> Is there something in Perl 6 akin to a "use strict" switch that
> will apply the straightjacket some projects need, and thus
> force typing of all variables. (Then I could have a good
> comeback for those damned Java guys.)
It’s called Co
Thanks for that Ovid. I agree that any language must stand on it's
merits in the long-term, but there is an undeniable "hump" every new
language must get over to convince people it's worth trying in the
first place.
From your excellent summary I think speed, CLR and real OO should
definitely ma
On Tue, May 23, 2006 at 06:29:06PM +0100, Michael Mathews wrote:
> Um, yes anyone wanna work on a tryperl6 virtual shell?
I might be able to host a virtual machine with perl6 on it and give out
accounts. I need to think about how to stop people being naughty
though.
--
David Cantrell | top
Ah, perfect example Daniel. I know people say things like "Java is
better for big projects because of the strictness of it's typing". I
respond that Perl isn't intrinsically sloppy if you practice good
coding, it just doesn't straightjacket you into that all the time.
So here's Perl 6 and it has
Sheesh. I type things too fast and then I see the horrifying typos I've made
(blush)
- Original Message
From: Ovid <[EMAIL PROTECTED]>
> do things that is hard to do in other languages.
"do things that *are* hard to do in other languages"
> Perl6 not only fixes a lot of that cruft bu
- Original Message
From: Michael Mathews <[EMAIL PROTECTED]>
> So my question to the list is, in simple terms even an IT manager
> could grasp, explain what problems Perl 5 has that Perl 6 fixes, such
> that they would want to undergo the pain of ever switching.
Hi Michael,
Many comp
> what problems Perl 5 has that Perl 6 fixes
A type system to die for.
I think that is enough of a win on its own that mentioning any of the
other features will only muddy the issue :->
--
"The fact that some geniuses were laughed at does not imply that all who
are laughed at are geniuses. The
Open Question:
I realise I haven't kept up with every detail since the Perl6 RFC I
submitted way back in August 2000, but boy was I surprised to find,
now that I can actually use Perl6, it isn't just an improvement to
Perl (5), it's actually a "different language" (I'm quoting Michael
Schwern the
* Steffen Schwigon <[EMAIL PROTECTED]> [2006-05-24 15:05]:
> "A. Pagaltzis" <[EMAIL PROTECTED]> writes:
> > Err I think you misread my mail. I meant that the code
> > modifies the hash, but does nothing to modify the reference,
> > so there is no need to make the reference read-write.
>
> In my un
* Ovid <[EMAIL PROTECTED]> [2006-05-24 18:00]:
> First off, thanks to Aristotle for clearing some of my
> thinking.
NP, it’s a good way for me to pick up the disparate Perl 6 clues
I picked up haphazardly over time, too.
> In my version of Pugs (6.2.11 (r10390)), that fails for two
> reasons, bot
On Wed, May 24, 2006 at 19:54:53 +0300, Gabor Szabo wrote:
> if eval "command" fails, where can I get the error message ?
>
> aka $@ in P5 ?
$!
http://dev.perl.org/perl6/doc/design/syn/S04.html#Exception_handlers
--
Yuval Kogman <[EMAIL PROTECTED]>
http://nothingmuch.woobling.org 0xEBD2741
As a competing suggestion, how about...
http://pugs.kwiki.org/?perl6
I'm not really set on any option as long as it works and makes sense
to everyone, including those outside this list. I probably missed it,
but could you give the stated purpose for the wiki again, as I think a
reminder (for m
First off, thanks to Aristotle for clearing some of my thinking.
- Original Message
From: A. Pagaltzis <[EMAIL PROTECTED]>
>my %buckets = (
>w => {
>count => 4,
>scale => 10.5,
> },
>);
>
>for %buckets.values -> $arg_for {
>$ar
if eval "command" fails, where can I get the error message ?
aka $@ in P5 ?
Gabor
- Original Message
From: Jonathan Scott Duff <[EMAIL PROTECTED]>
> pushes an array reference onto @results (rather than things that are
> int). If you're going to type @results, maybe it needs to be:
>
> my @results is Array of Array of int;
>
> or maybe
>
> my Array of int @results;
Hi Conrad,
It's only an issue of coordination and findability. But that question
depends on what the intended purpose of the wiki would be. For example
there is nothing stopping anyone (including members of this list) from
creating and populating pages on www.wikipedia.org about Perl6 and
this us
> From: Michael Mathews
>
> I for one, think a Perl6-users wiki would be extremely useful, I'm
> just not sure why a site that distinguishes itself as "a portal for
> the Australian and New Zealand Perl community" makes the most sense
I was only thinking of the availability of an existing Perl 6
My two cents ...
On Wed, May 24, 2006 at 10:52:29AM +0200, A. Pagaltzis wrote:
> my int @results;
The above line says that @results is an array of integers, but ...
> @results.push( [$i, $j, $k, $l] );
pushes an array reference onto @results (rather than things that are
int). If you're
"A. Pagaltzis" <[EMAIL PROTECTED]> writes:
> * Steffen Schwigon <[EMAIL PROTECTED]> [2006-05-24 13:55]:
>> "A. Pagaltzis" <[EMAIL PROTECTED]> writes:
>> > * Martin Kjeldsen <[EMAIL PROTECTED]> [2006-05-24 12:25]:
>> >> I understand this as the hash entry with key 'array' get
>> >> assigned a array
* Steffen Schwigon <[EMAIL PROTECTED]> [2006-05-24 13:55]:
> "A. Pagaltzis" <[EMAIL PROTECTED]> writes:
> > * Martin Kjeldsen <[EMAIL PROTECTED]> [2006-05-24 12:25]:
> >> I understand this as the hash entry with key 'array' get
> >> assigned a array consisting of $count number multiplied by
> >> $s
"A. Pagaltzis" <[EMAIL PROTECTED]> writes:
> * Martin Kjeldsen <[EMAIL PROTECTED]> [2006-05-24 12:25]:
>> I understand this as the hash entry with key 'array' get
>> assigned a array consisting of $count number multiplied by
>> $scale. If that is right, we must be modifying $arg_for
>> (%buckets) s
* Daniel Hulme <[EMAIL PROTECTED]> [2006-05-24 12:45]:
> > $arg_for = [ ( 0 .. $arg_for ) »*« $arg_for ];
>
> btw, shouldn't the >>*<< be >>* as the right-hand operand is a
> scalar?
I don’t know. S03 says:
| If either argument is insufficiently dimensioned, Perl
| "upgrades" it:
|
| (3,8,
* Martin Kjeldsen <[EMAIL PROTECTED]> [2006-05-24 12:25]:
> I understand this as the hash entry with key 'array' get
> assigned a array consisting of $count number multiplied by
> $scale. If that is right, we must be modifying $arg_for
> (%buckets) since we are adding an entry to the hash.
$arg_fo
Wrt your second problem, if this
> $arg_for = [ ( 0 .. $arg_for ) »*« $arg_for ];
is not rw so is not actually adding the entry to the hash (btw,
shouldn't the >>*<< be >>* as the right-hand operand is a scalar?), then
it is possible that
> > > And then I get an error telling me 'No such method in
Hi Aristotle,
A. Pagaltzis (12:12 2006-05-24):
> Hi Martin,
>
> * Martin Kjeldsen <[EMAIL PROTECTED]> [2006-05-24 11:50]:
> > Just curious does this actually run? I'm trying on pugs 6.2.11
> > and it complains quite a bit. First of all shouldn't
> >
> > for %buckets.values -> $arg_for
> >
> > b
Hi Martin,
* Martin Kjeldsen <[EMAIL PROTECTED]> [2006-05-24 11:50]:
> Just curious does this actually run? I'm trying on pugs 6.2.11
> and it complains quite a bit. First of all shouldn't
>
> for %buckets.values -> $arg_for
>
> be
>
> for %buckets.values -> $arg_for is rw
>
> since $arg_for
Just curious does this actually run? I'm trying on pugs 6.2.11 and it complains
quite a bit. First of all shouldn't
for %buckets.values -> $arg_for
be
for %buckets.values -> $arg_for is rw
since $arg_for is modified?
And then I get an error telling me 'No such method in class Scalar: "&kv"'
Hi Everyone,
I never thought that my little script would get such loving
attention least of all from such distinguished members of the
community. It took me a little while to understand exactly what was
going on but now that I do, it looks very good.
Thank you again! It has been very ins
my %buckets = (
w => {
count => 4,
scale => 10.5,
},
x => {
count => 6,
scale => 7,
},
y => {
count => 12,
scale => 3,
},
z => {
count => 18,
You should not need "my" on the right side of a ->. Also, you should
be able to write $arg_for for constant subscripts.
Larry
On Tue, May 23, 2006 at 05:32:22PM -0700, Ovid wrote:
: Er, and the first loop is better written as this:
:
: for %buckets.values -> my $arg_for {
: for 0 .. $ar
35 matches
Mail list logo