Re: env vars in dub.json?

2025-05-06 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Tuesday, 6 May 2025 at 11:24:54 UTC, Ferhat Kurtulmuş wrote: "dflags-windows": [ "-L-L$SOME_LIB_PATH // or %SOME_LIB_PATH% ], How to achieve this? Is this even possible? Ok, this actually works. Thanks

Re: rbtree to array?

2025-05-06 Thread Pete Padil via Digitalmars-d-learn
On Tuesday, 6 May 2025 at 06:50:36 UTC, Ferhat Kurtulmuş wrote: Rbtree has a range interface of d. Its memory layout is similar to a linked list, where the data is not contiguous. So, you have to copy the elements manually. But it is always a nice practice to use library functions, doing it for

Re: Debugging on Windows

2025-05-06 Thread Arokh Slade via Digitalmars-d-learn
On Friday, 25 April 2025 at 21:13:24 UTC, Imperatorn wrote: On Wednesday, 16 April 2025 at 20:08:00 UTC, Arokh Slade wrote: Hello, I'm trying to get debugging on windows 10 to work. d_test.d ```D void main() { int i; } ``` I compile with: dmd -g -gf -m64 .\d_test.d I load the msvc debu

Re: CTFE and RTFE results differ (aliasing)

2025-05-06 Thread kdevel via Digitalmars-d-learn
On Tuesday, 6 May 2025 at 01:29:35 UTC, Steven Schveighoffer wrote: On Monday, 5 May 2025 at 17:15:57 UTC, kdevel wrote: ```d // // bs3.d // 2025-05-05 stvo // // $ dmd -g -checkaction=context -unittest -main -run bs3.d // bs3.d(25): [unittest] [4, 3, 3, 4] != [4, 3, 2, 1] ``` This is a bug, p

std.int128

2025-05-06 Thread Pete Padil via Digitalmars-d-learn
Why is std.int128 not listed when using the top Phobos Doc page (link "Documentation>Library Reference")? I can find it if I expand the "Library" link at the top of the Phobos page. Just thought I mention it. Regards

Re: std.algorithm.strip functionality

2025-05-06 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, May 6, 2025 3:19:29 PM Mountain Daylight Time Pete Padil via Digitalmars-d-learn wrote: > I compiled and ran the following test program: > ```d > import std.stdio, std.algorithm; > > void main() > { > long[] a = [1, 2, 3, 15, 4]; > auto b = a[].strip(15); > writeln(a); >

Re: std.algorithm.strip functionality

2025-05-06 Thread Pete Padil via Digitalmars-d-learn
On Wednesday, 7 May 2025 at 01:40:33 UTC, Jonathan M Davis wrote: On Tuesday, May 6, 2025 3:19:29 PM Mountain Daylight Time Pete Padil via Digitalmars-d-learn wrote: [...] strip removes the requested elements from the ends (whereas stripLeft does it from the front of the range, and stripRight

Re: std.algorithm.strip functionality

2025-05-06 Thread monkyyy via Digitalmars-d-learn
On Tuesday, 6 May 2025 at 21:19:29 UTC, Pete Padil wrote: I compiled and ran the following test program: ```d import std.stdio, std.algorithm; void main() { long[] a = [1, 2, 3, 15, 4]; auto b = a[].strip(15); writeln(a); writeln(b); } ``` I get: [1, 2, 3, 15, 4] [1, 2, 3, 15, 4] It

Re: std.algorithm.strip functionality

2025-05-06 Thread Pete Padil via Digitalmars-d-learn
On Tuesday, 6 May 2025 at 21:54:31 UTC, monkyyy wrote: On Tuesday, 6 May 2025 at 21:19:29 UTC, Pete Padil wrote: I compiled and ran the following test program: ```d import std.stdio, std.algorithm; void main() { long[] a = [1, 2, 3, 15, 4]; auto b = a[].strip(15); writeln(a); writel

Re: std.algorithm.strip functionality

2025-05-06 Thread Bastiaan Veelo via Digitalmars-d-learn
These both will print "[1, 2, 3]": ```d writeln([1, 2, 3, 15, 4].until([15])); writeln([1, 2, 3, 15, 4].findSplit([15])[0]); ``` You can press "improve this page" on the top of https://dlang.org/phobos/std_algorithm_mutation.html#strip if you like to add more clarity to the documentation.

std.algorithm.strip functionality

2025-05-06 Thread Pete Padil via Digitalmars-d-learn
I compiled and ran the following test program: ```d import std.stdio, std.algorithm; void main() { long[] a = [1, 2, 3, 15, 4]; auto b = a[].strip(15); writeln(a); writeln(b); } ``` I get: [1, 2, 3, 15, 4] [1, 2, 3, 15, 4] It did not remove 15, it does work if 15 is at the beginning o