[#25272] [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Yui NARUSE <redmine@...>

Feature #2032: Change the license to "GPLv2+ or Ruby's original".

51 messages 2009/09/02
[#25368] [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Kazuhiko Shiozaki <redmine@...> 2009/09/04

Issue #2032 has been updated by Kazuhiko Shiozaki.

[#25461] Re: [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Gregory Brown <gregory.t.brown@...> 2009/09/07

On Fri, Sep 4, 2009 at 1:10 PM, Kazuhiko Shiozaki<redmine@ruby-lang.org> wrote:

[#25463] Re: [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Yukihiro Matsumoto <matz@...> 2009/09/08

Hi,

[#30610] [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Shyouhei Urabe <redmine@...> 2010/06/06

Issue #2032 has been updated by Shyouhei Urabe.

[#30611] Re: [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Yusuke ENDOH <mame@...> 2010/06/06

Hi,

[#30614] Re: [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Urabe Shyouhei <shyouhei@...> 2010/06/06

> To avoid enbugging a new bug, we must choose the another solutions.

[#30616] Re: [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Yusuke ENDOH <mame@...> 2010/06/06

2010/6/6 Urabe Shyouhei <shyouhei@ruby-lang.org>:

[#30652] Re: [Feature #2032] Change the license to "GPLv2+ or Ruby's original". — Urabe Shyouhei <shyouhei@...> 2010/06/08

(2010/06/06 20:27), Yusuke ENDOH wrote:

[#25285] [Feature #2033] Move Core Development to Git — Run Paint Run Run <redmine@...>

Feature #2033: Move Core Development to Git

75 messages 2009/09/02
[#25290] [Feature #2033] Move Core Development to Git — Yui NARUSE <redmine@...> 2009/09/02

Issue #2033 has been updated by Yui NARUSE.

[#25297] Re: [Feature #2033] Move Core Development to Git — Jon <jon.forums@...> 2009/09/02

> Some commiter of Ruby live on Windows.

[#25342] Re: [Feature #2033] Move Core Development to Git — Urabe Shyouhei <shyouhei@...> 2009/09/03

Jon wrote:

[#25343] Re: [Feature #2033] Move Core Development to Git — Michal Suchanek <hramrach@...> 2009/09/03

2009/9/4 Urabe Shyouhei <shyouhei@ruby-lang.org>:

[#25345] Re: [Feature #2033] Move Core Development to Git — Urabe Shyouhei <shyouhei@...> 2009/09/03

Michal Suchanek wrote:

[#25299] Re: [Feature #2033] Move Core Development to Git — Eric Hodel <drbrain@...7.net> 2009/09/02

On Sep 2, 2009, at 11:19, Run Paint Run Run wrote:

[#25306] [Feature #2034] Consider the ICU Library for Improving and Expanding Unicode Support — Run Paint Run Run <redmine@...>

Feature #2034: Consider the ICU Library for Improving and Expanding Unicode Support

16 messages 2009/09/03

[#25394] Unmaintained code (Was: Move Core Development to Git) — Eric Hodel <drbrain@...7.net>

On Sep 4, 2009, at 02:16, Urabe Shyouhei wrote:

10 messages 2009/09/05

[#25420] [Bug #2054] Onigurma Isn't Documented — Run Paint Run Run <redmine@...>

Bug #2054: Onigurma Isn't Documented

17 messages 2009/09/05

[#25442] turning off indentation warnings — Aaron Patterson <aaron@...>

Is there a way in 1.9 to turn off only indentation warnings? I like

19 messages 2009/09/06
[#25510] Re: turning off indentation warnings — Nobuyoshi Nakada <nobu@...> 2009/09/10

Hi,

[#25511] [Bug #2079] win32ole's OLEGEN does not create all classes needed when a TLB has more than one class defined — Bruno Antunes <redmine@...>

Bug #2079: win32ole's OLEGEN does not create all classes needed when a TLB has more than one class defined

18 messages 2009/09/10

[#25644] [Bug #2121] mathn/rational destroys Fixnum#/, Fixnum#quo and Bignum#/, Bignum#quo — Charles Nutter <redmine@...>

Bug #2121: mathn/rational destroys Fixnum#/, Fixnum#quo and Bignum#/, Bignum#quo

12 messages 2009/09/19

[#25709] [Bug #2131] f(not x) => syntax error — "James M. Lawrence" <redmine@...>

Bug #2131: f(not x) => syntax error

16 messages 2009/09/22

[#25769] A challenge: Enumerator#next in JRuby — Charles Oliver Nutter <headius@...>

I have a challenge for anyone who wants to discuss, propose

25 messages 2009/09/25
[#25782] Re: A challenge: Enumerator#next in JRuby — Tanaka Akira <akr@...> 2009/09/26

In article <f04d2210909251312q46bd51c0teacc4b0a8c417f0c@mail.gmail.com>,

[#25820] [Feature #2152] Split functionality of Float#inspect and Float#to_s — Roger Pack <redmine@...>

Feature #2152: Split functionality of Float#inspect and Float#to_s

32 messages 2009/09/28

[#25853] [Bug #2160] JSON can't parse input where top-level object is a string — caleb clausen <redmine@...>

Bug #2160: JSON can't parse input where top-level object is a string

11 messages 2009/09/29

[ruby-core:25677] Re: [Bug #2121] mathn/rational destroys Fixnum#/, Fixnum#quo and Bignum#/, Bignum#quo

From: Rick DeNatale <rick.denatale@...>
Date: 2009-09-20 20:18:02 UTC
List: ruby-core #25677
On Sun, Sep 20, 2009 at 3:51 PM, brian ford <brixen@gmail.com> wrote:
> Hi,
>
> On Sun, Sep 20, 2009 at 9:19 AM, Rick DeNatale <rick.denatale@gmail.com> =
wrote:
>>
>> Actually in most languages which I've encountered, and that's quite a
>> few. Mixed mode arithmetic has been implemented by having some kind of
>> rules on how to 'overload' arithmetic operators based on the
>> arguments, not by having different operator syntax.
>>
>> And those rules are usually based on doing conversions only when
>> necessary so as to preserve what information can be preserved given
>> the arguments,
>>
>> So, for example
>>
>> =A0 =A0integer op integer - normally produces an integer for all of the
>> 'big four' + - * /
>> =A0 =A0integer op float =A0 =A0- normally produces a float, as does floa=
t op integer
>>
>> As new numeric types are added, in languages which either include them
>> inherently or allow them to be added, this pattern is usually
>> followed.
>
> This is a distinctly different issue. Mixed-type arithmetic in Ruby is
> handled by the #coerce protocol.

Not sure why it's distinctly different, what happens when a new
numeric class is introduced, e.g. Rational, is what we seem to be
talking about.

And #coerce is just an implemention detail whose motivation seems to
be in line with what I'm saying.

>
>>>
>>> As for which symbol to select, what about '/.' for real(a)/real(b).
>>
>> Well, first the problem we are talking about is Rationals, not Floats,
>> and second, what happens as more numeric classes are introduced.
>
> The mathn library aliases Fixnum and Bignum #quo to #/. By default
> #quo returns a Float. Rational redefines #quo to produce a Rational
> rather than a Float.
>
> But what class of object is not the point. It could be Complex. The
> point is that integers are not closed under division so you *must*
> choose one of the options if you expect a value when dividing any two
> integers.

Right, and Ruby like most other languages made a choice to use integer
division, rather than converting.

Smalltalk made another choice, to return a Fraction when dividing two integ=
ers.

In both cases, the / operator is effectively overloaded, and can
return other kinds of numbers given different pairs of arguments.

>
> The division operation is so fundamental that assumptions about it
> should not change under your feet. Having a separate operator that
> returns a different type when integral division would be undefined
> allows both normal algorithms and mathy stuff to coexist nicely. In my
> algorithms, I *never* want my integral division to suddenly return
> something non-integer. In my math codes, I almost never want my
> quotient truncated or rounded.

Yes, I agree that I don't want the rules to change under my feet.  I
want a / b to give me the same integer as Ruby 1.8 sans mathn gives me
when a and b are integers, and I expect 1 / 1.2 to give me the same
float etc.  I'm not sure I see the need for additional operators, but
that's a side issue.

 Run Paint Run suggested that 1.9 SHOULD produce a Rational or maybe a
float as the result of dividing two integers, because "that what Guido
would do."

The brutal facts are that there's is lots of code written in Ruby, and
lots of that code uses integer divide, and would be broken if this
change were made, it would be the same as silently including mathn in
every existing ruby program, which seems like a bad idea.

Guess what! I did some experimentation with irb1.9 and was pleasantly
surprised to find that 1.9 seems to be doing quite the opposite, it
acts just like the "thought experiment" proposal I suggested here.

$ irb1.9
irb(main):001:0> Rational
=3D> Rational
irb(main):002:0> 1/2
=3D> 0
irb(main):003:0> Rational(1)
=3D> Rational(1, 1)
irb(main):004:0> 1.to_r
=3D> Rational(1, 1)

Which I guess indicates that "that's what Matz would do."


--=20
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

In This Thread