Re: No C op with PMC arguments?

2004-11-04 Thread Brent 'Dax' Royal-Gordon
On Thu, 4 Nov 2004 21:46:19 -0800, Jeff Clites <[EMAIL PROTECTED]> wrote: > On Nov 4, 2004, at 8:29 PM, Brent 'Dax' Royal-Gordon wrote: > > This is true. But how do you define a number? Do you include > > floating-point? Fixed-point? Bignum? Bigrat? Complex? Surreal? > > Matrix? N registers

Re: No C op with PMC arguments?

2004-11-04 Thread Jeff Clites
On Nov 4, 2004, at 8:29 PM, Brent 'Dax' Royal-Gordon wrote: Jeff Clites <[EMAIL PROTECTED]> wrote: I.e., PMCs don't inherently exponentiate--numbers do, and you can exponentiate PMCs by numberizing them, exponentiating, and creating a PMC with the result. This is true. But how do you define a numb

Re: No C op with PMC arguments?

2004-11-04 Thread Brent 'Dax' Royal-Gordon
Jeff Clites <[EMAIL PROTECTED]> wrote: > I.e., PMCs don't inherently exponentiate--numbers do, and you can > exponentiate PMCs by numberizing them, exponentiating, and creating a > PMC with the result. This is true. But how do you define a number? Do you include floating-point? Fixed-point? Bi

Re: Search paths and library routines

2004-11-04 Thread Brent 'Dax' Royal-Gordon
Dan Sugalski <[EMAIL PROTECTED]> wrote: > To make this actually work we need some standards, and the ability to > embed bytecode segments into an executable (like, say, parrot :) so > they're always at hand. The attached patch implements one (evil) way to do this. (Even if we don't end up using t

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: Closures and subs

2004-11-04 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Klaas-Jan Stol <[EMAIL PROTECTED]> wrote: >> Hello, > >> I've been playing with closures and subs but I have a little bit of >> trouble with those. > > newsub $P0, .Closure, _foo > $P0(q) > newsub $P0, .Closure, _foo >

Re: Does Parrot have "True coroutines"?

2004-11-04 Thread Michael Walter
I sense confusion between "closure", "continuation" and "coroutine". http://c2.com/cgi/wiki?ContinuationExplanation http://c2.com/cgi/wiki?ContinuationsAndCoroutines http://c2.com/cgi/wiki?CoRoutine http://c2.com/cgi/wiki?LexicalClosure Cheers, Michael On Thu, 04 Nov 2004 22:11:07 +0100, Klaas-

Re: Are we done with big changes?

2004-11-04 Thread Dan Sugalski
At 4:38 PM -0500 11/4/04, Matt Diephouse wrote: On Tue, 2 Nov 2004 13:35:09 -0500, Dan Sugalski <[EMAIL PROTECTED]> wrote: What, think this warrants a 0.1.2 release? I'm not so sure about that. It's not that big a deal... In the past week, Parrot has seen a dramatic speedup. We're in about the be

Re: Are we done with big changes?

2004-11-04 Thread Matt Diephouse
On Tue, 2 Nov 2004 13:35:09 -0500, Dan Sugalski <[EMAIL PROTECTED]> wrote: > What, think this warrants a 0.1.2 release? I'm not so sure about > that. It's not that big a deal... In the past week, Parrot has seen a dramatic speedup. We're in about the best shape we've been in in the past 4 months:

Re: Does Parrot have "True coroutines"?

2004-11-04 Thread Klaas-Jan Stol
Well, I don't know how "true" coroutines are defined, but Parrot, as it's CPS based, has no problems with coroutines and there are no restrictions to coroutines, AFAIK. To be honest, I hadn't thought of this, either (this "true"-ness of coroutines), but then again, I'm no expert on these thing

Re: Shared library question

2004-11-04 Thread Dan Sugalski
At 3:49 PM -0500 11/4/04, Sam Ruby wrote: Background: Pmc2c.pm emits code which references Parrot_PMC_typenum. This code is present in libparrot.so, which currently is not referenced as a library by the link step for dynclasses. Options include: 1) eliminating this dependency, as it is the onl

Shared library question

2004-11-04 Thread Sam Ruby
Background: Pmc2c.pm emits code which references Parrot_PMC_typenum. This code is present in libparrot.so, which currently is not referenced as a library by the link step for dynclasses. Options include: 1) eliminating this dependency, as it is the only one 2) directly including extend.o int

Search paths and library routines

2004-11-04 Thread Dan Sugalski
Okay, this has been an ongoing source of annoyance, and I think it's time to address it. We need to get search paths for loading of stuff into parrot, both at the pir/pasm assembly level and at runtime for dynamic library loading. Now, bizarrely enough, I *don't* want to build this into parrot

Re: special blocks tests fail on 5.8.0

2004-11-04 Thread Paul Johnson
On Thu, Oct 28, 2004 at 01:31:40PM +1000, [EMAIL PROTECTED] wrote: > I dont know if the code under test is wrong or the expected output. > > I run RH9, which uses Perl 5.8.0. I was getting a failure for > t/aspecial_blocks, indicating a difference in the expected output for a > CHECK {} block.

Branching off the tree

2004-11-04 Thread Dan Sugalski
Since I'm about to start in on some of the Irrevocable Changes (or something like that) to the string system with the new encoding/charset stuff, I tagged CVS and will be working in a branch (I hope). If you feel like watching or playing along at home, the branch is "pluggable_encodings", assu

Re: Does Parrot have "True coroutines"?

2004-11-04 Thread Leopold Toetsch
Klaas-Jan Stol <[EMAIL PROTECTED]> wrote: > Hello, > "Are you sure Parrot support "true" coroutines? Does it integrate > coroutines and closures correctly? (For instance, a single closure may > refer to variables in several different coroutines.)" Well, I don't know how "true" coroutines are defi

Re: Intermittently Failing Benchmarks

2004-11-04 Thread Leopold Toetsch
Matt Diephouse <[EMAIL PROTECTED]> wrote: > Maybe the benchmarks should be part of the test suite? They're valid > code, so they should work at all times: if they don't, something's > broken. Seems like a good opportunity for testing to me. Yep. Patches welcome. But please make sure that they do

Re: Intermittently Failing Benchmarks

2004-11-04 Thread Matt Diephouse
On Thu, 4 Nov 2004 08:57:28 -0800 (PST), Joshua Gatcomb <[EMAIL PROTECTED]> wrote: > What I have found interesting though is when > individual benchmarks don't work. For instance, from > 10/20 to 10/22, gc_generations and gc_header_reuse > would just hange (still running after 10 minutes). > Last

Re: estimating other people's work (was Re: Quality from the Beginning: Better Estimates)

2004-11-04 Thread Stevan Little
Mark, This can be an issue, however I think it is easily solved. 1) Use a mean between the most efficient and least efficient programmers times, since it could be either one (and probably both) who work on it. In many situations, your more efficient programmer is managing your less efficient pr

Intermittently Failing Benchmarks

2004-11-04 Thread Joshua Gatcomb
All: In collecting the historical data for the benchmark statistics and graphs, I discovered that there were a few days where I had to play the CVS time game to get a working parrot for that day. I expected this. What I have found interesting though is when individual benchmarks don't work. For

Re: [PATCH] dynclass build

2004-11-04 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > Are we comfortable adding the dynclasses to the default build target? I think it can go in. > I want to at some point, if only to make really sure that we don't > break them. (As stuff that gets built and tested by default stays up > to date, while the r

Re: [PATCH] dynclass build

2004-11-04 Thread Dan Sugalski
At 3:51 PM +0100 11/4/04, Leopold Toetsch wrote: Dan Sugalski <[EMAIL PROTECTED]> wrote: Are we comfortable adding the dynclasses to the default build target? I think it can go in. Lets do that then. > I want to at some point, if only to make really sure that we don't break them. (As stuff that

Re: Closures and subs

2004-11-04 Thread Leopold Toetsch
Klaas-Jan Stol <[EMAIL PROTECTED]> wrote: > Thanks for your quick reactions. You are welcome. > Indeed, doing > $P0(q) > works ok. I'm a bit confused by syntax then (but I think it makes sense > now, if IMCC sees the "(", it is expecting args I guess) Yep. Function and method calls as well a

Re: No C op with PMC arguments?

2004-11-04 Thread Leopold Toetsch
Jeff Clites <[EMAIL PROTECTED]> wrote: > I feel like we have op-itis and vtable-itis. I'm for sure the last one that would add an opcode or a vtable, if it's not needed. But in that case it has to be one. The PMC can be any kind of plain scalar and also *complex*. We have different operations wit

Does Parrot have "True coroutines"?

2004-11-04 Thread Klaas-Jan Stol
Hello, I spoke (through email) with Roberto Ierusalimschy, one of the creators of the Lua programming language, and I said that Parrot has good support for implementing coroutines and closures (heck, they are explicitly there). However, in a reply, Roberto asked: "Are you sure Parrot support "tru

estimating other people's work (was Re: Quality from the Beginning: Better Estimates)

2004-11-04 Thread Mark Stosberg
I also have a follow-up question: Another real world constraint is that sometimes by the time the client approves the quote, I'm involved in another project and it works better logistically to have another programmer complete the task (or help with it). Since programmers are not "plug and play

Re: Quality from the Beginning: Better Estimates

2004-11-04 Thread Mark Stosberg
Thanks for all the feedback and suggestions for improving estimation. Based on this and other research, I expect to make a sort of "best practices" documentation for use at my small professional services firm. I'm thinking of including these key parts in it: 1. A checklist of things to consider w

Re: No C op with PMC arguments?

2004-11-04 Thread Dan Sugalski
At 1:19 AM -0800 11/4/04, Jeff Clites wrote: On Nov 3, 2004, at 8:09 AM, Dan Sugalski wrote: At 11:04 AM -0500 11/3/04, Sam Ruby wrote: A single pow_p_p_p op backed by a (non-MMD) vtable entry would make it easier to support code like the following: def f(x): return x**3 print f(3), f(2.5) Y

Re: [PATCH] dynclass build

