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
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 project with the connection of libraries. I would like
to see an example of such a `dub.json`
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
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
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
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
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 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
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 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
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
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"?
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
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 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
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
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
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
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
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
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
22 matches
Mail list logo