Re: Simple Print/Say Question

2006-05-24 Thread Larry Wall
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

Re: Simple Print/Say Question

2006-05-24 Thread A. Pagaltzis
my %buckets = ( w => { count => 4, scale => 10.5, }, x => { count => 6, scale => 7, }, y => { count => 12, scale => 3, }, z => { count => 18,

Re: Simple Print/Say Question

2006-05-24 Thread Chris Yocum
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

Re: Simple Print/Say Question

2006-05-24 Thread Martin Kjeldsen
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"'

Re: Simple Print/Say Question

2006-05-24 Thread A. Pagaltzis
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

Re: Simple Print/Say Question

2006-05-24 Thread Martin Kjeldsen
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

Re: Simple Print/Say Question

2006-05-24 Thread Daniel Hulme
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

Re: Simple Print/Say Question

2006-05-24 Thread A. Pagaltzis
* 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

Re: Simple Print/Say Question

2006-05-24 Thread A. Pagaltzis
* 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,

Re: Simple Print/Say Question

2006-05-24 Thread Steffen Schwigon
"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

Re: Simple Print/Say Question

2006-05-24 Thread A. Pagaltzis
* 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

Re: Simple Print/Say Question

2006-05-24 Thread Steffen Schwigon
"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

Re: Simple Print/Say Question

2006-05-24 Thread Jonathan Scott Duff
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

RE: (Existing) Perl 6 Wiki: (http://perl.net.au/wiki/Perl_6)

2006-05-24 Thread Conrad Schneiker
> 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

Re: (Existing) Perl 6 Wiki: (http://perl.net.au/wiki/Perl_6)

2006-05-24 Thread Michael Mathews
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

Re: Simple Print/Say Question

2006-05-24 Thread Ovid
- 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;

eval

2006-05-24 Thread Gabor Szabo
if eval "command" fails, where can I get the error message ? aka $@ in P5 ? Gabor

Re: Simple Print/Say Question

2006-05-24 Thread Ovid
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

Re: (Existing) Perl 6 Wiki: (http://perl.net.au/wiki/Perl_6)

2006-05-24 Thread Michael Mathews
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

Re: eval

2006-05-24 Thread Yuval Kogman
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

Re: Simple Print/Say Question

2006-05-24 Thread A. Pagaltzis
* 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

Re: Simple Print/Say Question

2006-05-24 Thread A. Pagaltzis
* 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

3 Good Reasons...

2006-05-24 Thread Michael Mathews
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

Re: 3 Good Reasons...

2006-05-24 Thread Daniel Hulme
> 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

Re: 3 Good Reasons...

2006-05-24 Thread Ovid
- 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

Re: 3 Good Reasons... (typo alert!)

2006-05-24 Thread Ovid
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

Re: 3 Good Reasons...

2006-05-24 Thread Michael Mathews
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

Re: perl 6 hosting?

2006-05-24 Thread David Cantrell
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

Re: 3 Good Reasons...

2006-05-24 Thread Michael Mathews
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

Re: 3 Good Reasons...

2006-05-24 Thread A. Pagaltzis
* 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

Logic Programming for Perl6 (Was Re: 3 Good Reasons... (typo alert!))

2006-05-24 Thread David Romano
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

Re: Simple Print/Say Question

2006-05-24 Thread Larry Wall
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

Re: eval

2006-05-24 Thread Larry Wall
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

Re: perl 6 hosting?

2006-05-24 Thread Gabor Szabo
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

Fwd: eval

2006-05-24 Thread Michael Mathews
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