Announcement

Collapse
No announcement yet.

ToaruOS With Kernel Written From Scratch Is Still In Development

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by starshipeleven View Post
    Torvalds hates OOP (knowing java, I can't really disagree), anything that might be seen as/used as/facilitates OOP will trigger a FUCK YOU $language_name ! reaction.

    Remember the above, "if we must use c++ but accept only c-like stuff we are better off using c period".
    1. Haskell isn't OOP though. It can emulate some OOP behaviour, just like C. Otherwise it's purely functional.
    2. I don't think Hi-Angel was suggesting the inclusion of Haskell code inside the Linux kernel. While this is very much possible (there are POCs already. Such as the House operating system) the runtime is too slow for widespread low-level integration.

    Comment


    • #22
      Originally posted by unixfan2001 View Post
      1. Haskell isn't OOP though. It can emulate some OOP behaviour, just like C. Otherwise it's purely functional.
      2. I don't think Hi-Angel was suggesting the inclusion of Haskell code inside the Linux kernel. While this is very much possible (there are POCs already. Such as the House operating system) the runtime is too slow for widespread low-level integration.
      Actually, Hi-Angel is talking of using Rust in the kernel, Haskell was just a comparison someone else did.

      Comment


      • #23
        Originally posted by Luke_Wolf View Post

        Just because it doesn't have explicit classes does not mean that Rust isn't object oriented. All OOP really means is creating models in code as opposed to simply writing algorithms to create solutions[1]. Designing models has a lot of overhead associated with it up front, and for one off programs it may not be worth it. However once you get into the range of a program being thousands of lines of code you are writing less code because OOP promotes code reuse in a way that non-OOP code can't provide. Furthermore by creating a discrete model with concrete units it's far easier to reason about and comprehend the code than if you just have a mess of functions.
        ...
        ROFL. OOP is one specific way to handle complexity. It is not the only one nor is it the best.

        One can write perfectly maintainable and modular code without OOP. But if all you have is a hammer, everything looks like a nail.

        Comment


        • #24
          Originally posted by log0 View Post

          ROFL. OOP is one specific way to handle complexity. It is not the only one nor is it the best.

          One can write perfectly maintainable and modular code without OOP. But if all you have is a hammer, everything looks like a nail.
          This!

          Not sure why Luke_Wolf seems to think OOP is the only way to model data.
          First class functions and things like typeclasses (a Haskell feature) are a way to model data in a functional way. Then there is also the DOP paradigm.

          Comment


          • #25
            Originally posted by starshipeleven View Post
            Torvalds hates OOP (knowing java, I can't really disagree), anything that might be seen as/used as/facilitates OOP will trigger a FUCK YOU $language_name ! reaction.

            Remember the above, "if we must use c++ but accept only c-like stuff we are better off using c period".
            Lol.
            Most of the kernel API is object-oriented.

            Hint : if you have a set of functions such as :

            Code:
                struct banana { int foo; float bar; };
            
                void banana_bazify(banana*);
                int banana_get_amigo(banana*, int r); 
                banana* banana_create();
                void banana_cleanup(banana*);

            You are already firmly in OOP realm.

            Comment


            • #26
              Originally posted by debianxfce View Post

              Using assembler i just an technical example that you do not need Android and Java to create similar games that there is for Commodore 64. Java is a problem and that is why Vulkan is coming to Android.
              1. Good luck writing anything remotely meaningful in ASM! x86_64 has a vastly larger number of registers and instructions as well as two different instruction sets (AMD64 and Intel 64) that compilers are usually working around. RISC adds even more in terms of complexity.

              2. Your ability to mix up two completely disparate things never ceases to amaze me. Java is a programming language. Vulkan is a graphics and computing API (which can be called from Java, btw).

              Comment


              • #27
                Originally posted by AsuMagic View Post

                stop commenting, that's a time waste!
                sorry to say but truth is a pain, if everyone always tries to make own OS from scratch then nothing gets completed usually. You should learn from much advanced civilizations who think and make things like collective mind.

                Comment


                • #28
                  Originally posted by debianxfce View Post

                  Haskell is not industry standard kernel programming language. Wiki says :
                  https://en.wikipedia.org/wiki/Haskel...mming_language)
                  "
                  difficulty of reasoning about resource use with non-strict evaluation, that lazy evaluation complicates the definition of data types
                  "
                  Kernel developers do not want non-strict lazy evaluation.
                  Of course not. No one ever claimed otherwise.

                  We were talking language theory in general, not kernel development.
                  There's a world outside the kernel, too.

                  Comment


                  • #29
                    In layman terms, rust code in the kernel is not gonna happen ever, for several reason:

                    1. possible license issue
                    2. requires LLVM, the kernel community don't even want clang patches that much let alone LLVM as dependency
                    3. I'm pretty sure rust is too high level for several kernel code path and i'm not sure how well can mix with ISO C at that level
                    4. LLVM doesn't even support most of the platforms that the kernel does, this is enough for have linus laugh hard at you for even try
                    5. GCC have specific infrastructure for the kernel that is not present on clang/LLVM and that is pretty unique for their usecases

                    so, no on linux is not gonna happen for a long long time

                    Comment


                    • #30
                      Originally posted by unixfan2001 View Post
                      1. Haskell isn't OOP though. It can emulate some OOP behaviour, just like C. Otherwise it's purely functional.
                      2. I don't think Hi-Angel was suggesting the inclusion of Haskell code inside the Linux kernel. While this is very much possible (there are POCs already. Such as the House operating system) the runtime is too slow for widespread low-level integration.
                      Originally posted by unixfan2001
                      This!

                      Not sure why Luke_Wolf seems to think OOP is the only way to model data.
                      First class functions and things like typeclasses (a Haskell feature) are a way to model data in a functional way. Then there is also the DOP paradigm.
                      How do you define Object Oriented Programming? I define it as follows: "Writing code in such a way as to map real world or conceptual objects such as a dog, or a connection to a server to code objects". I think this a generally agreeable definition, and it follows that anything that facilities writing code in an Object Oriented Programming manner, can be classified as Object Oriented. That includes Procedural, Functional, Relational or Declarative languages. Now to take a counterexample C I would generally agree is not an object oriented language, not because you cannot write C code that is more or less object oriented, but because it doesn't facilitate such usage. There isn't really a nice way to handle polymorphism as an easy example, whereas with Rust it's as trivial as C# is.

                      Data Oriented Programming on the other hand I never could find a solid definition on but it seems to be defined as one of two possible things. #1. Database Languages. #2. To structure your data in such a way as to only expose the data needed by the caller when you cross a boundary. This is to say to write things to roughly follow the idea of the MVVM pattern. I'm going to assume it's the latter definition as opposed to the former. If neither of these is incorrect it would be helpful for you to explain it.

                      Originally posted by log0
                      ROFL. OOP is one specific way to handle complexity. It is not the only one nor is it the best.

                      One can write perfectly maintainable and modular code without OOP. But if all you have is a hammer, everything looks like a nail.
                      Please, let's see an example, "Muh Unix Principles" don't count because most big problems can't really be decomposed into a set of utilities run from the command line, and layered programming where a layer is a mess of functions I certainly don't consider to be a better alternative.

                      Comment

                      Working...
                      X