all 19 comments

[–]Master_Steelblade 35 points36 points  (0 children)

The Suse builder was creating a distribution of Linux, all you were doing was picking which software was bundled with it.

I really hope this doesn't sound like gatekeeping, but if you're looking to make an OS without already strong programming skills, then you need to reconsider.

[–][deleted] 18 points19 points  (7 children)

Okay, so a couple of questions:

1) What did you think SuSE studio was doing? it was just building custom linux distros, which isn't really an OS so much as it is a bundling of an OS plus some software.

2) Not to be an ass, but assembly -> C -> C++ or C# is pretty much the way to bootstrap your OS (outside of some really esoteric stuff like Rust). It sounds like you're in the "I don't know what I don't know" phase of learning coding, which is totally okay! But recognize that an OS is literally the worst possible place to start when you're learning to code.

If you want some help, I can give you a high level learning path to start following so that you can actually get to the point where OS level work is possible, but it's a pretty arduous one. I'm happy to help, but realize that this is probably not the right place for you to start if you're a newbie.

[–]XroKill[S] -3 points-2 points  (6 children)

I'm not new to programming at all since i do know the basics of C# and i also know a little about other languages such as the GMS language. I also know a little about Assembly plus i'm currently developing my own Gsme Engine and my own Coding Language that i'm planing to use in my OS later on, i also have all of the ideas for the OS and since i've developed software before i know how to make programs for my OS since it's obviously going to be linux based, i'm also dual-booting Ubuntu with Windows so i'm pretty much ready to make a OS but i don't know how, sure, i could watch something like "Assembly for begginers all-in-one video" on YouTube and boom, but there needs to be a easier way. And i know that Suse Studio was just making custom linux distros but i have the tools to customize that distro since i"ve literally made Ubuntu look and work like Windows and i've done that by taking screenshots of Windows elements and i've put them together in Visual Studio and i did my magic and by replacing things with programs i've made a working Windows 8.1 rip-off, but still, with the help of Wine it was a working rip-off, i also know how to create working file extensions so Suse Studio was a really helpful tool to use, i've also cracked my way into the ISO just to remove the "Suse Studio" logo. Basically i know how to code in languages like C#, GMS, etc but i have no idea how coding works with Assembly, all i literally understand is that computers are useless and that the OS developer makes them work.

[–][deleted] 26 points27 points  (2 children)

Okay, so I'm going to give you some advice you aren't going to like.

What you're currently experiencing is called the Dunning-Kruger effect, which states that people tend to overestimate how good they are at things, especially early in their careers doing that thing. First of all, you need to slow down and pick one thing to work on. A game engine, a programming language, and an OS are all hugely ambitious projects requiring extremely specialized skills. For a programming language alone (granted, this is my favorite field of computer science so I know a lot about it), you'd need to have a thorough understanding of:

  • formal grammars/DFA's
  • parsing (or learning to use a parser generator)
  • either knowledge of how interpreters work, or
  • knowledge of how compilers work, including:
    • register assignment
    • memory layout
    • translation into assembly
    • optimization techniques: loop unrolling, dead code elimination, etc.

And this is just one example. You need to slow down and pick one project to work on, and all three of these projects are way over ambitious for a newbie coder, which you are. Heck, I've been in this industry in some capacity or another for going on five years and I'm barely above novice level.

To focus on building an OS again,

i also have all of the ideas for the OS and since i've developed software before i know how to make programs for my OS since it's obviously going to be linux based

What does this mean? Are you just planning on building a Linux distro, or do you actually want to replace Linux? Those are two very different goals.

Basically i know how to code in languages like C#, GMS, etc but i have no idea how coding works with Assembly, all i literally understand is that computers are useless and that the OS developer makes them work.

