Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

It is the theory which decides what can be observed. -- Albert Einstein


devel / comp.lang.ada / Re: Currency Library for Ada?

SubjectAuthor
* Currency Library for Ada?A.J.
+* Re: Currency Library for Ada?J-P. Rosen
|`- Re: Currency Library for Ada?A.J.
`* Re: Currency Library for Ada?Devin Rozsas
 `- Re: Currency Library for Ada?Devin Rozsas

1
Currency Library for Ada?

<30b4ef1e-cca5-4837-9228-640e66d0d96bn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:590c:0:b0:3e3:8172:ff21 with SMTP id 12-20020ac8590c000000b003e38172ff21mr775742qty.8.1681395447653;
Thu, 13 Apr 2023 07:17:27 -0700 (PDT)
X-Received: by 2002:a81:e443:0:b0:54c:fd7:476e with SMTP id
t3-20020a81e443000000b0054c0fd7476emr1514154ywl.3.1681395447393; Thu, 13 Apr
2023 07:17:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!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: Thu, 13 Apr 2023 07:17:27 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=128.175.8.12; posting-account=es6tdQoAAABG0JD-zg4XEg34h5fepyKP
NNTP-Posting-Host: 128.175.8.12
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <30b4ef1e-cca5-4837-9228-640e66d0d96bn@googlegroups.com>
Subject: Currency Library for Ada?
From: ianozia@gmail.com (A.J.)
Injection-Date: Thu, 13 Apr 2023 14:17:27 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1683
 by: A.J. - Thu, 13 Apr 2023 14:17 UTC

Does anyone know if Ada has a currency library? Ideally one that includes the ISO 4217 currency standard?

I've seen currency referenced as examples in the Style Guide[1] and other documentation[2] but I'm having trouble searching for anything concrete (and googling "ada" and "currency" has not helped due to some unfortunately named crypto stuff).

I'm also interested in if there's any ada libraries for iso 3166 (country codes).

If none of this exists, that's fine, it just gives me a reason to build it out myself, but I don't want duplication of effort :)

AJ.

[1] https://ada-lang.io/docs/style-guide/Reusability/#guideline-16
[2] https://docs.adacore.com/live/wave/aunit/html/aunit_cb/aunit_cb/fixture.html

Re: Currency Library for Ada?

<u19ekf$12qdp$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rosen@adalog.fr (J-P. Rosen)
Newsgroups: comp.lang.ada
Subject: Re: Currency Library for Ada?
Date: Thu, 13 Apr 2023 19:37:19 +0200
Organization: Adalog
Lines: 10
Message-ID: <u19ekf$12qdp$1@dont-email.me>
References: <30b4ef1e-cca5-4837-9228-640e66d0d96bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 13 Apr 2023 17:37:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7971ff029f65857f5c2dc4216a80a1f3";
logging-data="1141177"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/lJel3DShrSKe1zM88Dkt7"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Cancel-Lock: sha1:Pf8IqzyrbPain48UYLdQBsY7XZ4=
In-Reply-To: <30b4ef1e-cca5-4837-9228-640e66d0d96bn@googlegroups.com>
Content-Language: en-US, fr
 by: J-P. Rosen - Thu, 13 Apr 2023 17:37 UTC

Le 13/04/2023 à 16:17, A.J. a écrit :
> I'm also interested in if there's any ada libraries for iso 3166 (country codes).
It's a standard package, Ada.Locales

--
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
https://www.adalog.fr https://www.adacontrol.fr

Re: Currency Library for Ada?

<5fdd4e3b-1f0d-4337-a801-01e6dbce6de5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:622a:1ba9:b0:3d5:49eb:4d1e with SMTP id bp41-20020a05622a1ba900b003d549eb4d1emr1019091qtb.1.1681409539544;
Thu, 13 Apr 2023 11:12:19 -0700 (PDT)
X-Received: by 2002:a25:ca07:0:b0:b6c:48c3:3c1c with SMTP id
a7-20020a25ca07000000b00b6c48c33c1cmr2033987ybg.13.1681409539256; Thu, 13 Apr
2023 11:12:19 -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: Thu, 13 Apr 2023 11:12:19 -0700 (PDT)
In-Reply-To: <u19ekf$12qdp$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=128.175.8.12; posting-account=es6tdQoAAABG0JD-zg4XEg34h5fepyKP
NNTP-Posting-Host: 128.175.8.12
References: <30b4ef1e-cca5-4837-9228-640e66d0d96bn@googlegroups.com> <u19ekf$12qdp$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5fdd4e3b-1f0d-4337-a801-01e6dbce6de5n@googlegroups.com>
Subject: Re: Currency Library for Ada?
From: ianozia@gmail.com (A.J.)
Injection-Date: Thu, 13 Apr 2023 18:12:19 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: A.J. - Thu, 13 Apr 2023 18:12 UTC

J-P. Rosen,

On Thursday, April 13, 2023 at 1:37:22 PM UTC-4, J-P. Rosen wrote:
> It's a standard package, Ada.Locales

Thanks for finding that! This looks like a good foundation for validating county codes, though it doesn't appear to contain an index of them, or expand into the 3-letter codes (e.g. USA vs US). I was looking into the implementation, and the GNAT[1] runtime seems to be true to spec, while the Drake runtime[2] looks like it's expanding into closer to what I'm looking for with its iso639 tables [3]. I may be able to build on this set, though and use the existing structures.

AJ

[1] https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/libgnat/a-locale.ads & https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/libgnat/a-locale.adb
[2] https://github.com/ytomino/drake/blob/master/source/environment/a-locale.ads
[3] https://github.com/ytomino/drake/blob/master/source/environment/a-locale.adb#L60

Re: Currency Library for Ada?

<5cd9b9e2-03ea-4fd7-ad93-0ea7c745fd8fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:622a:10:b0:3ec:c208:520d with SMTP id x16-20020a05622a001000b003ecc208520dmr1582886qtw.4.1683223152000;
Thu, 04 May 2023 10:59:12 -0700 (PDT)
X-Received: by 2002:a81:4509:0:b0:54e:8b9a:65be with SMTP id
s9-20020a814509000000b0054e8b9a65bemr1774392ywa.6.1683223151712; Thu, 04 May
2023 10:59:11 -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: Thu, 4 May 2023 10:59:11 -0700 (PDT)
In-Reply-To: <30b4ef1e-cca5-4837-9228-640e66d0d96bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=185.153.176.189; posting-account=HY5GYgoAAABzJbJ0lJA2XYPpA3wGVsWQ
NNTP-Posting-Host: 185.153.176.189
References: <30b4ef1e-cca5-4837-9228-640e66d0d96bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5cd9b9e2-03ea-4fd7-ad93-0ea7c745fd8fn@googlegroups.com>
Subject: Re: Currency Library for Ada?
From: devinrozsas@gmail.com (Devin Rozsas)
Injection-Date: Thu, 04 May 2023 17:59:11 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2639
 by: Devin Rozsas - Thu, 4 May 2023 17:59 UTC

Em quinta-feira, 13 de abril de 2023 às 11:17:28 UTC-3, A.J. escreveu:
> Does anyone know if Ada has a currency library? Ideally one that includes the ISO 4217 currency standard?
>
> I've seen currency referenced as examples in the Style Guide[1] and other documentation[2] but I'm having trouble searching for anything concrete (and googling "ada" and "currency" has not helped due to some unfortunately named crypto stuff).
>
> I'm also interested in if there's any ada libraries for iso 3166 (country codes).
>
> If none of this exists, that's fine, it just gives me a reason to build it out myself, but I don't want duplication of effort :)
>
> AJ.
>
> [1] https://ada-lang.io/docs/style-guide/Reusability/#guideline-16
> [2] https://docs.adacore.com/live/wave/aunit/html/aunit_cb/aunit_cb/fixture.html

I'm actually making something like this, but it isn't complete, and uses Lua scripts to handle different currencies (and formating).
It also has location support (country, state, city) and language support, including message translation (so the program can output stuff in the user's language). For this, TOML is used.

It uses Glottolog codes to identify languages, and FIFA codes for the countries.

I paused the development because I'm focusing on another project that has been causing me some headaches lately.
It's broken and cannot deliver what you want - as of now.

Re: Currency Library for Ada?

<0f7fde85-34aa-48b0-9bd4-77f1386d99dbn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ad4:4e29:0:b0:61b:738e:cd80 with SMTP id dm9-20020ad44e29000000b0061b738ecd80mr1337282qvb.7.1683224868192;
Thu, 04 May 2023 11:27:48 -0700 (PDT)
X-Received: by 2002:a25:1dc2:0:b0:b99:a54e:a61 with SMTP id
d185-20020a251dc2000000b00b99a54e0a61mr504851ybd.1.1683224867770; Thu, 04 May
2023 11:27:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.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, 4 May 2023 11:27:47 -0700 (PDT)
In-Reply-To: <5cd9b9e2-03ea-4fd7-ad93-0ea7c745fd8fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=185.153.176.189; posting-account=HY5GYgoAAABzJbJ0lJA2XYPpA3wGVsWQ
NNTP-Posting-Host: 185.153.176.189
References: <30b4ef1e-cca5-4837-9228-640e66d0d96bn@googlegroups.com> <5cd9b9e2-03ea-4fd7-ad93-0ea7c745fd8fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0f7fde85-34aa-48b0-9bd4-77f1386d99dbn@googlegroups.com>
Subject: Re: Currency Library for Ada?
From: devinrozsas@gmail.com (Devin Rozsas)
Injection-Date: Thu, 04 May 2023 18:27:48 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 4
 by: Devin Rozsas - Thu, 4 May 2023 18:27 UTC

> I'm actually making something like this, but it isn't complete, and uses Lua scripts to handle different currencies (and formating).

By the way, the code is here: https://sr.ht/~devin/Azurite-Ada/

Again, it's incomplete, and probably isn't exactly what you're looking for.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor