Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

A perl os

by scottstef (Curate)
on Mar 11, 2001 at 22:03 UTC ( [id://63631]=perlmeditation: print w/replies, xml ) Need Help??

I was emailed a sourceforge link http://jkos.sourceforge.net/ that is aiming to create an operating system based on perl. I was wondering if a perl os would be appropriate. I would have thought perl being an interpreted language would probably have a little too much overhead. Please don't misinterpret what I am saying about perl- I really am having a blast trying to write perl- as opposed to my absolute hatred of C/C++ coding. I just wasn't sure if an os in perl would be feasible (ie what would be the benefits of such a language other than ythe fact it would probably be fairly easy to code perl with it?)

Replies are listed 'Best First'.
Re: A perl os
by foo (Beadle) on Mar 12, 2001 at 00:13 UTC
    I would hardly call that an operating system. It is a shell that allows you to read and write to files but it is clunky at even doing that. I do seem to remember a discussion about a PerlOS somewhere but not as a production product. I wouldn't worry to much about this turning into an operating system anytime soon. At the moment it does not do any type of interaction with hardware, which an operating system is generally required to do.
Re: A perl os
by premchai21 (Curate) on Mar 12, 2001 at 00:39 UTC
    Mmm... but does it have to be interpreted? I heard there was a compiler for Perl somewhere. Interpreted, it would have a lot of overhead. It might be feasible -- except that Perl is not as low-level as something like C, which would make it harder to do OS work with it.
    my $0.02; # can't use $0 like that!
    
    local $0; $0.=q(02);  # OK
    
      Perl "compilers" are not really true compilers in the same vein as a C compiler. Instead, they really just include the entire Perl interpreter as well as the script in one binary. This is due to the many features that require interpreting on the fly. One of the most obvious of these is eval.

      When's the last time you used duct tape on a duct? --Larry Wall
Re: A perl os
by InfiniteSilence (Curate) on Mar 12, 2001 at 21:15 UTC
    First, as others have said, the downloaded example is a far cry from an OS, simply because it could not hope to operate without an underlying OS. When you use the 'print' function in Perl, the instruction eventually gets handed down to the OS to discover what the STDOUT is.

    It seems obvious that the authors of the 'OS' project, through well-intentioned, are needing of an education on OS' in general.

    It seems to me that Perl is much more a language designed to extend the capabilities of a given operating system rather than circumventing it entirely. Current research in OS' is going on at MIT.

    Celebrate Intellectual Diversity

Re: A perl os
by Seedy (Acolyte) on Mar 13, 2001 at 01:59 UTC
    Maybe Perl would make a bad OS but would it make a good UN*X shell?
    Would that make it a p Shell?
    I think we already have an s Shell.
    With luck we can avoid the d Shell and f Shell altogether. :)
Re: A perl os
by Anonymous Monk on Mar 13, 2001 at 18:13 UTC
    Looking at the code it strikes me as a bad shell, there is no way you could feasibly write an os in perl as alot of the feature that perl relies on - eg IO is dependant on the OS, once you start to write an io layer in say C you miss the point of using perl. I'd also like to see Dynaloader written in complete perl for perl to use to load itself. If that makes any sense.
Re: A perl os
by Anonymous Monk on Mar 15, 2001 at 08:13 UTC
    You, my dear friend, are a friggin' idiot.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://63631]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-03-29 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found