error in rx.ops example

2003-10-21 Thread Stéphane Payrard
rx_popindex signature is incorrect in the pre-patch example. --- rx.ops.old 2003-06-06 18:27:00.0 +0200 +++ rx.ops 2003-10-20 23:08:24.0 +0200 @@ -108,7 +108,7 @@ rx_literal S0, I1, b, $next branch $top $backtrack: -

Re: Object freezing

2003-10-21 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: Since this has come up again, ... [ FYI: I was starting implementing this, based on a general traverse vtable with callback functions. Two patches got backed out by Dan after some discussion in PM ] ... and it's apparent that the last time

Re: error in rx.ops example

2003-10-21 Thread Leopold Toetsch
Stéphane Payrard [EMAIL PROTECTED] wrote: rx_popindex signature is incorrect in the pre-patch example. - rx_popindex S0, I1, $advance + rx_popindex I1, $advance Thanks, changed. leo

pcc: the parrot C compiler (just a wrapper, don't expect big things :-)

2003-10-21 Thread Aldo Calpini
hello, I was trying to debug the t/src tests, and realized that doing by hand what Parrot::Test::c_output_(is|like) does is not really easy. I wanted to compile the source code embedded in t/src/sprintf.t (the third test, in my case) to see exactly where and how it was failing, and possibly have

Re: Taint mode testing and project Phalanx

2003-10-21 Thread Nicholas Clark
On Mon, Oct 20, 2003 at 10:27:34PM -0700, Michael G Schwern wrote: On Tue, Oct 21, 2003 at 12:24:03AM -0500, Dave Rolsky wrote: Not to mention that it's buggy as hell. For example, in various versions of Perl I've used there have been rather serious bugs in the regex engine when taint

Re: No more code coverage

2003-10-21 Thread Tim Bunce
On Mon, Oct 20, 2003 at 11:05:38PM +0200, Paul Johnson wrote: On Mon, Oct 20, 2003 at 09:34:38PM +0100, Tony Bowden wrote: On Mon, Oct 20, 2003 at 10:16:40PM +0200, Paul Johnson wrote: I wrote database in quotes because currently we are talking about a flat file, written using

Re: No more code coverage

2003-10-21 Thread Andrew Savige
Tim Bunce wrote: p.s. Could someone suggest a pure-perl module with lots of tests as a suitable testbed for Devel::Cover? http://search.cpan.org/dist/Acme-EyeDrops has 22 test programs, 769 tests and no dependencies. /-\ http://personals.yahoo.com.au - Yahoo! Personals New people, new

Re: No more code coverage

2003-10-21 Thread Michael G Schwern
On Tue, Oct 21, 2003 at 10:38:48PM +1000, Andrew Savige wrote: Tim Bunce wrote: p.s. Could someone suggest a pure-perl module with lots of tests as a suitable testbed for Devel::Cover? http://search.cpan.org/dist/Acme-EyeDrops has 22 test programs, 769 tests and no dependencies.

Re: Object freezing

2003-10-21 Thread Juergen Boemmels
Leopold Toetsch [EMAIL PROTECTED] writes: 1) Freezing at the destruction level may *not* use any additional memory for object traversal This is a really hard problem. In some early experiments with destruction ordering (one of the problems wich need iteration) I didn't get around with

Re: [RfC] and [PATCH]: Libraries

2003-10-21 Thread Juergen Boemmels
Last week i send this: I spent the last day getting parrot running under Borland. The attached patch is whats need to get linking and running make test on both Windows/Borland and Linux/gcc. I'm not sure if its ready for inclusion in the tree, but I want some feedback on the approach. No

Re: Object freezing

2003-10-21 Thread Dan Sugalski
On Mon, 20 Oct 2003, Melvin Smith wrote: At 04:38 PM 10/20/2003 -0400, Dan Sugalski wrote: The encoding methods for freezing (and corresponding decoding methods for thawing) may be overridden to provide an alternate serialization format. The only requirement of the serialziation format is

