Re: ANNOUCE: DateTime::Format::DateManip

2003-07-01 Thread Joshua Hoblitt
> My module is a superset of Joshua's... however, mine still needs the
> interface to be polished (I plan on adding a way to select which
> optional pieces of ISO8601 are legal).

Hmm... I could use your module for recurrence and duration parsing.

-J

--



Re: ANNOUCE: DateTime::Format::DateManip

2003-07-01 Thread Joshua Hoblitt
> Is there any reason it can't all go in one module?  I think that'd be much
> easier for end users.

Yes.  Ben and I have discussed this off list.  In fact that discussion is, I believe, 
where the DT::F::DateManip module came from.  I started on this several months ago and 
never got around to finishing it - Ben didn't know that and hard already started on 
his module.  I think it's ok though as they are really very different and I think 
Ben's parser has a lot of potential for supporting different syntaxes when it matures.

I wanted to put my module into shared CVS some time ago but nobody has commented on 
the namespace issue...

-J

--



Re: ANNOUCE: DateTime::Format::DateManip

2003-07-01 Thread Ben Bennett
My module is a superset of Joshua's... however, mine still needs the
interface to be polished (I plan on adding a way to select which
optional pieces of ISO8601 are legal).

Mine may also be slightly slower (but I don't think there is much in
it).

   -ben

On Tue, Jul 01, 2003 at 06:05:59PM -0500, Dave Rolsky wrote:
> On Tue, 1 Jul 2003, Joshua Hoblitt wrote:
> 
> > Agreed.  I think it should boil down to recurrences and durations..  If
> > most people need that functionality then lets call your module
> > DT::F::ISO8601 and I'll use ISO8601::Simple.  If they don't then I'll
> > take ISO8601 and you can use ISO8601::Complex.
> 
> Is there any reason it can't all go in one module?  I think that'd be much
> easier for end users.
> 
> 
> -dave
> 
> /*===
> House Absolute Consulting
> www.houseabsolute.com
> ===*/


Re: ANNOUCE: DateTime::Format::DateManip

2003-07-01 Thread Dave Rolsky
On Tue, 1 Jul 2003, Joshua Hoblitt wrote:

> Agreed.  I think it should boil down to recurrences and durations..  If
> most people need that functionality then lets call your module
> DT::F::ISO8601 and I'll use ISO8601::Simple.  If they don't then I'll
> take ISO8601 and you can use ISO8601::Complex.

Is there any reason it can't all go in one module?  I think that'd be much
easier for end users.


-dave

/*===
House Absolute Consulting
www.houseabsolute.com
===*/


Re: ANNOUCE: DateTime::Format::DateManip

2003-07-01 Thread Joshua Hoblitt
> We should get this name thing resolved so we can get both modules
> committed and up on CPAN.  I don't care either way.

Agreed.  I think it should boil down to recurrences and durations..  If most people 
need that functionality then lets call your module DT::F::ISO8601 and I'll use 
ISO8601::Simple.  If they don't then I'll take ISO8601 and you can use 
ISO8601::Complex.

As it stands my module is almost CPAN ready - I just need to spend a little bit more 
time on it.  Probably tonight or tomorrow.

For now I'm more interested in parsing dates/times quickly then supporting the other 
stuff.  Although I've started thinking about it as well.

-J

--



Re: [Pdx-pm] Re: [PLUG] Re: Slides from YAPC presentation

2003-07-01 Thread Joshua Hoblitt
> Try http://oscon.kwiki.org/ .

That's just for OSCON - I'm thinking in the general case.



Re: [PLUG] Re: Slides from YAPC presentation

2003-07-01 Thread Mark Allyn


On Tue, 1 Jul 2003, Joshua Hoblitt wrote:

> links to local movie listings - including the McWorldDomination's pages
> the laser light shows at OMSI

Something to consider when dealing with OMSI:

They had promised to provide a drop for a wireless connection
for KBOO radio in order to facilitate a remote broadcast for
the Waterfront Blues Festival during the July 4th Weekend.

