On Tuesday, 16 June 2015 at 12:41:14 UTC, Daniel Kozák wrote:
mixin template include(w...)
{
mixin _include!(w.length - 1, w);
}
mixin template _include(long N, i...)
{
mixin("import " ~ i[N] ~ ";");
mixin _include!(N - 1, i);
}
mixin template _include(long N : 0, i...)
{
mixi
I thought it was because I was weird and I use gold as my linker,
but ld.bfd produced the same results. The most I could find in
bug reports was someone complaining it used to work but the
consensus was that it never did?
Atila
On Tuesday, 16 June 2015 at 17:32:33 UTC, CallToDuty wrote:
On Tuesday, 16 June 2015 at 16:57:52 UTC, John Colvin wrote:
On Tuesday, 16 June 2015 at 16:42:31 UTC, CallToDuty wrote:
Is it possible to embed a dll file within dub project? and if
yes, how?
Have you tried just putting it in the ro
On Tuesday, 16 June 2015 at 12:42:16 UTC, C2D wrote:
On Tuesday, 16 June 2015 at 12:31:23 UTC, John Chapman wrote:
On Tuesday, 16 June 2015 at 12:26:45 UTC, C2D wrote:
BOOL result = SHGetFolderPath(null, 0x23, null, 0, cache.ptr);
That should be:
BOOL result = SHGetFolderPath(null, 0x23, nul
On Tuesday, 16 June 2015 at 12:42:16 UTC, C2D wrote:
On Tuesday, 16 June 2015 at 12:31:23 UTC, John Chapman wrote:
On Tuesday, 16 June 2015 at 12:26:45 UTC, C2D wrote:
BOOL result = SHGetFolderPath(null, 0x23, null, 0, cache.ptr);
That should be:
BOOL result = SHGetFolderPath(null, 0x23, nul
On Monday, 8 June 2015 at 04:08:55 UTC, Adam D. Ruppe wrote:
The easiest way is to not use search paths, and instead pass
all the modules you want compiled to the compiler directly.
Then it will look for the module name declaration instead of
the directory/filename layout.
I think that this s
druntime has never had support for file/line info in traces on
Linux AFAIR
gdb usually saves the day
On Wednesday, 17 June 2015 at 11:07:29 UTC, weaselcat wrote:
On Wednesday, 17 June 2015 at 07:53:16 UTC, Atila Neves wrote:
I thought it was because I was weird and I use gold as my
linker, but ld.bfd produced the same results. The most I could
find in bug reports was someone complaining it use
On Wednesday, 17 June 2015 at 07:53:16 UTC, Atila Neves wrote:
I thought it was because I was weird and I use gold as my
linker, but ld.bfd produced the same results. The most I could
find in bug reports was someone complaining it used to work but
the consensus was that it never did?
Atila
I use wrapper functions taking void[] arrays to forward them
comfortably to mentioned OpenGL functions. This works with static
and dynamic build in arrays, but I don't see a way how I could
access (cast) the raw data of a std.container.array to forward it
to these wrapper functions. std.array(R
On Wednesday, 17 June 2015 at 13:04:28 UTC, ParticlePeter wrote:
I use wrapper functions taking void[] arrays to forward them
comfortably to mentioned OpenGL functions. This works with
static and dynamic build in arrays, but I don't see a way how I
could access (cast) the raw data of a std.cont
On Wednesday, 17 June 2015 at 13:07:11 UTC, Alex Parrill wrote:
On Wednesday, 17 June 2015 at 13:04:28 UTC, ParticlePeter wrote:
I use wrapper functions taking void[] arrays to forward them
comfortably to mentioned OpenGL functions. This works with
static and dynamic build in arrays, but I don'
On Wednesday, 17 June 2015 at 13:04:28 UTC, ParticlePeter wrote:
I use wrapper functions taking void[] arrays to forward them
comfortably to mentioned OpenGL functions. This works with
static and dynamic build in arrays, but I don't see a way how I
could access (cast) the raw data of a std.cont
(&arr.front())[0 .. arr.length] ?
On Wednesday, 17 June 2015 at 13:31:21 UTC, Marc Schütz wrote:
On Wednesday, 17 June 2015 at 13:04:28 UTC, ParticlePeter wrote:
I use wrapper functions taking void[] arrays to forward them
comfortably to mentioned OpenGL functions. This works with
static and dynamic build in arrays, but I don't
On Wednesday, 17 June 2015 at 13:58:09 UTC, Kagamin wrote:
(&arr.front())[0 .. arr.length] ?
Yes, this works, nice, thanks :-)
i have that.
with GCD. ;-)
signature.asc
Description: PGP signature
On Wed, 17 Jun 2015 09:49:56 +0900, Mike Parker wrote:
> On 6/17/2015 6:17 AM, tcak wrote:
>> As far as I known, when I define a string with enum and it is used at
>> different parts of code, that string is repeated again and again in
>> executable file instead of passing a pointer to string. So,
On Wed, 17 Jun 2015 06:02:46 +, WhatMeWorry wrote:
> I guess the question would be why would one want a struct on the heap
> and a class on the stack? Performance reasons?
struct on the heap: some containers, for example, doing their own memory
management.
class on the stack: guaranteed de
Hi.
Any thoughts on the best way to write D functions that I can call
from Excel? I am completely unfamiliar with Windows programming
and COM (last time I wrote this kind of thing was in the mid-90s
I think using xloper and C).
The easiest way for now seems to be via pyxll and pyd. Wrap th
I want to write a function template that works for any array of a
particular type, but not the base type, so real[], real[][], etc,
but not real. I was using ForeachType to do some testing, but it
doesn't really get the base type. It just takes one of the [] off
and returns the remaining type (
On Wednesday, 17 June 2015 at 19:53:07 UTC, jmh530 wrote:
I want to write a function template that works for any array of
a particular type, but not the base type, so real[], real[][],
etc, but not real. I was using ForeachType to do some testing,
but it doesn't really get the base type. It jus
On Wednesday, 17 June 2015 at 20:06:54 UTC, Alex Parrill wrote:
Try:
void foo(T)(T[] arg) {
// In here, T should be the element type, and T[] the array
type.
}
Not a general solution, but you mentioned that you wanted this
for a function parameter.
I don't think this works for multi-
hi
I'm using those imports:
import core.runtime;
import core.sys.windows.windows;
when I call GetWindowTextW DMD compiler complains!
(error:undefined identifier)
any solution?
import std.stdio;
template BaseTypeOf(T) {
static if (is(T : U[], U))
alias BaseTypeOf = BaseTypeOf!(U);
else
alias BaseTypeOf = T;
}
void foo(T : U[], U)(T arr) if (is(BaseTypeOf!(U) == real)) {
}
void main() {
//real _x;
real[2] x;
On Wednesday, 17 June 2015 at 20:20:29 UTC, jmh530 wrote:
On Wednesday, 17 June 2015 at 20:06:54 UTC, Alex Parrill wrote:
Try:
void foo(T)(T[] arg) {
// In here, T should be the element type, and T[] the
array type.
}
Not a general solution, but you mentioned that you wanted this
for
I'm new to Dlang and I have no Idea whats wrong with this code!
wchar[260] buffer;
HWND hWindow = GetForegroundWindow();
GetWindowTextW(hWindow, buffer, sizeof(title)); <-- Problem here
GetWindowTextW(hWindow, buffer, sizeof(title)); <-- Problem here
please Ignore the sizeof(title) parameter, I copied that from c++
equivalent code :D
On Wednesday, 17 June 2015 at 20:40:02 UTC, Dan wrote:
I'm new to Dlang and I have no Idea whats wrong with this code!
wchar[260] buffer;
HWND hWindow = GetForegroundWindow();
GetWindowTextW(hWindow, buffer, sizeof(title)); <-- Problem here
The compiler is complaining it can't find an identifi
On Wednesday, 17 June 2015 at 20:33:11 UTC, Namespace wrote:
import std.stdio;
template BaseTypeOf(T) {
static if (is(T : U[], U))
alias BaseTypeOf = BaseTypeOf!(U);
else
alias BaseTypeOf = T;
}
void foo(T : U[], U)(T arr) if (is(BaseTypeOf!(U) == real)) {
thank you John it worked :)
do I always need do the same for all windows API?
On Wednesday, 17 June 2015 at 20:58:10 UTC, jmh530 wrote:
On Wednesday, 17 June 2015 at 20:33:11 UTC, Namespace wrote:
import std.stdio;
template BaseTypeOf(T) {
static if (is(T : U[], U))
alias BaseTypeOf = BaseTypeOf!(U);
else
alias BaseTypeOf = T;
}
void foo(T :
On Wednesday, 17 June 2015 at 20:50:27 UTC, John Chapman wrote:
wchar[MAX_PATH] buffer;
int length = GetWindowTextW(GetForegroundWindow(),
buffer.ptr, buffer.length);
Don't know why I used MAX_PATH there. You should probably
dynamically allocate a buffer based on GetWindowTextLengthW.
On Wednesday, 17 June 2015 at 21:00:55 UTC, Dan wrote:
thank you John it worked :)
do I always need do the same for all windows API?
For most Win32 API functions, yes. Although there are some more
complete headers on Github (for example,
https://github.com/rikkimax/WindowsAPI).
thank you so much John :)
On Wednesday, 17 June 2015 at 19:53:07 UTC, jmh530 wrote:
I want to write a function template that works for any array of
a particular type, but not the base type, so real[], real[][],
etc, but not real. I was using ForeachType to do some testing,
but it doesn't really get the base type. It jus
36 matches
Mail list logo