Live data from Hacker News

PowerNex: a kernel written in the D Programming Language

github.com

41–50 of 79 posts

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

#41
post #36
post #24

Earlier quoted context omitted.

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?

True story. But look at the functional stuff. I mean how much of this is really in broad use? Yes at the moment there seems to be a functional renaissance, but before that 90% of the programmers around the world tought of stuff like Haskell or OCaml as crazy academical experiments.

What "functional stuff" are you referring to? I don't consider Rust a particularly functional language, other than the fact that it has closures and the ability to `map` over iterators. And if closures and `map` are your benchmarks for functional stuff, then Python, Javascript, and Perl have been doing functional stuff for decades now. :)

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

#42
post #12

The creator of PowerNex, Wild, streams the development on Livecoding as well, if anyone wants to watch. https://www.livecoding.tv/wild/

Yep, been following his streams on and off on there. Sad that livecoding.tv hasn't become big, but I can see why honestly.

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

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

Which projects use D as the main language ? Rust has Servo. Redox got some light. But D has always been a language's language.

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

#44
post #36
post #24

Earlier quoted context omitted.

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?

True story. But look at the functional stuff. I mean how much of this is really in broad use? Yes at the moment there seems to be a functional renaissance, but before that 90% of the programmers around the world tought of stuff like Haskell or OCaml as crazy academical experiments.

I guess I belong to those 10%.

My first FP language was Caml Light in 1995, I was doing "LINQ" in Smalltalk on that same year and Prolog on 1996.

Sadly not all CS degrees are how they should be.

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

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

Personally I find D a much more comfortable option. I tried Rust a few times, and it contains a few nice features ('match', expressional if-else, built-in tuples/multiple return) which would be cool to see in something like D, but I found the overt emphasis in Rust on safety to be entirely too aggravating to work with. Perhaps I might try it again in the future, though, who knows.

To any Rust pros here, I'm curious: how long did it take for you to really get to grips with the language, coming from say, a C/C++ background?

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

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

Which projects use D as the main language ? Rust has Servo. Redox got some light. But D has always been a language's language.

http://vibed.org/

Facebook uses D a lot internally IIRC, although I'm not sure if many of the tools they made have been open-sourced.

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

#47
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...

Isn't Rust's syntax technically more Algol-like than C/C++/Go/D are? Anyways, I don't think it's worth calling that a disadvantage, at least with the way it's stated. I think "high learning curve" is a lot more accurate in this circumstance. And I'd disagree that the syntax serves no purpose, I think it's specifically designed to reinforce the notions of Rust's programming style (for example, implicit returns because Rust code is designed to always return something instead of using void functions). I'd be surprised if the syntax didn't help shorten code in at least a few places.

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

#48
post #41
post #36

Earlier quoted context omitted.

True story. But look at the functional stuff. I mean how much of this is really in broad use? Yes at the moment there seems to be a functional renaissance, but before that 90% of the programmers around the world tought of stuff like Haskell or OCaml as crazy academical experiments.

What "functional stuff" are you referring to? I don't consider Rust a particularly functional language, other than the fact that it has closures and the ability to `map` over iterators. And if closures and `map` are your benchmarks for functional stuff, then Python, Javascript, and Perl have been doing functional stuff for decades now. :)

There is quite widespread use of monads in the standard library (albeit with a very targeted effort to hide their nature and make them very concrete).

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

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

Re: concurrency, D's concurrency story is really quite good. It may not be built upon as sound a logical model as Rust's (few languages can compete there), but it has very good ergonomics, and offers a nice range of concurrency strategies. See std.concurrency, std.parallelism, and vibe.d:

- http://dlang.org/phobos/std_concurrency.html - http://dlang.org/phobos/std_parallelism.html - http://vibed.org/

std.parallelism and vibe.d in particular are absolute pleasures to work with. As a framework, vibe.d is well designed to avoid unnecessary allocation and runs very efficiently.

D's current GC is quite poor, that's a common complaint. But the recent and forthcoming "nogc" changes are making a significant difference -- it's increasingly easy to avoid the GC altogether.

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

#50
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.

For hard realtime systems most kinds of dynamic memory allocations are a no-go. A lot of programs with such requirements have everything statically allocated, others use some static memory pools and custom allocators that those. I think that should also work with D - with the problem of losing lots of the standard library.

I think the most problematic area is somewhere in between: Applications that want a mostly realtime performance without having to put too much work on guaranteeing it (e.g. Games, Low Latency Audio Processing, ...).

Post reply on HN