Jarl Friis
2012-Oct-02 09:53 UTC
Being strict on differentiating between IEC prefixes and SI prefixes.
One of the greatest things about rails is that it is so standards-compliant, no other framework that I have seen have complied to the HTTP standard (think REST) in such a degree that Rails does. Kudos to you all for that. I think we (Rails community) should follow the line of standards compliance and also take it to the binary prefixes [1], i.e. kilobytes, megabytes, etc. For more than half a decade SI units has been a standard (occupying the prefixes kilo, mega, ...) Since the introduction of computers the prefixes has been misused in the IT industry for powers of 1024 but used correctly (for marketing reasons) by storage manufacturers to mean powers of 1000. In 1999 IEC published the new standard for powers of 1024 (known as binary prefixes[1]). In 2008 this was harmonized with ISO standard in ISO/IEC IEC 80000-13:2008 I think it is a good time (for Rails 4) for Rails to conform to these standards. That means that every time a power of 1024 is used the IEC prefixes kibi, mebi, and so on are used and vice versa. Further every time a power of 1000 is used the SI prefixes are used, that is, kilo, mega, and so on and vice versa. I have created a pull request (https://github.com/rails/rails/pull/7819) that implements two things (in two separate commits): 1) Rename all use of 1024 to use IEC prefix names a) Rename of core extension: 2.kilobytes => 2.kibibyte == 2*1024 b) Rename all use of these helpers within the Rails project. c) Ensure that number the prefixes are KiB, MiB when dividing by powers of 1024, and using KB, MB when dividing by powers of 1000 (that is when options[:prefix] => :si) 2) (Re)Introduced the posibility to use SI prefix names (meaning powers of 1000) Introduced SI prefix helpers 2.kilobytes == 2*1000 Impact on Rails itself: None: All the useages has been renamed to use the semantically equivalent method (that is IEC names). Impact on Rails projects: The use of core extensions 2.kilobytes, 2.megabytes will mean something else; A power of 1000 in Rails4 as opposed to a power of 1024 in Rails3. But the old behaviour can still be achieved by using IEC names instead such as 2.kibibytes or 2.mebibytes. Footnotes: [1] http://en.wikipedia.org/wiki/Binary_prefix Jarl -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Andrés Mejía
2012-Oct-02 15:52 UTC
Re: Being strict on differentiating between IEC prefixes and SI prefixes.
I''m -1 for this. On Tue, Oct 2, 2012 at 4:53 AM, Jarl Friis <jarl@softace.dk> wrote:> One of the greatest things about rails is that it is so > standards-compliant, > no other framework that I have seen have complied to the > HTTP standard (think REST) in such a degree that Rails does. Kudos to > you all for that. > > I think we (Rails community) should follow the line of standards > compliance and also > take it to the binary prefixes [1], i.e. kilobytes, megabytes, > etc. For more than half a decade SI units has been a standard > (occupying the prefixes kilo, mega, ...) Since the introduction of > computers the prefixes has been misused in the IT industry for powers > of 1024 but used correctly (for marketing reasons) by storage > manufacturers to mean powers of 1000. > > In 1999 IEC published the new standard for powers of 1024 (known as > binary prefixes[1]). In 2008 this was harmonized with ISO standard in > ISO/IEC IEC 80000-13:2008 > > I think it is a good time (for Rails 4) for Rails to conform to these > standards. That means that every time a power of 1024 is used the IEC > prefixes kibi, mebi, and so on are used and vice versa. Further every > time a power of 1000 is used the SI prefixes are used, that is, kilo, > mega, and so on and vice versa. > > I have created a pull request > (https://github.com/rails/rails/pull/7819) that implements two things > (in two separate commits): > > 1) Rename all use of 1024 to use IEC prefix names > > a) Rename of core extension: 2.kilobytes => 2.kibibyte == 2*1024 > b) Rename all use of these helpers within the Rails project. > c) Ensure that number the prefixes are KiB, MiB when dividing by > powers of 1024, and using KB, MB when dividing by powers of 1000 > (that is when options[:prefix] => :si) > > 2) (Re)Introduced the posibility to use SI prefix names (meaning powers of > 1000) > Introduced SI prefix helpers 2.kilobytes == 2*1000 > > Impact on Rails itself: > None: All the useages has been renamed to use the semantically > equivalent method (that is IEC names). > > Impact on Rails projects: > The use of core extensions 2.kilobytes, 2.megabytes will mean > something else; A power of 1000 in Rails4 as opposed to a power of > 1024 in Rails3. But the old behaviour can still be achieved by using > IEC names instead such as 2.kibibytes or 2.mebibytes. > > Footnotes: > [1] http://en.wikipedia.org/wiki/Binary_prefix > > > Jarl > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Allen Madsen
2012-Oct-02 17:29 UTC
Re: Being strict on differentiating between IEC prefixes and SI prefixes.
This pull request poses two problems in my mind. The changes are not backwards compatible, which could lead to some serious head scratching. Secondly, even though they''re a standard now, they''re not commonly used, which leads to more head scrathing. Allen Madsen http://www.allenmadsen.com On Tue, Oct 2, 2012 at 11:52 AM, Andrés Mejía <andmej@gmail.com> wrote:> I''m -1 for this. > > > On Tue, Oct 2, 2012 at 4:53 AM, Jarl Friis <jarl@softace.dk> wrote: > >> One of the greatest things about rails is that it is so >> standards-compliant, >> no other framework that I have seen have complied to the >> HTTP standard (think REST) in such a degree that Rails does. Kudos to >> you all for that. >> >> I think we (Rails community) should follow the line of standards >> compliance and also >> take it to the binary prefixes [1], i.e. kilobytes, megabytes, >> etc. For more than half a decade SI units has been a standard >> (occupying the prefixes kilo, mega, ...) Since the introduction of >> computers the prefixes has been misused in the IT industry for powers >> of 1024 but used correctly (for marketing reasons) by storage >> manufacturers to mean powers of 1000. >> >> In 1999 IEC published the new standard for powers of 1024 (known as >> binary prefixes[1]). In 2008 this was harmonized with ISO standard in >> ISO/IEC IEC 80000-13:2008 >> >> I think it is a good time (for Rails 4) for Rails to conform to these >> standards. That means that every time a power of 1024 is used the IEC >> prefixes kibi, mebi, and so on are used and vice versa. Further every >> time a power of 1000 is used the SI prefixes are used, that is, kilo, >> mega, and so on and vice versa. >> >> I have created a pull request >> (https://github.com/rails/rails/pull/7819) that implements two things >> (in two separate commits): >> >> 1) Rename all use of 1024 to use IEC prefix names >> >> a) Rename of core extension: 2.kilobytes => 2.kibibyte == 2*1024 >> b) Rename all use of these helpers within the Rails project. >> c) Ensure that number the prefixes are KiB, MiB when dividing by >> powers of 1024, and using KB, MB when dividing by powers of 1000 >> (that is when options[:prefix] => :si) >> >> 2) (Re)Introduced the posibility to use SI prefix names (meaning powers >> of 1000) >> Introduced SI prefix helpers 2.kilobytes == 2*1000 >> >> Impact on Rails itself: >> None: All the useages has been renamed to use the semantically >> equivalent method (that is IEC names). >> >> Impact on Rails projects: >> The use of core extensions 2.kilobytes, 2.megabytes will mean >> something else; A power of 1000 in Rails4 as opposed to a power of >> 1024 in Rails3. But the old behaviour can still be achieved by using >> IEC names instead such as 2.kibibytes or 2.mebibytes. >> >> Footnotes: >> [1] http://en.wikipedia.org/wiki/Binary_prefix >> >> >> Jarl >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To post to this group, send email to rubyonrails-core@googlegroups.com. >> To unsubscribe from this group, send email to >> rubyonrails-core+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-core?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Pedro Nascimento
2012-Oct-02 18:07 UTC
Re: Being strict on differentiating between IEC prefixes and SI prefixes.
2.kilobytes(prefix: :si) would make sense to be 2000, if anyone''s interested in doing so. -1 on everything else. On Tue, Oct 2, 2012 at 2:29 PM, Allen Madsen <allen.c.madsen@gmail.com>wrote:> This pull request poses two problems in my mind. The changes are not > backwards compatible, which could lead to some serious head scratching. > Secondly, even though they''re a standard now, they''re not commonly used, > which leads to more head scrathing. > > Allen Madsen > http://www.allenmadsen.com > > > > On Tue, Oct 2, 2012 at 11:52 AM, Andrés Mejía <andmej@gmail.com> wrote: > >> I''m -1 for this. >> >> >> On Tue, Oct 2, 2012 at 4:53 AM, Jarl Friis <jarl@softace.dk> wrote: >> >>> One of the greatest things about rails is that it is so >>> standards-compliant, >>> no other framework that I have seen have complied to the >>> HTTP standard (think REST) in such a degree that Rails does. Kudos to >>> you all for that. >>> >>> I think we (Rails community) should follow the line of standards >>> compliance and also >>> take it to the binary prefixes [1], i.e. kilobytes, megabytes, >>> etc. For more than half a decade SI units has been a standard >>> (occupying the prefixes kilo, mega, ...) Since the introduction of >>> computers the prefixes has been misused in the IT industry for powers >>> of 1024 but used correctly (for marketing reasons) by storage >>> manufacturers to mean powers of 1000. >>> >>> In 1999 IEC published the new standard for powers of 1024 (known as >>> binary prefixes[1]). In 2008 this was harmonized with ISO standard in >>> ISO/IEC IEC 80000-13:2008 >>> >>> I think it is a good time (for Rails 4) for Rails to conform to these >>> standards. That means that every time a power of 1024 is used the IEC >>> prefixes kibi, mebi, and so on are used and vice versa. Further every >>> time a power of 1000 is used the SI prefixes are used, that is, kilo, >>> mega, and so on and vice versa. >>> >>> I have created a pull request >>> (https://github.com/rails/rails/pull/7819) that implements two things >>> (in two separate commits): >>> >>> 1) Rename all use of 1024 to use IEC prefix names >>> >>> a) Rename of core extension: 2.kilobytes => 2.kibibyte == 2*1024 >>> b) Rename all use of these helpers within the Rails project. >>> c) Ensure that number the prefixes are KiB, MiB when dividing by >>> powers of 1024, and using KB, MB when dividing by powers of 1000 >>> (that is when options[:prefix] => :si) >>> >>> 2) (Re)Introduced the posibility to use SI prefix names (meaning powers >>> of 1000) >>> Introduced SI prefix helpers 2.kilobytes == 2*1000 >>> >>> Impact on Rails itself: >>> None: All the useages has been renamed to use the semantically >>> equivalent method (that is IEC names). >>> >>> Impact on Rails projects: >>> The use of core extensions 2.kilobytes, 2.megabytes will mean >>> something else; A power of 1000 in Rails4 as opposed to a power of >>> 1024 in Rails3. But the old behaviour can still be achieved by using >>> IEC names instead such as 2.kibibytes or 2.mebibytes. >>> >>> Footnotes: >>> [1] http://en.wikipedia.org/wiki/Binary_prefix >>> >>> >>> Jarl >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Ruby on Rails: Core" group. >>> To post to this group, send email to rubyonrails-core@googlegroups.com. >>> To unsubscribe from this group, send email to >>> rubyonrails-core+unsubscribe@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-core?hl=en. >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To post to this group, send email to rubyonrails-core@googlegroups.com. >> To unsubscribe from this group, send email to >> rubyonrails-core+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-core?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
dburry
2012-Oct-02 20:07 UTC
Re: Being strict on differentiating between IEC prefixes and SI prefixes.
One of the great things I like about rails is not always being tied to full backwards compatibility causing a more and more bloated core every major release. In my mind a plugin that puts everything back would solve that issue, for those who need it. That other objection still gives me pause though... I suspect the difference between IEC and SI units is still not commonly known even among programmers. So this may not be the right time to do this yet? I dunno, just my thoughts, I''d be happy either way. Just to be clear, this is not just a visual change in prefix, but much a more basic functional mathematical change of how the units are calculated and converted too. A mere prefix would be superficial in comparison. Dave On Tuesday, October 2, 2012 10:30:30 AM UTC-7, Allen Madsen wrote:> > This pull request poses two problems in my mind. The changes are not > backwards compatible, which could lead to some serious head scratching. > Secondly, even though they''re a standard now, they''re not commonly used, > which leads to more head scrathing. > > Allen Madsen > http://www.allenmadsen.com > > > On Tue, Oct 2, 2012 at 11:52 AM, Andrés Mejía <and...@gmail.com<javascript:> > > wrote: > >> I''m -1 for this. >> >> >> On Tue, Oct 2, 2012 at 4:53 AM, Jarl Friis <ja...@softace.dk<javascript:> >> > wrote: >> >>> One of the greatest things about rails is that it is so >>> standards-compliant, >>> no other framework that I have seen have complied to the >>> HTTP standard (think REST) in such a degree that Rails does. Kudos to >>> you all for that. >>> >>> I think we (Rails community) should follow the line of standards >>> compliance and also >>> take it to the binary prefixes [1], i.e. kilobytes, megabytes, >>> etc. For more than half a decade SI units has been a standard >>> (occupying the prefixes kilo, mega, ...) Since the introduction of >>> computers the prefixes has been misused in the IT industry for powers >>> of 1024 but used correctly (for marketing reasons) by storage >>> manufacturers to mean powers of 1000. >>> >>> In 1999 IEC published the new standard for powers of 1024 (known as >>> binary prefixes[1]). In 2008 this was harmonized with ISO standard in >>> ISO/IEC IEC 80000-13:2008 >>> >>> I think it is a good time (for Rails 4) for Rails to conform to these >>> standards. That means that every time a power of 1024 is used the IEC >>> prefixes kibi, mebi, and so on are used and vice versa. Further every >>> time a power of 1000 is used the SI prefixes are used, that is, kilo, >>> mega, and so on and vice versa. >>> >>> I have created a pull request >>> (https://github.com/rails/rails/pull/7819) that implements two things >>> (in two separate commits): >>> >>> 1) Rename all use of 1024 to use IEC prefix names >>> >>> a) Rename of core extension: 2.kilobytes => 2.kibibyte == 2*1024 >>> b) Rename all use of these helpers within the Rails project. >>> c) Ensure that number the prefixes are KiB, MiB when dividing by >>> powers of 1024, and using KB, MB when dividing by powers of 1000 >>> (that is when options[:prefix] => :si) >>> >>> 2) (Re)Introduced the posibility to use SI prefix names (meaning powers >>> of 1000) >>> Introduced SI prefix helpers 2.kilobytes == 2*1000 >>> >>> Impact on Rails itself: >>> None: All the useages has been renamed to use the semantically >>> equivalent method (that is IEC names). >>> >>> Impact on Rails projects: >>> The use of core extensions 2.kilobytes, 2.megabytes will mean >>> something else; A power of 1000 in Rails4 as opposed to a power of >>> 1024 in Rails3. But the old behaviour can still be achieved by using >>> IEC names instead such as 2.kibibytes or 2.mebibytes. >>> >>> Footnotes: >>> [1] http://en.wikipedia.org/wiki/Binary_prefix >>> >>> >>> Jarl >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Ruby on Rails: Core" group. >>> To post to this group, send email to rubyonra...@googlegroups.com<javascript:> >>> . >>> To unsubscribe from this group, send email to >>> rubyonrails-co...@googlegroups.com <javascript:>. >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-core?hl=en. >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To post to this group, send email to rubyonra...@googlegroups.com<javascript:> >> . >> To unsubscribe from this group, send email to >> rubyonrails-co...@googlegroups.com <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-core?hl=en. >> > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/wJjzMH3ga6QJ. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Geoff Harcourt
2012-Oct-02 20:19 UTC
Re: Being strict on differentiating between IEC prefixes and SI prefixes.
OK, pushed. I can''t push my own database data up, so I''ll get four questions up there for you. -Geoff -- Geoff Harcourt On Tuesday, October 2, 2012 at 4:07 PM, dburry wrote:> One of the great things I like about rails is not always being tied to full backwards compatibility causing a more and more bloated core every major release. In my mind a plugin that puts everything back would solve that issue, for those who need it. > > That other objection still gives me pause though... I suspect the difference between IEC and SI units is still not commonly known even among programmers. So this may not be the right time to do this yet? I dunno, just my thoughts, I''d be happy either way. > > Just to be clear, this is not just a visual change in prefix, but much a more basic functional mathematical change of how the units are calculated and converted too. A mere prefix would be superficial in comparison. > > Dave > > > On Tuesday, October 2, 2012 10:30:30 AM UTC-7, Allen Madsen wrote: > > This pull request poses two problems in my mind. The changes are not backwards compatible, which could lead to some serious head scratching. Secondly, even though they''re a standard now, they''re not commonly used, which leads to more head scrathing. > > > > Allen Madsen > > http://www.allenmadsen.com > > > > > > On Tue, Oct 2, 2012 at 11:52 AM, Andrés Mejía <and...@gmail.com (javascript:)> wrote: > > > I''m -1 for this. > > > > > > > > > On Tue, Oct 2, 2012 at 4:53 AM, Jarl Friis <ja...@softace.dk (javascript:)> wrote: > > > > One of the greatest things about rails is that it is so standards-compliant, > > > > no other framework that I have seen have complied to the > > > > HTTP standard (think REST) in such a degree that Rails does. Kudos to > > > > you all for that. > > > > > > > > I think we (Rails community) should follow the line of standards > > > > compliance and also > > > > take it to the binary prefixes [1], i.e. kilobytes, megabytes, > > > > etc. For more than half a decade SI units has been a standard > > > > (occupying the prefixes kilo, mega, ...) Since the introduction of > > > > computers the prefixes has been misused in the IT industry for powers > > > > of 1024 but used correctly (for marketing reasons) by storage > > > > manufacturers to mean powers of 1000. > > > > > > > > In 1999 IEC published the new standard for powers of 1024 (known as > > > > binary prefixes[1]). In 2008 this was harmonized with ISO standard in > > > > ISO/IEC IEC 80000-13:2008 > > > > > > > > I think it is a good time (for Rails 4) for Rails to conform to these > > > > standards. That means that every time a power of 1024 is used the IEC > > > > prefixes kibi, mebi, and so on are used and vice versa. Further every > > > > time a power of 1000 is used the SI prefixes are used, that is, kilo, > > > > mega, and so on and vice versa. > > > > > > > > I have created a pull request > > > > (https://github.com/rails/rails/pull/7819) that implements two things > > > > (in two separate commits): > > > > > > > > 1) Rename all use of 1024 to use IEC prefix names > > > > > > > > a) Rename of core extension: 2.kilobytes => 2.kibibyte == 2*1024 > > > > b) Rename all use of these helpers within the Rails project. > > > > c) Ensure that number the prefixes are KiB, MiB when dividing by > > > > powers of 1024, and using KB, MB when dividing by powers of 1000 > > > > (that is when options[:prefix] => :si) > > > > > > > > 2) (Re)Introduced the posibility to use SI prefix names (meaning powers of 1000) > > > > Introduced SI prefix helpers 2.kilobytes == 2*1000 > > > > > > > > Impact on Rails itself: > > > > None: All the useages has been renamed to use the semantically > > > > equivalent method (that is IEC names). > > > > > > > > Impact on Rails projects: > > > > The use of core extensions 2.kilobytes, 2.megabytes will mean > > > > something else; A power of 1000 in Rails4 as opposed to a power of > > > > 1024 in Rails3. But the old behaviour can still be achieved by using > > > > IEC names instead such as 2.kibibytes or 2.mebibytes. > > > > > > > > Footnotes: > > > > [1] http://en.wikipedia.org/wiki/Binary_prefix > > > > > > > > > > > > Jarl > > > > > > > > -- > > > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > > > > To post to this group, send email to rubyonra...@googlegroups.com (javascript:). > > > > To unsubscribe from this group, send email to rubyonrails-co...@googlegroups.com (javascript:). > > > > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. > > > > > > > > > > -- > > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > > > To post to this group, send email to rubyonra...@googlegroups.com (javascript:). > > > To unsubscribe from this group, send email to rubyonrails-co...@googlegroups.com (javascript:). > > > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/wJjzMH3ga6QJ. > To post to this group, send email to rubyonrails-core@googlegroups.com (mailto:rubyonrails-core@googlegroups.com). > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com (mailto:rubyonrails-core+unsubscribe@googlegroups.com). > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Andrés Mejía
2012-Oct-03 01:45 UTC
Re: Being strict on differentiating between IEC prefixes and SI prefixes.
Thanks Geoff, whatever that means. On Tue, Oct 2, 2012 at 3:19 PM, Geoff Harcourt <geoff.harcourt@gmail.com>wrote:> OK, pushed. I can''t push my own database data up, so I''ll get four > questions up there for you. > > -Geoff > > -- > Geoff Harcourt > > On Tuesday, October 2, 2012 at 4:07 PM, dburry wrote: > > One of the great things I like about rails is not always being tied to > full backwards compatibility causing a more and more bloated core every > major release. In my mind a plugin that puts everything back would solve > that issue, for those who need it. > > That other objection still gives me pause though... I suspect the > difference between IEC and SI units is still not commonly known even among > programmers. So this may not be the right time to do this yet? I dunno, > just my thoughts, I''d be happy either way. > > Just to be clear, this is not just a visual change in prefix, but much a > more basic functional mathematical change of how the units are calculated > and converted too. A mere prefix would be superficial in comparison. > > Dave > > > On Tuesday, October 2, 2012 10:30:30 AM UTC-7, Allen Madsen wrote: > > This pull request poses two problems in my mind. The changes are not > backwards compatible, which could lead to some serious head scratching. > Secondly, even though they''re a standard now, they''re not commonly used, > which leads to more head scrathing. > > Allen Madsen > http://www.allenmadsen.com > > > On Tue, Oct 2, 2012 at 11:52 AM, Andrés Mejía <and...@gmail.com> wrote: > > I''m -1 for this. > > > On Tue, Oct 2, 2012 at 4:53 AM, Jarl Friis <ja...@softace.dk> wrote: > > One of the greatest things about rails is that it is so > standards-compliant, > no other framework that I have seen have complied to the > HTTP standard (think REST) in such a degree that Rails does. Kudos to > you all for that. > > I think we (Rails community) should follow the line of standards > compliance and also > take it to the binary prefixes [1], i.e. kilobytes, megabytes, > etc. For more than half a decade SI units has been a standard > (occupying the prefixes kilo, mega, ...) Since the introduction of > computers the prefixes has been misused in the IT industry for powers > of 1024 but used correctly (for marketing reasons) by storage > manufacturers to mean powers of 1000. > > In 1999 IEC published the new standard for powers of 1024 (known as > binary prefixes[1]). In 2008 this was harmonized with ISO standard in > ISO/IEC IEC 80000-13:2008 > > I think it is a good time (for Rails 4) for Rails to conform to these > standards. That means that every time a power of 1024 is used the IEC > prefixes kibi, mebi, and so on are used and vice versa. Further every > time a power of 1000 is used the SI prefixes are used, that is, kilo, > mega, and so on and vice versa. > > I have created a pull request > (https://github.com/rails/**rails/pull/7819<https://github.com/rails/rails/pull/7819>) > that implements two things > (in two separate commits): > > 1) Rename all use of 1024 to use IEC prefix names > > a) Rename of core extension: 2.kilobytes => 2.kibibyte == 2*1024 > b) Rename all use of these helpers within the Rails project. > c) Ensure that number the prefixes are KiB, MiB when dividing by > powers of 1024, and using KB, MB when dividing by powers of 1000 > (that is when options[:prefix] => :si) > > 2) (Re)Introduced the posibility to use SI prefix names (meaning powers of > 1000) > Introduced SI prefix helpers 2.kilobytes == 2*1000 > > Impact on Rails itself: > None: All the useages has been renamed to use the semantically > equivalent method (that is IEC names). > > Impact on Rails projects: > The use of core extensions 2.kilobytes, 2.megabytes will mean > something else; A power of 1000 in Rails4 as opposed to a power of > 1024 in Rails3. But the old behaviour can still be achieved by using > IEC names instead such as 2.kibibytes or 2.mebibytes. > > Footnotes: > [1] http://en.wikipedia.org/wiki/**Binary_prefix<http://en.wikipedia.org/wiki/Binary_prefix> > > > Jarl > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonra...@googlegroups.**com. > To unsubscribe from this group, send email to rubyonrails-co...@** > googlegroups.com. > For more options, visit this group at http://groups.google.com/** > group/rubyonrails-core?hl=en<http://groups.google.com/group/rubyonrails-core?hl=en> > . > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonra...@googlegroups.**com. > To unsubscribe from this group, send email to rubyonrails-co...@** > googlegroups.com. > For more options, visit this group at http://groups.google.com/** > group/rubyonrails-core?hl=en<http://groups.google.com/group/rubyonrails-core?hl=en> > . > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-core/-/wJjzMH3ga6QJ. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Geoff Harcourt
2012-Oct-03 03:35 UTC
Re: Being strict on differentiating between IEC prefixes and SI prefixes.
So very sorry about that misdirected reply. On Oct 2, 2012, at 9:45 PM, "Andrés Mejía" <andmej@gmail.com> wrote: Thanks Geoff, whatever that means. On Tue, Oct 2, 2012 at 3:19 PM, Geoff Harcourt <geoff.harcourt@gmail.com>wrote:> OK, pushed. I can''t push my own database data up, so I''ll get four > questions up there for you. > > -Geoff > > -- > Geoff Harcourt > > On Tuesday, October 2, 2012 at 4:07 PM, dburry wrote: > > One of the great things I like about rails is not always being tied to > full backwards compatibility causing a more and more bloated core every > major release. In my mind a plugin that puts everything back would solve > that issue, for those who need it. > > That other objection still gives me pause though... I suspect the > difference between IEC and SI units is still not commonly known even among > programmers. So this may not be the right time to do this yet? I dunno, > just my thoughts, I''d be happy either way. > > Just to be clear, this is not just a visual change in prefix, but much a > more basic functional mathematical change of how the units are calculated > and converted too. A mere prefix would be superficial in comparison. > > Dave > > > On Tuesday, October 2, 2012 10:30:30 AM UTC-7, Allen Madsen wrote: > > This pull request poses two problems in my mind. The changes are not > backwards compatible, which could lead to some serious head scratching. > Secondly, even though they''re a standard now, they''re not commonly used, > which leads to more head scrathing. > > Allen Madsen > http://www.allenmadsen.com > > > On Tue, Oct 2, 2012 at 11:52 AM, Andrés Mejía <and...@gmail.com> wrote: > > I''m -1 for this. > > > On Tue, Oct 2, 2012 at 4:53 AM, Jarl Friis <ja...@softace.dk> wrote: > > One of the greatest things about rails is that it is so > standards-compliant, > no other framework that I have seen have complied to the > HTTP standard (think REST) in such a degree that Rails does. Kudos to > you all for that. > > I think we (Rails community) should follow the line of standards > compliance and also > take it to the binary prefixes [1], i.e. kilobytes, megabytes, > etc. For more than half a decade SI units has been a standard > (occupying the prefixes kilo, mega, ...) Since the introduction of > computers the prefixes has been misused in the IT industry for powers > of 1024 but used correctly (for marketing reasons) by storage > manufacturers to mean powers of 1000. > > In 1999 IEC published the new standard for powers of 1024 (known as > binary prefixes[1]). In 2008 this was harmonized with ISO standard in > ISO/IEC IEC 80000-13:2008 > > I think it is a good time (for Rails 4) for Rails to conform to these > standards. That means that every time a power of 1024 is used the IEC > prefixes kibi, mebi, and so on are used and vice versa. Further every > time a power of 1000 is used the SI prefixes are used, that is, kilo, > mega, and so on and vice versa. > > I have created a pull request > (https://github.com/rails/**rails/pull/7819<https://github.com/rails/rails/pull/7819>) > that implements two things > (in two separate commits): > > 1) Rename all use of 1024 to use IEC prefix names > > a) Rename of core extension: 2.kilobytes => 2.kibibyte == 2*1024 > b) Rename all use of these helpers within the Rails project. > c) Ensure that number the prefixes are KiB, MiB when dividing by > powers of 1024, and using KB, MB when dividing by powers of 1000 > (that is when options[:prefix] => :si) > > 2) (Re)Introduced the posibility to use SI prefix names (meaning powers of > 1000) > Introduced SI prefix helpers 2.kilobytes == 2*1000 > > Impact on Rails itself: > None: All the useages has been renamed to use the semantically > equivalent method (that is IEC names). > > Impact on Rails projects: > The use of core extensions 2.kilobytes, 2.megabytes will mean > something else; A power of 1000 in Rails4 as opposed to a power of > 1024 in Rails3. But the old behaviour can still be achieved by using > IEC names instead such as 2.kibibytes or 2.mebibytes. > > Footnotes: > [1] http://en.wikipedia.org/wiki/**Binary_prefix<http://en.wikipedia.org/wiki/Binary_prefix> > > > Jarl > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonra...@googlegroups.**com. > To unsubscribe from this group, send email to rubyonrails-co...@** > googlegroups.com. > For more options, visit this group at http://groups.google.com/** > group/rubyonrails-core?hl=en<http://groups.google.com/group/rubyonrails-core?hl=en> > . > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonra...@googlegroups.**com. > To unsubscribe from this group, send email to rubyonrails-co...@** > googlegroups.com. > For more options, visit this group at http://groups.google.com/** > group/rubyonrails-core?hl=en<http://groups.google.com/group/rubyonrails-core?hl=en> > . > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-core/-/wJjzMH3ga6QJ. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Jarl Friis
2012-Oct-03 09:38 UTC
Re: Being strict on differentiating between IEC prefixes and SI prefixes.
Dear community. Thank you for all your time an feedback on this issue. As a result of your valuable feedback I have opened an issue (https://github.com/rails/rails/issues/7830) describing the issue. I have proposed another much less intrusive and backward compatible pull request (https://github.com/rails/rails/pull/7829) to resolve the notation only. I suggest you comment on the issue or the pull request as you see fit. Thanks in advance. Jarl -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.