At the last moment, they reneged. Something about the director
of technology saying that it 'was too much work'. All they promised
to do was to provide a network drop (RJ-45) into their backbone.
(During a holiday weekend with load would be light; as well as
a community organization supporting another community organization).

These guys can be a little slipery.

Mark



Re: [Pdx-pm] Re: [PLUG] Re: Slides from YAPC presentation

2003-07-01 Thread Joshua Keroes
Try http://oscon.kwiki.org/ .

On (Tue, Jul 01 08:48), Joshua Hoblitt wrote:
> This question has crossed 3 lists that I'm on in various forms
> (datetime, pdx.pm, plug) and probably a few others. Maybe an out of
> town geek page would be a good idea? I'd volunteer to do it but I
> count as out of town now. :)
> 
> Things to list:
> 
> hotels with connectivity
> links to the freenode/personaltelco pages
> a map of powells and powells tech. books
> the GPS coords of important locations (book stores, hotels, coffee shops, bars..)
> links to local movie listings - including the McWorldDomination's pages
> the laser light shows at OMSI
> anything else that might interest a geek
> 
> Sound like a good idea?
> 
> -J
> 
> --
> On Tue, 1 Jul 2003, Paul Heinlein wrote:
> 
> > On Tue, 1 Jul 2003, Roderick A. Anderson wrote:
> >
> > > > Surely there's some coffee shops or net cafes around with wireless
> > > > and/or jacks? These days it's generally gratis so long as you buy
> > > > a coffee every now and then.
> > > >
> > > > (haven't been paying attention, so I'm not sure exactly which city
> > > > we're talking about)
> > >
> > > Portland, OR.  I'm cc this to the Portland Linux Users Group (PLUG) as
> > > they've been the people in the know when I've had questions.  I found a
> > > nice little hotel downtown from their referrals.
> >
> > http://www.personaltelco.net/static/hotspots.html
> > http://www.auscillate.com/wireless/portland/index.php
> >
> > --Paul Heinlein <[EMAIL PROTECTED]>


Re: ANNOUCE: DateTime::Format::DateManip

2003-07-01 Thread Ben Bennett
On Tue, Jul 01, 2003 at 07:36:48AM -0700, Hill, Ronald wrote:
> Yes, and so will Date::Calc (that is what I use) But I wanted to use only
> one
> Date module. It makes no sense to use say Date::Calc with DateTime.

I know you provided a code snippet below, but in general when using
Date::Calc do you use GMT or Local time when doing the operations?

If you mix the two, how do you keep track of which is which?

Do you use Date::Calc::Object?

I am trying to work out what the interface should be for a possible
DateTime::Format::DateCalc converter.  I think it is too complicated
to use the typical parse_datetime() style (because you need to tell
the sub whether it is in GMT or local time).  Also it would be nice to
have a sub that could take the date and time parts and put them
together into a DT and vice versa.

Anyway, any suggestions would be appreciated.

Thanks,

  -ben


Re: ANNOUCE: DateTime::Format::DateManip

2003-07-01 Thread Flavio S. Glock
Ben Bennett wrote:
> No DT::F::ISO8601 (::?) is still a separate beast (which may get
> called by DT::F::Complex).  ISO8601 parsing is pretty much done except
> for recurrences...  I have some questions how to translate a
> recurrence that has 5 instances 20 minutes apart but does not give a
> start or end time.  I may just do as I do elsewhere and use an
> optional user provided time (and fall back to now()).

That would generate a DateTime::Duration::Set, 
but we don't have this class yet :)

  print DT::Format::ICal->duration_set( $dur_set );
  # PT0M,PT20M,PT40M,PT60M,PT80M

- Flavio S. Glock


Re: ANNOUCE: DateTime::Format::DateManip

2003-07-01 Thread Ben Bennett
On Tue, Jul 01, 2003 at 09:04:14AM -1000, Joshua Hoblitt wrote:
> Looks good Ben.  The timezone stuff must have been fun. :)

Fun in which sense of the word :-)

 
> I ported a small piece of code (in production though) from Date::Manip to DT not 
> long ago.  I've been meaning to post the diffs and the benchmarks to the list.  I'll 
> do it as soon as I'm back on a fast connection.

Cool.
 
> > Sometime I want to finish writing DateTime::Format::Complex that will
> > grok complex "English" (although I want it to be localizable) date
> > strings.  But that is still under consideration.
> 
> Has DateTime::Format::ISO8601::(?:Complex) grown into this or is it a different 
> module?

No DT::F::ISO8601 (::?) is still a separate beast (which may get
called by DT::F::Complex).  ISO8601 parsing is pretty much done except
for recurrences...  I have some questions how to translate a
recurrence that has 5 instances 20 minutes apart but does not give a
start or end time.  I may just do as I do elsewhere and use an
optional user provided time (and fall back to now()).

We should get this name thing resolved so we can get both modules
committed and up on CPAN.  I don't care either way.

-ben


Re: ANNOUCE: DateTime::Format::DateManip

2003-07-01 Thread Joshua Hoblitt
Looks good Ben.  The timezone stuff must have been fun. :)

I ported a small piece of code (in production though) from Date::Manip to DT not long 
ago.  I've been meaning to post the diffs and the benchmarks to the list.  I'll do it 
as soon as I'm back on a fast connection.

> Sometime I want to finish writing DateTime::Format::Complex that will
> grok complex "English" (although I want it to be localizable) date
> strings.  But that is still under consideration.

Has DateTime::Format::ISO8601::(?:Complex) grown into this or is it a different module?

-J

--



Re: [PLUG] Re: Slides from YAPC presentation

2003-07-01 Thread John Peacock
Joshua Hoblitt wrote:

This question has crossed 3 lists that I'm on in various forms (datetime, pdx.pm, plug) and probably a few others.  Maybe an out of town geek page would be a good idea?
Add anything that you find missing here:

	http://oscon.kwiki.org/index.cgi?HomePage

John (who saw this link on the P5P list)

--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748


Re: [PLUG] Re: Slides from YAPC presentation

2003-07-01 Thread Joshua Hoblitt
This question has crossed 3 lists that I'm on in various forms (datetime, pdx.pm, 
plug) and probably a few others.  Maybe an out of town geek page would be a good idea? 
 I'd volunteer to do it but I count as out of town now. :)

Things to list:

hotels with connectivity
links to the freenode/personaltelco pages
a map of powells and powells tech. books
the GPS coords of important locations (book stores, hotels, coffee shops, bars..)
links to local movie listings - including the McWorldDomination's pages
the laser light shows at OMSI
anything else that might interest a geek

Sound like a good idea?

-J

--
On Tue, 1 Jul 2003, Paul Heinlein wrote:

> On Tue, 1 Jul 2003, Roderick A. Anderson wrote:
>
> > > Surely there's some coffee shops or net cafes around with wireless
> > > and/or jacks? These days it's generally gratis so long as you buy
> > > a coffee every now and then.
> > >
> > > (haven't been paying attention, so I'm not sure exactly which city
> > > we're talking about)
> >
> > Portland, OR.  I'm cc this to the Portland Linux Users Group (PLUG) as
> > they've been the people in the know when I've had questions.  I found a
> > nice little hotel downtown from their referrals.
>
> http://www.personaltelco.net/static/hotspots.html
> http://www.auscillate.com/wireless/portland/index.php
>
> --Paul Heinlein <[EMAIL PROTECTED]>
>
> ___
> PLUG mailing list
> [EMAIL PROTECTED]
> http://lists.pdxlinux.org/mailman/listinfo/plug
>



Re: DateTime::Duration nits...

2003-07-01 Thread Joshua Hoblitt
> > How about a DT::Duration::Set class?
> >
> > add() pushes a duration object into a DT::D::Set object
> >
> > _collapse() would call a 'sum' method on a DT::D::Set object
> >
> > _collapse_to_datetime() would call _collapse (or the 'sum' method
> > directly) on a DT::D::Set object and add the resulting DT::D object to a
> > DT object.
>
> And this is easier than "$dt->add( months => 1 )->add( days => -2 )" how?

Well DT::D could create one DT::D object for each parameter in it's constructor.

So DT::D->new( months => 1, days => -2 ) would create a DT::D::Set.

If DT understands these sets then your 'syntax sugar' should work with mixed signs.

$dt->add( months => 1, days => -2 );

The down side is it will be a bit complicated to add/subtract these sets.

Although I think this is pretty cool solution:

use DateTime;
my $dt = DateTime->now;
my $dur = sub { $_[0]->add( months => 3 )->subtract( hours => 3 ) };
print $dur->($dt)->datetime;

-J

--



RE: ppm builds for Win32?

2003-07-01 Thread Hill, Ronald

Hi Dave,

> 
> 
> On Tue, 1 Jul 2003, Hill, Ronald wrote:
> 
[snipped]

> Hmm, the recent releases of Archive::Tar are totally 
> rewritten in Perl, primarily in order to work 
> consistently across all platforms.  What
> version do you have?

I curently have version 0.23
I checked th eBuild.pl file and followed the recommendations

'Archive::Tar' => 0.23,

I will install the 1.03 version that I found on cpan

[more snippage]

> 
> > > includes a "./Build ppd" action to auto-generate a ppd file,
> > > which may be useful.
> >
> > F:\perl_modules\DateTime-TimeZone-0.21>perl build ppd
> > Cannot create a PPD file unless codebase argument is given
> > I checked the docs for Module-Build and found no reference
> > to the ppd function. So I have no idea what it wants.
> 
> This would be in the Build.PL file in the call to Module::Build->new()
> 
> I'm the one who wrote most of the code in Module::Build::PPMMaker, and
> honestly I have no idea how correct it is.  I couldn't find much good
> documentation of PPM/PPD stuff.

You might want to talk to Randy Kobes on this. He is the one
that knows ppm the most.

[more snippage]

> 
> I didn't say that would work ;)  I just said it should install without
> needing a compiler or nmake, via the CPAN shell or from the 
> command line.
> 
> 
Don't mind me, I'm just having a bad day with perl ;)

Ron Hill


RE: ppm builds for Win32?

2003-07-01 Thread Dave Rolsky
On Tue, 1 Jul 2003, Hill, Ronald wrote:

> >
> > You can do "./Build dist".  The latest Module::Build beta
> > (0.18_02) also
>
> I tried this. Here is the result.
> Creating DateTime-TimeZone-0.21.tar.gz
> Can't locate object method "create_archive" via package "Archive::Tar" at
> F:\pe
> ild/Base.pm line 1323.
>
> I then checked the Docs for Archive-Tar and found this:
>
> Although rich in features, it is known to not work on Win32 platforms.
> On those platforms, Archive::Tar will silently and transparently fall
> back to Archive::Tar::Win32. Please refer to that manpage if you are on
> a Win32 platform.

Hmm, the recent releases of Archive::Tar are totally rewritten in Perl,
primarily in order to work consistently across all platforms.  What
version do you have?

> OK, great, I guess I need to fill out another bug report?

No, I'll tell Ken.  I think M::B just needs to depend on Archive::Tar
1.00.


> > includes a "./Build ppd" action to auto-generate a ppd file,
> > which may be useful.
>
> F:\perl_modules\DateTime-TimeZone-0.21>perl build ppd
> Cannot create a PPD file unless codebase argument is given
> I checked the docs for Module-Build and found no reference
> to the ppd function. So I have no idea what it wants.

This would be in the Build.PL file in the call to Module::Build->new()

I'm the one who wrote most of the code in Module::Build::PPMMaker, and
honestly I have no idea how correct it is.  I couldn't find much good
documentation of PPM/PPD stuff.

> > However, in theory, a non-XS module that uses Module::Build
> > should install on Windows just fine, without any need for
> > external tools, no compiler, no nmake.
>
> As of now I am unable to generate a ppm file for DateTime-TimeZone
> for perl version 5.8.0

