Hello guys,
I have DirectX 12 code that doesn't work in D (it works in C++),
as the subject says this can be related to D heap and/or thread
local storage.
code can be found here (build with dmd -m32mscoff)
https://github.com/evilrat666/directx-d/blob/master/examples/d3d12_hello/source/d3d12_
On Tuesday, 20 December 2016 at 20:08:32 UTC, Ali Çehreli wrote:
If the purpose is optimization, the good news are
Yes it is :)
* Classes are already reference types so there is no lvalue or
rvalue reference distinction there
Ok, this one is quite intuitive.
import std.stdio;
...
Thank
On Tuesday, 20 December 2016 at 19:24:32 UTC, Ali Çehreli wrote:
As a general rule, 'auto ref' should probably be const. If the
purpose of 'ref' is so that the argument would be mutated, then
allowing a copy of an rvalue to this function could very well
be a bug:
struct S {
int i;
}
void
On Tuesday, 20 December 2016 at 18:42:11 UTC, WebFreak001 wrote:
On Tuesday, 20 December 2016 at 18:22:51 UTC, aberba wrote:
[...]
iterate over req.files like this instead:
foreach (name, picture; req.files) // name is "picture[]" now
{
...
}
Nice.
[...]
pragma(msg, __traits(allMember
Thanks for the explanation
On 12/20/2016 11:59 AM, somebody wrote:
I though D should have syntax similarities with C, but recently I've
found that array indexing in D is different. Suppose we have a code:
import std.stdio;
void main ()
{
wstring[6][2] strings;
strings[2][0] = "test";
}
It fails to compile becau
On Tuesday, 20 December 2016 at 19:59:41 UTC, somebody wrote:
I though D should have syntax similarities with C, but recently
I've found that array indexing in D is different. Suppose we
have a code:
import std.stdio;
void main ()
{
wstring[6][2] strings;
strings[2][0] = "test";
}
I
On 12/18/2016 05:14 AM, Picaud Vincent wrote:
> Another interrogation for me, who come from C++, is how to translate
> into D:
>
> template void foo(T&& t);
If it means "rvalue reference"[1], then there is no equivalent is D
because D does not allow references to rvalues, even if const.
If th
I though D should have syntax similarities with C, but recently
I've found that array indexing in D is different. Suppose we have
a code:
import std.stdio;
void main ()
{
wstring[6][2] strings;
strings[2][0] = "test";
}
It fails to compile because of error:
"./main.d(6): Error: arra
As a general rule, 'auto ref' should probably be const. If the purpose
of 'ref' is so that the argument would be mutated, then allowing a copy
of an rvalue to this function could very well be a bug:
struct S {
int i;
}
void foo()(auto ref S s) {
s.i = 42; // <-- Cannot be observed if
On Tuesday, 20 December 2016 at 18:22:51 UTC, aberba wrote:
[...]
Now I wanted to implement this in D (vibe.d) and here is what I
did in the file upload handler.
void upload(HTTPServerRequest req, HTTPServerResponse res)
{
import std.stdio;
foreach(picture; req.files) // req.files inc
In PHP, I am able to access the name attribute of multiple files
submitted through forms at the server side in $_FILES global.
For example, a file input with name="picture[]" will allow me to
upload multiples files with the same attribute name. This can be
access in PHP as;
$files = $_FILE
On Tuesday, 20 December 2016 at 13:30:54 UTC, Kagamin wrote:
On Friday, 16 December 2016 at 18:29:33 UTC, Ilya Yaroshenko
wrote:
Undefined symbols for architecture x86_64:
"__D14TypeInfo_Class6__vtblZ", referenced from:
__D8cppclass2Hw7__ClassZ in cppclass-7ed89bd.o
By using typeid you
On Friday, 16 December 2016 at 18:29:33 UTC, Ilya Yaroshenko
wrote:
Undefined symbols for architecture x86_64:
"__D14TypeInfo_Class6__vtblZ", referenced from:
__D8cppclass2Hw7__ClassZ in cppclass-7ed89bd.o
By using typeid you request the class' TypeInfo, and it pulls
quite a lot.
On Tuesday, 20 December 2016 at 11:04:30 UTC, biocyberman wrote:
On Monday, 19 December 2016 at 16:23:45 UTC, Guillaume Piolat
wrote:
What you can do for private package as of today is:
- use path-based dependencies and put your packages in the
same repo
- use git submodules and path-based
On Monday, 19 December 2016 at 16:23:45 UTC, Guillaume Piolat
wrote:
What you can do for private package as of today is:
- use path-based dependencies and put your packages in the same
repo
- use git submodules and path-based dub dependencies together
If it's a public package, you can regi
16 matches
Mail list logo