Hi all
I'm looking to try and write an interface to C++, but given I'm a
casual dabbler in D, it's slightly beyond my current ability in
terms of both C++ and D!
As a leg up, how would one translate something like this from C++
to D?
`typedef int (CV_CDECL* CvCmpFunc)(const void* a, const
On Sunday, 4 February 2018 at 05:45:02 UTC, Basile B. wrote:
1/
void foo()
{
asm pure nothrow
{
naked;
mov RAX, [0x10][0x20] R8;
ret;
}
}
generates
;--- SUB 00449468h ---
00449468h mov eax, 0030h
0044946Dh ret
1/
void foo()
{
asm pure nothrow
{
naked;
mov RAX, [0x10][0x20] R8;
ret;
}
}
generates
;--- SUB 00449468h ---
00449468h mov eax, 0030h
0044946Dh ret
;-
2/
void foo()
{
asm pure
On Sunday, 4 February 2018 at 05:03:31 UTC, Basile B. wrote:
```
__gshared a = "sdfg";
void main()
{
asm
{
mov RCX, [a];
}
}
```
Error: cannot directly load global variable 'a' with PIC code
How can i do that indirectly then ?
Also consider that there's no RIP:
```
__gshared a = "sdfg";
void main()
{
asm
{
mov RCX, [a];
}
}
```
Error: cannot directly load global variable 'a' with PIC code
How can i do that indirectly then ?
On 03/02/2018 6:06 PM, Andres Clari wrote:
Hi, is there support for drag and drop in dlangui??
I haven't found anything on the docs, issues or forums.
I'm building a project that requires support for dropping URLs from the
browser into a ListWidget. Is this possible with dlangui at all?
No.
On Sunday, 4 February 2018 at 01:23:50 UTC, Rubn wrote:
On Saturday, 3 February 2018 at 23:42:28 UTC, welkam wrote:
[...]
I think you have to build with an old version of MSVC, 2010
maybe? It's been a while since I built it I don't remember the
exactly which version ended up working.
2013
On Saturday, 3 February 2018 at 23:42:28 UTC, welkam wrote:
Tried to use DMD compiler that I built from source by following
these instructions https://wiki.dlang.org/Building_under_Windows
They are outdated but I managed to compile it but I get this
error when I tried to compile some code.
Tried to use DMD compiler that I built from source by following
these instructions https://wiki.dlang.org/Building_under_Windows
They are outdated but I managed to compile it but I get this
error when I tried to compile some code.
dmdm -run Main.d
Hi All,
Request your help, on hot to replace an element(a[2]) in an
array with the element(a[3])
Eg,
auto a = Array!string("T1","T2","T3");
writeln(D1.replace(a[2], a[3]));
From,
Vino.B
On Saturday, 3 February 2018 at 19:28:01 UTC, Seb wrote:
On Saturday, 3 February 2018 at 19:13:05 UTC, Vino wrote:
[...]
2.079 [1, 2] will ship with slide:
---
auto arr = ["T1", "T2", "T3", "T4", "T5"];
arr.slide(2).each!writeln;
---
[...]
Hi Seb;
Thank you very much.
From,
Vino.B
On Friday, 2 February 2018 at 00:33:03 UTC, Jakub Łabaj wrote:
On the other hand, shifting operators are equally confusing for
me, as they are for you - they really work in the other way
around! I thought this is a very weird bug, but I found this
pull request:
On Saturday, 3 February 2018 at 19:13:05 UTC, Vino wrote:
Hi All,
Request you help on printing an array in below,
Eg:
Array ("T1", "T2", "T3", "T4", "T5")
Output required as below
T1,T2
T2,T3
T3,T4
T4,T5
From,
Vino.B
2.079 [1, 2] will ship with slide:
---
auto arr = ["T1", "T2", "T3",
On Saturday, 3 February 2018 at 19:19:00 UTC, Adam D. Ruppe wrote:
On Saturday, 3 February 2018 at 19:13:05 UTC, Vino wrote:
Request you help on printing an array in below,
Try looping through the array printing the current item
followed by the item after the current item. Foreach with
On Saturday, 3 February 2018 at 19:13:05 UTC, Vino wrote:
Request you help on printing an array in below,
Try looping through the array printing the current item followed
by the item after the current item. Foreach with index may be
helpful. Consider what happens on the last element.
Hi All,
Request you help on printing an array in below,
Eg:
Array ("T1", "T2", "T3", "T4", "T5")
Output required as below
T1,T2
T2,T3
T3,T4
T4,T5
From,
Vino.B
Hi, is there support for drag and drop in dlangui??
I haven't found anything on the docs, issues or forums.
I'm building a project that requires support for dropping URLs
from the browser into a ListWidget. Is this possible with dlangui
at all?
---
interface A{}
void* a=cast(void*)5;
A b=cast(A)a; //ok
A c=cast(A)cast(void*)5; //error
---
Last line gives Error: cannot cast `void*` to `A`. Is it intended?
On Saturday, 3 February 2018 at 15:38:19 UTC, Basile B. wrote:
On Saturday, 3 February 2018 at 15:30:10 UTC, Basile B. wrote:
[...]
okay solved:
module runnable;
__gshared static msg = "betterC\n";
__gshared static len = 8;
extern(C) int main(int argc, char** args)
{
asm
{
On Saturday, 3 February 2018 at 15:38:02 UTC, Adam D. Ruppe wrote:
On Saturday, 3 February 2018 at 15:30:10 UTC, Basile B. wrote:
__gshared static msg = "betterC";
That's a D string
mov ECX, msg ;//message to write
And that's the address of a D string, instead of the address
On Saturday, 3 February 2018 at 15:30:10 UTC, Basile B. wrote:
compiles with -betterC -m32
module runnable;
__gshared static msg = "betterC";
__gshared static len = 7;
extern(C) int main(int argc, char** args)
{
asm
{
naked;
mov EDX, len ;//message length
mov
On Saturday, 3 February 2018 at 15:30:10 UTC, Basile B. wrote:
__gshared static msg = "betterC";
That's a D string
mov ECX, msg ;//message to write
And that's the address of a D string, instead of the address of
the characters.
You need to put the pointer in there. So either
compiles with -betterC -m32
module runnable;
__gshared static msg = "betterC";
__gshared static len = 7;
extern(C) int main(int argc, char** args)
{
asm
{
naked;
mov EDX, len ;//message length
mov ECX, msg ;//message to write
mov EBX, 1 ;//file
On Saturday, 3 February 2018 at 06:34:57 UTC, Tony wrote:
Don't know if there is a better place to report this, but the
wiki attracted a spammer:
Deleted, thanks.
We're generally doing pretty well with spam (compared to other
wikis) thanks to https://github.com/CyberShadow/dcaptcha , but
24 matches
Mail list logo