Re: Perl 6 Summary for 2005-08-15 through 2005-08-22

2005-08-23 Thread Sam Phillips
On 23 Aug 2005, at 10:20, Leopold Toetsch wrote: On Aug 23, 2005, at 3:43, Matt Fowles wrote: Java on Parrot I vote for "Jot". That's already occupied by another language http://en.wikipedia.org/ wiki/Iota_and_Jot. as is Java Parrot http://petstockroom.com/get_item_2jj_birdca

Re: Can a scalar be "lazy" ?

2005-08-23 Thread Yuval Kogman
On Mon, Aug 22, 2005 at 13:25:57 -0700, Larry Wall wrote: > On Tue, Aug 23, 2005 at 04:09:29AM +0800, Yiyi Hu wrote: > : my( $s, $t ); $s = "value t is $t"; $t = "xyz"; print $s; > : in perl 5, it will give a warning, and won't do "right" thing. > : we have to use other way or eval '$s' before prin

Re: Perl 6 Summary for 2005-08-15 through 2005-08-22

2005-08-23 Thread Leopold Toetsch
On Aug 23, 2005, at 3:43, Matt Fowles wrote: Perl 6 Summary for 2005-08-15 through 2005-08-22 Java on Parrot I vote for "Jot". That's already occupied by another language http://en.wikipedia.org/wiki/Iota_and_Jot. Perl 6 Language Type Inferencing in Perl 5 Autrijus

Re: Perl 6 Summary for 2005-08-15 through 2005-08-22

2005-08-23 Thread Tim Bunce
On Mon, Aug 22, 2005 at 09:43:41PM -0400, Matt Fowles wrote: > >Java on Parrot > Tim Bunce asked some preliminary questions about Java on Parrot. I > provide preliminary answers, and Nattfodd and Autrijus posted links to > related work. The important question of what it should be c

Re: A PMC class for reference counting

2005-08-23 Thread Leopold Toetsch
Nicholas Clark wrote: Following on our discussion on IRC, what I think we agreed on was that Parrot should provide a new PMC class functionally similar to how the dod_register_pmc/dod_unregister_pmc works. Quite probably it can share implementation code with the DOD registration system. Done.

Re: NCI: passing PMCs and using them

2005-08-23 Thread Klaas-Jan Stol
Leopold Toetsch wrote: Klaas-Jan Stol wrote: hi, I'm currently trying to check out the NCI. As my Lua compiler only uses PMCs (and not I/N/S registers), calling C functions will only be done with PMCs. I couldn't find info on this matter: suppose I have this string PMC, how can I access

Calling positionals by name in presence of a slurpy hash

2005-08-23 Thread Ingo Blechschmidt
Hi, (asking because a test testing for the converse was just checked in to the Pugs repository [1]) sub foo ($n, *%rest) {...} foo 13; # $n receives 13, of course, %rest is () foo 13, foo => "bar"; # $n receives 13 again, %rest is (foo => "bar") foo n => 13; # $n re

Python PMC's

2005-08-23 Thread Kevin Tew
Problem: Python PMC's just don't work in the leo-cxt5 branch which will become head/trunk at some time in the hopefully not to distant future. What I've done up time now: I've ported pyint.pmc, pystring.pmc to pass all tests in leo-cxt5 I've written t/dynclasses/pystring.t Note that there are some

Re: Calling positionals by name in presence of a slurpy hash

2005-08-23 Thread Luke Palmer
On 8/23/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote: > Hi, > > (asking because a test testing for the converse was just checked in to > the Pugs repository [1]) > > sub foo ($n, *%rest) {...} > > foo 13; > # $n receives 13, of course, %rest is () > > foo 13, foo => "bar"; >

~ and + vs. generic eq

