Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

He's dead, Jim. -- McCoy, "The Devil in the Dark", stardate 3196.1


devel / comp.lang.ada / ANN: Adare_net Ada network lib

SubjectAuthor
* ANN: Adare_net Ada network libDaniel Norte Moraes
`* Re: ANN: Adare_net Ada network libDrPi
 `* Re: ANN: Adare_net Ada network libJoakim Strandberg
  `* Re: ANN: Adare_net Ada network libAdaMagica
   +* Re: ANN: Adare_net Ada network libJoakim Strandberg
   |`* Re: ANN: Adare_net Ada network libDaniel Norte Moraes
   | `* Re: ANN: Adare_net Ada network libDrPi
   |  +* Re: ANN: Adare_net Ada network libDaniel Norte Moraes
   |  |`* Re: ANN: Adare_net Ada network libDrPi
   |  | +- Re: ANN: Adare_net Ada network libSimon Wright
   |  | +- Re: ANN: Adare_net Ada network libShark8
   |  | `- Re: ANN: Adare_net Ada network libDaniel Norte Moraes
   |  `* Re: ANN: Adare_net Ada network libShark8
   |   `* Re: ANN: Adare_net Ada network libEgil H H
   |    `- Re: ANN: Adare_net Ada network libDaniel Norte Moraes
   `* Re: ANN: Adare_net Ada network libRandy Brukardt
    `- Re: ANN: Adare_net Ada network libDaniel Norte Moraes

1
ANN: Adare_net Ada network lib

<3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:ea16:: with SMTP id t22mr5657255qkj.507.1630814094036;
Sat, 04 Sep 2021 20:54:54 -0700 (PDT)
X-Received: by 2002:a5b:58e:: with SMTP id l14mr7870131ybp.143.1630814093817;
Sat, 04 Sep 2021 20:54:53 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sat, 4 Sep 2021 20:54:53 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2804:14c:4c1:b99c:8eb6:7744:bdb3:3816;
posting-account=wgmHdgoAAAA-F7JItPEZjeXqFc0KdzEQ
NNTP-Posting-Host: 2804:14c:4c1:b99c:8eb6:7744:bdb3:3816
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
Subject: ANN: Adare_net Ada network lib
From: danielch...@gmail.com (Daniel Norte Moraes)
Injection-Date: Sun, 05 Sep 2021 03:54:54 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 17
 by: Daniel Norte Moraes - Sun, 5 Sep 2021 03:54 UTC

Hi All! :-)

Adare_net is a small, portable and easy to use Ada network lib.
It supports ipv4 ipv6 udp and tcp, and can 'listen' with ipv6, too.

The powerfull buffer feature can support all Ada types,
and with a more refined treatment, you can use endian proof records and
unconstrained arrays.

From now, tested and working:
AMD64 :
mswindows 7 sp1 64bits
and ubuntu Hirsute 64bits

Thanks and Enjoy!!

https://gitlab.com/daresoft/network/adare_net

Re: ANN: Adare_net Ada network lib

<614502fd$0$1362$426a74cc@news.free.fr>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed2-b.proxad.net!nnrp1-2.free.fr!not-for-mail
Newsgroups: comp.lang.ada
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
From: 314...@drpi.fr (DrPi)
Subject: Re: ANN: Adare_net Ada network lib
Date: Fri, 17 Sep 2021 23:04:58 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
MIME-Version: 1.0
In-Reply-To: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Lines: 29
Message-ID: <614502fd$0$1362$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 17 Sep 2021 23:05:01 CEST
NNTP-Posting-Host: 82.65.30.55
X-Trace: 1631912701 news-2.free.fr 1362 82.65.30.55:64697
X-Complaints-To: abuse@proxad.net
 by: DrPi - Fri, 17 Sep 2021 21:04 UTC

Hi,

Le 05/09/2021 à 05:54, Daniel Norte Moraes a écrit :
> Hi All! :-)
>
> Adare_net is a small, portable and easy to use Ada network lib.
> It supports ipv4 ipv6 udp and tcp, and can 'listen' with ipv6, too.
>
> The powerfull buffer feature can support all Ada types,
> and with a more refined treatment, you can use endian proof records and
> unconstrained arrays.
>
> From now, tested and working:
> AMD64 :
> mswindows 7 sp1 64bits
> and ubuntu Hirsute 64bits
>
> Thanks and Enjoy!!
>
> https://gitlab.com/daresoft/network/adare_net
>

I had a quick look at the top level source code. I'm surprised all
packages are declared with "pure" aspect.
From what I understand of the "pure" aspect, these packages are not pure.
Am I wrong ?

Regards,
Nicolas

Re: ANN: Adare_net Ada network lib

<f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ad4:4671:: with SMTP id z17mr35241302qvv.62.1632300434214;
Wed, 22 Sep 2021 01:47:14 -0700 (PDT)
X-Received: by 2002:a25:7e46:: with SMTP id z67mr41868385ybc.166.1632300434035;
Wed, 22 Sep 2021 01:47:14 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Wed, 22 Sep 2021 01:47:13 -0700 (PDT)
In-Reply-To: <614502fd$0$1362$426a74cc@news.free.fr>
Injection-Info: google-groups.googlegroups.com; posting-host=136.163.208.2; posting-account=HFCrOQoAAABZD_f-UUbYHm3lJDIrh-UX
NNTP-Posting-Host: 136.163.208.2
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com> <614502fd$0$1362$426a74cc@news.free.fr>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
Subject: Re: ANN: Adare_net Ada network lib
From: joaki...@kth.se (Joakim Strandberg)
Injection-Date: Wed, 22 Sep 2021 08:47:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 25
 by: Joakim Strandberg - Wed, 22 Sep 2021 08:47 UTC

> I had a quick look at the top level source code. I'm surprised all
> packages are declared with "pure" aspect.
> From what I understand of the "pure" aspect, these packages are not pure.
> Am I wrong ?
>
> Regards,
> Nicolas

I agree with you Nicolas, they should not be declared Pure. It makes the GNAT compiler check for example that there are no global variables used in the packages but other than that, they (I didn't check all the packages) are not Pure. The pragma Pure worked as expected in Ada83 but the meaning and utility of it disappeared with the Ada95 standard. It is possible in Ada95 to declare a package as Pure and then import C-functions that can do anything. It is also possible in Ada95 to circumvent the meaning of pragma Pure or the Pure aspect by taking advantage of dynamic dispatch. If there is any use of a tagged type inside a package or there is some C-function that is imported, the package should not be labeled as Pure. It should be possible to develop a libadalang- or ASIS based application to check for this. Well, this is a small issue since it is easy to remove the Pure aspects. In any case, thanks to the author for writing adare_net and sharing it with the World!

Best regards,
Joakim

Re: ANN: Adare_net Ada network lib

<b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:a095:: with SMTP id j143mr6584289qke.277.1632302172680;
Wed, 22 Sep 2021 02:16:12 -0700 (PDT)
X-Received: by 2002:a05:6902:124c:: with SMTP id t12mr41564131ybu.91.1632302172504;
Wed, 22 Sep 2021 02:16:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.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: Wed, 22 Sep 2021 02:16:12 -0700 (PDT)
In-Reply-To: <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=94.31.101.123; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf
NNTP-Posting-Host: 94.31.101.123
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
<614502fd$0$1362$426a74cc@news.free.fr> <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com>
Subject: Re: ANN: Adare_net Ada network lib
From: christ-u...@t-online.de (AdaMagica)
Injection-Date: Wed, 22 Sep 2021 09:16:12 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: AdaMagica - Wed, 22 Sep 2021 09:16 UTC

> I agree with you Nicolas, they should not be declared Pure. It makes the GNAT compiler check for example that there are no global variables used in the packages but other than that, they (I didn't check all the packages) are not Pure. The pragma Pure worked as expected in Ada83 but the meaning and utility of it disappeared with the Ada95 standard.
There is no pragma Pure in Ada 83.

Re: ANN: Adare_net Ada network lib

<cb283478-8b61-4270-919e-f7b224ad4784n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:6214:706:: with SMTP id b6mr35992105qvz.29.1632308825727;
Wed, 22 Sep 2021 04:07:05 -0700 (PDT)
X-Received: by 2002:a25:d90e:: with SMTP id q14mr17472686ybg.143.1632308825598;
Wed, 22 Sep 2021 04:07:05 -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: Wed, 22 Sep 2021 04:07:05 -0700 (PDT)
In-Reply-To: <b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.163.208.2; posting-account=HFCrOQoAAABZD_f-UUbYHm3lJDIrh-UX
NNTP-Posting-Host: 136.163.208.2
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
<614502fd$0$1362$426a74cc@news.free.fr> <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
<b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cb283478-8b61-4270-919e-f7b224ad4784n@googlegroups.com>
Subject: Re: ANN: Adare_net Ada network lib
From: joaki...@kth.se (Joakim Strandberg)
Injection-Date: Wed, 22 Sep 2021 11:07:05 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Joakim Strandberg - Wed, 22 Sep 2021 11:07 UTC

onsdag 22 september 2021 kl. 11:16:13 UTC+2 skrev AdaMagica:
> > I agree with you Nicolas, they should not be declared Pure. It makes the GNAT compiler check for example that there are no global variables used in the packages but other than that, they (I didn't check all the packages) are not Pure. The pragma Pure worked as expected in Ada83 but the meaning and utility of it disappeared with the Ada95 standard.
> There is no pragma Pure in Ada 83.

Thanks for clearing that up AdaMagica, I wasn't aware.

Best regards,
Joakim

Re: ANN: Adare_net Ada network lib

<fbe6d779-989a-4423-9e40-3bbeb2c3b43en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:410e:: with SMTP id q14mr15987340qtl.377.1632717145655;
Sun, 26 Sep 2021 21:32:25 -0700 (PDT)
X-Received: by 2002:a25:da93:: with SMTP id n141mr12734331ybf.163.1632717145418;
Sun, 26 Sep 2021 21:32:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sun, 26 Sep 2021 21:32:25 -0700 (PDT)
In-Reply-To: <cb283478-8b61-4270-919e-f7b224ad4784n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2804:14c:4c1:b99c:8218:df7:c483:c0e8;
posting-account=wgmHdgoAAAA-F7JItPEZjeXqFc0KdzEQ
NNTP-Posting-Host: 2804:14c:4c1:b99c:8218:df7:c483:c0e8
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
<614502fd$0$1362$426a74cc@news.free.fr> <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
<b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com> <cb283478-8b61-4270-919e-f7b224ad4784n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fbe6d779-989a-4423-9e40-3bbeb2c3b43en@googlegroups.com>
Subject: Re: ANN: Adare_net Ada network lib
From: danielch...@gmail.com (Daniel Norte Moraes)
Injection-Date: Mon, 27 Sep 2021 04:32:25 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 37
 by: Daniel Norte Moraes - Mon, 27 Sep 2021 04:32 UTC

Em quarta-feira, 22 de setembro de 2021 às 08:07:06 UTC-3, joak...@kth..se escreveu:
> onsdag 22 september 2021 kl. 11:16:13 UTC+2 skrev AdaMagica:
> > > I agree with you Nicolas, they should not be declared Pure. It makes the GNAT compiler check for example that there are no global variables used in the packages but other than that, they (I didn't check all the packages) are not Pure. The pragma Pure worked as expected in Ada83 but the meaning and utility of it disappeared with the Ada95 standard.
> > There is no pragma Pure in Ada 83.
> Thanks for clearing that up AdaMagica, I wasn't aware.
>
> Best regards,
> Joakim

Really? They _are_ Pure.
I used linters extensively to result in this. one of these linters made hard use o gnat and gprbuild as his backend.
Remember this is target Ada 2012 (update 2016) and beyond => there is
no guarantee of operation for Ada versions earlier than Ada2012.

for now Adare_Net support:
MSwindows and Linux.

was tested in:
Mswindows => starting amd64 windows seven sp1 + msys2 gcc-10.3 gnat-10.3 gprbuild-2021
Linux => amd64 gcc-11.1+ gnat-11.1+ gprbuild-2021.

1o.) We need as many volunteers as possible to testing Adare_Net on as many
operating systems as possible and reporting his/her result to us.
currently linux and mswindows are the targets.

Very Very Very Thanks!
Enjoy!!!

Re: ANN: Adare_net Ada network lib

<siu72j$tcr$1@franka.jacob-sparre.dk>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!rocksolid2!i2pn.org!weretis.net!feeder8.news.weretis.net!newsfeed.xs3.de!callisto.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail
From: ran...@rrsoftware.com (Randy Brukardt)
Newsgroups: comp.lang.ada
Subject: Re: ANN: Adare_net Ada network lib
Date: Mon, 27 Sep 2021 23:52:33 -0500
Organization: JSA Research & Innovation
Lines: 43
Message-ID: <siu72j$tcr$1@franka.jacob-sparre.dk>
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com> <614502fd$0$1362$426a74cc@news.free.fr> <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com> <b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com>
Injection-Date: Tue, 28 Sep 2021 04:52:35 -0000 (UTC)
Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226";
logging-data="30107"; mail-complaints-to="news@jacob-sparre.dk"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246
 by: Randy Brukardt - Tue, 28 Sep 2021 04:52 UTC

"AdaMagica" <christ-usch.grein@t-online.de> wrote in message
news:b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com...
>> I agree with you Nicolas, they should not be declared Pure. It makes the
>> GNAT compiler
>> check for example that there are no global variables used in the packages
>> but other than
>> that, they (I didn't check all the packages) are not Pure. The pragma
>> Pure worked as
>> expected in Ada83 but the meaning and utility of it disappeared with the
>> Ada95 standard.

>There is no pragma Pure in Ada 83.

Pragma Pure was an IMHO failed attempt to control/document access to
globals. It has much too broad of a granularity to be very useful (I've
never found anything that I could make Pure outside of language-defined
things, and some of those cannot be implemented as Pure even though declared
that way). Ada 2022 has aspect Global to do this properly, Global => null
has many fewer holes than Pure.

Note however that one can always lie about any Ada semantics in interfacing
code. But any such lies make your code erroneous, and while it might work on
one compiler today, there's no guarentee that it will work anywhere else
(including the next update of your usual compiler). See B.1(38.1/5):

It is the programmer's responsibility to ensure that the use of
interfacing aspects does
not violate Ada semantics; otherwise, program execution is erroneous. For
example,
passing an object with mode in to imported code that modifies it causes
erroneous
execution. Similarly, calling an imported subprogram that is not pure from
a pure
package causes erroneous execution.

[The latter two sentences were added because programmers didn't seem to get
what the first sentence means. We wanted that to be interpreted in the
broadest possible way.]

Randy.

Re: ANN: Adare_net Ada network lib

<6155ac7f$0$6454$426a34cc@news.free.fr>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!nntp.terraraq.uk!news.gegeweb.eu!gegeweb.org!usenet-fr.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed1-a.proxad.net!nnrp4-2.free.fr!not-for-mail
Subject: Re: ANN: Adare_net Ada network lib
Newsgroups: comp.lang.ada
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
<614502fd$0$1362$426a74cc@news.free.fr>
<f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
<b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com>
<cb283478-8b61-4270-919e-f7b224ad4784n@googlegroups.com>
<fbe6d779-989a-4423-9e40-3bbeb2c3b43en@googlegroups.com>
From: 314...@drpi.fr (DrPi)
Date: Thu, 30 Sep 2021 14:24:30 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
MIME-Version: 1.0
In-Reply-To: <fbe6d779-989a-4423-9e40-3bbeb2c3b43en@googlegroups.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Lines: 36
Message-ID: <6155ac7f$0$6454$426a34cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 30 Sep 2021 14:24:31 CEST
NNTP-Posting-Host: 82.65.30.55
X-Trace: 1633004671 news-4.free.fr 6454 82.65.30.55:62200
X-Complaints-To: abuse@proxad.net
 by: DrPi - Thu, 30 Sep 2021 12:24 UTC

Le 27/09/2021 à 06:32, Daniel Norte Moraes a écrit :
> Em quarta-feira, 22 de setembro de 2021 às 08:07:06 UTC-3, joak...@kth.se escreveu:
>> onsdag 22 september 2021 kl. 11:16:13 UTC+2 skrev AdaMagica:
>>>> I agree with you Nicolas, they should not be declared Pure. It makes the GNAT compiler check for example that there are no global variables used in the packages but other than that, they (I didn't check all the packages) are not Pure. The pragma Pure worked as expected in Ada83 but the meaning and utility of it disappeared with the Ada95 standard.
>>> There is no pragma Pure in Ada 83.
>> Thanks for clearing that up AdaMagica, I wasn't aware.
>>
>> Best regards,
>> Joakim
>
> Really? They _are_ Pure.
> I used linters extensively to result in this. one of these linters made hard use o gnat and gprbuild as his backend.
> Remember this is target Ada 2012 (update 2016) and beyond => there is
> no guarantee of operation for Ada versions earlier than Ada2012.

In a Pure package, shouldn't the subprograms also be Pure ?

>
> for now Adare_Net support:
> MSwindows and Linux.
>
> was tested in:
> Mswindows => starting amd64 windows seven sp1 + msys2 gcc-10.3 gnat-10.3 gprbuild-2021
> Linux => amd64 gcc-11.1+ gnat-11.1+ gprbuild-2021.
>
> 1o.) We need as many volunteers as possible to testing Adare_Net on as many
> operating systems as possible and reporting his/her result to us.
> currently linux and mswindows are the targets.
>
> Very Very Very Thanks!
> Enjoy!!!
>
>
>
>

Re: ANN: Adare_net Ada network lib

<3563a845-85c0-4af1-a569-dab944511e93n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:a493:: with SMTP id n141mr6532104qke.27.1633032650475;
Thu, 30 Sep 2021 13:10:50 -0700 (PDT)
X-Received: by 2002:a25:3086:: with SMTP id w128mr1452512ybw.139.1633032650244;
Thu, 30 Sep 2021 13:10:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Thu, 30 Sep 2021 13:10:50 -0700 (PDT)
In-Reply-To: <6155ac7f$0$6454$426a34cc@news.free.fr>
Injection-Info: google-groups.googlegroups.com; posting-host=2804:14c:4c1:b99c:d0e7:f14a:e6a0:841b;
posting-account=wgmHdgoAAAA-F7JItPEZjeXqFc0KdzEQ
NNTP-Posting-Host: 2804:14c:4c1:b99c:d0e7:f14a:e6a0:841b
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
<614502fd$0$1362$426a74cc@news.free.fr> <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
<b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com> <cb283478-8b61-4270-919e-f7b224ad4784n@googlegroups.com>
<fbe6d779-989a-4423-9e40-3bbeb2c3b43en@googlegroups.com> <6155ac7f$0$6454$426a34cc@news.free.fr>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3563a845-85c0-4af1-a569-dab944511e93n@googlegroups.com>
Subject: Re: ANN: Adare_net Ada network lib
From: danielch...@gmail.com (Daniel Norte Moraes)
Injection-Date: Thu, 30 Sep 2021 20:10:50 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 66
 by: Daniel Norte Moraes - Thu, 30 Sep 2021 20:10 UTC

Em quinta-feira, 30 de setembro de 2021 às 09:24:34 UTC-3, DrPi escreveu:
> Le 27/09/2021 à 06:32, Daniel Norte Moraes a écrit :
> > Em quarta-feira, 22 de setembro de 2021 às 08:07:06 UTC-3, joak...@kth.se escreveu:
> >> onsdag 22 september 2021 kl. 11:16:13 UTC+2 skrev AdaMagica:
> >>>> I agree with you Nicolas, they should not be declared Pure. It makes the GNAT compiler check for example that there are no global variables used in the packages but other than that, they (I didn't check all the packages) are not Pure. The pragma Pure worked as expected in Ada83 but the meaning and utility of it disappeared with the Ada95 standard.
> >>> There is no pragma Pure in Ada 83.
> >> Thanks for clearing that up AdaMagica, I wasn't aware.
> >>
> >> Best regards,
> >> Joakim
> >
> > Really? They _are_ Pure.
> > I used linters extensively to result in this. one of these linters made hard use o gnat and gprbuild as his backend.
> > Remember this is target Ada 2012 (update 2016) and beyond => there is
> > no guarantee of operation for Ada versions earlier than Ada2012.
> In a Pure package, shouldn't the subprograms also be Pure ?
> >
> > for now Adare_Net support:
> > MSwindows and Linux.
> >
> > was tested in:
> > Mswindows => starting amd64 windows seven sp1 + msys2 gcc-10.3 gnat-10.3 gprbuild-2021
> > Linux => amd64 gcc-11.1+ gnat-11.1+ gprbuild-2021.
> >
> > 1o.) We need as many volunteers as possible to testing Adare_Net on as many
> > operating systems as possible and reporting his/her result to us.
> > currently linux and mswindows are the targets.
> >
> > Very Very Very Thanks!
> > Enjoy!!!
> >
> >
> >
> >

Well, :-)

Why ?
The functions dont are pure ? why?

Maybe we need fix the ARM 2012+

The ARM2012 allowed it. gprbuild and gnat just follow ARM :-).

To made things as a lib be almost all pure (or yet preelaborate) there are a hard and
time consuming way to study and test. This fact is itself the main motive for almost all libs and apps ignore Ada categorizations.

Then, no one yet say if the lib work... only about pure... why? we need more than a 'freestyle' opinions.

For your use, just fork and make bether (ah and remove all Ada Categorizations :-)

====X====

Re: ANN: Adare_net Ada network lib

<61574676$0$6485$426a74cc@news.free.fr>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed3-a.proxad.net!nnrp4-2.free.fr!not-for-mail
Newsgroups: comp.lang.ada
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
<614502fd$0$1362$426a74cc@news.free.fr>
<f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
<b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com>
<cb283478-8b61-4270-919e-f7b224ad4784n@googlegroups.com>
<fbe6d779-989a-4423-9e40-3bbeb2c3b43en@googlegroups.com>
<6155ac7f$0$6454$426a34cc@news.free.fr>
<3563a845-85c0-4af1-a569-dab944511e93n@googlegroups.com>
From: 314...@drpi.fr (DrPi)
Subject: Re: ANN: Adare_net Ada network lib
Date: Fri, 1 Oct 2021 19:33:41 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
MIME-Version: 1.0
In-Reply-To: <3563a845-85c0-4af1-a569-dab944511e93n@googlegroups.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Lines: 65
Message-ID: <61574676$0$6485$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 01 Oct 2021 19:33:43 CEST
NNTP-Posting-Host: 82.65.30.55
X-Trace: 1633109623 news-2.free.fr 6485 82.65.30.55:65260
X-Complaints-To: abuse@proxad.net
 by: DrPi - Fri, 1 Oct 2021 17:33 UTC

Le 30/09/2021 à 22:10, Daniel Norte Moraes a écrit :
> Em quinta-feira, 30 de setembro de 2021 às 09:24:34 UTC-3, DrPi escreveu:
>> Le 27/09/2021 à 06:32, Daniel Norte Moraes a écrit :
>>> Em quarta-feira, 22 de setembro de 2021 às 08:07:06 UTC-3, joak...@kth.se escreveu:
>>>> onsdag 22 september 2021 kl. 11:16:13 UTC+2 skrev AdaMagica:
>>>>>> I agree with you Nicolas, they should not be declared Pure. It makes the GNAT compiler check for example that there are no global variables used in the packages but other than that, they (I didn't check all the packages) are not Pure. The pragma Pure worked as expected in Ada83 but the meaning and utility of it disappeared with the Ada95 standard.
>>>>> There is no pragma Pure in Ada 83.
>>>> Thanks for clearing that up AdaMagica, I wasn't aware.
>>>>
>>>> Best regards,
>>>> Joakim
>>>
>>> Really? They _are_ Pure.
>>> I used linters extensively to result in this. one of these linters made hard use o gnat and gprbuild as his backend.
>>> Remember this is target Ada 2012 (update 2016) and beyond => there is
>>> no guarantee of operation for Ada versions earlier than Ada2012.
>> In a Pure package, shouldn't the subprograms also be Pure ?
>>>
>>> for now Adare_Net support:
>>> MSwindows and Linux.
>>>
>>> was tested in:
>>> Mswindows => starting amd64 windows seven sp1 + msys2 gcc-10.3 gnat-10.3 gprbuild-2021
>>> Linux => amd64 gcc-11.1+ gnat-11.1+ gprbuild-2021.
>>>
>>> 1o.) We need as many volunteers as possible to testing Adare_Net on as many
>>> operating systems as possible and reporting his/her result to us.
>>> currently linux and mswindows are the targets.
>>>
>>> Very Very Very Thanks!
>>> Enjoy!!!
>>>
>>>
>>>
>>>
>
> Well, :-)
>
> Why ?
> The functions dont are pure ? why?
>
A subprogram returning content read from the network can't be pure. Or
there is something I have not understood about the Pure aspect.

> Maybe we need fix the ARM 2012+
>
> The ARM2012 allowed it. gprbuild and gnat just follow ARM :-).
>
> To made things as a lib be almost all pure (or yet preelaborate) there are a hard and
> time consuming way to study and test. This fact is itself the main motive for almost all libs and apps ignore Ada categorizations.
>
> Then, no one yet say if the lib work... only about pure... why? we need more than a 'freestyle' opinions.
>
My intent is to try Adare_Net. So I started by taking a look at the
sources and the first thing I noticed was the Pure aspect of the
packages. As I'm far from a Ada expert, and I like to understand things,
I asked here about it.

