Live data from Hacker News

PowerNex: a kernel written in the D Programming Language

github.com

21–30 of 79 posts

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

#21
post #13

Earlier quoted context omitted.

We don't need more POSIX copies. I would rather see someone take D, Rust, Swift, whateverX and implement something modern, following the concepts explored at Xerox PARC, ETHZ and MSR in terms of OS architectures and development environments.

It sounds you like you asking for more toy OSes. Supporting POSIX is necessary if the designer wants the OS to run real software.

I'm pretty sure the software that requires an OS that runs POSIX software is sufficiently catered to. You have your Linuxes of every sort of flavor anyone could ever want (ranging from LFS/Gentoo Stage 3/Arch for the tuners and minimalists, to the 'I want to have Docker/git at my OS level' NixOS-esque machines, to the Ubuntu's for the "anything-but-Microsoft" demographic. (Not to mention, your BSDs, your QNX's (+3 or 4 other POSIX RTOS that are well supported in their ecosystem), your AIXes for the DB2's, ... ) It's sufficiently been explored and the need has been catered to.

Pjmlp (correct me if I'm wrong) would rather see exploratory endeavors rather than Yet-another-POSIX-impl. (And for the sake of argument, should that new platform garner steam and you absolutely, 100%, completely and totally need POSIX support! you can get pretty far creating PE/ELF on a non-POSIX OS with an emulation layer with ~3-4% overhead[VMware had a few whitepapers on it, and Unity is a component in production that demonstrates such behavior])

And if he were motivated enough to write a POSIX impl from scratch, while not trivial, it shouldn't be too hard (see: BusyBox, Yocto/Poky, hell, remember the NetBSD days? Any idiot could port to platform foo in a weekend.)

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

#22
post #19
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…

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…

Last I checked, JSON parsing is not a typical (soft-)real-time workload. Heck, GC probably doesn't even kick in in that JSON benchmark.

And yes, I'm aware that Phobos is being rewritten to remove GC. I'll reevaluate D when that's complete.

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

#23
post #11
post #9

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

Andrei Alexandrescu, one of chief architects of D answered this a while ago on Quora [1]. IMO, this is a fair and nuanced answer. [1] https://www.quora.com/Which-language-has-the-brightest-futur...

Hehe, I saw a talk with the creators of Rust, D, C++ and Go. No one of the "older" fellas even knew the Rust guy and I don't even know anymore who he was, was it Hoare? Maybe.

C++ was about "We get things fixed, I promise!"

D was about "We get shit done!"

Go was about "We are good enough!"

Rust was about "We try new shiny things!"

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

#24
post #23
post #11

Earlier quoted context omitted.

Andrei Alexandrescu, one of chief architects of D answered this a while ago on Quora [1]. IMO, this is a fair and nuanced answer. [1] https://www.quora.com/Which-language-has-the-brightest-futur...

Hehe, I saw a talk with the creators of Rust, D, C++ and Go. No one of the "older" fellas even knew the Rust guy and I don't even know anymore who he was, was it Hoare? Maybe. C++ was about "We get things fixed, I promise!" D was about "We get shit done!" Go was about "We are good enough!" Rust was about "We try new shiny things!"

I'm not under the impression that all that much of what Rust does, besides borrow checking, is necessarily all that new. Aren't most the other things from other languages that have used them to good effect?

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

#25
post #19
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…

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://github.com/kostya/benchmarks/pull/46#issuecomment-14...

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

#26
post #23
post #11

Earlier quoted context omitted.

Andrei Alexandrescu, one of chief architects of D answered this a while ago on Quora [1]. IMO, this is a fair and nuanced answer. [1] https://www.quora.com/Which-language-has-the-brightest-futur...

Hehe, I saw a talk with the creators of Rust, D, C++ and Go. No one of the "older" fellas even knew the Rust guy and I don't even know anymore who he was, was it Hoare? Maybe. C++ was about "We get things fixed, I promise!" D was about "We get shit done!" Go was about "We are good enough!" Rust was about "We try new shiny things!"

One of the reasons that "Rust" is the name is that Rust _doesn't_ try things that are "new and shiny." Or rather, it depends on where you come from: coming from the PLT perspective, many of the ideas in Rust are pretty old, but if you come from industry, they seem very new.

(Also, the person who was in the video you're talking about was Niko Matsakis, not Graydon. And it was August 2014, so, so much has changed with Rust since then.)

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

#27
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…

Extremely minor nit: Rust has affine types, not linear.

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

#28
post #13

Earlier quoted context omitted.

We don't need more POSIX copies. I would rather see someone take D, Rust, Swift, whateverX and implement something modern, following the concepts explored at Xerox PARC, ETHZ and MSR in terms of OS architectures and development environments.

It sounds you like you asking for more toy OSes. Supporting POSIX is necessary if the designer wants the OS to run real software.

Do you consider the Xerox Star a toy OS versus what UNIX was capable of doing in 1981?

Do you consider iOS, Windows, ChromeOS, Android, IBM i, z/OS, Unisys MCP toy OSes given their architecture and minimal use of POSIX?

POSIX only defines the necessary to write CLI and daemon software, nothing more.

What I consider real software is a bit more than that.

I never felt the need for POSIX when I am not using C.

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

#29
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.)

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

#30
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…

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 Royal Navy in Algol-68RS.

I am pretty convinced, that just like e.g. JavaScript performance, there needs to be someone with enough money to bully the industry with such technologies until they stop being tabu.

I still remember reading from C guys on Usenet that C++ would never be usable for writing OSes.

Yet there are quite a few of them now.

Post reply on HN