From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on ip-172-31-74-118.ec2.internal X-Spam-Level: * X-Spam-Status: No, score=1.0 required=3.0 tests=BAYES_20,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a0c:bda0:: with SMTP id n32mr15399900qvg.164.1593433364112; Mon, 29 Jun 2020 05:22:44 -0700 (PDT) X-Received: by 2002:aca:5dc2:: with SMTP id r185mr10893187oib.122.1593433363897; Mon, 29 Jun 2020 05:22:43 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 29 Jun 2020 05:22:43 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=101.190.157.204; posting-account=wavAeAoAAAAZF_sXSZepBukuPCBO0Zqt NNTP-Posting-Host: 101.190.157.204 References: <5ef9712d$0$1221$e4fe514c@news.kpn.nl> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Hardware independent programming From: alby.gamper@gmail.com Injection-Date: Mon, 29 Jun 2020 12:22:44 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:59247 List-Id: On Monday, June 29, 2020 at 7:07:45 PM UTC+10, Niklas Holsti wrote: > On 2020-06-29 7:42, ldries46 wrote: > > Hardware can in some cases have limits you have to consider when writin= g=20 > > a program. > > =C2=A0At this moment I can mention three: > >=20 > > 1. The printer. The format of the documents you want to print must fit > > =C2=A0=C2=A0 on the printers available to the user. In general the pro= blem is > > =C2=A0=C2=A0 solved by the possibility of printer drivers to shrink yo= u document > > =C2=A0=C2=A0 f.i. from A4 to A4 or saving the document to a file that = can be > > =C2=A0=C2=A0 printed elsewhere. >=20 > Such info belongs in a text-formatting library (possibly part of a GUI=20 > library). I would welcome a standard definition of "type text" that=20 > would include some formatting structures (perhaps semantically similar=20 > to HTML formatting) but I think it would (and should) be low in priority= =20 > for language standardization. For now, we can hope that some=20 > community-supported library becomes a de-facto standard. >=20 > > 2. The monitor on the system your program is running. >=20 > Such info belongs in a GUI library. GUI functions do not belong in the=20 > Ada standard, IMO. >=20 > > 3. The available memory. Your program will in some cases need to know > > =C2=A0=C2=A0 the limits to which the heap stretches within the memory = (in cases > > =C2=A0=C2=A0 where it is necessary=C2=A0 to use very large bulks of da= ta). For > > =C2=A0=C2=A0 operating systems that have the possibility to stretch th= e heap with > > =C2=A0=C2=A0 a part on disc both boundaries (with and without disc dat= a) are of > > =C2=A0=C2=A0 interest. >=20 > Something like that might be suitable for the Ada standard, to cater for= =20 > the (few) programs that could adjust their memory usage to reduce the=20 > risk of thrashing, for example. >=20 > However, a description of the memory HW could easily balloon to a=20 > cumbersome size and complexity if it should reflect the full memory=20 > architecture, such as the sizes of all cache levels, the structure of=20 > the caches (line length, associativity, etc.), the presence of per-core= =20 > caches or cache partititions, the presence of memories of different=20 > types/speeds/sizes, the presence of several memory interfaces and=20 > controllers, the paging/swapping methods, etc. >=20 > Even if something could be defined now for all of that, it might quickly= =20 > become obsolete as computer HW continues to evolve. >=20 > --=20 > Niklas Holsti > niklas holsti tidorum fi > . @ . Hi Niklas I agree with you point 3) on memory availability! MS Windows and I am sure Linux have Api's available to surface this to Ada. What may become somewhat problematic is in the embedded OS/RTOS environments like RTEMS etc.. Happy to contribute to a high level spec and implement for MS Windows Alex