The Timing of Time
Brent Pinkney
brent.pinkney at aircom.co.za
Thu Apr 13 07:37:00 UTC 2006
Hi Alan,
I like your work. Here is some backgroun on Chronology:
I wrote the original Chronology library based on frustration with existing
date libraries - I recall counting that Java had no less than six classes to
represent a date.
The project I have been working on required iterating over a lot of date
intervals. The poor date models on offer caused a lot of 'off by one' errors.
I liked the ANSI protocol but wanted to bring the #do: #collect:, etc methods
to bear on date/time intervals. Someone prior to me had already implemented
Week and Month in Squeak which was the trigger I needed to implement
Chronology.
I also decided to implement the DateAndTime class as a julian day + offset
from midnight + offset from UTC.
Chronology is a bit heavy handed as it assumes nano second precision for all
operations. This makes the implementation clean and the library quite
powerful, but it is slower. It can be made a faster at the expense of adding
some more code but so far the penalty is not noticable.
Although Chronology does support TimeZones, its support is still quite
limited. I unfortunatley live in a country with one timezone and no daylight
savings policy. As such I have very little _real_ understanding of the
subtleties. The scaffolding it there though.
One advantage is that Chronology does not require and external files which
stays true to the All-In-The-Image tradition.
Enjoy Easter
Brent
> Hi!
>
> "Alan Lovejoy" <squeak-dev.sourcery at forum-mail.net> wrote:
> > Since some of you seem to like benchmarks, you might be interested in my
> > recent blog post, where I present benchmars comparing the Squeak version
> > of Chronos to Squeak's native Chronology package:
> > http://chronos-st.blogspot.com/2006/04/timing-of-time-chronos-benchmarks.
> >html
> >
> > --Alan
>
> Impressive. I also read your page about the Squeak version - really
> informative and impressive too.
>
> So... what is your opinion on what we should do to make the choice easy?
> I noticed you wrote about convenience methods etc.
>
> In an ideal world we would be able to just "pick and choose" between
> Chronology and Chronos, but I simply don't have enough knowledge to
> judge the feasibility and/or work involved to make that a reality.
>
> regards, Göran
>
> PS. But I do think the official Squeak should make a choice - there
> should be a "Squeak standard". And of course, we did that pretty
> recently - Chronology. Would be interesting to hear more about
> pros/cons. :)
More information about the Squeak-dev
mailing list
|