Re: Object freezing

2003-10-21 Thread Dan Sugalski
On Mon, 20 Oct 2003, Gregor N. Purdy wrote: the xml header is only for the top level thing in the serialized tree. if it is nonstandard you have to mark the serialized string so you can call the matching thaw methods. each object in the serialized tree will have to support that method or

Re: Object freezing

2003-10-21 Thread Dan Sugalski
On Tue, 21 Oct 2003, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: Since this has come up again, ... [ FYI: I was starting implementing this, based on a general traverse vtable with callback functions. Two patches got backed out by Dan after some discussion in

Re: Object freezing

2003-10-21 Thread Dan Sugalski
On Tue, 21 Oct 2003, Elizabeth Mattijsen wrote: At 08:21 -0400 10/21/03, Dan Sugalski wrote: I find the notion of an XML header a bit confusing, given Dan's statement to the effect that it was a throw to XML folks. I think anything XML folks will be interested in will entail

Object instantiation

2003-10-21 Thread Dan Sugalski
After thinking about this a bit, it became glaringly obvious that the right way to instantiate an object for class Foo is to do: new P5, .Foo Or whatever the constant value assigned to the Foo class upon its creation is. When a class is created, it should be assigned a number, and for most

Re: Object freezing

2003-10-21 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: On Tue, 21 Oct 2003, Leopold Toetsch wrote: [ thaw ] This should IMHO be able to create constant PMCs out of metadata, e.g. for subroutine objects. So there should be some means to tell thaw() to create PMC(s) in the constant_pmc_pool. There should be

Re: Object instantiation

2003-10-21 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: After thinking about this a bit, it became glaringly obvious that the right way to instantiate an object for class Foo is to do: new P5, .Foo Or whatever the constant value assigned to the Foo class upon its creation is. When a class is created, it

Re: Object freezing

2003-10-21 Thread Dan Sugalski
On Tue, 21 Oct 2003, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: On Tue, 21 Oct 2003, Leopold Toetsch wrote: [ thaw ] This should IMHO be able to create constant PMCs out of metadata, e.g. for subroutine objects. So there should be some means to tell thaw() to create

Re: Object instantiation

2003-10-21 Thread Dan Sugalski
On Tue, 21 Oct 2003, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: After thinking about this a bit, it became glaringly obvious that the right way to instantiate an object for class Foo is to do: new P5, .Foo Or whatever the constant value assigned to the Foo class

Re: Object instantiation

2003-10-21 Thread Melvin Smith
Try: new P0, 'std::array' # PMC new P1, 'Perl::PerlArray'# PMC (or class) new P2, 'Package::SomeClass' # Class At compile time the string can be converted to an integer enumerator. -Melvin Leopold Toetsch [EMAIL PROTECTED] 10/21/2003 10:24 AM Please respond to lt To:

Re: Object freezing

2003-10-21 Thread Melvin Smith
On Tue, 21 Oct 2003, Leopold Toetsch wrote: Albeit I'm not convinced, that we can't have a seen hash. A seen hash most likely would: 1) Kill GC performance especially in pathological cases. The GC should be quiet and invisible. 2) Cause memory usage to double upon a mark run. -Melvin

A less controvertial API addition

