comp.lang.ada
 help / color / mirror / Atom feed
From: "Dan'l Miller" <optikos@verizon.net>
Subject: Re: ANN: Units of measurement for Ada v 3.4 released
Date: Tue, 10 Jun 2014 12:13:42 -0700 (PDT)
Date: 2014-06-10T12:13:42-07:00	[thread overview]
Message-ID: <7a3c3540-323f-4dbe-b27a-cc6f89a30a39@googlegroups.com> (raw)
In-Reply-To: <1rcdrvonn5xqi$.kavo0h1m48kk.dlg@40tude.net>

On Monday, June 9, 2014 10:16:59 AM UTC-5, Dmitry A. Kazakov wrote:
> The library provides means to handle dimensioned values in Ada.

Dmitry, have you ever considered expanding your library to include integer, rational, and mixed-radix-positional-numeral-system numbers?    For example, a dozen is a commonplace unit of measure, but what to do with the extra 2 eggs when representing 14 eggs.  Of course, this would be the rational-number case (much like the a b/c functionality on Casio calculators since the early 1980s) where there is an integer portion (a), an integer numerator (b), and an integer denominator (c), where the denominator would be intrinsically 12 for the dozen unit.  From there, mixed-radix positional numbers could be supported as a tuple extrapolation of the a b/c rational-number for, say, 3 gallons 1 quart 1 pint 1 cup 2.5 fluid-ounces in base <Positive, 4, 2, 2, Float> positional numeral system in the proposed functionality of Units of Measure library = 130.5 ounces in the current functionality of Units of Measure library.  From there, mixed-radix positional numeral systems can be defined for various discrete-mathematics problemspaces, such as IEC 60027-2 Amendment 2 and IEEE1541 binary prefixes kibi, mebi, gibi, tebi, and so forth for DRAM as well as conversion to SI kilo, mega, giga, tera, and so forth for spinning mass-storage and teledatacom bandwidth.

Then, from there, time durations could be supported:  4 score 7 years ago or the deceased is aged 72 years 4 months 10 days 6 hours 17 minutes 33.3 seconds, where the base positional-numeral system varies by start-date, due to varying lengths of months and due to leap days & leap seconds.  Then, from there, full calendrical calculations could be added for various currently-in-effect calendars.  Then, from there, proleptic & anachronistic usage of calendars before & after of their intended time period could be added.  And then, :-) you are at version 17 of your library.  It would be an interesting roadmap-arc over several years.  Also, revealing which severe roadblocks (if any) that you hit using Ada2012 in bringing this library to fruition as this flower blossoms would be interesting to fix in Ada202X.

In C++, Boost has served as a most-excllent stressor that motivates the standardization of C++2011 and C++2014.  (Yes, I know, the C++ community drops the century for C++1x/C++11 and C+1y/C++14 as if the Y2K problem never occurred.)  Informally & formally reporting obstacles in writing useful libraries to the language-standardization people can light the fires for change quite tangibly.  Note however Boost libraries distorted modern C++ by institutionalizing metatemplate programming (MTP, via Turing-completeness of their equivalent of Ada generics to form a [disgusting] poor-man's functional-programming language).  In Boost and Loki, these MTP libraries were not viewed as demonstration of how disgusting the technique was to motivate a better solution in language evolution.  Rather a derivative form of some of these MTP libraries in Boost were officially standardized or effectively quasi-standardized as technical reports.  So, Boost should not be mimicked line-by-line or package-by-package, but the general pressure that a de facto standard library development can bring to bear on the syntax & semantics of the language itself can be quite valuable.


  reply	other threads:[~2014-06-10 19:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-09 15:16 ANN: Units of measurement for Ada v 3.4 released Dmitry A. Kazakov
2014-06-10 19:13 ` Dan'l Miller [this message]
2014-06-11  9:37   ` Dmitry A. Kazakov
2014-06-11 18:25     ` Dan'l Miller
2014-06-11 19:32       ` Dmitry A. Kazakov
2014-06-11 20:17         ` Dan'l Miller
2014-06-11 21:29           ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox