Re: [Chicken-users] utc-time-seconds and local-time-seconds rationale?

2014-05-12 Thread Evan Hanson
On 2014-05-07 13:12, Evan Hanson wrote: I agree, an annotation for deprecation warnings would be valuable. So this totally already exists, it just wasn't documented under (chicken types). In case anyone stumbles across this part of the archive: you can use the following type syntax to produce a

Re: [Chicken-users] utc-time-seconds and local-time-seconds rationale?

2014-05-07 Thread Peter Bex
On Tue, May 06, 2014 at 11:54:35PM +0200, Michele La Monaca wrote: On a side note, I've noticed these discrepancies on solaris, cygwin and mingw: (use posix) (print (time-string (seconds-local-time) %z) - (vector-ref (seconds-local-time) 9)) +0200 - -7200 (osx,

Re: [Chicken-users] utc-time-seconds and local-time-seconds rationale?

2014-05-07 Thread Jörg F. Wittenberger
Hi Peter, I agree with your assessment. It suggested an idea to me, which may or may not be that good: Use the type system to deprecate those parts know to be broken. Maybe it would even be a good idea to extend the type system for that purpose. By now all you can do is (: broken-thing

Re: [Chicken-users] utc-time-seconds and local-time-seconds rationale?

2014-05-07 Thread John Cowan
Peter Bex scripsit: In my opinion, large parts of the POSIX unit should die. They're broken, at the wrong level of abstraction and just generally unschemely. The reason these time things are breaking is because the libc time access is so varying across operating systems. In this case, it's

Re: [Chicken-users] utc-time-seconds and local-time-seconds rationale?

2014-05-07 Thread Evan Hanson
On 2014-05-07 12:01, Jörg F. Wittenberger wrote: However for the case at hand I'd even love a notation which allows to attach a custom message to the deprecated type. Possibly like this: I agree, an annotation for deprecation warnings would be valuable. Currently, it's totally on the user to

Re: [Chicken-users] utc-time-seconds and local-time-seconds rationale?

2014-05-07 Thread Michele La Monaca
Attached a fixed and tested (cygwin, solaris) patch. Regards, Michele On Wed, May 7, 2014 at 4:46 PM, John Cowan co...@mercury.ccil.org wrote: Peter Bex scripsit: In my opinion, large parts of the POSIX unit should die. They're broken, at the wrong level of abstraction and just generally

Re: [Chicken-users] utc-time-seconds and local-time-seconds rationale?

2014-05-07 Thread John Cowan
Michele La Monaca scripsit: Attached a fixed and tested (cygwin, solaris) patch. Thanks for testing. What was wrong with multiplying daylight by 3600 rather than introducing a conditional branch? -- John Cowan http://www.ccil.org/~cowanco...@ccil.org If a traveler were

Re: [Chicken-users] utc-time-seconds and local-time-seconds rationale?

2014-05-07 Thread Michele La Monaca
daylight is non-zero if Daylight Savings Time is in effect. Non-zero doesn't mean 1. On Thu, May 8, 2014 at 12:52 AM, John Cowan co...@mercury.ccil.org wrote: Michele La Monaca scripsit: Attached a fixed and tested (cygwin, solaris) patch. Thanks for testing. What was wrong with multiplying

[Chicken-users] utc-time-seconds and local-time-seconds rationale?

2014-05-04 Thread Michele La Monaca
Hi, I am not an expert here, but I find these functions ill-defined. Both take as input a time-vector which already carries the timezone information (seconds west of UTC). So a time-seconds function just seems the right thing to me. Having to specify the local/utc prefix feels redundant,