News for hackers. Stuff that matters.
Re:A working D compiler on OpenBSD by yrgulation on Sunday March 21, 2021 @10:18AM (#26530634)
I'm sorry I can't help but comment how awesome DLang is. Please promote this more on here. Wish I had the time to write open source projects around it, as I simply love this language. I'll reiterate it would benefit from a nice set of webassembly packages - the syntax is easy to pick up for anyone familiar with web languages, and it feels natural that DLang could dominate wasm libraries.
Re:A working D compiler on OpenBSD by bachmeier on Sunday March 21, 2021 @01:16PM (#26532002)
Re:A working D compiler on OpenBSD by destructionator on Sunday March 21, 2021 @06:43PM (#26534847)
and my approach is to do a minimal custom lib

http://dpldocs.info/this-week-in-d/Blog.Posted_2020_08_10.ht...

Re:A working D compiler on OpenBSD by teleforce on Saturday March 20, 2021 @07:33PM (#26526886)
From the article, it's interesting to note that D utilizes Thread-Local Storage (TLS) by default and that OpenBSD does not has support for the feature [1].

[1]https://www.oreilly.com/library/view/the-linux-programming/9...

Re:A working D compiler on OpenBSD by p0nce on Sunday March 21, 2021 @12:08PM (#26531423)
Note that you can use D without TLS on scenarii that don't support it. TLS is a need of (parts of) the D runtime, which you can avoid if need be. This is painful, yet doable.
Re:A working D compiler on OpenBSD by WalterBright on Sunday March 21, 2021 @06:34PM (#26534781)
The older D compilers would emulate TLS for platforms that didn't support it, like the older Mac OS. That code is still in there somewhere.
Re:A working D compiler on OpenBSD by rurban on Monday March 22, 2021 @10:07AM (#26540958)
He is using exactly that already.
Re:A working D compiler on OpenBSD by 10x-dev on Sunday March 21, 2021 @11:53AM (#26531314)
D is just a wonderful language, with a super fast compiler and amazing feature set.

I only wish it had better debugging support.

Re:A working D compiler on OpenBSD by bogwog on Sunday March 21, 2021 @08:10PM (#26535337)
Is D's value proposition that it's a better successor of C than C++? Because that's what it seems like to me from a quick read of the website.

But it also seems like D is not suitable for a lot of things that C++ is, like embedded applications. Also, it doesn't seem like support for Android and iOS is very good at the moment. So for portability, C++ is still the only choice.

D does seem really nice though, like a modern high level language, but with support for custom memory management, low-level system APIs, and even ABI compatibility with C. But I'm hesitant to build anything with it because as much as I loathe working in C++, it's still the safest bet by far.

Also, Swift seems like it has similar goals, but with Apple's full support behind it.

Re:A working D compiler on OpenBSD by EvenThisAcronym on Monday March 22, 2021 @07:51AM (#26539541)
> But it also seems like D is not suitable for a lot of things that C++ is, like embedded applications

Not sure where you got this idea, as being usable for embedded programming is explicitly one of D's design goals. You can use D anywhere you use C++, and it is a much nicer language to boot!

> Also, it doesn't seem like support for Android and iOS is very good at the moment

I can't comment on this. There is support for both platforms IIRC, but I haven't tried writing apps for either in D.

> But I'm hesitant to build anything with it because as much as I loathe working in C++, it's still the safest bet by far.

I'm not sure what you mean by "safe" here. D has been around for over 20 years and isn't going anywhere anytime soon. The main difference from C++ is that the community is smaller, and it's a bit harder to get a job writing D (but not that much harder nowadays; there are a lot of people working for companies like Symmetry Investments, writing D every day).

> Also, Swift seems like it has similar goals, but with Apple's full support behind it.

Swift also seems like a very nice language, and I would probably be using it if D didn't exist. That being said, its metaprogramming capabilities are woefully underpowered to D's. From my experience, only the Lisp family of languages beat D in this area.

Re:A working D compiler on OpenBSD by bachmeier on Sunday March 21, 2021 @09:21AM (#26530194)
The one reason I've not done anything with OpenBSD is the lack of a D compiler. Maybe now I'll give OpenBSD a try.
Re:A working D compiler on OpenBSD by fao_ on Sunday March 21, 2021 @02:42PM (#26532760)
what im really hoping for is extended attributes support again. i use them for a file tagging system i made (https://gitlab.com/finnoleary/koios) and dont really want to be on a computer without that
Re:A working D compiler on OpenBSD by WalterBright on Sunday March 21, 2021 @06:33PM (#26534771)
Well done, Dr. Callahan!