Re: ICU and Parrot

2002-05-31 Thread Autrijus Tang
On Fri, May 31, 2002 at 06:18:55AM +0900, Dan Kogai wrote: > As a matter of fact GB18030 is ALREADY supported via Encode::HanExtra by > Autrijus Tang. The only reason GB18030 was not included in Encode main > is sheer size of the map. Yes, partly because it was not implemented algori

Re: ICU and Parrot

2002-05-31 Thread Autrijus Tang
On Sat, Jun 01, 2002 at 02:20:15AM +0900, Dan Kogai wrote: > >2) If not, would a Encode::ICU be wise? > I'm not so sure. But if I were the one to implement Encode::ICU, it > will not be just a compiled collection of UCM files but a wrapper to all > library functions that ICU has to offer. I, f

split /(..)*/, 1234567890

2005-05-10 Thread Autrijus Tang
In Pugs, the current logic for array submatches in split() is to stringify each element, and return them separately in the resulting list. To wit: pugs> split /(..)*/, 1234567890 ('', '12', '34', '56', '78', '90') Is this sane? Thanks, /Autrijus/ pgpUZCdoDMPb0.pgp Description: PGP sig

Re: Question about Parrot and Omniscient Debugging

2005-05-10 Thread Autrijus Tang
On Tue, May 10, 2005 at 11:11:12AM -0500, [EMAIL PROTECTED] wrote: > Please excuse the possible 'out of left field' (as we say) aspect of this > question but I recently heard about Omniscient Debugging (ODB): > http://www.lambdacs.com/debugger/debugger.html This seems to require almost the same j

Named rules and basic OO support landed.

2005-05-10 Thread Autrijus Tang
This works: rule name { Larry | Matz | Guido } rule project { Perl | Ruby | Python } rule description { \s does \s } 'Larry does Perl' ~~ //; # true 'Larry does Java' ~~ //; # false This too: class Point { has $.x; has $.y; method show () {

Re: Named rules and basic OO support landed.

2005-05-11 Thread Autrijus Tang
On Wed, May 11, 2005 at 09:19:50AM +0200, Leopold Toetsch wrote: > 2) named access > > x = getattribute o, "Point\0x" > > This needs a full qualified attribute name "Class" ~ NUL ~ "Attribute". > That's unusable for at least Python and probably more HLLs as the > compiler has to know in which c

Re: Nested captures

