Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

The core is not frozen, but slushy. -- Larry Wall in <199705101952.MAA00756@wall.org>


devel / comp.lang.ada / Re: Parameterised 'Image Attributes

SubjectAuthor
* Parameterised 'Image AttributesRod Kay
+* Re: Parameterised 'Image AttributesLuke A. Guest
|`* Re: Parameterised 'Image AttributesJ-P. Rosen
| +* Re: Parameterised 'Image AttributesDmitry A. Kazakov
| |+- Re: Parameterised 'Image AttributesLuke A. Guest
| |`* Re: Parameterised 'Image AttributesJ-P. Rosen
| | `- Re: Parameterised 'Image AttributesDmitry A. Kazakov
| +* Re: Parameterised 'Image AttributesJeffrey R.Carter
| |`* Re: Parameterised 'Image AttributesG.B.
| | `* Re: Parameterised 'Image AttributesDmitry A. Kazakov
| |  +- Re: Parameterised 'Image AttributesRandy Brukardt
| |  `* Re: Parameterised 'Image AttributesRandy Brukardt
| |   `- Re: Parameterised 'Image AttributesDmitry A. Kazakov
| `* Re: Parameterised 'Image Attributesmoi
|  `* Re: Parameterised 'Image AttributesRandy Brukardt
|   `* Re: Parameterised 'Image AttributesDmitry A. Kazakov
|    `* Re: Parameterised 'Image AttributesRandy Brukardt
|     `* Re: Parameterised 'Image AttributesDmitry A. Kazakov
|      `* Re: Parameterised 'Image AttributesStephen Davies
|       `* Re: Parameterised 'Image AttributesDmitry A. Kazakov
|        `* Re: Parameterised 'Image AttributesStephen Davies
|         `* Re: Parameterised 'Image AttributesDmitry A. Kazakov
|          `* Re: Parameterised 'Image AttributesStephen Davies
|           `* Re: Parameterised 'Image AttributesDmitry A. Kazakov
|            `* Re: Parameterised 'Image AttributesStephen Davies
|             `* Re: Parameterised 'Image AttributesDmitry A. Kazakov
|              +* Re: Parameterised 'Image AttributesStephen Davies
|              |`* Re: Parameterised 'Image AttributesDmitry A. Kazakov
|              | `* Re: Parameterised 'Image AttributesG.B.
|              |  `- Re: Parameterised 'Image AttributesDmitry A. Kazakov
|              +* Re: Parameterised 'Image AttributesNiklas Holsti
|              |`- Re: Parameterised 'Image AttributesDmitry A. Kazakov
|              `* Re: Parameterised 'Image AttributesRandy Brukardt
|               `- Re: Parameterised 'Image AttributesDmitry A. Kazakov
+- Re: Parameterised 'Image AttributesKeith Thompson
`* Re: Parameterised 'Image AttributesRod Kay
 `* Re: Parameterised 'Image AttributesVadim Godunko
  `- Re: Parameterised 'Image AttributesRod Kay

Pages:12
Re: Parameterised 'Image Attributes

<ad349fba-9bf9-4a3c-9abb-7e082bd8ef7an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9966&group=comp.lang.ada#9966

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:6404:b0:76f:17db:6fc5 with SMTP id pz4-20020a05620a640400b0076f17db6fc5mr24290qkn.10.1693214317686;
Mon, 28 Aug 2023 02:18:37 -0700 (PDT)
X-Received: by 2002:a81:a845:0:b0:58c:b5a4:8e1f with SMTP id
f66-20020a81a845000000b0058cb5a48e1fmr918196ywh.3.1693214317496; Mon, 28 Aug
2023 02:18:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.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, 28 Aug 2023 02:18:37 -0700 (PDT)
In-Reply-To: <uca8pu$1lse$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=205.239.40.3; posting-account=YRfoYAoAAADhSEO2nLYx10QUUvp8akYl
NNTP-Posting-Host: 205.239.40.3
References: <ubn5un$5tvt$1@dont-email.me> <ubn9u8$6fup$1@dont-email.me>
<ubq15l$oa8i$1@dont-email.me> <kkca55F9sn7U1@mid.individual.net>
<ubsf4e$19bvo$1@dont-email.me> <ubsn75$1a024$2@dont-email.me>
<uc0sae$23f5l$1@dont-email.me> <uc1qnq$2anmi$2@dont-email.me>
<4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com> <uc5bc8$3072a$1@dont-email.me>
<d75e72ad-0f5b-49c3-8cbf-630136a8a7a5n@googlegroups.com> <uc9l2b$3u0pe$1@dont-email.me>
<41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com> <uca8pu$1lse$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ad349fba-9bf9-4a3c-9abb-7e082bd8ef7an@googlegroups.com>
Subject: Re: Parameterised 'Image Attributes
From: joviangm@gmail.com (Stephen Davies)
Injection-Date: Mon, 28 Aug 2023 09:18:37 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Stephen Davies - Mon, 28 Aug 2023 09:18 UTC

On Friday, 25 August 2023 at 14:02:57 UTC+1, Dmitry A. Kazakov wrote:
> On 2023-08-25 11:04, Stephen Davies wrote:
> The proposal was to add parameters defaulted to the existing behavior.
> Year'Image (Plus=>None,Width=>4,Alignment=>Right,Padding=>'0')
>
> > So the programmer could use 'User_Image to generate a display string
> > that will be formatted to the users preferences without knowing
> > (or being able to make assumptions about) those preferences,
> > e.g. Put_Line ("The result is " & Result'User_Image)
> This will be rejected on the same grounds as the original proposal.
> Read Randy's response.
I did read Randy's response, he explained the difficulty in adding
parameters to 'Image, so I suggested an alternative parameter-less
attribute. You could allow the output of this attribute to be
configurable by either some package data (c.f. Text_IO.Default_Width)
and/or by the OS. To be honest, all I really want is an attribute that
any Ada program can use to get a string suitable for output to its
users, i.e no leading space and exponentiation only used when needed.

Re: Parameterised 'Image Attributes

<uchukd$1lnvp$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9967&group=comp.lang.ada#9967

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mailbox@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Parameterised 'Image Attributes
Date: Mon, 28 Aug 2023 12:58:23 +0200
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <uchukd$1lnvp$1@dont-email.me>
References: <ubn5un$5tvt$1@dont-email.me> <ubn9u8$6fup$1@dont-email.me>
<ubq15l$oa8i$1@dont-email.me> <kkca55F9sn7U1@mid.individual.net>
<ubsf4e$19bvo$1@dont-email.me> <ubsn75$1a024$2@dont-email.me>
<uc0sae$23f5l$1@dont-email.me> <uc1qnq$2anmi$2@dont-email.me>
<4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com>
<uc5bc8$3072a$1@dont-email.me>
<d75e72ad-0f5b-49c3-8cbf-630136a8a7a5n@googlegroups.com>
<uc9l2b$3u0pe$1@dont-email.me>
<41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com>
<uca8pu$1lse$1@dont-email.me>
<ad349fba-9bf9-4a3c-9abb-7e082bd8ef7an@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 28 Aug 2023 10:58:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5a879763e13e5c6e904f542db0b53b64";
logging-data="1761273"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/uMcvM6SaByn6h9UzBOP0/q8deux77MU="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:ULq6BPf+uRm21BXvR5XVUBZooIM=
In-Reply-To: <ad349fba-9bf9-4a3c-9abb-7e082bd8ef7an@googlegroups.com>
Content-Language: en-US
 by: Dmitry A. Kazakov - Mon, 28 Aug 2023 10:58 UTC

On 2023-08-28 11:18, Stephen Davies wrote:

> I did read Randy's response, he explained the difficulty in adding
> parameters to 'Image,

He rather explained that this will never happen... (:-))

There is no good reason why attributes should not have the same
parameter syntax as subprograms and entry calls. Neither there is one
why 'Image must be a non-overridable attribute or why different classes
of types must have same parameter lists in their 'Image.

> so I suggested an alternative parameter-less
> attribute. You could allow the output of this attribute to be
> configurable by either some package data (c.f. Text_IO.Default_Width)
> and/or by the OS. To be honest, all I really want is an attribute that
> any Ada program can use to get a string suitable for output to its
> users, i.e no leading space and exponentiation only used when needed.

This will not happen either. But here I would agree, it is clearly a
case of language littering.

However see the GNAT-specific 'Img attribute. For debugging purposes it
does not add space where 'Image also for debugging purposes adds! (:-))

As Chairman Mao used to say: "In a word, while the prospects are bright,
the road has twists and turns." (:-))

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Parameterised 'Image Attributes

<12fb20e0-8fc7-4eec-a959-e94fd3106976n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9968&group=comp.lang.ada#9968

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:40f:b0:76d:7a99:9b33 with SMTP id 15-20020a05620a040f00b0076d7a999b33mr799205qkp.1.1693237360497;
Mon, 28 Aug 2023 08:42:40 -0700 (PDT)
X-Received: by 2002:a63:930c:0:b0:56f:9c2d:b6b3 with SMTP id
b12-20020a63930c000000b0056f9c2db6b3mr2660775pge.1.1693237359885; Mon, 28 Aug
2023 08:42:39 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Mon, 28 Aug 2023 08:42:39 -0700 (PDT)
In-Reply-To: <uchukd$1lnvp$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=205.239.40.3; posting-account=YRfoYAoAAADhSEO2nLYx10QUUvp8akYl
NNTP-Posting-Host: 205.239.40.3
References: <ubn5un$5tvt$1@dont-email.me> <ubn9u8$6fup$1@dont-email.me>
<ubq15l$oa8i$1@dont-email.me> <kkca55F9sn7U1@mid.individual.net>
<ubsf4e$19bvo$1@dont-email.me> <ubsn75$1a024$2@dont-email.me>
<uc0sae$23f5l$1@dont-email.me> <uc1qnq$2anmi$2@dont-email.me>
<4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com> <uc5bc8$3072a$1@dont-email.me>
<d75e72ad-0f5b-49c3-8cbf-630136a8a7a5n@googlegroups.com> <uc9l2b$3u0pe$1@dont-email.me>
<41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com> <uca8pu$1lse$1@dont-email.me>
<ad349fba-9bf9-4a3c-9abb-7e082bd8ef7an@googlegroups.com> <uchukd$1lnvp$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <12fb20e0-8fc7-4eec-a959-e94fd3106976n@googlegroups.com>
Subject: Re: Parameterised 'Image Attributes
From: joviangm@gmail.com (Stephen Davies)
Injection-Date: Mon, 28 Aug 2023 15:42:40 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2214
 by: Stephen Davies - Mon, 28 Aug 2023 15:42 UTC

On Monday, 28 August 2023 at 11:58:24 UTC+1, Dmitry A. Kazakov wrote:
> On 2023-08-28 11:18, Stephen Davies wrote:
> This will not happen either. But here I would agree, it is clearly a
> case of language littering.

Littering, schmittering, how about adding Bin_Image, Oct_Image & Hex_Image
for Ints and Dec_Image for Ints & Reals ;-)

> However see the GNAT-specific 'Img attribute. For debugging purposes it
> does not add space where 'Image also for debugging purposes adds! (:-))

Unless this changed recently, 'Img also adds a leading space.

Re: Parameterised 'Image Attributes

<ucigqt$1p1fm$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9969&group=comp.lang.ada#9969

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mailbox@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Parameterised 'Image Attributes
Date: Mon, 28 Aug 2023 18:09:03 +0200
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <ucigqt$1p1fm$1@dont-email.me>
References: <ubn5un$5tvt$1@dont-email.me> <ubn9u8$6fup$1@dont-email.me>
<ubq15l$oa8i$1@dont-email.me> <kkca55F9sn7U1@mid.individual.net>
<ubsf4e$19bvo$1@dont-email.me> <ubsn75$1a024$2@dont-email.me>
<uc0sae$23f5l$1@dont-email.me> <uc1qnq$2anmi$2@dont-email.me>
<4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com>
<uc5bc8$3072a$1@dont-email.me>
<d75e72ad-0f5b-49c3-8cbf-630136a8a7a5n@googlegroups.com>
<uc9l2b$3u0pe$1@dont-email.me>
<41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com>
<uca8pu$1lse$1@dont-email.me>
<ad349fba-9bf9-4a3c-9abb-7e082bd8ef7an@googlegroups.com>
<uchukd$1lnvp$1@dont-email.me>
<12fb20e0-8fc7-4eec-a959-e94fd3106976n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 28 Aug 2023 16:09:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5a879763e13e5c6e904f542db0b53b64";
logging-data="1869302"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/loM3hgsqbzWikiQJgknxt3aEy6vZEvGY="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:RizlAFe/kBbySEF0/pk4eVAFuVQ=
Content-Language: en-US
In-Reply-To: <12fb20e0-8fc7-4eec-a959-e94fd3106976n@googlegroups.com>
 by: Dmitry A. Kazakov - Mon, 28 Aug 2023 16:09 UTC

On 2023-08-28 17:42, Stephen Davies wrote:
> On Monday, 28 August 2023 at 11:58:24 UTC+1, Dmitry A. Kazakov wrote:
>> On 2023-08-28 11:18, Stephen Davies wrote:
>> This will not happen either. But here I would agree, it is clearly a
>> case of language littering.
>
> Littering, schmittering, how about adding Bin_Image, Oct_Image & Hex_Image
> for Ints and Dec_Image for Ints & Reals ;-)

Bin_Width_1_Image, Dec_Width_4_Image and so on... Cool, make Ada C
again! (:-))

>> However see the GNAT-specific 'Img attribute. For debugging purposes it
>> does not add space where 'Image also for debugging purposes adds! (:-))
>
> Unless this changed recently, 'Img also adds a leading space.

I see, the same mess then...

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Parameterised 'Image Attributes

<ucilpv$1psc9$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9970&group=comp.lang.ada#9970

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bauhaus@notmyhomepage.invalid (G.B.)
Newsgroups: comp.lang.ada
Subject: Re: Parameterised 'Image Attributes
Date: Mon, 28 Aug 2023 19:33:51 +0200
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <ucilpv$1psc9$1@dont-email.me>
References: <ubn5un$5tvt$1@dont-email.me> <ubn9u8$6fup$1@dont-email.me>
<ubq15l$oa8i$1@dont-email.me> <kkca55F9sn7U1@mid.individual.net>
<ubsf4e$19bvo$1@dont-email.me> <ubsn75$1a024$2@dont-email.me>
<uc0sae$23f5l$1@dont-email.me> <uc1qnq$2anmi$2@dont-email.me>
<4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com>
<uc5bc8$3072a$1@dont-email.me>
<d75e72ad-0f5b-49c3-8cbf-630136a8a7a5n@googlegroups.com>
<uc9l2b$3u0pe$1@dont-email.me>
<41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com>
<uca8pu$1lse$1@dont-email.me>
<ad349fba-9bf9-4a3c-9abb-7e082bd8ef7an@googlegroups.com>
<uchukd$1lnvp$1@dont-email.me>
<12fb20e0-8fc7-4eec-a959-e94fd3106976n@googlegroups.com>
<ucigqt$1p1fm$1@dont-email.me>
Reply-To: nonlegitur@notmyhomepage.de
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 28 Aug 2023 17:33:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3c5e9903db99d4ad46ab990cd8570d87";
logging-data="1896841"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19FNsFsFLy44altKXtI9GGRjc7Ot4BM9w8="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.14.0
Cancel-Lock: sha1:xdnx95lqBmWXkm8kkWufRAZlSp0=
In-Reply-To: <ucigqt$1p1fm$1@dont-email.me>
Content-Language: en-US
 by: G.B. - Mon, 28 Aug 2023 17:33 UTC

On 28.08.23 18:09, Dmitry A. Kazakov wrote:
> On 2023-08-28 17:42, Stephen Davies wrote:
>> On Monday, 28 August 2023 at 11:58:24 UTC+1, Dmitry A. Kazakov wrote:
>>> On 2023-08-28 11:18, Stephen Davies wrote:
>>> This will not happen either. But here I would agree, it is clearly a
>>> case of language littering.
>>
>> Littering, schmittering, how about adding Bin_Image, Oct_Image & Hex_Image
>> for Ints and Dec_Image for Ints & Reals ;-)
>
> Bin_Width_1_Image, Dec_Width_4_Image and so on... Cool, make Ada C again! (:-))

Or maybe leave type attributes alone. Instead, let Ada.Streams
have I/O manipulating setters.

Then, in order to preserve the meaning of "corresponding S'Output"
(LRM 13.13.2) for every S'Input, add AI to the Ada run-time system.

Re: Parameterised 'Image Attributes

<kl45hlF7jupU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9971&group=comp.lang.ada#9971

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.holsti@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.lang.ada
Subject: Re: Parameterised 'Image Attributes
Date: Mon, 28 Aug 2023 20:58:13 +0300
Organization: Tidorum Ltd
Lines: 26
Message-ID: <kl45hlF7jupU1@mid.individual.net>
References: <ubn5un$5tvt$1@dont-email.me> <ubn9u8$6fup$1@dont-email.me>
<ubq15l$oa8i$1@dont-email.me> <kkca55F9sn7U1@mid.individual.net>
<ubsf4e$19bvo$1@dont-email.me> <ubsn75$1a024$2@dont-email.me>
<uc0sae$23f5l$1@dont-email.me> <uc1qnq$2anmi$2@dont-email.me>
<4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com>
<uc5bc8$3072a$1@dont-email.me>
<d75e72ad-0f5b-49c3-8cbf-630136a8a7a5n@googlegroups.com>
<uc9l2b$3u0pe$1@dont-email.me>
<41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com>
<uca8pu$1lse$1@dont-email.me>
<ad349fba-9bf9-4a3c-9abb-7e082bd8ef7an@googlegroups.com>
<uchukd$1lnvp$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net xwg9GytBwKG2SqWjU6FWeQCTkbpH0JezPWWim2cMLM6paYLtWR
Cancel-Lock: sha1:1OOupYUYFSdbgjwd3NbevJb9HEA= sha256:8tzQXfIlK0FD1soR4XKiVe9e3zkKxjdcXljh1FhhI9Y=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0)
Gecko/20100101 Thunderbird/102.12.0
Content-Language: en-US
In-Reply-To: <uchukd$1lnvp$1@dont-email.me>
 by: Niklas Holsti - Mon, 28 Aug 2023 17:58 UTC

On 2023-08-28 13:58, Dmitry A. Kazakov wrote:
> On 2023-08-28 11:18, Stephen Davies wrote:
>
>> I did read Randy's response, he explained the difficulty in adding
>> parameters to 'Image,
>
> He rather explained that this will never happen... (:-))
>
> There is no good reason why attributes should not have the same
> parameter syntax as subprograms and entry calls.

Yes in principle, but it is understandble that making this happen now
could impact both the language definition and various implementations in
non-trivial ways.

> Neither there is one
> why 'Image must be a non-overridable attribute

In Ada 2022, 'Image is defined to call the new attribute 'Put_Image,
which can be specified (ie. overridden) by the programmer for any type.

See http://www.ada-auth.org/standards/22rm/html/RM-4-10.html.

Re: Parameterised 'Image Attributes

<uciran$1qtv1$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9972&group=comp.lang.ada#9972

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mailbox@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Parameterised 'Image Attributes
Date: Mon, 28 Aug 2023 21:08:10 +0200
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <uciran$1qtv1$1@dont-email.me>
References: <ubn5un$5tvt$1@dont-email.me> <ubn9u8$6fup$1@dont-email.me>
<ubq15l$oa8i$1@dont-email.me> <kkca55F9sn7U1@mid.individual.net>
<ubsf4e$19bvo$1@dont-email.me> <ubsn75$1a024$2@dont-email.me>
<uc0sae$23f5l$1@dont-email.me> <uc1qnq$2anmi$2@dont-email.me>
<4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com>
<uc5bc8$3072a$1@dont-email.me>
<d75e72ad-0f5b-49c3-8cbf-630136a8a7a5n@googlegroups.com>
<uc9l2b$3u0pe$1@dont-email.me>
<41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com>
<uca8pu$1lse$1@dont-email.me>
<ad349fba-9bf9-4a3c-9abb-7e082bd8ef7an@googlegroups.com>
<uchukd$1lnvp$1@dont-email.me> <kl45hlF7jupU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 28 Aug 2023 19:08:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5a879763e13e5c6e904f542db0b53b64";
logging-data="1931233"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+h0hr4FXdBlaUTgEFfceBv1UmxT5rbnb4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:Yog+/mQuQWY7/SJuytpZiQf6vSg=
Content-Language: en-US
In-Reply-To: <kl45hlF7jupU1@mid.individual.net>
 by: Dmitry A. Kazakov - Mon, 28 Aug 2023 19:08 UTC

On 2023-08-28 19:58, Niklas Holsti wrote:
> On 2023-08-28 13:58, Dmitry A. Kazakov wrote:
>> On 2023-08-28 11:18, Stephen Davies wrote:
>>
>>> I did read Randy's response, he explained the difficulty in adding
>>> parameters to 'Image,
>>
>> He rather explained that this will never happen... (:-))
>>
>> There is no good reason why attributes should not have the same
>> parameter syntax as subprograms and entry calls.
>
> Yes in principle, but it is understandble that making this happen now
> could impact both the language definition and various implementations in
> non-trivial ways.

Comparing to the useless and damaging sediments the language collects
with each new release? (:-))

>> Neither there is one why 'Image must be a non-overridable attribute
>
> In Ada 2022, 'Image is defined to call the new attribute 'Put_Image,
> which can be specified (ie. overridden) by the programmer for any type.
>
> See http://www.ada-auth.org/standards/22rm/html/RM-4-10.html.

Ah, thanks. I vaguely remembered that there was a yet another ugly hack
that does not really solves anything significant, but could not find it.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Parameterised 'Image Attributes

<ucirat$1qtv1$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9973&group=comp.lang.ada#9973

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mailbox@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Parameterised 'Image Attributes
Date: Mon, 28 Aug 2023 21:08:16 +0200
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <ucirat$1qtv1$2@dont-email.me>
References: <ubn5un$5tvt$1@dont-email.me> <ubn9u8$6fup$1@dont-email.me>
<ubq15l$oa8i$1@dont-email.me> <kkca55F9sn7U1@mid.individual.net>
<ubsf4e$19bvo$1@dont-email.me> <ubsn75$1a024$2@dont-email.me>
<uc0sae$23f5l$1@dont-email.me> <uc1qnq$2anmi$2@dont-email.me>
<4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com>
<uc5bc8$3072a$1@dont-email.me>
<d75e72ad-0f5b-49c3-8cbf-630136a8a7a5n@googlegroups.com>
<uc9l2b$3u0pe$1@dont-email.me>
<41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com>
<uca8pu$1lse$1@dont-email.me>
<ad349fba-9bf9-4a3c-9abb-7e082bd8ef7an@googlegroups.com>
<uchukd$1lnvp$1@dont-email.me>
<12fb20e0-8fc7-4eec-a959-e94fd3106976n@googlegroups.com>
<ucigqt$1p1fm$1@dont-email.me> <ucilpv$1psc9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 28 Aug 2023 19:08:13 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5a879763e13e5c6e904f542db0b53b64";
logging-data="1931233"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rjO4yJBhXmPS3pIbMJVauQMJGoAF/wIg="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:PA3VTHZqE+sQuYo/gfA43QXs/Y8=
Content-Language: en-US
In-Reply-To: <ucilpv$1psc9$1@dont-email.me>
 by: Dmitry A. Kazakov - Mon, 28 Aug 2023 19:08 UTC

On 2023-08-28 19:33, G.B. wrote:
> On 28.08.23 18:09, Dmitry A. Kazakov wrote:
>> On 2023-08-28 17:42, Stephen Davies wrote:
>>> On Monday, 28 August 2023 at 11:58:24 UTC+1, Dmitry A. Kazakov wrote:
>>>> On 2023-08-28 11:18, Stephen Davies wrote:
>>>> This will not happen either. But here I would agree, it is clearly a
>>>> case of language littering.
>>>
>>> Littering, schmittering, how about adding Bin_Image, Oct_Image &
>>> Hex_Image
>>> for Ints and Dec_Image for Ints & Reals ;-)
>>
>> Bin_Width_1_Image, Dec_Width_4_Image and so on... Cool, make Ada C
>> again! (:-))
>
> Or maybe leave type attributes alone. Instead, let Ada.Streams
> have I/O manipulating setters.
>
> Then,  in order to preserve the meaning of "corresponding S'Output"
> (LRM 13.13.2) for every S'Input, add AI to the Ada run-time system.

I like the idea of unification of serialization and formatting.

However it does not solve the problem of parameters. In GUI frameworks
facing this very problem the parameters for rendering are set into the
graphic context/surface.

E.g. in the case of string formatting you would need a global object to
set the parameters into. E.g. a set of procedures like
Ada.Text_IO.Set_Field_Width, Ada.Text_IO.Set_Integer_Base etc. That
would be incredibly boring and unsafe.

For stream serialization the parameters could be set on the stream
itself. Which might break a lot of code if you added them to
Root_Stream_Type.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Parameterised 'Image Attributes

<udb7hb$2n54o$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=10011&group=comp.lang.ada#10011

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: randy@rrsoftware.com (Randy Brukardt)
Newsgroups: comp.lang.ada
Subject: Re: Parameterised 'Image Attributes
Date: Wed, 6 Sep 2023 20:04:00 -0500
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <udb7hb$2n54o$1@dont-email.me>
References: <ubn5un$5tvt$1@dont-email.me> <ubn9u8$6fup$1@dont-email.me> <ubq15l$oa8i$1@dont-email.me> <kkca55F9sn7U1@mid.individual.net> <ubsf4e$19bvo$1@dont-email.me> <ubsn75$1a024$2@dont-email.me> <uc0sae$23f5l$1@dont-email.me> <uc1qnq$2anmi$2@dont-email.me> <4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com> <uc5bc8$3072a$1@dont-email.me> <d75e72ad-0f5b-49c3-8cbf-630136a8a7a5n@googlegroups.com> <uc9l2b$3u0pe$1@dont-email.me> <41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com> <uca8pu$1lse$1@dont-email.me> <ad349fba-9bf9-4a3c-9abb-7e082bd8ef7an@googlegroups.com> <uchukd$1lnvp$1@dont-email.me>
Injection-Date: Thu, 7 Sep 2023 01:03:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="da6ed571c7c5f886ace69852bbed0cc5";
logging-data="2856088"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19WokQoU1WOHwnEsQYyGHKxtA+GFnlIPFw="
Cancel-Lock: sha1:xxCiA9wEyJ7icYj41G4KMn2MYjg=
X-RFC2646: Format=Flowed; Response
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246
 by: Randy Brukardt - Thu, 7 Sep 2023 01:04 UTC

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
news:uchukd$1lnvp$1@dont-email.me...
> On 2023-08-28 11:18, Stephen Davies wrote:
>
....
>Neither there is one why 'Image must be a non-overridable attribute

There actually is a good reason for this. Attributes have global visibility.
So if you allowed overriding of attributes, then a with added or removed in
a remote part of a program could silently change the behavior of code that
has no knowledge of of the change. That would be bad for "programming in the
large". Note that Ada 95 was proven to have no such cases, and we've tried
very hard to avoid them.

One could imagine adding rather severe restrictions to overriding of
attributes to eliminate this problem (for instance, only allowing it for
primitive operations of the type), but that would eliminate all real value
of the feature (you can always use a primitive function and "use all" to get
the same effect without any new features).

For 'Image specifically, the design of the attribute doesn't work well for
composition (for Image for composite types), which is why Ada 2022 has a
separate attribute that can be overridden similar to a stream attribute.

Randy.

Re: Parameterised 'Image Attributes

<udc3i5$2u9g8$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=10013&group=comp.lang.ada#10013

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mailbox@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Parameterised 'Image Attributes
Date: Thu, 7 Sep 2023 11:01:58 +0200
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <udc3i5$2u9g8$1@dont-email.me>
References: <ubn5un$5tvt$1@dont-email.me> <ubn9u8$6fup$1@dont-email.me>
<ubq15l$oa8i$1@dont-email.me> <kkca55F9sn7U1@mid.individual.net>
<ubsf4e$19bvo$1@dont-email.me> <ubsn75$1a024$2@dont-email.me>
<uc0sae$23f5l$1@dont-email.me> <uc1qnq$2anmi$2@dont-email.me>
<4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com>
<uc5bc8$3072a$1@dont-email.me>
<d75e72ad-0f5b-49c3-8cbf-630136a8a7a5n@googlegroups.com>
<uc9l2b$3u0pe$1@dont-email.me>
<41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com>
<uca8pu$1lse$1@dont-email.me>
<ad349fba-9bf9-4a3c-9abb-7e082bd8ef7an@googlegroups.com>
<uchukd$1lnvp$1@dont-email.me> <udb7hb$2n54o$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 7 Sep 2023 09:01:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3e4fde5204bf1fe9ab276fdba6340f70";
logging-data="3089928"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/e3JuYhX3t9zsUU616ME/TYSLNcTzCnr0="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:EMyXIZW56ys7z6530Sq7VAvbnuw=
Content-Language: en-US
In-Reply-To: <udb7hb$2n54o$1@dont-email.me>
 by: Dmitry A. Kazakov - Thu, 7 Sep 2023 09:01 UTC

On 2023-09-07 03:04, Randy Brukardt wrote:
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
> news:uchukd$1lnvp$1@dont-email.me...
>> On 2023-08-28 11:18, Stephen Davies wrote:
>>
> ...
>> Neither there is one why 'Image must be a non-overridable attribute
>
> There actually is a good reason for this. Attributes have global visibility.
> So if you allowed overriding of attributes, then a with added or removed in
> a remote part of a program could silently change the behavior of code that
> has no knowledge of of the change. That would be bad for "programming in the
> large". Note that Ada 95 was proven to have no such cases, and we've tried
> very hard to avoid them.

Ah, but 'Image is for debugging only! (:-))

> One could imagine adding rather severe restrictions to overriding of
> attributes to eliminate this problem (for instance, only allowing it for
> primitive operations of the type), but that would eliminate all real value
> of the feature (you can always use a primitive function and "use all" to get
> the same effect without any new features).

It must be a new type:

type My_Integer is new Integer;
for My_Integer'Image use Foo;

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Parameterised 'Image Attributes

<uemctk$oamg$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=10101&group=comp.lang.ada#10101

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rodakay5@gmail.com (Rod Kay)
Newsgroups: comp.lang.ada
Subject: Re: Parameterised 'Image Attributes
Date: Sat, 23 Sep 2023 20:00:26 +1000
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <uemctk$oamg$1@dont-email.me>
References: <ubn5un$5tvt$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 23 Sep 2023 09:59:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ce7030c497e3a5d4f84d7a83969231c8";
logging-data="797392"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190J9JGqAkZfJnKIG9FlCI/oc5dUhhcW44="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:iMBdCwXjSolqawidoZN/XvIIfOc=
Content-Language: en-US
In-Reply-To: <ubn5un$5tvt$1@dont-email.me>
 by: Rod Kay - Sat, 23 Sep 2023 10:00 UTC

Thank you all for the interesting replies and apologies for not
replying sooner.

I've been using 'Gnat.formatted_Output' which I've found quite
useful. Unfortunately, it seems to be a little buggy with its formatting.

Re: Parameterised 'Image Attributes

<7edf8281-4c8b-414d-8b60-e0a6fc851d03n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=10125&group=comp.lang.ada#10125

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:9485:b0:774:1003:2bbc with SMTP id sn5-20020a05620a948500b0077410032bbcmr59504qkn.1.1695707238241;
Mon, 25 Sep 2023 22:47:18 -0700 (PDT)
X-Received: by 2002:a05:6808:2122:b0:3a7:8c2c:8c8e with SMTP id
r34-20020a056808212200b003a78c2c8c8emr5148418oiw.11.1695707237964; Mon, 25
Sep 2023 22:47:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Mon, 25 Sep 2023 22:47:17 -0700 (PDT)
In-Reply-To: <uemctk$oamg$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=212.58.120.89; posting-account=niG3UgoAAAD7iQ3takWjEn_gw6D9X3ww
NNTP-Posting-Host: 212.58.120.89
References: <ubn5un$5tvt$1@dont-email.me> <uemctk$oamg$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7edf8281-4c8b-414d-8b60-e0a6fc851d03n@googlegroups.com>
Subject: Re: Parameterised 'Image Attributes
From: vgodunko@gmail.com (Vadim Godunko)
Injection-Date: Tue, 26 Sep 2023 05:47:18 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1773
 by: Vadim Godunko - Tue, 26 Sep 2023 05:47 UTC

On Saturday, September 23, 2023 at 1:59:20 PM UTC+4, Rod Kay wrote:
>
> I've been using 'Gnat.formatted_Output' which I've found quite
> useful. Unfortunately, it seems to be a little buggy with its formatting.

You can take a look at VSS's Virtual_String_Templates and Formatters, see

https://github.com/AdaCore/VSS/blob/master/source/text/vss-strings-templates.ads
https://github.com/AdaCore/VSS/blob/master/source/text/vss-strings-formatters.ads

and an example of its use

https://github.com/AdaCore/gnatdoc/blob/3e94448ac57270caf4b4502f208f78e1d51da2b2/source/gnatdoc-messages.adb#L130

Re: Parameterised 'Image Attributes

<ueuau8$2f1bk$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=10130&group=comp.lang.ada#10130

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rodakay5@gmail.com (Rod Kay)
Newsgroups: comp.lang.ada
Subject: Re: Parameterised 'Image Attributes
Date: Tue, 26 Sep 2023 20:15:44 +1000
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <ueuau8$2f1bk$1@dont-email.me>
References: <ubn5un$5tvt$1@dont-email.me> <uemctk$oamg$1@dont-email.me>
<7edf8281-4c8b-414d-8b60-e0a6fc851d03n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 26 Sep 2023 10:14:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fbc0411b2d9793e7eb90390760b56604";
logging-data="2590068"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wIB+pyPk3uzXWqmAFZNg4IycB0oBrb50="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Qt510IfMXyzJlIRGo8PUigyxFkk=
Content-Language: en-US
In-Reply-To: <7edf8281-4c8b-414d-8b60-e0a6fc851d03n@googlegroups.com>
 by: Rod Kay - Tue, 26 Sep 2023 10:15 UTC

On 26/9/23 15:47, Vadim Godunko wrote:
> On Saturday, September 23, 2023 at 1:59:20 PM UTC+4, Rod Kay wrote:
>>
>> I've been using 'Gnat.formatted_Output' which I've found quite
>> useful. Unfortunately, it seems to be a little buggy with its formatting.
>
> You can take a look at VSS's Virtual_String_Templates and Formatters, see
>
> https://github.com/AdaCore/VSS/blob/master/source/text/vss-strings-templates.ads
> https://github.com/AdaCore/VSS/blob/master/source/text/vss-strings-formatters.ads
>
> and an example of its use
>
> https://github.com/AdaCore/gnatdoc/blob/3e94448ac57270caf4b4502f208f78e1d51da2b2/source/gnatdoc-messages.adb#L130

That looks really good! I'll try it out asap.

Thank you Vadim.

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor