In case anyone wants to see a working example of how to use long
paths on Windows, I uploaded a
[gist](https://gist.github.com/preetpalS/2fd6c6bf05a94734f89b70b679716bf3) (see my comment in the gist for how to make it work). It is an upgraded version of the original command line tool shown in the
On Sunday, 13 November 2022 at 18:51:09 UTC, Siarhei Siamashka
wrote:
On Saturday, 12 November 2022 at 14:07:46 UTC, Per Nordlöw
wrote:
Have anybody created a wrapper container
```d
struct Sorted(ArrayLike, alias lessThanPred)
```
that wraps an array-like type `ArrayLike` so that it's always
Although I really don't like many things about how dub does, it
brings many facilities. Imagine the following project structure:
Project A is using library B
Now, imagine that our `module b` has the following code:
```d
module b;
void print(string s){imported!"std.stdio".writeln(s);}
else ve
On Sunday, 13 November 2022 at 21:16:32 UTC, mw wrote:
On Saturday, 19 September 2020 at 06:11:15 UTC, Jacob Carlborg
wrote:
On 2020-09-17 16:58, drathier wrote:
What's the proper way to exit with a specific exit code?
I found a bunch of old threads discussing this, making sure
destructors ru
On Sunday, 13 November 2022 at 22:42:45 UTC, mw wrote:
On Sunday, 13 November 2022 at 22:17:32 UTC, mw wrote:
On Sunday, 13 November 2022 at 22:06:09 UTC, Imperatorn wrote:
On Sunday, 13 November 2022 at 21:37:47 UTC, mw wrote:
On Sunday, 13 November 2022 at 21:16:32 UTC, mw wrote:
I even tr
On Sunday, 13 November 2022 at 22:17:32 UTC, mw wrote:
On Sunday, 13 November 2022 at 22:06:09 UTC, Imperatorn wrote:
On Sunday, 13 November 2022 at 21:37:47 UTC, mw wrote:
On Sunday, 13 November 2022 at 21:16:32 UTC, mw wrote:
I even tried core.stdc.stdlib.exit(-1), it does not work.
Tried
On Sunday, 13 November 2022 at 22:06:09 UTC, Imperatorn wrote:
On Sunday, 13 November 2022 at 21:37:47 UTC, mw wrote:
On Sunday, 13 November 2022 at 21:16:32 UTC, mw wrote:
I even tried core.stdc.stdlib.exit(-1), it does not work.
Tried
```
import core.runtime;
Runtime.terminate();
cor
On Sunday, 13 November 2022 at 21:37:47 UTC, mw wrote:
On Sunday, 13 November 2022 at 21:16:32 UTC, mw wrote:
I even tried core.stdc.stdlib.exit(-1), it does not work.
Tried
```
import core.runtime;
Runtime.terminate();
core.stdc.stdlib.exit(-1);
```
Still does not work.
I have no id
On Sunday, 13 November 2022 at 21:16:32 UTC, mw wrote:
I even tried core.stdc.stdlib.exit(-1), it does not work.
Tried
```
import core.runtime;
Runtime.terminate();
core.stdc.stdlib.exit(-1);
```
Still does not work.
On Sunday, 13 November 2022 at 19:02:29 UTC, mw wrote:
BTW, can --build=profile-gc can intercept "Ctrl+C" and
generate *partial* report file?
And what's the suggested proper way to do
Is there a profile-gc plugin function I can call in the middle of
my program to generate *partial* report fi
On Saturday, 19 September 2020 at 06:11:15 UTC, Jacob Carlborg
wrote:
On 2020-09-17 16:58, drathier wrote:
What's the proper way to exit with a specific exit code?
I found a bunch of old threads discussing this, making sure
destructors run and the runtime terminates properly, all of
which see
On Sunday, 13 November 2022 at 19:36:48 UTC, Dennis wrote:
Can you please provide a full example? I'm missing the
definitions of _headers, hstring, values
```d
/++
“HTTP message string” – short-hand for `const(char)[]``.
$(SIDEBAR
Not sure about the name.
Would have pre
On Sunday, 13 November 2022 at 19:06:40 UTC, 0xEAB wrote:
Why does only the latter sample compile?
The former leads to the following warning:
Can you please provide a full example? I'm missing the
definitions of _headers, hstring, values, and I suspect there's
at least one `@safe` annotation
On Sunday, 13 November 2022 at 19:06:40 UTC, 0xEAB wrote:
```d
struct Foo { /* … */
hstring[] getHeader(LowerCaseToken name) scope return
{
return _headers[name].values;
}
[...]
There's an old saying "you can't make sense out of scope"
```d
struct Foo { /* … */
hstring[] getHeader(LowerCaseToken name) scope return
{
return _headers[name].values;
}
hstring[] getHeader(hstring name)() scope return
{
enum token = LowerCaseToken.makeConverted(name);
return this.getHeader(token); // line 6
On Sunday, 13 November 2022 at 18:51:17 UTC, mw wrote:
On Sunday, 13 November 2022 at 18:48:42 UTC, mw wrote:
BTW, can --build=profile-gc can intercept "Ctrl+C" and
generate *partial* report file?
And what's the suggested proper way to do early exit, and
still let --build=profile-gc generate
On Sunday, 13 November 2022 at 18:48:42 UTC, mw wrote:
BTW, can --build=profile-gc can intercept "Ctrl+C" and generate
*partial* report file?
And what's the suggested proper way to do early exit, and still
let --build=profile-gc generate reports?
I tried presss "Ctrl+C", and that cannot stop
On Saturday, 12 November 2022 at 14:07:46 UTC, Per Nordlöw wrote:
Have anybody created a wrapper container
```d
struct Sorted(ArrayLike, alias lessThanPred)
```
that wraps an array-like type `ArrayLike` so that it's always
sorted according to the binary predicate `lessThanPred`?
I'm not sur
Hi,
I'm mem-profiling a multi-threaded program, and want it to exit
early, so I added a call
```
core.stdc.stdlib.exit(-1);
```
in a loop in one of the thread.
However when the program reached this point, it seems hang: it's
not exiting, and CPU usage dropped to 0%.
I'm wondering does dmd
On Sunday, 13 November 2022 at 17:10:23 UTC, DLearner wrote:
...
The slight generalisation shown at bottom also worked.
However, is there a way of avoiding the for-loop?
...
I don't have too much knowledge in D, but I think so. (My main
language is C).
Well, one way to make things "better"
On Sunday, 13 November 2022 at 16:11:17 UTC, matheus. wrote:
[...]
You should add the code below after "auto B = A.dup;":
B[0].Txt = A[0].Txt.dup;
The "Txt" property inside B is still referencing A without the
above.
Matheus.
Thank you - your suggestion worked.
The slight generalisati
On Sunday, 13 November 2022 at 15:45:40 UTC, DLearner wrote:
```D
struct test_struct {
char[] Txt;
}
test_struct[] A;
auto B = A.dup;
```
But A is not an `int[]` in your new example. You need a "deep
copy" and I can see that similar questions had been asked in this
forum bef
On Sunday, 13 November 2022 at 15:45:40 UTC, DLearner wrote:
On Sunday, 13 November 2022 at 14:39:26 UTC, Siarhei Siamashka
wrote:
On Sunday, 13 November 2022 at 14:28:45 UTC, DLearner wrote:
Creating a step 1.5:
```
int[] B = A;
```
```D
auto B = A.dup;
```
This will create a copy of A rath
On Sunday, 13 November 2022 at 14:39:26 UTC, Siarhei Siamashka
wrote:
On Sunday, 13 November 2022 at 14:28:45 UTC, DLearner wrote:
Creating a step 1.5:
```
int[] B = A;
```
```D
auto B = A.dup;
```
This will create a copy of A rather than referencing to the
same buffer in memory.
Tested:
On Sunday, 13 November 2022 at 14:28:45 UTC, DLearner wrote:
Creating a step 1.5:
```
int[] B = A;
```
```D
auto B = A.dup;
```
This will create a copy of A rather than referencing to the same
buffer in memory.
Hi
Program has two steps:
1. Creates an array (int[] A), whose size and element values are
only known at run-time.
Then:
2. The elements (but not the array size) are further processed in
a way that may or may not alter their value.
Requirement: to identify the indices (if any) of the elemen
On Saturday, 12 November 2022 at 10:02:12 UTC, confuzzled wrote:
Why would I have to search for libcrypto, libminizip, libexpat,
and more that I haven't even figured out what library they are?
I thought those dependencies would already be linked into
libxlsxio_read.a which is a statically linke
On Sunday, 13 November 2022 at 09:15:39 UTC, qua wrote:
I agree it was unexpected that it didn't, at least for
newcomers.
Almost everyone is a newcomer when it comes to ImportC.
On Saturday, 12 November 2022 at 14:14:06 UTC, Adam D Ruppe wrote:
On Saturday, 12 November 2022 at 13:46:27 UTC, qua wrote:
This is supposed to work, right?
No, it isn't. And it probably never will.
importC looks for a .c file in the current directory. It is
that .c file's responsibility to
29 matches
Mail list logo