2005-05-11 Thread Autrijus Tang
On Wed, May 11, 2005 at 08:30:42AM -0700, Larry Wall wrote: > On Wed, May 11, 2005 at 05:48:59PM +1000, Damian Conway wrote: > : But that's only the opinion of one(@Larry), not of $Larry. > > Let's go 0-based and make $0 =:= $/[0] so that $/[] is all the parens. > Our old $0 (P5's $&) could be $<>

Re: Nested captures

2005-05-11 Thread Autrijus Tang
On Wed, May 11, 2005 at 12:01:35PM -0500, Patrick R. Michaud wrote: > Of course, this now begs the question -- where are things stored > after doing ... ? > > rx :perl5 / (don't) (ray) (me) (for solar) / > > My guess is that within the rule they're $1, $2, $3, etc. as before, Within the rule

Re: single element lists

2005-05-11 Thread Autrijus Tang
On Wed, May 11, 2005 at 01:11:45PM -0700, Larry Wall wrote: > On Wed, May 11, 2005 at 11:45:12AM -0500, Jonathan Scott Duff wrote: > : > : We're discussing the proper semantics of (1)[0] on #perl6. Here's > : where we're at so far: > : > : 1. specialise ()[] to parse as (,)[] > : 2. scalars are s

(1,(2,3),4)[2]

2005-05-11 Thread Autrijus Tang
In a somewhat related topic: pugs> (1,(2,3),4)[2] 4 Because the invocant to .[] assumes a Singular context. I'm not sure how any invocant can assume a Plural context anyway, so this behaviour seems correct. Is it, though? :) Thanks, /Autrijus/ pgpQf1TyWmCFa.pgp Description: PGP signat

Re: (1,(2,3),4)[2]

2005-05-11 Thread Autrijus Tang
On Wed, May 11, 2005 at 03:00:15PM -0600, Luke Palmer wrote: > On 5/11/05, Autrijus Tang <[EMAIL PROTECTED]> wrote: > > In a somewhat related topic: > > > > pugs> (1,(2,3),4)[2] > > 4 > > > > Because the invocant to .[] assumes a Singu

Re: single element lists

2005-05-11 Thread Autrijus Tang
On Wed, May 11, 2005 at 02:12:41PM -0700, Larry Wall wrote: > On Thu, May 12, 2005 at 04:19:02AM +0800, Autrijus Tang wrote: > : Hm? Under #2, no matter whether @foo is (1) or (1,2), the construct > : (@foo)[0] would always means @foo.[0]. Not sure how the length of @foo > :

Re: t/oo/class/basic.t path for class Foo::Bar {} failure

2005-05-11 Thread Autrijus Tang
Thanks, both yours and Shillo's tests are applied (and implemented). /Autrijus/ pgpi79NWrtGna.pgp Description: PGP signature

Re: Nested captures

2005-05-11 Thread Autrijus Tang
On Thu, May 12, 2005 at 12:37:06AM +0200, Fagyal Csongor wrote: > Damian Conway wrote: > > >print @array[1st..($n)th]; > > Sounds cool, but what about $n = 0; ? Then it would be 0..-1, an empty range. /Autrijus/ pgpRRkOMafCIK.pgp Description: PGP signature

Re: (1,(2,3),4)[2]

2005-05-11 Thread Autrijus Tang
On Wed, May 11, 2005 at 03:00:15PM -0600, Luke Palmer wrote: > On 5/11/05, Autrijus Tang <[EMAIL PROTECTED]> wrote: > > In a somewhat related topic: > > > > pugs> (1,(2,3),4)[2] > > 4 > > > > Because the invocant to .[] assumes a Singu

Re: small typo in PBC_COMPAT

2005-05-12 Thread Autrijus Tang
On Wed, May 11, 2005 at 06:09:00PM -0400, Dino Morelli wrote: > >Feel free to correct 'no_plan'. I'll happily apply any and all > >patches to the tests, and those with commit privs are welcome > >to directly modify the t/p6rules/*.t files at any time. > > > > Speak of the devil -- I started worki

Re: split /(..)*/, 1234567890

2005-05-12 Thread Autrijus Tang
On Thu, May 12, 2005 at 04:53:06PM +0200, "TSa (Thomas Sandlaï)" wrote: > Autrijus Tang wrote: > >pugs> split /(..)*/, 1234567890 > >('', '12', '34', '56', '78', '90') > > > >Is this sane

[RELEASE] Pugs 6.2.3 released!

2005-05-12 Thread Autrijus Tang
On behalf of the Pugs team, I am delighted to announce the release of Pugs 6.2.3, with Parrot embedding, Perl 6 Rules support (via PGE), an initial sketch of OO system. Multi-thread programming with async/kill/join/detach is now supported as well. Also of note are many new, working modules under

Numification of captured match

2005-05-12 Thread Autrijus Tang
Thit has led to surprising results in Pugs's Net::IRC: if 'localhost:80' ~~ /^(.+)\:(\d+)$/ { my $socket = connect($0, $1); } If $1 is a match object here, and connect() assumes Int on its second argument, then it will connect to port 1, as the match object numifies to 1 (indicati

Re: split /(..)*/, 1234567890

2005-05-12 Thread Autrijus Tang
On Thu, May 12, 2005 at 02:56:37PM -0500, Jonathan Scott Duff wrote: > On Thu, May 12, 2005 at 12:01:59PM -0700, Larry Wall wrote: > > Yes, though I would think of it more generally as > > > > ('', $0, '', $0, '', $0, ...) > > > > where in this case it just happens to be > > > > ('', $0)

Re: split /(..)*/, 1234567890

2005-05-12 Thread Autrijus Tang
On Thu, May 12, 2005 at 08:33:40PM -0400, Rick Delaney wrote: > On Fri, May 13, 2005 at 04:05:23AM +0800, Autrijus Tang wrote: > > pugs> map { ref $_ } split /(..)*/, 1234567890 > > (::Str, ::Array::Const) > > Sorry if I'm getting ahead of the implementatio

Re: split /(..)*/, 1234567890

2005-05-12 Thread Autrijus Tang
On Thu, May 12, 2005 at 08:33:40PM -0400, Rick Delaney wrote: > Sorry if I'm getting ahead of the implementation but if it is returning > $0 then shouldn't ref($0) return ::Rule::Result or somesuch? It would > just look like an ::Array::Const if you treat it as such. ...also note that the $0 here

Re: Remove .cvsignore?

2005-05-13 Thread Autrijus Tang
On Fri, May 13, 2005 at 06:55:12PM +0200, Bernhard Schmalhofer wrote: > As fas as I see, the only place where .cvsignore files are still used, is > tools/dev/manicheck.pl. > If we require 'svn', than we can replace the reading on .cvsignore with > > svn propget svn:ignore > > Is that the right w

The Void type

2005-05-13 Thread Autrijus Tang
On Fri, May 13, 2005 at 07:13:53PM +0200, "TSa (Thomas SandlaÃ)" wrote: > Larry Wall wrote: > >: Void context still exists and is not a form of singular or plural > >: context. Perhaps this should be called nullar context, although void > >: context works equally well for me and is not confusing be

Re: Object Numify/Stringify-ing to Unique values

2005-05-13 Thread Autrijus Tang
On Fri, May 13, 2005 at 07:28:03PM -0700, Larry Wall wrote: > That's what .id is supposed to do, without the bogus numorstringification > semantics. It should return something opaque that matches with ~~. Okay, implemented as such. What does unboxed values return for their "id", though? 3 =

^method ?

2005-05-13 Thread Autrijus Tang
Juerd informed me today that .method should still means $_.method. However, for the OO modules we're writing, there still needs to be a way to invoke methods on the current invocant, when the invocant name has been omitted from the method() declaration. Currently Pugs has: $?SELF.method

The [] metaoperator

2005-05-14 Thread Autrijus Tang
On Sat, May 14, 2005 at 10:56:29PM +1000, Damian Conway wrote: > 8. To verify the monotonicity of a sequence: > >$is_monotonic = [<] @numbers; Hey. Does this mean that the [] metaoperator folds with the associativity of the operator inside it? That is, if the operator inside is

Re: ^method ?

2005-05-15 Thread Autrijus Tang
On Sun, May 15, 2005 at 01:19:53PM +0200, Juerd wrote: > Or was your choice of words poor, and did you not mean to discuss the > dot's *default*, but instead a standard way to write the current > invocant? I think what Rob suggested is that: method ($foo) means method ($self: $foo) by

Re: ./method

2005-05-15 Thread Autrijus Tang
On Sun, May 15, 2005 at 01:44:44PM +0200, Juerd wrote: > I suggest > ./method > to mean $?SELF.method > > Your opinions please! (I ask those who already responded off-list, to > repeat their opinion here) I like it. Tentatively implemented as r3253 for people to experiment with. The convert

Re: ./method

2005-05-15 Thread Autrijus Tang
On Sun, May 15, 2005 at 04:40:04PM +0200, Juerd wrote: > Because of that, it is probably better to go with ./method not have ../method Good. I was having a headache trying to convince myself ../method was a good idea, but can't. Thanks for delivering me. :) /Autrijus/ pgpqGzQIfNY4z.pgp Descri

not 4,3,2,1,0;

2005-05-16 Thread Autrijus Tang
This evaluates to 1 in Perl 5: not 4,3,2,1,0; Namely, the "not" listOp is taking the last of a variadic, non-slurpy argument list, boolify it, and return its negation. What is the Perl 6 signature that correspond to this behaviour? Also, is this still sane for Perl 6's ¬? Thanks, /Autriju

Re: not 4,3,2,1,0;

2005-05-16 Thread Autrijus Tang
On Mon, May 16, 2005 at 12:49:13PM -0700, Larry Wall wrote: > On Tue, May 17, 2005 at 01:48:20AM +0800, Autrijus Tang wrote: > : This evaluates to 1 in Perl 5: > : > : not 4,3,2,1,0; > : > : Namely, the "not" listOp is taking the last of a variadic, non-slurpy &

Re: not 4,3,2,1,0;

2005-05-16 Thread Autrijus Tang
On Mon, May 16, 2005 at 04:06:15PM -0700, Larry Wall wrote: > That's > > sub not (*args is context(Scalar)) > > or whatever we end up calling the Any/Scalar type. How about is context(Item) versus is context(Slurpy). :) Also, shouldn't the *args there be [EMAIL PROTECTED] Is it really okay

Quick question: '1.28' * '2.56'

2005-05-17 Thread Autrijus Tang
Imagine: pugs> '1.28' * '2.56' 3.2768 What is (or should be) going on here here? [1] role NumRole { method infix:<*> returns Num (NumRole $x, NumRole $y: ) { ... } } Str.does(NumRole); [2] multi sub infix:<*> (Str $x, Str $y) returns Num { ... } [3] multi sub prefix:<+>

Re: Multiple colons

2005-05-17 Thread Autrijus Tang
On Tue, May 17, 2005 at 07:00:23AM -0700, Larry Wall wrote: > On Tue, May 17, 2005 at 01:50:48PM +, Luke Palmer wrote: > : Is that still the case? I don't recall us getting rid of it, but it > : doesn't seem to be documented in the AES. > > We didn't get rid of it. So does it mean that a "3-

Re: Parrot as an extension language

2005-05-17 Thread Autrijus Tang
On Tue, May 17, 2005 at 03:00:14PM +0100, Colin Paul Adams wrote: > But when I look at http://www.parrotcode.org/docs/embed.html, I can > see no way of getting information back from the script - not even an > exit code. Is there anyway of doing this that I have missed? You may wish to use Parrot_c

Re: Multiple colons

2005-05-17 Thread Autrijus Tang
On Tue, May 17, 2005 at 07:26:54AM -0700, Larry Wall wrote: > It does seem that the signature that provides more information should > be "rewarded" for that somehow. Maybe it's most useful if non-invocant > args (or non-invocant-YET args, in this case) are just considered to > be at "Any" distance

Re: Multiple colons

2005-05-17 Thread Autrijus Tang
On Tue, May 17, 2005 at 02:45:58PM +, Luke Palmer wrote: > Just for the folks not following along on IRC, I don't think I implied > that. But Autrijus apparently inferred it :-). My apologies. It's a misparse on my part. > Anyway, there is no MMD whatsoever on the final level, so that: > >

Re: Parrot as an extension language

2005-05-17 Thread Autrijus Tang
On Tue, May 17, 2005 at 05:31:32PM +0100, Colin Paul Adams wrote: > I take it SS stands for String-to-String? Yes. "PPC" would stand for PMC -> PMC -> String, i.e. take two PMCs and returns a String. > Which section within http://www.parrotcode.org/docs/ covers this sort > of thing? `perldoc ex

Re: Pugs Windows binaries distribution

2005-05-17 Thread Autrijus Tang
On Tue, May 17, 2005 at 04:37:42PM +0200, Gr嶲oire P嶧n wrote: > First congrats for the advancement on implementing Perl 6, it's impressive. Thanks for your kind words! :-) > I'm the author of PXPerl, a Perl binary distribution for Windows. I > just released a new version, and I added Pugs to it >

Inline::Pugs landed to Pugs tree

2005-05-18 Thread Autrijus Tang
An one-hour hack of mine proved fruitful. This is Perl 5 script, calling into Perl 6 functions defined inline: #!/usr/bin/perl use Inline Pugs => ' sub postfix: { [*] 1..$_ } sub sum_factorial { [+] 0..$_! } '; print sum_factorial(3); # 21 The implementation is in

foo(1: 2: 3: 4:) ?

2005-05-20 Thread Autrijus Tang
So I'm finally starting to implement multi-level invocants in MMDs. I'd like to sanity check some cases first, though. Are these two assumed to be identical? multi sub foo ($x, $y) multi sub foo ($x, $y : ) But these two are _not_ identical? multi sub foo ($x : $y : $z) multi su

Re: Parrot as an extension language

2005-05-20 Thread Autrijus Tang
On Fri, May 20, 2005 at 10:34:39AM +0100, Colin Paul Adams wrote: > I have a problem with this - namely that the function is variadic, and > the interface generator can't cope with this. Hmm, in Haskell FFI, we hard-coded two cases of invocation, treating the function as two distinct, non-variadic

Experimental Coroutine support landed.

2005-05-20 Thread Autrijus Tang
A highly experimental implementation of coroutines has landed to Pugs. The `coro` keyword denotes a coroutine. It may appear at any place where `sub` may appear, i.e. in both named and anonymous forms. I borrowed the semantics from Coro::Cont on CPAN, with the following restriction that you cann

Re: How to compile to PIR or byte codes

2005-05-20 Thread Autrijus Tang
On Fri, May 20, 2005 at 03:13:52PM +0100, Colin Paul Adams wrote: > I am trying to work out how to compile a perl script using pugs. > (Am I on the right mailing list?) Well, yes and no. To run Perl 5 in Parrot, you want the ponie-dev mailing list -- this is perl6-compiler after all. :-) > If I

Re: Parrot as an extension language

2005-05-20 Thread Autrijus Tang
On Fri, May 20, 2005 at 05:42:48PM +0100, Colin Paul Adams wrote: > The problem I'm finding with this, is getting back the returned string > characters. > I assume the void * returned is pointing to a Parrot String. > Certainly it's not a const char *. Yes. > There is a function declaration > Par

Re: Parrot as an extension language

2005-05-20 Thread Autrijus Tang
On Sat, May 21, 2005 at 12:53:15AM +0800, Autrijus Tang wrote: > On Fri, May 20, 2005 at 05:42:48PM +0100, Colin Paul Adams wrote: > > There is a function declaration > > Parrot_string_cstring > > > > in string_funcs.h, but it appears to have no definitoon anywhere, so

Re: Parrot as an extension language

2005-05-20 Thread Autrijus Tang
On Sat, May 21, 2005 at 12:53:15AM +0800, Autrijus Tang wrote: > Yeah, I bumped against that too. You need to look at the "strstart" > field in the ParrotString struct. > > In Haskell I use: > > peekCString =<< #{peek STRING, strstart} s5 Actually, never

Re: [pugs] @x[1 .. Inf] ok yet @x[1..Inf] fails

2005-05-22 Thread Autrijus Tang
On Sun, May 22, 2005 at 05:57:45PM +1000, Andrew Savige wrote: > While the expression: > @x[1 .. Inf]; > is happily accepted by Pugs, this one: > @x[1..Inf]; > fails with the message: > *** Error: No compatible subroutine found: "&.Inf" Thanks, fixed now. :) /Autrijus/ pgptNe99K7vz9.pgp

Re: foo(1: 2: 3: 4:) ?

2005-05-22 Thread Autrijus Tang
On Fri, May 20, 2005 at 03:23:51PM +0800, Autrijus Tang wrote: > So I'm finally starting to implement multi-level invocants in MMDs. > I'd like to sanity check some cases first, though. Hmm, Warnocked? I'll assume this is sane, until told otherwise, then.

Re: foo(1: 2: 3: 4:) ?

2005-05-22 Thread Autrijus Tang
On Mon, May 23, 2005 at 11:07:59AM +1000, Damian Conway wrote: > >Hmm, I'm doubting that reflecting how many invocants you have on the > >caller side is a good idea. It seems awfully brittle in the face of > >reimplementation. > > Yep. And that's precisely why we previously ruled against colons i

Re: foo(1: 2: 3: 4:) ?

2005-05-22 Thread Autrijus Tang
On Mon, May 23, 2005 at 12:38:14PM +1000, Damian Conway wrote: > >Err, wait. From S06: > > > ># Indirect multimethod call... > >handle_event $w, $e: $m; > > > >Is this single-dispatch? > > No. I think it's vestigial (or ought to be). Luke's argument against colons > in multimethod calls

Re: Perl development server

2005-05-23 Thread Autrijus Tang
On Mon, May 23, 2005 at 05:25:57PM +0200, Juerd wrote: > > dev.pugscode.org seems indicated ... > > Sorry, but 'dev' isn't cute enough :). And it's going to be > something.perl6.nl, probably. I don't mind aliases, though, but they > better be CNAMEs. How about dev.perl6.nl -- I'll CNAME dev.pugsc

[RELEASE] Pugs 6.2.4 is released!

2005-05-23 Thread Autrijus Tang
On behalf of the Pugs team, I am elated to announce the release of Pugs 6.2.4, with much more comprehensive OO support, hyper and reduction metaoperators on user-defined operators, as well as experimental coroutine support. Also of note is `pugs.pm` and `Inline::Pugs`, two Perl 5 modules that lets

[RELEASE] Pugs 6.2.5 is released!

2005-05-23 Thread Autrijus Tang
On behalf of the Pugs team, I am elated to announce the release of Pugs 6.2.5, with much more comprehensive OO support, hyper and reduction metaoperators on user-defined operators, as well as experimental coroutine support. Also of note is `pugs.pm` and `Inline::Pugs`, two Perl 5 modules that lets

Re: [RELEASE] Pugs 6.2.5 is released!

2005-05-24 Thread Autrijus Tang
On Tue, May 24, 2005 at 10:36:16PM -0400, vadim wrote: > > On behalf of the Pugs team, I am elated to announce the release of > > Pugs 6.2.5, with much more comprehensive OO support, hyper and reduction > > metaoperators on user-defined operators, as well as experimental > > coroutine support. > >

Syntax of using Perl5 modules?

2005-05-24 Thread Autrijus Tang
So, this now works in Pugs with (with a "env PUGS_EMBED=perl5" build): use Digest--perl5; my $cxt = Digest.SHA1; $cxt.add('Pugs!'); # This prints: 66db83c4c3953949a30563141f08a848c4202f7f say $cxt.hexdigest; This includes the "Digest.pm" from Perl 5. DBI.pm, CGI.pm etc will

