On Saturday, 20 February 2021 at 05:44:33 UTC, kinke wrote:
There's
https://github.com/dlang/druntime/blob/728f1d9c3b7a37eba4d59ee2637fb924053cba6d/src/core/internal/traits.d#L261.
Thanks! That's helpful.
But AFAIK, the GC only guarantees an alignment of 16 and
doesn't respect any
On Friday, 19 February 2021 at 23:53:55 UTC, tsbockman wrote:
How can I get the alignment of a class instance? I know how to
get the size:
__traits(classInstanceSize, T)
But, there doesn't appear to be any equivalent trait for the
alignment.
There's
On Friday, 19 February 2021 at 19:20:39 UTC, tcak wrote:
Is there any way to include http(s) based modules into
compilation (Please do not suggest dub etc)?
No, the compiler only looks for modules on the filesystem via
standard file paths, not via URI. There isn't any tool in the D
On Friday, 19 February 2021 at 23:29:18 UTC, Steven Schveighoffer
wrote:
On 2/19/21 5:26 PM, Decabytes wrote:
raylib-d does not have D wrappers for everything. You are
supposed to use the C functions.
D's string literals are null-terminated. However, the language
only allows actual
How can I get the alignment of a class instance? I know how to
get the size:
__traits(classInstanceSize, T)
But, there doesn't appear to be any equivalent trait for the
alignment.
(Knowing the alignment of a class instance is required to
correctly use core.lifetime.emplace, or do any
On 2/19/21 5:26 PM, Decabytes wrote:
Dlang and curly brace language noob here. I'm trying to work with the
raylib-d library. I downloaded raylib-d using dub, and I installed
raylib with my package manager on Manjaro. I'm getting a mismatch in
the arguments I'm passing to LoadTexture.
Dlang and curly brace language noob here. I'm trying to work with
the raylib-d library. I downloaded raylib-d using dub, and I
installed raylib with my package manager on Manjaro. I'm getting
a mismatch in the arguments I'm passing to LoadTexture.
source/app.d(7,32): Error: function
I have written a test module and put it into /var/www/html:
module mymodule;
import std.stdio;
void testMe(){ writeln("I tested you!"); }
Then I have a main file where I would like to call the function
"testMe".
My build line is as follows:
dmd main.d "http://localhost/mymodule.d;
On Friday, 19 February 2021 at 13:42:46 UTC, Steven Schveighoffer
wrote:
[...]
ignoring SIGPIPE is a process-wide thing, and so it's not
appropriate for Phobos to make that decision for you. But it's
trivial to ignore it.
Sure.
I've never been a fan of SIGPIPE. If you look around on the
On Friday, 19 February 2021 at 10:02:05 UTC, Siemargl wrote:
On Friday, 19 February 2021 at 08:29:36 UTC, Ferhat Kurtulmuş
wrote:
Since classes are reference types all instances of files will
be the same reference of "new File()", which you probably
don't want.
Is any differences between x
On 2/19/21 5:41 AM, kdevel wrote:
On Friday, 19 February 2021 at 08:37:50 UTC, Imperatorn wrote:
Does your iopipe handle... Pipes?
BTW: What about SIGPIPE?
In an experimental code I have this
:
fout.rawWrite (buf);
fout.rawWrite ("\n");
writeln ("flushing");
fout.flush
On 2/19/21 3:37 AM, Imperatorn wrote:
On Thursday, 18 February 2021 at 17:27:48 UTC, Steven Schveighoffer wrote:
On 2/18/21 4:40 AM, frame wrote:
[...]
It's just the way it is. Everything in Phobos is a C FILE * (wrapped
in a File). You need to use alternative i/o systems to get the
On Friday, 19 February 2021 at 10:02:05 UTC, Siemargl wrote:
On Friday, 19 February 2021 at 08:29:36 UTC, Ferhat Kurtulmuş
wrote:
Since classes are reference types all instances of files will
be the same reference of "new File()", which you probably
don't want.
Is any differences between x
On Friday, 19 February 2021 at 08:37:50 UTC, Imperatorn wrote:
Does your iopipe handle... Pipes?
BTW: What about SIGPIPE?
In an experimental code I have this
:
fout.rawWrite (buf);
fout.rawWrite ("\n");
writeln ("flushing");
fout.flush ();
On Friday, 19 February 2021 at 10:21:29 UTC, Max Haughton wrote:
On Friday, 19 February 2021 at 10:18:28 UTC, Preetpal wrote:
On Friday, 19 February 2021 at 10:01:36 UTC, Max Haughton
wrote:
On Friday, 19 February 2021 at 09:44:15 UTC, Preetpal wrote:
[...]
C++ interop is used every day.
On Friday, 19 February 2021 at 10:18:28 UTC, Preetpal wrote:
On Friday, 19 February 2021 at 10:01:36 UTC, Max Haughton wrote:
On Friday, 19 February 2021 at 09:44:15 UTC, Preetpal wrote:
I want to reuse existing C++ code in a new project that I am
writing in D and I want to use D in an
On Friday, 19 February 2021 at 10:01:36 UTC, Max Haughton wrote:
On Friday, 19 February 2021 at 09:44:15 UTC, Preetpal wrote:
I want to reuse existing C++ code in a new project that I am
writing in D and I want to use D in an existing C++ code base
(it is not large). I do not anticipate
On Friday, 19 February 2021 at 08:29:36 UTC, Ferhat Kurtulmuş
wrote:
Since classes are reference types all instances of files will
be the same reference of "new File()", which you probably don't
want.
Is any differences between x and y definitions?
MyClass [] x, y;
x = new MyClass[7];
y=
On Friday, 19 February 2021 at 09:44:15 UTC, Preetpal wrote:
I want to reuse existing C++ code in a new project that I am
writing in D and I want to use D in an existing C++ code base
(it is not large). I do not anticipate interop being an issue.
[...]
C++ interop is used every day. The
I want to reuse existing C++ code in a new project that I am
writing in D and I want to use D in an existing C++ code base (it
is not large). I do not anticipate interop being an issue.
I am wondering if mixing D and C++ is a common practice? If it is
a common practice, is anyone is currently
On Friday, 19 February 2021 at 08:29:36 UTC, Ferhat Kurtulmuş
wrote:
On Friday, 19 February 2021 at 08:04:19 UTC, Виталий Фадеев
wrote:
[...]
files = new File[]( 1000 );
files[] = new File(); // add this
Since classes are reference types all instances of files will
be the same reference of
On Friday, 19 February 2021 at 08:41:06 UTC, Ferhat Kurtulmuş
wrote:
On Friday, 19 February 2021 at 08:29:36 UTC, Ferhat Kurtulmuş
wrote:
On Friday, 19 February 2021 at 08:04:19 UTC, Виталий Фадеев
wrote:
[...]
files = new File[]( 1000 );
files[] = new File(); // add this
Since classes are
On Thursday, 18 February 2021 at 17:27:48 UTC, Steven
Schveighoffer wrote:
On 2/18/21 4:40 AM, frame wrote:
[...]
It's just the way it is. Everything in Phobos is a C FILE *
(wrapped in a File). You need to use alternative i/o systems to
get the information.
[...]
Does your iopipe
On Friday, 19 February 2021 at 08:04:19 UTC, Виталий Фадеев wrote:
We have:
class File
{
// WIN32_FIND_DATAW data;
}
void fastReadDir()
{
File[] files;
// reserve space, allocating instances
files = new File[]( 1000 ); // <--- trouble here ?
We have:
class File
{
// WIN32_FIND_DATAW data;
}
void fastReadDir()
{
File[] files;
// reserve space, allocating instances
files = new File[]( 1000 ); // <--- trouble here ?
// filling instances
auto file = files.ptr;
25 matches
Mail list logo