A new OS

merv hammer merv at spidernet.com.cy
Mon Apr 12 16:50:15 EDT 2004


On Mon, Apr 12, 2004 at 10:55:55AM -0700, Corey Coughlin wrote:
> I think it sounds like a great idea.  I'd ultimately like to go a
> direction like that at some point.  One of the biggest problems with
> existing operating systems (like Windows or Linux) is that they are
> for the most part built on C, which then dictates what the low level
> calls look like, the memory architecture, and so on.  Writing an OS in
> Python could give you a new perspective on mapping a high level
> architecture onto a machine.  Imagine, for instance, an OS
> architecture with a genuine object hierarchy, where low level details
> get abstracted into a machine level that can be swapped out to conform
> to different processor architectures, where garbage collection is an
> OS service, and maybe the filesystem is actually an object persistance
> system, so every file is actually an object with type instead of a bag
> of bytes, and then imagine how easy it would be to add advanced
> indexing a la Chandler to it.  Could we then distribute programs as
> only python bytecode, getting platform independence?  Would it be
> easier adding security using higher levels of abstraction?  How about
> creating a complete network OS?  Would that be easier in python?  In
> general, as you abstract complex os services into simpler python code,
> would it be easier to expand the capabilities of your os?  I can't
> imagine that it would be harder.  It could be quite an interesting
> project, if conducted with the aim of not just making yet another
> generic operating system, but with the aim of creating a truly
> pythonic OS.  That would be great.
> 
> 
> 
> 
> "A Evans" <ae> wrote in message news:<107k441hitt2ld9 at corp.supernews.com>...
> > Hello Everyone I am working towards starting a project developing a new
> > Operating System using the Python language (or a derivative thereof). As
> > recommended on this forum I am asking if people are interested in something
> > like this and ask who would be willing to support a project this large.
> > 
> > Any and all ideas are welcome this message is just to see what kind of
> > support this project would recieve
> > 
> > Cheers
> > 
> > Andrew
> -- 
> http://mail.python.org/mailman/listinfo/python-list

Hi there,

just to let you know, perhaps as encouragement, that I am working on the 
foundations of an extensible shell (not surprisingly referred to as an xshell) 
which is really a BASH shell with all its functionality intact but which could 
be used interactively (at the command line) and via scripts using Python. This
idea was born in discussions on a Gentoo list while contemplating the pros and
cons of the Gentoo Portage Tree being written in Python.  I know the idea is notreally new, but it has intrigued me ever since,to the point where I succumbed 
and decided to start thrashing out how it might be done.

I just want to stress that xshell, as it is now, is not a Python shell per se, 
so to speak, but an e(x)tensible BASH shell in which Python language support can
be compiled-in at compile/install time, after which one may be able to switch
interactively between the sh dialect and Python at the command line and in 
BASH scripts. I am barely at Base One with the whole thing yet, with work and a
motley crew of four young babies, I get only a few hours a night at it at best.
I am at the stage of sketching a Python syntax for the prompt that will 
enable piping, backgrounding etc etc interatively. 

This little pet project of mine has generated quite some debate, among 
colleagues at work and developers and users on lists.  The debate ranges from anunderstandable incredulity such as the "Why bother - learn sh!" to concerns over
performance, file handling dynamics, and the thin-end-of-the-wedge syndrome 
("if you build-in support for Python language syntax at the BASH shell 
environment, next people will be scripting the BASH shell in Ruby, or even 
Javascript!", by which no offense is meant to Ruby or JS coders, but rather 
that the BASH environment will become fragmented and less usable [consider, how
would someone who has learned sh but does not know Python edit a BASH script written in Python? clearly a valid issue]).  I am fully aware, as a developer and 
sometime-sysadmin that the power of BASH/SH is not just in its builtins but alsoin the fact that wherever one goes, its the same, give or take a bug fix across
releases or a syntactical nuance across platforms. And this is before we even 
come to the issue of having a Python interpreter or some slimline version of onerunning in such as way as to catch instances of "live" interactive Python code
from the commandline without having to fire up the whole Python engine 
everytime a single command is issued at the prompt.

Anyway, without dismissing these and the whole stack of other issues related to it, here's my position:

as an experienced C coder, I'm not looking to supplant the C-code base of *nix
environments with Python because I don't like C.  However, I do believe that 
there may be something to be said for the "tool-for-the-job" concept and there 
certainly are everyday tasks, sh routines and BASH scripts out there that might be well-served by a Python make-over. 

I believe there is much to be said for the conceptually clean development that 
can (in the best of worlds) emerge from the kind of programming involved in the
use of syntactically clean high-levellers such as Python.  I "hack" C-code for aliving and it seems to me that the very structure of C itself lends itself to 
be "hacked" (in the *nix sense) since the code can easily and quickly become
obtuse, highly stylised (in an review-inefficient way, according to the nuances
and stylistic habits of each C coder) and does not lend itself well to a living
and changing development process, however modular and OO the C code may itself
be.  However, with such a clean, well-designed and expansive language as Python, one almost naturally (this is my feeling at least) begins to think in terms of extensibility and the future. For this reason, I am working on the hunch (I may
well be very very wrong, of course) that Python may well turn out to be a 
useful and versatile BASH environment language.  Using standard Python 
functionality, one may be able to extend dramatically the range of builtins
available in the BASH shell by simply coding them and importing them as modules,for example.

Thirdly, I believe that Linux, the free Unix flavours and the Open Source/Free Software world is about choice.  Is there a way to build on the tools that are 
at our fingertips to offer more choice and possibilities to the user without at
the same time running the risk of fragmenting existing and effective user practices?

OK. that's enough from me. A python OS would be a very interesting project and
perhaps an important experiment in finding new ways to look at and interpret what we do as developers and users.

Lastly,  I for one would be very enthused at the idea of being able to offer my meagre skills and experience to assist in such a project.

kind regards

m
-- 
Merv Hammer	
-------------------------------------------------------------
mail:merv at spidernet.com.cy    	
GPG PK: 7BC2A589                




More information about the Python-list mailing list