Re: Pugs link error

2005-05-25 Thread Autrijus Tang
On Wed, May 25, 2005 at 02:44:47PM +0200, BÁRTHÁZI András wrote: > > I've Debian Sid (but a lot of things are from source, so it's not true), > GHC 6.4 compiled from source, Perl 5.8.6 (from source), Parrot 0.2.0 devel > r8065, and Pugs the latest from SVN. > > If I try to link Pugs with Parrot

Re: Pugs link error

2005-05-26 Thread Autrijus Tang
On Wed, May 25, 2005 at 09:29:56PM +0200, BÁRTHÁZI András wrote: > It helps for that error, but not for the other one. Still get this: I think rgs have fixed that one as well. Try again? You can use this as the test script -- it works for me: use DBI--perl5; unlink 'test.db'; my $

Re: darcs patch: Make Pugs.AST.Internals compilation more... (and 1 more)

2005-05-27 Thread Autrijus Tang
On Thu, May 26, 2005 at 10:58:12PM -0400, Samuel Bronson wrote: > Thu May 26 22:49:09 EDT 2005 Samuel Bronson <[EMAIL PROTECTED]> > * Make Pugs.AST.Internals compilation more bearable > > Thu May 26 22:52:31 EDT 2005 Samuel Bronson <[EMAIL PROTECTED]> > * Make Pugs.Parser compilation more be

Re: darcs patch: Add export list to Pugs.Types

2005-05-27 Thread Autrijus Tang
On Fri, May 27, 2005 at 02:05:46PM -0400, Samuel Bronson wrote: > Fri May 27 14:04:13 EDT 2005 Samuel Bronson <[EMAIL PROTECTED]> > * Add export list to Pugs.Types Thanks, applied -- I've sent an invitation for you to become a committer, too. Welcome aboard! /Autrijus/ pgpWkQV3jHQmd.pgp Des

Re: can't build pugs with parrot support

2005-05-28 Thread Autrijus Tang
On Sun, May 29, 2005 at 12:04:29AM -0400, vadim wrote: > Additionally, excerpt from error message 'dated 2005-05-21 or later' is > probably wrong, because latest archive on that FTP is dated 20050501. You'd probably need to pull a later version from hs-plugin's darcs repository: http://www.cs

Re: Pugs makefile minor inconvenience: pugs.exe.bat

2005-05-28 Thread Autrijus Tang
On Sat, May 28, 2005 at 09:24:13PM +0200, Gr嶲oire P嶧n wrote: > "make install" with Pugs creates a pugs.exe.bat file in Perl bin > directrory, which is useless and don't work since pugs.exe is not a > Perl script. It should be removed. Thanks -- it seems that some EXE_FILES hackery is needed in Mak

Re: can't build pugs with parrot support

