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 algorithmically

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, for

Re: A listop, a block and a dot

2005-10-05 Thread Autrijus Tang
Luke Palmer wrote: With parentheses: print((length foo) 4) print(3 4) So this was quite a disturbing bug. This is now also quite a fixed bug. :-) However: f:{1}.() still parses as (f(:{1})).() as the adverbial block form takes precedence. Is that also wrong?

[RELEASE] Pugs 6.2.10 released!

2005-10-09 Thread Autrijus Tang
I am delighted to announce Pugs 6.2.10, released during a slashdotting on geoffb's Optimizing for Fun column: http://developers.slashdot.org/article.pl?sid=05/10/09/1831219 The release tarball will be available from CPAN shortly: http://pugscode.org/dist/Perl6-Pugs-6.2.10.tar.gz

Re: Complex types

2005-10-12 Thread Autrijus Tang
Larry Wall wrote: On Thu, Oct 13, 2005 at 09:43:15AM +1300, Sam Vilain wrote: : Hi all, : : Is it intentional that S09 lists unboxed complex types, but equivalent : Boxed types are missing from the Types section in S06? Nope. As it's a trivial omission, I went ahead and changed S06.pod

Re: new sigil

2005-10-22 Thread Autrijus Tang
Juerd wrote: I do not see why $ and @ couldn't be both a sigil and an infix operator, and the same goes for whatever ASCII equivalent ¢ gets. ^ and | are available for sigil use. (All the closing brackets are too, but that would be very confusing because we tend to visually parse those in

Re: Accessing parrot functions/PMCs with Pugs

2005-10-22 Thread Autrijus Tang
Christian Renz wrote: I recently got my feet wet with Pugs. So far, it's been fun :-). Cool! However, I couldn't find any information on how to access functions defined in parrot, or even how to use classes defined as PMCs in parrot. Is this possible already? If Pugs is linked with Parrot

Re: Avoid the Yen Sign [Was: Re: new sigil]

2005-10-23 Thread Autrijus Tang
Dan Kogai wrote: To make the matter worse, there are not just one yen sign in Unicode. Take a look at this. ¥ U+00A5 YEN SIGN ¥ U+FFE5 FULLWIDTH YEN SIGN Tough they look and groks the same to human, computers handle them differently. This happened when Unicode Consortium decided to make

Re: Recent news about PGE

2005-11-06 Thread Autrijus Tang
On 11/4/05, Patrick R. Michaud [EMAIL PROTECTED] wrote: As a quick example, one can now use the p6rule subrule to parse a perl 6 rule expression, and the Match object that is returned contains the parse tree. Other examples and demonstrations or parsing are in the examples/pge/ directory.

Re: Recent news about PGE

2005-11-06 Thread Autrijus Tang
On 11/6/05, Patrick R. Michaud [EMAIL PROTECTED] wrote: First, for null input, PGE (and p6rules) will likely parse this by returning a Match object indicating false, and attempting to compile that object will probably return a null subroutine. Yes, that sounds sane. The other case is when

Re: Pugs Bug

2005-04-03 Thread Autrijus Tang
On Sat, Apr 02, 2005 at 09:32:12PM -0500, Stevan Little wrote: I was writing tests for split(regexp, str) and I stumbled upon this bug: pugs -e 'split(rx:perl5//, not good)' Will go into an infinite loop. I also tried the empty regexp in a match on it's own, and it was not a problem.

Pugs 6.0.14 released!

2005-04-03 Thread Autrijus Tang
I'm happy to report that Pugs 6.0.14 has now been released, soon available to a CPAN mirror near you. :-) Much thanks to all lambdacamels who helped to make this release happen! Thanks, /Autrijus/ == Changed for 6.0.14 - April 4, 2005 === Pugs Internals * We now require GHC 6.4 on all

Re: More Pugs Bugs

2005-04-05 Thread Autrijus Tang
On Mon, Apr 04, 2005 at 09:01:20PM -0400, Stevan Little wrote: eval 'sub foobar { return if 1; }'; I've fixed everything except this. I'm not exactly sure how the postfix form of if is supposed to work here, because the first thing the parser tries is to parse it as return(if(1)), as a valid

Re: More Pugs Bugs

2005-04-05 Thread Autrijus Tang
On Tue, Apr 05, 2005 at 08:24:42AM -0700, Larry Wall wrote: That's why there's a statement_control:if, and there's a statement_modifer:if, but there's no prefix:if. If you see a statement modifier in the middle of an expression, it must be interpreted as a statement modifier regardless of the

Re: More Pugs Bugs

2005-04-05 Thread Autrijus Tang
On Tue, Apr 05, 2005 at 10:33:00AM -0700, Larry Wall wrote: : Aye. Is there an idea on how the two forms of `if` would be defined : using plain Perl 6? That's exactly what the syntactic category syntax is for, and why parsing has to be done indirectly in terms of syntactic categories, if

Re: [Pugs] Simple list of lists: Pugs confounded me

2005-04-08 Thread Autrijus Tang
On Fri, Apr 08, 2005 at 09:22:27AM -0400, Stevan Little wrote: Multi-dimensional structures are currently not supported in Pugs. But never fear, Autrijus is working on them right now actually. He is in the process of refactoring some of the Array and Hash types (in Haskell) to support this.

ITypes (was: [Pugs] Some slice oddities)

2005-04-09 Thread Autrijus Tang
On Sat, Apr 09, 2005 at 08:48:59PM +1000, Andrew Savige wrote: I noticed some changes in Pugs behaviour when trying to update the golf tests (I will update them in svn within 24 hours, I hope). I'm not certain they are bugs, hence this email. They are. I concluded this week that Pugs's

Re: pugs on win32: perl5 and perl6 include paths mix

2005-04-09 Thread Autrijus Tang
On Sat, Apr 09, 2005 at 10:11:17PM +0200, Dmitry Karasik wrote: $ C:\usr\bin\perl.exe -Iinc -MExtUtils::Command -e cp script/pugscc C:\home\src\pugs\blib\script\pugscc $ pl2bat.bat C:\home\src\pugs\blib\script\pugscc $ C:\usr\bin\perl.exe -Iinc util\src_to_blib.pl Perl v6.0.0 required--this

Re: (pugs) Managing pleac

2005-04-09 Thread Autrijus Tang
On Sat, Apr 09, 2005 at 10:17:12PM -0600, Luke Palmer wrote: gcomnz writes: I'd really like to contribute, but I'm wondering if for the first phase a wiki would help the community pull together the best practice for each recipe? Yes, yes, yes. I am a strong believer in wiki, especially

Re: [pugs] several questions (parentheses at my -- itypes)

2005-04-11 Thread Autrijus Tang
On Mon, Apr 11, 2005 at 09:40:15AM +0200, BTHI Andr wrote: Can somebody point me to a link, what is ITypes about? As I guess from the archives, there is VTypes and ITypes, the first is the virtual (V means variable?) type of a variable (this is about how can you use it in your program), the

Re: [pugs] socket primitives problem

2005-04-11 Thread Autrijus Tang
On Mon, Apr 11, 2005 at 06:29:44PM +0200, BRTHZI Andrs wrote: I've added a subroutine call into the http-server.p6 example file, and it's not working (no reply from the server, no output from the subroutine) because of it. Do I something not allowed, or is there a bug? For now you need to

Re: Slicing conflict

2005-04-12 Thread Autrijus Tang
On Tue, Apr 12, 2005 at 12:30:42AM -0600, Luke Palmer wrote: But in Perl 6: my @a = (1,2,3,4); my @b = @a[1...]; # elements from 1 onward say [EMAIL PROTECTED]; # should probably be 3, but with Perl 5 semantics is Inf In Pugs (r1847), after the IType refactoring, I have

Pugs 6.2.0 released.

2005-04-12 Thread Autrijus Tang
I am delighted to report that the first major milestone of Pugs, version 6.2.0, has been released to CPAN: http://wagner.elixus.org/~autrijus/dist/Perl6-Pugs-6.2.0.tar.gz SIZE (Perl6-Pugs-6.2.0.tar.gz) = 642482 MD5 (Perl6-Pugs-6.2.0.tar.gz) = 8d5438d49db872ffe2394fd4995d335b It

Re: Pugs 6.2.0 released.

