Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-05 Thread Andrew Pimlott
On Wed, Jul 06, 2005 at 12:10:43AM +0100, Fergal Daly wrote: > On 7/5/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > > my $x = []; > > sub one_way = { $x } > > sub another_way = { [] } > > sub test = { $_[0] == $x } > > > > I don't think this breaks your rules, but see below. > > You're right, I

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-05 Thread Andrew Pimlott
On Tue, Jul 05, 2005 at 10:15:16AM +0200, demerphq wrote: > (apologies about the slow follow up) not slow in my book :-) > On 7/4/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > > On Mon, Jul 04, 2005 at 12:36:29AM +0200, demerphq wrote: > > > On 7/3/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote:

Re: field `_crypt_struct' has incomplete type

2005-07-05 Thread Brent 'Dax' Royal-Gordon
Sam Vilain <[EMAIL PROTECTED]> wrote: > Has anyone got any more information to add to this problem? I'm > particularly interested to know which platforms it affects. It seems to affect Debian and derivatives (including my distribution, Ubuntu). I'm seeing it on both my x86 laptop and my AMD64 de

Re: Character Classes in globs, partcl

2005-07-05 Thread Patrick R. Michaud
On Tue, Jul 05, 2005 at 11:53:27PM -0400, Will Coleda wrote: > *sniff* > > If PGE supported character classes in globs right now, we'd probably > pass another 50 or 60 tests from the Tcl suite without writing any > more code for the interpreter. Oh. It's hard to resist a win like that, so...

Summarizer Suggestion...

2005-07-05 Thread Will Coleda
It would be nice if the summarizers also summarized the various Planet RSS feeds of journal entries, if those entries were sufficiently relevant. Then I wouldn't feel torn between send progress updates to the list or to the journal. =-)

Character Classes in globs, partcl

2005-07-05 Thread Will Coleda
*sniff* If PGE supported character classes in globs right now, we'd probably pass another 50 or 60 tests from the Tcl suite without writing any more code for the interpreter.

Re: PGE: Code Blocks

2005-07-05 Thread Patrick R. Michaud
On Tue, Jul 05, 2005 at 07:37:58PM -0700, Larry Wall wrote: > I think I'd rather see a :lang('tcl') option since :c is taken and > :l isn't. But mostly people will want to put > use rule :lang; > or some such at the beginning of the file, since all the rule actions > are likely to be in the sa

Re: Copyrights

2005-07-05 Thread Allison Randal
On Jul 3, 2005, at 7:42, Will Coleda wrote: I was under the impression that for any code to be included in the parrot repository, that the copyright had to be assigned to the Perl Foundation. But there are exceptions to this throughout the repository, even in core files like imcc/main.c (Copyr

field `_crypt_struct' has incomplete type

