Re: Python PMC's

2005-08-24 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: Let me try again to move the discussion from subjective adjectives to objective code. Consider: [ example code ] If you run this, you will get 1,2,3. When called as a function, f will return the value of the second parameter. When called

Re: Python PMC's

2005-08-24 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: Leopold Toetsch wrote: A stripped down PIR-only, pythonless translation is below. (example: classes aren't global in Python), Yes, of course. The stripped down means essential the absence of any lexical handlings. But as you say, this doesn't

Re: Python PMC's

2005-08-24 Thread Sam Ruby
, and the implementation of this function calls __get__ which performs the curry function, per the Python specifications. Does Parrot_find_method_with_cache cache the results of the previous call to find_method? - Sam Ruby

Re: Python PMC's

2005-08-24 Thread Sam Ruby
a Python class defined in module __main__ would be: $P1 = findglobal __main__, Foo getattribute $P2, $P1, 'g' - Sam Ruby

Re: [pirate] Python PMC's

2005-08-23 Thread Sam Ruby
- while that does change over time, running code has a tendency to change more slowly than the advice you may receive. Kevin Tew ___ pirate mailing list [EMAIL PROTECTED] http://cornerhost.com/mailman/listinfo/pirate - Sam Ruby

Re: [pirate] Python PMC's

2005-08-23 Thread Sam Ruby
. Then I was told that that was all wrong, so I changed it (both the test and the code). Now Kevin is being told that passing self is all wrong. Reverting that particular change is not all that difficult. And it can be done without gutting. - Sam Ruby

Re: [pirate] Python PMC's

2005-08-23 Thread Sam Ruby
. Finally, take a look at the third test in parrot/languages/python/t/basic/func.t - Sam Ruby

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: 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 that calling

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 certain

Re: Python PMC's

2005-08-23 Thread Sam Ruby
for December 17, 2004: r7312 | rubys | 2004-12-17 22:51:48 -0500 (Fri, 17 Dec 2004) | 2 lines Pass 'self' as the first argument on method calls - Sam Ruby

Re: [pirate] OSCON slides

2005-08-05 Thread Sam Ruby
, and it is. For now, I'll probably limit the amount of time I devote to Parrot as there are plenty of other places where I feel more welcome. - Sam Ruby

Re: Python on parrot

2005-05-15 Thread Sam Ruby
Michal wrote: On Sat, 16 Apr 2005, Sam Ruby wrote: [I hope you don't mind me putting this back on the list - I would prefer that everybody who is interested can follow along and/or participate] Kevin Tew wrote: Sam Ruby wrote: Hey guys, I didn't see this until just now. Kevin Tew wrote: Sam

Re: Python on parrot

2005-04-16 Thread Sam Ruby
is in the parrot repo already. What is left - a simple translator - can and should, IMHO, be recoded into Perl6 once enough of that is running. - Sam Ruby

Re: Python on parrot

2005-04-16 Thread Sam Ruby
[I hope you don't mind me putting this back on the list - I would prefer that everybody who is interested can follow along and/or participate] Kevin Tew wrote: Sam Ruby wrote: Kevin Tew wrote: Sam, Just wondering what the status is on python/parrot/pirate/pyrate. These both look outdated. http

Re: VTABLE methods and interfaces

2005-02-23 Thread Sam Ruby
. - Sam Ruby

Re: cvs commit: parrot/t/pmc object-meths.t

2005-02-01 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: +else if (p-vtable-base_type == enum_class_NCI) { It was requested[1] that I not add any Python specific methods to the NCI method... accordingly, the majority of Python methods are morphed to a PyNCI

Re: bound methods

2005-02-01 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: The common cases I want to optimize for are common functions being called as common functions. And common methods being called as methods. Yep, that's very reasonable. The easiest way to optimize for the common methods being called

Re: cvs commit: parrot/t/pmc object-meths.t

2005-02-01 Thread Sam Ruby
[EMAIL PROTECTED] wrote: +else if (p-vtable-base_type == enum_class_NCI) { It was requested[1] that I not add any Python specific methods to the NCI method... accordingly, the majority of Python methods are morphed to a PyNCI class which subclasses the base NCI class. - Sam Ruby [1

Re: bound methods

2005-02-01 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: Leopold Toetsch wrote: ... But that doesn't work fur user methods, especially if there is no indication that a user function is used as a method in the first place. def find(s, sub): ... In Python, this is statically determinable

Re: bound methods

2005-01-31 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: Leopold Toetsch wrote: WRT functionality: for a call it has to shift up PMC arguments and insert the object as P5, right? At the moment, it contains this logic. My plans are to remove the shifting and set the object into P2 / INTERP

Re: bound methods

2005-01-30 Thread Sam Ruby
Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: At 5:04 PM -0500 1/18/05, Sam Ruby wrote: f = Parrot.find print f(r) Note that I referenced the method as an attribute, and then called it as a function. Mmm, syntax! :) Luckily it makes no difference to us at the parrot level

Re: bound methods

2005-01-30 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: Leopold Toetsch wrote: 2) by a distinct Bound_Meth PMC class derived from 1) The latter is probably cleaner. Binding the object to the callable could be done e.g. by the Cset_pmc vtable. That's exactly how PyBoundMeth works today

Re: Calling conventions, invocations, and suchlike things

2005-01-28 Thread Sam Ruby
Dan Sugalski wrote: At 5:04 PM -0500 1/18/05, Sam Ruby wrote: Dan Sugalski wrote: Hi folks. Welcome back! Parrot's got the interesting, and somewhat unfortunate, requirement of having to allow all subroutines behave as methods and all methods behave as subroutines. (This is a perl 5 thing

Re: Calling conventions, invocations, and suchlike things

2005-01-28 Thread Sam Ruby
Luke Palmer wrote: Sam Ruby writes: Mmm, syntax! :) Luckily it makes no difference to us at the parrot level. What that should translate to is something like: $P0 = find_method Parrot_string, find # Elided check for failed lookup and fallback to attribute fetch $P1 = make_bound_method

Re: Calling conventions, invocations, and suchlike things

2005-01-28 Thread Sam Ruby
Sam Ruby wrote: Now, what should the code for function f look like? The only reasonable answer is something along the lines of: getattribute $P0, P5, 'find' I doubt that. All languages have different semantics, and we can't implement them all, because they are conflicting. You, as a compiler

Re: Calling conventions, invocations, and suchlike things

2005-01-18 Thread Sam Ruby
of instructions executed on invoke (including a nested C stack). This could all be avoided if there was a VTABLE_callmethod interface as the code would know that the intent was to only use this found method exactly once. *shrug* Do you plan to choose banana cream again at OSCON 2005? - Sam Ruby

Re: Proposed vtable changes WRT method lookup

2005-01-17 Thread Sam Ruby
to standardize on mechanisms. - Sam Ruby

Re: [perl #33751] [PATCH] Use INTERP in *.pmc files

2005-01-12 Thread Sam Ruby
Leopold Toetsch wrote: Bernhard Schmalhofer (via RT) wrote: I noticed the there is an interesting mix of 'interpreter' and 'INTERP' Thanks, applied except dynclasses. I leave that part up for Sam - dunno if he got diffs there. Applied. - Sam Ruby

Re: Key question

2005-01-06 Thread Sam Ruby
for others to use. - Sam Ruby

Re: [PROPOSAL] VTABLE_call_method

2005-01-04 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: Ramblings on creating a new VTABLE_call_method slot to help with implementing Python's bound vs unbound methods: http://www.intertwingly.net/blog/2005/01/03/Bound-Methods 1) Methods are functions, where the first parameter is the object. We

Re: [PROPOSAL] VTABLE_call_method

2005-01-04 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: Leopold Toetsch wrote: How should the following be handled: f = parrot.index The CPython code is: 1 0 LOAD_CONST 0 ('parrot') 3 LOAD_ATTR0 (index) 6 STORE_NAME

[PROPOSAL] VTABLE_call_method

2005-01-03 Thread Sam Ruby
Ramblings on creating a new VTABLE_call_method slot to help with implementing Python's bound vs unbound methods: http://www.intertwingly.net/blog/2005/01/03/Bound-Methods This is related to a previous discussion on Overloaded Operator Methods: http://xrl.us/ekh8 - Sam Ruby

Re: [perl #33603] Undef != Undef

2004-12-31 Thread Sam Ruby
like comparing arrays with large numbers of undefined elements much fiddlier than it should be. Yep. Currently there is no chance to change that. If the desire is that two new .Undef values are to be considered equal, then the attached patch achieves that. - Sam Ruby ? undef.patch Index: undef.pmc

Re: [perl #32563] [BUG] missing Makefile dependencies

2004-12-28 Thread Sam Ruby
(which is at least smart enough to build the parrot executable). I've made a fix. While I obviously have authority to update cvs, as near as I can tell, my user id is not defined to the parrot bug tracking system. - Sam Ruby

Re: dynclasses/*py* broke the build

2004-12-27 Thread Sam Ruby
that... I've committed what I hope to be a fix. - Sam Ruby

Re: MMD and VTABLE_find_method

2004-12-25 Thread Sam Ruby
this mailing list will not be suitable for civilized discussion until Dan gets back. Meanwhile, all existing Python tests pass: http://www.intertwingly.net/blog/2004/12/25/Python-on-Parrot-test-status Merry Christmas. - Sam Ruby

Re: MMD and VTABLE_find_method

2004-12-23 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: First, a few things to note: the semantics of add vary from language to language. In particular, add is not guaranteed to be commutative in Python (think string addition). Yes, of course. It seems obvious, but it leads to surprises. Example: '1' + '2

Re: MMD and VTABLE_find_method

2004-12-22 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: Leopold Toetsch wrote: A foo PMC could represent an entire row in a two dimensional MMD, or an entire plane in a three dimensional MMD, ... etc. What does it mean: represent a row...? What about the namespace pollution? Again: where does this hypothetical

Re: MMD and VTABLE_find_method

2004-12-22 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: First, a direct quote from http://www.perl.com/pub/a/2004/04/16/a12.html?page=10: Please let's stay at the basics. Please describe your counter proposal for a very elementary add Px, Py, Pz operation. There's really no need to procede to Perl6 objects

Re: P5 is the new P2

2004-12-21 Thread Sam Ruby
on an instance, as well as reinserting the argument as the first parameter (shifting each of the curent parameters in the process). Blech. - Sam Ruby

Re: MMD and VTABLE_find_method

2004-12-21 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: Leopold Toetsch wrote: However, from http://www.perl.com/pub/a/2004/04/16/a12.html?page=10: Whenever you make a call using subroutine call syntax, it's a candidate for multiple dispatch. I read this to mean that the *caller* does nothing

Re: cvs commit: parrot/dynclasses pybuiltin.pmc pyclass.pmc pyfunc.pmc pylist.pmc pynone.pmc

2004-12-21 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: --- nci.pmc7 May 2004 10:33:26 - 1.27 +++ nci.pmc20 Dec 2004 22:27:11 - 1.28 +=item CPMC* get_attr_str(STRING *name) + +Return attribute named Cname. + +=cut + +*/ + +PMC* get_attr_str(STRING* idx

Re: MMD and VTABLE_find_method

2004-12-21 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: Leopold Toetsch wrote: A few things to note: foo is a PMC. It therefore is an object. It can have state (properties, attributes, etc). It can know how many arguments are involved in multiple dispatch. The MMD information can't hang off the Sub PMCs. How

Re: cvs commit: parrot/dynclasses pybuiltin.pmc pyclass.pmc pyfunc.pmc pylist.pmc pynone.pmc

2004-12-21 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: Leopold Toetsch wrote: What is the rational for this pythonism in Parrot core? +The line of code in test case t/pie/b3 that motivates this is: + + print using, cmp.__name__ + +Where cmp may be a NCI subroutine. Python's builtin cmp is basially a Sub PMC

Re: MMD and VTABLE_find_method

2004-12-20 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: Leopold Toetsch wrote: The caller sets: mmd_flag := NULL ... no MMD, plain method lookup mmd_flag := depth ... return the next matching method starting at the given parent search depth In the general case, how does

Re: MMD and VTABLE_find_method

2004-12-19 Thread Sam Ruby
cache. Once it is ready and tested, we can explore setting things up so that the various mmd_dispatch_* functions to exploit this functionality for the existing predefined binary operations. - Sam Ruby

Re: runops_args vs NCI

2004-12-18 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: However, VTABLE_invoke on NCI methods is where the real work is done (including reading from and writing to registers), and a null dest is returned. One more remark: This is classes/nci.pmc:invoke void* invoke (void * next) { Parrot_csub_t func

Re: runops_args vs NCI

2004-12-17 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: However, VTABLE_invoke on NCI methods is where the real work is done (including reading from and writing to registers), and a null dest is returned. Ouch. Sorry, probably cut'n'paste code, relicts or whatever. runops_* isn't supposed to be called for NCI

Re: runops_args vs NCI

2004-12-17 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: Leopold Toetsch wrote: Sam Ruby wrote: However, VTABLE_invoke on NCI methods is where the real work is done (including reading from and writing to registers), and a null dest is returned. Ouch. Sorry, probably cut'n'paste code, relicts or whatever. runops_

Re: runops_args vs NCI

2004-12-17 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: But I need to do more than that. I need to do what Parrot_run_meth_fromc_args is attempting to do (i.e., create a return continuation and do argument or returnvalue passing.), but correctly. 1) runops_fromc and friends are running *opcodes*, nothing else 2

Re: RT#31859, Plain ole Hash

2004-12-17 Thread Sam Ruby
(fromkeys), Iterator(next), and PerlHash(fromkeys) now? - Sam Ruby

Re: cvs commit: parrot/ops pmc.ops

2004-12-16 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: I don't understand this. At all. But the test case added to pyclass.t (motivated by test 4 in pie/b3.t) only passes if this change to the get_repr op is made. [ ... ] -op get_repr(out STR, in PMC) { -$1 = $2-vtable-get_repr

Re: overloaded operator calling conventions

2004-12-16 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: A few observations, first from an Parrot Internal perspective... in general, the code for the opcodes tend to do things like the following: $1-vtable-get_string(interpreter, $1) Note that the object tends to be repeated as the first argument. It often

Re: cvs commit: parrot/ops pmc.ops

2004-12-16 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: Leopold Toetsch wrote: +inline op get_repr(out STR, in PMC) { +STRING *s = $2-vtable-get_repr(interpreter, $2); +$1 = s; goto NEXT(); } Strange. Stranger. Strangest. Did the test fail with JIT/i386 only? I didn't mean to commit the inline

Re: cvs commit: parrot vtable.tbl

2004-12-16 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: My need is to be able to call add_method for methods defined as @ANON. This doesn't make sense to me. The @ANON pragma avoids the add_method (or store_global) call in the first place. I don't want the method added to a namespace, or stored as a global. I

runops_args vs NCI

2004-12-16 Thread Sam Ruby
the invoke couldn't be done immediately prior to the call to runops? - Sam Ruby

Re: Context, wrappers, and rules

2004-12-16 Thread Sam Ruby
on dual assumptions: (1) that wrappers aren't needed in the majority of cases, and (2) every time someone gets or sets a method, a mapping can be done from language defined names to Parrot conventions. Note that in Python, all attributes may potentially be a method. - Sam Ruby

Re: Context, wrappers, and rules

2004-12-16 Thread Sam Ruby
after that point, and still retains this new value when control returns to Parrot_get_repr_s_p. - Sam Ruby

Re: overloaded operator calling conventions

2004-12-16 Thread Sam Ruby
) at runtime. At the moment, I'm storing this as a property. - Sam Ruby

Re: [CVS ci] class autoload

2004-12-16 Thread Sam Ruby
into the equivalent new Px, Ic variety in many cases. 3) The pybuiltin.__load__() function is automatically called by the library _init loading hook now. There is one more test in t/dynclases/pybuiltins that has an example. Cool, thanks! - Sam Ruby

Re: cvs commit: parrot vtable.tbl

2004-12-16 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: Leopold Toetsch wrote: cvsuser 04/12/15 02:36:29 Modified:.vtable.tbl Log: stub in object vtables [snip] +void add_parent(PMC* parent) +void become_parent(PMC* class) +INTVAL class_type() +void add_method(STRING* method) +void

Context, wrappers, and rules (was: cvs commit: parrot/ops pmc.ops)

2004-12-16 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby wrote: Before this line is executed, (gdb) p interpreter-ctx.bp $1 = (struct parrot_regs_t *) 0x40b6bd88 After the above line is executed: (gdb) p interpreter-ctx.bp $2 = (struct parrot_regs_t *) 0x40b6bae8 Then is obviously your implementation of get_repr

[patch] runops

2004-12-14 Thread Sam Ruby
were active when the Sub was invoked. This patch brings Parrot_runops_fromc to parity by providing access to those registers. - Sam Ruby Index: include/parrot/interpreter.h === RCS file: /cvs/public/parrot/include/parrot

Re: [perl #33036] [BUG] python dynclasses build failure

2004-12-14 Thread Sam Ruby
/dynclass/pybuiltinok t/dynclass/pyclass..ok t/dynclass/pyfunc...ok t/dynclass/pyintok All tests successful. Files=4, Tests=37, 8 wallclock secs ( 7.59 cusr + 0.62 csys = 8.21 CPU) - Sam Ruby

Re: cvs commit: parrot/t/pmc delegate.t object-meths.t objects.t sub.t

2004-12-12 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: I'll go back and all the necessary interpinfo calls, but I feel compelled to ask: why isn't P2 passed? P2 is a non-preserved register and as such rather improper to hold the object throughout a whole method. I wasn't assuming is lasted

Re: overloaded operator calling conventions

2004-12-11 Thread Sam Ruby
and documentation of a complete proposal on how this can work. - Sam Ruby P.S. Peeking at the current implementation may not be wise, as a number of shortcuts were taken (example: int objects behave as their own class, etc), which confuses the picture.

Re: cvs commit: parrot/t/pmc delegate.t object-meths.t objects.t sub.t

2004-12-11 Thread Sam Ruby
calls, but I feel compelled to ask: why isn't P2 passed? It seems to me quite likely that most methods will want to know what object they are working on. - Sam Ruby .sub main @MAIN newclass $P0, 'c' find_type $I0, 'c' new $P1, $I0 new $P2, .PerlInt $P2 = 1234 setprop $P1, 'p

Re: Dynamic libs don't seem to work

2004-12-10 Thread Sam Ruby
: No such file or directory Try rebuilding after you issue the following from your top level parrot directory: perl Configure.pl --prefix=`pwd` - Sam Ruby

Re: Python method overloading

2004-12-10 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: I continue to disagree with the part of this conclusion where you insert find_method into the discussion. To give a concrete example: at the moment the lookup involved in abs_p_p does not involve the use of find_method. $ cat abs.imc .sub

Re: [CVS ci] class refactoring 1 - Integer

2004-12-10 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: I took a look into this. Apparently, in Perl5, the result of xor'ing undef with anything is undef. I'm not suggesting that this is either right or wrong (it actually was surprising to me), Yep. It doesn't really follow the definition

Re: Dynamic libs don't seem to work

2004-12-10 Thread Sam Ruby
Klaas-Jan Stol wrote: Sam Ruby wrote: Klaas-Jan Stol wrote: Hello, I just got a fresh cvs checkout, compiled it, compiled pge and tried to make tcl. This is what I get: (cd ../../ ./parrot --output=languages/tcl/lib/tcllib.pbc languages/tcl/lib/tcllib.imc) Couldn't load 'tcl_group': tcl_group

Re: [CVS ci] class refactoring 1 - Integer

2004-12-10 Thread Sam Ruby
) { const MMD_init _temp_mmd_init[] = {...}; Parrot_mmd_register(interp, entry, _temp_mmd_init, N_MMD_INIT); } followed later by the following calls: Parrot_scalar_mdd_init(interp, entry); Parrot_Integer_mmd_init(interp, entry); Parrot_PerlInt_mmd_init(interp, entry); - Sam Ruby

Re: [CVS ci] class refactoring 1 - Integer

2004-12-10 Thread Sam Ruby
Eirik Berg Hanssen wrote: Leopold Toetsch [EMAIL PROTECTED] writes: Sam Ruby [EMAIL PROTECTED] wrote: I took a look into this. Apparently, in Perl5, the result of xor'ing undef with anything is undef. I'm not suggesting that this is either right or wrong (it actually was surprising to me), Yep

Re: [CVS ci] class refactoring 1 - Integer

2004-12-10 Thread Sam Ruby
Mike Guy wrote: Perl5 Cxor always returns a standard boolean value, i.e. dualvar(0, '') or dualvar(1, '1').Perl6/Parrot should do the same thing. Try: perl -le print 'day' xor 'night' On the version of Perl I have installed, I get day as the result. - Sam Ruby

Re: Python method overloading

2004-12-09 Thread Sam Ruby
(and likely other languages). That is only because the design you have in mind conflates Parrot and language operations. There is no reason that __abs__ couldn't call VTABLE_abs, or that __add__ can't make use of MMD_ADD. - Sam Ruby

Re: Premature pessimization

2004-12-08 Thread Sam Ruby
Ah! Now we are getting somewhere! Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: Leopold Toetsch wrote: So *all* lookups (complete with the asterisks) does not mean *all* lookups. How about invoke? Let's first concentrate on simpler stuff like infix operators. OK, but the point

Re: Premature pessimization

2004-12-08 Thread Sam Ruby
. - Sam Ruby

Re: Python method overloading

2004-12-08 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: Leopold Toetsch wrote: Here's the part that you snipped that addresses that question: And there is a piece that I haven't written yet that will do the reverse: if MMD_ADD is called on a PyObject that has not provided such behavior

Re: Python method overloading

2004-12-08 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: [ snipped - all ok } If I define an __add__ method with 16 arguments, Python will not throw an exception. I didn't write that. I've said: *if* you call it via a + b, Python throws an exception - that one I've shown. Anyway... What you wrote

Re: Premature pessimization

2004-12-07 Thread Sam Ruby
any issues with this plan, please let me know now. - Sam Ruby

Re: [CVS ci] pow, hash, instantiate

2004-12-07 Thread Sam Ruby
with implicit registers. new_p_p would be the method signature I would prefer. The name of the vtable entry could remain instantiate. - Sam Ruby

Re: Premature pessimization

2004-12-07 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: Leopold Toetsch wrote: Another good reason to use pmc-vtable-fine_method in *all* lookups. So the PMC has full control over the dispatch. How does one lookup the Cfind_method method? That will remain a VTABLE, entry right? Yes of course

Re: Premature pessimization

2004-12-06 Thread Sam Ruby
that a solution emerges that doesn't involve significant reduction in functionallity. I might be misunderstanding you, but it sounds to me like you are proposing ditching lexical pads. - Sam Ruby

Re: Premature pessimization

2004-12-06 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: Leopold Toetsch wrote: correct. I've discovered and analysed the problem with continuations. I've made a proposal to fix that. No one has said that it's technically wrong or couldn't work. It seems you are liking the idea, but Dan doesn't

Re: [perl #32877] parrot build broken in Tru64, cc/ld confusion

2004-12-06 Thread Sam Ruby
in config/init/data.pl as the Tool used to build shared libraries and dynamically loadable modules. I can't find anything that fails if this is removed, so I committed the change. - Sam Ruby

Re: Premature pessimization

2004-12-06 Thread Sam Ruby
Leopold Toetsch wrote: Sam Ruby [EMAIL PROTECTED] wrote: Leopold Toetsch wrote: My philosophy is simple: things without test cases tend not not get fixed, and when fixed, tend not to stay fixed. There is of course a test case. I have mentioned it at least 20 times ;) t/op/gc_13.imc - currently

Re: Perl 6 Summary for 2004-11-29 through 2004-12-06

2004-12-06 Thread Sam Ruby
Matt Fowles wrote: keyword arguments Sam Ruby wondered how he out to handle keyword arguments to functions. Dan admitted that this is complex and outlined the cheat he has been contemplating. No one has either commented on or implemented it yet. http://xrl.us/d955 Oh, yes, I did

Re: MMD: more implications

2004-12-05 Thread Sam Ruby
, and then to the common code which backs it. There are advantages and disadvantages to making the dispatch methods the same. Ultimately, if they are the same, the names should be picked in a way that minimizes the possibility of collisions. If they differ, no such possibility exists. - Sam Ruby

perlhash iter busted

2004-12-03 Thread Sam Ruby
Test case attached. - Sam Ruby Index: t/pmc/perlhash.t === RCS file: /cvs/public/parrot/t/pmc/perlhash.t,v retrieving revision 1.48 diff -u -r1.48 perlhash.t --- t/pmc/perlhash.t1 Oct 2004 21:16:52 - 1.48 +++ t/pmc

Re: Objects, classes, metaclasses, and other things that go bump in the night

2004-12-02 Thread Sam Ruby
used, will operate correctly by invoking to the opcodes. I *don't* see a need to heavily optimize for rarely used mechanisms. I encourage you to check out Pirate. The IMCC output of pirate.py is now remarkably close to the output of pie-thon.pl. - Sam Ruby

PDD 03 Issue: keyword arguments

2004-11-30 Thread Sam Ruby
]: print j(a=1,b=2,c=3) for j in [f,g]: print j(*args.values()) for j in [f,g]: print j(**args) I see nothing in pdd 03 that provides any guidance as to how to handle this. What makes this issue so critical is that any solution will potentially affect *every* function. - Sam Ruby P.S

Re: EcmaScript

2004-11-27 Thread Sam Ruby
Jeff Clites wrote: On Nov 27, 2004, at 5:58 PM, liorean wrote: On Sat, 27 Nov 2004 19:30:20 -0500, Sam Ruby [EMAIL PROTECTED] wrote: Overall, JavaScript would be a good match for Parrot. One place where it would significantly diverge at the moment is in the concept of a class. Objects

Re: deprecated transcendental ops with I arguments

2004-11-26 Thread Sam Ruby
with this deprecation as well as introduction of the new push_eh opcode. All that being said, would it make sense to collect these type of changes to a single place in CVS or on the web? A simple CHANGES file in CVS, with a list of interfaces deprecated and removed since 0.1.1 would sufficient. - Sam

Re: Inconsistent opcode names

2004-11-21 Thread Sam Ruby
Leopold Toetsch wrote: There are likely some more inconsistencies, which should be fixed rather sooner then later. One that I noticed: =item Bgetattribute(out PMC, in PMC, in STR) =item Bgetprop(out PMC, in STR, in PMC) - Sam Ruby

Re: cvs commit: parrot/imcc/t/syn bsr.t

2004-11-21 Thread Sam Ruby
Leopold Toetsch wrote: cvsuser 04/11/19 08:28:06 Modified:imcc/t/imcpasm opt0.t optc.t pcc.t imcc/t/syn bsr.t Log: replace invoke P1 in imcc tests Revision ChangesPath 1.7 +2 -2 parrot/imcc/t/imcpasm/opt0.t [snip] - invoke P1/ + returncc/

Re: [PATCH] allow find-method to be inherited

2004-11-14 Thread Sam Ruby
Sam Ruby wrote: A patch is attached, but it bears a little discussion. Well, that didn't exactly work. I've since commmitted these patches, and more. A the moment, all the python and pirate unit tests pass. (Woot!) In the absense of other direction, I plan to write more tests and use them

[PATCH] allow find-method to be inherited

2004-11-09 Thread Sam Ruby
, with the exception of the getprop test mentioned above. I've also posted more thoughts and background at [4]. - Sam Ruby [1] http://intertwingly.net/stories/2004/11/09/parrot/ [2] http://intertwingly.net/stories/2004/11/09/parrot.tgz [3] http://intertwingly.net/stories/2004/11/09/pirate/ [4] http

Re: Basic operations for MMD

2004-11-09 Thread Sam Ruby
need to post a big bold lighthouse at. If you can wait a few weeks, I'm willing to take a stab at it, but just not yet. If somebody else takes the lead, I will certainly contribute. - Sam Ruby

Re: No Cpow op with PMC arguments?

2004-11-05 Thread Sam Ruby
, there will need to be a check to ensure that the method to be called was, in fact, overridden. If not, a type_error exception will be thrown. - Sam Ruby

  1   2   >