I didn't say that would work ;)  I just said it should install without
needing a compiler or nmake, via the CPAN shell or from the command line.


-dave

/*===
House Absolute Consulting
www.houseabsolute.com
===*/


Re: ppm builds for Win32?

2003-07-01 Thread Chris Winters
Hill, Ronald wrote:
Yes, they are out of date. There is a good reason for this. We were having
problems with DateTime compiling on Win32 for quite some time. 
Didn't mean to cast aspersions, I figured it was something like this 
based on my troubles with 0.12.

Has anyone volunteered to keep up with these? If not I'd be happy to 
build them and send on the PPD/tarball files (for both 5.6x and 5.8x 
builds) to someone else to post on the website.
I guess I have. But feel free!! It would be nice to have something that
is automated.
Well, since I'm (at least mostly) human it's not automated, but it 
should do.

If someone could send me contact info for the person responsible for 
putting the files on the datetime.perl.org website I'd appreciate it.

Later,

Chris

--
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.


RE: ppm builds for Win32?

2003-07-01 Thread Hill, Ronald
Hi Dave,


[snipped]
> 
> You can do "./Build dist".  The latest Module::Build beta 
> (0.18_02) also

I tried this. Here is the result.
Creating DateTime-TimeZone-0.21.tar.gz
Can't locate object method "create_archive" via package "Archive::Tar" at
F:\pe
ild/Base.pm line 1323.

I then checked the Docs for Archive-Tar and found this:

Although rich in features, it is known to not work on Win32 platforms.
On those platforms, Archive::Tar will silently and transparently fall
back to Archive::Tar::Win32. Please refer to that manpage if you are on
a Win32 platform.

OK, great, I guess I need to fill out another bug report?

> includes a "./Build ppd" action to auto-generate a ppd file, 
> which may be useful.

F:\perl_modules\DateTime-TimeZone-0.21>perl build ppd
Cannot create a PPD file unless codebase argument is given
I checked the docs for Module-Build and found no reference 
to the ppd function. So I have no idea what it wants.

> 
> However, in theory, a non-XS module that uses Module::Build 
> should install on Windows just fine, without any need for 
> external tools, no compiler, no nmake.

As of now I am unable to generate a ppm file for DateTime-TimeZone
for perl version 5.8.0


Ron Hill


Re: DT::F::ICal format_recurrence

2003-07-01 Thread fglock
We could add an optional parameter to DateTime::Set


recurrence constructor:




  $r = new DT::Set {


recurrence => sub { next_day($_) },


as_ical_string => "RRULE:FREQ=DAILY",


  }




DT::E:Cron, DT::E:Recurrence, DT::E:ICal can use


this to setup a valid ICal string.


In some cases this will be a multiline string.




- Flavio S. Glock






> Quoting Dave Rolsky <[EMAIL PROTECTED]>:


> > This is hard, since recurrences are implemented 
as closures/coderefs, and


> > there's no way to look at one and figure out what 
it represents.


> 


> Is it feasible, during construction, to leave 
enough bread crumbs around to


> reverse the process?


> 


> (I would imagine DT::Event::ICal would be best 
positioned to understand the gap


> between the bread crumbs and actual construction)


> 


> Matt


> 






ppm builds for Win32?

2003-07-01 Thread Chris Winters
I mentioned this to Dave offlist and he suggested I post a message 
here. The next release of OpenInteract relies on DateTime so I'm 
interested in keeping up-to-date PPM builds for Win32 folks. The 
links to the PPM repository from the datetime.perl.org site seem a 
bit out of date, particularly with how fast the project is moving.

Has anyone volunteered to keep up with these? If not I'd be happy to 
build them and send on the PPD/tarball files (for both 5.6x and 5.8x 
builds) to someone else to post on the website.

Later,

Chris

PS - I hate to be one of "those people", but please cc me on 
replies. There's too much traffic on this list for me to follow 
along :-)

--
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.