Hi again and thanks for the suggestions.
I ended up checking every {} block with the following program:
It works on a string where all the nested blocks are reduced to a
single symbol. For example: '{', '"', '['
And all the comments and whitespaces are reduced to ' ' space.
```
enum CurlyBlock
Hello,
Is there a better way to transform a string array to a tuple or
to an AliasSeq?
```
mixin(customSyntaxPrefixes.format!`tuple(%(%s,%))`)
```
I'd like to use this as variable length arguments passed to the
startsWith() std function (as multiple needles).
On Sunday, 19 February 2023 at 11:08:34 UTC, realhet wrote:
Is there a better way to transform a string array to a tuple or
to an AliasSeq?
```
mixin(customSyntaxPrefixes.format!`tuple(%(%s,%))`)
```
https://dlang.org/phobos/std_meta.html#aliasSeqOf
On Sun, Feb 19, 2023 at 11:08:34AM +, realhet via Digitalmars-d-learn wrote:
> Hello,
>
> Is there a better way to transform a string array to a tuple or to an
> AliasSeq?
>
> ```
> mixin(customSyntaxPrefixes.format!`tuple(%(%s,%))`)
> ```
>
> I'd like to use this as variable length argument
Awesome, Thank both of you!
```
enum a = ["A", "B"];
writeln(a);
writeln(aliasSeqOf!a);
writeln([aliasSeqOf!a]);
```
On Wednesday, 15 February 2023 at 18:21:34 UTC, Hipreme wrote:
I want to know if there is some way to debug memory leaks in
runtime.
I have been dealing with that by using a profiler and checking
D runtime function calls. Usually those which allocates has
high cpu usage so it can be easy for
If my understanding is correct, the mere fact of having a:
struct S
{
char[16384] array;
}
And then using it anywhere, will necessarily lead to a S.init
being created and linked, leading to a binary size inflation of
16kb.
This is not a super high concern, but can inform
On 2/19/23 1:11 PM, Guillaume Piolat wrote:
If my understanding is correct, the mere fact of having a:
struct S
{
char[16384] array;
}
And then using it anywhere, will necessarily lead to a S.init being
created and linked, leading to a binary size inflation of 16kb.
T
On 2/19/23 1:26 PM, Steven Schveighoffer wrote:
Testing with run.dlang.io, switching between `char` and `int` changes
the ASM output to show whether it's stored or not.
And BTW, you can override this by assigning a zero default:
```d
struct S
{
char[16384] array = 0; // no .init storage
}
and is abending with an error saying exactly this. How do I
specify the path to this library? Can I use one of the
environment variables in sc.ini, one of the Windows env
variables, or one of the dub options?
Btw, I'm bypassing on purpose the official D installation.
On Sunday, 19 February 2023 at 18:29:05 UTC, Steven Schveighoffer
wrote:
On 2/19/23 1:26 PM, Steven Schveighoffer wrote:
Testing with run.dlang.io, switching between `char` and `int`
changes the ASM output to show whether it's stored or not.
And BTW, you can override this by assigning a zero
Hello,
I'm wondering at which moment the following would make an
allocation of the scope variables on the GC. Should I assume that
the second parameter of enforce being lazy, we would get a
delegate/literal that saves the current scope on the GC even if
it's not needed? I'm asking purely for
On Sunday, 19 February 2023 at 21:05:33 UTC, WhatMeWorry wrote:
and is abending with an error saying exactly this. How do I
specify the path to this library? Can I use one of the
environment variables in sc.ini, one of the Windows env
variables, or one of the dub options?
Btw, I'm bypassi
On 2/19/23 7:50 PM, Etienne wrote:
Hello,
I'm wondering at which moment the following would make an allocation of
the scope variables on the GC. Should I assume that the second parameter
of enforce being lazy, we would get a delegate/literal that saves the
current scope on the GC even if it's
On 2/19/23 9:15 PM, Steven Schveighoffer wrote:
Indeed, you can't really "save" the hidden delegate somewhere, so the
calling function knows that the delgate can't escape.
I stand corrected, you can save it (by taking the address of it).
And it's explicitly allowed by the spec.
But it sti
On Friday, 10 February 2023 at 07:04:31 UTC, Max Samukha wrote:
...
Having class-private doesn't preclude module-private. Dennis
even submitted a PR implementing class-private, but it stalled
because people couldn't agree on whether class-private should
be "private to class" or "private to cl
On Monday, 20 February 2023 at 05:21:44 UTC, forky wrote:
On Friday, 10 February 2023 at 07:04:31 UTC, Max Samukha wrote:
...
Having class-private doesn't preclude module-private. Dennis
even submitted a PR implementing class-private, but it stalled
because people couldn't agree on whether cl
But in any case, it should be class private.
There have now been three pages produced by three people all
agreeing with each other.
At what point does it start being spam?
Having a discussion !== spam.
On Monday, 20 February 2023 at 06:26:34 UTC, FeepingCreature
wrote:
There have now been three pages produced by three people all
agreeing with each other.
At what point does it start being spam?
Yes, it's all just noise now. Let's end it here. Further posts in
this thread will be deleted
19 matches
Mail list logo