9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "ibrahim via 9fans" <9fans@9fans.net>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] suggestion : new service targets for plan9
Date: Fri, 28 Jan 2022 06:38:15 -0500	[thread overview]
Message-ID: <16433698950.b3ce7.20469@composer.9fans.topicbox.com> (raw)
In-Reply-To: <4F7E620B5C3CAA867792DA6F6DB5DCE7@eigenstate.org>

[-- Attachment #1: Type: text/plain, Size: 4075 bytes --]

On Friday, 28 January 2022, at 6:22 AM, ori wrote:
> It'd probably make sense to generalize: 'service=foo'
in plan9.ini could run /bin/^$foo^rc.

This is an excerpt for one experimental gdi from profile

...
ramfs
font = /lib/font/bit/lucida/unicode.10.font
upas/fs
fn cd { builtin cd $* && awd }  # for acme
service=kiosk
case kiosk
echo -n accelerated > '#m/mousectl'
echo -n 'res 3' > '#m/mousectl'
prompt=('term% ' '      ')
fn term%{ $* }
#       cat /sys/lib/kbmap/de > /dev/kbmap
exec /usr/glenda/proj/gdi/gdi
# exec rio -f /lib/font/bit/lucida/unicode.10.font
case terminal
plumber
echo -n accelerated > '#m/mousectl'
echo -n 'res 3' > '#m/mousectl'
prompt=('term% ' '      ')
fn term%{ $* }
exec rio -f /lib/font/bit/lucida/unicode.10.font
#       exec /usr/glenda/proj/gdi/gdi
...

I defined kiosk as a service target inside profile and by editing profile before starting I can switch between the new window system and rio both can run inside each other. By defining well known targets like kiosk or desktop aso the compilation would get easier and due to the existing environment variable the running main window system would be known to client apps (even if not necessary)On Friday, 28 January 2022, at 6:22 AM, ori wrote:

> Why would another layer be help?

Libmemdraw is not very fast, and profiling+optimization
will be needed to solve that, but I'm not sure what an
additional layer is supposed to do there.

The extra layer would make sharing of the optimized framebuffer device usable for both window managers directly using this fbdev and also for devdraw (memlayer, memdraw). In last instance devdraw does also render to the graphics memory so this layer would be shared by both. This extra layer would make sure that only one application has direct access to the framebuffer while the other gets multiplexed. I did the multiplexing in my window manager for rio so its possible to run my window manager inside rio and vice versa. The alternative would be a parallel fbdev with the risk that both devdraw as well as this dev driver try to write concurently to the video memory. The changes to memlayer memdraw devdraw would be minimalistic but are not really necessary. Those changes would make both window systems benefit by a shared code base and improvements in this code base while totally transparent for any application running on the system.


On Friday, 28 January 2022, at 6:22 AM, ori wrote:
> Sure.  It fits -- same place as kbdfs -- but someone
needs to come up with the event encoding, write the
'touchfs', and implement the readers that toss events
down channels.

Nothing insurmountable, just needs someone who cares
about it to roll up their sleeves and write code.

if(initdraw(nil, nil, argv0) < 0)
sysfatal("%s: %r", argv0);
if((mctl = initmouse(nil, screen)) == nil)
sysfatal("%s: %r", argv0);
if((kctl = initkeyboard(nil)) == nil)
sysfatal("%s: %r", argv0);
pixi_init() ;
test_fb () ;
draw_fb () ;
enum{MOUSE, RESIZE, KEYBD, NONE};
Alt alts[4] = {
{mctl->c, &mouse, CHANRCV},
{mctl->resizec, &resize, CHANRCV},
{kctl->c, &r, CHANRCV},
{nil, nil, CHANEND},
};

Currently I'm doing things for event handling like in a rio app and it works but the code could be simplified by a notification layer which we can define all together.

To make things more clear :

I have a working kiosk and an experimental window system but those can be improved and I would prefer making those things a general well documented part of the system. The more people experiment with such an enhancement the more it evolves and the less bugs will remain. I have ideas and I'm sure others also have ideas so it would be best to share opinions and learn from each other. I don't like forking a project when I like its progress as I do regarding 9front legacy9.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T2518f9e4fc10ed03-M5b9c63bb91f21f3264e973ff
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 5710 bytes --]

  reply	other threads:[~2022-01-28 11:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28  2:03 ibrahim via 9fans
2022-01-28  5:22 ` ori
2022-01-28 11:38   ` ibrahim via 9fans [this message]
2022-01-28  7:50 ` vic.thacker
2022-01-28 11:49   ` ibrahim via 9fans
2022-01-28  9:55 ` Frank D. Engel, Jr.
2022-01-28 12:13   ` sirjofri
2022-01-28 12:21   ` ibrahim via 9fans
2022-01-28 14:11     ` Philip Silva via 9fans
2022-01-28 15:27       ` ibrahim via 9fans
2022-01-28 15:44         ` ibrahim via 9fans
2022-01-28 15:49     ` ori

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=16433698950.b3ce7.20469@composer.9fans.topicbox.com \
    --to=9fans@9fans.net \
    /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).