【Unix】new unix file types (23)

1 Name: #!/usr/bin/anonymous : 2015-07-10 22:20 ID:t1CnYWeK This thread was merged from the former /code/ board. You can view the archive here.

I was thinking of some file types that afaik don't exist.

One is filesystem entries of files stored in memory from disk files, updated when the disk file modification time changes. This would be a big disk-access optimization in some cases.

The in-memory entry permissions would be ignored, and writing to it would write to the disk file.

Another one is dynamic files that (only) have the name of a executable, which when opened would be executed by the kernel, creating a process child of init with its standard output piped to the file descriptor obtained by opening the dynamic file.

Here reading would depend on both the dynamic file's read permission and the named executable's execute permission. The idea is that it's transparent to the reading process.

Whether they could change the file to which they point to without deleting it would depend on the implementation, I think. (https://en.wikipedia.org/wiki/Symbolic_link#Variable_symbolic_links)

2 Name: #!/usr/bin/anonymous : 2015-07-13 00:49 ID:rdeMslMg

Unix sucks.

3 Name: #!/usr/bin/anonymous : 2015-07-13 21:27 ID:E2Za6msF

Unix is programmable, you can change it not to suck.

Everything else sucks more, and you're stuck.

4 Name: #!/usr/bin/anonymous : 2015-07-14 17:51 ID:rdeMslMg

Yeah, you can spend your tine and effort on trying to graft usability onto a crusty design built to run mainframes in the 70s, like the Linux fags have been trying and failing at for the past two decades, or you could try to make an OS that actually makes sense for desktop use instead.

5 Name: #!/usr/bin/anonymous : 2015-07-15 18:10 ID:uZcCDWHA


6 Name: #!/usr/bin/anonymous : 2015-07-16 09:23 ID:dj2rH73R

I was gonna make an OS that like totally made sense super intuitive wouldve changed the desktop forever but I got stuck at implementing jishin/kashin.

7 Post deleted.

8 Post deleted.

9 Name: #!/usr/bin/anonymous : 2015-11-21 13:35 ID:RwpAX7+c

The first type is called mmap, and caching like that is done automatically by the kernel.
The second type, if I understand correctly, is a script glued to a fifo.

10 Name: #!/usr/bin/anonymous : 2015-11-25 07:02 ID:7Yv7jdnv

Oh yeah kernel caching.

>The second type, if I understand correctly, is a script glued to a fifo.

That's rather rudimenary. For that you could just serve virtual files. My idea was that the writer and reader programs didn't have to know about this, but, now that I think about it, that just reading might execute something is probably too wild.

11 Name: #!/usr/bin/anonymous : 2015-11-27 23:45 ID:3TgAyWOw

Oh, I see. So opening the file would implicitly start its target program, and read/write operations on the file would redirect to stdi/o. How would you change the target program?

Perl uses this idea - opening a subprocess is identical to opening a file, but the filename begins with a pipe.

12 Name: #!/usr/bin/anonymous : 2015-11-29 02:15 ID:C+mJgx35

>How would you change the target program?

Similar to changing other files, probably.

>Perl uses this idea - opening a subprocess is identical to opening a file, but the filename begins with a pipe.

Kinda like the POSIX popen interface, yeah. But having to use special interfaces or languages falls short of transparency.

13 Name: #!/usr/bin/anonymous : 2015-12-31 12:39 ID:Heaven

RAM is really expensive though.

14 Name: #!/usr/bin/anonymous : 2016-07-23 04:37 ID:3Yvi0TSj

OS development is a major undertaking, it's not the sort of thing you can do in a weekend, especially considering it requires low-level programming techniques that are avoided in modern application development. The appeal of things like Linux and BSD is that the hard work is already done for you, but unlike Windows or Apple operating systems you have the freedom to modify the user interface (which is all most people really care about, messing around "under the hood" is really only called for when working with embedded systems or mainframes, where you need to get every last bit of performance out of the machine - and only low level programming specialists really have the ability to effectively optimize in those areas, anyway). And the UNIX architecture, although rather old, wasn't really made for "mainframes", one of its main advantages at the time was that it could run on lower-end systems.

15 Name: #!/usr/bin/anonymous : 2016-07-23 23:33 ID:r1UKj3cT

All sort of things require low-level programming.

16 Name: #!/usr/bin/anonymous : 2016-07-25 02:31 ID:5UP++Rz8

I think I understand your idea.
How about a daemon that handles that stuff? You give the daemon the name of a script and of a fifo. Your daemon calls inotify on the fifo and waits. When one of the registered fifos is open, the daemon triggers the script with it's output descriptor directed to the fifo.

17 Post deleted.

18 Name: #!/usr/bin/anonymous : 2016-10-05 03:09 ID:VgjjOm7C

It is an idea that has already been implemented at the socket level: inetd[1]. It is a system that spawns a specified process when a connection to a port/socket has been opened. No fancy inotify crap.

Also, systemd supports all of this, including FIFOs.[2]

1: https://en.wikipedia.org/wiki/Inetd
2: http://0pointer.de/public/systemd-man/systemd.socket.html

19 Name: #!/usr/bin/anonymous : 2016-10-05 04:07 ID:Heaven

Also, inetd can work with unix domain sockets, as well as TCP and UDP sockets.
> Unix domain sockets use the file system as their address name space. Processes reference Unix domain sockets as file system inodes,

20 Name: #!/usr/bin/anonymous : 2016-10-05 08:35 ID:QkyVH69a

[b][o][u][i]Meta-Circular Evaluation[/i][/u][/o][/b]

21 Post deleted.

22 Name: #!/usr/bin/anonymous : 2016-11-06 20:21 ID:Heaven

Is that supposed to make it any simpler?

23 Name: #!/usr/bin/anonymous : 2017-04-22 17:28 ID:7Yv7jdnv

UNIX and C are highly overrated. They were made popular by commie students who liked to share software.
There were systems prior and after UNIX which were made better - MULTICS, IBM MVS, DEC VMS, etc
Systems for personal computers have nothing to do with unix too.
And for programming language C is nothing special. It has a lot of undefined behavior and ways to shoot your leg. And it's nothing but little impoved BCPL, nothing really new. There were better languages(ada, algol, fortran, lisps, etc, etc)
And Windows NT based on VMS. The only thing came from unix(not original unix but bsd) is sockets, but there were other solutions.

Name: Link:
Leave these fields empty (spam trap):
More options...