Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"The Computer made me do it."


devel / comp.lang.ada / Ada vs. Rust for low level system software

SubjectAuthor
* Ada vs. Rust for low level system softwareNasser M. Abbasi
+* Re: Ada vs. Rust for low level system softwareDmitry A. Kazakov
|`* Re: Ada vs. Rust for low level system softwareLuke A. Guest
| `- Re: Ada vs. Rust for low level system softwareDmitry A. Kazakov
+- Re: Ada vs. Rust for low level system softwareJeffrey R.Carter
`- Re: Ada vs. Rust for low level system softwareKevin Chadwick

1
Ada vs. Rust for low level system software

<ulbbtp$1evv$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nma@12000.org (Nasser M. Abbasi)
Newsgroups: comp.lang.ada
Subject: Ada vs. Rust for low level system software
Date: Tue, 12 Dec 2023 22:28:40 -0600
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <ulbbtp$1evv$1@dont-email.me>
Reply-To: nma@12000.org
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Dec 2023 04:28:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e2a3a31bbf26129b522e058138646c78";
logging-data="48127"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199wvtvPGqiLt/9E03sLOAy"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:vFpnGLSf4oAriGMLZUTsSXXMoY0=
Content-Language: en-US
 by: Nasser M. Abbasi - Wed, 13 Dec 2023 04:28 UTC

Has anyone made study of difference between Rust and Ada for low level hardware
system software?

Since Ada is mainly used in this area, why has Rust, which is much
younger language, and target this same area has gained so much
popularity but not Ada?

https://dl.acm.org/doi/fullHtml/10.1145/3551349.3559494

"Rust is a rising programming language designed to build system
software [4, 10, 20]. On the one hand, Rust offers access to and control
of the low-level system resources. On the other hand,
unlike conventional systems programming languages, Rust
ensures memory and concurrency safety"

"Rust often inserts bound checks at the execution time to rule
out out-of-bound accesses"

Well, does not Ada also "ensures memory and concurrency safety"
and checks for out-of-bound accesses?

I am just wondering what does Rust brings to the table that
Ada does not have and why is Rust becoming so popular when
Ada is not.

I never used Rust myself, but used Ada.

Any one done study comparing the two languages or knows
both that can give some comments on this?

--Nasser

Re: Ada vs. Rust for low level system software

<ulbptn$35lm$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.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: Ada vs. Rust for low level system software
Date: Wed, 13 Dec 2023 09:27:34 +0100
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <ulbptn$35lm$1@dont-email.me>
References: <ulbbtp$1evv$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Dec 2023 08:27:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="103a7d2d41e48b7ed5b154aa9dd2d92e";
logging-data="104118"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bOT/deVm9GGl9ZZwtAaVfYcypHeJO3xo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:MMLk3miacZGJF0vpuDlQcr/Pwpw=
In-Reply-To: <ulbbtp$1evv$1@dont-email.me>
Content-Language: en-US
 by: Dmitry A. Kazakov - Wed, 13 Dec 2023 08:27 UTC

On 2023-12-13 05:28, Nasser M. Abbasi wrote:
> Has anyone made study of difference between Rust and Ada for low level
> hardware
> system software?

What for? Any language comparisons lost their meaning long ago as the
whole language business degraded into hobbyist/corporate bullshit.

> Since Ada is mainly used in this area, why has Rust, which is much
> younger language, and target this same area has gained so much
> popularity but not Ada?

Because it is always someone's arbitrary decision.

> https://dl.acm.org/doi/fullHtml/10.1145/3551349.3559494
>
> "Rust is a rising programming language designed to build system
> software [4, 10, 20]. On the one hand, Rust offers access to and control
> of the low-level system resources. On the other hand,
> unlike conventional systems programming languages, Rust
> ensures memory and concurrency safety"
>
> "Rust often inserts bound checks at the execution time to rule
> out out-of-bound accesses"
>
> Well, does not Ada also "ensures memory and concurrency safety"
> and checks for out-of-bound accesses?
>
> I am just wondering what does Rust brings to the table that
> Ada does not have and why is Rust becoming so popular when
> Ada is not.

In my view Rust brings nothing and moreover is a huge step back
comparing to Ada. Its main and only idea is to force the programmer to
explicitly manage memory through references where Ada simply uses object
notation regardless the mechanism doing same under the hood.

Safety comes not through references but by limiting the number of cases
you must resort to using dynamic allocation for statically scoped
objects. E.g. Unbounded_String in Ada.

As for my major concern - the type system and the abstraction mechanisms
in general, there is nothing in Rust at all.

Then of course Rust continues the worst practices tried by Ada and C++:
templates/generics, macros.

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

Re: Ada vs. Rust for low level system software

<ulbqti$385v$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spam.jrcarter.not@spam.acm.org.not (Jeffrey R.Carter)
Newsgroups: comp.lang.ada
Subject: Re: Ada vs. Rust for low level system software
Date: Wed, 13 Dec 2023 09:44:34 +0100
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <ulbqti$385v$1@dont-email.me>
References: <ulbbtp$1evv$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Dec 2023 08:44:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7474f24d15ecaaee5b233c0a4c7fb262";
logging-data="106687"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/oPon4LM9PbeF3gNtpiFRxbGN9xif5b8k="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:/yEoD35K9WtgqRXEutkSfVlVV2Y=
In-Reply-To: <ulbbtp$1evv$1@dont-email.me>
Content-Language: en-US
 by: Jeffrey R.Carter - Wed, 13 Dec 2023 08:44 UTC

On 2023-12-13 05:28, Nasser M. Abbasi wrote:
> Has anyone made study of difference between Rust and Ada for low level hardware
> system software?

You might be interested in this discussion:

https://www.reddit.com/r/ada/comments/18c2nr4/where_is_ada_safer_than_rust/

--
Jeff Carter
"I used to manufacture escalator shoes for people
who were nauseous in elevator shoes."
Take the Money and Run
142

Re: Ada vs. Rust for low level system software

<ulbsds$3foc$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: laguest@archeia.com (Luke A. Guest)
Newsgroups: comp.lang.ada
Subject: Re: Ada vs. Rust for low level system software
Date: Wed, 13 Dec 2023 09:10:20 +0000
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <ulbsds$3foc$1@dont-email.me>
References: <ulbbtp$1evv$1@dont-email.me> <ulbptn$35lm$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Dec 2023 09:10:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c0b0708571a78581d72eec11af88f613";
logging-data="114444"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19eifB4CdXHptZRAQgP3iNRo8GKPEEkcNY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:m9Jtjd1wsifpu8kqKKszECUeY2U=
In-Reply-To: <ulbptn$35lm$1@dont-email.me>
Content-Language: en-GB
 by: Luke A. Guest - Wed, 13 Dec 2023 09:10 UTC

On 13/12/2023 08:27, Dmitry A. Kazakov wrote:

> What for? Any language comparisons lost their meaning long ago as the
> whole language business degraded into hobbyist/corporate bullshit.

True.

>> Since Ada is mainly used in this area, why has Rust, which is much
>> younger language, and target this same area has gained so much
>> popularity but not Ada?

I would say because they aimed to be a C++ replacement.

> Because it is always someone's arbitrary decision.

True.

> Then of course Rust continues the worst practices tried by Ada and C++:
> templates/generics, macros.

What's the alternative to generics?

Re: Ada vs. Rust for low level system software

<ulbuup$3t8p$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.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: Ada vs. Rust for low level system software
Date: Wed, 13 Dec 2023 10:53:28 +0100
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <ulbuup$3t8p$1@dont-email.me>
References: <ulbbtp$1evv$1@dont-email.me> <ulbptn$35lm$1@dont-email.me>
<ulbsds$3foc$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Dec 2023 09:53:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="103a7d2d41e48b7ed5b154aa9dd2d92e";
logging-data="128281"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18OBKk7gj9OLjIv0y1FoGjRhJU/coH4jw0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:zRbaPmrZYIeCgNFYz0KHnRrZV6k=
Content-Language: en-US
In-Reply-To: <ulbsds$3foc$1@dont-email.me>
 by: Dmitry A. Kazakov - Wed, 13 Dec 2023 09:53 UTC

On 2023-12-13 10:10, Luke A. Guest wrote:
> On 13/12/2023 08:27, Dmitry A. Kazakov wrote:

>> Then of course Rust continues the worst practices tried by Ada and
>> C++: templates/generics, macros.
>
> What's the alternative to generics?

The question is what is the alternative to static/parametric
polymorphism. The answer is dynamic polymorphism.

1. Dynamic polymorphism in Ada is as static as generics are. No run-time
penalty unlikely to C++.

2. It covers cases generics do not, e.g. you can have class-wide
run-time objects and proper class-wide subprograms.

3. It supports modular programming en large. E.g. you can put a class
member in a dynamically linked library.

4. It is fully testable. Generics are fundamentally non-testable, only
concrete instances are.

5. It is does not create a meta language layer with complexities for the
compiler and programmer. Advanced generic code is close to unmaintainable.

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

Re: Ada vs. Rust for low level system software

<ulpf9o$3giln$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kc-usenet@chadwicks.me.uk (Kevin Chadwick)
Newsgroups: comp.lang.ada
Subject: Re: Ada vs. Rust for low level system software
Date: Mon, 18 Dec 2023 12:52:08 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <ulpf9o$3giln$1@dont-email.me>
References: <ulbbtp$1evv$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 18 Dec 2023 12:52:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="40b6aeb1cd7fbb4911b0e216c85dfebb";
logging-data="3689143"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18OaHcihYssy7aul5aayGbkari+qflE7zA="
User-Agent: PhoNews/3.13.2 (Android/13)
Cancel-Lock: sha1:wbQFPzmxmlGQwhR7YY80lf1bvhE=
In-Reply-To: <ulbbtp$1evv$1@dont-email.me>
 by: Kevin Chadwick - Mon, 18 Dec 2023 12:52 UTC

>Since Ada is mainly used in this area, why has Rust, which is much
>younger language, and target this same area has gained so much
>popularity but not Ada?
>

Adas ranged type system coupled with it's excellent record overlays make Ada
a much better choice than Rust. For safe and easy hardware register and
network protocols.

I can't imagine that ownership for data structures on a single runtime is
the reason (before SPARK got support).

A lot of Ada code will not run on any runtime but Rust also has nostd for
embedded use.

They often say Rust has excellent C interfacing support but Adas appears to
be even better.

Perhaps it is ease of use and guide availability which has improved or
simply perception and a lack of knowledge about Ada.

Rather than language merits. A lot of people only care about job
availabilty, money and library availability today but might consider a risk
if they perceive a future demand increase.

As to why the likes of Google and Microsoft are putting money behind it when
Ada would have been a better investment. You would have to ask them. Tell
me why Google continues to write security sensitive code like matter in
C++? When it could be written in Ada or Rust with a C binding.

Even javascript engines like Mozillas spidermonkey still has so little Rust
code. Though Mozilla does have more financial concerns and it's competitors
are already trying to say their browsers are faster. Yet Googles websites
use umpteen domains slowing browsing down anyway.

--
Regards, Kc

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor