Same-named arguments

2006-08-23 Thread Michael Snoyman
Hi, I'm just starting with Perl 6. I was reading through "Perl 6 and Parrot Essentials" (finally arrived yesterday from Amazon; very happy) and I was wondering what would happen if you had a parameter list that included variables of a different type but the same name (ie, $foo, @foo). I wrote a

Re: Pair of lists => list of pairs?

2006-08-23 Thread Michael Snoyman
: my %h; : [EMAIL PROTECTED] = @v; : : But is there an easy way in Perl6 to do it all in one go? Should this work? : : my %h = @k [=>] @v; Reduce operators only turn infix into list operators. What you really want here is a hyper-fatarrow: my %h = @k »=>« @v; Gaal pointed out using zip

IO::Socket, or any IO

2006-08-24 Thread Michael Snoyman
I was thinking of rewriting a little webserver program I wrote in Perl 5 using Pugs. I was wondering what the equivilent (if any) of IO::Socket is. I suppose I could use an external webserver and use CGI to get this working with IO, but my preference would be a pure Perl 6 approach. If you're wo

Same-named arguments

2006-08-25 Thread Michael Snoyman
I asked this same question on perl6-users, but no one really seemed to have a definitive answer, so please forgive me for reasking. I was wondering how named arguments would work when parameters of different types had the same name, ie sub foo($bar, @bar, &bar) {...}. I wrote a little script to

Re: Same-named arguments

2006-08-27 Thread Michael Snoyman
Mostly, it's that func('&x' => 1) requires a bit too much typing, and also makes it hard for func() to change its signature later on to accept things other than Code. I was discussing this with a friend of mine (Eric Livak), and he suggested making the sigil on the name optional for disambigua

Writing modules

2006-08-28 Thread Michael Snoyman
Hi, I wanted to start working on a module (mainly to learn Perl 6, I doubt anyone would ever want to use it). I want to do this "properly," whatever that means. I was wondering if someone could explain to me: 1) How to construct the Makefile.pl 2) How exactly to set up and run tests I realize

Re: Naming the method form of s///

2006-08-31 Thread Michael Snoyman
> $foo.subst(:g, /bar/, "baz") > i seem to recall $foo.subst(/:g bar/, "baz") is valid syntax already. If I'm not mistaken, the aversion to that syntax- as implied earlier in this thread- was that the :g is really a modifier on the substitution, not on the matching. (Please correct

Re: IO::Socket, or any IO

2006-09-08 Thread Michael Snoyman
same effect, but it seems that fork also isn't available. Was I missing something, or are these just features that I need to wait for? Thanks, Michael On 9/8/06, Audrey Tang <[EMAIL PROTECTED]> wrote: 在 Aug 25, 2006 12:54 AM 時,Michael Snoyman 寫到: > I was thinking of rewriting

CGI Session management (was Re: the CGI.pm in Perl 6)

2006-09-11 Thread Michael Snoyman
If Perl6 CGI.pm is intended to be the successor of the P5 CGI.pm (the quasi-standard for Perl web programming) is should really get a modern design. I agree completely. In that vein, I think that one thing a lot of web developers would like to have available more easily would be session man

Re: HTTP::Request/Response (was Re: the CGI.pm in Perl 6)

2006-09-15 Thread Michael Snoyman
On 9/14/06, Darren Duncan <[EMAIL PROTECTED]> wrote: Having had some prior experience in tackling this problem (eg, CGI::Portable), I will endeavour to work on / help with the Perl 6 analogy to HTTP::Request/Response, so to replace the use of corresponding aspects of CGI.pm. I really like thi

Re: Udates to "Perl 6 and Parrot Essentials"

2006-09-19 Thread Michael Snoyman
I just recently got interested in Perl 6 (within the past two months), and I found that reading the book was a good kick-start. Sure, lots of stuff has changed, but many of the general ideas still seem to hold true. Michael On 9/18/06, Agent Zhang <[EMAIL PROTECTED]> wrote: On 9/19/06, [EMAIL

Re: Udates to "Perl 6 and Parrot Essentials"

2006-09-19 Thread Michael Snoyman
On 9/19/06, Aaron Sherman <[EMAIL PROTECTED]> wrote: Yes, the book is still an OK primer on the high-level concepts, it just needs to be made clear that on both the Parrot and Perl sides, it's quite a bit out of date. Even the names have changed in some cases (e.g. IMCC is now known as PIR).

Re: Perl6 "style-guide"

2006-09-20 Thread Michael Snoyman
On 9/20/06, jerry gay <[EMAIL PROTECTED]> wrote: don't "just leave this to the community." take part! take advantage of the perl 6 wiki (http://rakudo.org/perl6/index.cgi) and create a page describing the task. write some code yourself. ask folks to contribute, and fix the existing code or add t