2005-05-29 Thread Autrijus Tang
On Sun, May 29, 2005 at 01:08:58PM -0400, vadim wrote: > While 'pugs' binary is a bit larger than 7Mb, 'pugs' with support of > parrot and perl is only a bit smaller than 20M. Am I understanding > correctly that both Perl and Parrot get statically built into binary? That is correct. Thanks, /Autr

Re: Method/attribute chaining

2005-06-01 Thread Autrijus Tang
On Tue, May 24, 2005 at 01:53:42PM +0100, Alex Gutteridge wrote: > I've written up the case I found as a test, please feel free to add > it if it's useful. All tests pass apart from the last one which tests > attribute chaining. Tested on Pugs 6.2.5. Thanks, stevan applied it and I believe it

[RELEASE] Pugs 6.2.6 is released!

2005-06-01 Thread Autrijus Tang
I'm happy to announce Pugs 6.2.6, the first release uploaded by cpan-upload.p6 (under examples/perl5/), powered by Pugs's newfound capability to use CPAN modules: http://pugscode.org/dist/Perl6-Pugs-6.2.6.tar.gz SIZE = 1083009 SHA1 = a85374c384eb11baa2ebd8d971f2ccbd8cec760f Thanks to

Re: Regarding Google's Summer of Code 2005

2005-06-03 Thread Autrijus Tang
On Fri, Jun 03, 2005 at 05:30:51PM +0530, Dheeraj Kumar Arora wrote: >I m interseted in one of LLVM project > "Implement well-known optimizations in PIR compiler (SSA -> > register allocation)" > Can Any send me the details? I'm not an expert with with PIR or SSA,

Re: How much do we close over?

2005-06-12 Thread Autrijus Tang
On Mon, Jun 13, 2005 at 12:57:32AM +0200, Chip Salzenberg wrote: > On Sun, Jun 12, 2005 at 11:26:49PM +0100, Piers Cawley wrote: > > sub foo { my $x = 1; return sub { eval $^codestring } } > > say foo()("$x"); > > I'm pretty sure you meant single-quoted, and you perhaps might maybe > need

[RELEASE] Pugs 6.2.6 is released!

2005-06-13 Thread Autrijus Tang
I'm happy to announce Pugs 6.2.7, with much improved parser speed and error reporting, as well as rudimentary (source filter style) macro support: http://pugscode.org/dist/Perl6-Pugs-6.2.7.tar.gz SIZE = 1157780 SHA1 = fc8d80c05a5c896693e395f830d10e85a62f2747 Most of this release's de

[RELEASE] Pugs 6.2.7 is released!

2005-06-13 Thread Autrijus Tang
(Sorry. Wrong subject last time...) I'm happy to announce Pugs 6.2.7, with much improved parser speed and error reporting, as well as rudimentary (source filter style) macro support: http://pugscode.org/dist/Perl6-Pugs-6.2.7.tar.gz SIZE = 1157780 SHA1 = fc8d80c05a5c896693e395f830d10e

Re: [RELEASE] Pugs 6.2.7 is released!

2005-06-13 Thread Autrijus Tang
On Mon, Jun 13, 2005 at 05:18:38PM -0400, vadim wrote: > interesting read, thank you a lot. But few questions however. A > following page: > http://pugscode.org/talks/apw/slide14b.html#end > > states that "Faster: JIT compiled; run in embedded machines" > Is it ever possible to run pugs on PocketP

Re: Parrot and features (was Re: [RELEASE] Pugs 6.2.7 is released!)

2005-06-13 Thread Autrijus Tang
On Mon, Jun 13, 2005 at 10:32:05AM -0400, Rob Kinyon wrote: > > That statement talks about Parrot. As soon as Pugs targets Parrot -- > > which is what I'm working on right now -- you can run cross-compiled > > Perl 6 program s on PocketPC. > > Question: Given that Parrot isn't complete, will ther

Re: Attack of the fifty foot register allocator vs. the undead continuation monster

2005-06-13 Thread Autrijus Tang
On Mon, Jun 13, 2005 at 09:21:00AM -0700, Brent 'Dax' Royal-Gordon wrote: > On 6/13/05, Chip Salzenberg <[EMAIL PROTECTED]> wrote: > > Oh no ... it's even worse than you think. Almost *any* opcode that > > operates on a PMC can trigger a continuation. And I only need two > > words to prove it: >

Re: Attack of the fifty foot register allocator vs. the undead continuation monster

2005-06-13 Thread Autrijus Tang
On Mon, Jun 13, 2005 at 06:52:35PM +0200, Chip Salzenberg wrote: > > > Isn't this *exactly* why Perl 6 is requiring you to mark tied > > > variables when they're declared? > > > > Yes. > > Um: > >my $x is tied; >tied $x, SomePackage; >unsuspecting_victim(\$x); # ??? Hmm, you can't

Re: BEGIN {...} and IO

2005-06-13 Thread Autrijus Tang
On Mon, Jun 13, 2005 at 10:48:47AM -0700, chromatic wrote: > > # Problem; > > my $fh = BEGIN { open "some_file" err... }; > > # Compile-time filehandle leaked into runtime! > > say =$fh; > > Perhaps I'm being very naive, but why is this a problem? Maybe it's not > the best way to do somet

Re: PATCH: S04 - unary C<=> is not slurpy

2005-06-15 Thread Autrijus Tang
On Wed, Jun 15, 2005 at 05:37:18PM -0500, Patrick R. Michaud wrote: > Based on an off-list discussion, it turns out that unary C<=> > is not slurpy as mentioned in S04. The following patch to S04 > corrects this; I've already applied the patch but thought I'd > pass it by p6l for review/comments/r

sub my_zip (...?) {}

2005-06-16 Thread Autrijus Tang
Currently in Pugs &*zip has no signature -- it simply rewrites its arguments into the listfix ¥ (i.e. Y) function. That is bad because it can't be introspected, and you can't define something like that yourself. It also makes it uncompilable to Parrot as I don't control the runloop there. :) Als

scalar dereferencing.

2005-06-16 Thread Autrijus Tang
my $x = 3; my $y = \$x; say $y + 10; $y++; say $y; say $x; Currently in Pugs they print: 13 4 3 Is this sane? What is the scalar reference's semantics in face of a stringification and numification? I assume that array/hash references simply pass on to the t

Re: Quasiquoting

2005-06-27 Thread Autrijus Tang
On Tue, Jun 28, 2005 at 09:49:58AM +1000, Brad Bowman wrote: > Autrijus' journal mentions quasiquoting (Perl 5). Yes... quasiquoting in Perl 5 is currently crudely emulated by feeding things to PPI::Tokenizer and PPI::Transform. :-) > I was wondering how that would work. Many languages use unusu

Re: Quasiquoting

2005-06-28 Thread Autrijus Tang
On Tue, Jun 28, 2005 at 01:19:20PM +1000, Adam Kennedy wrote: > >Yes... quasiquoting in Perl 5 is currently crudely emulated > >by feeding things to PPI::Tokenizer and PPI::Transform. :-) > > PPI is not a code parser. By code parser I mean taking a string and > turning it into working code. PPI i

Re: who to get subroutine caller context with pugs

2005-06-29 Thread Autrijus Tang
On Tue, Jun 28, 2005 at 11:02:48AM +0200, Gerd Pokorra wrote: > I am using pugs 6.2.7. Is it already possible to find out if a > subroutine was called in a void context. Does the want function > provide this feature. In the interactive shell you can try it out: pugs> want 'Void' However

Type variables vs type literals

2005-06-29 Thread Autrijus Tang
Currently, does this: sub foo (::T $x, ::T $y) { } and this: sub foo (T $x, T $y) { } Means the same thing, namely a) if the package T is defined in scope, use that as the type constraint for $x and $y b) otherwise, set ::T to be the most immediate common supertype o

Hackathon notes

2005-07-07 Thread Autrijus Tang
During the Pugs Hackathon at YAPC::NA 2005, I managed to get various unspecced tests and features reviewed by Larry, and posted them in my journal. The original notes is attached; I'd be very grateful if you or other p6l people can find tuits to work them back into the relevant Synopses. :-) Than

Re: pugs and pirate

2005-07-07 Thread Autrijus Tang
On Thu, Jul 07, 2005 at 07:52:31AM -0400, Michal Wallace wrote: > I'm the guy running the pirate project (python-on-parrot). Leo says > that you and I ought to chat, and I think he's right. :) Wonderful. Cc'ing both pirate and p6c as I'm sure both lists will find this discussion fruitful. :-) >

User-defined infix subs/methods?

2005-07-09 Thread Autrijus Tang
In Pugs's ext/Set/lib/Set.pm, there are a number of user-defined infix operators. To avoid unicode in mails, I'll use a hypothetical &infix:<===> as the operator name. Consider the sub case: class Set; sub infix:<===> (Set $x, Set $y) { ... } Is it correct that this line: Set.new =

Re: Exception handlers and calling conventions

2005-07-11 Thread Autrijus Tang
On Mon, Jul 11, 2005 at 01:39:08PM +0200, Leopold Toetsch wrote: > I can see two ways to go: > > a) e = interpinfo .INTERPINFO_EXCEPTION > > b) via the get_params opcode > > The latter would reflect the exception call being an internal > continuation invocation: > >push_eh handler >

How to write a self.pm (Re: method calls on $self)

2005-07-11 Thread Autrijus Tang
(Cross-posting the new ruling from p6l to p6c to discuss implementation strategy) On Mon, Jul 11, 2005 at 06:29:28PM -0700, Larry Wall wrote: > { > let $Larry.decisive = 1; > > Okay, this is what we're gonna do. We're gonna go back pretty close to > where we were originally, but wit

Re: Punie

2005-07-11 Thread Autrijus Tang
On Mon, Jul 11, 2005 at 09:35:11PM -0700, Allison Randal wrote: > I'd like to add Punie to the Parrot repository. It's a first step > toward a compiler for Perl 1 running on Parrot. Currently it's *very* > simple: it only parses and compiles a single statement printing a > single digit -- but it

Re: How to write a self.pm (Re: method calls on $self)

2005-07-11 Thread Autrijus Tang
On Mon, Jul 11, 2005 at 09:04:54PM -0700, Larry Wall wrote: > On Tue, Jul 12, 2005 at 10:17:01AM +0800, Autrijus Tang wrote: > : On Mon, Jul 11, 2005 at 06:29:28PM -0700, Larry Wall wrote: > : The obvious thought is to have yet another magical, $^H like flag, to > : denote the current

Re: Punie

2005-07-11 Thread Autrijus Tang
On Tue, Jul 12, 2005 at 12:41:00PM +0800, Autrijus Tang wrote: > Is it Punie's goal to support all of those semantic constructs? If not, > maybe call it something else than Perl 1, to avoid confusion? :) (more bikesheding) If the goal is to demonstrate the capability of the upcoming

Re: Punie

2005-07-12 Thread Autrijus Tang
On Mon, Jul 11, 2005 at 11:43:55PM -0700, Allison Randal wrote: > >As Schwern will attest, Perl 1 is a quite complicated language, with > >nullary, unary, binary and ternary functions, arrays, hashes, pattern > >matches, transliteration, format, loop control and labels. > > As a test case for the

Re: User-defined infix subs/methods?

2005-07-12 Thread Autrijus Tang
On Sat, Jul 09, 2005 at 03:58:45PM -0700, Larry Wall wrote: > It should take a little more effort to mess with the minds of > unsuspecting modules, so maybe the standard syntax is cloned out of > *STANDARD_PERL_6 or some such scary package name. It's the default for > starting all require-like Per

[RELEASE] Pugs 6.2.8 released!

2005-07-13 Thread Autrijus Tang
After nearly 1000 commits, two hackathons, and an entire month of hard work, I am delighted to announce that Pugs 6.2.8 is finally upon us: http://pugscode.org/dist/Perl6-Pugs-6.2.8.tar.gz SIZE = 1309147 SHA1 = efd32419dcddba596044a42564936888a28b3c69 A live CD is available as usual,

Re: [RELEASE] Pugs 6.2.8 released!

2005-07-13 Thread Autrijus Tang
On Wed, Jul 13, 2005 at 07:01:18PM -0400, Matt Diephouse wrote: > Autrijus Tang <[EMAIL PROTECTED]> wrote: > > === Bug Fixes > > > > * Call parrot with "-G" (CGP) instead of "-j" (JIT) runcore to avoid > > segfaults > > Hopefully,

Re: User-defined infix subs/methods?

2005-07-13 Thread Autrijus Tang
On Tue, Jul 12, 2005 at 02:10:06PM -0700, Larry Wall wrote: > Good, I'd forgotten about that. Which means that it's even harder > for someone to compile a module in a "strange" dialect, since they'd > essentially have to write their own version of "use" that forces > recompilation ("reuse", if you

Re: WTF? - Re: method calls on $self

2005-07-14 Thread Autrijus Tang
If this were a straw poll, I'd say... 1. Meaning of $_ .method should mean $_.method always. Making it into a runtime error is extremely awkward; a compile-time error with detailed explanataion is acceptable but suboptimal. 2. Topicalization of $?SELF Neutral on this -- I can a

Re: Type::Class::Haskell does Role

2005-07-14 Thread Autrijus Tang
On Fri, Jul 15, 2005 at 02:38:22AM +0300, Yuval Kogman wrote: > As I see it == is the generic comparison, and 'eq' is == with > coercing parameters (in Haskell it'd be > eq :: (Show a) => a -> a -> Bool or so... Isn't that lovely?) There is a new generic comparison operator known as ~~. The dispa

Re: WTF? - Re: method calls on $self

2005-07-14 Thread Autrijus Tang
On Thu, Jul 14, 2005 at 09:38:45PM +0200, Juerd wrote: > Nathan Gray skribis 2005-07-14 12:55 (-0400): > > Autrijus joked? about $?.method once (instead of ./method), in case we > > need any more bad alternatives for $?SELF.method. But I also trust > > @larry, or %larry, or even $larry, to make a

Re: Pugs 6.2.8 installbin, installscript, installsitelib problems

2005-07-15 Thread Autrijus Tang
On Thu, Jul 14, 2005 at 11:53:02AM -0700, Hill, Ronald wrote: > I just finished running a nmake and wanted to check the version of the > exe file that was generated and found this. > C:\Perl6\site\lib > . > Notice some of the directories listed here. they are pointing to my > Perl5 directory struct

Re: Is namespace qualification really required

2005-07-15 Thread Autrijus Tang
On Fri, Jul 15, 2005 at 02:16:48PM -0500, [EMAIL PROTECTED] wrote: > package MyModule; > > use v6; > sub doubler( Num $x ) { >return 2 * $x; > } > > sub value_v( Code +$func = &MyModule::doubler ) is export { >return $func( 5 ); > } > > This works. But I think I should be able to say: >

  1   2   3   4   >