comp.lang.ada
 help / color / mirror / Atom feed
From: "Dan'l Miller" <optikos@verizon.net>
Subject: Re: AI12-0218:  What is the portable representation clause for processing IETF packets on little-endian machines?
Date: Sun, 27 May 2018 11:04:00 -0700 (PDT)
Date: 2018-05-27T11:04:00-07:00	[thread overview]
Message-ID: <8b3dc953-4720-4226-a4a8-9166f31a394f@googlegroups.com> (raw)
In-Reply-To: <a9f11f94-401d-44ef-9e78-21231bedd434@googlegroups.com>

On Sunday, May 27, 2018 at 9:58:57 AM UTC-5, AdaMagica wrote:
> Am Samstag, 26. Mai 2018 23:01:28 UTC+2 schrieb Dan'l Miller:
> > On Saturday, May 26, 2018 at 2:02:12 PM UTC-5, AdaMagica wrote:
> > > Am Samstag, 26. Mai 2018 18:15:30 UTC+2 schrieb Dan'l Miller:
> > > > Why is Norman Cohen's solution in the PDF at the URL below not the way for the ARG to merely dismiss AI12-0218 as not-a-problem that needs to be solved, due to already having a solution ever since Record Representation Clause was introduced.
> > > >
> 
> If you look at the last post in this AI, nobody is willing to work on it. And if I remember correctly, Randy once said that nobody except the author of the AI understands it.

There is a chance that the ARG is slow-walking AI12-0218 because of the political difficulty to tell AdaCore that there already existed a solution to the problem as of Ada2005, and that Scalar_Storage_Order was the 2nd solution to the problem, not the first.

Given that the 1st solution already exists in standard Ada2005 (except for the finishing-touch topic below) and that the Scalar_Storage_Order obviously* is nontrivial to implement, I am baffled why the ARG doesn't definitively reject or kill off AI12-0218 with stronger language.

* by both the AI's expansive touch-lots-of-stuff content and Randy's analogous that-would-wreak-lots-of-havoc-in-Janus-Ada's-source-code general response

> > > > http://www.ada-auth.org/ai-files/grab_bag/bitorder.pdf
> > > 
> > > This is what has been implemented in Ada 2005. See my post of May 11.
> > 
> > Yes, I know.  It seems that AI12-0218 and Scalar_Storage_Order are focused on the wrong topic (i.e., the topic of a 2nd solution to the endian byte-swapping).  A replacement to AI12-0218 should be focused on •portably• (among all Ada compilers) choosing between the 2 alternative byte-swapping Record Representation Clauses on different targets.
> 
> I do not understand. As far as I can tell, the Ada 2005 solution with its machine scalars is portable.

Yes, the 2 alternative Record Representation Clauses themselves are perfectly portable (because they are in fact syntax in ISO standard Ada).

What is not portable (due to the •lack• of being syntax in ISO standard Ada) is the build-time cleverness to choose one child package (containing one of the two) versus another child package (containing the other of the two) on a per-target/per-ISA basis.  That language-undefined** selectivity is (needlessly) peculiar** to each Ada compiler's build tool.  I am pretty sure that,—if Jean Ichbiah were alive today to see this state of affairs on AI12-0218 vis a vis Norman Cohen's use-3-existing-Ada-features-together-as-they-are-already-designed pedagogical paper,—he'd say that the choice of child package to elaborate/use for this target should be overt Ada-language syntax.  I'm pretty sure that he say that it should not be some nonportable gotchya afterthought in gprbuild or other outside-of-Ada syntax/toolset that is peculiar (differently!) to each Ada toolchain.

** in roughly the same “undefined behavior” ballpark conceptually as ISO standard C++'s historical lack of control on elaboration order of libraries/objects for what C++ calls static instances.  Usually Ada cares passionately about eliminating target-specific undefined-in-the-language behavior, but, in this case of portably choosing between alternative child packages based on target/ISA via standard Ada syntax (pragma or aspect or otherwise), not so much.

      parent reply	other threads:[~2018-05-27 18:04 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 17:45 AI12-0218: What is the portable representation clause for processing IETF packets on little-endian machines? Dan'l Miller
2018-05-10 19:24 ` Dan'l Miller
2018-05-10 20:32   ` Paul Rubin
2018-05-10 22:24     ` Dan'l Miller
2018-05-10 22:44       ` Niklas Holsti
2018-05-10 23:14         ` Paul Rubin
2018-05-11  2:38         ` Dan'l Miller
2018-05-11  7:55           ` Simon Wright
2018-05-11 12:11             ` Lucretia
2018-05-11 13:49               ` Simon Wright
2018-05-11 16:11                 ` Jeffrey R. Carter
2018-05-11 16:48                   ` Simon Wright
2018-05-11 19:08                     ` Jeffrey R. Carter
2018-05-11 21:39                       ` Simon Wright
2018-05-11 21:56                         ` Jeffrey R. Carter
2018-05-12  7:08                           ` Simon Wright
2018-05-12  7:53                             ` Jeffrey R. Carter
2018-05-14 22:43                             ` Randy Brukardt
2018-05-11 13:46             ` Simon Wright
2018-05-11 22:12           ` Randy Brukardt
2018-05-12 10:33             ` Björn Lundin
2018-05-12 13:08               ` Simon Wright
2018-05-12 14:21                 ` Björn Lundin
2018-05-10 23:07       ` Paul Rubin
2018-05-11  0:14         ` Dan'l Miller
2018-05-11  0:30           ` Paul Rubin
2018-05-11  0:50             ` Dan'l Miller
2018-05-11  1:34               ` Paul Rubin
2018-05-11  2:11                 ` Dan'l Miller
2018-05-11 22:32                   ` Randy Brukardt
2018-05-11  8:02         ` Simon Wright
2018-05-11 22:14         ` Randy Brukardt
2018-05-10 19:28 ` Simon Wright
2018-05-10 22:40   ` Randy Brukardt
2018-05-10 22:50     ` Dan'l Miller
2018-05-11 22:00       ` Randy Brukardt
2018-05-12  1:15         ` Paul Rubin
2018-05-14 22:54           ` Randy Brukardt
2018-05-15  0:43             ` Paul Rubin
2018-05-15 21:39               ` Randy Brukardt
2018-05-15  0:44             ` Dennis Lee Bieber
2018-05-11  8:09     ` Simon Wright
2018-05-10 19:34 ` Dmitry A. Kazakov
2018-05-10 20:06   ` Dan'l Miller
2018-05-10 22:44     ` Paul Rubin
2018-05-10 22:50     ` Randy Brukardt
2018-05-11  9:40       ` Niklas Holsti
2018-05-11 11:40         ` Dan'l Miller
2018-05-11 20:16           ` Niklas Holsti
2018-05-11  9:40     ` Dmitry A. Kazakov
2018-05-11 14:21 ` AdaMagica
2018-05-26 16:15 ` Dan'l Miller
2018-05-26 19:02   ` AdaMagica
2018-05-26 21:01     ` Dan'l Miller
2018-05-27 14:58       ` AdaMagica
2018-05-27 18:03         ` Simon Wright
2018-05-29 22:17           ` Randy Brukardt
2018-05-30  6:39             ` Simon Wright
2018-05-30  7:25               ` Dmitry A. Kazakov
2018-05-30 15:01                 ` Simon Wright
2018-05-30 15:59                   ` Dan'l Miller
2018-05-30 19:38               ` Randy Brukardt
2018-05-27 18:04         ` Dan'l Miller [this message]
replies disabled

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