Re: const in functions

2023-03-17 Thread Ali Çehreli via Digitalmars-d-learn
On 3/12/23 16:14, FozzieBear wrote: > On Sunday, 12 March 2023 at 15:09:45 UTC, Salih Dincer wrote: >> >> ... > > So I don't agree with part of this comment (made elsewhere in this thread): > > "You can live without 'const' until your code interacts with other > people's code." My comment was

Re: Any ways to get addr2line working with DMD? works fine with GDC

2023-03-17 Thread ryuukk_ via Digitalmars-d-learn
On Friday, 17 March 2023 at 20:53:07 UTC, WB wrote: On Thursday, 16 March 2023 at 22:07:04 UTC, ryuukk_ wrote: Hello, The problem is when i compile with DMD i get: ``` ??:0 ``` When i compile it with GDC i get proper file + line What does GDC do different than DMD? Is there a way to get

Re: Any ways to get addr2line working with DMD? works fine with GDC

2023-03-17 Thread WB via Digitalmars-d-learn
On Thursday, 16 March 2023 at 22:07:04 UTC, ryuukk_ wrote: Hello, The problem is when i compile with DMD i get: ``` ??:0 ``` When i compile it with GDC i get proper file + line What does GDC do different than DMD? Is there a way to get the same result as GDC with DMD? Thanks Did you

Re: Is comparison of shared data thread-safe?

2023-03-17 Thread bauss via Digitalmars-d-learn
On Thursday, 16 March 2023 at 12:32:34 UTC, Nick Treleaven wrote: With -preview=nosharedaccess, I get: int y = 2; shared int x = y; // OK assert(x == 2); // no error y = x; // error So for the assignment to y, reading x is an error and atomicLoad should be used instead. But

Re: Global thread-local free-list allocator

2023-03-17 Thread Herbie Melbourne via Digitalmars-d-learn
On Thursday, 16 March 2023 at 20:53:28 UTC, Witold wrote: I ported a classic DeltaBlue benchmark to D, and for allocations I use a mix of malloc/free (for structs with some trailing inline arrays), and new for some other structs and arrays. After running it, it felt kind of slow (I did not