Fling OS - Kickstarter project

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
User avatar
EdNutting
Posts: 17
Joined: Tue May 27, 2014 2:41 pm
Location: London, UK
Contact:

Fling OS - Kickstarter project

Post by EdNutting »

Hi all!

My project is rather different to most - I'm aiming to create a reference operating system with full technical documentation, reference articles and tutorials for all aspects of the Fling OS code. (It's also different because I've written it in C# and written my own IL compiler).

I'm running a Kickstarter campaign for the project to try and raise money to keep the website / domain names and to oay for further promo. Please help support me in my endeavour!

https://www.kickstarter.com/projects/ednutting/fling-os

The project's website is: http://www.flingos.co.uk

Thanks very much and any feedback is welcome!
Ed Nutting
(Project creator & developer)
User avatar
SoLDMG
Member
Member
Posts: 96
Joined: Wed Jul 23, 2014 8:00 am
Location: The Netherlands
Contact:

Re: Fling OS - Kickstarter project

Post by SoLDMG »

Not to make you lose hope or anything, but this isn't very new. There might be differences in the project i.e. choice of language, but have you ever heard of MINIX?
My post is up there, not down here.
User avatar
EdNutting
Posts: 17
Joined: Tue May 27, 2014 2:41 pm
Location: London, UK
Contact:

Re: Fling OS - Kickstarter project

Post by EdNutting »

I am well aware it's not a "totally" new idea but it isn't different to most of OS projects out there. Also, my approach to documentation and articles is from a self-teaching background and I have quite a bit of experience in teaching others and writing articles. As to your other comment, I have a few things to say to that (and the example you give):

1) Yes I have heard of it and as I'm sure you're aware MINIX has shifted focus a lot and is no longer really an educational OS
2) Most of the offerings out there are either not available any more, out of date, not maintained etc.
3) I would argue a lot of the "educational" OS'es out there focused a lot on code with inline comments but very few have any amount of reference articles or tutorials associated with the code making them hard if not useless to learn from.
4) To simply not do a project because others had a similar idea is a very defeatist attitude and if everyone had that approach a lot of the best projects in the world wouldn't have been done.

I value constructive feedback, not "seen something similar before, why bother" responses ;) (Though I guess your own signature says it all really... )

I'd just like to add as a final note, that I started Fling OS in February as a personal-learning project (which I will continue regardless). I am simply looking to raise the funds so I can afford to keep it online for others to view and use and so I can promote it to get others involved.

All the best,
Ed
User avatar
SoLDMG
Member
Member
Posts: 96
Joined: Wed Jul 23, 2014 8:00 am
Location: The Netherlands
Contact:

Re: Fling OS - Kickstarter project

Post by SoLDMG »

Hi Ed,

My post wasn't meant to discourage you in any way, if it came over like that, I do apologize. I am aware that MINIX has shifted focuses, but it still is a valid learning platform. I was just pointing it out. I probably should have put more effort into my message either way. I have noticed as well that many so called "teaching operating systems" haven't been updated for years, if they were any valuable resource at all.

If you'd like, I will try to port my WIP toolchain to your OS once it's more or less functional (that goes both ways, the toolchain AND Fling OS), even as a placeholder for other (probably more well-written toolchains) like GCC.

I wish you succes, as I'll probably take a peek and cheat if I can't figure something out myself :roll:

Good luck,
SoLDMG
My post is up there, not down here.
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: Fling OS - Kickstarter project

Post by SpyderTL »

I find it hard to believe that you started in February, have worked on it by yourself, wrote your own IL->ASM compiler, and have USB2.0 support already.

If you did, indeed, pull this off on your own, that blows my mind.

Don't worry too much about getting negative feedback on this site. You learn to ignore most of it.

There are several similar projects on this site, technology-wise, so you are in good company.

As a matter of fact, I'm working on an XML -> XSLT -> Byte Code compiler, and an object oriented OS as well. With that in mind, I just want to run a few ideas by you, in case you want to borrow anything...

There is a Java-based project (jEmbryOS) currently under development, with a similar approach to yours (java -> byte code). However, this project actually has an additional feature -- it contains a Java Virtual Machine, completely written in Java, so that it can be compiled to x86 byte code, and that code can run actual Java applications. You may want to consider doing something similar, so that you could, in addition to compiling .NET applications, you could also run .NET applications, directly.

I watched the videos on your web site of the console shell, and I think that you might want to consider going in a different direction. When I started my project, one of the goals that I wanted to achieve was to have an object oriented shell, similar to PowerShell, but more along the lines of the Immediate Window in Visual Studio. Unless you are already dead-set on creating your own shell with your own keywords, you might want to consider doing something similar. It would be cool if you could create .NET objects, and call methods on them directly from the console.

In any case, congratulations on the progress that you've made so far. I may cheat and use some of your code to help finish up my USB support. :wink:

Let us know if there is anything we can do to help.
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
User avatar
EdNutting
Posts: 17
Joined: Tue May 27, 2014 2:41 pm
Location: London, UK
Contact:

Re: Fling OS - Kickstarter project

Post by EdNutting »

@SoLDMG - Haha okay well that's more reasonable then :) I like the sound of your offer - I will let you know once I progress further but at the moment my focus is on adding the reference articles and tutorials. Thanks very much, you too! And you're more than welcome to take a look - it's hardly cheating to use a resource to teach yourself ;p

@SpyderTL - Well then consider your mind blown;) I had worked with Cosmos before I started my own project but I wrote the entire IL compiler from scratch under my own design. I have also been programming in C# for 10+ years now so I have a good understanding of the language so writing an IL to assembler compiler wasn't that challenging. As for the kernel, obviously I have not written the entire lot from total scratch without help or resources. I have learnt from many other people's work scattered across the internet and in places as a starting point for my own code but the vast majority of the work is my own. (I have yet to put a sources page in the documentation but I am preparing one over the coming week).

USB 2.0 support was particularly challenging (and took over 2 months of development) as all the code for USB 2.0 drivers I could find just didn't work barring any derivatives of the Linux source. I have to point out it only supports EHCI and the UHCI code which is commented out entirely is a clone of the PrettyOS code which I was going to use as a basis but decided it was unnecessary extra work at my current stage.

As for negative feedback, thanks for the encouragement! But I don't generally get set back by anything like that - I've had my fair share on CodeProject over the years (along with school not being the most tech-friendly environment - especially when you're teaching the teacher so-to-speak! :P )

And wow okay - that's sounds even more nuts than writing one in C#! I'm rather curious how you can make XML a functional language not just a data syntax?

And thanks for the suggestion. I've already considered this and am toying with the idea. I've spent a while looking through C# JIT compiling vs. pre-compiling (the way my OS does) and am coming to the conclusion that writing a HIT compiler is going to be more effort than it is worth. (I can always add that as a feature later via a JIT compiler driver). I will be writing a Pre-compiler for drivers (once I've sorted my process manager and executable format - yet to be decided). After the main kernel is complete, a JIT compiler for full user mode applications would be a highly-attractive option.

Further to your object-oriented shell idea - I like it! Hadn't thought of putting that in the OS. By design the current Shell is more of a stub - it would never be in future fully-working version of the kernel. The MainShell (as it is currently called) just has the minimal set of commands required to boot necessary services. I will probably write a new, in-a-process version with a better design later ;)

Thanks and haha you're welcome to (provided you credit Fling OS as the source - the current Copyright is basically no-use without my say. You can count this as me saying you;re allowed to use it provided due credit is given :) )

All the best and I have to say, reading these forums over the past few months has already been a useful source of information (even if it is rather hard to dig-out / find at times!)
Ed
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: Fling OS - Kickstarter project

Post by SpyderTL »

EdNutting wrote:I had worked with Cosmos before I started my own project
Okay, that makes a little more sense. I've been using C# since the 1.0 Beta, but it's taken me over 4 years to get an OS that could see a USB 1.x controller and detect connected devices.
And wow okay - that's sounds even more nuts than writing one in C#! I'm rather curious how you can make XML a functional language not just a data syntax?
The key is using XSD files to define elements, and XSLT files to convert those elements into lower level elements. (It's similar to inline functions in C++)

My code is up on https://ozone.codeplex.com if you want to take a look. (One of the advantages to writing everything in XML is that it's easy to read and convert to other languages.)

I started out using C# to write instructions (byte codes) out to a stream, but a co-worker of mine actually suggested using XML instead, after we worked out that "code" is basically just data in a platform specific format (x86, ARM, MOS, etc.). So I started digging up all of the byte codes for all of these platforms, along with any interesting constants, like memory locations and I/O port numbers, and saving all of them as name-value pairs in XML. Then I wrote two XSLT transforms to convert each of these files into an XSD schema, and an XSLT transform that would convert the elements defined in the XSD into byte codes. Then I just read all of the byte codes and write them out to a stream (.iso file, floppy image file, or actual floppy drive).

Once all of this was in place, I started creating more XSD/XSLT files that would transform function call elements into multiple instructions, and then I started combining these function calls into "class" files (written in XML, of course). Then I just wrote a console shell that lets you type the name of a class, and a method, and the returned value would be converted to a string (.ToString), and displayed on the screen. You can even chain them together, like C#. (i.e. System.GetTime.Hours.ToString.Length)

Most of the compiler work is done with XSLT files, but there are a few things that I'm doing in C#, like calculating memory addresses and disk block indexes, etc. Also, the code that runs all of the XSLT transforms is written in C# as well.

There is a rather lengthy post about it here: http://forum.osdev.org/viewtopic.php?f=15&t=27971

That thread has a video of the system up and running. (on page 3...)
All the best and I have to say, reading these forums over the past few months has already been a useful source of information (even if it is rather hard to dig-out / find at times!)
Ed
Agreed. This is one of the best resources on the internet for low level development.

Feel free to edit the wiki to add missing information or clean up the existing pages. I've found that adding detailed information to the wiki and answering questions on the forums actually helps me understand what I'm talking about faster than anything...
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
embryo

Re: Fling OS - Kickstarter project

Post by embryo »

EdNutting wrote:I'm aiming to create a reference operating system with full technical documentation, reference articles and tutorials for all aspects of the Fling OS code.
I've expected to find an architecture description, but even promised articles are missed :(
User avatar
EdNutting
Posts: 17
Joined: Tue May 27, 2014 2:41 pm
Location: London, UK
Contact:

Re: Fling OS - Kickstarter project

Post by EdNutting »

(I) expected to find an architecture description
What precisely would you like to see? Drop me an email (http://www.flingos.co.uk/contact) with what you would like to have added and I will endeavour to add it. "Architecture specification" means an awful lot of different things so I'm not entirely sure what you mean. Here are a few possibilities:
  • Target architecture spec? Well, at the moment that is x86 32-bit but that's stated on the website (or it used to be - if not I need to add it again).
  • API spec? I only have a core kernel at the moment without a process manager, executable format or API so there is no API to spec out as-yet.
  • Code structure spec? It's a pretty obvious code/file structure given the limited amount of code there. Overviews of how aspects of the kernel link together are coming in the reference articles.
but even promised articles are missed :(
Sorry but what exactly have I promised that is missing? I have said what I intend to create - reference articles and tutorials - but as clearly stated, they are yet to be created. I also have full inline comments for everything but the last few USB files (which I am literally working on now) and also full technical docs for every method, field, member etc. Each namespace has a summary and a reasonable number of methods and classes also have remarks added. The only thing missing I guess is a future design plan, but that's not within the scope of what I said existed or will exist.

Please send me an email via the contact details on the website (link provided above) if this does not answer your complaint.

Thanks,
Ed
kutkloon7
Member
Member
Posts: 98
Joined: Fri Jan 04, 2013 6:56 pm

Re: Fling OS - Kickstarter project

Post by kutkloon7 »

Ok, interesting, but a little vague :P First off, it seems like a really cool project. I (and I think many others with me) always have great ideas that I don't actually implement or start with. Big props to you for actually starting with it.

I got a couple of questions though.
In the end, you have to compile C# to x86 assembly. You mentioned that you worked with Cosmos before. Do you use (part of) the Cosmos framework (which does this, as far as I understand) for this project? Or have you taken another approach (for example, implemented a virtual machine that executes bytecode)?

Also, what exactly is the difference between your operating system and, for example, Linux? AFAIK, Linux is opensource and documented.

Further, the kickstarter page looks really nice, but I don't think it has the "I want it" effect on most people. The (theoretical) benefits to programmers, OSdevers and end-users are not really demonstrated. This, together with the high-priced rewards, may keep people from funding your project.
User avatar
EdNutting
Posts: 17
Joined: Tue May 27, 2014 2:41 pm
Location: London, UK
Contact:

Re: Fling OS - Kickstarter project

Post by EdNutting »

Okay well first off thanks :) I will respond bit by bit to your questions:

1) To state clearly: I do not use any of the Cosmos framework or code.

Yes the overall effect is compiling C# to x86 but, exactly like Cosmos, I do not compile C#. Both Cosmos and my project use the MS compiler to compile C# to MSIL. We both then compile that IL code into x86 code via a compiler written in C# (Cosmos' is called IL2CPU, mine is just the Kernel Compiler). In the same way GCC precompiles C to asm, our compilers compile IL to x86 NASM ASM. However, I do not use Cosmos' compiler. I use the same basic idea but my compiler is very different, particularly in the way it handles raw assembler plugs. I wrote my IL compiler from scratch, completely independently after I quit the Cosmos project. I strongly dislike their compiler architecture and approach to writing their OS and feel my implementation is much cleaner, much more maintainable and it's certainly faster for larger code bases. All that said, the IL compiler is not part of the actual Kernel, so I am not including it in my aims of documentation and tutorials. Particularly since it is a very specialist area that is non-transferable to other kernels since it is language specific.

2) Haha Linux? Documented? Hardly... Linux is a fully-working, optimised, production OS. It has little inline comments, very few function headers and descriptions and the code is renowned for being unreadable a lot of the time. Along with many of its drivers being developed by private companies that don't document their source, even if it is public, for pretty obvious reasons. Linux is certainly not a good OS to learn from (and believe me I've tried). It is also so massive that you cannot easily break it apart or play with it. Lastly, it contains a lot of hacks and workarounds for various bits of specific hardware that it supports and requires a lot of customisation for any given target hardware, making it extremely difficult to start working with as a learning developer.

