<div dir="ltr">Oh! Good point! <div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 11, 2013 at 9:53 PM, Ryan Culpepper <span dir="ltr"><<a href="mailto:ryanc@ccs.neu.edu" target="_blank">ryanc@ccs.neu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't know how important this is, but ideally serialized old SRFI-19 dates should now deserialize as date*. I think that you can just restore the definition of deserialize-info:tm:date-v0 and change the second function (the cyclic value builder) to raise an error:<br>
<br>
(define deserialize-info:tm:date-v0<br>
(make-deserialize-info<br>
srfi:make-date<br>
(lambda ()<br>
(error 'deserialize-info:tm:date-v0 "cycles not allowed"))))<br>
<br>
and also restore the provide.<span class="HOEnZb"><font color="#888888"><br>
<br>
Ryan</font></span><div><div class="h5"><br>
<br>
<br>
On 01/11/2013 09:13 PM, Asumu Takikawa wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
On 2013-01-11 15:39:08 -0600, Robby Findler wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think it would be great if you were to find backwards-compatible<br>
ways to bring these two a little bit closer. Making them use the<br>
same internal date struct, for example, would be a great thing.<br>
</blockquote>
<br>
I wrote a patch to make both of these use the same structure, attached<br>
to the e-mail. It seems to pass all of the srfi-19 and date tests (with<br>
some tests changed where appropriate). Does it look alright?<br>
<br>
It turns out there was one (sort of) good reason for SRFI-19 to define<br>
its own struct type: it used mutation for several functions. Racket's<br>
date/date* are immutable. I just changed these to use functional update.<br>
<br>
Another thing: when a string is converted to a date, it's possible that<br>
the format string only has time-of-day but no date specification.<br>
Previously, this produced a srfi/19 date with '#t's but I've now<br>
defaulted it to the start day of the Unix epoch (arbitrarily).<br>
<br>
Cheers,<br>
Asumu<br>
<br>
<br>
<br></div></div><div class="im">
_________________________<br>
Racket Developers list:<br>
<a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/<u></u>dev</a><br>
<br>
</div></blockquote><div class="HOEnZb"><div class="h5">
<br>
_________________________<br>
Racket Developers list:<br>
<a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/<u></u>dev</a><br>
</div></div></blockquote></div><br></div>