Announcement

Collapse
No announcement yet.

PowerNex: A Kernel Written In The D Programming Language

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

  • #41
    Originally posted by starshipeleven View Post
    protip: "unix" is a trademark afaik (Novell? others?) so it's better if your thing does not use it if you plan to show it to others someday.
    Never thought about it like this. But since I've only ever seen libraries use the "POSIX" nomer, you're probably right.
    Guess I'll need to come up with another name then.

    Since we are on it, and that I know little of these matters, how does your project differ from node-os?
    Node OS is mainly targetting developers/devops. Mine is a graphical, network transparent OS targetting interested software development newbies.
    In that way it's more like OS.js, minus the node/webkit part.

    Comment


    • #42
      Originally posted by unixfan2001 View Post
      Never thought about it like this. But since I've only ever seen libraries use the "POSIX" nomer, you're probably right.
      Guess I'll need to come up with another name then.
      Just looked it up, it's a trademark of these guys. http://www.unix.org/trademark.html

      Node OS is mainly targetting developers/devops. Mine is a graphical, network transparent OS targetting interested software development newbies.
      In that way it's more like OS.js, minus the node/webkit part.
      Mh, that can be useful. Good ways to teach coding skills, we need that.

      Comment


      • #43
        On the highly popular C++ vs D debate, D2.0 came out in in 2007 and most of the language features that currently exist were in place in 2010, comfortably before C++11 and C++14. The comparison between D and C++17 with all of the latest C++ language features and recommended coding practices is tough. I still maintain that D is a better language, but C++11 and newer is good enough that when you weigh in all of the existing C++ code you can use with it, D is a hard sell.

        As an aside, I don't give any weight to the argument that D is only borrowing ideas from older languages. Everything in C++ was in Lisp, C, or both before it and if you can dump D because it's unoriginal then you can dump C++ too for the same reason.

        D has these nice features:
        -- nested function definitions
        -- pure keyword, that guarantees a function does not rely on any state outside its input parameters
        -- nothrow keywoard, that guarantees a function doesn't throw any but a small class of runtime errors (like out-of-memory)
        -- scope guard operator, which is a simpler way to express the kinds of guards you would use with try/catch/finally blocks (which D also has) and make it more convenient to do manual memory management
        -- const and immutable keywords. "const" works the same was in D as in C++. "immutable" is transitive, so immutable auto a = getFoo(); a.getBar().getBaz().setQuux(5); would fail to compile.
        -- file-level variables are thread-local by default and need additional modifiers to be true globals.
        -- @safe function keyword, which blocks pointer arithmetic, most kinds of type casts
        -- Uniform Function Call Syntax, which is a compiler-supplied convenience for method chaining that can make for very terse code without sacrificing readability ( https://dlang.org/spec/function.html#pseudo-member ), instead of (quux(baz(bar(foo(x, y)), z), ax, ay) you can do x.foo(y).bar().baz(z).quux(ax,ay).
        -- lambda functions (added to C++ in C++11) for inline function definitions
        -- auto keyword (added to C++ in C++11) for compiler type inference
        -- default function parameters (also in C++)
        -- convenient syntax for including unit tests right in the same source file as the code they test.
        -- @property modifier for fields. As anyone who worked with Java long enough knows, it's common practice to declare everything instance variable in Java with private SomeClass x; public SomeClass getX() { return x }; public void setX(SomeClass inX) { this.x = inX; } because if you ever need to add intercept behavior in your "get" or "set", it's simpler. If you just declare public SomeClass x; and then need to add the interceptor later, you have to go to every place that accesses it and modify the code to use your new intercepting get and set methods. With @property in D, you can add intercept behavior without modifying existing call syntax.
        -- "static if" provides compile-time evaluation of D code in place of the C/C++ preprocessor.
        -- unicode strings are built in to the language. UTF8 is the basic, but there's also UTF16 and UTF32 forms of all of the string-manipulation functions.
        -- convenient array slicing, resizing, and copying syntax

        Now again, I think you can argue we're moving towards a world where C++(some number) offers every developer convenience available in D, and all you have to do is not write code like it's 1995. And also again, C++ has the overwhelming advantage of millions upon millions of lines of existing code available for use. But D is a damn good language.

        Comment


        • #44
          Originally posted by Master5000 View Post
          D. Always wondered why they called it that. Now I know. Because D comes from Dead. D is Dead. Only moronic hipsters would use it. Especially to write an OS.
          In that case, C++ ought to be renamed to "Z" for zombie.

          Comment


          • #45
            Originally posted by Master5000 View Post
            D. Always wondered why they called it that. Now I know. Because D comes from Dead. D is Dead. Only moronic hipsters would use it. Especially to write an OS.
            Another great example of useless troll post. Completely ignoring the whole thread and the subject at large, making not-even-funny name jokes, and calling names people for the sake of it.

            9.5/10, near perfect.

            Comment


            • #46
              Originally posted by Michael_S View Post
              On the highly popular C++ vs D debate, D2.0 came out in in 2007 and most of the language features that currently exist were in place in 2010, comfortably before C++11 and C++14. The comparison between D and C++17 with all of the latest C++ language features and recommended coding practices is tough. I still maintain that D is a better language, but C++11 and newer is good enough that when you weigh in all of the existing C++ code you can use with it, D is a hard sell.
              Yeah, this is the main problem with D. When it first appeared, it was an interesting option, and a reasonably attractive one compared to C/C++ of the time... I remember looking at it many years ago. But for whatever reason, it never really caught on - and over time, it's lost what advantage it had.

              Comment


              • #47
                Originally posted by Delgarde View Post
                But for whatever reason, it never really caught on - and over time, it's lost what advantage it had.
                I seem to remember it having issues similar to what kept Ada from catching on. (Back in the days when it mattered, the official DMD compiler wasn't released under suitably open terms and nobody else like Microsoft offered an acceptable alternative, so people chose what they'd already paid for or had free access to (C++) instead, just like in the C vs. Ada competition.)

                Comment


                • #48
                  Originally posted by Michael_S View Post
                  But to be fair, the Go team has been working very hard to optimize their garbage collector and they've achieved performance on par with Java.
                  On par with Java really isn't much of an accomplishment, the garbage collector(s) in Java is one of the major pain points now since it doesn't scale to todays system size. But I think go made huge strides in version 1.5, very much so that GC won't really be an issue for applications.

                  Comment


                  • #49
                    Originally posted by Master5000 View Post
                    Great! Another fucking kernel. That will go after Hurd that is a turd. Great work guys! Don't help with what already works! Be original! Reinvent the PC! Fuck Intel! Make your own chips!
                    Oh but it's all progress.. just read some random Linux-bigot

                    Probably interesting personal challenge for a coder, much more interesting than contributing to projects of others..
                    Last edited by aht0; 18 July 2016, 09:26 AM.

                    Comment


                    • #50
                      Originally posted by aht0 View Post
                      Oh but it's all progress.. just read some random Linux-bigot
                      Probably interesting personal challenge for a coder, much more interesting than contributing to projects of others..
                      can you please explain why linux-bigots should say it is progress? Anything not moving Linux forward is not progress for linux-bigots.

                      Also, it's licensed with MPL (more permissive license), not GPL, so that's blasphemy for linux-bigots.

                      You manage to bew even more troll fail than him. Slow clap.

                      Comment

                      Working...
                      X