9front - general discussion about 9front
 help / color / mirror / Atom feed
From: "Ethan Gardener" <eekee57@fastmail.fm>
To: 9front@9front.org
Subject: Re: [9front] rio wishlists
Date: Fri, 24 Jan 2020 00:39:52 +0000	[thread overview]
Message-ID: <2c66fdc0-bc0c-4183-b054-f5a85904d452@www.fastmail.com> (raw)
In-Reply-To: <alpine.LNX.2.00.2001232337530.7981@phi>

On Thu, Jan 23, 2020, at 9:23 PM, hiro wrote:
> does everybody understand what i mean with higher granularity
> namespace sharing? it might be non-obvious if you don't know the linux
> mount namespaces and their features.

I think so. With my idea, the sections of the namespace you could change with env vars are fixed at compile time. I mean there might be just one var for cons kbd mouse and draw, or there might be two, but that's about it. File namespacing allows all sorts of detail changes which the program/library authors may not have considered.

> i might be all wrong about this, but then i still would like to see a
> more generalized mechanism that is self-similar and orthogonal to
> everything else.
>

On Thu, Jan 23, 2020, at 10:42 PM, Julius Schmidt wrote:
> One mechanism would be turn the namespace into a tree of commands, which 
> can then be shared only partially.
> For instance, /dev could be a node in the tree which is shared among 
> most/all programs.

Sounds like what I intend for my Forth, but that's an entirely different concept. :)

> Another approach would be to give mount/bind commands a number indicating 
> priority, but I don't have a clear picture how that would work.

I don't think I quite understand either of these, but they inspired this "namespace priorities" idea: A process may have multiple namespaces, each with a different priority. Files are searched for in the highest-priority namespace first, then if they're not found, the next highest, etc. Rio would then pass two namespaces to each of its children, the global namespace it itself inherited as a low priority, and a high-priority private namespace with only its window-specific files. (This also seems to provide a better means of union mounting.

What happens if Rio inherits multiple namespaces in this scheme? Some options:
A: They could all look like one single namespace with rio unable to distinguish between them.
B: Priorities are numbers, the priorities of inherited namespaces are reduced.
C: Namespaces occupy a linked list. A namespace's priority is simply determined by its position in the list.

C is by far my favourite, linked lists are so powerful in this context. One of the biggest reasons I like Forth so much is the power given by the dictionary being a linked list.

B has the same problem as BASIC and APL with their line numbers and goto. :)

Both B and C have a little problem: What *exactly* is inherited by child processes? Are the numbers/is the list copied to each child, or can the child mess with the priorities of its parent? Grandparent? I suspect it would be enough to always copy the priorities, but I'm tired and need to stop thinking now.


  reply	other threads:[~2020-01-24  0:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <134490038A9377D966659F986F257F34@ewsd.inri.net>
2020-01-17 14:43 ` [9front] Bounties Ethan Gardener
2020-01-17 16:05   ` kvik
2020-01-17 21:55     ` Silas McCroskey
2020-01-18  0:23       ` rio wishlists Lyndon Nerenberg
2020-01-18  0:40         ` [9front] " Stanley Lieber
     [not found]           ` <CAFSF3XNfdhb+ViOBmVMQ+5+PnSjCeD+9a9p9e4Ug0EX9==aZvw@mail.gmail.com>
2020-01-18  8:19             ` hiro
2020-01-18  9:53               ` Steve Simon
2020-01-18 10:19                 ` hiro
2020-01-21  8:54               ` Ethan Gardener
2020-01-21  8:57         ` Ethan Gardener
2020-01-21  9:49           ` hiro
2020-01-22 16:30             ` Ethan Gardener
2020-01-22 16:47               ` hiro
2020-01-23 15:09                 ` Ethan Gardener
     [not found]                   ` <CAK0pxsHVpyae1+teTSOAFp=nBoq_r7-aKexh_X=hEDe7hUcReA@mail.gmail.com>
     [not found]                     ` <CAK0pxsFDk=C_+37tKzU=U-TMQLTPcW6MOQ1sgKNBrYhWrj4Bwg@mail.gmail.com>
2020-01-23 18:12                       ` Marshall Conover
2020-01-23 21:23                         ` hiro
2020-01-23 22:42                           ` Julius Schmidt
2020-01-24  0:39                             ` Ethan Gardener [this message]
2020-01-24  0:44                               ` Ethan Gardener
2020-01-23 23:50                         ` Ethan Gardener
2020-01-24  0:59                           ` Jeremy Jackins
2020-01-24 10:04                             ` hiro
2020-01-21  8:37     ` [9front] Bounties Ethan Gardener
2020-01-22 17:04     ` Ori Bernstein

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=2c66fdc0-bc0c-4183-b054-f5a85904d452@www.fastmail.com \
    --to=eekee57@fastmail.fm \
    --cc=9front@9front.org \
    /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).