2005-04-12 Thread Autrijus Tang
On Tue, Apr 12, 2005 at 04:15:35PM -0400, Matt Fowles wrote: Autrijus~ On Apr 12, 2005 3:50 PM, Autrijus Tang [EMAIL PROTECTED] wrote: * `xor` and `^^` now short-circuits How does this work? I thought xor /had/ to evaluate both sides. That's what I get for staying up too late when

Re: [pugs] regexp ignore case

2005-04-14 Thread Autrijus Tang
On Thu, Apr 14, 2005 at 01:07:32PM +0300, Markus Laire wrote: Until :i is implemented, you can use `:i` is now implemented in r1963: * :p5 allows as well as :perl5 for regex. * allow arbitary adverb orders. * :i / :ignorecase implemented. * /x and /s semantics are enabled for p5 regex by

Re: [pugs] regexp ignore case

2005-04-14 Thread Autrijus Tang
On Thu, Apr 14, 2005 at 09:51:27AM -0700, Larry Wall wrote: On Thu, Apr 14, 2005 at 08:58:47AM -0600, Paul Seamons wrote: : I would think that :p5 should behave as perl5 does by default. That would : mean that /x and /s aren't on by default (for p5). I'm inclined to agree. Okay. In that

Re: currying in perl6

2005-04-14 Thread Autrijus Tang
On Thu, Apr 14, 2005 at 12:51:08PM -0500, Matthew D Swank wrote: returns a closure, however pugs won't parse: make-adder 5 6 or: (make-adder 5) 6 I have to resort to: (make-adder 5)(6) Is this correct behavior? I think it's the correct behaviour, yes. We are not currying by

Re: [pugs] regexp ignore case

2005-04-14 Thread Autrijus Tang
On Thu, Apr 14, 2005 at 11:03:56AM -0700, Larry Wall wrote: That means that we either have to have an order dependency or be very careful not to allow any P6 shortcuts that happen to use the deprecated Perl 5 modifiers. Perhaps it would be better to have an option argument to P5 instead:

Re: [pugs] Quoting constructs

2005-04-14 Thread Autrijus Tang
On Thu, Apr 14, 2005 at 10:04:42PM +0300, Roie Marianer wrote: On Tuesday 12 April 2005 12:03 am, you wrote: I would rather give you commit rights (we give them out quite liberally) and you could apply it yourself actually. But you should first test your patch against the latest SVN

Re: More quoting issues

2005-04-16 Thread Autrijus Tang
On Sun, Apr 17, 2005 at 03:33:26AM +0300, Roie Marianer wrote: I tried to look into things, and it seems that 1 2 acting like a scalar when it's inside a hash subscript, but nowhere else; when I forced the final parameter of doFetch to be False (Eval.hs line 402) I got the correct result. You

Re: patch for t/operators/hyper.t

2005-04-17 Thread Autrijus Tang
On Sun, Apr 17, 2005 at 10:11:47AM -0500, David Christensen wrote: Enclosed is a patch for t/operators/hyper.t to test for some corner cases with list extension. Nice, applied. Let me know if the unicode are coming through correctly; I am not seeing them as such in my email. Indeed it

Re: Quoting constructs, take two

2005-04-17 Thread Autrijus Tang
On Sun, Apr 17, 2005 at 08:42:52PM +0300, Roie Marianer wrote: Attached patch, because the svn repository is down. Thanks, applied to svn.perl.org and will mergeback tomorrow to openfoundry. Great work! Enjoy, /Autrijus/ pgpTl3e9m9NTh.pgp Description: PGP signature

rx/abc$/

2005-04-18 Thread Autrijus Tang
On Sat, Apr 16, 2005 at 12:10:48PM -0700, Larry Wall wrote: I think I have to clarify what I mean by that last phrase. Trailing delimiters are hidden inside any token that has already been started, but not at the start of a token (where token is taken to be fairly restrictive). Therefore

Re: Pugs SEGV

2005-04-19 Thread Autrijus Tang
On Tue, Apr 19, 2005 at 01:30:15PM -0400, Aaron Sherman wrote: I was playing around with pugs's interactive mode and didn't think about what I was typing. I just typed ? out of force of semi-habit with CLI tools, and to my shock Pugs SEGVed. Now, I realize that this wasn't valid input, but

{ = } autocomposition

2005-04-20 Thread Autrijus Tang
In Pugs's t/pugsbugs/map_function_return_values.t, iblech added this test: %ret = map { $_ = uc $_ }, split , $text; This fails because it is parsed, undef the {=} autocomposition rule, into: # Fails because arg1 is not Code %ret = map(hash($_ = uc $_), split(, $text)); Instead of

Re: { = } autocomposition

2005-04-20 Thread Autrijus Tang
On Wed, Apr 20, 2005 at 08:51:24AM -0700, Larry Wall wrote: That may look like an arbitrary amount of lookahead, but I tried to define the hash/closure rule in terms of a semantic analysis rule rather than a syntax rule, such that it's always parsed as a closure, but at some point in semantic

Re: { = } autocomposition

2005-04-20 Thread Autrijus Tang
On Wed, Apr 20, 2005 at 09:38:28AM -0700, Larry Wall wrote: As someone who is currently trying to write a perfect p5-to-p5 [sic] translator, you have to somehow remember the parens (and whitespace (and comments (and constant-folded subtrees))) to have a complete AST representation of the

Re: { = } autocomposition

2005-04-20 Thread Autrijus Tang
On Wed, Apr 20, 2005 at 10:21:32AM -0700, Larry Wall wrote: On Thu, Apr 21, 2005 at 12:50:56AM +0800, Autrijus Tang wrote: : I see. Do you think preserving the /span/ (i.e. the character offset ranges) : of each AST element is enough to do that? That effectively means each : node points

Quick question: parens vs subroutine parameter

2005-04-20 Thread Autrijus Tang
So, following up on the Parens handling, are these two equivalent? # Assuming is has the parameter signature (Str, Str, Str) is((1,2), (3,4), hey); is([1,2], [3,4], hey); What happens if is is of type (Any, Any, Str)? Thanks, /Autrijus/ pgpdpWfUJearH.pgp Description: PGP signature

Inline code (was: Closure/block/sub multiplier)

2005-04-20 Thread Autrijus Tang
On Wed, Apr 20, 2005 at 04:50:38PM -0400, Matt Creenan wrote: To expand on this... How will you be able to access shared libraries with native code, such as DLLs on windows? Is there a way to do this proposed for Perl6 yet? If so, is it possible in PUGS? It is possible in Pugs's

Thunking semantics of :=

2005-04-23 Thread Autrijus Tang
Greetings. In implementing :=, I have discovered two different set of semantics in explantations. I will refer them as linking and thunking. The linking semantic is akin to hard links in filesystems. It takes the storage location in the RHS and binds its to the name in the LHS: $x := $x;

Pugs 6.2.1 released

2005-04-23 Thread Autrijus Tang
I am happy to announce the availability of Pugs 6.2.1 on CPAN, with totally rewritten Context and Type code, a new OO core, call-by-values bindings, as well as a huge number of other improvements and fixes. http://autrijus.org/dist/Perl6-Pugs-6.2.1.tar.gz SIZE = 732656 SHA1 =

Re: Thunking semantics of :=

2005-04-23 Thread Autrijus Tang
On Sat, Apr 23, 2005 at 10:21:56AM -0700, Larry Wall wrote: : Now, those two semantics directly clash when the RHS can be : interpreted both ways. One good example would be array dereference: : : my ($x, @a); : $x := @a[-1]; : @a = (1..100); : say $x; : : Under the

Re: Thunking semantics of :=

2005-04-23 Thread Autrijus Tang
On Sat, Apr 23, 2005 at 09:50:26PM +0200, Juerd wrote: Autrijus Tang skribis 2005-04-24 3:47 (+0800): $x := @a[0];# vivified or not? Vivified, because you're taking a reference (not at language level) and you can't have a reference (at internal level) pointing to something

map { $_ = $_ } @foo

2005-04-24 Thread Autrijus Tang
A while ago I posted a conflict between a block containing a pair constructor, vs. a hash constructor: map { $_ = $_ } @foo; Larry suggested that to keep it from being collapsed, we somehow augment toplevel AST: map { $_ = $_; } @foo; map { +($_ = $_) } @foo; But here is a new

