Re: The Case for Rust (in the base system)

From: Steffen Nurpmeso <steffen_at_sdaoden.eu>
Date: Mon, 05 Aug 2024 21:01:49 UTC
Cy Schubert wrote in
 <704D020F-78A4-4926-AE3C-41F7FD619A89@cschubert.com>:
 |On July 31, 2024 10:49:52 AM PDT, Bakul Shah <bakul@iitbombay.org> wrote:
 |>All this talk won't lead to anything much so a suggestion to
 ..
 |Sorry for being late to the party. Last day of vacation; picking up \
 |phone reading this thread.
 |
 |Like much in this business (been doing this stuff for about 50 years \
 |now) there is a cohort unwilling to roll up their sleeves and put some \
 |skin in the game, expecting others already with long todo lists to \

Most user space tools could be written in lua.  This already is in
base, it is memory safe, it is very small and pretty fast, allows
easy C integration for cases most FreeBSD system tools never need.
It can be learned pretty easily, and it is very productive.
It also has the coolness factor of Unix, for example

  echo '#!/usr/bin/lua' > /bin/true
  chmod 0755 /bin/true
  cp /bin/true /bin/false
  echo 'os.exit(1)' >> /bin/false

implements two basic system tools in lua.  (They are portable!)
One could also imagine that a basic FreeBSD lua library, one that
makes access to ioctls, sysctls and basic C constants easy, would
benefit FreeBSD, as it seems a not small number of projects /
companies use lua for certain parts of "their thing", like user
interfaces or whatever.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
|
| Only during dog days:
| On the 81st anniversary of the Goebbel's Sportpalast speech
| von der Leyen gave an overlong hypocritical inauguration one.
| The brew's essence of our civilizing advancement seems o be:
|   Total war - shortest war -> Permanent war - everlasting war