Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Perl Operating System

by Abigail-II (Bishop)
on Mar 25, 2004 at 15:31 UTC ( [id://339771]=note: print w/replies, xml ) Need Help??


in reply to Perl Operating System

Simon Cozens once made a Linux distribution with only utilities written in Perl.

Plus I'd like to know if my learned brother monks believe that perl could be actually used to make a viable operating system?
No. Performance would be horrible. C might be a horrible language for a lot of Perl programmers, but if your program needs to be lean and mean (and we do want our kernels, drivers, shells, compilers, etc, to be as lean and mean as possible), there's no real alternative to C.

Abigail

Replies are listed 'Best First'.
Re: Re: Perl Operating System
by tachyon (Chancellor) on Mar 26, 2004 at 00:09 UTC

    C might be a horrible language......there's no real alternative to C

    MOV AH,02 MOV DL,"A" INT 21h MOV DL,"S" INT 21h MOV DL,"M" INT 21h MOV DL,"?" INT 21h MOV AH,04Ch MOV AL,00 INT 21h

    When you look at the alternative C starts to look pretty damn good! The only advantage of ASM is that the binaries tent to be tiny ie 24 bytes for that example as opposed to 36K for the same thing compiled in C using cl.exe:

    perl -e "print pack'H*','b402b241cd21b253cd21b24dcd21b23fcd21b44cb000c +d21'" > asm.com

    cheers

    tachyon

      Though it would look less awful if you had used a string output function instead of one-character-at-a-time I/O. And been smaller, too. (Also: eww, DOS.)

      Makeshifts last the longest.

        Can we also fight over AT&T-style vs Intel-style mnemonics?

        Ahhhhh!!! Assembler GOLF! 21 bytes.... OK so I admit I did not try to make assembler look good. I have always liked the thought that C is a language with all the power of assembler, but with all the user friendliness of ..... assembler.

        jmp start msg db "ASM?$" start: mov ah,09 mv dx,offset msg int 21h mov ah,4ch mov al,00 int 21h

        cheers

        tachyon

Re: Re: Perl Operating System
by tsee (Curate) on Mar 27, 2004 at 10:17 UTC

    Performance-wise, I think some of the functional languages with good compilers could actually be used to accomplish such a feat. It's just that it would be much harder than it is in C (and much more awkward) because when you're dealing with bare-metal type of programming, you're better off using a bare-metal type of programming language.

    It's not like there wouldn't be some university types who'd try nonetheless...

    Steffem

Re: Re: Perl Operating System
by mamboking (Monk) on Mar 26, 2004 at 19:41 UTC
    Ada, Oberon, Modula3? :-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-06-25 14:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.