Java as an alternative language in the wiki
Java as an alternative language in the wiki
I see there's even no mention of it (except something like "languages like Perl or Java is unlikely to succeed"). I'm ready to add Java related information to some pages, but I'm in doubts if it is really needed.
What do you think?
What do you think?
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: Java as an alternative language in the wiki
Feel free; I'm sure you aren't the only one here who would find it of interest (even if they aren't using Java themselves - there are more than a few people who want to use C#, as well, and similar issues come up with that, too), so it would be worthwhile, sure. A 'bare bones' on the subject would probably be a good starting point, though I would expect (without knowing good deal more about it than I do) that it would require more work than most of the other BB pages.embryo2 wrote:I see there's even no mention of it (except something like "languages like Perl or Java is unlikely to succeed"). I'm ready to add Java related information to some pages, but I'm in doubts if it is really needed.
What do you think?
I would keep in mind that you'll have to either select a specific Java implementation (again, not knowing enough about it, I imagine gjc is probably easiest to work with for this purpose, but you would know better than I would), or else have separate sections (or even separate pages) for different compilers and JVMs. You will also need to go into detail about a number of issues that don't arise with most other languages, such as porting the JVM and the JIT compiler, implementing the garbage collector(s), handling the JNI to call native code, and so on. Being in a similar position myself (except with a language that doesn't even exist yet), I can tell you that there are more than a few issues that you will need to explain that simply don't come up with, for example, Ada. You can anticipate it taking a fairly long time to get it beyond being just a stub.
Last edited by Schol-R-LEA on Fri Nov 13, 2015 2:12 pm, edited 1 time in total.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
- BASICFreak
- Member
- Posts: 284
- Joined: Fri Jan 16, 2009 8:34 pm
- Location: Louisiana, USA
Re: Java as an alternative language in the wiki
Though I would not be interested in using Java, I would enjoy reading how it is done .
It's becoming a more popular language - at least compared to when I was first interested in OSDev - so it will be a good addition to our ever expanding WiKi.
If you want to put the time and effort into it, it will be appreciated by anyone interested in using Java to OSDev or just wanting to expand their knowledge.
(Myself, I have been fixing spelling and grammar errors as I find them - hoping to contribute an article by the end of the year...)
Best regards,
B!
It's becoming a more popular language - at least compared to when I was first interested in OSDev - so it will be a good addition to our ever expanding WiKi.
If you want to put the time and effort into it, it will be appreciated by anyone interested in using Java to OSDev or just wanting to expand their knowledge.
(Myself, I have been fixing spelling and grammar errors as I find them - hoping to contribute an article by the end of the year...)
Best regards,
B!
BOS Source Thanks to GitHub
BOS Expanded Commentary
Both under active development!
BOS Expanded Commentary
Both under active development!
Sortie wrote:
- Don't play the role of an operating systems developer, be one.
- Be truly afraid of undefined [behavior].
- Your operating system should be itself, not fight what it is.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Java as an alternative language in the wiki
The thing with OSDev Java is that it requires a programmer that knows well beyond the bounds of Java to succeed in the real challenges of OS development: these are also the ones that Java actively hides from developers.
If you can formulate something truly Bare Bones, that'd certainly be a nice thing. However if it goes more into the direction of "clone this git repository" or "use this support code", then it's probably ill-advised to present the beast in sheep's clothing to the unprepared newcomer. Then again, we don't have a "Rolling your own Android" article either
If you can formulate something truly Bare Bones, that'd certainly be a nice thing. However if it goes more into the direction of "clone this git repository" or "use this support code", then it's probably ill-advised to present the beast in sheep's clothing to the unprepared newcomer. Then again, we don't have a "Rolling your own Android" article either
Re: Java as an alternative language in the wiki
Your approach to writing an OS in Java is pretty specific, so writing documentation about it may give people the wrong impression -- that you can actually write an OS in Java, like you can in C. In reality, you have written a Java-to-x86 byte code assembler, and then written an OS using that.
As long as this is explicitly stated in your wiki page, I think it's fine.
To put it another way, I could add a page to the wiki discussing how to write an OS in XML. But I would need to put a huge disclaimer at the top of the page stating something like:
You may just want to start out by documenting your tools and your OS design, specifically, and later move some or all of it to a "generic" Java OS article, if it makes sense.
Up to you though...
As long as this is explicitly stated in your wiki page, I think it's fine.
To put it another way, I could add a page to the wiki discussing how to write an OS in XML. But I would need to put a huge disclaimer at the top of the page stating something like:
But I would still be documenting my specific implementation, not necessarily an industry "standard".This article discusses the idea of writing both an XML compiler AND an Operating System using XML documents. Normally, XML cannot be compiled directly into executable code. You will need to write your own compiler, or use a pre-existing one, like the one found at http://ozone.codeplex.com
You may just want to start out by documenting your tools and your OS design, specifically, and later move some or all of it to a "generic" Java OS article, if it makes sense.
Up to you though...
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Re: Java as an alternative language in the wiki
Nice introduction. In case of the implementation in fact it's simpler (Java is standardized much more than C), but I'll try to write about it in the wiki.Schol-R-LEA wrote:A 'bare bones' on the subject would probably be a good starting point, though I would expect (without knowing good deal more about it than I do) that it would require more work than most of the other BB pages.
...
I would keep in mind that you'll have to either select a specific Java implementation (again, not knowing enough about it, I imagine gjc is probably easiest to work with for this purpose, but you would know better than I would), or else have separate sections (or even separate pages) for different compilers and JVMs. You will also need to go into detail about a number of issues that don't arise with most other languages, such as porting the JVM and the JIT compiler, implementing the garbage collector(s), handling the JNI to call native code, and so on. Being in a similar position myself (except with a language that doesn't even exist yet), I can tell you that there are more than a few issues that you will need to explain that simply don't come up with, for example, Ada. You can anticipate it taking a fairly long time to get it beyond being just a stub.
Ok, I'll try to show it from the perspective of C developers.BASICFreak wrote:Though I would not be interested in using Java, I would enjoy reading how it is done .
Do you think I'll start to advertise my OS? It's not the case. But it is much easier to get examples from my work.Combuster wrote:If you can formulate something truly Bare Bones, that'd certainly be a nice thing. However if it goes more into the direction of "clone this git repository" or "use this support code", then it's probably ill-advised to present the beast in sheep's clothing to the unprepared newcomer.
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability
Re: Java as an alternative language in the wiki
Low level knowledge is what the osdev.org provides, so I'm not afraid of people who get here and knows nothing about the challenges.Combuster wrote:The thing with OSDev Java is that it requires a programmer that knows well beyond the bounds of Java to succeed in the real challenges of OS development: these are also the ones that Java actively hides from developers.
And hiding the low level details is important only for beginners. As time passes a developer starts to understand importance of optimization. But actually there should be some limit to such efforts because it can take a lot of time. Java let's you to stop earlier. But if a developer wants to advance his skills then the low level becomes interesting.
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability
Re: Java as an alternative language in the wiki
We can discuss the approaches to write an OS not in C or assembly. May be it worth to start a separate thread?SpyderTL wrote:Your approach to writing an OS in Java is pretty specific, so writing documentation about it may give people the wrong impression -- that you can actually write an OS in Java, like you can in C. In reality, you have written a Java-to-x86 byte code assembler, and then written an OS using that.
That's why it is interesting to write about a general approach of writing OS in not very common (for it) language. And existing OSes can show examples for interested developers.SpyderTL wrote:To put it another way, I could add a page to the wiki discussing how to write an OS in XML. But I would need to put a huge disclaimer at the top of the page stating something like:This article discusses the idea of writing both an XML compiler AND an Operating System using XML documents. Normally, XML cannot be compiled directly into executable code. You will need to write your own compiler, or use a pre-existing one, like the one found at http://ozone.codeplex.com
At least there should be some root in the tree of languages and their features. It can be the generic discussion about different languages for OSdeving, supplemented by wiki fragments as a result.SpyderTL wrote:You may just want to start out by documenting your tools and your OS design, specifically, and later move some or all of it to a "generic" Java OS article, if it makes sense.
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Java as an alternative language in the wiki
You already did.embryo2 wrote:Do you think I'll start to advertise my OS? It's not the case.
Re: Java as an alternative language in the wiki
I see it as easiest way. But may be you can propose something easier?Combuster wrote:You already did.embryo2 wrote:Do you think I'll start to advertise my OS? It's not the case.
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: Java as an alternative language in the wiki
'Easy' is going to vary from dev to dev. In any case, the point isn't that you might engage in SSP, but that you would be channeling the readers into a specific solution rather than giving them options. Admittedly, the entire site is guilty of that, given the heavy reliance on C and the GNU toolchain, but there has been a conscious effort to limit that and provide some guidance for that who stray from The Golden Path of Unix RighteousnessTM.embryo2 wrote:I see it as easiest way. But may be you can propose something easier?Combuster wrote:You already did.embryo2 wrote:Do you think I'll start to advertise my OS? It's not the case.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Re: Java as an alternative language in the wiki
Have just finished Java Bare Bones. Please, take a look if interested. Also mistake correction (or pointing at) would be appreciated.
Some changes also have been made in the Languages, and Introduction sections.
Some changes also have been made in the Languages, and Introduction sections.
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability
Re: Java as an alternative language in the wiki
Hi,
Cheers,
Brendan
For a start, you probably should change the page's title to something more like "Writing an Assembler in Java (and using it to generate a boot loader written in your new dialect of assembly)"...embryo2 wrote:Have just finished Java Bare Bones. Please, take a look if interested. Also mistake correction (or pointing at) would be appreciated.
Some changes also have been made in the Languages, and Introduction sections.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: Java as an alternative language in the wiki
It's a way of using Java for OSdeving. The way C is used is as such:Brendan wrote:For a start, you probably should change the page's title to something more like "Writing an Assembler in Java (and using it to generate a boot loader written in your new dialect of assembly)"...
- Somebody writes assembly translator
- Somebody writes assembly program, which is used as a C translator
- Somebody writes C program
- C translator is executed
- C program (in it's the very new form) is executed
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability
Re: Java as an alternative language in the wiki
Hi,
In the same way; you could write an assembler in Java that gets the assembly source code from separate file/s (and then write a boot loader in assembly); or you could write an assembler in Java where the assembly source code is embedded directly into the assembler itself (and then write a boot loader in assembly).
Basically; you're writing an assembler, and then writing a boot loader in assembly. You're not writing a boot loader in Java.
Cheers,
Brendan
You're conflating "writing a C compiler" with "using a C compiler". The normal way people use C is:embryo2 wrote:It's a way of using Java for OSdeving. The way C is used is as such:Brendan wrote:For a start, you probably should change the page's title to something more like "Writing an Assembler in Java (and using it to generate a boot loader written in your new dialect of assembly)"...
- Somebody writes assembly translator
- Somebody writes assembly program, which is used as a C translator
- Somebody writes C program
- C translator is executed
- C program (in it's the very new form) is executed
- Somebody writes C source code
- C translator is executed
- C program (in it's the very new form) is executed
In the same way; you could write an assembler in Java that gets the assembly source code from separate file/s (and then write a boot loader in assembly); or you could write an assembler in Java where the assembly source code is embedded directly into the assembler itself (and then write a boot loader in assembly).
Basically; you're writing an assembler, and then writing a boot loader in assembly. You're not writing a boot loader in Java.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.