2003-10-21 Thread Dan Sugalski
While we're fighting^Wdiscussing the freezing system, there's a simpler thing we need to have added in. We need an API entry point that allows C code to invoke a sub/method PMC. This needs to be done both for the embedding API (we'll wrap it) where the embedding app will call in, but also for

Re: Object instantiation

2003-10-21 Thread Jeff Clites
On Oct 21, 2003, at 7:14 AM, Dan Sugalski wrote: After thinking about this a bit, it became glaringly obvious that the right way to instantiate an object for class Foo is to do: new P5, .Foo Or whatever the constant value assigned to the Foo class upon its creation is. When a class is

Re: Object freezing

2003-10-21 Thread Juergen Boemmels
Dan Sugalski [EMAIL PROTECTED] writes: [...] The chill and warm runtime methods take a PMC or a frozen representation of a PMC (respectively) and provide a human readable version of that PMC. I dunno, why chill() is superior to dump() or pretty_print(), but the name doesn't really

Re: Object freezing

2003-10-21 Thread Dan Sugalski
On Tue, 21 Oct 2003, Juergen Boemmels wrote: Dan Sugalski [EMAIL PROTECTED] writes: [...] The chill and warm runtime methods take a PMC or a frozen representation of a PMC (respectively) and provide a human readable version of that PMC. I dunno, why chill() is superior to dump()

Re: Object freezing

2003-10-21 Thread Jeff Clites
On Oct 21, 2003, at 5:53 AM, Dan Sugalski wrote: Note that I do *not* want to have multiple object traversal systems in parrot! We have one for DOD, and proposals have ranged upwards from there. No. That is *not* happening--the chance for error is significant, the side-effects of the error

Re: A less controvertial API addition

2003-10-21 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: While we're fighting^Wdiscussing the freezing system, there's a simpler thing we need to have added in. We need an API entry point that allows C code to invoke a sub/method PMC. What about params? I already thought about that a bit, and when looking at

Re: Object freezing

2003-10-21 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: On Tue, 21 Oct 2003, Leopold Toetsch wrote: You can append items to the constant table. You can't declare existing items as constant, because you can't change the underlying object pool, where the object was allocated. This would change the objects

Re: Object freezing

2003-10-21 Thread Leopold Toetsch
Melvin Smith [EMAIL PROTECTED] wrote: Albeit I'm not convinced, that we can't have a seen hash. A seen hash most likely would: 1) Kill GC performance especially in pathological cases. The GC should be quiet and invisible. 2) Cause memory usage to double upon a mark run. GC isn't

Re: A less controvertial API addition

2003-10-21 Thread Dan Sugalski
On Tue, 21 Oct 2003, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: While we're fighting^Wdiscussing the freezing system, there's a simpler thing we need to have added in. We need an API entry point that allows C code to invoke a sub/method PMC. What about params? I already

Re: Object freezing

2003-10-21 Thread Jeff Clites
On Oct 21, 2003, at 6:12 AM, Dan Sugalski wrote: On Tue, 21 Oct 2003, Elizabeth Mattijsen wrote: At 08:21 -0400 10/21/03, Dan Sugalski wrote: I find the notion of an XML header a bit confusing, given Dan's statement to the effect that it was a throw to XML folks. I think anything XML folks

Re: Object freezing

2003-10-21 Thread Dan Sugalski
Yeah, if you're just needing to tag the stream with a label to indicate the type plus a version number, then xml's on the one hand overkill and on the other hand not necessarily a big help to xml proponents. So, in a nutshell, throwing an XML format type tag at the beginning buys us nothing

Re: Object freezing

2003-10-21 Thread Dan Sugalski
On Tue, 21 Oct 2003, Elizabeth Mattijsen wrote: At 12:53 -0400 10/21/03, Dan Sugalski wrote: Yeah, if you're just needing to tag the stream with a label to indicate the type plus a version number, then xml's on the one hand overkill and on the other hand not necessarily a big help to

Re: Object freezing

2003-10-21 Thread Jeff Clites
On Oct 21, 2003, at 10:41 AM, Elizabeth Mattijsen wrote: At 12:53 -0400 10/21/03, Dan Sugalski wrote: Yeah, if you're just needing to tag the stream with a label to indicate the type plus a version number, then xml's on the one hand overkill and on the other hand not necessarily a big help

Old Big problems before New Big problems

2003-10-21 Thread Melvin Smith
*sigh* I'm long overdue for a rant. I'm very happy with the progress Parrot has made, but that is because I took a year off. Otherwise, it would have been like watching a pot waiting for it to boil. However, some things have not changed, like us. We try to tackle too many NEW large

Re: Object freezing