Is there a documentation somewhere ?

> For your use, just fork and make bether (ah and remove all Ada Categorizations :-)
>
> ====X=====
>

Re: ANN: Adare_net Ada network lib

<lytui0a7c0.fsf@pushface.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!RKN7TKnHC01q0gdg6EhkbQ.user.46.165.242.75.POSTED!not-for-mail
From: sim...@pushface.org (Simon Wright)
Newsgroups: comp.lang.ada
Subject: Re: ANN: Adare_net Ada network lib
Date: Fri, 01 Oct 2021 20:11:27 +0100
Organization: Aioe.org NNTP Server
Message-ID: <lytui0a7c0.fsf@pushface.org>
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
<614502fd$0$1362$426a74cc@news.free.fr>
<f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
<b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com>
<cb283478-8b61-4270-919e-f7b224ad4784n@googlegroups.com>
<fbe6d779-989a-4423-9e40-3bbeb2c3b43en@googlegroups.com>
<6155ac7f$0$6454$426a34cc@news.free.fr>
<3563a845-85c0-4af1-a569-dab944511e93n@googlegroups.com>
<61574676$0$6485$426a74cc@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: gioia.aioe.org; logging-data="55170"; posting-host="RKN7TKnHC01q0gdg6EhkbQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:Xm4tkryRL5hkW1tGiZ+SNbhIj1w=
 by: Simon Wright - Fri, 1 Oct 2021 19:11 UTC

