Re: [perl #130460] Can we relax indir's test on the target directory?

2016-12-30 Thread Stéphane Payrard
Not only .indir default is strange, but the behavior of .chdir it relies on is weird too. I would like .chir :$test to support String|Code or array of thereof so as to dwim :test# read/writeable by user :test # same :test< ar

Re: [perl #107330] [BUG] nqp shell broken. blows up when executing the command at the second prompt

2012-01-01 Thread Stéphane Payrard
The world disappears between the two evaluations! And this is unrelated to 2012 mayan astrology. Relevant part of the trace. 5d5f set P2, P1["World"] P2=PMCNULL P1=Hash=PMC(0x7f926677dc00)  (src/stage2/gen/NQP.pm:487) ... 5d7c callmethodcc P2, "new" P2=PMCNULL  (src/stage2/gen/NQP.pm:487) More

Re: [perl #106480] [BUGS] nom regression: perl6 targets parse, ast and past are broken or useless

2011-12-24 Thread Stéphane Payrard
There is no such thing as a "past" target. Anyway Rakudo should says so instead silently executing all the stages for a missing target. On Sun, Dec 18, 2011 at 2:03 PM, Stephane Payrard wrote: > # New Ticket Created by  Stephane Payrard > # Please include the string:  [perl #106480] > # in the s

Re: [perl #77322] [PATCH] A grammar can be made not to inherit from Grammar in Rakudo

2010-08-21 Thread Stéphane Payrard
patch attached 0001-fixes-77322-changed-sub-compose-in-GrammarHOW.pir-so.patch Description: Binary data

What should be returned by the .keys method for Match invocants?

2010-08-10 Thread Stéphane Payrard
I edited my garbled sentences. [15:28:22] I know that a match is both an array and a hash and that both containers have a .keys method. But I would expect .keys for a Match to return a list of the named reductions [15:28:37] rakudo: grammar A { token TOP { }; token a { a } }; class A::A {

Re: [perl #76700] [BUG] problem with array handling

2010-07-25 Thread Stéphane Payrard
On Sat, Jul 24, 2010 at 4:54 PM, Stephane Payrard wrote: > # New Ticket Created by  Stephane Payrard > # Please include the string:  [perl #76700] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org/rt3/Ticket/Display.html?id=76700 > > > > I am trying to t

Re: [perl #76596] AutoReply: the .perl method for Seq returns a string that eval to a Parcel

2010-07-21 Thread Stéphane Payrard
I note that eqv considers rightly (1,2).seq non equivalent to (1,2) $ perl6 > (1,2).Seq eqv (1,2) 0 On Tue, Jul 20, 2010 at 4:03 PM, perl6 via RT wrote: > Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: >        "the

Re: r31755 -[S05] specifiy that .parse can invoke other subrules than TOP by name

2010-07-19 Thread Stéphane Payrard
Note that I sent a patch to that effect to p6c Jun 2 in a mail titled "support of parsing from a non TOP rule" that has not been applied. It still works. Attached below. Testable by : use Test; grammar A { token hi { hi } }; ok A.parse( 'hi', :rule) eq 'hi', "Grammar.parse: :rule" On Sun, J

Re: [bug] A where clause should not apply to a missing optional argument.

2010-07-15 Thread Stéphane Payrard
I am ok with the where applying on an explicit default argument. But I understand the implicit default argument as the way to manifest the absence of that argument. So that doest not make much sense to test if that value is conform to the where constraint because in essence there is no value to t

Re: [perl #76486] [Bug] Multiple dispatch mechanism apparently does not descend into inner signatures

2010-07-14 Thread Stéphane Payrard
Sorry. My example was wrong. Here another one. C executes as intended but C<@t> does not. I find that unintuitive. cat mmd5.pm6 multi sub a(@a) { say 1 ~ @a.perl } multi sub a([]) { say 2 ~ [].perl } my @t=(1,2); a([]); a(@t) $ perl6 mmd5.pm6 2[] No applicable candidates found to dispatch to for

Re: [perl #76442] [BUG} say ?1..2 # prints ones indefinitively

2010-07-12 Thread Stéphane Payrard
You On Mon, Jul 12, 2010 at 12:11 PM, Aaron Sherman via RT wrote: > On Sun, Jul 11, 2010 at 9:46 PM, Patrick R. Michaud wrote: > >> On Sat, Jul 10, 2010 at 04:44:40AM -0700, Stephane Payrard wrote: >> > # both statement below print 1 ad nauseam. >> > >> > say ?1..2 >> > say (?1)..2 >> >> What sho

Re: [perl #76272] AutoReply: [BUG] [RFE} typed range? TotallyOrderedDiscrete role. truemin and truemax methods

2010-06-30 Thread Stéphane Payrard
Correcting and precising my tought. Range does Iterator so it is already discrete and totally ordered. So the interesting class to derive is probably BoundedRange. My goal is to avoid the complexity introduced by excluded values when a truemin and a truemax can be calculated. On Tue, Jun 29, 2010

Re: [perl #76068] AutoReply: Re: [BUG] $_ as a lhs not handled correctly in a given/when

2010-06-28 Thread Stéphane Payrard
According to S02, this is the right behavior. "Any remaining special variables will be lexically scoped. This includes C<$_> [...]" On Fri, Jun 25, 2010 at 1:34 AM, Stéphane Payrard wrote: > Seeing the generated code for > >  for 1 -> $a { } > > The code co

Re: [perl #76068] AutoReply: Re: [BUG] $_ as a lhs not handled correctly in a given/when

2010-06-25 Thread Stéphane Payrard
--- > The bug is unrelated to the when construct but is related to the > handling of iterations. > The following lines has the same wrong behaviour as the previous one. > > $_=1; for 11..12 -> $

Re: [perl #75592] Long running unclosed quotes trigger unhelpful message

2010-06-08 Thread Stéphane Payrard
Also implementing :: will help for more precise errors reports. That one is one pmichaud plate that is already full On Tue, Jun 8, 2010 at 1:36 PM, Moritz Lenz via RT wrote: > Am 07.06.2010 23:23, schrieb Stephane Payrard (via RT): >> # New Ticket Created by  Stephane Payrard >> # Please include

support of parsing from a non TOP rule

2010-06-02 Thread Stéphane Payrard
Hi, the attached patch modifying HLLCompiler.pir supports parsing from an arbitrary rule in a grammar, using the $:rule parameter Example : grammar A { token a { a } }; say A.parse('a', :rule).perl This is nice for testing part of a grammar. This patch is the result of the following conversat

optional rules cluttering parse trees

2010-04-27 Thread Stéphane Payrard
When doing an analyse of a sample parse tree, I note that it is cluttered by the reduction of optional subrules to generate a zero length parse subtree. That is, rules with a '?' quantifier matching zero time. Suppressing such matching rules from the parse tree would make it easier to read. Additi

Re: [perl #65784] [BUG] Can't build rakudo on a mac unibody 13''

2010-03-10 Thread Stéphane Payrard
On Tue, Mar 9, 2010 at 8:55 PM, Moritz Lenz via RT wrote: > Does this problem still persist with a current Rakudo? > nope -- cognominal stef

Re: [perl #53104] [BUG] dyld: lazy symbol binding failed: Symbol not found: _parrot_i386_cmpxchg (icu?)

2009-09-16 Thread Stéphane Payrard
the report is not relevant anymore. you can close the ticket. Thx On 9/16/09, James Keenan via RT wrote: > On Sun Apr 20 08:58:20 2008, cognominal wrote: >> When testing, got that error message. >> Probably linked to icu and the version used. >> I have 3.4.1 and 3.8.1 around.. I am not sure I cur

Re: [perl #50402] [BUG] pb compiling a parrot got from svk on a Leopard MacBook

2009-02-03 Thread Stéphane Payrard
I had erased my svk clone. No problem building with a brand new one. Thx. On Mon, Feb 2, 2009 at 2:54 AM, James Keenan via RT wrote: > Are you still experiencing this problem? > > Thank you very much. > kid51 > -- cognominal stef

Re: [perl #60286] Re: Parrot doesn't build on OS X

2009-02-01 Thread Stéphane Payrard
Yes, the problem is long gone. On Sun, Feb 1, 2009 at 1:33 AM, James Keenan via RT wrote: > On Sat Nov 01 07:37:39 2008, cognominal wrote: >> I was preparing a bug report for the same thing so >> here it is : >> >> Parrot does not compile on my new 64 bits core 2 duo unibody macbook. >> I got bac

Re: Parrot doesn't build on OS X

2008-11-06 Thread Stéphane Payrard
rakudo now builds correctly. btw : the subject is wrong. I did not notice because I use a script to get the last trunk, build parrot and rakudo. On Sun, Nov 2, 2008 at 5:37 PM, Stéphane Payrard <[EMAIL PROTECTED]> wrote: > That's trunk, and I did a make real clean > > On Sat,

Re: Parrot doesn't build on OS X

2008-11-02 Thread Stéphane Payrard
That's trunk, and I did a make real clean On Sat, Nov 1, 2008 at 9:36 PM, Mark J. Reed <[EMAIL PROTECTED]> wrote: > Trunk or 0.8.0? Trunk builds fine on my iMac running the same Darwin > version you report (leopard 10.5.5). > > > > On 11/1/08, Ovid <[EMAIL PROTECTED]> wrote: >> For the past few d

Re: Parrot doesn't build on OS X

2008-11-01 Thread Stéphane Payrard
I was preparing a bug report for the same thing so here it is : Parrot does not compile on my new 64 bits core 2 duo unibody macbook. I got back data from the Time Machine backup of my now dead 32 bits intel macbook so I suspected that the gmp port libraries conflicted with some headers proper to

Re: Revisiting lexicals, part 1

2008-09-26 Thread Stéphane Payrard
On Wed, Sep 24, 2008 at 11:31 PM, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > On Wed, Sep 24, 2008 at 10:05:25PM +0200, Stéphane Payrard wrote: >> One of parrot current limitation is that eval is always a closure. >> When using rakudo interactively, one want to int

Re: Revisiting lexicals, part 1

2008-09-24 Thread Stéphane Payrard
One of parrot current limitation is that eval is always a closure. When using rakudo interactively, one want to introduce new lexical variable that are not lost when accessing them from the next prompt. Pugs gets that right. My take on the subject 8 years ago! I don't know how that interacts with

dtrace with parrot : ustack() gets only hexa adresses

2008-09-04 Thread Stéphane Payrard
Ha someone be successful using dtrace on parrot? When I am using ustack(), I get only hexa addresses instead of function names. When I am using bt in gdb, I got stack trace with names so I would expect the same with dtrace. I get the same results with leopard and nexanta. Is there some compiler o

yada yada yada in regex

2008-06-08 Thread Stéphane Payrard
what is the equivalent convention for yadayadayada in regex. Cuz ... is alread meaningful in regex. Should I use <...> or {...} ? Should the first be predefined? I want something that is a placeholder that parses but fails if someone pastes it. In other words the equivalent of a sub yada yada ya

Re: [perl #54678] [BUG] \h \H \v \V seem silently missing from PGE

2008-05-23 Thread Stéphane Payrard
Double mistake from me. I used the wrong keyword 'rule' instead of 'token'. So the characters matching \h were already gone. Then I looked the implementation at the wrong place concluding falsely. There is no bug. -- cognominal stef

Re: [perl #52276] AutoReply: 0-array and 1-array composer broken

2008-05-18 Thread Stéphane Payrard
This fix the bug but does not handle multidimensional arrays. It is dependant on the nqp patch Index: languages/perl6/src/parser/actions.pm === --- languages/perl6/src/parser/actions.pm (revision 27594) +++ languages/perl6/src/p

Re: [perl #53750] [BUG] The WHAT method of Protobject returns only the last component of the name

2008-05-06 Thread Stéphane Payrard
I have a fix which currently suits my need. But the real problem, like you said in IRC is to eventually merge the PGE and the rakudo implementations of protoobjects. I note that S12 that .WHAT and .WHO should return objects that stringifies to strings and not directly strings like in PGE implementa

#49758: [BUG] rakudo segfaults after "No scope found for PAST::Var" error

2008-04-19 Thread Stéphane Payrard
Index: t/compilers/imcc/syn/symbols.t === --- t/compilers/imcc/syn/symbols.t (revision 27038) +++ t/compilers/imcc/syn/symbols.t (working copy) @@ -7,7 +7,7 @@ use lib qw( . lib ../lib ../../lib ); use Test::More; use Parr

Re: [perl #53018] AutoReply: grammar not behaving as class

2008-04-17 Thread Stéphane Payrard
On Thu, Apr 17, 2008 at 10:20 PM, Jonathan Worthington via RT <[EMAIL PROTECTED]> wrote: > > Stéphane Payrard wrote: > > running the code with --target=pir, I see that the 'token a' regex > > is generated as a method with an empty namespace. > > >

Re: [perl #53018] AutoReply: grammar not behaving as class

2008-04-17 Thread Stéphane Payrard
running the code with --target=pir, I see that the 'token a' regex is generated as a method with an empty namespace. -- cognominal stef

Re: [perl #50402] pb compiling a parrot got from svk on a Leopard MacBook

2008-01-31 Thread Stéphane Payrard
On Jan 30, 2008 7:53 PM, James Keenan via RT <[EMAIL PROTECTED]> wrote: > Or, better still: > > make realclean > svk update > perl Configure.pl --verbose-step=61 --test > > in attached file... Thx -- cognominal stef u have mail. maccog:~ stef$ cd ~/svk/parrot/ maccog:parrot stef$ make realclean

error messages now with file name and line number

2006-05-01 Thread Stéphane Payrard
..with same format as gcc and grep. It is used by compiler-mode in emacs for example. $ diff -u compilers/imcc/debug.c.old compilers/imcc/debug.c --- compilers/imcc/debug.c.old 2006-05-01 20:44:34.0 +0200 +++ compilers/imcc/debug.c 2006-05-02 00:03:03.0 +0200 @@ -11,7 +11,8

values of undef and JavaScript

2006-04-29 Thread Stéphane Payrard
In Perl5, the meaning of the undef value is overloaded. It can mean either the value an uninitialized variable or it may indeed mean a genuine undefined value. Perl5 is biased toward the first meaning: in string context, the value behaves as an empty string; In integer and float context, it respe

Re: type sigils redux, and new unary ^ operator

2005-11-23 Thread Stéphane Payrard
Larry Wall a écrit : | On Wed, Nov 23, 2005 at 07:10:39PM +0100, Juerd wrote: | : Ruud H.G. van Tol skribis 2005-11-23 19:03 (+0100): | : > > Doesn't ^5 encourage [EMAIL PROTECTED] too much? | : > Can you explain when that creates a problem? | : | : It's not about problems in execution, it's about

Re: What's the latest on Iterators?

2005-11-12 Thread Stéphane Payrard
Larry Wall a écrit : | On Fri, Nov 11, 2005 at 08:42:44AM -0500, Joe Gottman wrote: | : Do functions like map and grep, which in Perl5 return lists, return | : Iterators in Perl6? | | A list may contain iterators. Lists don't eagerly flatten in Perl 6. | | : Can an Iterator be passed to a functi

Re: Mr. Clean vs. Perl 6

2005-06-30 Thread Stéphane Payrard
On Thu, Jun 30, 2005 at 06:17:14AM -, David Formosa (aka ? the Platypus) wrote: > On Thu, 30 Jun 2005 05:17:56 +0300, Yuval Kogman > <[EMAIL PROTECTED]> wrote: > [...] > > > I gave Perl 6 to Mr. Clean, and he said that if type inferrence was > > formalized, and used always, except that it's

Re: trait and properties thru getter/setters

2005-05-13 Thread Stéphane Payrard
On Fri, May 13, 2005 at 12:31:09PM -0700, Larry Wall wrote: > On Fri, May 13, 2005 at 12:26:22PM -0700, Brent 'Dax' Royal-Gordon wrote: > : Well, the value's pretty easy--just pass in a variable: > : > : my $b = $a is foo($bar); > > As we currently have it, that is not legal syntax. "is" may

Re: trait and properties thru getter/setters

2005-05-13 Thread Stéphane Payrard
On Fri, May 13, 2005 at 06:37:50PM +, [EMAIL PROTECTED] wrote: > > > > There is syntax to define trait and properties > > but is there an API? > > > > my $b = eval '$a but true'; # setting a true property > > # API to do it without an eval? > I don't understand why you think you need the

trait and properties thru getter/setters

2005-05-13 Thread Stéphane Payrard
There is syntax to define trait and properties but is there an API? my $b = eval '$a but true'; # setting a true property # API to do it without an eval? A trait setter probably does not make sense but for the implementer because it should not be set at run time. Incidentally, in a interacti

Re: Blocks, continuations and eval()

2005-04-22 Thread Stéphane Payrard
On Fri, Apr 22, 2005 at 09:32:55AM -0700, Larry Wall wrote: Thank you for your detailled answer. I still don't get what you mean by "[] pattern matching arguments". Do you mean smart pattern matching on composite values? > > A lot of features are making it into Perl 6 that have historically

Re: scoping functions as list operators?

2005-02-24 Thread Stéphane Payrard
On Thu, Feb 24, 2005 at 11:09:24PM -0500, Uri Guttman wrote: > >>>>> "SP" == Stéphane Payrard <[EMAIL PROTECTED]> writes: > > SP> On Fri, Feb 25, 2005 at 03:56:06AM +0100, Stéphane Payrard wrote: > >> > >> Giving scoping func

Re: How are types related to classes and roles?

2005-02-24 Thread Stéphane Payrard
On Thu, Feb 24, 2005 at 09:42:30AM -0800, Larry Wall wrote: > > Anyway, I don't profess to have thought deeply about type inferencing. > But I do know that I don't want to turn Perl 6 into ML just yet... > > Larry > Speaking of ML, it appears to me that Perl6 rules are a mechanism that can act

Re: scoping functions as list operators?

2005-02-24 Thread Stéphane Payrard
On Fri, Feb 25, 2005 at 03:56:06AM +0100, Stéphane Payrard wrote: > > Giving scoping functions the status of list operators > would allow to drop parentheses when not used in conjunction > with initializer so one could write: > > my $a, $b, $c; > > instead of > &g

scoping functions as list operators?

2005-02-24 Thread Stéphane Payrard
Giving scoping functions the status of list operators would allow to drop parentheses when not used in conjunction with initializer so one could write: my $a, $b, $c; instead of my ($a, $b, $c); Most people use scoping functions as the top most function of the corresponding statement AST s

Re: FP6: Types

2005-02-03 Thread Stéphane Payrard
On Thu, Feb 03, 2005 at 11:17:50AM -0500, Mark J. Reed wrote: > > On 2005-02-03 at 11:13:30, Autrijus Tang wrote: > >Today I've started implementing typing relations for value types in > >FP6. ... > > Shouldn't this have gone to perl6-internals, not perl6-language? > perl6-compiler@per

Re: Possible syntax for code as comment

2005-01-10 Thread Stéphane Payrard
On Sun, Jan 09, 2005 at 06:31:24AM -0600, Luke Blanshard wrote: > David Storrs wrote: > >Out of curiosity, why are we all spelling 'subject' without a 'c'? > >Or is 'subjet' a word I'm not familiar with? (Honest question.) > > I assume it's a spelling error on the part of the original poster. > F

Re: Possible syntax for code as comment

2005-01-08 Thread Stéphane Payrard
On Fri, Jan 07, 2005 at 09:55:39PM +0100, Juerd wrote: > Stéphane Payrard skribis 2005-01-07 21:23 (+0100): > > > my $s := $subjet; > > > my $c := $complement; > > That's what I wanted to avoid. > > Why? Do you expect to use lots of one letter alia

Possible syntax for code as comment

2005-01-07 Thread Stéphane Payrard
On Fri, Jan 07, 2005 at 10:28:32AM -0800, Larry Wall wrote: > On Thu, Jan 06, 2005 at 11:07:47PM +0100, Stéphane Payrard wrote: > : To get an huffmanized name and a clear one, I would like some support > syntax: > : > : sub canon( $subjet as $s , $complement as $c ) { >

Re: Hi, it's me / yet another student trying to write a compiler targetting Parrot ;-)

2005-01-07 Thread Stéphane Payrard
On Fri, Jan 07, 2005 at 05:11:18PM +0100, Sven Schubert wrote: > Hi all, > > I've been reading the internals list for a while more > or less regularly and as this is me first post, it is > about time, that I introduce myself: > > My name is Sven Schubert, I am studying information > systems and b

thoughts about types, and possible syntax for code as comment

2005-01-06 Thread Stéphane Payrard
I expect Perl6 to be a language with a mix of dynamically typed and statically typed variables. In a purely statically typed language like OCAML, you generally don't need to declare the type of variables when it can be inferred. So one can benefit from the speed of static typing (no type info must

spaces for alignement

2004-12-20 Thread Stéphane Payrard
On Sun, Dec 19, 2004 at 06:44:33PM -0800, chromatic wrote: > On Sun, 2004-12-19 at 20:25 -0600, Rod Adams wrote: > > [snipped] > > > > $x = 4; > > $y = 7; > > $z = 12; > > $r = 4543; > > $q = 121; > > > > With a fixed width font, like all code editors use, all the =' like up, > > and I can quick

slight discrepancy between S2 and S7

2004-12-06 Thread Stéphane Payrard
S2: my $foo = 42; say %MY::<$foo>;# prints "42" S6: Perl5ish subroutine declarations ... sub say { print qq{"@_"\n}; } # args appear in @_ Because C has no final newline, I would expect C will have one. Final newline or not. What is your say? -- stef

Re: Arglist I/O [Was: Angle quotes and pointy brackets]

2004-12-04 Thread Stéphane Payrard
On Fri, Dec 03, 2004 at 06:38:42PM -0800, Larry Wall wrote: > On Fri, Dec 03, 2004 at 06:43:05PM +, Herbert Snorrason wrote: > : This whole issue kind of makes me go 'ugh'. One of the things I like > : best about Perl is the amazing simplicity of the <> input construct. > > Hmm. > > while

Re: [PROPOSAL] for a new calling scheme

2004-11-16 Thread Stéphane Payrard
On Tue, Nov 16, 2004 at 10:48:18AM -0500, Dan Sugalski wrote: > At 4:48 PM +0100 11/16/04, Stéphane Payrard wrote: > >Putting your architect hat, Dan, can you spell a policy in this matter? > > Sure. > > The calling conventions are fixed. They are not going to change

Re: [PROPOSAL] for a new calling scheme

2004-11-16 Thread Stéphane Payrard
On Tue, Nov 16, 2004 at 08:52:10AM -0500, Dan Sugalski wrote: > At 11:43 AM +0100 11/16/04, Leopold Toetsch wrote: > >Below inline/attached is a proposal for new calling conventions - > >for the archive as Dan doesn't like changes now, but I haven't to > >backup it, when its out ;) > > Alright,

[PATCH] Re: [perl #32393] [BUG] IMCC - empty subs are not boss

2004-11-09 Thread Stéphane Payrard
On Tue, Nov 09, 2004 at 07:14:27PM -0800, Will Coleda wrote: > # New Ticket Created by Will Coleda > # Please include the string: [perl #32393] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org:80/rt3/Ticket/Display.html?id=32393 > > > > - the pars

Re: [perl #32356] AutoReply: [PATCH] update to embed.pod

2004-11-08 Thread Stéphane Payrard
No need to modify embed.h. Patch attached to get a snipped that compileds without the #include "parrot/parrot.h" -- stef--- docs/embed.pod.orig 2004-11-08 10:48:59.0 +0100 +++ docs/embed.pod 2004-11-08 20:42:57.209202168 +0100 @@ -7,7 +7,6 @@ =head1 SYNOPSIS -#include

Re: [perl #32356] AutoReply: [PATCH] update to embed.pod

2004-11-07 Thread Stéphane Payrard
I apparently forgot to attach the file > > > There is now a call to set the core and another to set the other > flags. I updated the code and the doc to reflect that. > > -- > stef > --- docs/embed.pod.orig 2004-09-16 15:11:55.0 +0200 +++ docs/embed.pod 2004-11-07 23:51:59.998632

Re: Perl 6 Summary for 2004-10-23 through 2004-11-01

2004-11-07 Thread Stéphane Payrard
Rereading this excellent summary, I note that I did not keep people posted on my problem. > Stephane Payrard asked about some problems he had encountered creating > the magical all in one Siva PMC. Leo provided a helpful prod towards > LVALUE_CAST. The other problems may or may not rel

Re: Does Parrot have "True coroutines"?

2004-11-04 Thread Stéphane Payrard
On Thu, Nov 04, 2004 at 10:11:07PM +0100, Klaas-Jan Stol wrote: > > I hadn't seen ".yield(x)" > Is >.yield(x) > > the same as: > >.pcc_begin_yield >.return x >.pcc_end_yield > ? > Yes. This alternative syntax has been checked in yesterday and is documented in the updated callin

Re: pmc_type

2004-10-27 Thread Stéphane Payrard
On Wed, Oct 27, 2004 at 01:19:29PM -0600, Luke Palmer wrote: > Stéphane Payrard writes: > > That would allow to implement typechecking in imcc. > > > > .sym Scalar a > > a = new .PerlInt # ok. Perlint is derived from Scalar > > Ugh, yeah, but what does th

Re: pmc_type

2004-10-27 Thread Stéphane Payrard
On Wed, Oct 27, 2004 at 06:24:59PM +0200, Leopold Toetsch wrote: > Stéphane Payrard <[EMAIL PROTECTED]> wrote: > > On Wed, Oct 27, 2004 at 12:19:22PM +0200, Leopold Toetsch wrote: > > >> Having a type enum for these abstract types would imply to install a > >&

Re: pmc_type

2004-10-27 Thread Stéphane Payrard
On Wed, Oct 27, 2004 at 12:19:22PM +0200, Leopold Toetsch wrote: > Stéphane Payrard <[EMAIL PROTECTED]> wrote: > > > A related but different issue is that abstract pmcs like (Scalar > > and PerlScalar) have no pmc_type. I understand that pmc_type are > > an offset i

Re: Perl 6 and byte code

2004-10-27 Thread Stéphane Payrard
On Wed, Oct 27, 2004 at 12:00:33PM +0100, Peter Hickman wrote: > Presently Python compiles it's py files to pyc files that can then be > run without access to the source (the py). > > Would Perl 6 be able to do this? Compile the pl to plc and pm to pmc and > load the ??c version if it was availa

Re: pmc_type

2004-10-26 Thread Stéphane Payrard
[snipped] > 1: What does pmc_type return if it fails to find a PMC? > 2: If that answer is 0, is it safe to document that 0 is a failure return, >which happens to map to the PMC type for "default", but as they can't be >instantiated looking up "default" is "not supported" (or words to that

analogy pmc/content with inode/file

2004-10-26 Thread Stéphane Payrard
I want to make an loose analogy between pmc/their_content and Unix inodes/files which I use as a mnemonic. PMCs are the equivalent of inodes, each one reference some content which is the equivalent of a file. C, when the source and the destination pmcs are of the same type, is like creating a har

Re: [perl #32117] [PATCH] new multifacetted pmc: siva

2004-10-24 Thread Stéphane Payrard
I am currently stuck because I get the error parrot: src/string.c:269: string_init: Assertion `p' failed. on the second string_init of a parrot run using the last vanilla cvs It may be a problem with mandrake cooker. Jérôme Quelin uses a older mandrake cooker and it works there. Comparing our co

spurious assembleur directives get in the way of oneliner return implementation

2004-10-14 Thread Stéphane Payrard
Hi, Juste like I added the possibility of declaring many registers variables with one .sym directive, I am working on returning or yielding in one line so one can write: .return -1, name instead of: .pcc_begin_return .return -1 .return name .pcc_end_return Sadly, the .ret

Re: [perl #31938] [PATCH] add missing get_repr() op

2004-10-12 Thread Stéphane Payrard
On Tue, Oct 12, 2004 at 12:14:29PM -, Leopold Toetsch via RT wrote: > Stephane Payrard <[EMAIL PROTECTED]> wrote: > > +++ ./ops/pmc.ops 2004-10-11 22:30:10.819391992 +0200 > > > +op get_repr(out STR, in PMC) { > > +$1 = $2->vtable->get_repr(interpreter, $2); > > +goto NEXT(); > > To

Re: [pid-mode.el] cannot edit

2004-10-01 Thread Stéphane Payrard
On Fri, Oct 01, 2004 at 06:09:37PM +0200, Jerome Quelin wrote: > Hi, > > I tried the pir-mode provided in the editor/ subdir. And when opening a > .imc file (I've associated .pir with pir-mode + font-lock-mode), I > cannot type spaces or carriage returns: > > (24) (warning/warning) Error caught i

Re: Why lexical pads

2004-09-24 Thread Stéphane Payrard
On Fri, Sep 24, 2004 at 04:03:46PM +0200, KJ wrote: > Hello, > > I've been wondering for some time about this, so I thought, why not ask. > > The thing is, I've been playing a few times with (Parrot, but also .NET) > compilers, and my conclusion was that the most difficult part is getting > assi

Updated doc and some code to reflect new Parrot_new() interface

2004-09-15 Thread Stéphane Payrard
--- ./src/test_main.c.old 2004-01-29 15:49:44.0 +0100 +++ ./src/test_main.c 2004-09-15 14:47:07.113244016 +0200 @@ -72,7 +72,7 @@ char *filename; Parrot_PackFile pf; -interpreter = Parrot_new(); +interpreter = Parrot_new(NULL); if (!interpreter) {

Pragma @LOAD is not always honored

2004-09-12 Thread Stéphane Payrard
When routines declared with the @LOAD pragma are in the main segment, they are not executed. This is probably not a problem because the code of these routines could be easly moved in the main routine but that should be either fixed or documented. Example: .sub foo @LOAD print "foo executed

Re: This week's summary

2004-07-26 Thread Stéphane Payrard
On Mon, Jul 26, 2004 at 10:29:15AM -0700, Brent 'Dax' Royal-Gordon wrote: > The Perl 6 Summarizer wrote: > > The infinite thread > >Pushing onto lazy lists continued to exercise the p6l crowd (or at > >least, a subset of it). Larry said that if someone wanted to hack > >surreal numbers

Re: Perl script to .so file

2004-07-16 Thread Stéphane Payrard
RAD On Wed, Jul 14, 2004 at 10:03:43PM +0800, RaghavendraK 70574 wrote: > Hi, > > Am a hardcore C++ guy and don;t know much abt the Perl. But one > of my friend has proved that the fastest way to RAD is Perl. I > need to know if we can convert a Perl script to a dynamic link > library under unix

Re: more than one modifier

2004-06-25 Thread Stéphane Payrard
On Fri, Jun 25, 2004 at 03:38:51PM +0200, [EMAIL PROTECTED] wrote: > > >Hello, > > I have a wish for Perl6. I think it would be nice to have the possibility > for more than one modifier after a simple statement. > > For example: > >print $a+$b if $a if $b for 1..3; > > > Gerd P

Re: Layering PMCs

2004-05-29 Thread Stéphane Payrard
You are considering read-ony PMC versus others. Another issue is properties. Many PMCs "classes" will support properties that will alter their behavior. But most PMC instances will have no property attached to them. Or just default values of them if you see it that way. To avoid to go back the sl

Re: Periodic Table of the Operators

2004-05-27 Thread Stéphane Payrard
Le Thu, May 27, 2004 at 12:34:32AM +0200, le valeureux mongueur Gabriel Ebner a dit: > Hello, > > Mark Lentczner wrote: > > http://www.ozonehouse.com/mark/blog/code/PeriodicTable.html > > What's periodic about it? We hope it will be periodically updated. :) > Otherwise, _nice_ table. indee.d

Re: PerlHash using PMCs for keys?

2004-05-21 Thread Stéphane Payrard
Le Thu, May 20, 2004 at 12:03:52PM -0700, le valeureux mongueur TOGoS a dit: > Should aggregate PMCs (like PerlHash) be able to take > PMCs as keys? I mean so that: > > $P0 = $P1[$P2] > > where $P1 is a PerlHash, would work. The way it works > now is that it complains that you can't use a PMC a

idiom for filling a counting hash

2004-05-18 Thread Stéphane Payrard
I use over and over this idiom in perl5: $a{$_}++ for @a; This is nice and perlish but it gets easily pretty boring when dealing with many list/arrays and counting hashes. I thought overloading the += operator %a += @a; Probably that operator should be smart enough to be fed with a mixed

Re: C style conditional statements

2004-05-12 Thread Stéphane Payrard
Le Wed, May 12, 2004 at 02:00:42AM +0200, le valeureux mongueur Pedro Larroy a dit: > Hi > > Is there any chance that in perl6 there will be the possibility to write > if/else statements without {}s with the condition at the beginning? > > Like > > if (condition) > statement; > > In orde

Re: A12: on inheriting wrappers

2004-04-30 Thread Stéphane Payrard
On Fri, Apr 30, 2004 at 11:14:55AM +0200, Aldo Calpini wrote: > let's suppose I want to build a class that keeps track of the objects it > creates. > > let's suppose that I want this class to be the base for a variety of > classes. > > let's suppose that I decide, rather than fiddling with the

Re: semantic and implementation of pairs

2004-04-13 Thread Stéphane Payrard
I have confused assignement and initialisation in my previous mail. Because they are two different operations, there is no problem they have different semantics. A6 described both operations. It described pairs as arguments used to initialize parameters and pairs in assignement. -- stef

semantic and implementation of pairs

2004-04-10 Thread Stéphane Payrard
My understanding of the semantic of pairs as in A6: A pair in a given scalar context should return its first element coerced to match the said context. This seems to be a prerequisite to use pairs as function arguments. Example with the boolean context: bool $b = a => 10; # $b == 1

Re: delaying promotion to pmc

2004-04-10 Thread Stéphane Payrard
On Sat, Apr 10, 2004 at 09:08:22PM -0400, Stéphane Payrard wrote: > Hi, > > I am writing a PerlPair PMC and I have a problem with an > optimization. BTW: probably a modified PerlPair could be used > to implement lisp cons pairs and the optimization will be even > more use

Re: Build problems in i386 linux

2004-04-10 Thread Stéphane Payrard
Le Sat, Apr 10, 2004 at 08:33:04PM +0100, le valeureux mongueur Alberto Manuel Brandao Simoes a dit: > Hi > > I am not needing parrot (just checking its state) but compilation > failed. Don't know if it is expected or not. In any case, this might be > useful: > > ../data/locales/ja.txt:15: par

delaying promotion to pmc

2004-04-10 Thread Stéphane Payrard
Hi, I am writing a PerlPair PMC and I have a problem with an optimization. BTW: probably a modified PerlPair could be used to implement lisp cons pairs and the optimization will be even more useful because of the widespread use of pairs. The optimization: I want to avoid storing a key or or value

Re: Traits: to renew OO inheritance in a hacker style discussion

2004-02-19 Thread Stéphane Payrard
On Thu, Feb 12, 2004 at 09:38:47AM -0800, Larry Wall wrote: > Yes, that's a very good paper, which is why Perl 6 now has something > called Roles, which are intended to degenerate either to Traits or > Interfaces. My take on it is that Roles' most important, er, role > will be to abstract out the

Re: [PATCH] to support mere pmcs as keys

2004-02-09 Thread Stéphane Payrard
Le Mon, Feb 09, 2004 at 09:52:28PM +0100, le valeureux mongueur Leopold Toetsch a dit: > Stéphane Payrard <[EMAIL PROTECTED]> wrote: > > > The implementation of the methods key_* in keys.c imposed > > to the PMCs to be of type Key. I don't' see the interest >

[PATCH] added missing methods in PerlArray, batteries^Wtests included

2004-02-09 Thread Stéphane Payrard
The get_*_keyed methods were missing from PerlArray. Inheriting from Array did not cut it when accessing elements beyond the array end. The patch adds the missing methods. They really are a cut and paste from the Array methods. They access the corresponding get_*_keyed_int() methods, or the get_p

[PATCH] to support mere pmcs as keys

2004-02-09 Thread Stéphane Payrard
The implementation of the methods key_* in keys.c imposed to the PMCs to be of type Key. I don't' see the interest for atomic keys that could be mere PMCs. This concretely means that one can write the following and save a intermediate register: P3 = PO[P1] instead of: P3 = new P2, .Key

Re: Various IMC Questions

2004-01-19 Thread Stéphane Payrard
Le Mon, Jan 19, 2004 at 11:56:28AM -0500, le valeureux mongueur Will Coleda a dit: > Trying to get the tcl interpreter working with all the changes in the > past few months: > > I used to be able to say: > > .pcc_sub _dumper prototyped > .param PMC original > > ... but now PMC isn't a valid t

Re: Parrot String Doc

2004-01-13 Thread Stéphane Payrard
Le Tue, Jan 13, 2004 at 10:34:14PM +0100, le valeureux mongueur Stéphane Payrard a dit: > Le Tue, Jan 13, 2004 at 03:06:18PM -0600, le valeureux mongueur Robert Eaglestone a > dit: > > OK, I'm looking at the Parrot String documentation, and I've > > got questions.

Re: Parrot String Doc

2004-01-13 Thread Stéphane Payrard
Le Tue, Jan 13, 2004 at 03:06:18PM -0600, le valeureux mongueur Robert Eaglestone a dit: > OK, I'm looking at the Parrot String documentation, and I've > got questions. It's not like the docs are a total mess, they > just need some fleshing out. Yeah, that's it. So here I go. > > Here's the pa

Re: Questions about abstract pmcs

2004-01-12 Thread Stéphane Payrard
On Mon, Jan 12, 2004 at 03:16:50PM -0500, Dan Sugalski wrote: > At 7:30 PM +0100 1/12/04, Leopold Toetsch wrote: > >Stéphane Payrard <[EMAIL PROTECTED]> wrote: > >> Example: > > > >>.sym scalar var > >>new var, .Perlint # the instance is a

Re: Questions about abstract pmcs

2004-01-12 Thread Stéphane Payrard
On Mon, Jan 12, 2004 at 10:05:51AM +0100, Leopold Toetsch wrote: > Stéphane Payrard <[EMAIL PROTECTED]> wrote: > > Abstract pmcs should appear in core_pmcs.h and pmctypes.pasm > > because one needs them as base pmcs so as to declare > > pseudo-registers. This is a p

  1   2   >