[perl #31292] [PATCH classes/unmanagedstruct.pmc] Don't Share Nested Structs Across Parents

2004-08-23 Thread via RT
# New Ticket Created by chromatic # Please include the string: [perl #31292] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=31292 Hi there, This test case and patch demonstrates and fixes a problem where *Structs

Re: A thought for later -- POD tables

2004-08-23 Thread Matthew Walton
Aaron Sherman wrote: =table C$_ | C$x | Type of Match Implied | Matching Code =row Any | CodeC $ | scalar sub truth | match if C$x($_) That's (the above comments aside) the same thing, and as I said when Luke suggested it, it seems fine if that's the way we'd prefer to go.

Re: NCI and callback functions

2004-08-23 Thread Leopold Toetsch
Stephane Peiry wrote: g_return_val_if_fail (G_IS_OBJECT (gobject), 0); Fails here anyway I just dont see what could be wrong with the way parrot could be passing the user_data? gtk shouldn't make assumption on the user_data argument IMHO. Whats the difference between the way parrot calls this,

Re: NCI and callback functions

2004-08-23 Thread Leopold Toetsch
Leopold Toetsch wrote: Stephane Peiry wrote: g_return_val_if_fail (G_IS_OBJECT (gobject), 0); Fails here gtk shouldn't make assumption on the user_data argument IMHO. I now tried calling g_cclosure_new_object() and g_signal_connect_closure() directly. Doesn't segfault anymore (at least,

Re: [perl #31114] [PATCH] Dynext functions

2004-08-23 Thread Leopold Toetsch
Mattia Barbon [EMAIL PROTECTED] wrote: I am not sure about this patch. It splits part of Parrot_load_lib into a Parrot_init_lib(Interp, load_func_ptr, init_func_ptr) So its applied finally. Thanks, leo

Re: [perl #31292] [PATCH classes/unmanagedstruct.pmc] Don't Share Nested Structs Across Parents

2004-08-23 Thread Leopold Toetsch
chromatic (via RT) wrote: Hi there, This test case and patch demonstrates and fixes a problem where *Structs sharing initializers that contain structs end up sharing a single nested *Struct. I'm not convinced the behavior is completely correct. It breaks one other test I'd rather not have the

Re: t/pmc/perlhash.t#20 failed

2004-08-23 Thread Leopold Toetsch
Luke Palmer wrote: And as I look at the code for that test: It looks bogus. Is a PerlHash supposed to accept an integer as a key? AFAIK yes. The test output to this one is: 4 Four is 0 Yep. See #31128 leo

[perl #31285] [PATCH] first step in implementing a SCons base build

2004-08-23 Thread via RT
# New Ticket Created by Matt Fowles # Please include the string: [perl #31285] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=31285 All~ This patch is an early step in getting a scons based build system for

Re: NCI and callback functions

2004-08-23 Thread Aaron Sherman
Leopold Toetsch wrote: Leopold Toetsch wrote: Stephane Peiry wrote: g_return_val_if_fail (G_IS_OBJECT (gobject), 0); Fails here gtk shouldn't make assumption on the user_data argument IMHO. The whole idea behind callbacks is, that there is a userdata argument that get's passed through

Re: Compile op with return values

2004-08-23 Thread Dan Sugalski
At 11:03 PM -0700 8/21/04, Steve Fink wrote: I am experimenting with registering my own compiler for the regex language, but the usage is confusing. It seems that the intention is that compilers will return a code object that gets invoked, at which time it runs until it hits an Cend opcode. But

Re: [PATCH] Re: [perl #31128] Infinite loop in key_string

2004-08-23 Thread Dan Sugalski
At 10:48 AM +0200 8/21/04, Leopold Toetsch wrote: Steve Fink wrote: ... For PerlHash, P0[foo;3] seems to be interpreted as an iterator access? I hope there's some other way of indicating that. Yep, KEY_integer_FLAG used to indicate, get me the next key and is used by the iterator. But as your

Character sorting and comparison

2004-08-23 Thread Dan Sugalski
Comparison was the one thing left out of the charset API from earlier. So here's the API entry: INTVAL compare(STRING, STRING) Compares the two strings. Returns 1 if the left side is lexically greater, -1 if the right side is lexically greater, and 0 if they're the same. Currently this

Instantiation

2004-08-23 Thread Aaron Sherman
I was thinking about the case where you use a module, only to define a class that you then instantiate like this: use Some::Module::That::Defines::A::Class; our Some::Module::That::Defines::A::Class $foo := new; and I keep thinking that that's too redundant. It's not so much that

Re: Instantiation

2004-08-23 Thread Juerd
Aaron Sherman skribis 2004-08-23 12:53 (-0400): use Some::Module::That::Defines::A::Class; our Some::Module::That::Defines::A::Class $foo := new; and I keep thinking that that's too redundant (...) So, I was wondering about a synonym, like: uses

Progressively Overhauling Documentation

2004-08-23 Thread David Green
In [EMAIL PROTECTED], [EMAIL PROTECTED] (Aaron Sherman) wrote: This bit of POD made me think about POD's lack of tabular formatting, a common idiom in technical documentation. I know POD is still in the wings, as it were, but I wanted to say this before I forget /me flings coffee cup

Re: Progressively Overhauling Documentation

2004-08-23 Thread Juerd
David Green skribis 2004-08-23 11:30 (-0600): One of the selling features (or one of the features that is always sold) of POD is that you can mix it with your code. Except nobody does, at least I can't recall that last time I saw a module that did that, and I don't think I've ever really

Re: Progressively Overhauling Documentation

2004-08-23 Thread Rod Adams
Juerd wrote: David Green skribis 2004-08-23 11:30 (-0600): One of the selling features (or one of the features that is always sold) of POD is that you can mix it with your code. Except nobody does, at least I can't recall that last time I saw a module that did that, and I don't think I've

[perl #31302] NCI GC issues

2004-08-23 Thread via RT
# New Ticket Created by Dan Sugalski # Please include the string: [perl #31302] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=31302 Current CVS parrot looks to be losing track of NCI PMCs. Once a DOD run goes

Re: Progressively Overhauling Documentation

2004-08-23 Thread Juerd
Rod Adams skribis 2004-08-23 13:16 (-0500): sub foo :doc(take an Foo::Bar, and foo it over.) ( Anything involving a string is not good for documentation, because in documenation it must be *easy* to add code examples. Besides that, () would make me want to put it all on one line, and that may be

RE: Progressively Overhauling Documentation

2004-08-23 Thread Thalhammer, Jeffrey BGI SF
unsubscribe -Original Message- From: Juerd [mailto:[EMAIL PROTECTED] Sent: Monday, August 23, 2004 12:01 PM To: Rod Adams Cc: [EMAIL PROTECTED] Subject: Re: Progressively Overhauling Documentation Rod Adams skribis 2004-08-23 13:16 (-0500): sub foo :doc(take an Foo::Bar, and foo it

Re: Progressively Overhauling Documentation

2004-08-23 Thread Juerd
Thalhammer, Jeffrey BGI SF skribis 2004-08-23 12:03 (-0700): unsubscribe It doesn't work that way. If I'm not mistaken, unsubscribing is done by sending mail to [EMAIL PROTECTED]. Also, you might want to consider using a sane e-mail program and some training in quoting :) Juerd

Re: Instantiation

2004-08-23 Thread Paul Seamons
So, I was wondering about a synonym, like: uses Some::Module::That::Defines::A::Class $foo; Well if the long name is the problem: use Some::Module::That::Defines::A::Class as Foo; my Foo $obj .= new; # OR # require Some::Module::That::Defines::A::Class; import

Re: Return with no expression

2004-08-23 Thread Alexey Trofimenko
On Fri, 20 Aug 2004 09:21:02 +0100, Matthew Walton [EMAIL PROTECTED] wrote: On 19 Aug 2004, at 18:04, Luke Palmer wrote: [...] my $num = $param == 0 ?? 0 : rand $param; my $num = $param == 0 ?? 0 :: rand $param; surely? a little off theme.. I wanna ask, could be there in perl6 any

Re: Instantiation

2004-08-23 Thread Matthew Walton
Aaron Sherman wrote: I was thinking about the case where you use a module, only to define a class that you then instantiate like this: use Some::Module::That::Defines::A::Class; our Some::Module::That::Defines::A::Class $foo := new; and I keep thinking that that's too redundant.

Re: NCI and callback functions

2004-08-23 Thread Stephane Peiry
On Mon, Aug 23, 2004 at 12:14:51PM +0200, Leopold Toetsch wrote: Leopold Toetsch wrote: Stephane Peiry wrote: g_return_val_if_fail (G_IS_OBJECT (gobject), 0); Fails here gtk shouldn't make assumption on the user_data argument IMHO. [...] call is NULL, because of the same check,

NCI default changes for x86

2004-08-23 Thread Dan Sugalski
Folks, A word of warning -- I've disabled the JIT's auto-generation of NCI function headers on x86 systems. This is partly in an attempt to track down problems I'm having with NCI calls segfaulting, and partly because I keep adding in new function definitions only to find that they don't work

Re: Progressively Overhauling Documentation

2004-08-23 Thread Sean O'Rourke
At Mon, 23 Aug 2004 19:46:34 +0200, [EMAIL PROTECTED] (Juerd) wrote: I also think POD should be overhauled completely. I've been thinking about proposing something like: sub foo ( Foo::Bar$bar, Quux::Xyzzy $xyzzy, +$verbose, +$foo ) description

Re: Progressively Overhauling Documentation

2004-08-23 Thread mark . a . biggar
OK, there's one non-incremental idea: documentation that you can write in one place and display in some completely different order. (Shades of literate programming!) And although there are good reasons for keeping the docs in the same file as the code, there are equal but opposite reasons to

Re: Instantiation

2004-08-23 Thread Ingo Blechschmidt
Hello, Aaron Sherman wrote: I was thinking about the case where you use a module, only to define a class that you then instantiate like this: [ snip ] So, I was wondering about a synonym, like: uses Some::Module::That::Defines::A::Class $foo; is $foo implicitely declared as our or my (or

Re: Instantiation

2004-08-23 Thread Sean O'Rourke
At Mon, 23 Aug 2004 15:51:00 -0400, [EMAIL PROTECTED] (Aaron Sherman) wrote: On Mon, 2004-08-23 at 15:19, Paul Seamons wrote: So, I was wondering about a synonym, like: uses Some::Module::That::Defines::A::Class $foo; Well if the long name is the problem: use

Re: Compile op with return values

2004-08-23 Thread Mark A. Biggar
Dan Sugalski wrote: At 11:03 PM -0700 8/21/04, Steve Fink wrote: I am experimenting with registering my own compiler for the regex language, but the usage is confusing. It seems that the intention is that compilers will return a code object that gets invoked, at which time it runs until it hits an

Re: NCI and callback functions

2004-08-23 Thread Stephane Peiry
mh.. guess P is an actuall pointer to PMC, in that case forget that part.. :) Stephane On Mon, Aug 23, 2004 at 11:15:03PM +0200, Stephane Peiry wrote: [signatures question gone] *If* that is solved then the next problem is of course that by calling gtk_main() the GTK event loop is running.

Re: Compile op with return values

2004-08-23 Thread Dan Sugalski
At 7:13 AM -0700 8/23/04, Mark A. Biggar wrote: Dan Sugalski wrote: At 11:03 PM -0700 8/21/04, Steve Fink wrote: I am experimenting with registering my own compiler for the regex language, but the usage is confusing. It seems that the intention is that compilers will return a code object that gets

Re: Return with no expression

2004-08-23 Thread Matthew Walton
Alexey Trofimenko wrote: On Fri, 20 Aug 2004 09:21:02 +0100, Matthew Walton [EMAIL PROTECTED] wrote: On 19 Aug 2004, at 18:04, Luke Palmer wrote: [...] my $num = $param == 0 ?? 0 : rand $param; my $num = $param == 0 ?? 0 :: rand $param; surely? a little off theme.. I wanna ask, could be

Re: Return with no expression

2004-08-23 Thread Juerd
Matthew Walton skribis 2004-08-23 23:12 (+0100): I doubt that's a problem, as C:: as part of the ternary operator is only going to be found where an operator is expected, and C:: as part of a module name is only going to be found where an identifier is expected, so it's a matter of looking

Re: Return with no expression

2004-08-23 Thread Luke Palmer
Juerd writes: Where :: (in a module name) can be used, an operator could have been used. How is $foo??Bar::Baz::Quux parsed? $foo ?? Bar::Baz::Quux; # error, :: expected Indeed, this is illegal: Bar::Baz :: Quux.new; No whitespace allowed. I hope it's an error, although some

Re: Progressively Overhauling Documentation

2004-08-23 Thread Abhijit Mahabal
On Mon, 23 Aug 2004 [EMAIL PROTECTED] wrote: OK, there's one non-incremental idea: documentation that you can write in one place and display in some completely different order. (Shades of literate programming!) And although there are good reasons for keeping the docs in the same file as the

Re: Instantiation

2004-08-23 Thread Dave Whipp
Sean O'Rourke [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] my $x = (use Some::Module::That::Defines::A::Class).new(blah); how about some variation on my $x = Some::Module::That::Defines::A::Class.AUTOLOAD.new(blah); Dave.

bidirectional iterators

2004-08-23 Thread David Storrs
There has been a lot of discussion in the other threads lately about iterators. I was wondering if there will be an easy way to create a bidirectional iterator? Toy example to show what I'm thinking: for(1..10) { next if /7/; # always skip 7 prev if 9 !rand 3; # occasionally

Need some opinions on base behavior

2004-08-23 Thread Dan Sugalski
Leo's been nudging me to get the behaviours of the basic types defined, so I'm working on updating PDD 17 with them. The unary behavior of the types is reasonably straightforward. What I'm puzzling over right now is the binary behavior. It's the edge cases that are troublesome, of course --

Re: Need some opinions on base behavior

2004-08-23 Thread Matt Fowles
Dan~ I was originally going to say do them all or do the integer division/no overflow check option, but then something occurred to me. We already have I registers. If someone wants speed they should be using them anyway. If someone doesn't care about speed, but wants those semantics, their

Re: Instantiation

2004-08-23 Thread Aaron Sherman
Dave Whipp wrote: Sean O'Rourke [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] my $x = (use Some::Module::That::Defines::A::Class).new(blah); how about some variation on my $x = Some::Module::That::Defines::A::Class.AUTOLOAD.new(blah); Wow, that's pretty amazing... uh...

Re: Return with no expression

2004-08-23 Thread Matt Creenan
I think I'd prefer that as well, since it has the advantage of not having to use the evil shift key. Though i don't think it stands out as much as it should. I hate to reply to my own message, but... How about $foo??split()!!0; for a touch of craziness. Or is !! not usable? Actually, just

Re: Return with no expression

2004-08-23 Thread Luke Palmer
Aaron Sherman writes: Luke Palmer wrote: $foo??split()::0; Ought to be fine Imagine the shock of the first guy who rezlizes he got the logic backwards and bug-fixes it to: $foo??0::split() ouch! Yeah, seriously. I mean, what a subtle bug! It would take him hours to