[racket-dev] find-secs error while building 5.3.2 (fwd)

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Feb 6 21:26:00 EST 2013

I'm not sure that it should never fail in that case. There are strange
things that happen in teh calendary. There is a week missing in the 1700s
somewhere (I think?) and an hour missing each year for daylight savings
time.

Probably best to have some fallback plan (use 0?) just in case there are
other oddities.

Robby


On Wed, Feb 6, 2013 at 8:21 PM, Neil Toronto <neil.toronto at gmail.com> wrote:

> Good question. I just looked through the code, and I don't think so. Dates
> and times are always in seconds in the first place, and generally just get
> turned into dates for display. The only reason it needs to turn dates into
> seconds (i.e. using `find-seconds' via `date->seconds') is to round to the
> nearest month or year. In those cases, the time fields are all zero, and
> the day is always 1.
>
> I assume (find-seconds 0 0 0 1 m y) should never fail. Is that wrong?
>
> Neil ⊥
>
>
> On 02/06/2013 06:05 PM, Robby Findler wrote:
>
>> Does date-ticks possibly needs to cope with find-seconds failing to find
>> the seconds?
>>
>> Robby
>>
>>
>> On Wed, Feb 6, 2013 at 5:02 PM, Neil Toronto <neil.toronto at gmail.com
>> <mailto:neil.toronto at gmail.com**>> wrote:
>>
>>     On 02/06/2013 02:14 PM, Jimmy Olgeni wrote:
>>
>>
>>         On Wed, 6 Feb 2013, Jimmy Olgeni wrote:
>>
>>             The problem is that, due to this error, "make install" does
>> not
>>             complete and I cannot get a repeatable build for the
>>             package, but
>>             maybe I can find a way to exclude the plot docs build.
>>
>>             Does the weird date come from the docs source?
>>
>>
>>         I found it in collects/plot/tests/low-level-**__tests.rkt. I'll
>>
>>         look for a
>>         way around :)
>>
>>
>>     Those are tests, which aren't run during setup. Besides that,
>>     there's no (find-seconds 0 0 0 1 5 1970) in "low-level-tests.rkt".
>>
>>     I scanned through the plot documentation and found this, though:
>>
>>        (parameterize ([plot-x-label      "Near x axis"]
>>                       [plot-y-label      "Near y axis"]
>>                       [plot-z-label      "Near z axis"]
>>                       [plot-x-ticks      (date-ticks)]
>>                       [plot-y-ticks      (time-ticks)]
>>                       [plot-z-ticks      (fraction-ticks)]
>>                       [plot-x-far-label  "Far x axis"]
>>                       [plot-y-far-label  "Far y axis"]
>>                       [plot-z-far-label  "Far z axis"]
>>                       [plot-x-far-ticks  (linear-ticks)]
>>                       [plot-y-far-ticks  (currency-ticks)]
>>                       [plot-z-far-ticks  (log-ticks #:base 2)])
>>          (plot3d (lines3d '(#(1 1 1) #(40000000 4 4)) #:style
>> 'transparent)
>>                  #:angle 45 #:altitude 50
>>                  #:title "Axis Names and Tick Locations"))
>>
>>     One of the tick labels on the near x axis is "1970-05". I don't
>>     remember exactly how the tick layout and formatting code works, but
>>     it's very possible that it uses `find-seconds' with the arguments 0
>>     0 0 1 5 1970 to position that label.
>>
>>     BTW, it's not January 5, but May 1. Is that a valid date on your
>>     machine? Also, does either (find-seconds 0 0 0 1 5 1970 #f) or
>>     (find-seconds 0 0 0 1 5 1970 #t) fail in Racket?
>>
>>     Neil ⊥
>>
>>
>>     _________________________
>>       Racket Developers list:
>>     http://lists.racket-lang.org/_**_dev<http://lists.racket-lang.org/__dev><
>> http://lists.racket-lang.org/**dev <http://lists.racket-lang.org/dev>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20130206/9f7b75bf/attachment.html>

Posted on the dev mailing list.