------art_1749_14607818.1201314009050
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Well, it looks like the Temporal mixin is ready to go. Should I submit the
patch to the ruby-core tracker on RubyForge, or is it already officially up
for consideration in it's current location?

2008/1/25 Martin Duerst <duerst / it.aoyama.ac.jp>:

> At 11:38 08/01/25, Jim Cropcho wrote:
> >Does anyone think that it is a good idea to include similar methods for
> japanese/east asian languages?
>
> I don't think so. Ruby doesn't localize it's method names.
> If things are clear in simple English (as they are in your case),
> it should be fine.
>
> Regards,   Martin.
>
>
> >I'm not too familiar with japanese/localization in ruby-core. Would that
> go in the same module, or a different one?
> >
> >Any naming scheme that helps visualize is good. How can we make this work
> best for the great number of locales?
> >
> >2008/1/24 Jim Cropcho <<mailto:jim.cropcho / gmail.com>
> jim.cropcho / gmail.com >:
> >>Here is the newest patch. It creates a module called Temporal which
> contains functionality useful to classes which define temporal objects, such
> as dates and times. However, its intended scope is *not* limited to object
> comparison. It is handy in this regard, though, because it addresses
> differences between languages, as several in this thread have noted.
> >>
> >>The module is added to the compilation configuration, and unit tests are
> included, all of which pass. The module is included in the classes Time and
> Date (and DateTime, via extension).
> >>
> >>The module does not include the methods past? and present?, as intended,
> because the means of determining "now" is different even at the conceptual
> level between temporal classes. For example, "now" to Time is the number of
> microseconds after epoch, but "now" to Date is the current calendar date. It
> is my opinion that past?/future? functionality should be implemented at the
> class level.
> >>
> >>Please give my concept and source code consideration for being entered
> into the ruby core, and suggest modifications/additions at will.
> >>
> >>
> >>Jim Cropcho
> >>
> >>2008/1/23 Jim Cropcho < <mailto:jim.cropcho / gmail.com>
> jim.cropcho / gmail.com>:
> >>
> >>>A new thought:
> >>>
> >>>> The way that the <method is rewritten for Time, it is
> >>>> optimized (as far as I can tell) to evaluate conditions
> >>>> based on nanoseconds only when equality cannot be
> >>>> determined via seconds. I may be misreading that.
> >>>>
> >>>> Conversely, Time inherits its > and < methods from its superclass,
> >>>> so surely those optimizations in <do not exist, and creating
> >>>> aliases would yield less-optimized code. Also, in the other classes
> >>>> where I add this functionality, current techniques to optimize
> >>>> comparisons will be reimplemented using the local methodology.
> >>>
> >>>from the rdoc for compar.c:
> >>>
> >>>The <http://ruby-doc.org/core/classes/Comparable.html>Comparable mixin
> is used by classes whose objects may be ordered. The class must define the
> <operator, which compares the receiver against another object, returning
> -1, 0, or +1 depending on whether the receiver is less than, equal to, or
> greater than the other object. <
> http://ruby-doc.org/core/classes/Comparable.html>Comparable uses <to
> implement the conventional comparison operators (<, < >and >) and
> the method <http://ruby-doc.org/core/classes/Comparable.html#M007548
> >between?.
> >>>
> >>>I am now writing a Mixin called Temporal which will be included in the
> Time , Date and DateTime classes, and will contain the instance methods
> >>>
> >>>*before?(some_time)
> >>>*after?(some_time)
> >>>*future?(time  ime.now)
> >>>*past?(time  ime.now)
> >>>
> >>>I have the tests written and skeleton code to compile and include the
> module where necessary. I hope to be finished tomorrow.
> >>>
> >>>2008/1/23 Mathieu Blondel <<mailto:mblondel / rubyforge.org>
> mblondel / rubyforge.org >:
> >>>>Hi,
> >>>>
> >>>>2008/1/23, Martin Duerst < <mailto:duerst / it.aoyama.ac.jp>
> duerst / it.aoyama.ac.jp>:
> >>>>
> >>>>> There is even some cultural dependency here. In Japanese, for
> example,
> >>>>> the past is higher than the future, time flows down,
> >>>>
> >>>>And in Chinese as well. For example:
> >>>>
> >>>>Ф  ext week, lit. below week
> >>>>Ф  ast week, lit. above week
> >>>>
> >>>>
> >>>>Mathieu
>
>
> #-#-#  Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University
> #-#-#  http://www.sw.it.aoyama.ac.jp       mailto:duerst / it.aoyama.ac.jp
>
>
>

------art_1749_14607818.1201314009050
Content-Type: text/html; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Well, it looks like the Temporal mixin is ready to go. Should I submit the patch to the ruby-core tracker on RubyForge, or is it already officially up for consideration in it&#39;s current location?<br><br><div classmail_quote">
2008/1/25 Martin Duerst &lt;<a hrefailto:duerst / it.aoyama.ac.jp">duerst / it.aoyama.ac.jp</a>&gt;:<br><blockquote classmail_quote" styleorder-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div classh2E3d">At 11:38 08/01/25, Jim Cropcho wrote:<br>&gt;Does anyone think that it is a good idea to include similar methods for japanese/east asian languages?<br><br></div>I don&#39;t think so. Ruby doesn&#39;t localize it&#39;s method names.<br>
If things are clear in simple English (as they are in your case),<br>it should be fine.<br><br>Regards, &nbsp; Martin.<br><div classh2E3d"><br><br>&gt;I&#39;m not too familiar with japanese/localization in ruby-core. Would that go in the same module, or a different one?<br>
&gt;<br>&gt;Any naming scheme that helps visualize is good. How can we make this work best for the great number of locales?<br>&gt;<br></div>&gt;2008/1/24 Jim Cropcho &lt;&lt;mailto:<a hrefailto:jim.cropcho / gmail.com">jim.cropcho / gmail.com</a>&gt;<a hrefailto:jim.cropcho / gmail.com">jim.cropcho / gmail.com</a> &gt;:<br>
<div classh2E3d">&gt;&gt;Here is the newest patch. It creates a module called Temporal which contains functionality useful to classes which define temporal objects, such as dates and times. However, its intended scope is *not* limited to object comparison. It is handy in this regard, though, because it addresses differences between languages, as several in this thread have noted.<br>
&gt;&gt;<br>&gt;&gt;The module is added to the compilation configuration, and unit tests are included, all of which pass. The module is included in the classes Time and Date (and DateTime, via extension).<br>&gt;&gt;<br>&gt;&gt;The module does not include the methods past? and present?, as intended, because the means of determining &quot;now&quot; is different even at the conceptual level between temporal classes. For example, &quot;now&quot; to Time is the number of microseconds after epoch, but &quot;now&quot; to Date is the current calendar date. It is my opinion that past?/future? functionality should be implemented at the class level.<br>
&gt;&gt;<br>&gt;&gt;Please give my concept and source code consideration for being entered into the ruby core, and suggest modifications/additions at will.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;Jim Cropcho<br>&gt;&gt;<br></div>
&gt;&gt;2008/1/23 Jim Cropcho &lt; &lt;mailto:<a hrefailto:jim.cropcho / gmail.com">jim.cropcho / gmail.com</a>&gt;<a hrefailto:jim.cropcho / gmail.com">jim.cropcho / gmail.com</a>&gt;:<br><div classh2E3d">&gt;&gt;<br>&gt;&gt;&gt;A new thought:<br>
&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; The way that the &lt;t; method is rewritten for Time, it is<br>&gt;&gt;&gt;&gt; optimized (as far as I can tell) to evaluate conditions<br>&gt;&gt;&gt;&gt; based on nanoseconds only when equality cannot be<br>
&gt;&gt;&gt;&gt; determined via seconds. I may be misreading that.<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; Conversely, Time inherits its &gt; and &lt; methods from its superclass,<br>&gt;&gt;&gt;&gt; so surely those optimizations in &lt;t; do not exist, and creating<br>
&gt;&gt;&gt;&gt; aliases would yield less-optimized code. Also, in the other classes<br>&gt;&gt;&gt;&gt; where I add this functionality, current techniques to optimize<br>&gt;&gt;&gt;&gt; comparisons will be reimplemented using the local methodology.<br>
&gt;&gt;&gt;<br>&gt;&gt;&gt;from the rdoc for compar.c:<br>&gt;&gt;&gt;<br></div>&gt;&gt;&gt;The &lt;<a hrefttp://ruby-doc.org/core/classes/Comparable.html" targetblank">http://ruby-doc.org/core/classes/Comparable.html</a>&gt;Comparable mixin is used by classes whose objects may be ordered. The class must define the &lt;t; operator, which compares the receiver against another object, returning -1, 0, or +1 depending on whether the receiver is less than, equal to, or greater than the other object. &lt;<a hrefttp://ruby-doc.org/core/classes/Comparable.html" targetblank">http://ruby-doc.org/core/classes/Comparable.html</a>&gt;Comparable uses &lt;t; to implement the conventional comparison operators (&lt;, &lt; &gt;and &gt;) and the method &lt;<a hrefttp://ruby-doc.org/core/classes/Comparable.html#M007548" targetblank">http://ruby-doc.org/core/classes/Comparable.html#M007548</a>&gt;between?.<br>
<div classh2E3d">&gt;&gt;&gt;<br>&gt;&gt;&gt;I am now writing a Mixin called Temporal which will be included in the Time , Date and DateTime classes, and will contain the instance methods<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;*before?(some_time)<br>
&gt;&gt;&gt;*after?(some_time)<br>&gt;&gt;&gt;*future?(time  ime.now)<br>&gt;&gt;&gt;*past?(time  ime.now)<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;I have the tests written and skeleton code to compile and include the module where necessary. I hope to be finished tomorrow.<br>
&gt;&gt;&gt;<br></div>&gt;&gt;&gt;2008/1/23 Mathieu Blondel &lt;&lt;mailto:<a hrefailto:mblondel / rubyforge.org">mblondel / rubyforge.org</a>&gt; <a hrefailto:mblondel / rubyforge.org">mblondel / rubyforge.org</a> &gt;:<br>
&gt;&gt;&gt;&gt;Hi,<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;2008/1/23, Martin Duerst &lt; &lt;mailto:<a hrefailto:duerst / it.aoyama.ac.jp">duerst / it.aoyama.ac.jp</a>&gt;<a hrefailto:duerst / it.aoyama.ac.jp">duerst / it.aoyama.ac.jp</a>&gt;:<br>
<div classh2E3d">&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; There is even some cultural dependency here. In Japanese, for example,<br>&gt;&gt;&gt;&gt;&gt; the past is higher than the future, time flows down,<br>&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;And in Chinese as well. For example:<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;Ф  ext week, lit. below week<br>&gt;&gt;&gt;&gt;Ф  ast week, lit. above week<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;Mathieu<br><br><br></div><div classh2E3d">#-#-# &nbsp;Martin J. Du&quot;rst, Assoc. Professor, Aoyama Gakuin University<br></div>#-#-# &nbsp;<a hrefttp://www.sw.it.aoyama.ac.jp" targetblank">http://www.sw.it.aoyama.ac.jp</a> &nbsp; &nbsp; &nbsp; mailto:<a hrefailto:duerst / it.aoyama.ac.jp">duerst / it.aoyama.ac.jp</a><br>
<br><br></blockquote></div><br>

------art_1749_14607818.1201314009050--