Hi,
Synapse wrote:
What one osdevver need to do, to create a truly free OS?
By free, I don't just mean money, but legal obligations. We all know those free licenses, MIT, GPL, Apache, but by using them, you inherit some legal obligations, as in some derivatives should be free too.
In the real world, it's logical, useful, and we're all grateful for those licenses, and the people who create programming material, and share them under those licenses. But a thought experiment came up to my mind: What should I do, to achieve true freedom?
In my opinion; the obligations imposed by some licenses (e.g. BSD, MIT, Apache) are relatively insignificant; and obligations imposed by compatibility are far more significant.
For one of many examples; poor ancient language design (e.g. how awkward it is to return multiple values from a function in C) paves the way for poor work-arounds (e.g. having "errno" because it's too awkward to return the cause of an error from a function directly) which leads to even worse work-arounds (abusing thread local storage as a hack to make "errno" usable for multi-threaded software); where to actually fix the problem and create a clean programming environment that isn't crippled by "historical idiocy" you have to replace the language, its library, and all software that used either.
Synapse wrote:
To be hundred percent sure, that you've achieved total freedom from money and legal obligations, you should
1. Create your own programming language, using another one.
2. Write your own compiler for it.
3. Rewrite your compiler using your own language.
4. Develop your OS using that language.
In my case (where "plain text as source code file format" is part of the historical idiocy I'm trying to fix) this isn't enough.
I tried to design and create my own source code file format, but to avoid writing a full IDE for another OS (a huge amount of work that would've been useless/discarded later) I started with a "pre-translator" to convert plain text into my source code file format. What I discovered is that my mind is cursed - even when deliberately trying to avoid obligations imposed by "plain text as source code file format" I still made design decisions (in both the language and in my source code file format) that were tainted by "plain text".
Mostly what I'm getting at here is that (in addition to the obvious problems of replacing languages and all software) there's a less obvious problem, which could be described as "breaking through a mental barrier of preconceived ideas originating from existing software".
Note that if you write your own code in your own language without ever even seeing anyone else's code, then you still have to worry about infringing patents. For this reason I'd be tempted to say "true freedom" is unobtainable.
Cheers,
Brendan