Re: handling undef better

2005-12-23 Thread TSa
HaloO, Nicholas Clark wrote: I think that Larry is referring to slightly larger and more expensive rockets than regular fireworks: http://www.siam.org/siamnews/general/ariane.htm I know. But where would we put Perl 6 onto a range of programming languages parrallel to rockets ranging from fire

Re: Problem with dwimmery

2005-12-23 Thread Ruud H.G. van Tol
Jonathan Lang: > could we huffman-code "do nothing" clauses by > leaving out the appropriate argument? > > while $x-- && some_condition($x); Heheh, I often code like that, and then silence the complaint by adding the {}. -- Grtz, Ruud

Good Perl6 environment

2005-12-23 Thread Peter Schwenn
Perl6'ers Is the "best" (most complete as to Perl6 Language) current setup (for experimenting with Perl6 source code) currently a hybrid: Pugs with embedded Parrot, or is it Perl5 with a large set of Perl6'ish modules. Or something else that I've missed. For the former case (Pugs+Parrot) whe

Re: Good Perl6 environment

2005-12-23 Thread Luke Palmer
On 12/23/05, Peter Schwenn <[EMAIL PROTECTED]> wrote: > Perl6'ers > > Is the "best" (most complete as to Perl6 Language) current setup (for > experimenting with Perl6 source code) currently a hybrid: Pugs with > embedded Parrot, or is it Perl5 with a large set of Perl6'ish modules. > Or something e

Re: Problem with dwimmery

2005-12-23 Thread TSa
HaloO, Nicholas Clark wrote: Well, I assume that the do-nothing sub is assigned into the variable, and gets re-evaluated each time the variable is use. Which would mean that you'd get a new (different) empty hash each time. Whereas an empty hash constructor gives you a hash reference to keep. (n

Re: [PATCH] trivial patch to mandelbrot.pir to make it comply like it should have in the first place :(

2005-12-23 Thread Leopold Toetsch
On Dec 23, 2005, at 0:17, peter baylies wrote: Short version: uncomment lines 86-87, patch follows. Thanks, applied - r10629. leo

Re: Problem with dwimmery

2005-12-23 Thread Nicholas Clark
On Fri, Dec 23, 2005 at 10:43:23AM +0100, TSa wrote: > HaloO, > > Nicholas Clark wrote: > >Well, I assume that the do-nothing sub is assigned into the variable, and > >gets re-evaluated each time the variable is use. Which would mean that > >you'd > >get a new (different) empty hash each time. Wh

PGE infinite loop bug

2005-12-23 Thread Luke Palmer
The following causes PGE to infinite loop: "x" ~~ /[ [ x ]* ]*/ Luke

Dynamic binding (e.g. Perl5 "local"), continuations, and threads

2005-12-23 Thread Bob Rogers
The obvious way to implement Perl5 "local" bindings in Parrot would be to: 1. Capture the old value in a temporary; 2. Use store_global to set the new value; 3. Execute the rest of the block; and 4. Do another store_global to reinstate the old value. This has a serious flaw:

Re: [PATCH] Better support for libparrot.so (revived)

2005-12-23 Thread François PERRAD
At 12:51 22/12/2005 +, you wrote: Guys, I'd like to revive this patch which I posted a while back, but has needed bringing up to date due to subsequent changes. It has a few key intentions: * Makes libparrot.so a 'first class citizen' * Allows the installed version of parrot and its ut

Match objects

2005-12-23 Thread Luke Palmer
What sort of match object should this return, supposing that it didn't infinite loop: "x" ~~ / [ [ (x) ]* ]* / Should $/[0][0] be "x", or should $/[0][0][0] be "x"? If it's the latter, then when do new top-level elements get added? / [ [ { say +$/[0][] } # is thi

[PATCH] mandelbrot.pir optimizations

2005-12-23 Thread peter baylies
This should fix the slowdown from the previous patch, while maintaining correct output. It speeds things up by about 15% for me, using JIT on x86. --- mandelbrot.pir 2005-12-23 02:50:52.0 -0500 +++ mandelbrot-opt.pir 2005-12-23 03:15:53.0 -0500 @@ -68,15 +68,14 @@ Ci

Re: [PATCH] Better support for libparrot.so (revived)

2005-12-23 Thread Nick Glencross
On 12/23/05, François PERRAD <[EMAIL PROTECTED]> wrote: > > OK with static on Win32 + gcc (MinGW). > > Shared on Win32, always the same linking problem with > parrot_get_config_string() > (see https://rt.perl.org/rt3/Ticket/Display.html?id=37303) > > g++ -shared -o blib\lib\libparrot.dll ... > >

Deep copy

2005-12-23 Thread Luke Palmer
Does .clone do deep or shallow copying of objects? I'm going to argue for shallow. I know there's a obvious tendency to say that we should go with deep, because it's useful sometimes. However, I think that would be ignoring the amazing prevelance of the shallow copy idioms in perl 5: [ @arr

Re: Deep copy

2005-12-23 Thread Juerd
Luke Palmer skribis 2005-12-23 16:16 (+): > However, I think that would be ignoring the amazing prevelance of the > shallow copy idioms in perl 5: > [ @array ] > { %hash } It's a great idiom. Not much typing, easy on the eyes and easy to understand. There's little, if any, reason to u

real ranges

2005-12-23 Thread TSa
HaloO Everybody, here's a an idea from me about makeing range object a bit like junctions. That is a range object has a $.min and $.max and the following comparison behaviour: str num lt < strictly inside -+ gt > strictly outside --+ | eq == exactly on boundary --+ | |

Re: real ranges

2005-12-23 Thread TSa
Ups, I forgot to mention things like +('a0',,'e3') == +( , , , , ) == +( 'a0','a1','a2','a3', 'b0','b1','b2','b3', 'c0','c1','c2','c3',

Re: Deep copy

2005-12-23 Thread Luke Palmer
On 12/23/05, Juerd <[EMAIL PROTECTED]> wrote: > Luke Palmer skribis 2005-12-23 16:16 (+): > > However, I think that would be ignoring the amazing prevelance of the > > shallow copy idioms in perl 5: > > [ @array ] > > { %hash } > > It's a great idiom. Not much typing, easy on the eyes a

Re: real ranges

2005-12-23 Thread Juerd
TSa skribis 2005-12-23 17:33 (+0100): > lt < strictly inside -+ > gt > strictly outside --+ | > eq == exactly on boundary --+ | | >| | | negation > ne != not on boundary --+ | | > le <= inside or on boundary --+ | > ge >= outside

Re: Deep copy

2005-12-23 Thread TSa
HaloO, Luke Palmer wrote: That's an interesting idea. A "deep reference". I also instantaniously loved the idea to dinstinguish between the types Hash and Ref of Hash. Or Array etc. --

Re: Deep copy

2005-12-23 Thread Juerd
Luke Palmer skribis 2005-12-23 16:42 (+): > > I'd want something that clones this, somewhere between shallow and deep. > > . should be deep, but . shallow. Perhaps this can be determined > > using some attribute, that for a referenced hash defaults to the > > opposite of what it defaults to for

Re: real ranges

2005-12-23 Thread Luke Palmer
On 12/23/05, TSa <[EMAIL PROTECTED]> wrote: > HaloO Everybody, > > here's a an idea from me about makeing range object a bit like > junctions. That is a range object has a $.min and $.max and the > following comparison behaviour: > > str num > > lt < strictly inside -+ > gt > stri

Re: Deep copy

2005-12-23 Thread Nicholas Clark
On Fri, Dec 23, 2005 at 04:16:44PM +, Luke Palmer wrote: > Does .clone do deep or shallow copying of objects? > > I'm going to argue for shallow. I know there's a obvious tendency to > say that we should go with deep, because it's useful sometimes. > However, I think that would be ignoring t

Re: Deep copy

2005-12-23 Thread Juerd
Nicholas Clark skribis 2005-12-23 17:18 (+): > Why not call the shallow copy .copy, and the deep copy .clone? Because using (almost-)synonyms for different things leads to infinite confusion. List/Array is a good example. Juerd -- http://convolution.nl/maak_juerd_blij.html http://convoluti

Re: [PATCH] Better support for libparrot.so (revived)

2005-12-23 Thread Nick Glencross
Guys, Here's an updated version of the libparrot shared library patch. It primarily adds back the functionality for SOVERSION. To do this I have created two new compile flags which will usually be set in the platform hints. * ld_libparrot_soname: Supplied to ld to set the library version o

Re: [PATCH] Better support for libparrot.so (revived)

2005-12-23 Thread Nick Glencross
Nick Glencross wrote: Guys, Here's an updated version of the libparrot shared library patch. Sorry, omitted one of the configure files! I should mention that you probably want to remove config/inter/libparrot.pm before ever reapplying the patch otherwise you'll get the same content twice.

Re: Problem with dwimmery

2005-12-23 Thread Larry Wall
On Thu, Dec 22, 2005 at 03:19:03PM -0800, Jonathan Lang wrote: : As a third possibility, could we huffman-code "do nothing" clauses by : leaving out the appropriate argument? That is: : : while $x-- && some_condition($x); : : or : : loop ( ; some_condition($x) ; $x--); We could, except tha

Re: Iterating over complex structures

2005-12-23 Thread Brad Bowman
But in Perl 5 to "navigate" complex structures one needs ad-hoc solutions. I wonder if something is planned in Perl 6 as a means to do that through a syntactically convenient construct with ad-hoc-isms pluggable in in the form of suitable hooks (e.g. .on_node( { code; ... } ), etc.) that woul

Re: Iterating over complex structures

2005-12-23 Thread Brad Bowman
Well, @Larry has been researching attribute grammars for a month or two now, which are an efficient (programmer-wise, not necessarily processor-wise) method for specifying computations over trees. The only syntax we've seen is that of Language::AttributeGrammar and TGE, whose roots come from UU

Re: [PATCH] Better support for libparrot.so (revived)

2005-12-23 Thread Joshua Hoblitt
Nick, I'll try to take a look at all of this patch today. Quick questions - why is: +src/install_config.o [main]lib being added to MANIFEST.generated? -J On Fri, Dec 23, 2005 at 06:25:44PM +, Nick Glencross wrote: > Index: debian/libparrot.install > ===

Re: Deep copy

2005-12-23 Thread Larry Wall
I think that deep copying is rare enough in practice that it should be dehuffmanized to .deepcopy, perhaps with optional arguments saying how deep. Simple shallow copy is .copy, whereas .clone is a .bless variant that will copy based on the deep/shallow preferences of the item being cloned. The d

Threading PDD?

2005-12-23 Thread Klaas-Jan Stol
Hi, I'm wondering, is there a PDD about Thread implementation in Parrot? I searched the list archive, and found a lot of info. Dan even mentioned writing a PDD on the subject, but I havent' been able to find it. Thanks, klaas-jan

Re: Test::Harness spitting an error

2005-12-23 Thread Troy Denkinger
Michael G Schwern wrote: The solution is to use the no_chdir flag to File::Find::find() so that your tests are run from the top level of your source directory, not inside t/. Many thanks, Michael. Your suggestion was spot on. Not only do I no longer get the error message, the POD tests are

Re: [PATCH] Better support for libparrot.so (revived)

2005-12-23 Thread Joshua Hoblitt
Below are my thoughts on this patch in it's current form. I don't like the function of ld_libparrot_soname because it has the soname mixed up with the linker flags. I'd rather see something like ld_soflags and libparrot_soname (I don't have strong feelings about the names). Building a shared li