I can understand wanting gregor for timezone offsets when constructing moments, but...
- Assuming I have the right repository link, gregor's tz/c contract is only (or/c string? (integer-in -64800 64800)) [1]. I can set the feed-timezone parameter in Splitflap to an arbitrary string and the guard won't stop me. - The IANA's timezone database changed this month, and gregor's last commit was 2 years ago. My comment was not meant to say that timezone math is easy to replace, or even that gregor isn't a fit. It's to say that I'm not seeing correct answers without a name lookup in front of tz/c, and the latest data from the IANA. But if you were going to do all that in the first place, then I'm not sure what I'd use gregor for outside of relative arithmetic. [1]: https://github.com/97jaz/gregor/blob/91d71c6082fec4197aaf9ade57aceb148116c11c/gregor-lib/gregor/private/moment.rkt#L91 On 10/26/21 11:25 AM, David Storrs wrote: > On Mon, Oct 25, 2021 at 10:25 PM 'Joel Dueck' via Racket Users > <racket-users@googlegroups.com> wrote: > >> - Removing dependencies: yes, I see the appeal. I’m really not eager to >> reimplement all the timezone handling and temporal comparison stuff in >> gregor, though. >> >> Joel > > Having done a fair bit of datetime programming, my suggestion on the best way > to handle it is to not handle it. Let some purpose-built library such as > gregor do it instead of trying to roll your own, because datetime math is a > nightmare. > >> On Monday, October 25, 2021 at 6:36:30 PM UTC-5 Sage Gerard wrote: >> >>> Thank you for this!! >>> >>> Feedback >>> >>> - I like your podcast-specific entries >>> - The validation logic is refreshing to see >>> - Re: boolean arguments, I'd stick to keyword arguments and ask for any/c, >>> not boolean?, in contracts. That way forms like (and ... (member ...)) >>> won't bug users about a non-threatening contract violation, and it's >>> trivial to cast the value yourself. >>> - Unsure what licenses are compatible with Blue Oak. If you want more >>> licensing options re: IANA media type to extension mappings, here are some. >>> >>> - MIT: https://github.com/mime-types/mime-types-data >>> - Apache 2.0 (From the horse's mouth): >>> https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types >>> >>> - CC-BY-SA: Scrape MDN's table using the console on >>> https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types >>> >>> - I normally don't use functions like splitflap-version because I can't >>> assume that a package will define one. I'd use a program that returns a >>> version of a given package. >>> - Why is language-codes a procedure? >>> - You have a lot of local contract boundaries, so values may get checked >>> more than necessary. >>> - Prefer example.com so you don't have to leak your URLs or make up email >>> addresses that actually go to an inbox. >>> - txexpr, gregor, and web-server dependencies don't look terribly difficult >>> to remove >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to racket-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> [https://groups.google.com/d/msgid/racket-users/cb2927c7-3d21-41c3-89c7-d6b73a9e53f9n%40googlegroups.com](https://groups.google.com/d/msgid/racket-users/cb2927c7-3d21-41c3-89c7-d6b73a9e53f9n%40googlegroups.com?utm_medium=email&utm_source=footer). > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > [https://groups.google.com/d/msgid/racket-users/CAE8gKoc93-d6gUXYEhA_L-bM%3DzqWBbu9UG2TtvX-nqTHaKA_jA%40mail.gmail.com](https://groups.google.com/d/msgid/racket-users/CAE8gKoc93-d6gUXYEhA_L-bM%3DzqWBbu9UG2TtvX-nqTHaKA_jA%40mail.gmail.com?utm_medium=email&utm_source=footer). -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/25acca19-5970-1131-c63f-305abd4964e9%40sagegerard.com.