2004-11-04 Thread Sam Ruby
Dan Sugalski wrote: At 10:07 AM +0100 11/4/04, Leopold Toetsch wrote: Sam Ruby <[EMAIL PROTECTED]> wrote: Attached patch makes building in the dynclass ghetto a bit less inhospitable... Thanks, applied. Are we comfortable adding the dynclasses to the default build target? I want to at some point

Re: [PATCH] dynclass build

2004-11-04 Thread Dan Sugalski
At 10:07 AM +0100 11/4/04, Leopold Toetsch wrote: Sam Ruby <[EMAIL PROTECTED]> wrote: Attached patch makes building in the dynclass ghetto a bit less inhospitable... Thanks, applied. Are we comfortable adding the dynclasses to the default build target? I want to at some point, if only to make re

Re: No C op with PMC arguments?

2004-11-04 Thread Sam Ruby
Jeff Clites wrote: On Nov 3, 2004, at 8:09 AM, Dan Sugalski wrote: At 11:04 AM -0500 11/3/04, Sam Ruby wrote: A single pow_p_p_p op backed by a (non-MMD) vtable entry would make it easier to support code like the following: def f(x): return x**3 print f(3), f(2.5) Yeah, it would. I know I'm

Re: Please, Help on I/O

2004-11-04 Thread Marty Pauley
On Thu Nov 4 11:53:45 2004, Christian Aperghis-Tramoni wrote: > > It means the equivalent of the $| in Perl. You can switch off buffering on stdout by doing: getstdout P1 pioctl I0, P1, 3, 0 To switch back to line buffering, do: getstdout P1 pioctl I0, P1, 3, 1 -- Marty

Please, Help on I/O

2004-11-04 Thread Christian Aperghis-Tramoni
I have the folowing program : print "Give me an integer number : ¥n" getstdinP0 readline S1,P0 Its execution gives : 10 Give me an integer number : How is it possible to flush stdout before reading the number. It means the equivalent of the $| in Perl.

Re: Closures and subs

2004-11-04 Thread Klaas-Jan Stol
I now see I made some errors (I explain below) First, I show the Lua code: function newCounter () local i = 0 return function () -- anonymous function i = i + 1 return i end end c1 = newCounter() print(c1()) --> 1 print(c1()) --> 2 This is the translation (and it works! :-) .sub _

Re: Closures and subs

2004-11-04 Thread Luke Palmer
I haven't written PIR in a while, and I'm not terribly familiar with the new changes, but I'll make some guesses. Klaas-Jan Stol writes: > function main() > >local p = 123; >local q = 345; > >foo(q); >foo(q); > >function foo(a) # nested function, it does have access to

Re: Closures and subs

2004-11-04 Thread Klaas-Jan Stol
Leopold Toetsch wrote: Klaas-Jan Stol <[EMAIL PROTECTED]> wrote: Hello, I've been playing with closures and subs but I have a little bit of trouble with those. newsub $P0, .Closure, _foo $P0(q) newsub $P0, .Closure, _foo $P0(q) Closures have to be distinct. leo Tha

Re: No C op with PMC arguments?

2004-11-04 Thread Jeff Clites
On Nov 3, 2004, at 8:09 AM, Dan Sugalski wrote: At 11:04 AM -0500 11/3/04, Sam Ruby wrote: A single pow_p_p_p op backed by a (non-MMD) vtable entry would make it easier to support code like the following: def f(x): return x**3 print f(3), f(2.5) Yeah, it would. I know I'm going to regret ask

Re: [PATCH] dynclass build

2004-11-04 Thread Leopold Toetsch
Sam Ruby <[EMAIL PROTECTED]> wrote: > Attached patch makes building in the dynclass ghetto a bit less > inhospitable... Thanks, applied. leo

Re: Solicitation of Ideas for Performance Statistics and Graphs

2004-11-04 Thread Leopold Toetsch
Joshua Gatcomb <[EMAIL PROTECTED]> wrote: > If you would like to see any of these ideas > implemented, or you have some of your own - please > respond to this on the list. I've amother one. Parrot has some internal settings and tweakable magic constants, mainly all inside the garbage collector. I

Re: [PATCH] [resend] support of uniline yield/return

2004-11-04 Thread Leopold Toetsch
Stéphane Payrard wrote: My previous mail to [EMAIL PROTECTED] did not seem to make it. So the resend with many recipients. This is the patch to support the uniline yield/return we talked 2 weeks ago. I know that Leo advocate to separate the implementation of PASM and PIR. By retailoring the grammar

Re: Closures and subs

2004-11-04 Thread Leopold Toetsch
Klaas-Jan Stol <[EMAIL PROTECTED]> wrote: > Hello, > I've been playing with closures and subs but I have a little bit of > trouble with those. newsub $P0, .Closure, _foo $P0(q) newsub $P0, .Closure, _foo $P0(q) Closures have to be distinct. leo

Re: No C op with PMC arguments?

2004-11-04 Thread Leopold Toetsch
Sam Ruby wrote: This omission seems odd. Was this intentional? A single pow_p_p_p op backed by a (non-MMD) vtable entry would make it easier to support code like the following: Well, Python has a pow "vtable" slot. And it should be MMD. Patches welcome, leo