From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.232.229 with SMTP id tr5mr3694752pac.16.1402427622685; Tue, 10 Jun 2014 12:13:42 -0700 (PDT) X-Received: by 10.182.20.204 with SMTP id p12mr81119obe.29.1402427622347; Tue, 10 Jun 2014 12:13:42 -0700 (PDT) Path: border2.nntp.dca1.giganews.com!buffer2.nntp.dca1.giganews.com!border2.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!a13no785093igq.0!news-out.google.com!qf4ni19597igc.0!nntp.google.com!a13no785085igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 10 Jun 2014 12:13:42 -0700 (PDT) In-Reply-To: <1rcdrvonn5xqi$.kavo0h1m48kk.dlg@40tude.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=71.252.147.203; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 71.252.147.203 References: <1rcdrvonn5xqi$.kavo0h1m48kk.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7a3c3540-323f-4dbe-b27a-cc6f89a30a39@googlegroups.com> Subject: Re: ANN: Units of measurement for Ada v 3.4 released From: "Dan'l Miller" Injection-Date: Tue, 10 Jun 2014 19:13:42 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 4797 Xref: number.nntp.dca.giganews.com comp.lang.ada:186811 Date: 2014-06-10T12:13:42-07:00 List-Id: 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 exampl= e, 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-nu= mber 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 intrinsi= cally 12 for the dozen unit. From there, mixed-radix positional numbers co= uld 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 positional numeral system in the proposed functionality of Un= its of Measure library =3D 130.5 ounces in the current functionality of Uni= ts 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, an= d 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 o= r the deceased is aged 72 years 4 months 10 days 6 hours 17 minutes 33.3 se= conds, where the base positional-numeral system varies by start-date, due t= o varying lengths of months and due to leap days & leap seconds. Then, fro= m 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. An= d then, :-) you are at version 17 of your library. It would be an interest= ing roadmap-arc over several years. Also, revealing which severe roadblock= s (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 sta= ndardization 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 occ= urred.) Informally & formally reporting obstacles in writing useful librar= ies to the language-standardization people can light the fires for change q= uite tangibly. Note however Boost libraries distorted modern C++ by instit= utionalizing metatemplate programming (MTP, via Turing-completeness of thei= r equivalent of Ada generics to form a [disgusting] poor-man's functional-p= rogramming language). In Boost and Loki, these MTP libraries were not view= ed as demonstration of how disgusting the technique was to motivate a bette= r solution in language evolution. Rather a derivative form of some of thes= e MTP libraries in Boost were officially standardized or effectively quasi-= standardized as technical reports. So, Boost should not be mimicked line-b= y-line or package-by-package, but the general pressure that a de facto stan= dard library development can bring to bear on the syntax & semantics of the= language itself can be quite valuable.