On Wednesday, 15 June 2022 at 17:37:32 UTC, Templated Person
wrote:
It there any resources on how to build D static (`.lib` / `.a`)
and dynamic libraries (`.dll` / `.so`), and then use them from
C?
Do I need to link and initialize phobos somehow? What if I
don't want to use the D runtime? Wha
On 6/15/22 10:37, Templated Person wrote:
> It there any resources on how to build D static (`.lib` / `.a`) and
> dynamic libraries (`.dll` / `.so`), and then use them from C?
>
> Do I need to link and initialize phobos somehow?
Not Phobos but the D runtime.
> What if I don't want to
> use the D
On 2022-06-15 19:36, JG wrote:
On Wednesday, 15 June 2022 at 17:30:31 UTC, JG wrote:
On Wednesday, 15 June 2022 at 13:52:24 UTC, Christian Köstlin wrote:
the naive version would look like
```d
auto next(Range)(Range r) {
r.popFront;
return r.front;
}
```
But looking at a mature librar
On 6/15/22 3:51 PM, kdevel wrote:
On Wednesday, 15 June 2022 at 03:09:56 UTC, Steven Schveighoffer wrote:
I don't see what you see wrong with the code I wrote. It's
straightforward, obvious, and does the job I need it to do, in a way
that's not prone to future mistakes.
Sometimes it is not ea
On Wednesday, 15 June 2022 at 03:09:56 UTC, Steven Schveighoffer
wrote:
I don't see what you see wrong with the code I wrote. It's
straightforward, obvious, and does the job I need it to do, in
a way that's not prone to future mistakes.
Sometimes it is not easy to explain why code "feels" wron
On Wednesday, 15 June 2022 at 19:36:34 UTC, Guillaume Piolat
wrote:
BindBC bindings are multi-platform and can be both static and
dynamic linking.
My bad I understood the reverse, consuming C libraries from D.
I think what you are seeking is described in the D blog.
On Wednesday, 15 June 2022 at 17:37:32 UTC, Templated Person
wrote:
It there any resources on how to build D static (`.lib` / `.a`)
and dynamic libraries (`.dll` / `.so`), and then use them from
C?
Do I need to link and initialize phobos somehow? What if I
don't want to use the D runtime? Wha
It there any resources on how to build D static (`.lib` / `.a`)
and dynamic libraries (`.dll` / `.so`), and then use them from C?
Do I need to link and initialize phobos somehow? What if I don't
want to use the D runtime? What happens with module level
`this()` and `~this()`? Is there a compre
On Wednesday, 15 June 2022 at 17:30:31 UTC, JG wrote:
On Wednesday, 15 June 2022 at 13:52:24 UTC, Christian Köstlin
wrote:
the naive version would look like
```d
auto next(Range)(Range r) {
r.popFront;
return r.front;
}
```
But looking at a mature library e.g.
https://github.com/subma
On Wednesday, 15 June 2022 at 13:52:24 UTC, Christian Köstlin
wrote:
the naive version would look like
```d
auto next(Range)(Range r) {
r.popFront;
return r.front;
}
```
But looking at a mature library e.g.
https://github.com/submada/btl/blob/9cc599fd8495215d346ccd62d6e9f1f7ac140937/so
Create a simple test case, file bug at:
https://issues.dlang.org/
On Wednesday, 15 June 2022 at 09:24:35 UTC, Dukc wrote:
Now when I think of it, perhaps the fact that private
`printHelp` has the same name as the public `printHelp` is
somehow confusing dmd. If you try to rename the private
`printHelp` and it's call in the public one to something else,
you mi
On Wednesday, 15 June 2022 at 13:52:24 UTC, Christian Köstlin
wrote:
looks like there should be tons of annotations/attributes on it.
Because you have a template function, most attributes will be
inferred based on the Range type. `const` is not inferred, but
`popFront` mutates so it doesn't a
the naive version would look like
```d
auto next(Range)(Range r) {
r.popFront;
return r.front;
}
```
But looking at a mature library e.g.
https://github.com/submada/btl/blob/9cc599fd8495215d346ccd62d6e9f1f7ac140937/source/btl/vector/package.d#L229
is looks like there should be tons of
On Wednesday, 15 June 2022 at 09:21:28 UTC, user1234 wrote:
On Tuesday, 14 June 2022 at 13:39:12 UTC, Andrey Zherikov wrote:
I have [pretty simple code in my
library](https://github.com/andrey-
[Line (2)
produces](https://github.com/andrey-zherikov/argparse/runs/6880350900?check_suite_focus=tru
On Wednesday, 15 June 2022 at 07:38:36 UTC, JG wrote:
I tried to reproduce it but wasn't able (I guess it is some
interplay with the rest of your code):
I tried this first but got the same result as you. I think my
small library overheats DMD's template engine.
```d
import std.traits;
class XML {}
class Def {
@XML {
int x;
int y;
}
int z;
this() {
static foreach (sym; getSymbolsByUDA!(Def, XML)) {
}
}
}
void main() {
auto def = new Def;
}
``
On Tuesday, 14 June 2022 at 23:56:58 UTC, Andrey Zherikov wrote:
On Tuesday, 14 June 2022 at 21:44:48 UTC, Dukc wrote:
No idea. The functions seems indeed to be exactly the same, so
I assume this is a DMD bug. It cannot be a bug in
`std.sumtype`, since that would trigger in both of the
templat
On Tuesday, 14 June 2022 at 13:39:12 UTC, Andrey Zherikov wrote:
I have [pretty simple code in my
library](https://github.com/andrey-
[Line (2)
produces](https://github.com/andrey-zherikov/argparse/runs/6880350900?check_suite_focus=true#step:5:12) `undefined reference to '_D3std7sumtype__T7SumTy
On Tuesday, 14 June 2022 at 23:56:58 UTC, Andrey Zherikov wrote:
On Tuesday, 14 June 2022 at 21:44:48 UTC, Dukc wrote:
No idea. The functions seems indeed to be exactly the same, so
I assume this is a DMD bug. It cannot be a bug in
`std.sumtype`, since that would trigger in both of the
templat
On Tuesday, 14 June 2022 at 19:49:39 UTC, Steven Schveighoffer
wrote:
On 6/14/22 3:35 PM, JG wrote:
Hi,
Is this a bug?
```d
import std;
template test(alias f) {
auto test(I)(I i) { return f(i); }
}
void main()
{
alias t = test!(x=>x+1);
1.t.writeln; //<--Doesn't compile
1
21 matches
Mail list logo