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
- 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 7/31/2003 -0600, Luke Palmer wrote:
> >You mind
Hi,
I am writing a parrot code generator back-end to an interpreter for a
long-lost (some would say "dead", but I prefer "hibernating" :-)
programming language: Comal (see http://www.josvisser.nl/opencomal).
Anyway, in the course of my code generation I have run into the
situation where I think I
Jerome Quelin <[EMAIL PROTECTED]> wrote:
> - will objects introduce a speed overhead?
For sure, but not a big one. You can AFAIK obtain an integer index for
an attribute or method so its basically an array lookup.
> - if I implement the Lahey space module as a regular module, how can I
> declar
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
- 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 little project "pirate" (s.
> > http://mem
Leopold Toetsch <[EMAIL PROTECTED]> writes:
> Juergen Boemmels wrote:
>
> > Leopold Toetsch <[EMAIL PROTECTED]> writes:
> > [...]
>
> >
>
> >>PIO_eprintf
> >>PIO_printf
> >>
> >>for printing to stderr/stdout during 1st interpreter construction &
> >>destruction if something goes wrong. In all o
Juergen Boemmels <[EMAIL PROTECTED]> wrote:
> They should not fail more drastic than necessary. Only fail if its not
> possible to report an error to the upper level.
Yep. That's right. To panic() is not necessary nost of the time.
> bye
> boe
leo
Kenneth A Graves <[EMAIL PROTECTED]> wrote:
> The .pcc_* directives are working for me in terms of implementing
> function calls. I want to do something similar for iterator calls.
> I've decided to implement iterators using coroutines.
I have applied it. The test program foo.pir is now a test i
Jos Visser <[EMAIL PROTECTED]> wrote:
> Hi,
> 1)Is there an efficient way to trap the failure of a "find_lex"?
Not yet. We have to clean up the internal_exception stuff first.
C could e.g. return a NULL in case of failure, and we could
then throw an exception in F at the opcode-level, so that
John Siracusa:
> Did this ever get resolved to anyone's satisfaction? While reading
> EX6, I found myself wonder exactly what for() would look like in Perl 6
> code...
Well, the easiest signature to do is probably:
sub for([EMAIL PROTECTED]) {
PRE { @list.end =~ Code }
...
We have been discussing how to pass data to Tk callbacks.
In particular Entry widget validation routines.
There are a number of items that they _might_ be interested in
but a typical routine would only use a few.
Currently it passes them all as positional parameters.
One idea that occured to me/
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
Kenneth A Graves <[EMAIL PROTECTED]> wrote:
> Inside the iterator, there are three differences compared to a function:
> 1) Every register in use needs to be saved to the user stack. (Anyone
> have a clean way to do this?)
Its the same thing as calling a subroutine in the first place. Imcc has
t
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
Joseph F. Ryan wrote:
> Benjamin Goldberg wrote:
>> Joseph Ryan wrote:
>>> Benjamin Goldberg wrote:
[snip]
Hmm... If imcc is smart enough, (or perhaps I should say, when the
flow control is simple/clear enough) it should be able to see when a
value is pushed onto the stack, and late
Benjamin Goldberg wrote:
[snip]
> If someone's code emits something like:
>
>save $P1
>restore $P2
>
> Then IMCC should be able to optimize that to:
>
>$P = $P1
>$P2 = $P
Actually, that (sometimes) should be able to be changed to:
$P2 = $P1
noop
or:
noop
Leopold Toetsch wrote:
> Jerome Quelin <[EMAIL PROTECTED]> wrote:
> > - will objects introduce a speed overhead?
> For sure, but not a big one. You can AFAIK obtain an integer index
> for an attribute or method so its basically an array lookup.
Nice. So maybe I'll go for an object...
> > - if
Leopold Toetsch wrote:
> OK here it is.
> Again the description for the record:
>
> 1) Initialization:
> - normal core: build op_func_table with all opcode #4 [1]
> - CG core: build ops_addr[] filled with this opcode
> - prederef cores: build a list of (backward) branch instructions
>
On Wednesday, July 30, 2003, at 04:28 , Dan Sugalski wrote:
At 12:43 +0200 7/30/03, Leopold Toetsch wrote:
I have started looking at dynamic classes. I have currently
- new subdirectory /dynclasses
- small hack for classes/pmc2c.pl to consider this directory too
- dynclasses/foo.pmc, dynclasses/M
Benjamin Goldberg <[EMAIL PROTECTED]> wrote:
> Leopold Toetsch wrote:
>> OK here it is.
>> Again the description for the record:
>>
>> 1) Initialization:
>> - normal core: build op_func_table with all opcode #4 [1]
>> - CG core: build ops_addr[] filled with this opcode
>> - prederef cor
Benjamin Goldberg wrote:
save $P1
restore $P2
[ ... ]
$P2 = $P1
or even removed entirely, rewriting everything after the "" to refer
to $P1 instead of $P2. Does imcc do anything like this?
Not yet. But it will do, at least for Parrot calling conventions, where
register moves should
Jerome Quelin <[EMAIL PROTECTED]> wrote:
> Leopold Toetsch wrote:
>> Just put a ".local" or ".sym" declaration outside/in front of your
>> subs. This declares a file-scoped variable.
> It does not seem to be file-scoped:
.include gets pulled in inside the lexer, so its the same, as it were in
tha
Hey all,
I've got lambda (single-expression anonymous subroutine)
working in pirate now, but I wasn't sure how to get it
to do the correct calling convention with IMCC's "call".
For example, pirate turns this:
print (lambda x: x+1)(0) # prints "1\n"
into this: (the commented line is the i
[EMAIL PROTECTED] (Rod Adams) wrote in message
> Proposed behavior of *?@ : All Arguement to Parameter mapping left of it
> are processed Left to Right. Once seen, the mapping starts over right to
> left. Everything remaining is slurpable.
>
> Yes, it's more expensive to use, just like the RE vers
Is it possible with the new parameter declaration syntax to declare
a mandatory name-only parameter?
-Mark
> Is it possible with the new parameter declaration syntax to declare
> a mandatory name-only parameter?
Not directly, no. However, some trickyness with macros would probably
let you do it. I don't yet understand macros well enough to show
you...
Luke
> Mark
> [EMAIL PROTECTED] (Rod Adams) wrote in message
>
> > Proposed behavior of *?@ : All Arguement to Parameter mapping left of it
> > are processed Left to Right. Once seen, the mapping starts over right to
> > left. Everything remaining is slurpable.
> >
> > Yes, it's more expensive to use, just li
In E6, Damian write: "A junction is a single scalar value that can act like
two or more values at once".
Whenever I see a statement like this, I tend ask myself "What happenned to
zero and one?". Perhaps its intentional; perhaps its sloppy writing. What
issues arise with junctions of 0 or 1 member
On 2003-08-01 at 09:54:57, Dave Whipp wrote:
> A junction on one element is almost always redundant, and can be cast
> directly into the scalar that is its eigenstate. The only issue with doing
> that is that certain junction methods might not be available. However, in
> the case of a C, an abjunct
"Mark J. Reed" <[EMAIL PROTECTED]>
> Quick, dumb question: what is an "abjunction"? How does it differ
> from a junction?
An abjuction requires that none of its members match. For example,
($a == none(1,2,3)) is true for any value of $a except 1, 2 or 3.
Dave.
> In E6, Damian write: "A junction is a single scalar value that can act like
> two or more values at once".
>
> Whenever I see a statement like this, I tend ask myself "What happenned to
> zero and one?". Perhaps its intentional; perhaps its sloppy writing. What
> issues arise with junctions of 0
> "Mark J. Reed" <[EMAIL PROTECTED]>
> > Quick, dumb question: what is an "abjunction"? How does it differ
> > from a junction?
>
> An abjuction requires that none of its members match. For example,
> ($a == none(1,2,3)) is true for any value of $a except 1, 2 or 3.
Actually, no :-)
disjunc
Hi, all. I've been following Parrot development and
been playing with Parrot for a...bout a year and a
half, now. First time posting to the list, though, so
forgive me if this has already been covered or is
stupid in some way :-)
Anyway, while playing around with IMCC, this kind of
bugged me:
P3
I think you should try to implement lamda through .Sub's. Take a look at
parrot/t/pmc/sub.t for some examples. However, you might not be able to rely on IMCC
to handle arguments and results so much, since I don't think IMCC uses the new cps
calling style yet. (but I'm not sure, so don't hold
If I understood well, the problem is that subroutines can be saved in
variables, right (or registers for that matter)?
So, if there is some subroutine "f", you could just do:
$I1 = addr _f# get address of subroutine f
$P1 = new Sub# create a new Sub PMC
$P1 = $I1# store add
Hi everybody,
That was nice to meet many of you in person at YAPC::EU,
I am trying to learn about continuations and Parrot. I hit a
problem of register allocation. I don't know if it is a
miscomprehension from me or a bug. Probably the former.
Apparently P16 is used both for my Perlhash and the S
> Hi everybody,
>
> That was nice to meet many of you in person at YAPC::EU,
>
> I am trying to learn about continuations and Parrot. I hit a
> problem of register allocation. I don't know if it is a
> miscomprehension from me or a bug. Probably the former.
> Apparently P16 is used both for my Pe
Michal Wallace <[EMAIL PROTECTED]> wrote:
> Hey all,
> I've got lambda (single-expression anonymous subroutine)
> working in pirate now, but I wasn't sure how to get it
> to do the correct calling convention with IMCC's "call".
I'm pretty sure, that you should use Parrot calling conventions for
Joseph F. Ryan <[EMAIL PROTECTED]> wrote:
> I think you should try to implement lamda through .Sub's. Take a look
> at parrot/t/pmc/sub.t for some examples. However, you might not be
> able to rely on IMCC to handle arguments and results so much, since I
> don't think IMCC uses the new cps callin
Luke Palmer wrote:
I think we should remove nested subs from imcc, because they aren't
buying us anything and are only causing confusion.
Yep. Melvin is for this too.
I said, there are users of this "feature", so be careful, but again
another one falling into the very same trap ...
The user ba
Date: Fri, 1 Aug 2003 22:46:29 +0200
From: Stéphane Payrard <[EMAIL PROTECTED]>
I am trying to learn about continuations and Parrot. I hit a
problem of register allocation. I don't know if it is a
miscomprehension from me or a bug. Probably the former.
Apparently P16 is used both
From: Leopold Toetsch <[EMAIL PROTECTED]>
Date: Fri, 1 Aug 2003 14:50:05 +0200
Kenneth A Graves <[EMAIL PROTECTED]> wrote:
> Inside the iterator, there are three differences compared to a function:
> 1) Every register in use needs to be saved to the user stack. (Anyone
> have a
FWIW, we're aware of the problem.
I posed this very question to Larry a few months back, when I was writing E6.
We're still mulling over the correct answer. The last thought on the problem
that Larry's shared with me was that there may need to be a special case for
allowing a single &block param
Trey asked:
To take the E6 example of currying &part:
&List::Part::part.assuming(labels => <>)
One had to curry in C to be the same as it was defined in C<&part>
originally, i.e. C<< <> >>.
What if one wanted to curry in whatever the default is, i.e., assuming
"nothing" (different from "assum
> Trey asked:
>
> > To take the E6 example of currying &part:
> >
> >&List::Part::part.assuming(labels => <>)
> >
> > One had to curry in C to be the same as it was defined in C<&part>
> > originally, i.e. C<< <> >>.
> >
> > What if one wanted to curry in whatever the default is, i.e., assu
I wrote:
> Damian explains:
> > Trey asked:
> >
> > > To take the E6 example of currying &part:
> > >
> > >&List::Part::part.assuming(labels => <>)
> > >
> > > One had to curry in C to be the same as it was defined in C<&part>
> > > originally, i.e. C<< <> >>.
> > >
> > > What if one wanted
Mark J. Reed wrote:
Is it possible with the new parameter declaration syntax to declare
a mandatory name-only parameter?
Probably. I think that the '?', '*', and '+ prefixes are abbreviations for
traits (C, C, C). So a named,
mandatory parameter would be:
sub foo($bar is named) {...}
Alternat
[EMAIL PROTECTED] (Damian Conway) writes:
> The last thought on the problem that Larry's shared with me was that there
> may need to be a special case for allowing a single &block parameter after
> the slurpy
And the Rubyometer creeps up another few notches...
(Gosh, you'd almost think that Matz
Hello,
Do junctions have a direct representation as predicate logic statements?
In particular, do the following logic statements correspond directly
to the following perl6 junctions:
LOGIC PERL6 JUNCTION (DESCRIP)
=
(forall x)(x
On Fri, 1 Aug 2003, Derek Ross wrote:
> Do junctions have a direct representation as predicate logic statements?
> In particular, do the following logic statements correspond directly
> to the following perl6 junctions:
>
> LOGIC PERL6 JUNCTION (DESCRIP)
> =
> Hello,
>
> Do junctions have a direct representation as predicate logic statements?
Yes. Damian and I have already worked them out in a link I have
already posted today:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&selm=3DF2FE76.6050602%40conway.org&rnum=2
> In par
Nick Ing-Simmons wrote:
We have been discussing how to pass data to Tk callbacks.
In particular Entry widget validation routines.
There are a number of items that they _might_ be interested in
but a typical routine would only use a few.
Currently it passes them all as positional parameters.
One
I had an idea yesterday. On more than one occassion, a I've been asked
about running tests against a live site. My usual waffle is to talk about
assertions or to build a seperate test suite which is explicitly non-modifying.
Or something Skud came up with which was to tag blocks of tests in the s
On Fri, Aug 01, 2003 at 01:07:15PM -0700, Michael G Schwern wrote:
> Another way is to use a TEST: block
> and have Filter::Simple strip them out.
>
> TEST: {
> cmp_ok( ... );
> }
> Questions? Comments? Approval?
Hell, why wait for wiser heads?
http://www.pobox.com/~schwern/Tes
Make that...
http://www.pobox.com/~schwern/src/Test-AtRuntime-0.01.tar.gz
--
I knew right away that my pants and your inner child could be best friends.
Michael G Schwern wrote in perl.qa :
> The only part missing is the ability to shut the tests off once you've
> released it to production.
You could perhaps use the assertion feature of perl >= 5.9.0
(assertion.pm and -A switch -- yes I know it lacks docs.)
On Friday, August 1, 2003, at 09:07 pm, Michael G Schwern wrote:
[snip]
I was thinking about inline testing, Test::Class and such and how it
would
be nice if we could just write test functions right in our code, like
assertions. Like Carp::Assert::More, but I want all the Test:: stuff
available.
On Fri, Aug 01, 2003 at 11:01:15PM +0100, Simon Cozens wrote:
: [EMAIL PROTECTED] (Damian Conway) writes:
: > The last thought on the problem that Larry's shared with me was that there
: > may need to be a special case for allowing a single &block parameter after
: > the slurpy
:
: And the Rubyome
I'm sure it needs a few tweaks, but I've managed to write a hq9+
interpreter in pasm.
[insert deity here] help us all. :-)
Any thoughts on this?
http://www.thetasigma.com/parrot/
dha
--
David H. Adler - <[EMAIL PROTECTED]> - http://www.panix.com/~dha/
"It's all eggs, bacon, beans and a fried s
60 matches
Mail list logo