Live data from Hacker News

PowerNex: a kernel written in the D Programming Language

github.com

51–60 of 79 posts

Re: PowerNex: a kernel written in the D Programming Language

#51
post #19

Earlier quoted context omitted.

I wouldn't be very sure about the claim that "D can never compete with Rust in performance and real-time or soft-real-time systems" . If anything, due to much better metaprogramming (as you mention), you can have D programs that ARE faster than Rust (eg: see JSON parsing benchmark [1]). You can write programs in D that have ZERO garbage collection. In fact, the core libraries (phobos) are being actively rewritten to…

The D "fastjson" version is not a general solution: > I think it is not necessary to validate data you are not using. So basically > I only scan them so much as to find where they end. Granted it is a bit of > optimization for a benchmark, but is actually handy in real-life as well. > After all you could still raise the validation level to maximum if you really > cared or call one of the validation functions. https:/…

shameless plug, you can use https://github.com/tamediadigital/asdf it should offer comparable performance to fastjson while having all the nice features.

Re: PowerNex: a kernel written in the D Programming Language

#52
post #3

Other kernels in D: xomb and trinix: http://wiki.xomb.org/ https://github.com/Rikarin/Trinix

Sadly, XOmB hasn't seen a commit in three years. So it's not going to be representative of contemporary D. (I was originally involved, long ago.)

there was actually some activity within a fork: https://github.com/xomboverlord/xomb/network

Re: PowerNex: a kernel written in the D Programming Language

#53
post #2

What's the kernel design here? Is it monolithic like linux?

I love how everyone is digging into the D/Rust/C++ flamewar and not discussing the project at hand. It appears monolithic. There's actually very little content about what it's design goals are, what it's trying to accomplish, or even what interfaces it'll support. I'm assuming POSIX because everyone loves to re-write UNIX and there is a boat load of documentation/implementations and most of these are monolithic.

Yea, that's disappointing.

I'd assume an Object-Oriented language would be better at implementing a microkernel. Objects, in my mind, really represent the idea of a service well so I'd be excited to see what it would look like.

Too bad we're never going to get out 128 core SPARC machines with an open-source microkernel like was prophesied in the Linux-MINIX debate.

Re: PowerNex: a kernel written in the D Programming Language

#54
post #16
post #9

Will someone with familiarity with both Rust and D talk a bit about the similarities and differences?

I think this is a valid question. They're pretty different languages in terms of design, but they're definitely worth comparing—their problem domains do overlap in spite of design differences. I've used both, but can't claim to be much of an expert in either. Similarities: • Compile to fast, easy-to-deploy native code • Abstraction continuum ranging from very low-level C-like style to a high-level more functional sty…

Although the GC is there and is the default, often D projects use various other memory management schemes in critical places. You can use malloc/free, custom allocators, stack allocators, and RAII in the usual ways as required.

Re: PowerNex: a kernel written in the D Programming Language

#55
post #16

Earlier quoted context omitted.

I think this is a valid question. They're pretty different languages in terms of design, but they're definitely worth comparing—their problem domains do overlap in spite of design differences. I've used both, but can't claim to be much of an expert in either. Similarities: • Compile to fast, easy-to-deploy native code • Abstraction continuum ranging from very low-level C-like style to a high-level more functional sty…

> it means with Rust you will spend more time thinking about memory ownership and other important-but-eliminated-by-GC concerns. Both are easier to deal with than C or C++. I think an important wrinkle here is that Rust's ownership model helps prevent many runtime-errors other than memory safety. I'm not sure how D handles problems like iterator invalidation, but I've found it really nice to always know what's able t…

D offers type modifiers that include the notion of transitive immutability. This is very useful in function signatures in determining what a function may be modifying without needing to rely on comments.

Re: PowerNex: a kernel written in the D Programming Language

#56
post #37
post #30

Earlier quoted context omitted.

D's GC really could use some love, but they are working on it this year's GSoC. As for using GC in a systems programming language, even last a few days ago we had the links from Xerox Star. Originally developed in Mesa, which eventually became Cedar, that made use of GC. Also the whole set of ETHZ Oberon workstations. And many other experiences. The oldest I can find is a Flex computer system developed by the UK Roya…

I didn't say D wasn't suitable for writing OSes. Might as well throw Singularity into the list of GCed operating systems. I did say D is unsuitable for real-time and soft-real-time programs, OS or otherwise. You can't write an RTOS in D.

> You can't write an RTOS in D.

Can't is a pretty strong word. You can write C-style code in D that compiles and behaves identically to C, including malloc/free.

Re: PowerNex: a kernel written in the D Programming Language

#59
post #2

What's the kernel design here? Is it monolithic like linux?

I love how everyone is digging into the D/Rust/C++ flamewar and not discussing the project at hand. It appears monolithic. There's actually very little content about what it's design goals are, what it's trying to accomplish, or even what interfaces it'll support. I'm assuming POSIX because everyone loves to re-write UNIX and there is a boat load of documentation/implementations and most of these are monolithic.

Actually I'm not targeting a POSIX structure at the moment, I'm more towards implementing a OO api for stuff. Maybe I will target POSIX in the future or make a wrapper around my apis for it.

Re: PowerNex: a kernel written in the D Programming Language

#60

Earlier quoted context omitted.

I love how everyone is digging into the D/Rust/C++ flamewar and not discussing the project at hand. It appears monolithic. There's actually very little content about what it's design goals are, what it's trying to accomplish, or even what interfaces it'll support. I'm assuming POSIX because everyone loves to re-write UNIX and there is a boat load of documentation/implementations and most of these are monolithic.

Yea, that's disappointing. I'd assume an Object-Oriented language would be better at implementing a microkernel. Objects, in my mind, really represent the idea of a service well so I'd be excited to see what it would look like. Too bad we're never going to get out 128 core SPARC machines with an open-source microkernel like was prophesied in the Linux-MINIX debate.

I would want to create a microkernel, but that would be really hard so I'm targeting a hybridkernel design.
Post reply on HN