Thread overview
Dr Callahan ports D compiler to OpenBSD
Mar 21, 2021
Walter Bright
Mar 21, 2021
Brian
Mar 21, 2021
Johan
Mar 22, 2021
Brian
Mar 24, 2021
Kagamin
Mar 22, 2021
Iain Buclaw
Mar 22, 2021
Brian
Mar 23, 2021
Walter Bright
March 21, 2021
https://briancallahan.net/blog/20210320.html

https://news.ycombinator.com/item?id=26520996#26531423

https://reddit.com/r/programming/comments/m9xu8s/a_working_d_compiler_on_openbsd/

Thanks to Dr Brian Callahan!
March 21, 2021
On Sunday, 21 March 2021 at 22:41:36 UTC, Walter Bright wrote:
> https://briancallahan.net/blog/20210320.html
>
> https://news.ycombinator.com/item?id=26520996#26531423
>
> https://reddit.com/r/programming/comments/m9xu8s/a_working_d_compiler_on_openbsd/
>
> Thanks to Dr Brian Callahan!

I don't have an HN or Reddit account so I'll reply here.

First, thanks. But second, all I really did was the last mile stuff. Lots of people did nearly all of the work before I came along, which I hope I made enough mention of in my blog post.

I've also opened a bug report for GDC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99691
But it looks like Iain was already on it, so I suspect we really want to thank him more than me for the GDC parts!

(You also don't have to call me Dr. -- it's there just because it's my personal/professional website and I happen to be employed as an academic.)
March 21, 2021
On Sunday, 21 March 2021 at 23:14:36 UTC, Brian wrote:
> On Sunday, 21 March 2021 at 22:41:36 UTC, Walter Bright wrote:
>> https://briancallahan.net/blog/20210320.html

Hi Brian,
  Very nice.

Seeing that pledge/unveil are declared in unistd.d, your work should probably land here:
https://github.com/dlang/druntime/blob/master/src/core/sys/posix/unistd.d#L2556

Cheers,
  Johan

March 22, 2021
On Sunday, 21 March 2021 at 23:56:15 UTC, Johan wrote:
> Seeing that pledge/unveil are declared in unistd.d, your work should probably land here:
> https://github.com/dlang/druntime/blob/master/src/core/sys/posix/unistd.d#L2556

Yes, I think so. People who program on OpenBSD expect pledge and unveil to always be available, and so having them in druntime is better than a separate module.
March 22, 2021
On Sunday, 21 March 2021 at 23:14:36 UTC, Brian wrote:
> On Sunday, 21 March 2021 at 22:41:36 UTC, Walter Bright wrote:
>> https://briancallahan.net/blog/20210320.html
>>
>> https://news.ycombinator.com/item?id=26520996#26531423
>>
>> https://reddit.com/r/programming/comments/m9xu8s/a_working_d_compiler_on_openbsd/
>>
>> Thanks to Dr Brian Callahan!
>
> I don't have an HN or Reddit account so I'll reply here.
>
> First, thanks. But second, all I really did was the last mile stuff. Lots of people did nearly all of the work before I came along, which I hope I made enough mention of in my blog post.
>
> I've also opened a bug report for GDC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99691
> But it looks like Iain was already on it, so I suspect we really want to thank him more than me for the GDC parts!
>

Kai did the initial druntime/phobos bindings.  I fixed them after a number years of the port going stale, and removed pretty much all platform-specific bindings from phobos in the process (brk still remains, but I think it's better just to deprecate that experimental allocator).

The all non-gdc bits had been upstreamed with the last remants sitting uncommitted on a VM waiting for the last few failing tests of the testsuite to be fixed.

I think it would be a fair attribute Kai and I for the 95% that was enough to get ldc and gdc working respectively. It was only a matter of time before someone would port dmd as well. :-)
March 22, 2021
On Monday, 22 March 2021 at 07:27:22 UTC, Iain Buclaw wrote:
> I think it would be a fair attribute Kai and I for the 95% that was enough to get ldc and gdc working respectively.

Sounds good to me!
March 22, 2021
No problem, Brian. I just assumed that since the article used Dr, that you preferred it.

It's a good idea to sign up on Reddit and HN, if only to help support your work and articles.
March 24, 2021
While we're at it, can I has SOCK_CLOEXEC and SOCK_NONBLOCK flags?