DrPi <314@drpi.fr> writes:

> A subprogram returning content read from the network can't be pure. Or
> there is something I have not understood about the Pure aspect.

ARM 10.1.1(18)[1] says

"[...] the implementation may omit a call on such a subprogram and
simply reuse the results produced by an earlier call on the same
subprogram, provided that [...]. This permission applies even if the
subprogram produces other side effects when called."

[1] http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-10-2-1.html#p18

Re: ANN: Adare_net Ada network lib

<bf1b0481-dd93-41be-b966-81e330e182d1n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:9cd:: with SMTP id 196mr13855224qkj.22.1634053797326;
Tue, 12 Oct 2021 08:49:57 -0700 (PDT)
X-Received: by 2002:a25:ce14:: with SMTP id x20mr30142816ybe.139.1634053797163;
Tue, 12 Oct 2021 08:49:57 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Tue, 12 Oct 2021 08:49:56 -0700 (PDT)
In-Reply-To: <6155ac7f$0$6454$426a34cc@news.free.fr>
Injection-Info: google-groups.googlegroups.com; posting-host=146.5.2.231; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC
NNTP-Posting-Host: 146.5.2.231
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
<614502fd$0$1362$426a74cc@news.free.fr> <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
<b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com> <cb283478-8b61-4270-919e-f7b224ad4784n@googlegroups.com>
<fbe6d779-989a-4423-9e40-3bbeb2c3b43en@googlegroups.com> <6155ac7f$0$6454$426a34cc@news.free.fr>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bf1b0481-dd93-41be-b966-81e330e182d1n@googlegroups.com>
Subject: Re: ANN: Adare_net Ada network lib
From: onewinge...@gmail.com (Shark8)
Injection-Date: Tue, 12 Oct 2021 15:49:57 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 31
 by: Shark8 - Tue, 12 Oct 2021 15:49 UTC

On Thursday, September 30, 2021 at 6:24:34 AM UTC-6, DrPi wrote:
> Le 27/09/2021 à 06:32, Daniel Norte Moraes a écrit :
> > Em quarta-feira, 22 de setembro de 2021 às 08:07:06 UTC-3, joak...
> >> onsdag 22 september 2021 kl. 11:16:13 UTC+2 skrev AdaMagica:
> >>>> I agree with you Nicolas, they should not be declared Pure. It makes the GNAT compiler check for example that there are no global variables used in the packages but other than that, they (I didn't check all the packages) are not Pure. The pragma Pure worked as expected in Ada83 but the meaning and utility of it disappeared with the Ada95 standard.
> >>> There is no pragma Pure in Ada 83.
> >> Thanks for clearing that up AdaMagica, I wasn't aware.
> >>
> >> Best regards,
> >> Joakim
> >
> > Really? They _are_ Pure.
> > I used linters extensively to result in this. one of these linters made hard use o gnat and gprbuild as his backend.
> > Remember this is target Ada 2012 (update 2016) and beyond => there is
> > no guarantee of operation for Ada versions earlier than Ada2012.
> In a Pure package, shouldn't the subprograms also be Pure ?
Yes...ish.
As mentioned upthread, you can lie about there being no internal state... and this can still be "interfacially" pure; consider a FIBONACCI function which is memoized (Function F(N: Positive) return Positive) -- internally it has the memo to look up F(N), which is obviously state, but externally any F(X) will return the same value given the same inputs. / Perhaps we should allow aspect PURE on subprograms, as well as introduce an aspect STATIC [having (user-defined) static-functions would, in particular, allow some nice "macro-lite" functionality].

Re: ANN: Adare_net Ada network lib

<7adba01b-43c3-4dc5-acfe-250cb062d7fbn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:622a:1006:: with SMTP id d6mr23024545qte.337.1634054445361;
Tue, 12 Oct 2021 09:00:45 -0700 (PDT)
X-Received: by 2002:a25:7e46:: with SMTP id z67mr27920618ybc.166.1634054445151;
Tue, 12 Oct 2021 09:00:45 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Tue, 12 Oct 2021 09:00:44 -0700 (PDT)
In-Reply-To: <61574676$0$6485$426a74cc@news.free.fr>
Injection-Info: google-groups.googlegroups.com; posting-host=146.5.2.231; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC
NNTP-Posting-Host: 146.5.2.231
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
<614502fd$0$1362$426a74cc@news.free.fr> <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
<b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com> <cb283478-8b61-4270-919e-f7b224ad4784n@googlegroups.com>
<fbe6d779-989a-4423-9e40-3bbeb2c3b43en@googlegroups.com> <6155ac7f$0$6454$426a34cc@news.free.fr>
<3563a845-85c0-4af1-a569-dab944511e93n@googlegroups.com> <61574676$0$6485$426a74cc@news.free.fr>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7adba01b-43c3-4dc5-acfe-250cb062d7fbn@googlegroups.com>
Subject: Re: ANN: Adare_net Ada network lib
From: onewinge...@gmail.com (Shark8)
Injection-Date: Tue, 12 Oct 2021 16:00:45 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 26
 by: Shark8 - Tue, 12 Oct 2021 16:00 UTC

On Friday, October 1, 2021 at 11:33:45 AM UTC-6, DrPi wrote:
>
> My intent is to try Adare_Net. So I started by taking a look at the
> sources and the first thing I noticed was the Pure aspect of the
> packages. As I'm far from a Ada expert, and I like to understand things,
> I asked here about it.
>
> Is there a documentation somewhere ?
The simple explanation of Pure is that it means there is no internal-state in the package; as a consequence, (1) a value-returning call with the same parameters can be treated as idempotent and therefore can be replicated across calls; and (2) in the Distributed Systems Annex, we can replicate this package across partitions w/o worrying about synchronization precisely because there is no internal state.

So, "ideologically" having a networking library marked "pure" is not _necessarily_ a wrong thing -- though treating such calls as idempotent certainly would be -- and perhaps that is a point where some refinement could be made; perhaps allowing subprograms to be marked aspect VOLATILE to indicate that they are not idempotent or some such.

> > For your use, just fork and make bether (ah and remove all Ada Categorizations :-)
The categorizations *are* useful, as shown above... though overloading them with other properties, or rather having so coarse a granularity limits that.

Re: ANN: Adare_net Ada network lib

<8f565c79-f54c-4e60-a048-9bedde8757cfn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:b045:: with SMTP id z66mr21497315qke.271.1634067872510;
Tue, 12 Oct 2021 12:44:32 -0700 (PDT)
X-Received: by 2002:a25:81d1:: with SMTP id n17mr5580669ybm.425.1634067872334;
Tue, 12 Oct 2021 12:44:32 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Tue, 12 Oct 2021 12:44:32 -0700 (PDT)
In-Reply-To: <bf1b0481-dd93-41be-b966-81e330e182d1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=81.167.0.45; posting-account=uulyKwoAAAA86DO0ODu--rZtbje8Sytn
NNTP-Posting-Host: 81.167.0.45
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
<614502fd$0$1362$426a74cc@news.free.fr> <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
<b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com> <cb283478-8b61-4270-919e-f7b224ad4784n@googlegroups.com>
<fbe6d779-989a-4423-9e40-3bbeb2c3b43en@googlegroups.com> <6155ac7f$0$6454$426a34cc@news.free.fr>
<bf1b0481-dd93-41be-b966-81e330e182d1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8f565c79-f54c-4e60-a048-9bedde8757cfn@googlegroups.com>
Subject: Re: ANN: Adare_net Ada network lib
From: ehh.pub...@gmail.com (Egil H H)
Injection-Date: Tue, 12 Oct 2021 19:44:32 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 42
 by: Egil H H - Tue, 12 Oct 2021 19:44 UTC

On Tuesday, October 12, 2021 at 5:49:58 PM UTC+2, Shark8 wrote:
> On Thursday, September 30, 2021 at 6:24:34 AM UTC-6, DrPi wrote:
> > Le 27/09/2021 à 06:32, Daniel Norte Moraes a écrit :
> > > Em quarta-feira, 22 de setembro de 2021 às 08:07:06 UTC-3, joak....
> > >> onsdag 22 september 2021 kl. 11:16:13 UTC+2 skrev AdaMagica:
> > >>>> I agree with you Nicolas, they should not be declared Pure. It makes the GNAT compiler check for example that there are no global variables used in the packages but other than that, they (I didn't check all the packages) are not Pure. The pragma Pure worked as expected in Ada83 but the meaning and utility of it disappeared with the Ada95 standard.
> > >>> There is no pragma Pure in Ada 83.
> > >> Thanks for clearing that up AdaMagica, I wasn't aware.
> > >>
> > >> Best regards,
> > >> Joakim
> > >
> > > Really? They _are_ Pure.
> > > I used linters extensively to result in this. one of these linters made hard use o gnat and gprbuild as his backend.
> > > Remember this is target Ada 2012 (update 2016) and beyond => there is
> > > no guarantee of operation for Ada versions earlier than Ada2012.
> > In a Pure package, shouldn't the subprograms also be Pure ?
> Yes...ish.
> As mentioned upthread, you can lie about there being no internal state... and this can still be "interfacially" pure; consider a FIBONACCI function which is memoized (Function F(N: Positive) return Positive) -- internally it has the memo to look up F(N), which is obviously state, but externally any F(X) will return the same value given the same inputs. / Perhaps we should allow aspect PURE on subprograms, as well as introduce an aspect STATIC [having (user-defined) static-functions would, in particular, allow some nice "macro-lite" functionality].

Well, aspect Static for expression functions is coming...
http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0075-1.txt?rev=1.15
http://ada-auth.org/standards/2xrm/html/RM-4-9.html
http://ada-auth.org/standards/2xrm/html/RM-6-8.html

--
~egilhh

Re: ANN: Adare_net Ada network lib

<6bb14593-5270-4945-8491-1d422bea6deen@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:3187:: with SMTP id bi7mr23430957qkb.534.1640897764889;
Thu, 30 Dec 2021 12:56:04 -0800 (PST)
X-Received: by 2002:a25:6884:: with SMTP id d126mr14266121ybc.355.1640897764710;
Thu, 30 Dec 2021 12:56:04 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Thu, 30 Dec 2021 12:56:04 -0800 (PST)
In-Reply-To: <siu72j$tcr$1@franka.jacob-sparre.dk>
Injection-Info: google-groups.googlegroups.com; posting-host=2804:14c:4c1:8775:352d:ffd4:3db5:6282;
posting-account=wgmHdgoAAAA-F7JItPEZjeXqFc0KdzEQ
NNTP-Posting-Host: 2804:14c:4c1:8775:352d:ffd4:3db5:6282
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
<614502fd$0$1362$426a74cc@news.free.fr> <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
<b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com> <siu72j$tcr$1@franka.jacob-sparre.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6bb14593-5270-4945-8491-1d422bea6deen@googlegroups.com>
Subject: Re: ANN: Adare_net Ada network lib
From: danielch...@gmail.com (Daniel Norte Moraes)
Injection-Date: Thu, 30 Dec 2021 20:56:04 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 106
 by: Daniel Norte Moraes - Thu, 30 Dec 2021 20:56 UTC

Em terça-feira, 28 de setembro de 2021 às 01:52:37 UTC-3, Randy Brukardt escreveu:
> "AdaMagica" <christ-u...@t-online.de> wrote in message
> news:b1650e4c-90c6-4c75...@googlegroups.com...
> >> I agree with you Nicolas, they should not be declared Pure. It makes the
> >> GNAT compiler
> >> check for example that there are no global variables used in the packages
> >> but other than
> >> that, they (I didn't check all the packages) are not Pure. The pragma
> >> Pure worked as
> >> expected in Ada83 but the meaning and utility of it disappeared with the
> >> Ada95 standard.
>
> >There is no pragma Pure in Ada 83.
> Pragma Pure was an IMHO failed attempt to control/document access to
> globals. It has much too broad of a granularity to be very useful (I've
> never found anything that I could make Pure outside of language-defined
> things, and some of those cannot be implemented as Pure even though declared
> that way). Ada 2022 has aspect Global to do this properly, Global => null
> has many fewer holes than Pure.
>
> Note however that one can always lie about any Ada semantics in interfacing
> code. But any such lies make your code erroneous, and while it might work on
> one compiler today, there's no guarentee that it will work anywhere else
> (including the next update of your usual compiler). See B.1(38.1/5):
>
> It is the programmer's responsibility to ensure that the use of
> interfacing aspects does
> not violate Ada semantics; otherwise, program execution is erroneous. For
> example,
> passing an object with mode in to imported code that modifies it causes
> erroneous
> execution. Similarly, calling an imported subprogram that is not pure from
> a pure
> package causes erroneous execution.
>
> [The latter two sentences were added because programmers didn't seem to get
> what the first sentence means. We wanted that to be interpreted in the
> broadest possible way.]
>
> Randy.

We apologize for the delay in responding. I (daniel) was expecting the 'static aspect' to have
more support (I gotted this suggestion, and thanks to you who suggested it).
With the development release of gnat-12 I'll try to answer all the questions and make all the suggested
changes that make sense.

Really Randy, I'm aware about this.
I´ll try answer in order:

1) var'address as mode in: the address in the import functions and procedures don't are changed. when there are a change, the change is just
in the data that address point to. this is a standard pratice in ada bind world. we dont use 'in out' mode because the address don't are changed.

2) object'address and for object'address use 'var': a) remember by the src code, the true 'lengths' are saved and used without
violate the address space (really this is my responsability as programmmer) b) and
(besides some bug by off-one not yet hunted). c) this is sure enforced. d) I get a instantaneos segfault if this
dont are enforced. e) this 'enforcement' is transparent to user. f) the user dont have access to this 'internals' , It is isolated from his/her.

3) besides an aparent violation, a) this was necessary to get values, in reality a 'view change' to get the real values. compilers obligied me
to do this, afters some months, figthing against some linux patchs (permantent patchs) and segfault in mswindows. Besides the harmless and legitimate use
without 'view change', gcc gnat linux and mswindows dont permited this.

4) import var convention c: a) the mostly vars is embedded from _c vars in adare-net c sources_. the Ada RM made a excption in this case when this is
imported vars.

etc.

From now:

I can transform mostly imported vars in static functions.

Pleeease All, Say us What you want and or What you complains(with filename and line_number) and yours sugestions.

Ah! The Version of Ada is 202x.

Enjoy with us!

Best Whishes, Dani.

Re: ANN: Adare_net Ada network lib

<ac2e189a-580f-4592-b440-d495cebb8d13n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:bac2:: with SMTP id k185mr23077814qkf.685.1640898934817;
Thu, 30 Dec 2021 13:15:34 -0800 (PST)
X-Received: by 2002:a25:8e0d:: with SMTP id p13mr30237011ybl.372.1640898934638;
Thu, 30 Dec 2021 13:15:34 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Thu, 30 Dec 2021 13:15:34 -0800 (PST)
In-Reply-To: <61574676$0$6485$426a74cc@news.free.fr>
Injection-Info: google-groups.googlegroups.com; posting-host=2804:14c:4c1:8775:352d:ffd4:3db5:6282;
posting-account=wgmHdgoAAAA-F7JItPEZjeXqFc0KdzEQ
NNTP-Posting-Host: 2804:14c:4c1:8775:352d:ffd4:3db5:6282
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
<614502fd$0$1362$426a74cc@news.free.fr> <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
<b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com> <cb283478-8b61-4270-919e-f7b224ad4784n@googlegroups.com>
<fbe6d779-989a-4423-9e40-3bbeb2c3b43en@googlegroups.com> <6155ac7f$0$6454$426a34cc@news.free.fr>
<3563a845-85c0-4af1-a569-dab944511e93n@googlegroups.com> <61574676$0$6485$426a74cc@news.free.fr>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ac2e189a-580f-4592-b440-d495cebb8d13n@googlegroups.com>
Subject: Re: ANN: Adare_net Ada network lib
From: danielch...@gmail.com (Daniel Norte Moraes)
Injection-Date: Thu, 30 Dec 2021 21:15:34 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 84
 by: Daniel Norte Moraes - Thu, 30 Dec 2021 21:15 UTC