3) Hmm yes I see what you mean. I have been struggling with how to create that effect. The issue is it's very difficult to give a sense of what will be available, without actually creating it - the chicken and the egg problem hits hard again :P The small rewards are low-priced, the higher priced ones are limited and actually quite cheap for what I have offered to do e.g. £75 for 3 personalised videos is very cheap! Videos take a lot of time and effort to create! If you have any specific suggestions as to what you think would improve it, please let me know!! :)

Cheers,
Ed
PearOs
Member
Member
Posts: 194
Joined: Mon Apr 08, 2013 3:03 pm
Location: Usually at my keyboard!

Re: Fling OS - Kickstarter project

Post by PearOs »

Hello,

I think you have a good concept and goal. However, I am curious as to how you have decided to solve this problem. You use Microsoft's C# Compiler to get the IL Code, which is perfectly fine and works. Though, since you are following some layout of C#, theoretically you won't be able to compile your Kernel/OS on the platform itself without porting the C# compiler, or writing your own. Have you come up with a solution to this or do you plan to continue to develop the project on other platforms?
User avatar
EdNutting
Posts: 17
Joined: Tue May 27, 2014 2:41 pm
Location: London, UK
Contact:

Re: Fling OS - Kickstarter project

Post by EdNutting »

Hi there!

First of all thanks! :) As for your question, well it's pretty logical really... I mean given my compiler can compile my OS. And my compiler is written in C#. Then I can easily tweak the compiler, add it as part of the kernel source then use the compiler to compile the kernel source and voila. My compiler is part of the kernel so can compile my kernel from within my kernel. Such things are pretty simple to solve (at least the theory is simple. The "tweaking" part is what gets complicated :p)

As for writing a C# to IL compiler, yes you're right I would have to port Mono or write my own. But in the scale of things that's both a long way off and compared to the rest of the OS, it is just another small (but significant) part.

Cheers,
Ed
Ed Nutting

"A computer does exactly what it is programmed to do. Nothing more, nothing less." - At a high level, you can blame other people (usually interns ;) ). At OS level, I guess we just have to blame the firmware devs ;)
User avatar
EdNutting
Posts: 17
Joined: Tue May 27, 2014 2:41 pm
Location: London, UK
Contact:

Re: Fling OS - Kickstarter project

Post by EdNutting »

By the way, for the moment my plan is to make kernel driver executables pre-compiled to machine code level. JIT compiling from IL and/or a C# compiler are a long long way off.
PearOs
Member
Member
Posts: 194
Joined: Mon Apr 08, 2013 3:03 pm
Location: Usually at my keyboard!

Re: Fling OS - Kickstarter project

Post by PearOs »

EdNutting wrote:Hi there!

First of all thanks! :) As for your question, well it's pretty logical really... I mean given my compiler can compile my OS. And my compiler is written in C#. Then I can easily tweak the compiler, add it as part of the kernel source then use the compiler to compile the kernel source and voila. My compiler is part of the kernel so can compile my kernel from within my kernel. Such things are pretty simple to solve (at least the theory is simple. The "tweaking" part is what gets complicated :p)

As for writing a C# to IL compiler, yes you're right I would have to port Mono or write my own. But in the scale of things that's both a long way off and compared to the rest of the OS, it is just another small (but significant) part.

Cheers,
Ed
You are very welcome,

I figured that's what you were thinking. I have a super similar project, my Operating system (PearOs) used to use Microsoft's C# compiler as well, and then I compiled the IL to Assembly. You're right, it is a ways down the road, but it's something to think about.

Well you don't have to use a JIT compiler unless that is your goal, for my own personal operating system everything is already at the machine level just to save time and make things easier, though I have a way of keeping everything compatible across versions and code changes, but that's complicated within itself.

Good luck and hopefully you will reach your backing on Kick starter.

- Matt
Post Reply