OS that runs interpreted code
OS that runs interpreted code
Ok, I don't think this was my idea. But i've searched in this forum and found nothing about it.
I'm talking about making an OS that runs only interpreted code. No crappy loading complicated executables in memory to execute em. Personally, i find PHP syntax amazing!
You guys ever seen PHP-GTK? What about a OS that has native (and only) support for running PHP scripts as GUI aplications and command-line tools? That would eliminate 1/2 of OS's "problems" like compilers.
I think that would make things soo much simpler for the programmers (not for OS developers perhaps).
Pros:
- All apps are open-source.
- Extremely easy app development.
- No compilers.
- Libs are just "libs.php" that can be included to any app.
- No need for ubber-hack code to deal with dificult stuff like usb etc...
Cons:
- All apps are open-source. ;D
- Apps run slower compared to normal OSs.
- No heavy 3D game since it is interpreted (slower). Still nice 2D games could be done like Age of Empires, Ultima Online, Mine Sweeper ;D.
To be able to interpret a language the OS must be capable of doing all stuff a script calls by himself. I mean, mem management, garbage collection, FS, GUI, support for stuff like USB and so on. And that sounds like a monolithic OS. BUT, i don't wana go full monolithic since this type of OSs tend to sufer from a disease called CIEWKS (Complexity Increases Exponentially With Kernel Size). And that is why I think about putting all less used stuff in modules (USB, Audio, Network) and that sounds like a microkernel. What do you think?
Ok plz bash my head if this is an already over discussed topic. If it is not, please try to guide me on what to go for first and what to aim on. Also, if you want to add/remove items from the Pros/Cons list just post em here.
Sorry for my bad english, I live in Brazil.
I'm talking about making an OS that runs only interpreted code. No crappy loading complicated executables in memory to execute em. Personally, i find PHP syntax amazing!
You guys ever seen PHP-GTK? What about a OS that has native (and only) support for running PHP scripts as GUI aplications and command-line tools? That would eliminate 1/2 of OS's "problems" like compilers.
I think that would make things soo much simpler for the programmers (not for OS developers perhaps).
Pros:
- All apps are open-source.
- Extremely easy app development.
- No compilers.
- Libs are just "libs.php" that can be included to any app.
- No need for ubber-hack code to deal with dificult stuff like usb etc...
Cons:
- All apps are open-source. ;D
- Apps run slower compared to normal OSs.
- No heavy 3D game since it is interpreted (slower). Still nice 2D games could be done like Age of Empires, Ultima Online, Mine Sweeper ;D.
To be able to interpret a language the OS must be capable of doing all stuff a script calls by himself. I mean, mem management, garbage collection, FS, GUI, support for stuff like USB and so on. And that sounds like a monolithic OS. BUT, i don't wana go full monolithic since this type of OSs tend to sufer from a disease called CIEWKS (Complexity Increases Exponentially With Kernel Size). And that is why I think about putting all less used stuff in modules (USB, Audio, Network) and that sounds like a microkernel. What do you think?
Ok plz bash my head if this is an already over discussed topic. If it is not, please try to guide me on what to go for first and what to aim on. Also, if you want to add/remove items from the Pros/Cons list just post em here.
Sorry for my bad english, I live in Brazil.
Re:OS that runs interpreted code
Hi!bubux wrote: Ok, I don't think this was my idea. But i've searched in this forum and found nothing about it.
Well, the talk was never really about interpreted script files, but about interpreted (or JIT-compiled or precompiled) intermediate bytecode, but I think it boils down to quite the same set of issues.
Your english seems almost perfect, actually.bubux wrote: Sorry for my bad english, I live in Brazil.
cheers Joe
Re:OS that runs interpreted code
You meen like this OS http://unununium.org/introduction
?.
?.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:OS that runs interpreted code
the fact is nearly all interpreted languages need precompiled libraries to support the language, and it only gets interresting when you can come with new support libraries to ... support new features.
I mean, you can do games in BASIC only when you have access to hardware accelerated functions (such as accessing sprites registers on a C=64 through PEEK/POKE) or when you have an accelerating library that get GET/PUT screen blobs instead of just pixels.
Similarily, PERL (and by extension PHP, afaik) is neat to use mainly because of the off-the-shelf packages you can install to support e.g. PNG or JPEG decompression, X window protocol, etc. If you had to interprete scripts to do the FFT and DCT, you couldn't achieve anything more than grepping through files, imho (or whatever your language natively supports).
I mean, you can do games in BASIC only when you have access to hardware accelerated functions (such as accessing sprites registers on a C=64 through PEEK/POKE) or when you have an accelerating library that get GET/PUT screen blobs instead of just pixels.
Similarily, PERL (and by extension PHP, afaik) is neat to use mainly because of the off-the-shelf packages you can install to support e.g. PNG or JPEG decompression, X window protocol, etc. If you had to interprete scripts to do the FFT and DCT, you couldn't achieve anything more than grepping through files, imho (or whatever your language natively supports).
Re:OS that runs interpreted code
Thanks Joe! I try to keep my english un understandable reading programming articles.
Dex4u, you got it. By what i know, Unununium is intended to be a faster Phyton interpreter huh? Well, I look further into making an OS that interprets a PHP like language with "steroids". I mean, PHP for applications and not for web, where i could call low level functions and the kernel would do all the job for the script.
As the OS i'm planning will be nothing more than a "big interpreter" and will NOT run on top of any OS, so I think it will be alot faster than usual interpreters and will have the capacity of offering low level power to scripts like fast video access.
Thanks for your attention ppl. I'll start a mini website for the OS with ideas and concepts and the already done boot loader (asm) and hello world (c).
Dex4u, you got it. By what i know, Unununium is intended to be a faster Phyton interpreter huh? Well, I look further into making an OS that interprets a PHP like language with "steroids". I mean, PHP for applications and not for web, where i could call low level functions and the kernel would do all the job for the script.
Can't interpreted scripts have low level funcions? That is a limit that we are used to, because the world told us things are like that. What hinder me from adding low level functions to the language my OS interprets?Pype.Clicker wrote: the fact is nearly all interpreted languages need precompiled libraries to support the language, and it only gets interresting when you can come with new support libraries to ... support new features.
I mean, you can do games in BASIC only when you have access to hardware accelerated functions (such as accessing sprites registers on a C=64 through PEEK/POKE) or when you have an accelerating library that get GET/PUT screen blobs instead of just pixels.
Similarily, PERL (and by extension PHP, afaik) is neat to use mainly because of the off-the-shelf packages you can install to support e.g. PNG or JPEG decompression, X window protocol, etc. If you had to interprete scripts to do the FFT and DCT, you couldn't achieve anything more than grepping through files, imho (or whatever your language natively supports).
As the OS i'm planning will be nothing more than a "big interpreter" and will NOT run on top of any OS, so I think it will be alot faster than usual interpreters and will have the capacity of offering low level power to scripts like fast video access.
Thanks for your attention ppl. I'll start a mini website for the OS with ideas and concepts and the already done boot loader (asm) and hello world (c).
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:OS that runs interpreted code
Can't interpreted scripts have low level funcions? That is a limit that we are used to, because the world told us things are like that. What hinder me from adding low level functions to the language my OS interprets?
[quote][/quote]
I should have made myself confusing. What i mean is that even if all your apps are interpreted scripts, it is not realistic to think that your OS will only deal with scripts to interprete. It will also have to support native libraries that those scripts invoke.
Okay, you might have JIT techniques that make for instance, the realization of an MP3 player or even just a multi-channel audio mixer possible, but re-compiling all the support libraries everytime the system reboots will just be a pain, no ?
[quote][/quote]
I should have made myself confusing. What i mean is that even if all your apps are interpreted scripts, it is not realistic to think that your OS will only deal with scripts to interprete. It will also have to support native libraries that those scripts invoke.
Okay, you might have JIT techniques that make for instance, the realization of an MP3 player or even just a multi-channel audio mixer possible, but re-compiling all the support libraries everytime the system reboots will just be a pain, no ?
Re:OS that runs interpreted code
Months ago on a forum I visit this guy wanted to write a script OS totally in x86 asm. He eventually settled for combining with C, though. He used GCC and NASM. http://justinbox.aresgate.net/html/exdos.html
Re:OS that runs interpreted code
I think Pype.Clicker is right in the long run, the best idea would be a convectional module OS, with a built in interpretor.
I say long run, because 99% of hobby OS never get to a stage than users any none standard hardware etc.
I say long run, because 99% of hobby OS never get to a stage than users any none standard hardware etc.
Re:OS that runs interpreted code
It sounds like an os running on a emulator(or to call it a virtual machine #_#).Emm,I think it cool but the os maybe in very low performance.I think most of people can not put up with the slow running.By the way,your English 's really good.
Re:OS that runs interpreted code
hendric: that may be true for interpreted languages, but according to some research this does not seem to be the case for an OS based on .NET / Java (when correctly implemented, of course)
Re:OS that runs interpreted code
Well, courtesy of .NET / Java being supported by hotspot compilers. Nothing that couldn't be done for other languages. But I usually demand to see hard numbers before I believe the various performance claims made by the Java / .NET camp.
Every good solution is obvious once you've found it.
Re:OS that runs interpreted code
Solar: see Singularity's technical report, which explains its ways where it might improve performance (mainly everything runs ring 0 without any ring switches etc.) and does some tests (near the end of the document):
ftp://ftp.research.microsoft.com/pub/tr/TR-2005-135.pdf (pdf)
ftp://ftp.research.microsoft.com/pub/tr/TR-2005-135.pdf (pdf)
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re:OS that runs interpreted code
In a more shameless attempt to make Solar pay attention to Singularity, I'd like to point out that its zero-copy message passing sounds a lot like the original Amiga OS.
Also, calling Singularity a ".NET" OS is a misnomer. It uses a dialect of C# that is compiled first to IL, but that's about the only real connection. They're currently using a compiler called Bartok that compiles the IL to x86. Note that this is pre-compilation -- there is no JIT whatsoever in Singularity. This means that .NET's JIT, hosting API, class library (most of it, anyway), and GC are nowhere to be found (there are GCs, but each is custom built by the researchers, not taken from an existing product).
Also, calling Singularity a ".NET" OS is a misnomer. It uses a dialect of C# that is compiled first to IL, but that's about the only real connection. They're currently using a compiler called Bartok that compiles the IL to x86. Note that this is pre-compilation -- there is no JIT whatsoever in Singularity. This means that .NET's JIT, hosting API, class library (most of it, anyway), and GC are nowhere to be found (there are GCs, but each is custom built by the researchers, not taken from an existing product).
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
Re:OS that runs interpreted code
Don't try to persuade me. C# has about as much appeal to me as leprosis. And I've seen ring 0 implementations and zero-copy-messaging before.
Every good solution is obvious once you've found it.
Re:OS that runs interpreted code
I'm wary of Singularity even of only for the fact that it is Microsoft, but even Microsoft has been known to do the occasional cool thing (putting the right technologies together to make AJAX, anyone?). I actually need to read up on it more anyway, so maybe if you guys keep mentioning it I might become motivated enough to do that.