Em sexta-feira, 1 de outubro de 2021 às 14:33:45 UTC-3, DrPi escreveu:
> Le 30/09/2021 à 22:10, Daniel Norte Moraes a écrit :
> > Em quinta-feira, 30 de setembro de 2021 às 09:24:34 UTC-3, DrPi escreveu:
> >> Le 27/09/2021 à 06:32, Daniel Norte Moraes a écrit :
> >>> Em quarta-feira, 22 de setembro de 2021 às 08:07:06 UTC-3, joak....@kth.se escreveu:
> >>>> onsdag 22 september 2021 kl. 11:16:13 UTC+2 skrev AdaMagica:
> >>>>>> I agree with you Nicolas, they should not be declared Pure. It makes the GNAT compiler check for example that there are no global variables used in the packages but other than that, they (I didn't check all the packages) are not Pure. The pragma Pure worked as expected in Ada83 but the meaning and utility of it disappeared with the Ada95 standard.
> >>>>> There is no pragma Pure in Ada 83.
> >>>> Thanks for clearing that up AdaMagica, I wasn't aware.
> >>>>
> >>>> Best regards,
> >>>> Joakim
> >>>
> >>> Really? They _are_ Pure.
> >>> I used linters extensively to result in this. one of these linters made hard use o gnat and gprbuild as his backend.
> >>> Remember this is target Ada 2012 (update 2016) and beyond => there is
> >>> no guarantee of operation for Ada versions earlier than Ada2012.
> >> In a Pure package, shouldn't the subprograms also be Pure ?
> >>>
> >>> for now Adare_Net support:
> >>> MSwindows and Linux.
> >>>
> >>> was tested in:
> >>> Mswindows => starting amd64 windows seven sp1 + msys2 gcc-10.3 gnat-10.3 gprbuild-2021
> >>> Linux => amd64 gcc-11.1+ gnat-11.1+ gprbuild-2021.
> >>>
> >>> 1o.) We need as many volunteers as possible to testing Adare_Net on as many
> >>> operating systems as possible and reporting his/her result to us.
> >>> currently linux and mswindows are the targets.
> >>>
> >>> Very Very Very Thanks!
> >>> Enjoy!!!
> >>>
> >>>
> >>>
> >>>
> >
> > Well, :-)
> >
> > Why ?
> > The functions dont are pure ? why?
> >
> A subprogram returning content read from the network can't be pure. Or
> there is something I have not understood about the Pure aspect.
> > Maybe we need fix the ARM 2012+
> >
> > The ARM2012 allowed it. gprbuild and gnat just follow ARM :-).
> >
> > To made things as a lib be almost all pure (or yet preelaborate) there are a hard and
> > time consuming way to study and test. This fact is itself the main motive for almost all libs and apps ignore Ada categorizations.
> >
> > Then, no one yet say if the lib work... only about pure... why? we need more than a 'freestyle' opinions.
> >
> My intent is to try Adare_Net. So I started by taking a look at the
> sources and the first thing I noticed was the Pure aspect of the
> packages. As I'm far from a Ada expert, and I like to understand things,
> I asked here about it.
>
> Is there a documentation somewhere ?

We will create a pdf with the api, after upgrading to ada202x and adding support for more operating systems, this includes solving reported
issues and adding suggestions from all of you, 'pure' and 'global' and 'nonblocking => false' and etc included.

While this, You can use the programs in 'exemple folder'. it contains working client and server src and programs. mostly time Its are in 'pairs' of filenames.
Thanks,
Best Whishes,
Dani.

Re: ANN: Adare_net Ada network lib

<5d9712bf-6ac7-4bba-b9f0-13be9d0a9ef4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:6214:518f:: with SMTP id kl15mr29520320qvb.4.1640899855338;
Thu, 30 Dec 2021 13:30:55 -0800 (PST)
X-Received: by 2002:a25:aa8c:: with SMTP id t12mr23439787ybi.615.1640899855164;
Thu, 30 Dec 2021 13:30:55 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Thu, 30 Dec 2021 13:30:54 -0800 (PST)
In-Reply-To: <8f565c79-f54c-4e60-a048-9bedde8757cfn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2804:14c:4c1:8775:352d:ffd4:3db5:6282;
posting-account=wgmHdgoAAAA-F7JItPEZjeXqFc0KdzEQ
NNTP-Posting-Host: 2804:14c:4c1:8775:352d:ffd4:3db5:6282
References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com>
<614502fd$0$1362$426a74cc@news.free.fr> <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com>
<b1650e4c-90c6-4c75-8ee0-d7760f573320n@googlegroups.com> <cb283478-8b61-4270-919e-f7b224ad4784n@googlegroups.com>
<fbe6d779-989a-4423-9e40-3bbeb2c3b43en@googlegroups.com> <6155ac7f$0$6454$426a34cc@news.free.fr>
<bf1b0481-dd93-41be-b966-81e330e182d1n@googlegroups.com> <8f565c79-f54c-4e60-a048-9bedde8757cfn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5d9712bf-6ac7-4bba-b9f0-13be9d0a9ef4n@googlegroups.com>
Subject: Re: ANN: Adare_net Ada network lib
From: danielch...@gmail.com (Daniel Norte Moraes)
Injection-Date: Thu, 30 Dec 2021 21:30:55 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 54
 by: Daniel Norte Moraes - Thu, 30 Dec 2021 21:30 UTC

Em terça-feira, 12 de outubro de 2021 às 16:44:33 UTC-3, ehh.p...@gmail.com escreveu:
> On Tuesday, October 12, 2021 at 5:49:58 PM UTC+2, Shark8 wrote:
> > On Thursday, September 30, 2021 at 6:24:34 AM UTC-6, DrPi wrote:
> > > Le 27/09/2021 à 06:32, Daniel Norte Moraes a écrit :
> > > > Em quarta-feira, 22 de setembro de 2021 às 08:07:06 UTC-3, joak...
> > > >> onsdag 22 september 2021 kl. 11:16:13 UTC+2 skrev AdaMagica:
> > > >>>> I agree with you Nicolas, they should not be declared Pure. It makes the GNAT compiler check for example that there are no global variables used in the packages but other than that, they (I didn't check all the packages) are not Pure. The pragma Pure worked as expected in Ada83 but the meaning and utility of it disappeared with the Ada95 standard.
> > > >>> There is no pragma Pure in Ada 83.
> > > >> Thanks for clearing that up AdaMagica, I wasn't aware.
> > > >>
> > > >> Best regards,
> > > >> Joakim
> > > >
> > > > Really? They _are_ Pure.
> > > > I used linters extensively to result in this. one of these linters made hard use o gnat and gprbuild as his backend.
> > > > Remember this is target Ada 2012 (update 2016) and beyond => there is
> > > > no guarantee of operation for Ada versions earlier than Ada2012.
> > > In a Pure package, shouldn't the subprograms also be Pure ?
> > Yes...ish.
> > As mentioned upthread, you can lie about there being no internal state.... and this can still be "interfacially" pure; consider a FIBONACCI function which is memoized (Function F(N: Positive) return Positive) -- internally it has the memo to look up F(N), which is obviously state, but externally any F(X) will return the same value given the same inputs. / Perhaps we should allow aspect PURE on subprograms, as well as introduce an aspect STATIC [having (user-defined) static-functions would, in particular, allow some nice "macro-lite" functionality].
> Well, aspect Static for expression functions is coming...
> http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0075-1.txt?rev=1.15
> http://ada-auth.org/standards/2xrm/html/RM-4-9.html
> http://ada-auth.org/standards/2xrm/html/RM-6-8.html
>
>
> --
> ~egilhh

Thanks! I Followed Your Suggestion!
Now that there is good support for ada202x in gcc-12, we have started solving the reported issues and adding everyone's suggestions.

https://gitlab.com/daresoft/network/adare_net/-/tree/202x

Beer with us!

Best Wishes and Happy New Year(!),
Dani.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor