Re: Best practice for dub registry package and module names

2022-09-06 Thread Vijay Nayar via Digitalmars-d-learn
On Sunday, 4 September 2022 at 01:52:11 UTC, Ali Çehreli wrote: Let's say I have three modules that work together, which I want to register on dub: A, B, and C. Here I would take inspiration from the Java world, where a "domain" is used per project. Typically this domain is written from the

Re: importC and cmake

2022-09-06 Thread zjh via Digitalmars-d-learn
On Tuesday, 6 September 2022 at 19:44:23 UTC, jmh530 wrote: . `xmake` is simpler.

Re: Forked GC explained

2022-09-06 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/6/22 6:31 PM, frame wrote: Well, of course it would be the fault of the programmer. I did ask this because I just want to know if there is any catch of this (probably not intended/yet noticed) violation of some third party lib. I don't want do debug this :D You can be confident that if

Re: synchronized/shared associative array .require error

2022-09-06 Thread frame via Digitalmars-d-learn
On Tuesday, 6 September 2022 at 10:28:53 UTC, Loara wrote: On Saturday, 3 September 2022 at 14:07:58 UTC, frame wrote: Not exactly, a synchronized class member function becomes automatically a shared one. This is not present in official documentation so other compilers different from `dmd` ar

Re: Forked GC explained

2022-09-06 Thread frame via Digitalmars-d-learn
On Monday, 5 September 2022 at 18:35:02 UTC, Steven Schveighoffer wrote: On 9/5/22 7:12 AM, frame wrote: And what if the programmer has no actual reference but wrongly forced a `free()` through a pointer cast? https://dlang.org/spec/garbage.html#pointers_and_gc * Do not store pointers into no

importC and cmake

2022-09-06 Thread jmh530 via Digitalmars-d-learn
I was thinking about trying out importC with a library I have used in the past (it's been a few years since I used it with D). The library uses cmake to generate static or dynamic libraries (I believe I did static with Windows and dynamic with Linux, but I can't really recall). My understandi

Re: Does D actually support flexible array members?

2022-09-06 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 6 September 2022 at 11:51:35 UTC, IchorDev wrote: On Thursday, 18 August 2022 at 11:25:22 UTC, Paul Backus wrote: I think the closest way to approximate this in D is to use a zero-length static array: ```d struct ArenaChunk { size_t size; ArenaChunk* next; char[0] mem

Re: Does D actually support flexible array members?

2022-09-06 Thread IchorDev via Digitalmars-d-learn
On Thursday, 18 August 2022 at 11:25:22 UTC, Paul Backus wrote: I think the closest way to approximate this in D is to use a zero-length static array: ```d struct ArenaChunk { size_t size; ArenaChunk* next; char[0] memory; } ``` Would Nullable be a good option as well? [https:/

Re: BetterC stack traces?

2022-09-06 Thread IchorDev via Digitalmars-d-learn
On Monday, 5 September 2022 at 12:35:10 UTC, Paul Backus wrote: Digging in a little deeper, it looks like the druntime implementation ultimately depends on the C++ exception handling ABI, via its platform-independent library interface. Bindings are defined in `core.internal.backtrace.unwind`

Re: synchronized/shared associative array .require error

2022-09-06 Thread Loara via Digitalmars-d-learn
On Saturday, 3 September 2022 at 14:07:58 UTC, frame wrote: Not exactly, a synchronized class member function becomes automatically a shared one. This is not present in official documentation so other compilers different from `dmd` aren't forced to assume it. This should be consider an experi