Re: How to list all version identifiers?

2016-03-15 Thread Iakh via Digitalmars-d-learn

On Sunday, 13 March 2016 at 20:16:36 UTC, Basile B. wrote:

On Sunday, 13 March 2016 at 16:28:50 UTC, Iakh wrote:

On Sunday, 13 March 2016 at 15:50:47 UTC, Basile B. wrote:
trivial answer, let's say you have dcd-server running in the 
background:


dcd-client -c8 <<< "version("


Thanks. Will try.


But it was a joke actually. It works but this is not very 
straightforward. And it needs a bit of post processing since 
the output you'll get is normally made for the completion menu 
of D editors.


Looks like it shows all version identifiers listed in
https://dlang.org/spec/version.html#version
and it's not what I want. I need just actual ones under some
compiler/circumstances


Re: How to list all version identifiers?

2016-03-13 Thread Iakh via Digitalmars-d-learn

On Sunday, 13 March 2016 at 20:16:36 UTC, Basile B. wrote:

On Sunday, 13 March 2016 at 16:28:50 UTC, Iakh wrote:

On Sunday, 13 March 2016 at 15:50:47 UTC, Basile B. wrote:
trivial answer, let's say you have dcd-server running in the 
background:


dcd-client -c8 <<< "version("


Thanks. Will try.


But it was a joke actually. It works but this is not very 
straightforward. And it needs a bit of post processing since 
the output you'll get is normally made for the completion menu 
of D editors.


Maybe it is what I'm searching for if there is a way to specify
compiler/parser.


Re: How to list all version identifiers?

2016-03-13 Thread Iakh via Digitalmars-d-learn

On Sunday, 13 March 2016 at 15:50:47 UTC, Basile B. wrote:
trivial answer, let's say you have dcd-server running in the 
background:


dcd-client -c8 <<< "version("


Thanks. Will try.


How to list all version identifiers?

2016-03-13 Thread Iakh via Digitalmars-d-learn

There is trick for gcc:
gcc -dM -E - < /dev/null

It shows all default #defines

Is there way to show all version identifiers for D?
For all or any compiler you know


Re: Constructor - the both look the same

2016-03-12 Thread Iakh via Digitalmars-d-learn

On Saturday, 12 March 2016 at 07:43:59 UTC, Joel wrote:

Why does it come up with this?

source/setup.d(40,16): Error: constructor 
inputjex.InputJex.this (Vector2!float pos, int fontSize, 
InputType type = cast(InputType)0) is not callable using 
argument types (Vector2!float, int, InputType)

dmd failed with exit code 1.


Can you show your code?


Re: D ASM. Program fails

2016-01-22 Thread Iakh via Digitalmars-d-learn

On Friday, 22 January 2016 at 17:27:35 UTC, userABCabc123 wrote:

int pmovmskb(byte16 v)
{
asm
{
naked;
push RBP;
mov RBP, RSP;
sub RSP, 0x10;
movdqa dword ptr[RBP-0x10], XMM0;
movdqa XMM0, dword ptr[RBP-0x10];
pmovmskb EAX, XMM0;
mov RSP, RBP;
pop RBP;
ret;
}
}


Thanks. It works.
Buth shorter version too:

asm
{
naked;
push RBP;
mov RBP, RSP;
//sub RSP, 0x10;
//movdqa dword ptr[RBP-0x10], XMM0;
//movdqa XMM0, dword ptr[RBP-0x10];
pmovmskb EAX, XMM0;
mov RSP, RBP;
pop RBP;
ret;
}

Looks like the SIMD param is passed by SIMD reg



Re: D ASM. Program fails

2016-01-22 Thread Iakh via Digitalmars-d-learn

On Friday, 22 January 2016 at 12:18:53 UTC, anonymous wrote:


int pmovmskb(byte16 v)
{
int r;
asm
{
movdqa XMM0, v;
pmovmskb EAX, XMM0;
mov r, EAX;
}
return r;
}


This code returns 0 for any input v


Removed the `inout` because it doesn't make sense. You may be 
looking for `ref`.

yeah




Re: D ASM. Program fails

2016-01-22 Thread Iakh via Digitalmars-d-learn

On Friday, 22 January 2016 at 20:41:23 UTC, anonymous wrote:

On 22.01.2016 21:34, Iakh wrote:

This code returns 0 for any input v


It seems to return 5 here: http://dpaste.dzfl.pl/85fb8e5c4b6b


Yeah. Sorry. My bad.


D ASM. Program fails

2016-01-21 Thread Iakh via Digitalmars-d-learn

This code compiles but program exits with code -11
What's wrong?

import std.stdio;
import core.simd;

int pmovmskb(inout byte16 v)
{
asm
{
movdqa XMM0, v;
pmovmskb EAX, XMM0;
ret;
}
}
void main()
{
byte16 a = [-1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
auto i = pmovmskb(a);
}

Program exited with code -11

DMD64 D Compiler v2.069