On Sunday, 24 April 2022 at 21:00:50 UTC, Alain De Vod wrote:
Is this a correct program to explicit call destroy & free ?
```
void main(){
int[] i=new int[1];
import object: destroy;
destroy(i);
import core.memory: GC;
GC.free(GC.addrOf(cast(void *)(i.ptr)));
}
```
A fe
On Saturday, 30 April 2022 at 09:25:18 UTC, Dukc wrote:
On Sunday, 24 April 2022 at 21:00:50 UTC, Alain De Vod wrote:
[...]
A few picks.
1: You do not need to import `destroy`. Everything in `object`
is automatically imported.
[...]
Hell, just using `scope int[] i` should be enough to tr
On Saturday, 30 April 2022 at 11:37:32 UTC, Tejas wrote:
Hell, just using `scope int[] i` should be enough to trigger
deterministic destruction, no? `typecons`'s `Scoped!` template
can be used if 100% guarantee is needed _and_ the memory has to
be stack allocated
Didn't think of that. To be f
Hi,
I am trying to setup a simple webserver in D using vibe.d (0.9.4)
and want to use mongoDB as a database. To achieve this, I've set
up a mongoDB atlas instance with the following command inside the
standard app.d file created by vibe.d
```
string MongoURL =
"mongodb://username:@cluster0
I have figured out that my development build of Phobos is for
some reason including instances of `__cmp` and `dstrcmp`
templates from DRuntime in the Phobos binary. Since `-betterC`
client code does not link Phobos in, it fails if it tries to use
those functions.
The problem: how do I track d
On Saturday, 30 April 2022 at 18:18:02 UTC, Dukc wrote:
I'm looking for something where I could search for the call to
the DRuntime functions in question, from an already combined .o
or .a. What do you suggest? I'm on Linux.
objdump -d works on .o files
On Saturday, 30 April 2022 at 18:49:27 UTC, Adam D Ruppe wrote:
On Saturday, 30 April 2022 at 18:18:02 UTC, Dukc wrote:
I'm looking for something where I could search for the call to
the DRuntime functions in question, from an already combined
.o or .a. What do you suggest? I'm on Linux.
objd
On Saturday, 30 April 2022 at 18:18:02 UTC, Dukc wrote:
I have figured out that my development build of Phobos is for
some reason including instances of `__cmp` and `dstrcmp`
templates from DRuntime in the Phobos binary. Since `-betterC`
client code does not link Phobos in, it fails if it tries
I am struggling with initializing an Emsi Containers DynamicArray in a
nice way. Some background information of my usecase:
I experimenting in porting some old 3d engine code of mine from c++ to
dlang. In the engine I want to exactly control when resources are freed
and not rely on the garbage
module test;
struct MatrixImpl(S, size_t M, size_t N)
{
}
template Vector(S, size_t N)
{
alias Vector = MatrixImpl!(S, 1, N);
}
@nogc
S dot1(S, size_t N)(in Vector!(S, N) lhs, in Vector!(S, N)
rhs)
{
return 0;
}
@nogc
S dot2
On Saturday, 30 April 2022 at 14:29:56 UTC, notsteve wrote:
Hi,
I am trying to setup a simple webserver in D using vibe.d
(0.9.4) and want to use mongoDB as a database. To achieve this,
I've set up a mongoDB atlas instance with the following command
inside the standard app.d file created by v
On Sunday, 1 May 2022 at 03:57:12 UTC, Elfstone wrote:
module test;
struct MatrixImpl(S, size_t M, size_t N)
{
}
[...]
AFAICT, I'm afraid you'll have to stick to `dot2` 🙁
This DIP I believe does what you want but... It wasn't looked
upon favorably...
https://github.com/dl
12 matches
Mail list logo