2005-08-23 Thread Yuval Kogman
I don't like eqv, because it's ugly, inconsistent with anything else in Perl 6, especially &&, ||, and ^^. It might be forced to fit into the and, or, and xor family, but you'd expect to find 'eq' there, and that's not what it means. IMHO == is as "generic" as && and ||, and is even more like ^^ s

Re: ~ and + vs. generic eq

2005-08-23 Thread Ingo Blechschmidt
Hi, Yuval Kogman wrote: > I think this is more consistent, and just as useful: > > 10 == 10; # dispatches to num > "10" == 10; # dispatched to Num, by means of coercion (== has some > affinity to it for backwards compatibility) "10" == "10"; # dispatches > to Str, due to better match "10.0" == "1

Re: [pirate] Python PMC's

2005-08-23 Thread Sam Ruby
Kevin Tew wrote: > Problem: > Python PMC's just don't work in the leo-cxt5 branch which will become > head/trunk at some time in the hopefully not to distant future. > > What I've done up time now: > I've ported pyint.pmc, pystring.pmc to pass all tests in leo-cxt5 > I've written t/dynclasses/pyst

Re: NCI: passing PMCs and using them

2005-08-23 Thread Leopold Toetsch
On Aug 23, 2005, at 14:38, Klaas-Jan Stol wrote: Leopold Toetsch wrote: Klaas-Jan Stol wrote: void print_pmc(void *PMC) { // how to access the string in P? } If it's a stringish PMC, then STRING *s = VTABLE_get_string(INTERP, p); will do it. The C code is just in a .c file, it's n

Re: ~ and + vs. generic eq

2005-08-23 Thread Yuval Kogman
On Tue, Aug 23, 2005 at 18:15:07 +0200, Ingo Blechschmidt wrote: > sorry, I've some problems with this proposal: > > == has always meant numeric equality in Perl and I'd like it to stay > that way. For "simple" values like numbers and strings == is numberic, because it's affinity to it. > > "10

Re: ~ and + vs. generic eq

2005-08-23 Thread Larry Wall
On Tue, Aug 23, 2005 at 06:19:33PM +0300, Yuval Kogman wrote: : "10" == "10"; # dispatches to Str, due to better match Nope, that will continue to coerce to numeric comparison. The design team did in fact consider pure "equivalence" MMD dispatch of == in the last meeting, but rejected it in

Re: [pirate] Python PMC's

2005-08-23 Thread Leopold Toetsch
On Aug 23, 2005, at 17:09, Kevin Tew wrote: Problem: Python PMC's just don't work in the leo-cxt5 branch which will become head/trunk at some time in the hopefully not to distant future. Err, I hope to merge RSN ;-) I had a conversation a long time ago with Dan, in which he agreed that giv

Re: [pirate] Python PMC's

2005-08-23 Thread Chip Salzenberg
On Tue, Aug 23, 2005 at 12:21:42PM -0400, Sam Ruby wrote: > Kevin Tew wrote: > > I've ripped out a lot of the explicit passing of self as the first > > argument of pmc methods. - We don't have to pass self around, parrot > > makes it available to us automatically. > > I added self on Leo's reques

Re: [pirate] Python PMC's

2005-08-23 Thread Chip Salzenberg
On Tue, Aug 23, 2005 at 06:35:39PM +0200, Leopold Toetsch wrote: > On Aug 23, 2005, at 17:09, Kevin Tew wrote: > >Problem: > >Python PMC's just don't work in the leo-cxt5 branch which will become > >head/trunk at some time in the hopefully not to distant future. > > Err, I hope to merge RSN ;-) T

Re: [pirate] Python PMC's

2005-08-23 Thread Leopold Toetsch
On Aug 23, 2005, at 18:21, Sam Ruby wrote: Kevin Tew wrote: We don't have to pass self around, parrot makes it available to us automatically. I added self on Leo's request. Now it is unneccessary. *shrug* Parrot's new calling conventions are passing 'self' as the first argument of

Re: Calling positionals by name in presence of a slurpy hash

2005-08-23 Thread Larry Wall
On Tue, Aug 23, 2005 at 09:11:15AM -0600, Luke Palmer wrote: : On 8/23/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote: : > Hi, : > : > (asking because a test testing for the converse was just checked in to : > the Pugs repository [1]) : > : > sub foo ($n, *%rest) {...} : > : > foo 13; :

Re: Can a scalar be "lazy" ?

2005-08-23 Thread Larry Wall
On Tue, Aug 23, 2005 at 11:03:52AM +0300, Yuval Kogman wrote: : On Mon, Aug 22, 2005 at 13:25:57 -0700, Larry Wall wrote: : > On Tue, Aug 23, 2005 at 04:09:29AM +0800, Yiyi Hu wrote: : > : my( $s, $t ); $s = "value t is $t"; $t = "xyz"; print $s; : > : in perl 5, it will give a warning, and won't d

Re: Can a scalar be "lazy" ?

2005-08-23 Thread Yuval Kogman
On Tue, Aug 23, 2005 at 10:56:08 -0700, Larry Wall wrote: > We could probably extend "is cached" to attributes (and their implied > accessors) if lazy blocks aren't sufficient. Hmm... With the whole distinction of &foo as a value and &foo() as a application of the value, maybe we can sometimes as

Re: [pirate] Python PMC's

2005-08-23 Thread Sam Ruby
Leopold Toetsch wrote: > >> I do agree with test-driven development. That is exactly the approach I >> took. > > Well, I agree - until I see such tests (pyint_1): > > $P2 = $P1.__abs__($P1) Take a look at the difference between r7254 and r7312. The tests originally passed without a self a

Re: [pirate] Python PMC's

2005-08-23 Thread Kevin Tew
Sam, Thanks for the comments, They were very much appreciated. Sam Ruby wrote: >I added self on Leo's request. Now it is unneccessary. *shrug* > I understand completely. >Check out parrot/t/dynclass/pyint_2.pmc. __add__ style methods were >working, and tested. > Yes many are working, I shou

Re: [pirate] Python PMC's Missed attachment

2005-08-23 Thread Kevin Tew
My current work. Python PMC Patch to leo5-cxt5

Re: [pirate] Python PMC's

2005-08-23 Thread Sam Ruby
Kevin Tew wrote: >> > Point well taken, I've been leaning back between, rewrite and evolving > your work. > I have a current change set that is passing most of your original tests > that are in t/dynclasses/py*.t > It is more of an evolution than a rewrite, which I favor. > Some test fail due to re

defaults (was: Python PMC's)

2005-08-23 Thread Sam Ruby
How will Perl6 evaluate defaults? Like Python: global x x=1 def f(p1=x): return p1 x=2 print f() or like Ruby: $x=1 def f(p1=$x) return p1 end $x=2 puts f() - Sam Ruby P.S. The former prints "1", the latter, "2".

Re: [pirate] Python PMC's

2005-08-23 Thread Leopold Toetsch
On Aug 23, 2005, at 20:28, Sam Ruby wrote: Leopold Toetsch wrote: I do agree with test-driven development. That is exactly the approach I took. Well, I agree - until I see such tests (pyint_1): $P2 = $P1.__abs__($P1) Take a look at the difference between r7254 and r7312. I just

Re: [pirate] Python PMC's

2005-08-23 Thread Chip Salzenberg
On Tue, Aug 23, 2005 at 09:58:21PM +0200, Leopold Toetsch wrote: > Sam, please follow Parrot dev (or stop spreading FUD) - thanks. Be gentle, please. Parrot needs language developers. I'm not saying you're right or wrong. I'm just asking you to be a little more diplomatic. -- Chip Salzenberg <

Re: defaults (was: Python PMC's)

2005-08-23 Thread Chip Salzenberg
On Tue, Aug 23, 2005 at 03:48:03PM -0400, Sam Ruby wrote: > How will Perl6 evaluate defaults? I would like to help with this question, but I can't, and in general p6i won't be the right place to ask. Nobody knows the final form of Perl 6; nobody knows the currently understood form of Perl 6 excep

Re: ~ and + vs. generic eq

2005-08-23 Thread Yuval Kogman
On Tue, Aug 23, 2005 at 10:28:01 -0700, Larry Wall wrote: > On Tue, Aug 23, 2005 at 06:19:33PM +0300, Yuval Kogman wrote: > : "10" == "10"; # dispatches to Str, due to better match > > Nope, that will continue to coerce to numeric comparison. The design > team did in fact consider pure "equiv

Re: Python PMC's

2005-08-23 Thread Leopold Toetsch
On Aug 23, 2005, at 22:48, Sam Ruby wrote: From December 16, 2004: http://tinyurl.com/8smmq Sounds like a really ugly misunderstanding, the more that I've proposed not to pass the object (P2 in old parlance) out of band. I've stated several times that calling conventions need changes to

Re: Python PMC's

2005-08-23 Thread Sam Ruby
Leopold Toetsch wrote: > > On Aug 23, 2005, at 22:48, Sam Ruby wrote: > >>> From December 16, 2004: >> >> http://tinyurl.com/8smmq > > Sounds like a really ugly misunderstanding, the more that I've proposed > not to pass the object (P2 in old parlance) out of band. I've stated > several times

Re: ~ and + vs. generic eq

2005-08-23 Thread Larry Wall
On Wed, Aug 24, 2005 at 12:43:46AM +0300, Yuval Kogman wrote: : On Tue, Aug 23, 2005 at 10:28:01 -0700, Larry Wall wrote: : > On Tue, Aug 23, 2005 at 06:19:33PM +0300, Yuval Kogman wrote: : > : "10" == "10"; # dispatches to Str, due to better match : > : > Nope, that will continue to coerce to n

Re: Python PMC's

2005-08-23 Thread Sam Ruby
Chip Salzenberg wrote: > On Tue, Aug 23, 2005 at 07:15:41PM -0400, Sam Ruby wrote: > >>Leopold Toetsch wrote: >> >>>I've stated several times that calling conventions need changes to >>>properly support HLLs with minor success at these times. >> >>With the diversity of HLLs out there, I'm not cert

Re: Python PMC's

2005-08-23 Thread Chip Salzenberg
On Tue, Aug 23, 2005 at 07:15:41PM -0400, Sam Ruby wrote: > Leopold Toetsch wrote: > > I've stated several times that calling conventions need changes to > > properly support HLLs with minor success at these times. > > With the diversity of HLLs out there, I'm not certain that it is wise to > decl

Re: Python PMC's

2005-08-23 Thread Chip Salzenberg
I apologize to Leo for accidentally making this reply to the list. It was supposed to be private mail, but I hit 'y' just a _little_ too soon. I had no intention of embarassing anyone. Sorry. On Tue, Aug 23, 2005 at 01:04:58PM -0700, Chip Salzenberg wrote: > On Tue, Aug 23, 2005 at 09:58:21PM +0

Re: defaults (was: Python PMC's)

2005-08-23 Thread Larry Wall
On Tue, Aug 23, 2005 at 03:48:03PM -0400, Sam Ruby wrote: : How will Perl6 evaluate defaults? : : Like Python: : : global x : x=1 : def f(p1=x): : return p1 : x=2 : print f() : : or like Ruby: : : $x=1 : def f(p1=$x) : return p1 : end : $x=2 : puts f() By default, d

Re: Python PMC's

2005-08-23 Thread Sam Ruby
Chip Salzenberg wrote: > I apologize to Leo for accidentally making this reply to the list. > It was supposed to be private mail, but I hit 'y' just a _little_ > too soon. I had no intention of embarassing anyone. Sorry. You did, however, cause me to cancel the email I was composing. If people