Re: .const HLL improvement

2006-01-24 Thread François PERRAD
At 12:07 13/01/2006 +0100, Leopold Toetsch wrote: On Jan 13, 2006, at 10:20, François PERRAD wrote: =head1 DESCRIPTION This test file describes an improvement for the directive .const when an HLL is using. Not really - see below. .const .Integer i = 12 The Integer PMC implements

Re: Supporting safe managed references

2006-01-24 Thread Nicholas Clark
On Tue, Jan 24, 2006 at 12:11:14AM -, Jonathan Worthington wrote: .NET has these managed reference thingies. They're basically like b) Add a v-table flag saying returning me is forbidden and checking that on any PMCs that get returned. (However, there are subtle issues. For

Re: .const HLL improvement

2006-01-24 Thread Leopold Toetsch
On Jan 24, 2006, at 9:13, François PERRAD wrote: I start with the following patch, but I am not happy with it. does_isa() isn't a public function (I haven't found a handle for a pmc). It allows the expected syntax but the behavior isn't good : the created pmc is a Sub not a LuaFunction.

Re: Supporting safe managed references

2006-01-24 Thread Jonathan Worthington
Nicholas Clark [EMAIL PROTECTED] wrote: On Tue, Jan 24, 2006 at 12:11:14AM -, Jonathan Worthington wrote: .NET has these managed reference thingies. They're basically like b) Add a v-table flag saying returning me is forbidden and checking that on any PMCs that get returned.

Re: Supporting safe managed references

2006-01-24 Thread Paolo Molaro
On 01/24/06 Jonathan Worthington wrote: .NET has these managed reference thingies. They're basically like They are called managed pointers. pointers, but safe. What makes them safe is that only certain instructions can create them and the pointer value can't be set directly (we can do

Re: Supporting safe managed references

2006-01-24 Thread Jonathan Worthington
Chip Salzenberg [EMAIL PROTECTED] wrote: On Tue, Jan 24, 2006 at 12:11:14AM -, Jonathan Worthington wrote: .NET has these managed reference thingies. They're basically like pointers, but safe. [...] Making them work on Parrot is no problem. Making them work without comprimising the

method_util.{c,h}

2006-01-24 Thread Leopold Toetsch
While grepping through the src tree, I found this: * all functions from method_util.c are unused and commented out * method_util.h is included by several PMCs as well as other files - this looks like cp cruft - the only used bits from this header is the definition of CParrot_csub_t, which

Q: interpreter-stash and namespaces

2006-01-24 Thread Leopold Toetsch
*) what is Stash.parent_stash? (It's currently unused) *) I presume that the stash_hash is the thing, that holds the top-level namespace. *) what is vtable-package? A pointer to the namespace PMC of this class? (It's currently unused) *) what is Parrot_Context.current_package? Shoudn't that

Re: Supporting safe managed references

2006-01-24 Thread Jonathan Worthington
Paolo Molaro [EMAIL PROTECTED] wrote: On 01/24/06 Jonathan Worthington wrote: .NET has these managed reference thingies. They're basically like They are called managed pointers. Yes. And now I've misled Parrot folks into mis-naming them managed references. D'oh. pointers, but safe.

Re: Supporting safe managed references

2006-01-24 Thread Larry Wall
On Tue, Jan 24, 2006 at 01:04:10PM -, Jonathan Worthington wrote: : Looking at what Chip said though, it would appear that the much cleaner : solution I was hoping to find exists and can be found in lex pad stuff, : which I need to go stare at for a bit before replying. :-) This is

Re: Supporting safe managed references

2006-01-24 Thread Chip Salzenberg
On Tue, Jan 24, 2006 at 03:52:39PM -, Jonathan Worthington wrote: Chip Salzenberg [EMAIL PROTECTED] wrote: The trick is to keep references to registers in a way that notices when the register set is gone, or alternatively, that keeps the register set from going away. The latter is already

Re: pdd21 notes

2006-01-24 Thread Matt Diephouse
Leopold Toetsch [EMAIL PROTECTED] wrote: Some unsorted notes while reading through it: *) definition: current namespace *) namespace separator: :: In this document, :: indicates namespace nesting. As conventions, these are only here to make it easier to communicate

Re: Supporting safe managed references

2006-01-24 Thread Chip Salzenberg
jeepers I mangled this paragraph On Tue, Jan 24, 2006 at 10:31:50AM -0800, Chip Salzenberg wrote: What I had in mind, was imitating whatever a closure does to hold onto a context chain. I would detail that here except it's not on the top of my brain except (1) the point is the

Re: pdd21 notes

2006-01-24 Thread Chip Salzenberg
On Tue, Jan 24, 2006 at 01:36:23PM -0500, Matt Diephouse wrote: Leopold Toetsch [EMAIL PROTECTED] wrote: Some unsorted notes while reading through it: *) definition: current namespace *) namespace separator: :: In this document, :: indicates namespace nesting.

Revert r11320 - it b0rked all src tests on at least OS/X and x86/linux

2006-01-24 Thread Leopold Toetsch
I've unapplied r11320. * revert the whole patch * some of it might be correct, though, please review And a final note: please no checkins w/o testing, especially not for config and build stuff. Thanks. leo

Re: pdd21 notes