2003-10-21 Thread Jeff Clites
On Oct 21, 2003, at 10:49 AM, Dan Sugalski wrote: On Tue, 21 Oct 2003, Elizabeth Mattijsen wrote: At 12:53 -0400 10/21/03, Dan Sugalski wrote: Yeah, if you're just needing to tag the stream with a label to indicate the type plus a version number, then xml's on the one hand overkill and on the

Re: Object freezing

2003-10-21 Thread Dan Sugalski
On Tue, 21 Oct 2003, Elizabeth Mattijsen wrote: At 13:49 -0400 10/21/03, Dan Sugalski wrote: On Tue, 21 Oct 2003, Elizabeth Mattijsen wrote: Hmmm... maybe as an optimilization, something that would fit in 4 or 8 bytes would be better for the magic string (so a single or double integer check

Re: Object freezing

2003-10-21 Thread Elizabeth Mattijsen
At 08:21 -0400 10/21/03, Dan Sugalski wrote: I find the notion of an XML header a bit confusing, given Dan's statement to the effect that it was a throw to XML folks. I think anything XML folks will be interested in will entail *wrapping* stuff, not *prefixing* it. Nah, I expect what they'll

[perl #24260] [PATCH] to build under win32

2003-10-21 Thread Nick Kostirya
# New Ticket Created by Nick Kostirya # Please include the string: [perl #24260] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24260 [PATCH] to build under win32 1. MS compiler do not support struct with empty

[perl #24261] [PATCH] for t\harness under win32

2003-10-21 Thread Nick Kostirya
# New Ticket Created by Nick Kostirya # Please include the string: [perl #24261] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24261 cmd.exe of WinNT do not convert t\src\*.t into list files.

[perl #24262] [PATCH] for t\harness under win32

2003-10-21 Thread Nick Kostirya
# New Ticket Created by Nick Kostirya # Please include the string: [perl #24262] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24262 cmd.exe of WinNT do not convert t\src\*.t into list files.

Re: Object freezing

2003-10-21 Thread Elizabeth Mattijsen
At 12:53 -0400 10/21/03, Dan Sugalski wrote: Yeah, if you're just needing to tag the stream with a label to indicate the type plus a version number, then xml's on the one hand overkill and on the other hand not necessarily a big help to xml proponents. So, in a nutshell, throwing an XML

Re: Object freezing

2003-10-21 Thread Elizabeth Mattijsen
At 13:49 -0400 10/21/03, Dan Sugalski wrote: On Tue, 21 Oct 2003, Elizabeth Mattijsen wrote: Yep. But mainly I think because you'll need to encode binary data to make it valid XML. That's on overhead you don't to suffer for those serialization that don't need it. I had it in mind that the

Re: Object freezing

2003-10-21 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: On Tue, 21 Oct 2003, Juergen Boemmels wrote: You know we already have two versions of pobject_lives lying around. Then we need to fix that, too. One is with ARENA_DOD_FLAGS one w/o. If you are trying to implement your universal mark() for everything, one

Re: Object freezing

2003-10-21 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: So, in a nutshell, throwing an XML format type tag at the beginning buys us nothing regardless of whether it's an XML stream or not? Yes. That's what people say :) What about a well known format called PBC. (Parrot bortable^Wbyte code :) It knows about

Re: Object freezing

2003-10-21 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: On Tue, 21 Oct 2003, Jeff Clites wrote: 1) Serialization traversals need to take note of logical int and float slots That's not an issue for us. A PMC is responsible for serializing itself, so if its got a string, float, or int component then it must

Re: Old Big problems before New Big problems

2003-10-21 Thread Dan Sugalski
On Tue, 21 Oct 2003, Melvin Smith wrote: This is my list, not Dan's so he may disagree: The list is a valid one, and the complaint is real. We've been taking things out of order in part because it works for me, but I've got a bigger picture than anyone else and that's not necessarily a great

Re: [perl #24261] [PATCH] for t\harness under win32

2003-10-21 Thread Juergen Boemmels
Nick Kostirya (via RT) [EMAIL PROTECTED] writes: cmd.exe of WinNT do not convert t\src\*.t into list files. D:\CvsProjects\parrotnmake test D:\Programs\Perl\bin\perl.exe t\harness t\src\*.t t\src\*t\src\*.t does not exist FAILED--1 test script could be run, alas--no output

Class metadata for PIR/assembly files

2003-10-21 Thread Dan Sugalski
Here's the scoop: Metadata for classes is simple. In PIR/assembly, they're noted with .things: .class Foo .is bar .is baz .does some_thing .member x .member y .member z .ssalc Unless someone tells me that ssalc is horribly obscene in some relatively common language,

Re: Taint mode testing and project Phalanx

2003-10-21 Thread Dave Rolsky
On Mon, 20 Oct 2003, Michael G Schwern wrote: On Tue, Oct 21, 2003 at 12:24:03AM -0500, Dave Rolsky wrote: On Mon, 20 Oct 2003, Andrew Savige wrote: I noticed in Test::Tutorial: Taint mode is a funny thing. It's the globalest of all global features. Once you turn it on it effects all

Re: Taint mode testing and project Phalanx

2003-10-21 Thread Tim Bunce
On Tue, Oct 21, 2003 at 12:34:44PM -0500, Dave Rolsky wrote: Anyway, my taint mode experience has been that random things break in very weird ways when using it. I'd guess that many extensions don't handle magic properly. Extension authors rarely add the extra logic, even if they know what

Re: No more code coverage

2003-10-21 Thread Ovid
--- Tim Bunce [EMAIL PROTECTED] wrote: I'll look into SQLite. I'd caution against rushing in any particular direction without some profiling information to back it up. Having said that, I'd strongly recommend switching to Storable first. It did have problems but it's now very robust and

Re: [RfC] and [PATCH]: Libraries

2003-10-21 Thread Jeff Clites
On Oct 15, 2003, at 4:52 AM, Juergen Boemmels wrote: I spent the last day getting parrot running under Borland. The attached patch is whats need to get linking and running make test on both Windows/Borland and Linux/gcc. I'm not sure if its ready for inclusion in the tree, but I want some

Re: Object freezing

2003-10-21 Thread Dan Sugalski
On Tue, 21 Oct 2003, Clark C. Evans wrote: On Tue, Oct 21, 2003 at 09:12:27AM -0400, Dan Sugalski wrote: | We're talking about the first thing in a file (or stream, or whatever). I | was under the impression that XML files should be entirely composed of | valid XML, hence the need for the

Re: Object freezing

2003-10-21 Thread Dan Sugalski
On Tue, 21 Oct 2003, Clark C. Evans wrote: If you are going to go this far (including content-length) may I just suggest using a MIME envelope? This has several advantages: This is a very good idea, but not this time, as it's too easy to get stuck in the endless churn of very good ideas and

Class creation in bytecode

2003-10-21 Thread Dan Sugalski
Okay, since nobody took advantage of the, oh, at lesat 2 or 3 minutes since the metadata spec post, here's the equivalent for assembly. I'll stub in and commit the stubbed object.ops ops in a bit. We've already got ops to create a class standalone, and to subclass an existing class. We're also

Re: Object freezing

2003-10-21 Thread Elizabeth Mattijsen
At 15:18 -0400 10/21/03, Dan Sugalski wrote: On Tue, 21 Oct 2003, Clark C. Evans wrote: If you are going to go this far (including content-length) may I just suggest using a MIME envelope? This has several advantages: This is a very good idea, but not this time, as it's too easy to get stuck

Re: Object freezing

2003-10-21 Thread Clark C. Evans
On Tue, Oct 21, 2003 at 07:41:08PM +0200, Elizabeth Mattijsen wrote: | If you ask me, you could do easy with a simple header line like: | | parrot xml 1.0 | \0 | | basically magic word ('parrot') | followed by a space | followed by the type | followed by a space | followed by version |

Re: Object freezing

2003-10-21 Thread Dan Sugalski
On Tue, 21 Oct 2003, Clark C. Evans wrote: Back to the YAML list... sorry for interloping! Ah, you weren't interloping--it is a good idea. You just managed to come in on the other side of Good Enough today. :) Dan

Re: Object freezing

2003-10-21 Thread Clark C. Evans
Dan/Elizabeth, Thank you for considering my response, let me rephrase and then I'll go back to my own list (*grins*). On Tue, Oct 21, 2003 at 09:25:48PM +0200, Elizabeth Mattijsen wrote: | At 15:18 -0400 10/21/03, Dan Sugalski wrote: | On Tue, 21 Oct 2003, Clark C. Evans wrote: | If you are

Re: Object freezing

2003-10-21 Thread Elizabeth Mattijsen
At 12:56 -0700 10/21/03, Clark C. Evans wrote: On Tue, Oct 21, 2003 at 09:25:48PM +0200, Elizabeth Mattijsen wrote: | At 15:18 -0400 10/21/03, Dan Sugalski wrote: | On Tue, 21 Oct 2003, Clark C. Evans wrote: | If you are going to go this far (including content-length) may I | just suggest

Re: Class creation in bytecode

2003-10-21 Thread Matt Fowles
All~ Dan Sugalski wrote: To add or remove an implemented interface: adddoes Px, Sy removedoes Px, Sy Instantiate, as implemented, is dead. I'm going to nuke it, then use it for instantiating classes via metadata chunks. That's next message. Just a thought, but (add/remove)interface seems a

Re: Taint mode testing and project Phalanx

2003-10-21 Thread Michael G Schwern
On Tue, Oct 21, 2003 at 12:34:44PM -0500, Dave Rolsky wrote: Anyway, my taint mode experience has been that random things break in very weird ways when using it. All the more reason to test with it on. :) -- Michael G Schwern[EMAIL PROTECTED] http://www.pobox.com/~schwern/ Do not

Re: Taint mode testing and project Phalanx

2003-10-21 Thread Andrew Savige
Michael G Schwern wrote: On Tue, Oct 21, 2003 at 12:34:44PM -0500, Dave Rolsky wrote: Anyway, my taint mode experience has been that random things break in very weird ways when using it. All the more reason to test with it on. :) Given the differences in behaviour with taint mode, it seems

Re: Class metadata for PIR/assembly files

2003-10-21 Thread Joseph Ryan
Dan Sugalski wrote: Here's the scoop: Metadata for classes is simple. In PIR/assembly, they're noted with .things: .class Foo .is bar .is baz .does some_thing .member x .member y .member z .ssalc Unless someone tells me that ssalc is horribly obscene in some relatively common

Re: Class metadata for PIR/assembly files

2003-10-21 Thread Melvin Smith
At 07:44 PM 10/21/2003 -0400, Joseph Ryan wrote: Dan Sugalski wrote: Here's the scoop: Metadata for classes is simple. In PIR/assembly, they're noted with .things: .class Foo .is bar .is baz .does some_thing .member x .member y .member z .ssalc Will there be a way to specify

Re: Class metadata for PIR/assembly files

2003-10-21 Thread Melvin Smith
At 02:55 PM 10/21/2003 -0400, Dan Sugalski wrote: Here's the scoop: Metadata for classes is simple. In PIR/assembly, they're noted with .things: .class Foo .is bar .is baz .does some_thing .member x .member y .member z .ssalc Unless someone tells me that ssalc is

Re: Taint mode testing and project Phalanx

2003-10-21 Thread Dave Rolsky
On Tue, 21 Oct 2003, Michael G Schwern wrote: On Tue, Oct 21, 2003 at 12:34:44PM -0500, Dave Rolsky wrote: Anyway, my taint mode experience has been that random things break in very weird ways when using it. All the more reason to test with it on. :) At this point I've become rather