Re: map { $_ = $_ } @foo

2005-04-25 Thread Autrijus Tang
On Sun, Apr 24, 2005 at 04:39:04PM -0700, Larry Wall wrote: : Larry suggested that to keep it from being collapsed, we somehow : augment toplevel AST: : : map { $_ = $_; } @foo; : map { +($_ = $_) } @foo; Uh, I'm not sure what + would return for a Pair, but I'm pretty sure it's

Quickcheck of context of index expressions

2005-04-25 Thread Autrijus Tang
Another quick check on expression context for indexed expressions. Please sanity-check the return value of want() below: @x[0] = want(); # scalar context @x[want()] = $_; # scalar context @x[want()] = @_; # scalar context @x[0,] = want(); # list context @x[want(),] = $_;

Re: Quickcheck of context of index expressions

2005-04-25 Thread Autrijus Tang
On Tue, Apr 26, 2005 at 03:33:44AM +0800, Autrijus Tang wrote: Another quick check on expression context for indexed expressions. Please sanity-check the return value of want() below: @x[0] = want(); # scalar context @x[want()] = $_; # scalar context @x[want

Sun Fortress and Perl 6

2005-04-27 Thread Autrijus Tang
Fortress is Sun's project at making a next-generation computer language. I like its technical report very, very much: http://research.sun.com/projects/plrg/fortress0618.pdf (via http://lambda-the-ultimate.org/node/view/673 ) Syntax aside (eg. their `=` and `:=` has the reverse meaning in

Re: Sun Fortress and Perl 6

2005-04-27 Thread Autrijus Tang
On Wed, Apr 27, 2005 at 08:21:27AM -, Rafael Garcia-Suarez wrote: Autrijus Tang wrote in perl.perl6.language : 4. Software Transaction Memory In Fortress, there is also an `atomic` trait for functions, that declares the entire function as atomic. Interesting; and this rolling-back

Re: Sun Fortress and Perl 6

2005-04-29 Thread Autrijus Tang
On Fri, Apr 29, 2005 at 08:33:56AM -0400, Aaron Sherman wrote: Currently per S09, Perl 6 collection types all have uniform types, so one has to use the `List of Any` or `Array of Any` return type instead. That seriously hinders inference and typechecking; however, I wonder if it is a

Re: Quickcheck of context of index expressions

2005-04-29 Thread Autrijus Tang
On Fri, Apr 29, 2005 at 06:22:57AM -0700, Larry Wall wrote: : @x[want()] = $_; # scalar context : @x[want()] = @_; # scalar context Maybe unknown context, which defaults to list. I think allowing unknown LHS index expression to default to scalar context is a bit more useful here.

Re: Quickcheck of context of index expressions

2005-04-29 Thread Autrijus Tang
On Fri, Apr 29, 2005 at 06:22:57AM -0700, Larry Wall wrote: : @x[want()] = $_; # scalar context : @x[want()] = @_; # scalar context Maybe unknown context, which defaults to list. : @x[0,] = want(); # list context : @x[want(),] = $_; # list context : @x[want(),] =

Re: Sun Fortress and Perl 6

2005-04-29 Thread Autrijus Tang
On Fri, Apr 29, 2005 at 02:35:26PM -0400, Aaron Sherman wrote: Sure, but Parrot is not the compiler, it's just something I need to target. Hierarchical signature checking should probably not be done in the VM level. How do other languages call P6 subroutines and methods? Parrot has a

Re: Sun Fortress and Perl 6

2005-04-30 Thread Autrijus Tang
On Sat, Apr 30, 2005 at 08:41:52AM +0200, Leopold Toetsch wrote: Anyway Parrots MMD system depends on types. *If* the Perl6 compiler defines above array as cl = subclass FixedFloatArray, num_Array_shape_3_3_3 Yes, that is what I am planning to emit for hierarchical and other subtyped

Re: Junctions of classes, roles, etc.

2005-04-30 Thread Autrijus Tang
On Sat, Apr 30, 2005 at 09:13:26AM -0500, Abhijit Mahabal wrote: I do not see how any auto-threading occurs in that code. It is completely innocuous in that sense, and I don't think that is what horrified David. What was troublesome was, I think: my Str|Int $x; $x.foo(); # runs

