On Thursday, 5 May 2022 at 01:44:37 UTC, Ruby The Roobster wrote:
Some code I have:
(...)
What can I do to fix this?
I didn't try your code, but opList, funcList, and noTouch are
thread-local variables, and you fill them in a shared static
this. This means they will remain empty in any thread
I have created a structure that is a actually an array that
allocates memory and growths. It is a template and it has worked
with a couple of types that I have tried with. It doesn't work
with one tho and I cannot understand why. I will list the
smallest possible code I could. Keep in mind that
On Thursday, 5 May 2022 at 10:40:44 UTC, rempas wrote:
I have created a structure that is a actually an array that
allocates memory and growths. It is a template and it has
worked with a couple of types that I have tried with. It
doesn't work with one tho and I cannot understand why. I will
li
On Thursday, 5 May 2022 at 11:49:29 UTC, vit wrote:
On Thursday, 5 May 2022 at 10:40:44 UTC, rempas wrote:
I have created a structure that is a actually an array that
allocates memory and growths. It is a template and it has
worked with a couple of types that I have tried with. It
doesn't work
On 5/5/22 6:40 AM, rempas wrote:
ref My_File opAssign(ref const My_File s) return { return this; }
Your assignment operator does nothing.
-Steve
On Thu, May 05, 2022 at 06:05:55AM +, Alexander Zhirov via
Digitalmars-d-learn wrote:
> I'm sure there is such a topic on the forum, but after scrolling
> through the search, I didn't find anything. The bottom line is that I
> want to enable compilation of C sources in DUB and then build the
>
On Thursday, 5 May 2022 at 16:23:18 UTC, H. S. Teoh wrote:
I don't know how to do it using dub, but you could use
pragma(lib) in
one (or more) of your source files as a workaround:
pragma(lib, "m");
pragma(lib, "X11");
pragma(lib, "Xrandr");
I remember a long time ago
I want to use a configuration file with external settings. I'm
trying to use regular expressions to read the `Property = Value`
settings. I would like to do it all more beautifully. Is there
any way to get rid of the line break character? How much does
everything look "right"?
**settings.conf
On Thu, May 05, 2022 at 05:53:57PM +, Alexander Zhirov via
Digitalmars-d-learn wrote:
> I want to use a configuration file with external settings. I'm trying
> to use regular expressions to read the `Property = Value` settings. I
> would like to do it all more beautifully. Is there any way to
On Thursday, 5 May 2022 at 18:15:28 UTC, H. S. Teoh wrote:
auto m = matchFirst(line, p_property);
Yes, it looks more attractive. Thanks! I just don't quite
understand how `matchFirst` works. I seem to have read the
[description](https://dlang.org/phobos/std_regex.html#Captures),
but
On Thu, May 05, 2022 at 06:50:17PM +, Alexander Zhirov via
Digitalmars-d-learn wrote:
> On Thursday, 5 May 2022 at 18:15:28 UTC, H. S. Teoh wrote:
> > auto m = matchFirst(line, p_property);
>
> Yes, it looks more attractive. Thanks! I just don't quite understand how
> `matchFirst` works.
On Thursday, 5 May 2022 at 18:58:41 UTC, H. S. Teoh wrote:
You don't have to. Just add a `$` to the end of your regex, and
it should match the newline. If you put it outside the capture
parentheses, it will not be included in the value.
In fact, it turned out to be much easier. It was just nec
On 5/5/22 12:05, Alexander Zhirov wrote:
On Thursday, 5 May 2022 at 18:58:41 UTC, H. S. Teoh wrote:
You don't have to. Just add a `$` to the end of your regex, and it
should match the newline. If you put it outside the capture
parentheses, it will not be included in the value.
In fact, it tur
On Thursday, 5 May 2022 at 19:19:26 UTC, Ali Çehreli wrote:
Couldn't help myself from improving. :) The following regex
works in my Linux console. No issues with '\n'. (?) It also
allows for leading and trailing spaces:
import std.regex;
import std.stdio;
import std.algorithm;
import std.array
On Thursday, 5 May 2022 at 11:49:29 UTC, vit wrote:
```d
this.capacity += DEF_VEC_REALLOC_SIZE;
//realloc(this.ptr, T.sizeof * DEF_VEC_REALLOC_SIZE);
this.ptr = realloc(this.ptr, T.sizeof * this.capacity);
//<<--
```
Oh, right! I forgot to say it. I'm using my own `realloc`
On Thursday, 5 May 2022 at 14:20:49 UTC, Steven Schveighoffer
wrote:
Your assignment operator does nothing.
-Steve
Thanks! That was indeed the problem! In the other data
structures, it worked without needing explicitly provide one so I
didn't thought about it. Thanks a lot, you're saving me!
On Thursday, 5 May 2022 at 10:40:44 UTC, rempas wrote:
I have created a structure that is a actually an array that
allocates memory and growths. It is a template and it has
worked with a couple of types that I have tried with. It
doesn't work with one tho and I cannot understand why. I will
li
Hello everyone,I have following function:
```d
import core.stdc.stdio;
void f(int i,int j){
printf("%i,%i",i,j);
}
```
I want to forward `int[N]` to `(int i,int j)` etc. How can I
write a forwarding function?
```d
void ff(alias g,int...I)(int[2]k){
g(k[I]);
}//How to unpack template vari
Now all three parts of the round 1 are over and finalized.
There's a third-party website, which provides some stats:
https://cpjsmith.uk/gcj/year?year=2022
It's interesting that D is one of the least popular programing
languages with only a single digit number of users. It never
managed to ga
On Thursday, 5 May 2022 at 17:53:57 UTC, Alexander Zhirov wrote:
I want to use a configuration file with external settings. I'm
trying to use regular expressions to read the `Property =
Value` settings. I would like to do it all more beautifully. Is
there any way to get rid of the line break ch
On Friday, 6 May 2022 at 00:41:18 UTC, zjh wrote:
Hello everyone,I have following function:
```d
import core.stdc.stdio;
void f(int i,int j){
printf("%i,%i",i,j);
}
```
I want to forward `int[N]` to `(int i,int j)` etc. How can I
write a forwarding function?
```d
void ff(alias g,int...I)(in
On Friday, 6 May 2022 at 05:44:39 UTC, vit wrote:
Try this:
Very Good,Thank you very much!
22 matches
Mail list logo