Re: How to link a msvcr120.dll in an inverse recursive way after a Windows .exe binary deployment

2022-09-05 Thread BoQsc via Digitalmars-d-learn
On Sunday, 4 September 2022 at 22:05:24 UTC, ShadoLight wrote: On Sunday, 4 September 2022 at 15:16:47 UTC, BoQsc wrote: **Folder structure** .\msvcr120.dll .\folder1\HelloWorld.exe .\folder2\HelloWorld.exe You don't need to do this. msvcr120.dll is already shipped with the DMD compiler at

Re: Tracing out error that causes compiler crash

2022-09-05 Thread Nick Treleaven via Digitalmars-d-learn
On Sunday, 4 September 2022 at 20:48:52 UTC, solidstate1991 wrote: What do I pass as the tester? You can use a script as described here: https://github.com/CyberShadow/DustMite/wiki/Detecting-a-segfault-in-dmd-itself

Comparing slices with std.variant.Algebraic

2022-09-05 Thread anonymouse via Digitalmars-d-learn
Observe the [implementation](https://github.com/Kriyszig/magpie/blob/master/source/magpie/axis.d) of ```d stuct Axis(U...){} ``` More specifically, observe its usage in the unittests for [Binary Ops on Variant Axis](https://github.com/Kriyszig/magpie/blob/master/source/magpie/axis.d#L410-L437)

Re: Comparing slices with std.variant.Algebraic

2022-09-05 Thread Ali Çehreli via Digitalmars-d-learn
On 9/5/22 01:58, anonymouse wrote: > array [1.7, 3.7, 5.7, 7.7, 9.7] in both cases, which is what is being > asserted by those two lines. None of those values can be represented precisely in a floating point type. Without looking at the code, I wonder whether the tests will pass if you can man

Re: BetterC stack traces?

2022-09-05 Thread IchorDev via Digitalmars-d-learn
On Sunday, 4 September 2022 at 18:49:37 UTC, Paul Backus wrote: You can use `libunwind` for this: https://www.nongnu.org/libunwind/ It's a C library, but it should work for D too. Ah, I'm actually trying to create my own implementation of this, so the goal would be to not rely on a dependenc

Re: Comparing slices with std.variant.Algebraic

2022-09-05 Thread anonymouse via Digitalmars-d-learn
On Monday, 5 September 2022 at 10:30:32 UTC, Ali Çehreli wrote: On 9/5/22 01:58, anonymouse wrote: > array [1.7, 3.7, 5.7, 7.7, 9.7] in both cases, which is what is being > asserted by those two lines. None of those values can be represented precisely in a floating point type. Without looking

Re: Forked GC explained

2022-09-05 Thread frame via Digitalmars-d-learn
On Saturday, 3 September 2022 at 14:31:31 UTC, Steven Schveighoffer wrote: On 9/3/22 9:35 AM, frame wrote: What happens if a manually `GC.free()` is called while the forked process marks the memory as free too but the GC immediately uses the memory again and then gets the notification to fre

Re: BetterC stack traces?

2022-09-05 Thread Paul Backus via Digitalmars-d-learn
On Monday, 5 September 2022 at 10:47:38 UTC, IchorDev wrote: Ah, I'm actually trying to create my own implementation of this, so the goal would be to not rely on a dependency. I can't exactly make head nor tail of the library's source other than that it seems to have a unique implementation on

Re: BetterC stack traces?

2022-09-05 Thread Paul Backus via Digitalmars-d-learn
On Monday, 5 September 2022 at 12:07:35 UTC, Paul Backus wrote: On Monday, 5 September 2022 at 10:47:38 UTC, IchorDev wrote: Ah, I'm actually trying to create my own implementation of this, so the goal would be to not rely on a dependency. I can't exactly make head nor tail of the library's sour

Re: Comparing slices with std.variant.Algebraic

2022-09-05 Thread Paul Backus via Digitalmars-d-learn
On Monday, 5 September 2022 at 08:58:21 UTC, anonymouse wrote: On a related note, std.variant.Algebraic has been deprecated and the suggested replacement is std.sumtype.SumType. What is the proper way to make this conversion? Attempting to do a drop-in replacement results in the following error

Re: synchronized/shared associative array .require error

2022-09-05 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/4/22 11:24 PM, cc wrote: On Saturday, 3 September 2022 at 14:37:16 UTC, Steven Schveighoffer wrote: On 9/2/22 3:15 PM, cc wrote: Tried casting away shared as a workaround but I assume that will cause some kind of TLS catastrophe. I think it will be fine, but you may have an issue. You

Re: Forked GC explained

2022-09-05 Thread Steven Schveighoffer via Digitalmars-d-learn
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 non-pointer variables using casts and other tricks. ```d void* p; ... int

Re: How to link a msvcr120.dll in an inverse recursive way after a Windows .exe binary deployment

2022-09-05 Thread ShadoLight via Digitalmars-d-learn
On Monday, 5 September 2022 at 07:02:53 UTC, BoQsc wrote: The problem is, D Language Compiler is not included along the Windows Operating System. No compiler is included natively with the Windows OS. Not even Microsoft's. Neither msvcr120.dll is included along the Windows Operating System

Re: How to link a msvcr120.dll in an inverse recursive way after a Windows .exe binary deployment

2022-09-05 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 6 September 2022 at 04:36:55 UTC, ShadoLight wrote: True. In that case just distribute the DLL (taken from the DMD bin folder) alongside the HelloWorld EXE so that both reside in the same folder on the target computer. The proper way to do this is to ship the correct version of

Re: How to link a msvcr120.dll in an inverse recursive way after a Windows .exe binary deployment

2022-09-05 Thread ShadoLight via Digitalmars-d-learn
On Tuesday, 6 September 2022 at 04:59:49 UTC, Mike Parker wrote: On Tuesday, 6 September 2022 at 04:36:55 UTC, ShadoLight wrote: True. In that case just distribute the DLL (taken from the DMD bin folder) alongside the HelloWorld EXE so that both reside in the same folder on the target comput