Page 1 of 5
A true webOS?
Posted: Thu Jul 19, 2012 4:49 pm
by platform
Hi, I am new in this forum and in OS development.
I have searched, so I know that it's stupid, very difficult,... but... could we speak about a true webOS? I just wanna know if that is technically possible, and how could it be implemented.
For example, the bootloader obviously can't be written in Javascript. But what about the kernel?
I propose:
Bootloader (ASM) => minimal kernel (C++) => render engine and javascript VM => apps, GUI (web tech.)
or
Bootloader (ASM) => kernel (compiled Javascript?) => apps, GUI (web tech.).
What do you think? (besides I am stupid
)
Re: A true webOS?
Posted: Thu Jul 19, 2012 4:51 pm
by NickJohnson
Define webOS.
Re: A true webOS?
Posted: Thu Jul 19, 2012 4:57 pm
by platform
NickJohnson wrote:Define webOS.
An OS created with web tech. We cannot create it 100% in web tech., but, for me, a webOS should be written with as web tech. as we can.
Re: A true webOS?
Posted: Thu Jul 19, 2012 5:10 pm
by NickJohnson
What precisely is "web tech"? I can make an HTTP request and retrieve the Linux kernel sources.
Re: A true webOS?
Posted: Thu Jul 19, 2012 5:24 pm
by platform
NickJohnson wrote:What precisely is "web tech"? I can make an HTTP request and retrieve the Linux kernel sources.
HTML, CSS and JS.
Re: A true webOS?
Posted: Thu Jul 19, 2012 5:32 pm
by NickJohnson
We can already do that: just run a browser from within Linux. Why would we want to construct an OS that only uses those things? It would just boil down to reimplementing JS browser APIs, otherwise you'd break compatibility, and then all you get is a browser.
The Internet/WWW is a lot more than just the client-side components of webpages anyway. What about the cloud? RESTful architecture? SaaS? I have heard insufficiently many buzzwords to believe you know what you're talking about.
Also, seriously, who wants to increase the number of things we have to run JS on?
Re: A true webOS?
Posted: Thu Jul 19, 2012 5:44 pm
by platform
NickJohnson wrote:We can already do that: just run a browser from within Linux. Why would we want to construct an OS that only uses those things? It would just boil down to reimplementing JS browser APIs, otherwise you'd break compatibility, and then all you get is a browser.
The Internet/WWW is a lot more than just the client-side components of webpages anyway. What about the cloud? RESTful architecture? SaaS? I have heard insufficiently many buzzwords to believe you know what you're talking about.
Also, seriously, who wants to increase the number of things we have to run JS on?
Mozilla wants
.
Ok, I am going to expain better what I mean.
There are many projects which aim to create an OS with web interface, such as Firefox OS, Tizen,...
But I have curiosity to know how we could build an OS with medium and low level elements in web technologies.
Yes, I know that it's stupid, but I have curiosity. I wanna see a "kernel.js"
.
Re: A true webOS?
Posted: Thu Jul 19, 2012 6:18 pm
by NickJohnson
Okay, okay, I'll stop giving you a hard time.
I can see the potential advantage in making a standalone application use client-side web technologies, just because they are standardized and many people know how to use them. It just seems like an odd choice, since many of the complexities in stuff like HTML rendering are due to the fact that a small amount of information has to describe a complex screen layout, when there is no such restriction for normal GUI applications. Still, with the choice being between some new GUI framework and something web-based, the latter does seem sort of attractive.
This is, of course, not much of an argument for trying to write a kernel in JS.
Re: A true webOS?
Posted: Fri Jul 20, 2012 3:15 am
by Tosi
I think the idea is interesting but could better be implemented as a shell which integrates the system and the internet tightly. i.e., you open a directory and it opens as a tab in the browser. when you open an application, it can open as a tab in the browser. If it is a command line application it can be run from a terminal in its own tab. However all this could be built on top of a regular kernel written in C or whatever low level language, for example, have the browser/shell run as an X window manager or as a replacement for the Windows shell.
As for actually writing the kernel using "web technology", you have the same problems as writing a kernel in Java (which has been done with some success). Unless you write a javascript compiler that creates native machine code or assembly and add extensions for accessing low-level aspects of the system, you will have to write a microkernel that handles the low-level stuff and interprets the javascript (which should be compiled to bytecode). There will be a performance hit here, but you could still make it work possibly. HTML/CSS seems useless for writing the actual kernel, since it is just meant for formatting information. You could use XML for configuration files and this does work pretty good, but you will have to either write an XML parser or port an existing one.
If you just want to define the user-interface using HTML/CSS/Javascript, you are better off writing a window manager or widget kit as mentioned in the wiki.
Re: A true webOS?
Posted: Fri Jul 20, 2012 4:00 am
by bluemoon
Are you guys talking about Chromium OS?
Re: A true webOS?
Posted: Fri Jul 20, 2012 4:19 am
by Combuster
WebOS is just a stupid buzzword IMNSHO.
After all, any of the free internet kiosks you'll find at college would qualify as a webos pretty much regardless of the definition you give to the term. And we probably all agree we rather browse the internet on our home computer where our bookmarks do get preserved.
Re: A true webOS?
Posted: Fri Jul 20, 2012 8:44 am
by platform
NickJohnson wrote:Okay, okay, I'll stop giving you a hard time.
I can see the potential advantage in making a standalone application use client-side web technologies, just because they are standardized and many people know how to use them. It just seems like an odd choice, since many of the complexities in stuff like HTML rendering are due to the fact that a small amount of information has to describe a complex screen layout, when there is no such restriction for normal GUI applications. Still, with the choice being between some new GUI framework and something web-based, the latter does seem sort of attractive.
This is, of course, not much of an argument for trying to write a kernel in JS.
I agree with you. Ok, writting a kernel in JS is not a good idea, but I wanna do it
.
Tosi wrote:I think the idea is interesting but could better be implemented as a shell which integrates the system and the internet tightly. i.e., you open a directory and it opens as a tab in the browser. when you open an application, it can open as a tab in the browser. If it is a command line application it can be run from a terminal in its own tab. However all this could be built on top of a regular kernel written in C or whatever low level language, for example, have the browser/shell run as an X window manager or as a replacement for the Windows shell.
As for actually writing the kernel using "web technology", you have the same problems as writing a kernel in Java (which has been done with some success). Unless you write a javascript compiler that creates native machine code or assembly and add extensions for accessing low-level aspects of the system, you will have to write a microkernel that handles the low-level stuff and interprets the javascript (which should be compiled to bytecode). There will be a performance hit here, but you could still make it work possibly. HTML/CSS seems useless for writing the actual kernel, since it is just meant for formatting information. You could use XML for configuration files and this does work pretty good, but you will have to either write an XML parser or port an existing one.
If you just want to define the user-interface using HTML/CSS/Javascript, you are better off writing a window manager or widget kit as mentioned in the wiki.
In fact, I was creating a OS based on Linux which has the GUI in web technologies. But I thought: what about writting the medium and low level elements in web tech.? It would be stupid and difficult, but I would be different.
So, I have two options: writting a javascript compiler that creates native machine code (for me, the most difficult option, but the better) or writting a microkernel that interprets javascript.
You suggest XML for configuration files... What about JSON?
I just wanted to define the user-interface in web tech., but now I wanna do something different. A 99% web OS.
bluemoon wrote:Are you guys talking about Chromium OS?
Chromium OS is not a web OS, it has almost code in native tech.
Combuster wrote:WebOS is just a stupid buzzword IMNSHO.
After all, any of the free internet kiosks you'll find at college would qualify as a webos pretty much regardless of the definition you give to the term. And we probably all agree we rather browse the internet on our home computer where our bookmarks do get preserved.
Yes, but our home computer could run a webOS that could run offline and online too.
If I was very, very crazy, and I wanted to implement this idea, what step would have to be the first? Creating the Javascript compiler [apart from the planification of the project].
Thanks!
EDIT: what about using Rhino Javascript Compiler to translate Javascript to Java and then compiling Java to native code with GCJ? By the way, v8 compiles Javascript?
Re: A true webOS?
Posted: Fri Jul 20, 2012 4:04 pm
by piranha
In fact, I was creating a OS based on Linux which has the GUI in web technologies. But I thought: what about writting the medium and low level elements in web tech.? It would be stupid and difficult, but I would be different.
So, you wanted to create GUI that was a browser, with all GUI elements being html and javascript. Then you wanted to write the low level OS stuff in javascript as well? That goes back to the scripting-language-for-OS-kernel stuff. The only way you'd be able to run a javascript kernel is if you had a javascript interpreted loaded first, which then executes the kernel. Is it possible? Yes. Is it realistic? Not really. The interpreter would have to be written in a compiled language, and at that point, why not make the kernel in C, asm or whatever and not be forced to deal with a huge performance hit from the scripting language having to be interpreted?
-JL
Re: A true webOS?
Posted: Fri Jul 20, 2012 6:36 pm
by GAT
I agree with piranha, partly.
It would be really be inefficient, but IMHO it would be fun to make!
And plus it could be really flexible if you built it right.
One issue I foresee is that you can't really do hardware stuff with scripting languages.
You could do like an exo kernel in native code that would interpret the javascript, and then have device drivers that the javascript or kernel could call to that were in native code.
Re: A true webOS?
Posted: Sat Jul 21, 2012 8:36 am
by platform
piranha wrote:In fact, I was creating a OS based on Linux which has the GUI in web technologies. But I thought: what about writting the medium and low level elements in web tech.? It would be stupid and difficult, but I would be different.
So, you wanted to create GUI that was a browser, with all GUI elements being html and javascript. Then you wanted to write the low level OS stuff in javascript as well? That goes back to the scripting-language-for-OS-kernel stuff. The only way you'd be able to run a javascript kernel is if you had a javascript interpreted loaded first, which then executes the kernel. Is it possible? Yes. Is it realistic? Not really. The interpreter would have to be written in a compiled language, and at that point, why not make the kernel in C, asm or whatever and not be forced to deal with a huge performance hit from the scripting language having to be interpreted?
-JL
How the Javascript interpreter should be loaded? Because, for example, I suppose that v8 cannot run without some libs and drivers....
GAT wrote:I agree with piranha, partly.
It would be really be inefficient, but IMHO it would be fun to make!
And plus it could be really flexible if you built it right.
One issue I foresee is that you can't really do hardware stuff with scripting languages.
You could do like an exo kernel in native code that would interpret the javascript, and then have device drivers that the javascript or kernel could call to that were in native code.
Why not? "All device drivers are written in Java and executed by the virtual machine" (JavaOS, wikipedia).