Re: Formal Parameters To While Block

2005-04-30 Thread Autrijus Tang
On Tue, Apr 26, 2005 at 09:37:51AM -0600, Luke Palmer wrote: Joshua Gatcomb writes: The solution is formal parameters. The trouble is I can't seem to find a good example in S04 that matches what I am trying to do. while $ref() - @array { ... } We're thinking at the moment that

[RELEASE] Pugs 6.2.2 released!

2005-05-01 Thread Autrijus Tang
On behalf of the Pugs team, I am delighted to announce the release of Pugs 6.2.2, the first version with a thread-safe, deadlock-free internal storage, based on software transactional memory (STM). Also, the performance is much, much better with this release; it is at least 10x faster than the

Re: Junctions of classes, roles, etc.

2005-05-01 Thread Autrijus Tang
On Sun, May 01, 2005 at 10:59:59AM -0400, Aaron Sherman wrote: On Sat, 2005-04-30 at 16:55 -0700, Brent 'Dax' Royal-Gordon wrote: Aaron Sherman [EMAIL PROTECTED] wrote: On Sat, 2005-04-30 at 22:24 +0800, Autrijus Tang wrote: That would be absolutely horrible. You all seem to have

Re: [RELEASE] Pugs 6.2.2 released!

2005-05-02 Thread Autrijus Tang
On Mon, May 02, 2005 at 01:44:43PM -0400, vadim wrote: You can download Pugs from a nearby CPAN mirror, or from pugscode.org: http://pugscode.org/dist/Perl6-Pugs-6.2.2.tar.gz How can I figure out which patchlevel it corresponds to? Well, you can grep the svn log for 6.2.2. :-)

Type system questions.

2005-05-03 Thread Autrijus Tang
With the recent discussion on type sigils, and the fact that Pugs is moving toward the OO core, I'd like to inquire how the following statements evaluate (or not): # Compile time type arithmetic? ::Dual ::= ::Str | ::Num; $*Dual ::= ::Str | ::Num; # Run time type arithmetic?

Re: Pugs on Cygwin

2005-05-03 Thread Autrijus Tang
On Tue, May 03, 2005 at 07:36:24AM -0400, Rob Kinyon wrote: I pulled svn r2461 and it does compile on cygwin, yes. But, the @INC problem is still there, preventing 'make test' from running successfully. Do you want me to look at that? Please do, thanks. :-) Also there is the problem with

Re: Type system questions.

2005-05-03 Thread Autrijus Tang
On Tue, May 03, 2005 at 05:32:44AM -0700, Larry Wall wrote: : # Type Instantiation? : sub apply (fun::a returns ::b, ::a $arg) returns ::b { : fun($arg); : } The first parameter would be fun:(::a) these days, but yes. (Stylistically, I'd leave the off the call.) So, the

Pugs now embeds Parrot.

2005-05-03 Thread Autrijus Tang
Because I want to embed PGE in Pugs, I end up embedding the entire libparrot. :-) As of two hours ago, if you set the PUGS_EMBED environment variable to parrot and run perl Makefile.PL, Pugs will build and link against Parrot, and provide a require_parrot() primitive for you. JIT works as one

Re: Pugs now embeds Parrot.

2005-05-03 Thread Autrijus Tang
On Tue, May 03, 2005 at 03:46:54PM -0400, Rob Kinyon wrote: Will this change remove the need for pugscc to be cygpath'ed on cygwin? Or, should I go ahead and work on this? Please go ahead -- pugscc will still be needed to create native executables without using parrot. Thanks, /Autirjus/

Re: New version of PGE released

2005-05-03 Thread Autrijus Tang
On Tue, May 03, 2005 at 09:22:11PM +0100, Nicholas Clark wrote: Whilst I confess that it's unlikely to be me here, if anyone has the time to contribute some help, do you have a list of useful self-contained tasks that people might be able to take on? Following some discussion on #perl6, it

Circular dereference?

2005-05-04 Thread Autrijus Tang
What should this do, if not infinite loop? my ($x, $y); $x = \$y; $y = \$x; $x[0] = 1; Thanks, /Autrijus/ pgp9rBdIQIdVk.pgp Description: PGP signature

Re: Circular dereference?

2005-05-04 Thread Autrijus Tang
On Wed, May 04, 2005 at 06:24:34AM -0700, Larry Wall wrote: Yes, it doesn't immediately deref as an array, so it fails. Oh. So autodereference is only one level? I got it all wrong in Pugs, then. I wonder where I got that impression... Now @$x would infinite loop according to what I said a

Re: Circular dereference?

2005-05-04 Thread Autrijus Tang
On Wed, May 04, 2005 at 05:30:48PM +0200, Thomas Sandla wrote: Autrijus Tang wrote: What should this do, if not infinite loop? my ($x, $y); $x = \$y; $y = \$x; $x[0] = 1; Hmm, after the my both $x and $y store an undef. Then $x stores a ref to undef. Then $y stores a ref to ref

Commitership inquiry

2005-05-05 Thread Autrijus Tang
Hey. Leo suggested to me on #parrot to drop a note on p6i, asking about obtaining the committer to the Parrot tree. As some of you know, Pugs can now evaluate PIR via an embedded Parrot interpreter: $ ./pugs -e 'eval_parrotprint 42!\n' 42! as well as compiling Perl 6 to PIR, evaluating

Re: reduced precedence

2005-05-06 Thread Autrijus Tang
On Fri, May 06, 2005 at 12:04:16PM -0600, Luke Palmer wrote: On 5/6/05, Juerd [EMAIL PROTECTED] wrote: In #perl6, we can't decide what it should be. There are good arguments for listop precedence ([+] 1..9) and for unary precedence ([EMAIL PROTECTED] $bar). My preference is listop

Pugs/Parrot roundtrip

2005-05-06 Thread Autrijus Tang
I'm glad to report that Pugs is now a registered Parrot compiler: $ cat roundtrip.p6 eval_parrot ' compreg $P0, Pugs $S0 = say qq[There... and back again!] $P0 = compile $P0, $S0 invoke $P0 '; $ ./pugs roundtrip.p6 There... and back again!

Nested captures

2005-05-09 Thread Autrijus Tang
As Pugs now has Rule support via PGE (either with external parrot or a faster, linked libparrot), I've been playing with the new capturing semantics. Currently, matching 123 against /(.(.(.)))/ produces this: $0: 123 $1: 123 $1[0]: 23 $1[0][0]: 3 Instead of the Perl 5

Re: Nested captures

2005-05-09 Thread Autrijus Tang
On Mon, May 09, 2005 at 12:15:30PM +0100, Carl Franks wrote: Are you subscribed to perl6-compiler? Yes, of course I am. :-) Yesterday Patrick Michaud posted PGE features update (corrections) which describes the results you've got: Ahh. I must've missed it. Thanks for the pointer. /me

Zero-day rules implementation status in Pugs

2005-05-09 Thread Autrijus Tang
On Mon, May 09, 2005 at 10:51:53PM +1000, Damian Conway wrote: Autrijus wrote: /me eagerly awaits new revelation from Damian... Be careful what you wish for. Here's draft zero. ;-) ...and here is my status report of the Zero-Day exploit, err, implementation, in Pugs. :-) Note that the

Re: [PATCH] PGE::Hs for Pugs PGE support

2005-05-09 Thread Autrijus Tang
On Sun, May 08, 2005 at 10:25:43PM -0500, Patrick R. Michaud wrote: On Mon, May 09, 2005 at 07:24:49AM +0800, Autrijus Tang wrote: Greetings. Attached is a patch that I'm currently using in Pugs's bundled PGE.pbc, in order to make PGE output properly escaped strings, in a format ready

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

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

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 { name \s does \s project } 'Larry does Perl' ~~ /description/; # true 'Larry does Java' ~~ /description/; # false This too: class Point { has $.x;

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 class the

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, $1

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

(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

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 Singular context. Right, but the *inside* of the invocant is still

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 : matters here. Tell

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 Singular context. Right, but the *inside* of the invocant is still

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 working on

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? Why the empty string match at the start? I don't know, I didn't invent that! :-) $ perl -le 'print join

[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

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) and $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 implementation but if it is returning $0

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 was to

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 because we

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

  1   2   3   4   >