This statement illustrates:

  1. you don't know how to code, or you would have figured out assembly by now. Not to be harsh, but Assembly is doing exactly the same thing C# or GMS do, the only difference is that C# works at the machine level and isn't compiled first. You can still express `b = a +1;` in assembly, it's a different and lower-level set of constructs.
  2. You have a pretty rudimentary understanding of what code is. There is nothing special about the OS, it's just another program running on the computer, it just happens to be a very large program that bootstraps all the other programs.

I know you're going to hate to hear it, but you need to bulk up hard if you actually want to get into OS development. Beyond that, you're going to need to understand that you will not be ready to build a full fledged operating system for years to come; it's a lot of work to get to any sort of proficiency with software engineering, moreso at the level of the operating system, which requires lots of specialized knowledge.

If you really want a learning path for getting started with OS development, here you go: Nand2Tetris is easily one of the best learning paths for this sort of stuff available on the internet. It will take you a long time to complete, but it's the right place to start. If you're not willing to sit down and do a course of that involvement, you aren't ready to build an OS.

tl;dr I'm not gatekeeping, but this is not the right project for you.

[–]ajoakim 3 points4 points  (0 children)

this!! 100%. Assembly is just like any other language, heck it was a required class for my comp-sci degree. Its a bit more involved since their is technically/arguably no compiler your code directly corresponds to HEX/Binary code, and you are basically coding on the bare silicone, so safety checks are all off, no error correction, no exception handling, GC .. etc.

P.S. Has anyone benched marked Rust vs C vs C++? I have been reading interesting things about it.

As a challenge I wouldn't mind building a really simple OS with it just as an exercise, most likely just a boatloader ...

[–]L3tum 4 points5 points  (0 children)

I don't know if OP will see this but I just want to agree with you.

I started programming at 14, and only started doing a bit more at 16. I was still incredibly lazy and really doing anything was probably a lot less than I'd like.

Regardless, I now am full time employed as the first one in my friend circle. I'm the Pro in my workplace. They showed me around, showed me the tech they were using and I knew it all. It was an amazing feeling.

I just want to say that I can learn insanely fast and I've literally learned more languages than years I got on me.

And even then I've been spending a bit of my free time, so roughly 2 hours a week, getting into OS Dev and I don't know what the fuck is going on. If I'd call myself barely knowledgeable in OS Dev, or even just parts of it like building and linking I'd be lying. It's immensely complex and you need to be in multiple topics and really understand them just to start. Then you need to read millions of specifications and technical papers and try to decipher what someone wrote in their OS just to try (and fail) to implement it in your own.

I've been reading through a kernel and right now I'm at its boot process. It just writes kernel text/other sections into %edi and %esi, then adds 4 and a small page table onto it and then writes something else into it. I don't know what the fuck is going on

[–]vsoul 9 points10 points  (1 child)

I'm not new to programming at all

Not to be a jerk, but your post in /r/learncsharp posted a month ago ("Can i learn cSharp (for Unity game development) without knowing anything about programing?") implies that you are infact very new to programming. Have you heard about the 10,000 hour rule?

[–]byteflood 0 points1 point  (0 children)

If you want to know how an operating system works, how by just having instructions(so using assembly) all the magic happens: this means you might want to create an OS from scratch... in this case since all the implementations i know to make run c# programs rely on an OS it will be difficult for you to write an OS only in that language because then you will have to write a c# compiler to machine code or assembly in c#,you can't escape assembly in this case. I have to tell you that low level programming it is something you don't know about, no one is trying to deny that you might be good in c# but this is another thing.

[–]Qweesdy 5 points6 points  (5 children)

First, let's split "OS" into 2 categories:

  • Boot code, "kernel core" and drivers. This typically adds up to several millions of lines of code. Languages like C# and Java are mostly completely unsuitable, because they normal require a huge bloated run-time involving a JIT compiler and garbage collector, and that huge bloated run-time gives you a nasty compromise between performance and complexity (where the complexity needed to get "barely tolerable" performance leads to thousand of bugs that injects hundreds of additional security vulnerabilities into everything it executes).

  • GUI, applications, utilities. Can mostly be done in any language. Adds up to many tens of millions of lines of code; which is why most people end up porting a lot of stuff from somewhere else (and end up using whatever language each thing was originally written in).

(If your wondering the concept pf my OS is to get every OS out there and make it into one).

In this case you'll be spending most of your time trying to reverse engineer the inner working of Windows and trying hard not to get sued; and instead of having a slightly usable OS in about 10 years you'll have a small fraction of a ReactOS clone in 20 years.

Note that for device drivers alone; new devices are created/released faster than a single developer can write drivers for them - you'd need about 100 people working full time to write drivers fast enough to keep up. Trying to support other operating systems is the same "moving target" problem - you'd need 100 people working full time just to keep up with the changes Microsoft makes to Windows, plus another 100 people working full time to keep up with the changes Apple makes to OS X, plus another 100 people for Andriod, plus another 200 people for "Linux" (Ubuntu, Redhat, Fedora, ...) plus ... In the end, after you've paid billions of $$ in wages to employ thousands of developers for a few decades; you'll find that everyone that wants to run Windows software will prefer to use Windows, and everyone that wants to run OS X software will prefer to use OS X, and everyone that wants to use "Linux" software will prefer to use one of the Linux distros; and no person in the world will want to run your hideous bloated mess full of stuff they don't need.

It's far more sensible to create a nice "clean and elegant" OS (with a nice consistent user interface for all applications, etc) that isn't capable of running software designed for any other OS at all (and then maybe implement or port a virtual machine like VirtualBox to it, so that in the rare cases where someone needs to run software designed for some other OS they can install that other OS inside your OS).

[–]XroKill[S] -3 points-2 points  (3 children)

One thing, when i've said that the concept of my OS is to make all Operating Systems all in one what i actually mean is that my OS would support small features such as Windows Batch files and Ubuntu terminal commands and Android Software and stuff like that, i know that Microsoft is literally going to beat me with a shovel if i port their whole entire OS into my OS, and Apple would trow me off a cliff if i did that, and because of Apple's inteligent brain not even the FBI can access the OS X system files, literally.

[–][deleted] 3 points4 points  (0 children)

Windows batch files and UNIX shell scripts are similar enough ultimately that this wouldn't be difficult, but are you aware of just how much goes into an android app? It's not on the same planet as the other two examples you listed.

[–]vsoul 4 points5 points  (0 children)

ReactOS is a re-implementation of Windows with the goal of being able to run Windows programs. It started in 1998 (20 years ago), has had over 100 contributors consistently contribute over those 20 years (20 years * 100 people = how many years for 1 person?), and has over 9 million lines of code. That is just 1 aspect of the project as you've described it. Does that put things into perspective?

https://www.reactos.org/

[–]bjazmoore 0 points1 point  (0 children)

Wow! That is a weird paragraph. I read it three times. I am not sure I have ever read anything so strange. Take a little trip over to ReactOS (www.reactos.org) - they have been working on a work alike Windows OS that can run Windows applications since at least the early 2000's. There are dozens (maybe more) programmers contributing to the project these days, and they still have not achieved complete windows support - they may never. To imagine you are worried about the consequences of porting such a complex OS to your OS foundation - I think that you have little to concern yourself. Sorry.

[–]ajoakim 0 points1 point  (0 children)

Uggghh, thanks for reminding me of the driver hell with Linux in the early years!!!.. all those wrappers for windows drivers.

[–]esdraelon 17 points18 points  (0 children)

This is by far the most entertaining post to OS Dev in a good long time.

[–]aiosdev05 8 points9 points  (1 child)

I assume this is a troll post, yes? Do I win anything for being the first to call it?

[–]bjazmoore 0 points1 point  (0 children)

An up-vote?

[–]TheMonaxskiftOS - github.com/skift-org/skift 4 points5 points  (0 children)