Announcement

Collapse
No announcement yet.

ToaruOS With Kernel Written From Scratch Is Still In Development

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

  • Luke_Wolf
    replied
    Originally posted by unixfan2001 View Post

    Think about it like this:

    Objects are tightly bundled items of data and its associated behaviour (i. e. "dog" and "woof"). Thus OOP is about logically connecting data and code.
    FP takes an entirely different approach. Here data and behaviour are to be kept separate, leading to immutable, pure functions.
    I'm not really sure I understand what you're getting at. Could you take the previous example of the dog and provide a code example so that we have a comparative example, that'd be much easier for me to see.

    Leave a comment:


  • unixfan2001
    replied
    Originally posted by Luke_Wolf View Post


    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.


    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.
    Think about it like this:

    Objects are tightly bundled items of data and its associated behaviour (i. e. "dog" and "woof"). Thus OOP is about logically connecting data and code.
    FP takes an entirely different approach. Here data and behaviour are to be kept separate, leading to immutable, pure functions.

    Leave a comment:


  • AsuMagic
    replied
    Originally posted by debianxfce View Post

    If you make errors with C, do not program.
    you should consider stop using linux and xfce since there are bugs existing.

    Leave a comment:


  • AsuMagic
    replied
    Originally posted by tuuker View Post

    sorry to say but truth is a pain, if everyone always tries to have a hobby then nothing gets completed usually. You should learn from much advanced civilizations who think and make things like collective mind.
    ftfy - wait...

    Leave a comment:


  • Luke_Wolf
    replied
    Originally posted by Luke_Wolf View Post
    [snip] If neither of these is correct it would be helpful for you to explain it.
    stupid lack of edit button

    Leave a comment:


  • Luke_Wolf
    replied
    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.

    Leave a comment:


  • jrch2k8
    replied
    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

    Leave a comment:


  • unixfan2001
    replied
    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.

    Leave a comment:


  • tuuker
    replied
    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.

    Leave a comment:


  • unixfan2001
    replied
    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).

    Leave a comment:

Working...
X