Streams in KLambda.

54 views
Skip to first unread message

deech

unread,
Sep 10, 2016, 6:48:41 PM9/10/16
to Shen
Question about how the standard sees streams: it states that a stream should be a string which designates a file path. While I get that URIs could be considered file paths as well this definition seems limiting. For instance, how does one write to and from a socket?
-deech

Mark Tarver

unread,
Sep 11, 2016, 5:27:32 AM9/11/16
to Shen
If you look at the history of Shen; it was conceived as a portable replacement for Qi, so, despite offering features that Qi did not have (string matching, macros ..)  the kernel has just the functionality required to reproduce Qi and no more.  This and the RISC architecture meant that Shen was easy to port.

There are no sockets as such in the Shen kernel.  If you wanted to set up a connection to a foreign process within the instruction set, you'd have to arrange for the FP to exchange data with Shen by reading and writing from a file.  I think this was discussed quite early on by Vasil Diadov, but the thread must be about 4-5 years old.

Mark

Mark Tarver

unread,
Sep 11, 2016, 6:02:10 AM9/11/16
to Shen

Unlike most other operating systems, Plan 9 does not provide special application programming interfaces (such as Berkeley socketsX resources or ioctl system calls) to access devices.[22] Instead, Plan 9 device drivers implement their control interface as a file system, so that the hardware can be accessed by the ordinary file input/output operations read and write. Consequently, sharing the device across the network can be accomplished by mounting the corresponding directory tree to the target machine.[4]

Mark 
Reply all
Reply to author
Forward
0 new messages