Re: subroutines and python status

2003-08-01 Thread Michal Wallace
On Fri, 1 Aug 2003, Dan Sugalski wrote: > At 11:04 PM +0200 7/31/03, Leopold Toetsch wrote: > >Luke Palmer <[EMAIL PROTECTED]> wrote: > >> You mind submitting a patch to put this in the languages/pirate > > >I'd appreciate that very much. Pie-thon, here we come ... > > As would I. If you're willin

Re: subroutines and python status

2003-08-01 Thread Dan Sugalski
At 11:04 PM +0200 7/31/03, Leopold Toetsch wrote: Luke Palmer <[EMAIL PROTECTED]> wrote: You mind submitting a patch to put this in the languages/pirate I'd appreciate that very much. Pie-thon, here we come ... As would I. If you're willing, Michal, we can check it in and get you CVS repository

Re: subroutines and python status

2003-08-01 Thread K Stol
- Original Message - From: "Leon Brocard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 01, 2003 1:30 AM Subject: Re: subroutines and python status > K Stol sent the following bits through the ether: > > > Actually, I named my li

Re: subroutines and python status

2003-08-01 Thread Leon Brocard
K Stol sent the following bits through the ether: > Actually, I named my little project "pirate" (s. > http://members.home.nl/joeijoei/parrot for this) already, but it's a bit of > a dead end already (although I learnt much of it), so I don't mind. Quick, we need more parrot jokes... I don't li

Re: subroutines and python status

2003-08-01 Thread K Stol
- Original Message - From: "Melvin Smith" <[EMAIL PROTECTED]> To: "Luke Palmer" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, July 31, 2003 3:33 PM Subject: Re: subroutines and python status > At 01:51 PM

JVM->PIR translator (was: Re: subroutines and python status)

2003-08-01 Thread Joseph Ryan
Leopold Toetsch wrote: Luke Palmer <[EMAIL PROTECTED]> wrote: You mind submitting a patch to put this in the languages/pirate I'd appreciate that very much. Pie-thon, here we come ... Speaking of adding new projects to languages, I have a partially complete JVM->PIR translator done. It's comp

Re: subroutines and python status

2003-07-31 Thread Melvin Smith
At 01:51 PM 7/31/2003 -0600, Luke Palmer wrote: You mind submitting a patch to put this in the languages/pirate directory of the parrot distro? I'd like to stay up to date, and probably do some work (as, I imagine, would others). I'd like to officially complain that "pirate" is a cooler name than

Re: subroutines and python status

2003-07-31 Thread Melvin Smith
At 02:54 PM 7/31/2003 -0400, Michal Wallace wrote: Actually, between imcc and the python compiler module, it's not nearly as hard as I thought it would be. So far, I think the parrot version is actually a lot simpler than the python compiler, just because imcc is doing so much of the work. Leo and

Re: subroutines and python status

2003-07-31 Thread Leopold Toetsch
Luke Palmer <[EMAIL PROTECTED]> wrote: > You mind submitting a patch to put this in the languages/pirate I'd appreciate that very much. Pie-thon, here we come ... > Luke leo

Re: subroutines and python status

2003-07-31 Thread Leopold Toetsch
Michal Wallace <[EMAIL PROTECTED]> wrote: > .sub __start__ >call __main__ > .end > .sub __main__ > .sub _f > print ":)" > ret >.end >$I0 = addr _f >print $I0 >end > .end > That prints ":)", followed by the address, No, can't imagine that: $ parrot -o- pir

Re: subroutines and python status

2003-07-31 Thread Luke Palmer
> > One of my questions is, why do you make so many PerlNums when there > > isn't a trace of a floating point number to be found...? > > Because I didn't read the docs that said PerlNum means "float". :) > I'll switch it to PerlInt (or maybe int?) later... Yeah, all your auxillary data; i.e. th

Re: subroutines and python status

2003-07-31 Thread Michal Wallace
On 31 Jul 2003, Luke Palmer wrote: > > It now runs amk's euclid.py perfectly now. > > Do we have a way to compare the speed vs python? :) > We just modify it to repeat 100,000 times or so, and compare that way. Oh, duh. :) > Which I did. Parrot comes in about 3x slower than python on euclid. >

Re: subroutines and python status

2003-07-31 Thread Michal Wallace
On Thu, 31 Jul 2003, Brent Royal-Gordon wrote: > Michal Wallace: > > I can store all my subroutine definitions in > > a list or something and then dump them out > > after the "__main__" routine. > > That seems to be the way to do it, speaking as someone who's working > on a Perl 5-to-PIL converter

Re: subroutines and python status

2003-07-31 Thread Michal Wallace
On Thu, 31 Jul 2003, Leopold Toetsch wrote: > You can do that: > .sub __main__ >bsr _main >end > .end > .sub _main ... > So you have just to emit code, to call your real main at the beginning. Well that worked, and even let me get rid of the endsub label: .sub __start__ call __main

Re: subroutines and python status

2003-07-31 Thread Luke Palmer
> Hey all, > > I'm trying to get functions working > in python, and I'm not sure the best way > to do this. > > What seems natural to me is to define > subroutines in the middle of the code > as I walk the parse tree: > > .sub __main__ > goto endsub > .sub _f > print ":(\n" >

Re: subroutines and python status

2003-07-31 Thread Leopold Toetsch
Michal Wallace wrote: Hey all, What seems natural to me is to define subroutines in the middle of the code as I walk the parse tree: You can do that: .sub __main__ bsr _main end .end .sub _main .sub _f print ":)\n" ret .end .sub _g print ";-)\n" r

Re: subroutines and python status

2003-07-31 Thread Brent Royal-Gordon
Michal Wallace: > I can store all my subroutine definitions in > a list or something and then dump them out > after the "__main__" routine. Is that the > right approach? It seems strange to me, > but I'm new at this. That seems to be the way to do it, speaking as someone who's working on a Perl 5-