ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	 James Bottomley <James.Bottomley@hansenpartnership.com>,
	 Christoph Hellwig <hch@infradead.org>,
	ksummit@lists.linux.dev,
	 ksummit <ksummit-discuss@lists.linuxfoundation.org>,
	 Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Subject: Re: [Ksummit-discuss] [TECH TOPIC] Rust
Date: Mon, 20 Jun 2022 15:53:48 +0200	[thread overview]
Message-ID: <CACRpkdZiYweLs7b4pGCSO_gPghpDGA-jC+ctKrtUmi19oXiyFA@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdW02U7qdvGNqijyg_5NbJ3aKyCB8j26FjeAMR-aMY_bDQ@mail.gmail.com>

On Sun, Jun 19, 2022 at 9:08 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Sun, Jun 19, 2022 at 3:49 PM Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote:

> > Time to invent a C-like version of rust ? :-) Jokes aside, as far as I
> > understand the syntax is different from C because it was inspired by
> > other languages, not out of a desire to be anti-C. I could be wrong
> > though, and it doesn't really matter anyway, I doubt there's anything we
> > could do there.
>
> When reading "things which could have been C like", I had the exact
> same thought ;-)
>
> In the past, many new paradigms were implemented in a variety of new
> languages, usually inspired by other languages (e.g. some looked like
> C, others like Pascal).

Some background as I understand it:

The first "real" operating system (using virtual memory etc)
for the Atlas Machine supervisor in 1962 was AFAICT implemented in
Atlas autocode which was a dialect of ALGOL, which was the
lingua franca at the time. In the meantime, ALGOL inspired
CPL -> BCPL -> B -> C.

Pascal was influenced directly from ALGOL as can be seen in its
keeping of BEGIN and END and also used in some operating systems.

The language family is referred to as "imperative languages", mostly
by those who do not like this language family.

Since this time, almost all operating systems were written in
languages derived from ALGOL one way or the other, like Linux.

There are exceptions, many of them failed visions, such as the Japanese
fifth generation computer that wrote the operating system in KL-1
(kernel language one) a dialect of Prolog. The partially successful
would be LISP as used in the Lisp machines.

Rust on the other hand had its first compiler written in OCaml, clearly
the author liked that language and it shows (e.g. the let keyword clearly
comes from OCaml).

OCaml has a different lineage: ISWIM -> ML -> Caml -> OCaml
based on the article in 1966 by Peter Landin on Lambda calculus in
programming languages. OCaml is loosely in the same language family as
Haskell or Miranda. This family is called functional languages.

My intuitive appraisal is that the ALGOL family has traditionally
been appreciated by engineers and the Lambda calculus-functional family
has been appreciated by mathematicians. (From here comes many jokes
about X = X + 1 being insane maths etc, people.)

Rust actually tries to join these two families taking some syntax
from both. For example adding the keyword mut is a clear compromise.
This article section 2 overview of Rust is very nice:
https://dl.acm.org/doi/fullHtml/10.1145/3443420
(The rest of the article is for the mathematically inclined, i.e. not me.)

Maybe this should be a blog @people.kernel.org rather than a mailing
list post.

Yours,
Linus Walleij

  parent reply	other threads:[~2022-06-20 13:54 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-18 20:33 [TECH TOPIC] Rust Miguel Ojeda
2022-06-18 20:42 ` Laurent Pinchart
2022-06-18 20:42   ` [Ksummit-discuss] " Laurent Pinchart
2022-06-18 20:44   ` Laurent Pinchart
2022-06-18 20:44     ` [Ksummit-discuss] " Laurent Pinchart
2022-06-18 20:49   ` Miguel Ojeda
2022-06-19  6:13   ` Christoph Hellwig
2022-06-19  6:13     ` [Ksummit-discuss] " Christoph Hellwig
2022-06-19 10:04     ` Laurent Pinchart
2022-06-19 10:04       ` [Ksummit-discuss] " Laurent Pinchart
2022-06-19 12:56       ` James Bottomley
2022-06-19 12:56         ` [Ksummit-discuss] " James Bottomley
2022-06-19 13:19         ` Jens Axboe
2022-06-19 13:19           ` [Ksummit-discuss] " Jens Axboe
2022-06-19 13:53           ` Laurent Pinchart
2022-06-19 13:53             ` [Ksummit-discuss] " Laurent Pinchart
2022-06-19 14:27             ` James Bottomley
2022-06-19 14:27               ` [Ksummit-discuss] " James Bottomley
2022-06-19 14:45               ` [MAINTAINER SUMMIT] Are we becoming too fearful? [was Re: [TECH TOPIC] Rust] James Bottomley
2022-06-19 14:45                 ` [Ksummit-discuss] " James Bottomley
2022-06-22  9:59                 ` Linus Walleij
2022-06-22 10:57                   ` Laurent Pinchart
2022-06-22 12:01                     ` Linus Walleij
2022-06-22 12:09                       ` Laurent Pinchart
2022-06-22 23:13                 ` NeilBrown
2022-06-23 11:37                   ` James Bottomley
2022-06-25 12:03                 ` [Ksummit-discuss] " Mauro Carvalho Chehab
2022-06-25 11:45               ` [Ksummit-discuss] [TECH TOPIC] Rust Mauro Carvalho Chehab
2022-06-25 14:15                 ` James Bottomley
2022-06-25 16:18                   ` Mauro Carvalho Chehab
2022-06-25 22:29                 ` Linus Walleij
2022-06-26  2:52                   ` Theodore Ts'o
2022-06-26  3:18                     ` Al Viro
2022-06-19 13:49         ` Laurent Pinchart
2022-06-19 13:49           ` [Ksummit-discuss] " Laurent Pinchart
2022-06-19 19:08           ` Geert Uytterhoeven
2022-06-19 19:08             ` [Ksummit-discuss] " Geert Uytterhoeven
2022-06-19 20:57             ` Matthew Wilcox
2022-06-20 13:53             ` Linus Walleij [this message]
2022-06-20 14:08             ` James Bottomley
2022-06-21 15:11           ` Dan Carpenter
2022-06-23 10:58             ` [TECH TOPIC] Why is devm_kzalloc() harmful and what can we do about it Laurent Pinchart
2022-06-23 11:24               ` Dan Carpenter
2022-06-23 11:31                 ` Laurent Pinchart
2022-06-21  9:49 ` [TECH TOPIC] Rust David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACRpkdZiYweLs7b4pGCSO_gPghpDGA-jC+ctKrtUmi19oXiyFA@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=geert@linux-m68k.org \
    --cc=hch@infradead.org \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=ksummit@lists.linux.dev \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).