2005-07-05 Thread Sam Vilain
Hi all, Many of you are familiar with the error during `make' of recent pugs: In file included from /usr/lib/perl/5.8/CORE/op.h:496, from /usr/lib/perl/5.8/CORE/perl.h:2600, from src/perl5/perl5.h:3, from /tmp/ghc23619.hc:6: /usr/lib/perl/5

Re: PGE: Code Blocks

2005-07-05 Thread Larry Wall
On Tue, Jul 05, 2005 at 12:45:11PM -0500, Patrick R. Michaud wrote: : On Tue, Jul 05, 2005 at 08:51:39AM -0700, Larry Wall wrote: : > : > For languages that cannot do one-pass parsing, it would be saner in : > the long run for rules to delimit such code with delimiters that : > are unlikely to occ

Re: Time::Local -- and lexical scope

2005-07-05 Thread Larry Wall
On Tue, Jul 05, 2005 at 03:48:47PM -0700, Dave Whipp wrote: : Dave Whipp wrote: : : >You can use "{time - $epoch}" or "{time.as<%d>}" or "{int time}". (That : >last one is not "{+time}", because that would be a floating-point value, : >not an integer). Or {time.int}, presumably. : I was thinki

Submethods

2005-07-05 Thread Stevan Little
Again with the metamodel stuff :P So, I am trying to implement the submethods correctly, and some questions occurred to me. The concept of non-inherited infrastructural methods is fairly simple to accomplish in the meta-model, by just giving submethods their own dispatch table inside the met

Re: Autogenerated attribute accessor names

2005-07-05 Thread Stevan Little
Larry, On Jul 5, 2005, at 9:08 PM, Larry Wall wrote: If we pretend attribute declarations are anonymous role declarations, they might turn out to be just that, especially if we decide it's a useful conceit. This exact thing occurred to me as I was sitting in traffic on the way back from $wor

Re: Time::Local

2005-07-05 Thread Larry Wall
On Tue, Jul 05, 2005 at 06:47:41PM -0600, zowie wrote: : Hmmm Actually, ntpd achieves that sort of accuracy -- but if : I understand correctly it anchors the UTC time to the standard, : and allows the UNIX seconds count (which often does not account for : new leap seconds, though some gmtime v

Re: 5.004_xx in the wild?

2005-07-05 Thread Paul Johnson
On Wed, Jul 06, 2005 at 01:36:10AM +0200, Abigail wrote: > On Mon, Jul 04, 2005 at 05:21:01PM +0200, Paul Johnson wrote: > > > > Unfortunately, upgrading isn't always an option. Anyone can type > > > > $ ./Configure -des && make && make test install > > > > but putting the results of such a c

Re: Autogenerated attribute accessor names

2005-07-05 Thread Larry Wall
On Tue, Jul 05, 2005 at 05:26:31PM -0400, Stevan Little wrote: : What should I do when I encounter two attributes which can peacefully co-exist as : attributes, but cause a class when we autogenerate the accessors for them. Here is a : quick example: : : class Foo { : has @.bar; :

Re: Time::Local

2005-07-05 Thread zowie
On Jul 5, 2005, at 6:18 PM, Sam Vilain wrote: Craig DeForest wrote: Using the TAI epoch of 1958-01-01 00:00:00 has several advantages: - TAI is recognized by international standards-setting bodies (BIPM). - Perl6 will then shake out the 31-bit time rollover a full 12 years before

Re: Time::Local

2005-07-05 Thread Sam Vilain
Craig DeForest wrote: Using the TAI epoch of 1958-01-01 00:00:00 has several advantages: - TAI is recognized by international standards-setting bodies (BIPM). - Perl6 will then shake out the 31-bit time rollover a full 12 years before I like this in principle, however I wonder of the

Re: How to get started with Test::TAP::HTMLMatrix

2005-07-05 Thread Chris Hutchinson
> I'd like to use Test::TAP::HTMLMatrix to better visualize the state of > large test runs. > > However, I can't tell from the docs how to run the test suite such that > it gets involved in the process. Could someone provide an example? > > Thanks! > > Mark > For what it's worth, I wrote

Re: [ANNOUNCE] Test::Symlink

2005-07-05 Thread Michael G Schwern
Ni[kt] picking comments: There's no example code in the SYNOPSIS. Your example code which uses Test::Symlink should show how to set up the plan. Namely: use Test::Symlink tests => 2; I think not verifying that the destination exists is a mistake as probably the biggest issue with symlinks is th

Re: Time::Local

2005-07-05 Thread Juerd
Dave Rolsky skribis 2005-07-05 15:41 (-0500): > As for 0 vs 1 as the index, I think this is a bit of a red herring. If > you're constantly using this as an array index you're operating at too low > a level (IMO). If all your programs start with: > my @DayNames = qw( Sunday Monday Tuesday ... )

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-05 Thread Fergal Daly
On 7/5/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > On Tue, Jul 05, 2005 at 01:24:38AM +0100, Fergal Daly wrote: > > There's an easy way to see what's "accptable" and what's not and what > > exactly this level equality means. Consider the following code > > template: > > > > ### > > # lots o

Autogenerated attribute accessor names

2005-07-05 Thread Stevan Little
Hello, As I am building the metamodel, I had a question, I did not find anything specifically in the docs regarding this. What should I do when I encounter two attributes which can peacefully co-exist as attributes, but cause a class when we autogenerate the accessors for them. Here is a qu

Re: Time::Local

2005-07-05 Thread Dave Rolsky
On Tue, 5 Jul 2005, Juerd wrote: No. Humans don't USE numbers for week days! So beginning at 1 makes no sense, except for humans who like creating lists like (undef, ). In fact, I would prefer to not having any 0 :) This should be separated into day() and day_name(). It's hardly obvious tha

Re: Time::Local

2005-07-05 Thread Sam Vilain
Darren Duncan wrote: Actually, there was a big oversight in my last message. It does not handle approximate or relative dates, such as when you don't know the details. FWIW, this is handled by DateTime::Incomplete, and also will be natively supported by Date::Gregorian. You're describing wit

Re: Time::Local

2005-07-05 Thread Darren Duncan
At 3:36 PM -0700 7/5/05, Dave Whipp wrote: Darren Duncan wrote: The object should not store anything other than this single numerical value internally (smart caching of conversions aside). I think we can all either agree with that, or dont-care it. The internal implementation is an implementa

Re: Time::Local

2005-07-05 Thread Craig DeForest
Quoth Craig DeForest on Tuesday 05 July 2005 04:59 pm, > ...This is important > because, without proper maintenance of the leap-second table, all of our > perl6 calendar programs will run an hour late a mere 500 years from now. Uh, sorry -- "...an hour fast a mere 500 years from now."

Re: Time::Local

2005-07-05 Thread Craig DeForest
Quoth Darren Duncan on Tuesday 05 July 2005 04:20 pm, > I believe that at its core [the time/date] object should simply store a count of > rigorously defined time units relative to a rigorously defined epoch. > What the epoch is and what the time unit is will need to be > officially defined (eg,

Re: Time::Local

2005-07-05 Thread Darren Duncan
Actually, there was a big oversight in my last message. It does not handle approximate or relative dates, such as when you don't know the details. My previous proposal should be restricted specifically to the situations where you know the date/time to a high precision, to the second. So my

Re: Time::Local -- and lexical scope

2005-07-05 Thread Dave Whipp
Dave Whipp wrote: You can use "{time - $epoch}" or "{time.as<%d>}" or "{int time}". (That last one is not "{+time}", because that would be a floating-point value, not an integer). I was thinking: an epoch is just a time, and "int time" is a duration -- the number of seconds since the current

Re: Time::Local

2005-07-05 Thread Dave Whipp
Darren Duncan wrote: The object should not store anything other than this single numerical value internally (smart caching of conversions aside). I think we can all either agree with that, or dont-care it. The internal implementation is an implementation issue (or library). It doesn't need t

Re: Time::Local

2005-07-05 Thread Darren Duncan
All, In the spirit of forward thinking and adaptability (and internationalization), I believe a core Time/Date object should be calendar agnostic and simply store some value that is easily convertable to any date + time on any calendaring system. I say forward thinking because this system wi

Re: Time::Local

2005-07-05 Thread Dave Whipp
Douglas P. McNutt wrote: At 10:55 -0700 7/5/05, Dave Whipp wrote: I don't understand why time() should return a numeric value at all. Some of us like to use epoch time, as an integer, to create unique file names which sort "right" in a shell or GUI. You can use "{time - $epoch}" or "{time

Re: Time::Local

2005-07-05 Thread Douglas P. McNutt
At 10:55 -0700 7/5/05, Dave Whipp wrote: >I don't understand why time() should return a numeric value at all. Some of us like to use epoch time, as an integer, to create unique file names which sort "right" in a shell or GUI. -- --> From the U S of A, the only socialist country that refuses to

Re: Time::Local

2005-07-05 Thread Ingo Blechschmidt
Hi, Juerd wrote: > Ingo Blechschmidt skribis 2005-07-05 20:08 (+0200): >> FWIW, I agree, but I'd like to propose standard overloadings: >> say ~$time; # "Di 05 Jul 2005 20:01:42 CEST" > > Or perhaps not. In fact, rather not. Please let stringification be the > ISO standard, and otherwis

Re: Time::Local

2005-07-05 Thread Juerd
Dave Rolsky skribis 2005-07-05 11:41 (-0500): > >* .month and .wday are one-based. Sunday == 1. Haskell has them as > > enums which avoids off-by one confusion completely; I made them like > > I did because that's like humans think of them. > And yes again! No. Humans don't USE numbers for week

Re: Time::Local

2005-07-05 Thread Juerd
Ingo Blechschmidt skribis 2005-07-05 20:08 (+0200): > FWIW, I agree, but I'd like to propose standard overloadings: > say ~$time; # "Di 05 Jul 2005 20:01:42 CEST" Or perhaps not. In fact, rather not. Please let stringification be the ISO standard, and otherwise certainly sortable: year f

Re: Time::Local

2005-07-05 Thread Ingo Blechschmidt
Hi, Dave Whipp wrote: > Larry Wall wrote: >> The time function always returns the time in floating point. > > I don't understand why time() should return a numeric value at all. > Surely it should return a DateTime (or Time) object. Using epochs in a > high level language seems like a really bad

Re: Time::Local

2005-07-05 Thread Dave Whipp
Larry Wall wrote: The time function always returns the time in floating point. I don't understand why time() should return a numeric value at all. Surely it should return a DateTime (or Time) object. Using epochs in a high level language seems like a really bad thing to be doing. If I want

Re: PGE: Code Blocks

2005-07-05 Thread Patrick R. Michaud
On Tue, Jul 05, 2005 at 08:51:39AM -0700, Larry Wall wrote: > > For languages that cannot do one-pass parsing, it would be saner in > the long run for rules to delimit such code with delimiters that > are unlikely to occur in the target language. Double curlies, or > here docs, or some such. Tha

Re: Time::Local

2005-07-05 Thread Dave Rolsky
On Tue, 5 Jul 2005, Gaal Yahas wrote: Regarding Time::Local fields, it's an object now, so the order of things Should that be Time::localtime? In P5 there are Time::localtime & Time::gmtime, which are thin OO facades over the language builtins. Then there's the module Time::Local, which is

Re: Time::Local

2005-07-05 Thread Gaal Yahas
On Tue, Jul 05, 2005 at 11:41:23AM -0500, Dave Rolsky wrote: > >Regarding Time::Local fields, it's an object now, so the order of things > > Should that be Time::localtime? In P5 there are Time::localtime & > Time::gmtime, which are thin OO facades over the language builtins. Then > there's th

Re: Possible bug calculating dominators

2005-07-05 Thread Leopold Toetsch
On Jul 5, 2005, at 8:50, Curtis Rawls wrote: I seem to have come across a bug in the compute_dominators() algorithm with the following PIR: It's not unlikely that there are bugs in that part of imcc. It was contributed by Angel Faus, who seems to be not participating in Parrot dev anymore.

Re: Time::Local

2005-07-05 Thread Gaal Yahas
On Tue, Jul 05, 2005 at 08:16:54AM -0700, Larry Wall wrote: > I don't think either of those are good human engineering. I would > like the preferred Perl 6 form to simply be: > > multi sub localtime(Num $?when = time) returns Time::Local { ... } Done. I take it that the rest is okay? If so

Re: PGE: Code Blocks

2005-07-05 Thread Larry Wall
On Tue, Jul 05, 2005 at 08:42:44AM -0500, Patrick R. Michaud wrote: : In short, when PGE's : parser encounters a code block, it needs to hand off control to : the target language's compiler to parse to the end of the : code block and receive back from that compiler the length of : the block parsed.

Re: [ANNOUNCE] Test::Symlink

2005-07-05 Thread Nik Clayton
Ivorw wrote: I have a concern on this relating to portability. How will the module behave on platforms that don't have symlinks? In theory symlink_ok() will automatically skip any tests that it's asked to do if symlinks aren't supported. Since I don't have systems that I can test it on wher

Re: Time::Local

2005-07-05 Thread Larry Wall
On Tue, Jul 05, 2005 at 04:39:48PM +0300, Gaal Yahas wrote: : As for the function signatures: : :multi sub localtime(Rat $?when = time) returns Time::Local { ... } :multi sub localtime(Int $sec, Int ?$pico = 0) returns Time::Local {...} : : The first form uses the second, but might be les

Key question

2005-07-05 Thread Klaas-Jan Stol
Hi, currently I'm experimenting a bit with Keys. It seems that a Key *can* be set to a number (floating point), but that this results in a segfault, when using that key. So: .sub main P0 = new .Key P1 = new .Hash P2 = new .Integer # set the key to a number P0 = 1.23 P2 = 42

RE: [ANNOUNCE] Test::Symlink

2005-07-05 Thread ivorw
> -Original Message- > From: Nik Clayton [mailto:[EMAIL PROTECTED] > Sent: 05 July 2005 14:13 > To: perl-qa@perl.org > Subject: [ANNOUNCE] Test::Symlink > > > * Replies will be sent through Spamex to [EMAIL PROTECTED] > * For additional info click -> http://www.spamex.com/i/?v=6889066 >

Re: PGE: Code Blocks

2005-07-05 Thread Patrick R. Michaud
On Mon, Jul 04, 2005 at 05:19:06PM -0400, Matt Diephouse wrote: > What is the plan for integrating code blocks into PGE? Will Coleda > mentioned on IRC that this issue came up at YAPC, but didn't seem to > indicate that there was any plan. As we transition to using PGE for > Tcl parsing, it'd be ni

Time::Local

2005-07-05 Thread Gaal Yahas
I've added localtime to pugs (r5233, 5236), to address Dave Rolsky's needs for DateTime; but I'm noticing S29 doesn't spec this and nearby builtins yet. I'd like to raise the questions I encountered / stipulations I've made. Please let me know if I'm in error or update S29 if I am not. Regarding T

[ANNOUNCE] Test::Symlink

2005-07-05 Thread Nik Clayton
The uploaded file Test-Symlink-0.01.tar.gz has entered CPAN as file: $CPAN/authors/id/N/NI/NIKC/Test-Symlink-0.01.tar.gz size: 4123 bytes md5: 9a3797b3d94c3ad73b061bd7b1aa2134 Test::Symlink is the first in a series of modules that I'm writing. They differ from many of the modules

RE: what slow could be in Compress::Zlib? (was RE: 5.004_xx in the wild?)

2005-07-05 Thread Paul Marquess
From: Yitzchak Scott-Thoennes [mailto:[EMAIL PROTECTED] > On Mon, Jul 04, 2005 at 02:19:16PM +0100, Paul Marquess wrote: > > Whilst I'm here, when I do get around to posting a beta on CPAN, I'd > prefer > > it doesn't get used in anger until it has bedded-in. If I give the > module a > > version n

Re: DBI v2 - The Plan and How You Can Help

2005-07-05 Thread Maxim Sloyko
Sam Vilain wrote: However, making it in a file in $HOME/.xxx means that the sysadmin can set it up to be mode 400 or something like that, to ensure other users can't access it if someone forgot to set the permissions right on the application code (or, hopefully, configuration file). I don't t

Re: 5.004_xx in the wild?

2005-07-05 Thread Adam Kennedy
As someone whose production code is currently required to run under 5.5.3, I'm very grateful to module authors whose code still runs under that version at least. A number of modules which don't run under 5.5.3 do with simple changes, primarily changing "our" to "use vars" and getting rid of x.y.z

Re: DBI v2 - The Plan and How You Can Help

2005-07-05 Thread Adam Kennedy
- optional treatment of the statements as an AST, similar in concept to SQL::Routine, or Tangram::Expr. Death to SQL templating systems! I suspect during this process people are going to want a lot of things that layer on top of what we currently see as DBI. Personally I think Tim got

Re: 5.004_xx in the wild?

2005-07-05 Thread Michael G Schwern
On Tue, Jul 05, 2005 at 10:59:53AM +0200, David Landgren wrote: > I like to use constant when I can, but the further you go back in time > the more brain-damaged it becomes. I think in 5.005 it only knows about > scalars. No hashrefs or arrayrefs allowed. I find this is a bit of a > bugger to wo

Re: 5.004_xx in the wild?

2005-07-05 Thread David Landgren
Michael G Schwern wrote: [...] That said, here's the main differences: * No qr//. Even if you target 5.5.4 qr// still has lots of bugs. [...] Once you go through the initial pain of backporting its not too big a deal to keep things working as long as you're not doing XS. qr// is the only

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-05 Thread demerphq
(apologies about the slow follow up) On 7/4/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > On Mon, Jul 04, 2005 at 12:36:29AM +0200, demerphq wrote: > > On 7/3/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > > >Would using > > > > > > my $s = sub { $a->[0] = 1; $_[0]; } > > > > > > above also

Re: 5.004_xx in the wild?

2005-07-05 Thread Michael G Schwern
On Tue, Jul 05, 2005 at 12:37:28PM +1000, Adam Kennedy wrote: > If anyone cares about this enough to do something about it, I've > previously outlined a scheme for supporting statistics in CPAN in a way > that covers all the bases (including #perl picking it apart for about a > day). The proble

Re: DBI v2 - The Plan and How You Can Help

2005-07-05 Thread Darren Duncan
At 6:14 PM +1200 7/5/05, Sam Vilain wrote: I think I'm beginning to like it. Allow me to suggest one or two further refinements... my $sth1 = $dbh.compile( $sql_or_ast ); # always sans connection $sth1.prepare(); # always with connection, even if DBD doesn't use it $sth1.execute(); # alwa

[ANNOUNCE] Test::Tester 0.102

2005-07-05 Thread Fergal Daly
Fix a problem with the "easy way" of doing things. Warn if Test::Tester isn't the first Test::Builder module loaded as this can cause problems when doing things the easy way.

Re: DBI v2 - The Plan and How You Can Help

2005-07-05 Thread Adam Kennedy
4. All host parameters should be named (like ":foo") rather than positional (like "?"), meeting with the SQL:2003 standard. The named format is a lot easier to use and flexible, making programmers a lot less error prone, more powerful, and particularly more resource efficient when the same par

Re: 5.004_xx in the wild?

2005-07-05 Thread Adam Kennedy
I've just been through the should-I-shouldn't-I-support-5.4 with my (painfully slow) rewrite of Compress::Zlib. In the end I included limited support for 5.004 because I could, plus I have no feel for how much pain I would cause folk if I didn't. If anyone cares about this enough to do somethin

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-05 Thread Fergal Daly
On 7/4/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > On Mon, Jul 04, 2005 at 12:36:29AM +0200, demerphq wrote: > > On 7/3/05, Andrew Pimlott <[EMAIL PROTECTED]> wrote: > > >Would using > > > > > > my $s = sub { $a->[0] = 1; $_[0]; } > > > > > > above also be "looking at refaddrs"? > > > > No.