Re: Concerns about "{...code...}"

2007-12-20 Thread Dave Mitchell
On Thu, Dec 20, 2007 at 11:35:44AM -0600, Jonathan Scott Duff wrote: > On Thu, Dec 20, 2007 at 11:23:05AM -0600, Jonathan Scott Duff wrote: > > Adriano answered #1 I think: $yaml = Q:!c"{ $key: 42 }"; > > Er, I just looked over the spec again and realized that Q does > absolutely no interpolation

Re: Year ranges in copyright information in source files

2007-08-29 Thread Dave Mitchell
On Wed, Aug 29, 2007 at 02:44:13PM +0200, Paul Cochrane wrote: > I've recently added a test to the coding standards tests which checks > for a copyright statement, and that the copyright date is up to date. > After a discussion on #parrot, Coke made the observation that maybe > the most recent date

Re: Remember: Outlaw to declare a lexical twice in the same scope

2007-01-27 Thread Dave Mitchell
On Sat, Jan 27, 2007 at 10:23:03AM +0100, Carl Mäsak wrote: > my $foo; > # ...later in the same scope... > my $foo; # illegal Perl5, legal Perl6 No, that's perfectly legal in perl5; it just generates a warning: use warnings; my $x = 1; my $f1 = sub { $x }; my $x = 2; my $f2

Re: List assignment question

2006-11-15 Thread Dave Mitchell
On Wed, Nov 15, 2006 at 11:17:57PM +, Nicholas Clark wrote: > I thought that allowing undef in my ($a, undef, $b) came in around 5.004ish, > but I can't find it in perldelta, and I don't have a version compiled to > test with (or any quick way to compile them, given that pretty much only > AIX

Re: pdd20 and :outer

2005-11-23 Thread Dave Mitchell
On Tue, Nov 22, 2005 at 09:32:37AM -0800, Chip Salzenberg wrote: > On Tue, Nov 22, 2005 at 03:28:02PM +0100, Leopold Toetsch wrote: > > sub do_add3 { > > my $a = $_[0]; > > sub add3 { > > $a + 3; > > } > > add3(); > > } > > What Perl 5 does with that case is just a plain ol

Re: Some bison 2.1 experiments on the darwin powerbook ...

2005-11-13 Thread Dave Mitchell
On Sun, Nov 13, 2005 at 11:58:39AM -1000, Joshua Hoblitt wrote: > I started a thread about this a couple of weeks ago. I really think > that bison 1.75c should be the minimum requirement. Note also that bison < 1.24 has licencing issues, in that the generated output files are GPLed. -- Art is a

Re: use fatal err fail

2005-10-18 Thread Dave Mitchell
On Tue, Oct 18, 2005 at 11:06:22AM +0100, Nicholas Clark wrote: > Likewise. A certain reputable OS vendor's NFS implementation went > multithreaded, with the result that close() was now where the over quota > error was reported, rather than the individual writes. > > Said reputable OS vendor's own

Re: $value but lexically ...

2005-10-07 Thread Dave Mitchell
On Fri, Oct 07, 2005 at 03:46:02PM -0600, Luke Palmer wrote: > Uh no. Okay, when I said that they "don't close", I guess I meant > they don't close like anonymous routines do. It works precisely like > Perl 5's: > > sub foo { > my $foo = 5; > sub bar { > return $f

Re: [perl #16622] [PATCH PDD07] Document struct naming conventions

2005-09-20 Thread Dave Mitchell
sidered? > > > > Certainly. Note that the naming conventions are now being followed by > > Interp and friends. > > Dave Mitchell <[EMAIL PROTECTED]> is listed as the maintainer for that > PDD. Perhaps he can comment on the proposal? I'm not currently involved

Re: How much do we close over?

2005-06-12 Thread Dave Mitchell
On Sun, Jun 12, 2005 at 06:22:22PM -0500, Rod Adams wrote: > Well, you could always do something like: > >sub foo { my $x = 1; return sub {my $x := $OUTER::x; eval $^codestring} } In perl5, that would just be sub foo { my $x = 1; return sub { $x ; eval $_[0]} } -- You live and learn (a

Re: How much do we close over?

2005-06-12 Thread Dave Mitchell
On Sun, Jun 12, 2005 at 11:26:49PM +0100, Piers Cawley wrote: > Chip and I have been having a discussion. I want to write: > > sub foo { my $x = 1; return sub { eval $^codestring } } > say foo()("$x"); > > I claim that that should print 1. Chip claims it should throw a warning > about bec

Re: BEGIN and lexical variables inside subroutines

2005-05-12 Thread Dave Mitchell
On Thu, May 12, 2005 at 09:06:48PM +0100, Benjamin Smith wrote: > sub foo { my $x; BEGIN { $x = 3 }; say $x } > foo; foo; foo; > > Currently in perl5 and pugs this prints "3\n\n\n". > > Should BEGIN blocks be able to modify values in lexical variables that > don't really exist yet? (People ca

Re: PMC flags

2005-05-04 Thread Dave Mitchell
On Wed, May 04, 2005 at 05:26:25PM +0100, Nicholas Clark wrote: > On Mon, May 02, 2005 at 08:58:43AM +0200, Leopold Toetsch wrote: > > Nicholas Clark <[EMAIL PROTECTED]> wrote: > > > Parrot gives each PMC class 8 private flag bits. I was wondering how to > > > use > > > these most efficiently for

Re: parrot and refcounting semantics

2005-04-28 Thread Dave Mitchell
On Thu, Apr 28, 2005 at 05:57:10PM +0200, Robin Redeker wrote: > Just because refcounting is error-prone it doesn't mean that a garbage > collector is better (and less error-prone). I'm one of the maintainers of the perl5 core. perl5 is very mature, with relatively few new features being added, an

Re: Scope exit and timely destruction

2005-01-14 Thread Dave Mitchell
On Fri, Jan 14, 2005 at 02:40:43PM -0700, Luke Palmer wrote: > What I'd most like is to convince Larry to waive the timely destruction > requirement. However, that doesn't really solve the problem for other > languages that need timely destruction. Are there any? Perl 5 springs to mind !!! --

Re: Why lexical pads

2004-09-28 Thread Dave Mitchell
On Fri, Sep 24, 2004 at 09:30:22AM -0700, Steve Fink wrote: > But I agree that it is doing a name lookup in the string eval case. > Although if you try it, you get puzzling results: > > perl -le 'sub x {my $foo = 1; return sub { eval q($foo++) } };$x=x();print > $x->(), $x->(), $x->()' > > print

Re: String interpolation

2004-07-22 Thread Dave Mitchell
On Wed, Jul 21, 2004 at 04:37:29PM -0700, Larry Wall wrote: > We allowed/required @foo to interpolate in Perl 5, and it catches a > certain number of people off guard regularly, including yours truly. > So I can argue [EMAIL PROTECTED] both ways. Currently @foo[] is a syntax error. maybe "@foo[]"

Re: push @bar, .splice;

2004-07-17 Thread Dave Mitchell
On Sat, Jul 17, 2004 at 06:53:28PM +0200, Juerd wrote: > If an array element knows that it is an array element, this can be > useful: > > for @foo { push @bar, .splice if EXPR } What happens if the element is an element of more than one array? -- A power surge on the Bridge is rapidly and c

Re: P6C: Parser Weirdness

2004-05-13 Thread Dave Mitchell
On Thu, May 13, 2004 at 12:22:09PM -0700, Larry Wall wrote: > No, you still have the four basic actions. Subparsing is all hidden in > the lexer. Hence why the lexer in Perl 5 is 8000 lines long ;-) -- Wesley Crusher gets beaten up by his classmates for being a smarmy git, and consequently has

Re: File stat info

2004-04-29 Thread Dave Mitchell
On Thu, Apr 29, 2004 at 08:36:11AM +0300, Jarkko Hietaniemi wrote: > But for things like -r "file" && open(FH, "file") they are of rather > dubious value. Well, I have some scripts that check at the start whether all the things they going to need are readable/executable/whatever, so that they can

Re: backticks

2004-04-15 Thread Dave Mitchell
If hypothetically we *are* going to have a simplfied constant-index hash access syntax, is there any reason why we can't use a single quote (') rather than backtick ('), akin to the Perl4-ish package separator, ie %foo'bar rather than %foo`bar? On the grounds that personally I hate the backtick

Re: Magic blocks (was: Compile-time undefined sub detection)

2004-03-08 Thread Dave Mitchell
On Sat, Mar 06, 2004 at 06:39:44PM -0800, Larry Wall wrote: > my @x will begin {...} # at BEGIN time > my @x will check {...} # at CHECK time (redefined to unit check) > my @x will init {...} # at INIT time > my @x will end {...}# at END time Sorry, perhaps

Whither Apocalypse 7?

2004-02-29 Thread Dave Mitchell
Did I miss something? Was there ever an apocalyse 7? Also, why aren't the apocalyses and excegises announced on any of the p6 lists (like, er, perl6-announce for example)? Yours grumpily, Dave. -- My get-up-and-go just got up and went.

Re: Semantics of vector operations

2004-01-21 Thread Dave Mitchell
On Wed, Jan 21, 2004 at 04:01:43PM -0500, Austin Hastings wrote: > Perhaps the right way to vectorize the arguments is to delimit them with > vectorization markers? > > @a + >>$b<< or @a + @$b even! -- Justice is when you get what you deserve. Law is when you get what you pay for.

Re: Optimization brainstorm: variable clusters

2004-01-17 Thread Dave Mitchell
On Sat, Jan 17, 2004 at 04:58:25PM +, Simon Cozens wrote: > [EMAIL PROTECTED] (Dave Mitchell) writes: > > The perl5 internals are a complete mess. It's like Jenga - to get the > > perl5 tower taller and do something new you select a block somewhere in > > the middle

Re: Optimization brainstorm: variable clusters

2004-01-17 Thread Dave Mitchell
On Fri, Jan 16, 2004 at 09:27:57AM -0500, Dan Sugalski wrote: > With perl, for example, it's distinctly possible that this: > > our $foo; # It's a global > $foo = 12; > if ($foo > 10) { > print $foo; > } > > will require fetching $foo's PMC out of the global namespace three > times,

Re: Thread Question and Suggestion -- Matt

2004-01-04 Thread Dave Mitchell
On Sat, Jan 03, 2004 at 08:24:06PM -0500, Matt Fowles wrote: > All~ > > I have a naive question: > > Why must each thread have its own interpreter? > > > I understand that this suggestion will likely be disregarded because of > the answer to the above question. But here goes anyway... > > Wh

Re: Threads Design. A Win32 perspective.

2004-01-03 Thread Dave Mitchell
On Sat, Jan 03, 2004 at 08:05:13PM +0100, Elizabeth Mattijsen wrote: > At 18:20 + 1/3/04, Nigel Sandever wrote: > > Sharing data between the threads/interpreters is implemented by > > tieing the two copies of the variables to be shared and each time > > a STORE is performed in one thread, the s

Re: Threads. Design. Go for it

2004-01-01 Thread Dave Mitchell
On Thu, Jan 01, 2004 at 11:21:57AM -0800, Jeff Clites wrote: > As far as what level needs to implement them, I'd say that parrot has > to do enough to make it possible for an HLL to expose ithreads-style > threading. Due to the cross-language nature of parrot, practically > speaking this probabl

Re: threads and shared interpreter data structures

2003-12-23 Thread Dave Mitchell
On Tue, Dec 23, 2003 at 11:07:53AM +0100, Elizabeth Mattijsen wrote: > At 10:37 +0100 12/23/03, Leopold Toetsch wrote: > >2) the Perl5ish declaration > > > > my $var : shared; > > > > is basically: > > > > $P0 = new SharedPerlUndef; > > > > OTOH: > > > > share($var); > > > > may n

Re: The Block Returns

2003-10-16 Thread Dave Mitchell
On Thu, Oct 16, 2003 at 01:46:30AM +0100, Simon Cozens wrote: > [EMAIL PROTECTED] (Larry Wall) writes: > > But for the time being I'm tied to an IV pole > > We got rid of those; they're PMC poles now. > > Get well soon, Ditto! Dave. -- Little fly, thy summer's play my thoughtless hand has ter

Re: An evil task for the interested

2003-10-09 Thread Dave Mitchell
On Thu, Oct 09, 2003 at 11:43:41AM -0400, Dan Sugalski wrote: > We've got ordered destruction on the big list 'o things to do, and it > looks like we need to get that done sooner rather than later. So, this is > a good chance for someone to burn those surplus SAN points and become one > with the gr

Re: The Block Returns

2003-10-02 Thread Dave Mitchell
On Thu, Oct 02, 2003 at 04:15:06AM -0600, Luke Palmer wrote: > And to clarify: > > sub indexof(Selector $which, [EMAIL PROTECTED]) { > for zip(@data, 0...) -> $_, $index { > when $which { return $index } > } > } > > Which actually creates a closure (well, in th

Re: Timely Destruction: An efficient, complete solution

2003-08-20 Thread Dave Mitchell
On Wed, Aug 20, 2003 at 06:40:51PM -0400, Benjamin Goldberg wrote: > Dave Mitchell wrote: > > > > On Sun, Aug 17, 2003 at 05:48:14AM -0600, Luke Palmer wrote: > > > Here comes that ever-reincarnating thread again, sorry. > > > > > > This is a propos

Re: Timely Destruction: An efficient, complete solution

2003-08-19 Thread Dave Mitchell
On Sun, Aug 17, 2003 at 05:48:14AM -0600, Luke Palmer wrote: > Here comes that ever-reincarnating thread again, sorry. > > This is a proposal for an efficient solution to the timely destruction > problem, which doesn't use refcounting, and fits in to the current > scheme pretty well. I don't quit

Re: This Week's Summary

2003-08-14 Thread Dave Mitchell
On Mon, Aug 11, 2003 at 07:32:00PM -, Rafael Garcia-Suarez wrote: > Will I really be forced to reimplement the whole subrecursive frobnizer > for tied magic ?" Almost certainly, I expect. -- "There's something wrong with our bloody ships today, Chatfield." Admiral Beatty at the Battle of Jut

Re: Cothreads

2003-05-29 Thread Dave Mitchell
On Wed, May 28, 2003 at 07:58:37AM -0700, Austin Hastings wrote: > On a single-CPU box, the OS level threads could easily be used to > support blocking operations feeding back to async I/O, while all "real > work" (execution of opcodes) was done in a single thread. Parrot could > elect to implement

Re: Cothreads

2003-05-28 Thread Dave Mitchell
On Tue, May 27, 2003 at 02:05:57PM -0700, Michael Lazzaro wrote: > If we could think about "threads" not in terms of forkyness, but simply > in terms of coroutines that can be called in parallel, it should be > possible to create an implementation of "threading" that had to do a > whole heck-of-

Re: How shall threads work in P6?

2003-04-04 Thread Dave Mitchell
On Tue, Apr 01, 2003 at 08:44:25AM -0500, Dan Sugalski wrote: > There isn't any, particularly. We're doing preemptive threads. It > isn't up for negotiation. This is one of the few things where I truly > don't care what people's opinions on the matter are. Sorry, I haven't been following this to

Re: Objects, methods, attributes, properties, and other related frobnitzes

2003-02-19 Thread Dave Mitchell
On Wed, Feb 19, 2003 at 02:06:55PM +, Peter Haworth wrote: > Shouldn't we be traversing the inheritance tree once, doing these three > steps at each node until one works, rather doing each step once for the > whole tree. MM dispatch probably complicates this, though. > > If my derived class ha

Re: Arrays, lists, referencing

2003-02-18 Thread Dave Mitchell
On Tue, Feb 18, 2003 at 10:06:29PM -, Smylers wrote: > More practically, the length of a list is never interesting: a list by > definition must be hardcoded into the program so its length is known at > compile time. Indeed it should be known by whoever typed it in! Err, no. Eg in perl 5:

Re: Shortcut: ?=

2003-02-03 Thread Dave Mitchell
On Mon, Feb 03, 2003 at 06:25:09AM -0800, Austin Hastings wrote: > The only time this doesn't change type (arguably a bad thing in its own > right) is when you're doing boolean ops. And for those, there exist > boolean operators. Changing type is a very Perlish thing to do. > > How 'bout a shortc

Re: Arrays: Default Values

2003-01-31 Thread Dave Mitchell
On Fri, Jan 31, 2003 at 05:59:46PM +0100, Leopold Toetsch wrote: > A lvalue param is not strictly reading, but here has to happen something > differently - yes: > > IMHO some sort of proxy could be passed here, saying: "if you write to > me, this will be at @a[0]". Or auto-vivify the entry. Thi

Re: Bytecode metadata

2003-01-26 Thread Dave Mitchell
On Sat, Jan 25, 2003 at 05:38:08PM -0800, Sean O'Rourke wrote: > The problem's actually _virtual_ memory use/fragmentation, not physical > memory or swap. Say you map in 10k small files -- that's 640M virtual > memory, just over a fourth of what's available. Now let's say you're also > using mmap

Re: Bytecode metadata

2003-01-25 Thread Dave Mitchell
On Sun, Jan 26, 2003 at 12:40:19AM +, Nicholas Clark wrote: > On Sat, Jan 25, 2003 at 11:43:40PM +0000, Dave Mitchell wrote: > > Okay, I just ran a program on a a Solaris machines that mmaps in each > > of 571 man files 20 times (a total of 11420 mmaps). The process size > &g

Re: Bytecode metadata

2003-01-25 Thread Dave Mitchell
On Sat, Jan 25, 2003 at 10:04:37AM -0500, Jason Gloudon wrote: > On Thu, Jan 23, 2003 at 08:39:21PM +0000, Dave Mitchell wrote: > > > This means that a Perl server that relies on a lot of modules, and which > > forks for each connection (imagine a Perl-based web server), doesn&#

Re: Bytecode metadata

2003-01-25 Thread Dave Mitchell
On Sat, Jan 25, 2003 at 06:18:47AM -0800, Sean O'Rourke wrote: > On Sat, 25 Jan 2003, Leopold Toetsch wrote: > > Dan Sugalski wrote: > > > > > At 5:32 PM + 1/24/03, Dave Mitchell wrote: > > > > > >> I just wrote a quick C program that success

Re: Bytecode metadata

2003-01-24 Thread Dave Mitchell
On Fri, Jan 24, 2003 at 07:23:04AM +0100, Leopold Toetsch wrote: > How many mmap's can $arch have for one program and for all? > Could we hit some limits here, if every module loaded gets (and stays) > mmap()ed. I just wrote a quick C program that successfully mmap-ed in all 1639 files in my Linu

Re: Bytecode metadata

2003-01-23 Thread Dave Mitchell
On Thu, Jan 23, 2003 at 09:21:45PM +0100, Juergen Boemmels wrote: > My current idea for the in memory format of the bytecode is this: I would strongly urge any file-based byte-code format to arranged in such a way that it (or most of it) can simply be mmap-ed in (RO), analogously to executables.

Re: vector vs. hyper

2002-10-29 Thread Dave Mitchell
On Tue, Oct 29, 2002 at 02:55:57PM -0500, Uri Guttman wrote: > > damian's syntax table and his use of the term vectorizing made me wonder > why we call his [op] thing a hyperoperator? the word hyper i assume came > from hyperdimensional. but calling [] the vectorizing (or just vectored) > op varia

Re: Perl6 Operator List, Damian's take

2002-10-29 Thread Dave Mitchell
On Wed, Oct 30, 2002 at 06:51:14AM +1100, Damian Conway wrote: > String complement treats the value as a string then bitwise complements every > bit of each character. Is that the complement of the codepoint or the individual bytes? (I'm thinking utf8 here). -- Nothing ventured, nothing lost.

Re: Perl6 Operator List

2002-10-25 Thread Dave Mitchell
On Fri, Oct 25, 2002 at 11:27:54AM -0700, Michael Lazzaro wrote: > &&||!!//- boolean operations > &&= ||= !!= //= > and orxor Hmmm, given Larry's comments just now about about similar things not looking similar, I really think | vs ! is a mistake. Fr

Re: Parrot long-term goals/prospects

2002-09-05 Thread Dave Mitchell
On Thu, Sep 05, 2002 at 12:12:52PM +0100, Nicholas Clark wrote: > On Thu, Sep 05, 2002 at 07:03:00AM -0400, Dan Sugalski wrote: > > 4) The *only* tools you will need to build parrot are a C compiler > > environment and either a make tool or a shell > > I believe we may be able to get away withou

Re: DOD etc

2002-08-25 Thread Dave Mitchell
On Sun, Aug 25, 2002 at 11:16:35AM -0400, Tanton Gibbs wrote: > > In this case, it is quite likely that many programs will get that flag > > set. In which case, we'll need to be doing a DOD run at the end of most > > blocks > > I would hope not. The only things which will set this flag are those

Re: DOD etc

2002-08-25 Thread Dave Mitchell
On Sun, Aug 25, 2002 at 12:13:36AM -0400, Tanton Gibbs wrote: > > In my understanding, no. One possible implementation is to set a flag when > > we create an active_destruction PMC (like IO::File), and perform dod runs > > at every block close until we don't have any such PMCs left. > > I earlier

Re: DOD etc

2002-08-21 Thread Dave Mitchell
On Wed, Aug 21, 2002 at 08:25:10PM +0100, I wrote: > In this Brave New World of DOD and GCC, what guarantees (if any) s/GCC/GC/ What with PMC, PDD, COW etc, I have TLA on the brain. :-) -- Nothing ventured, nothing lost.

DOD etc

2002-08-21 Thread Dave Mitchell
In this Brave New World of DOD and GCC, what guarantees (if any) will we be making at the Perl 6 language level for the timely calling of object destructors at scope exit? ie the classic { my $fh = IO::File->new(...); } I know there's been lots of discussion on this over the months, bu

Re: Lexical variables, scratchpads, closures, ...

2002-08-02 Thread Dave Mitchell
On Fri, Aug 02, 2002 at 11:15:09AM -0600, Jonathan Sillito wrote: > Could two parallel arrays work? One stores the lexicals (accessed by > index) and the other stores the names of the lexicals. Then to access a > lexical by name involves a sequential search through the (probably not > large) array

Re: perl6-language@perl.org

2002-08-01 Thread Dave Mitchell
On Thu, Aug 01, 2002 at 06:17:11PM -0400, Uri Guttman wrote: > do these instead: > > $bool += 0 ; > ($x == $y) + 0 or even $x == $y || 0 -- Never do today what you can put off till tomorrow.

Re: perl6-language@perl.org

2002-08-01 Thread Dave Mitchell
On Thu, Aug 01, 2002 at 06:02:14PM -0400, Miko O'Sullivan wrote: > It would be really groovy if that expression could be split with the > delimiters in place, something like this: > >@tokens = split _/[?=*-+]/, $sql, keep=>'all'; > > and get back an array with these values: ('rank', '=', '?'

Re: [PATCH] .dev files.

2002-07-17 Thread Dave Mitchell
On Wed, Jul 17, 2002 at 11:13:58PM +0100, Nicholas Clark wrote: > On Wed, Jul 17, 2002 at 10:38:47PM +0100, Dave Mitchell wrote: > > One of the reasons I used numerical accuracy as an example was because > > in Perl 5, Nick's mini-essay on his stirling work *is* buried somewhe

Re: [PATCH] .dev files.

2002-07-17 Thread Dave Mitchell
On Wed, Jul 17, 2002 at 01:42:17PM -0700, John Porter wrote: > > Andy Dougherty wrote: > > I think the purpose of the .dev files, as laid out in > > docs/pdds/pdd07_codinstd.pod, is a reasonable one. > > Here's an edited excerpt: . . . > > (Thanks, Andy.) > > Well, given that definition of the

Re: Parrot contribution

2002-07-13 Thread Dave Mitchell
On Sat, Jul 13, 2002 at 03:48:31PM +0100, Nicholas Clark wrote: > I was working somewhere where the chief technical architect, a very smart > guy, was far too busy doing stuff to write it down, and also didn't view it > as a priority as "I don't need to write it down, it's all in my head". And on

Re: vtables and multimethod dispatch

2002-07-12 Thread Dave Mitchell
On Thu, Jul 11, 2002 at 08:20:21PM -0700, John Porter wrote: > > Dave Mitchell wrote: > > IIRC, all metrics of the form (x^n + y^n)^(1/n), n=1,2,...Inf > > are strongly equivalent, ie they give rise to the *same* ordering. > > (In the limit as n -> Inf, the metric i

Re: What's MY.line?

2002-07-11 Thread Dave Mitchell
On Thu, Jul 11, 2002 at 10:37:27PM +0100, Nicholas Clark wrote: > Is there any specific case where you can't treat > > { > my $foo = 12; > print $foo; > my $foo = "ho"; > print $foo; > } > > as > > { > my $foo = 12; > print $foo; > { > my $foo = "ho"; > print $foo; > } >

Re: vtables and multimethod dispatch

2002-07-11 Thread Dave Mitchell
On Thu, Jul 11, 2002 at 01:18:51PM -0700, John Porter wrote: > Nicholas Clark wrote: > > I was thinking that the metric (x*x + y*y) would be fast to > > calculate, as that's all we need for ordering. > > Point is, it's rather *more* than we need for ordering. > x + y will suffice. IIRC, all metr

Re: What's MY.line?

2002-07-11 Thread Dave Mitchell
On Thu, Jul 11, 2002 at 02:29:08PM -0400, Dan Sugalski wrote: > At 7:18 PM +0100 7/11/02, Dave Mitchell wrote: > >On Thu, Jul 11, 2002 at 10:41:20AM -0400, Dan Sugalski wrote: > >> The place where you'll run into problems in where you have multiple > >> variab

Re: What's MY.line?

2002-07-11 Thread Dave Mitchell
On Wed, Jul 10, 2002 at 11:57:02PM -0400, Chip Salzenberg wrote: > According to Dave Mitchell: > > Based on what I rememeber from the long threads about this, > > Ouch. I gather, then, that nntp.perl.org does not house complete list > archives, or else the discussion was

Re: What's MY.line?

2002-07-11 Thread Dave Mitchell
On Thu, Jul 11, 2002 at 10:41:20AM -0400, Dan Sugalski wrote: > The place where you'll run into problems in where you have multiple > variables of the same name at the same level, which you can do in > perl 5. can it? can you give an example? -- In England there is a special word which means

Re: What's MY.line?

2002-07-10 Thread Dave Mitchell
On Tue, Jul 09, 2002 at 09:50:26PM -0400, Chip Salzenberg wrote: Based on what I rememeber from the long threads about this, >3. Is C<%MY> intended to reflect the PAD? loosely speaking yes. > > 3a. If so, how can one distinguish among the e.g. many C > variables declared within

Re: Perl 6, The Good Parts Version

2002-07-03 Thread Dave Mitchell
On Wed, Jul 03, 2002 at 01:23:24PM -0400, Michael G Schwern wrote: > Hopefully the Cabal [2] can debunk that. [snip] > [2] Of which there is none. and http://www.perlcabal.com/ doesn't exist, right? ;-) -- "I do not resent critisism, even when, for the sake of emphasis, it parts for the time w

Re: Perl5 humor

2002-06-25 Thread Dave Mitchell
On Tue, Jun 25, 2002 at 04:45:37PM +0100, Tim Bunce wrote: > On Tue, Jun 25, 2002 at 11:35:20AM +0100, Dave Mitchell wrote: > > On Tue, Jun 25, 2002 at 11:08:53AM +0100, Tim Bunce wrote: > > > On Tue, Jun 25, 2002 at 12:23:34AM +0100, Dave Mitchell wrote: > > > > Of

Re: Perl5 humor

2002-06-25 Thread Dave Mitchell
On Tue, Jun 25, 2002 at 11:08:53AM +0100, Tim Bunce wrote: > On Tue, Jun 25, 2002 at 12:23:34AM +0100, Dave Mitchell wrote: > > Of course, another approach is to embed the existing Perl5 interpreter > > within the Perl 6 interpreter; Perl6 subs call glue which calls Perl subs

Re: Perl5 humor

2002-06-24 Thread Dave Mitchell
On Mon, Jun 24, 2002 at 05:21:45PM -0400, David J. Goehrig wrote: > On Sun, Jun 23, 2002 at 09:50:02PM +0100, Tim Bunce wrote: > > Much more likely is some kind of wrapper that manages a simple > > perl5-like run-time environment (stacks, marks, gimme, symboltable > > etc) plus source-code compati

Re: Stacks, stacks, stacks (And frames)

2002-06-11 Thread Dave Mitchell
On Tue, Jun 11, 2002 at 11:31:37AM -0400, Dan Sugalski wrote: > We'll find out with A6 whether we do coroutines and continuations as > part of the core perl. If not, well, python does the first and ruby > the second, so it's all good in there. Does anyone feel like giving a 1 paragraph potted

Re: Half measures all round

2002-06-04 Thread Dave Mitchell
On Tue, Jun 04, 2002 at 10:43:02AM +0100, Simon Cozens wrote: > (Please CC me on replies) > > I don't often express many opinions on Perl 6 these days, but I feel I have to > warn people about what I see as a potential loss of direction. > > I'm becoming somewhat disillusioned with Perl 6 these

GC and ithreads

2002-05-29 Thread Dave Mitchell
Aplogies if this has already been discussed, but I haven't been following p6i too closely of late (the lure of being allowed to mess with 5.7.3 has been too strong :-) Anyway, I presume that the Perl6 theading model will be like Perl 5 ithreads - that is to say, each thread has its own interprete

Re: GC, exceptions, and stuff

2002-05-29 Thread Dave Mitchell
> *) Expect POSIX's dead-stupid mutexes to magically unlock Hmmm, are we confident that we can write exception handling and stack rollback code that will always clean up mutexes? -- "There's something wrong with our bloody ships today, Chatfield." Admiral Beatty at the Battle of Jutland, 31st M

Re: GC, exceptions, and stuff

2002-05-29 Thread Dave Mitchell
On Wed, May 29, 2002 at 03:23:41PM -0400, Dan Sugalski wrote: > At 10:53 AM +0100 5/29/02, Dave Mitchell wrote: > >On Tue, May 28, 2002 at 07:35:43PM -0700, Hong Zhang wrote: > >> Parrot has to handle signals, such as SIGSEGV. > > > >That's the one signal I

Re: GC, exceptions, and stuff

2002-05-29 Thread Dave Mitchell
On Tue, May 28, 2002 at 07:35:43PM -0700, Hong Zhang wrote: > Parrot has to handle signals, such as SIGSEGV. That's the one signal I really hope parrot *doesn't* handle. Dave. -- A walk of a thousand miles begins with a single step... then continues for another 1,999,999 or so.

Re: PATCHES

2002-05-22 Thread Dave Mitchell
On Wed, May 22, 2002 at 11:52:36AM -0300, Daniel Grunblatt wrote: > And, please: > > 1 - Try to send the patch as an attachment, sometimes it's too difficult > to apply if you don't. > > 2 - 'diff -u' I S Y O U R F R I E N D :) 'diff -up' is even better if your diff supports it! Dave. -- N

Re: eval {} or carp "blah: $@"

2002-05-02 Thread Dave Mitchell
On Thu, May 02, 2002 at 02:33:42PM -0600, Jim Cromie wrote: > > with p5, Ive often written > > eval {} or carp "$@ blah"; You generally Don't Want To Do That. If the eval succeeds, but the last statement in the eval happens to come out as false, then it'll still carp: $a = 0; eval { 1 < $a

Re: Loop controls

2002-05-01 Thread Dave Mitchell
In the true sprirt of perverseness, why not make loops into functions that return the number of iterations taken. Then you can have loop { } or die "loop not taken\n"; ;-) -- A walk of a thousand miles begins with a single step... then continues for another 1,999,999

Re: Roadmap for Parrot

2002-04-17 Thread Dave Mitchell
On Wed, Apr 17, 2002 at 05:43:01PM -0400, Dan Sugalski wrote: > At 10:16 PM +0100 4/17/02, Dave Mitchell wrote: > >On Wed, Apr 17, 2002 at 04:57:21PM -0400, Dan Sugalski wrote: > >> At 9:48 PM +0100 4/17/02, Dave Mitchell wrote: > >> >On Wed, Apr 17, 2002 at 04:34:

Re: Roadmap for Parrot

2002-04-17 Thread Dave Mitchell
On Wed, Apr 17, 2002 at 04:57:21PM -0400, Dan Sugalski wrote: > At 9:48 PM +0100 4/17/02, Dave Mitchell wrote: > >On Wed, Apr 17, 2002 at 04:34:12PM -0400, Simon Glover wrote: > >> I thought lexicals were going to live in a symbol table now? In which > >> case,

Re: // in Perl 5.8?

2002-04-17 Thread Dave Mitchell
On Wed, Apr 17, 2002 at 01:58:05PM -0700, David Wheeler wrote: > On 4/17/02 1:51 PM, "Dave Mitchell" <[EMAIL PROTECTED]> claimed: > > > I hope you're referring to 5.8.x for some x != 0 ??? :-) > > Do you know how late in the development process the $code

Re: // in Perl 5.8?

2002-04-17 Thread Dave Mitchell
On Wed, Apr 17, 2002 at 01:09:43PM -0700, David Wheeler wrote: > Anyone know what the chances are that some enterprising C hacker > can/will/did get the // and //= operator into Perl 5.8? Seems like it > wouldn't be a huge deal to add, and I'd love to have it sooner rather than > later. I hope yo

Re: Roadmap for Parrot

2002-04-17 Thread Dave Mitchell
On Wed, Apr 17, 2002 at 04:34:12PM -0400, Simon Glover wrote: > > On Wed, 17 Apr 2002, Brent Dax wrote: > > > Dan Sugalski: > > # Okay, here are the milestones. Each is worth a point release. If we > > # manage to take them in this order, great. :) > > > > Rough dependency tree: > > > > Arrays >

Re: C loop variations

2002-04-17 Thread Dave Mitchell
On Tue, Apr 16, 2002 at 06:17:24PM -0700, David Wheeler wrote: > In Exegesis 4, Damian writes: > > > It's important to note that writing: > > > for @a; @b -> $x; $y {...} > # in parallel, iterate @a one-at-a-time as $x, and @b one-at-a-time as > $y > > is not the same as writing: > >

Re: Unary dot

2002-04-14 Thread Dave Mitchell
On Sat, Apr 13, 2002 at 05:07:37PM -0700, Larry Wall wrote: > Of course, one of the big reasons we went with $self was the pun: > > my $self = shift; > > which we won't have now. Unless we always hide the invocant and > force you to say > > my $self = invocant; > > or some such mummer

Re: Unary dot

2002-04-12 Thread Dave Mitchell
On Wed, Apr 10, 2002 at 05:47:01PM -0500, Allison Randal wrote: > I'm in favor of the standardized variable name. It is a restriction, but > not an onerous one. I've never used anything but $self, and I'm sure it > would be easy to adapt to whatever else was chosen. Are there any > statistics avai

Re: GC and allocation controls?

2002-03-15 Thread Dave Mitchell
On Fri, Mar 15, 2002 at 08:50:47PM +, Nicholas Clark wrote: > On Fri, Mar 15, 2002 at 03:42:50PM -0500, Dan Sugalski wrote: > > > >> On Fri, 15 Mar 2002, Tim Bunce wrote: > > >> > Might be good to also provide "higher level" controls that just > > >> > provide hints to the GC. Somewhat lik

Re: Reformatting code/coding standards

2002-03-11 Thread Dave Mitchell
Melvin Smith <[EMAIL PROTECTED]> wrote: > This is my only nitpick with the coding standards. > > I never cared for the style of putting return type on a > separate line above the function declaration header. > > I like it just as the prototype. > > I vote for non-enforcement of this one. perso

RE: #defined types

2002-02-26 Thread Dave Mitchell
Dan Sugalski <[EMAIL PROTECTED]> wrote: > At 8:10 PM -0800 2/23/02, Brent Dax wrote: > > typedef struct foo_t * FooPtr; > > typedef struct foo_t FOO; > > Y'know, thinking about this, I don't like this trick. That should be > FOO, and FOO *. > > We either typedef the struct, or the point

Re: Keys and Indices PDD

2002-02-19 Thread Dave Mitchell
Simon Cozens <[EMAIL PROTECTED]> wrote: > Need discussion on whether C is a good exception for > this, or whether something else should be used. It's really a compiler > screw-up, since code which indexes a non-aggregate shouldn't be > generated. Except of course references, where the compiler ca

Re: PDDs, guys.

2002-02-19 Thread Dave Mitchell
Dan Sugalski <[EMAIL PROTECTED]> wrpote: > Implementation should be capable of being yanked out and replaced > with no notice, and things still work. It is, and should be, > considered ephemeral. It's the least important thing to get right, > since it can be fixed or completely replaced as we n

Re: PMCs, setting, and suchlike things

2002-02-14 Thread Dave Mitchell
Dan Sugalski <[EMAIL PROTECTED]> wrote: > At 3:53 PM + 2/14/02, Dave Mitchell wrote: > >My outstanding niggle is when a typed variable is undef. I guess we > >need a generic Perl_Undef_But_Typed vtable type, which behaves mostly > >like the PerlUndef type, but s

Re: PMCs, setting, and suchlike things

2002-02-14 Thread Dave Mitchell
Dan Sugalski <[EMAIL PROTECTED]> wrote: > There's a flag in the flags field to mark the PMC as a permanent type > or not. It's insufficient for "Type X or child of X" things, though. > > >Or to put it another way, is the type of a PMC determined purely by > >it's current vtable pointer, and if s

Re: PMCs, setting, and suchlike things

2002-02-14 Thread Dave Mitchell
Alex Gough <[EMAIL PROTECTED]> wrote: > On Thu, 14 Feb 2002, Dave Mitchell wrote: > > > $foo would first be a Dog, then a FireHydrant. When it changed to a > > > FireHydrant the previous contents would get blown away. > > > > Hmmm - how do we distinguish bet

Re: PMCs, setting, and suchlike things

2002-02-14 Thread Dave Mitchell
Dan Sugalski <[EMAIL PROTECTED]> wrote: > Right, for typed variables. Most variables (i.e. anything you > declared with a plain "my $foo" or "our @bar") are untyped and can > change their types as needed. > > If you did: > > my $foo; > $foo = Dog.new(); > $foo = FireHydrant.new();

  1   2   >