2006-01-24 Thread Chip Salzenberg
{reordered for better reading} On Mon, Jan 23, 2006 at 10:56:33PM +0100, Leopold Toetsch wrote: *)Typed Interface I've already layed out earlier in reply to Matt's proposal that this will be mostly unusable for e.g. Python. First, please remember that when Python exports to Python,

Re: pdd21 notes

2006-01-24 Thread Chip Salzenberg
Following up to myself, I just had an idea about expanding the typed interface: On Tue, Jan 24, 2006 at 12:26:30PM -0800, Chip Salzenberg wrote: The Perl namespace's typed interface will have to figure out what kind of variable it thinks it's getting. That decision could be fairly arbitrary,

Re: Supporting safe managed references

2006-01-24 Thread Jonathan Worthington
Chip Salzenberg [EMAIL PROTECTED] wrote: On Tue, Jan 24, 2006 at 03:52:39PM -, Jonathan Worthington wrote: Chip Salzenberg [EMAIL PROTECTED] wrote: The trick is to keep references to registers in a way that notices when the register set is gone, or alternatively, that keeps the register set

Re: Supporting safe managed references

2006-01-24 Thread Chip Salzenberg
On Tue, Jan 24, 2006 at 08:49:55PM -, Jonathan Worthington wrote: Chip Salzenberg [EMAIL PROTECTED] wrote: I'd prefer to reuse something in the engine already for those callbacks. If a lightweight callback mechanism, with parameter, doesn't already exist, then you could either use a

Re: Supporting safe managed references

2006-01-24 Thread Jonathan Worthington
Chip Salzenberg [EMAIL PROTECTED] wrote: On Tue, Jan 24, 2006 at 08:49:55PM -, Jonathan Worthington wrote: Chip Salzenberg [EMAIL PROTECTED] wrote: I'd prefer to reuse something in the engine already for those callbacks. If a lightweight callback mechanism, with parameter, doesn't already

Re: Revert r11320 - it b0rked all src tests on at least OS/X and x86/linux

2006-01-24 Thread Nick Glencross
Leopold Toetsch wrote: I've unapplied r11320. * revert the whole patch * some of it might be correct, though, please review And a final note: please no checkins w/o testing, especially not for config and build stuff. Thanks. My apologies for causing breakage -- pretty serious breakage by

Re: pdd21 notes

2006-01-24 Thread Matt Diephouse
Chip Salzenberg [EMAIL PROTECTED] wrote: Say, that gives me an idea. Python-like untyped namespaces are a significant subpopulation. Matt: How about a standard namespace method: INTVAL is_typed() which returns false for the simple Python-like unmangled namespaces? This would allow

Re: pdd21 notes

2006-01-24 Thread Chip Salzenberg
On Tue, Jan 24, 2006 at 08:29:45PM -0500, Matt Diephouse wrote: Chip Salzenberg [EMAIL PROTECTED] wrote: Say, that gives me an idea. Python-like untyped namespaces are a significant subpopulation. Matt: How about a standard namespace method: INTVAL is_typed() which returns

Test Script Best-Practices

2006-01-24 Thread Jeffrey Thalhammer
Greetings, I've noticed that CPAN authors use a variety of techniques to manipulate the run-time environment in their test scripts. Usually, it involves changing directories and/or altering @INC. This one seem pretty popular: BEGIN { if($ENV{PERL_CORE}) { #What is PERL_CORE?

Re: Test Script Best-Practices

2006-01-24 Thread chromatic
On Tuesday 24 January 2006 18:53, Jeffrey Thalhammer wrote: Greetings, I've noticed that CPAN authors use a variety of techniques to manipulate the run-time environment in their test scripts. Usually, it involves changing directories and/or altering @INC. This one seem pretty popular:

Perl 6 Summary for 2006-01-10 though 2006-01-24

2006-01-24 Thread Matt Fowles
Perl 6 Summary for 2006-01-10 though 2006-01-24 All~ Welcome to another fortnight's summary. This summary marks a return to a Tuesday schedule for summaries. Hopefully this will help me get summaries to you on time. Oddly appropriate that I just started reading Don Quixote...

Re: Test Script Best-Practices

2006-01-24 Thread Tyler MacDonald
Jeffrey Thalhammer [EMAIL PROTECTED] wrote: * Should a test script have a shebang? What should it be? Any flags on that? It's not at all neccessary, but IMHO it is good form; it's a surefire way for anything else (HTTP server, IDEs, etc) to figure out that you're actually a perl script and do

Re: Test Script Best-Practices

2006-01-24 Thread David Golden
Jeffrey Thalhammer wrote: * Should a test script have a shebang? What should it be? Any flags on that? I often see -t in a shebang. One downside of the shebang, though, is that it's not particularly portable. As chromatic said, with prove it's not really necessary. (prove -t) *

pirtidy.pl

2006-01-24 Thread Will Coleda
This script is not 100% yet. (esp watch out for heredocs) partcl needed something to optionally pretty print the PIR that it generates. Figured it'd make sense to make it more generic than just for tcl. Regards patches welcome. =-) Begin forwarded message: From: [EMAIL PROTECTED] Date:

Re: Test Script Best-Practices

2006-01-24 Thread Yitzchak Scott-Thoennes
On Tue, Jan 24, 2006 at 10:25:44PM -0500, David Golden wrote: Jeffrey Thalhammer wrote: * Should a test script have a shebang? What should it be? Any flags on that? I often see -t in a shebang. One downside of the shebang, though, is that it's not particularly portable. As chromatic