On D's garbage collection

2019-10-08 Thread Marcel via Digitalmars-d-learn
I'm been thinking about using D in conjunction with C11 to develop a set of applications with hard real-time requirements. While initially the goal was to use C++ instead, it has become clear that D's introspection facilities will offer significant advantages. Unfortunately, the project will he

Re: On D's garbage collection

2019-10-13 Thread Marcel via Digitalmars-d-learn
On Tuesday, 8 October 2019 at 16:48:55 UTC, Ferhat Kurtulmuş wrote: On Tuesday, 8 October 2019 at 16:43:23 UTC, Ferhat Kurtulmuş wrote: On Tuesday, 8 October 2019 at 16:28:51 UTC, Marcel wrote: [...] I think you may find this interesting: https://www.auburnsounds.com/blog/2016-11-10_Running-

x64 ABI

2019-10-14 Thread Marcel via Digitalmars-d-learn
It appears that the ABI specification only describes the register convention for x86. Where can I find which registers get preserved across function calls for 64-bit targets?

Re: x64 ABI

2019-10-14 Thread Marcel via Digitalmars-d-learn
On Monday, 14 October 2019 at 16:05:34 UTC, Stefan Koch wrote: On Monday, 14 October 2019 at 16:02:28 UTC, Marcel wrote: It appears that the ABI specification only describes the register convention for x86. Where can I find which registers get preserved across function calls for 64-bit targets?

@disable("reason")

2020-01-07 Thread Marcel via Digitalmars-d-learn
Hello! I'm writing a library where under certain conditions i need all the default constructors to be disabled. I would like to tell the user why they can't instantiate the struct. Is there a way to do that?

Re: @disable("reason")

2020-01-08 Thread Marcel via Digitalmars-d-learn
On Wednesday, 8 January 2020 at 07:03:26 UTC, Jonathan M Davis wrote: On Tuesday, January 7, 2020 5:23:48 PM MST Marcel via Digitalmars-d-learn wrote: [...] In terms of an error message? Not really. You can put a pragma(msg, ""); in there, but that would always print, not just wh

Static fields with shared fields

2020-01-27 Thread Marcel via Digitalmars-d-learn
Hello! If I declare a static variable inside a struct that contains a shared field, is that new variable also shared? For example, say I have a custom atomic wrapper type, like C++'s std::atomic, that contains only one shared variable: Does it remain shared when I instantiate one or do I have

Type sequence concatenation / associative array implementation

2020-02-12 Thread Marcel via Digitalmars-d-learn
Hello! I have two questions: 1- How can I concatenate two type sequences? 2- How is the builtin associative array implemented? I think I read somewhere it's implemented like C++'s std::unordered_map but with BSTs instead of DLists for handling collisions: is this correct?

Conditional Attributes

2020-02-18 Thread Marcel via Digitalmars-d-learn
Hello! Say I have a struct where every member function can either be static or not depending on a template parameter. Is there a simple way to do this? Like, for example: struct Foo(Condition) { static if (Condition) static: void Bar() {} void Baz() {} }

Re: Conditional Attributes

2020-02-21 Thread Marcel via Digitalmars-d-learn
On Thursday, 20 February 2020 at 17:41:54 UTC, Dennis wrote: On Tuesday, 18 February 2020 at 17:11:55 UTC, Marcel wrote: Say I have a struct where every member function can either be static or not depending on a template parameter. Is there a simple way to do this? The best I can think of is:

Re: Conditional Attributes

2020-02-21 Thread Marcel via Digitalmars-d-learn
On Friday, 21 February 2020 at 01:41:21 UTC, Steven Schveighoffer wrote: On 2/18/20 12:11 PM, Marcel wrote: Hello! Say I have a struct where every member function can either be static or not depending on a template parameter. Is there a simple way to do this? Like, for example: struct Foo(C

library dependencies nightmare, D edition

2020-02-25 Thread Marcel via Digitalmars-d-learn
Hello! I have two libraries, where library B depends on library A, where both libraries consist of multiple packages. Say my project (I'm using VisualD) folder layout is the following: C/: libA A_Package1 A_Package2 A_Package3 libB B_Package1 - Imports from libA.P

Re: library dependencies nightmare, D edition

2020-02-25 Thread Marcel via Digitalmars-d-learn
On Tuesday, 25 February 2020 at 21:48:00 UTC, Steven Schveighoffer wrote: On 2/25/20 4:31 PM, Marcel wrote: Hello! I have two libraries, where library B depends on library A, where both libraries consist of multiple packages. Say my project (I'm using VisualD) folder layout is the following:

Re: library dependencies nightmare, D edition

2020-02-25 Thread Marcel via Digitalmars-d-learn
On Tuesday, 25 February 2020 at 22:35:07 UTC, Steven Schveighoffer wrote: On 2/25/20 5:26 PM, Marcel wrote: I can't give you the actual error messages right now, but both libraries have packages that define modules with the same name. For example, both libraries have packages with a module c