Re: [rust-dev] lib: Is anybody working on the datetime library?
A Rust datetime library has been on my to-do list for a long time. :) JSR-310 is a very complete solution, but it carries a lot of Java baggage. C++11's std::chrono library [1] defines a smaller API for time points and durations without calendars (i.e. the hard part). std::chrono's API might be more rustic than JSR-310's because C++ and Rust have operator overloading. I strongly recommend reading Erik Naggum's The Long, Painful History of Time [2] about Common Lisp's support for the concept of time as humans experience it. :) [1] http://msdn.microsoft.com/en-us/library/hh874757.aspx [2] http://naggum.no/lugm-time.html chris ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
Re: [rust-dev] lib: Is anybody working on the datetime library?
Hello Chris, That article by Erik Naggum looks deeply interesting. Just loaded it to read in bed in a few hours tonight. Thanks for your input. Might ask you a few questions in the near future. Luis On 19 September 2013 20:57, Chris Peterson cpeter...@mozilla.com wrote: A Rust datetime library has been on my to-do list for a long time. :) JSR-310 is a very complete solution, but it carries a lot of Java baggage. C++11's std::chrono library [1] defines a smaller API for time points and durations without calendars (i.e. the hard part). std::chrono's API might be more rustic than JSR-310's because C++ and Rust have operator overloading. I strongly recommend reading Erik Naggum's The Long, Painful History of Time [2] about Common Lisp's support for the concept of time as humans experience it. :) [1] http://msdn.microsoft.com/en-**us/library/hh874757.aspxhttp://msdn.microsoft.com/en-us/library/hh874757.aspx [2] http://naggum.no/lugm-time.**html http://naggum.no/lugm-time.html chris __**_ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/**listinfo/rust-devhttps://mail.mozilla.org/listinfo/rust-dev ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
Re: [rust-dev] lib: Is anybody working on the datetime library?
Hello all, I've created this repository as a placeholder: https://github.com/luisbg/rust-datetime It won't have much content for a while since I won't commit until there is at least one usable API function, and I'm currently in the researching and planning stage. Patience. Thanks, Luis On 13 September 2013 21:09, Luis de Bethencourt l...@debethencourt.comwrote: That is a very interesting read. We certainly should learn from the experiences of other languages. This being a good example. I will be revisiting the linked documents listed in this thread repeatedly. Fortunately the issue he mentions about NULLs creating random bugs, is taken care of by Rust's safety. Thanks, Luis On 13 September 2013 19:21, Jason Fager jfa...@gmail.com wrote: Joda-Time and JSR-310 are similar APIs but different implementations. It's the same guy behind both, here he is explaining why he wanted 310 instead of just standardizing Joda: http://blog.joda.org/2009/11/why-jsr-310-isn-joda-time_4941.html?m=1 On Friday, September 13, 2013, Luis de Bethencourt wrote: Cool! Great and awesome feedback. The summary is that Joda-Time is what we should aspire to have. My goal is to first cover the most common use cases, and as Corey says, easy to use correctly. After that I can start considering the corner cases like bya and mya. Which sound very fun and interesting, but not high priority. Hopefully by then I won't be too consumed by the question of what is Time. Thanks, will keep you guys updated, Luis On 13 September 2013 16:20, Thad Guidry thadgui...@gmail.com wrote: Additionally, Be able to convert bya to mya ? http://en.wikipedia.org/wiki/Bya The short scale is now commonly used, btw... but also need to deal with this for conversions: http://en.wikipedia.org/wiki/Long_and_short_scales There should be a preference boolean for conversion output for short or long scale... especially concerning above a thousand million. That's enough to get you going with some wild ideas that Jodatime does not handle. On Fri, Sep 13, 2013 at 3:08 PM, Thad Guidry thadgui...@gmail.comwrote: One idea and use case for Paleontologists and Geologists coming over to Rust in droves... :-) Generically, just be able to handle simple Geologic addition and subtraction against an Epoch itself (reference date) http://en.wikipedia.org/wiki/Epoch_(reference_date) using known abbreviations. And additionally, store, understand, and output them: B.Y.B.P = Billion Years Before Present M.Y.B.P = Million Years Before Present On Fri, Sep 13, 2013 at 2:51 PM, Aaron Dandy aaron.da...@live.comwrote: I remember reading this article: http://noda-time.blogspot.com/2011/08/what-wrong-with-datetime-anyway.html a while back and really appreciating date time time zone libraries. Also after reading news of the leap second triggering a bug on a bunch of systems I now question all assumptions I make about our representations of time. I can no longer say that a minute is 60 seconds long with a straight face. Next up I guess we programmers have a year 2038 problem to deal with too. This library will be a big deal to write but there thankfully there should be a lot of existing knowledge to learn from. -- Date: Fri, 13 Sep 2013 15:10:21 -0400 From: l...@debethencourt.com To: s...@scientician.net CC: rust-dev@mozilla.org Subject: Re: [rust-dev] lib: Is anybody working on the datetime library? Hello Bardur, Thank you so much for the reference resource of JSR-310 and its design docs. I looked over it briefly and it is indeed very valuable. It was listed in the wiki page, but the link was to the former home of it. I have updated it. Since nobody has claimed this module, I will start working on this module tomorrow Saturday. Is that OK? Please, please, I would love more comments and ideas. Will start asking for reviews once I have some code to show. Thanks, Luis On 13 September 2013 00:57, Bardur Arantsson spam@scientici ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
Re: [rust-dev] lib: Is anybody working on the datetime library?
I think its great that you are going to be working on this. A comprehensive datetime library is very important. That said I have not got any particular ideas or comments. I have not used Joda time/JSR-310 but the docs look promising and lots of people seem to recommend it. Cheers Gareth On 13/09/13 20:10, Luis de Bethencourt wrote: Hello Bardur, Thank you so much for the reference resource of JSR-310 and its design docs. I looked over it briefly and it is indeed very valuable. It was listed in the wiki page, but the link was to the former home of it. I have updated it. Since nobody has claimed this module, I will start working on this module tomorrow Saturday. Is that OK? Please, please, I would love more comments and ideas. Will start asking for reviews once I have some code to show. Thanks, Luis On 13 September 2013 00:57, Bardur Arantsson s...@scientician.net mailto:s...@scientician.net wrote: On 2013-09-12 22:12, Luis de Bethencourt wrote: Hello everyone, I'm interested in helping with some module development. A good way to learn Rust by using it and help Rust at the same time. Of the wanted modules in this page: https://github.com/mozilla/rust/wiki/Libs I see that this page does have a link to design docs for JSR-310 which is probably a good bet as to a usable DateTime API design (for Java at least). I just thought I'd mention that the documentation for the nearly final (i.e. barring serious bugs) API has been released at: http://download.java.net/jdk8/docs/technotes/guides/datetime/index.html Even if this is for Java, the design decisions about how the conepts of date/time are modeled (Instant vs. *DateTime, Periods, Durations, etc.) would apply in any language. They are also all essential concepts when working seriously with date/time even though the distinctions may not appear so at first. (I should mention that the lead on the JSR-310 spec was also the author of JodaTime which gets much deserved credit by Java developers for bringing date/time manipulation on the JVM out of the dark ages of java.util.Date. JSR-310 is a slightly reworked/simplified version of that API, so it's a sort of what are the essentials? version of JodaTime.) Regards, ___ Rust-dev mailing list Rust-dev@mozilla.org mailto:Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
Re: [rust-dev] lib: Is anybody working on the datetime library?
Hello Bardur, Thank you so much for the reference resource of JSR-310 and its design docs. I looked over it briefly and it is indeed very valuable. It was listed in the wiki page, but the link was to the former home of it. I have updated it. Since nobody has claimed this module, I will start working on this module tomorrow Saturday. Is that OK? Please, please, I would love more comments and ideas. Will start asking for reviews once I have some code to show. Thanks, Luis On 13 September 2013 00:57, Bardur Arantsson s...@scientician.net wrote: On 2013-09-12 22:12, Luis de Bethencourt wrote: Hello everyone, I'm interested in helping with some module development. A good way to learn Rust by using it and help Rust at the same time. Of the wanted modules in this page: https://github.com/mozilla/rust/wiki/Libs I see that this page does have a link to design docs for JSR-310 which is probably a good bet as to a usable DateTime API design (for Java at least). I just thought I'd mention that the documentation for the nearly final (i.e. barring serious bugs) API has been released at: http://download.java.net/jdk8/docs/technotes/guides/datetime/index.html Even if this is for Java, the design decisions about how the conepts of date/time are modeled (Instant vs. *DateTime, Periods, Durations, etc.) would apply in any language. They are also all essential concepts when working seriously with date/time even though the distinctions may not appear so at first. (I should mention that the lead on the JSR-310 spec was also the author of JodaTime which gets much deserved credit by Java developers for bringing date/time manipulation on the JVM out of the dark ages of java.util.Date. JSR-310 is a slightly reworked/simplified version of that API, so it's a sort of what are the essentials? version of JodaTime.) Regards, ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
Re: [rust-dev] lib: Is anybody working on the datetime library?
Additionally, Be able to convert bya to mya ? http://en.wikipedia.org/wiki/Bya The short scale is now commonly used, btw... but also need to deal with this for conversions: http://en.wikipedia.org/wiki/Long_and_short_scales There should be a preference boolean for conversion output for short or long scale... especially concerning above a thousand million. That's enough to get you going with some wild ideas that Jodatime does not handle. On Fri, Sep 13, 2013 at 3:08 PM, Thad Guidry thadgui...@gmail.com wrote: One idea and use case for Paleontologists and Geologists coming over to Rust in droves... :-) Generically, just be able to handle simple Geologic addition and subtraction against an Epoch itself (reference date) http://en.wikipedia.org/wiki/Epoch_(reference_date) using known abbreviations. And additionally, store, understand, and output them: B.Y.B.P = Billion Years Before Present M.Y.B.P = Million Years Before Present On Fri, Sep 13, 2013 at 2:51 PM, Aaron Dandy aaron.da...@live.com wrote: I remember reading this article: http://noda-time.blogspot.com/2011/08/what-wrong-with-datetime-anyway.html a while back and really appreciating date time time zone libraries. Also after reading news of the leap second triggering a bug on a bunch of systems I now question all assumptions I make about our representations of time. I can no longer say that a minute is 60 seconds long with a straight face. Next up I guess we programmers have a year 2038 problem to deal with too. This library will be a big deal to write but there thankfully there should be a lot of existing knowledge to learn from. -- Date: Fri, 13 Sep 2013 15:10:21 -0400 From: l...@debethencourt.com To: s...@scientician.net CC: rust-dev@mozilla.org Subject: Re: [rust-dev] lib: Is anybody working on the datetime library? Hello Bardur, Thank you so much for the reference resource of JSR-310 and its design docs. I looked over it briefly and it is indeed very valuable. It was listed in the wiki page, but the link was to the former home of it. I have updated it. Since nobody has claimed this module, I will start working on this module tomorrow Saturday. Is that OK? Please, please, I would love more comments and ideas. Will start asking for reviews once I have some code to show. Thanks, Luis On 13 September 2013 00:57, Bardur Arantsson s...@scientician.netwrote: On 2013-09-12 22:12, Luis de Bethencourt wrote: Hello everyone, I'm interested in helping with some module development. A good way to learn Rust by using it and help Rust at the same time. Of the wanted modules in this page: https://github.com/mozilla/rust/wiki/Libs I see that this page does have a link to design docs for JSR-310 which is probably a good bet as to a usable DateTime API design (for Java at least). I just thought I'd mention that the documentation for the nearly final (i.e. barring serious bugs) API has been released at: http://download.java.net/jdk8/docs/technotes/guides/datetime/index.html Even if this is for Java, the design decisions about how the conepts of date/time are modeled (Instant vs. *DateTime, Periods, Durations, etc.) would apply in any language. They are also all essential concepts when working seriously with date/time even though the distinctions may not appear so at first. (I should mention that the lead on the JSR-310 spec was also the author of JodaTime which gets much deserved credit by Java developers for bringing date/time manipulation on the JVM out of the dark ages of java.util.Date. JSR-310 is a slightly reworked/simplified version of that API, so it's a sort of what are the essentials? version of JodaTime.) Regards, ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev -- -Thad Thad on Freebase.com http://www.freebase.com/view/en/thad_guidry Thad on LinkedIn http://www.linkedin.com/in/thadguidry/ -- -Thad Thad on Freebase.com http://www.freebase.com/view/en/thad_guidry Thad on LinkedIn http://www.linkedin.com/in/thadguidry/ ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
Re: [rust-dev] lib: Is anybody working on the datetime library?
On Fri, Sep 13, 2013 at 3:10 PM, Luis de Bethencourt l...@debethencourt.com wrote: Please, please, I would love more comments and ideas. Will start asking for reviews once I have some code to show. Joda-Time looks quite nice. My only desire from a datetime lib is easy to use correctly. ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
Re: [rust-dev] lib: Is anybody working on the datetime library?
I believe that it would be a good idea to ensure that the Rust datetime library is a superset of the JS Date object and that it passes a port of the EcmaScript tests. Cheers, David On 9/13/13 9:40 PM, Gareth Smith wrote: I think its great that you are going to be working on this. A comprehensive datetime library is very important. That said I have not got any particular ideas or comments. I have not used Joda time/JSR-310 but the docs look promising and lots of people seem to recommend it. Cheers Gareth -- David Rajchenbach-Teller, PhD Performance Team, Mozilla ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
Re: [rust-dev] lib: Is anybody working on the datetime library?
One idea and use case for Paleontologists and Geologists coming over to Rust in droves... :-) Generically, just be able to handle simple Geologic addition and subtraction against an Epoch itself (reference date) http://en.wikipedia.org/wiki/Epoch_(reference_date) using known abbreviations. And additionally, store, understand, and output them: B.Y.B.P = Billion Years Before Present M.Y.B.P = Million Years Before Present On Fri, Sep 13, 2013 at 2:51 PM, Aaron Dandy aaron.da...@live.com wrote: I remember reading this article: http://noda-time.blogspot.com/2011/08/what-wrong-with-datetime-anyway.html a while back and really appreciating date time time zone libraries. Also after reading news of the leap second triggering a bug on a bunch of systems I now question all assumptions I make about our representations of time. I can no longer say that a minute is 60 seconds long with a straight face. Next up I guess we programmers have a year 2038 problem to deal with too. This library will be a big deal to write but there thankfully there should be a lot of existing knowledge to learn from. -- Date: Fri, 13 Sep 2013 15:10:21 -0400 From: l...@debethencourt.com To: s...@scientician.net CC: rust-dev@mozilla.org Subject: Re: [rust-dev] lib: Is anybody working on the datetime library? Hello Bardur, Thank you so much for the reference resource of JSR-310 and its design docs. I looked over it briefly and it is indeed very valuable. It was listed in the wiki page, but the link was to the former home of it. I have updated it. Since nobody has claimed this module, I will start working on this module tomorrow Saturday. Is that OK? Please, please, I would love more comments and ideas. Will start asking for reviews once I have some code to show. Thanks, Luis On 13 September 2013 00:57, Bardur Arantsson s...@scientician.net wrote: On 2013-09-12 22:12, Luis de Bethencourt wrote: Hello everyone, I'm interested in helping with some module development. A good way to learn Rust by using it and help Rust at the same time. Of the wanted modules in this page: https://github.com/mozilla/rust/wiki/Libs I see that this page does have a link to design docs for JSR-310 which is probably a good bet as to a usable DateTime API design (for Java at least). I just thought I'd mention that the documentation for the nearly final (i.e. barring serious bugs) API has been released at: http://download.java.net/jdk8/docs/technotes/guides/datetime/index.html Even if this is for Java, the design decisions about how the conepts of date/time are modeled (Instant vs. *DateTime, Periods, Durations, etc.) would apply in any language. They are also all essential concepts when working seriously with date/time even though the distinctions may not appear so at first. (I should mention that the lead on the JSR-310 spec was also the author of JodaTime which gets much deserved credit by Java developers for bringing date/time manipulation on the JVM out of the dark ages of java.util.Date. JSR-310 is a slightly reworked/simplified version of that API, so it's a sort of what are the essentials? version of JodaTime.) Regards, ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev -- -Thad Thad on Freebase.com http://www.freebase.com/view/en/thad_guidry Thad on LinkedIn http://www.linkedin.com/in/thadguidry/ ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
Re: [rust-dev] lib: Is anybody working on the datetime library?
2013/9/13 Luis de Bethencourt l...@debethencourt.com Cool! Great and awesome feedback. The summary is that Joda-Time is what we should aspire to have. My goal is to first cover the most common use cases, and as Corey says, easy to use correctly. After that I can start considering the corner cases like bya and mya. Which sound very fun and interesting, but not high priority. Hopefully by then I won't be too consumed by the question of what is Time. Another thing that I'd like to see there is a good handling of TZs. Many datetime libraries got that wrong. Here's a blog post Armin wrote that may be helpful. http://lucumr.pocoo.org/2011/7/15/eppur-si-muove/ Thanks for taking care of this. FF -- Flavio (@flaper87) Percoco http://www.flaper87.com http://github.com/FlaPer87 ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
Re: [rust-dev] lib: Is anybody working on the datetime library?
That is a very interesting read. We certainly should learn from the experiences of other languages. This being a good example. I will be revisiting the linked documents listed in this thread repeatedly. Fortunately the issue he mentions about NULLs creating random bugs, is taken care of by Rust's safety. Thanks, Luis On 13 September 2013 19:21, Jason Fager jfa...@gmail.com wrote: Joda-Time and JSR-310 are similar APIs but different implementations. It's the same guy behind both, here he is explaining why he wanted 310 instead of just standardizing Joda: http://blog.joda.org/2009/11/why-jsr-310-isn-joda-time_4941.html?m=1 On Friday, September 13, 2013, Luis de Bethencourt wrote: Cool! Great and awesome feedback. The summary is that Joda-Time is what we should aspire to have. My goal is to first cover the most common use cases, and as Corey says, easy to use correctly. After that I can start considering the corner cases like bya and mya. Which sound very fun and interesting, but not high priority. Hopefully by then I won't be too consumed by the question of what is Time. Thanks, will keep you guys updated, Luis On 13 September 2013 16:20, Thad Guidry thadgui...@gmail.com wrote: Additionally, Be able to convert bya to mya ? http://en.wikipedia.org/wiki/Bya The short scale is now commonly used, btw... but also need to deal with this for conversions: http://en.wikipedia.org/wiki/Long_and_short_scales There should be a preference boolean for conversion output for short or long scale... especially concerning above a thousand million. That's enough to get you going with some wild ideas that Jodatime does not handle. On Fri, Sep 13, 2013 at 3:08 PM, Thad Guidry thadgui...@gmail.comwrote: One idea and use case for Paleontologists and Geologists coming over to Rust in droves... :-) Generically, just be able to handle simple Geologic addition and subtraction against an Epoch itself (reference date) http://en.wikipedia.org/wiki/Epoch_(reference_date) using known abbreviations. And additionally, store, understand, and output them: B.Y.B.P = Billion Years Before Present M.Y.B.P = Million Years Before Present On Fri, Sep 13, 2013 at 2:51 PM, Aaron Dandy aaron.da...@live.comwrote: I remember reading this article: http://noda-time.blogspot.com/2011/08/what-wrong-with-datetime-anyway.html a while back and really appreciating date time time zone libraries. Also after reading news of the leap second triggering a bug on a bunch of systems I now question all assumptions I make about our representations of time. I can no longer say that a minute is 60 seconds long with a straight face. Next up I guess we programmers have a year 2038 problem to deal with too. This library will be a big deal to write but there thankfully there should be a lot of existing knowledge to learn from. -- Date: Fri, 13 Sep 2013 15:10:21 -0400 From: l...@debethencourt.com To: s...@scientician.net CC: rust-dev@mozilla.org Subject: Re: [rust-dev] lib: Is anybody working on the datetime library? Hello Bardur, Thank you so much for the reference resource of JSR-310 and its design docs. I looked over it briefly and it is indeed very valuable. It was listed in the wiki page, but the link was to the former home of it. I have updated it. Since nobody has claimed this module, I will start working on this module tomorrow Saturday. Is that OK? Please, please, I would love more comments and ideas. Will start asking for reviews once I have some code to show. Thanks, Luis On 13 September 2013 00:57, Bardur Arantsson spam@scientici ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
[rust-dev] lib: Is anybody working on the datetime library?
Hello everyone, I'm interested in helping with some module development. A good way to learn Rust by using it and help Rust at the same time. Of the wanted modules in this page: https://github.com/mozilla/rust/wiki/Libs I'm attracted to datetime: https://github.com/mozilla/rust/wiki/Lib-datetime Just want to make sure there isn't anybody working on this to avoid accidental duplication. Thanks, Luis ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
Re: [rust-dev] lib: Is anybody working on the datetime library?
On 2013-09-12 22:12, Luis de Bethencourt wrote: Hello everyone, I'm interested in helping with some module development. A good way to learn Rust by using it and help Rust at the same time. Of the wanted modules in this page: https://github.com/mozilla/rust/wiki/Libs I see that this page does have a link to design docs for JSR-310 which is probably a good bet as to a usable DateTime API design (for Java at least). I just thought I'd mention that the documentation for the nearly final (i.e. barring serious bugs) API has been released at: http://download.java.net/jdk8/docs/technotes/guides/datetime/index.html Even if this is for Java, the design decisions about how the conepts of date/time are modeled (Instant vs. *DateTime, Periods, Durations, etc.) would apply in any language. They are also all essential concepts when working seriously with date/time even though the distinctions may not appear so at first. (I should mention that the lead on the JSR-310 spec was also the author of JodaTime which gets much deserved credit by Java developers for bringing date/time manipulation on the JVM out of the dark ages of java.util.Date. JSR-310 is a slightly reworked/simplified version of that API, so it's a sort of what are the essentials? version of JodaTime.) Regards, ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev