On 12/16/2012 12:08 PM, anonymous wrote:
Foo.s1alpha and Bar.s1alpha are the same type. In my version they are not.
OK. Fair Enough :-)
On Saturday, 15 December 2012 at 16:32:27 UTC, r_m_r wrote:
On 12/15/2012 08:57 PM, anonymous wrote:
Note that here s1alpha and s2alpha are distinct types.
what about this: http://dpaste.dzfl.pl/95f7a74d
Consider
struct Foo {mixin (genStruct!("s1"));}
struct Bar {mixin (genStruct!("s1"));}
On Saturday, 15 December 2012 at 19:46:11 UTC, Johannes Pfau
wrote:
Am Sat, 15 Dec 2012 14:56:47 +0100
schrieb "Nekroze" :
On Saturday, 15 December 2012 at 13:42:11 UTC, r_m_r wrote:
> On 12/15/2012 06:35 PM, Nekroze wrote:
>> So straight up, is DMD capable of cross compiling on linux
>> targe
On 12/16/2012 06:36 AM, r_m_r wrote:
this is the closest I can get: http://dpaste.dzfl.pl/9d11d060
Cleaned up a bit: http://dpaste.dzfl.pl/d9f001db
regards,
r_m_r
On 12/16/2012 05:30 AM, js.mdnq wrote:
and mixin the UserStruct.S with the MasterStruct_A
this is the closest I can get: http://dpaste.dzfl.pl/9d11d060
regards,
r_m_r
On Saturday, 15 December 2012 at 23:04:37 UTC, r_m_r wrote:
On 12/16/2012 04:00 AM, js.mdnq wrote:
Now, the next step is to be able to "insert" code into the
struct! ;)
how about this: http://dpaste.dzfl.pl/8161d00a
regards,
r_m_r
No, it's backwards! ;)
Or, sort of what one wants to do is:
On 12/16/2012 04:00 AM, js.mdnq wrote:
Now, the next step is to be able to "insert" code into the struct! ;)
how about this: http://dpaste.dzfl.pl/8161d00a
regards,
r_m_r
On Saturday, 15 December 2012 at 22:21:21 UTC, Philippe Sigaud
wrote:
If you don't mind, could you see if your solutions work on the
following
code:
http://dpaste.dzfl.pl/64025e0a
What you're doing here is a bit different (AFAICT). _A is a
template, not a
'real' class. So, it has no classinf
On Saturday, 15 December 2012 at 19:09:25 UTC, r_m_r wrote:
On 12/10/2012 01:24 AM, js.mdnq wrote:
which will fail or not be what I want, since I want to
generate the
structs s1 and s1.
how about this: http://dpaste.dzfl.pl/c0325def
regards,
r_m_r
Cool, That looks like a step in the right
On Saturday, 15 December 2012 at 13:16:17 UTC, anonymous wrote:
On Saturday, 15 December 2012 at 13:08:01 UTC, js.mdnq wrote:
The following code
http://dpaste.dzfl.pl/64025e0a
when compiled, has all the static and const char[] strings
used only for compile time inside the executable.
How t
> If you don't mind, could you see if your solutions work on the following
> code:
>
> http://dpaste.dzfl.pl/64025e0a
>
>
What you're doing here is a bit different (AFAICT). _A is a template, not a
'real' class. So, it has no classinfo. The only real type here is the
template instantiation you call
now i got it, thanks.
>
> Oops ;/ How do I get the number of type arguments if I don't know them
> yet? I know this sort of seems wrong but somehow, to know how to alias the
> class I need to know it's number of arguments. (I don't think it makes too
> much sense with the type system but not sure how to solve the follow
On 12/15/2012 11:01 AM, ref2401 wrote:
What does means 'maxRelDiff' parameter?
I looked at the source code of this method and I still didn't get it.
return fabs((lhs - rhs) / rhs) <= maxRelDiff
|| maxAbsDiff != 0 && fabs(lhs - rhs) <= maxAbsDiff;
In what cases can I use this parameter?
If you
Maybe you want to use std.math.feqrel instead.
that's not what i was asking about
Am Sat, 15 Dec 2012 14:56:47 +0100
schrieb "Nekroze" :
> On Saturday, 15 December 2012 at 13:42:11 UTC, r_m_r wrote:
> > On 12/15/2012 06:35 PM, Nekroze wrote:
> >> So straight up, is DMD capable of cross compiling on linux
> >> targeting
> >> windows? I have never used the alternative D compiler
ref2401:
What does means 'maxRelDiff' parameter?
I looked at the source code of this method and I still didn't
get it.
return fabs((lhs - rhs) / rhs) <= maxRelDiff
|| maxAbsDiff != 0 && fabs(lhs - rhs) <= maxAbsDiff;
In what cases can I use this parameter?
Maybe you want to use std.math.fe
On 12/10/2012 01:24 AM, js.mdnq wrote:
which will fail or not be what I want, since I want to generate the
structs s1 and s1.
how about this: http://dpaste.dzfl.pl/c0325def
regards,
r_m_r
What does means 'maxRelDiff' parameter?
I looked at the source code of this method and I still didn't get
it.
return fabs((lhs - rhs) / rhs) <= maxRelDiff
|| maxAbsDiff != 0 && fabs(lhs - rhs) <= maxAbsDiff;
In what cases can I use this parameter?
On Saturday, 15 December 2012 at 18:09:00 UTC, Ali Çehreli wrote:
On 12/15/2012 10:07 AM, Ali Çehreli wrote:
> Otherwise any type would go to opDispatch.
Wow. I made a typo in typo. :) That should be:
Otherwise any _typo_ would go to opDispatch.
Ali
It's pretty reasonable,thank you.
On 12/15/2012 10:07 AM, Ali Çehreli wrote:
> Otherwise any type would go to opDispatch.
Wow. I made a typo in typo. :) That should be:
Otherwise any _typo_ would go to opDispatch.
Ali
On 12/15/2012 10:01 AM, Zhenya wrote:
Hi!
Is it a bug?
class Foo
{
int m_bar;
char m_gun;
@property auto ref opDispatch(string s)()
{
return mixin("m_"~s);
}
this(int i,char c)
{
bar = i;//Error: undefined identifier bar, did you mean variable m_bar?
this.bar = i;
Because when it is s
Hi!
Is it a bug?
class Foo
{
int m_bar;
char m_gun;
@property auto ref opDispatch(string s)()
{
return mixin("m_"~s);
}
this(int i,char c)
{
bar = i;//Error: undefined identifier bar, did you mean
variable m_bar?
On 12/15/2012 08:57 PM, anonymous wrote:
Note that here s1alpha and s2alpha are distinct types.
what about this: http://dpaste.dzfl.pl/95f7a74d
regards,
r_m_r
On Saturday, 15 December 2012 at 15:15:21 UTC, r_m_r wrote:
On 12/10/2012 01:43 AM, anonymous wrote:
Maybe it helps if you see it in action:
http://dpaste.dzfl.pl/5d4cb742
Note that here s1alpha and s2alpha are distinct types.
Here's a slightly modified version:
http://dpaste.dzfl.pl/f2bd142
On 12/10/2012 01:43 AM, anonymous wrote:
Maybe it helps if you see it in action: http://dpaste.dzfl.pl/5d4cb742
Here's a slightly modified version: http://dpaste.dzfl.pl/f2bd1428
regards,
r_m_r
Am 15.12.2012 14:56, schrieb Nekroze:
> On Saturday, 15 December 2012 at 13:42:11 UTC, r_m_r wrote:
>> On 12/15/2012 06:35 PM, Nekroze wrote:
>>> So straight up, is DMD capable of cross compiling on linux targeting
>>> windows? I have never used the alternative D compilers (GDC, LDC etc)
>>> but ar
On Saturday, 15 December 2012 at 13:42:11 UTC, r_m_r wrote:
On 12/15/2012 06:35 PM, Nekroze wrote:
So straight up, is DMD capable of cross compiling on linux
targeting
windows? I have never used the alternative D compilers (GDC,
LDC etc)
but are they capable of this perhaps?
You can try: htt
On 12/15/2012 06:35 PM, Nekroze wrote:
So straight up, is DMD capable of cross compiling on linux targeting
windows? I have never used the alternative D compilers (GDC, LDC etc)
but are they capable of this perhaps?
You can try: http://gdcproject.org/wiki/Cross%20Compiler
check this thread for
On Saturday, 15 December 2012 at 13:05:32 UTC, Nekroze wrote:
I have been thinking about starting a project recently to using
llvm to make a little toy compiler however I quite dislike
mingw and such on windows so was going to build a gcc cross
compiler and try to make it so I can code and comp
On Saturday, 15 December 2012 at 13:08:01 UTC, js.mdnq wrote:
The following code
http://dpaste.dzfl.pl/64025e0a
when compiled, has all the static and const char[] strings used
only for compile time inside the executable.
How to prevent this?
specifically I'm talking about
static const cha
I have been thinking about starting a project recently to using
llvm to make a little toy compiler however I quite dislike mingw
and such on windows so was going to build a gcc cross compiler
and try to make it so I can code and compile my win32 compiler
(the compiler will be an exe and the cod
On Saturday, 15 December 2012 at 12:33:13 UTC, bearophile wrote:
js.mdnq:
static if (std.string.indexOf(S, ")") < -1)
...
else
...
This always returns false regardless if S contains a 7 or not.
If it doesn't find the substring it returns -1, so that's
always false. So use:
S.indexOf("
js.mdnq:
static if (std.string.indexOf(S, ")") < -1)
...
else
...
This always returns false regardless if S contains a 7 or not.
If it doesn't find the substring it returns -1, so that's always
false. So use:
S.indexOf(")") < 0
Bye,
bearophile
On 2012-12-15 07:26, Jeremy DeHaan wrote:
Thus it appears that any extensions made to the types defined in a C
library is not safe! Even one as trivial as a constructor. I didn't show
the code or output(it was with some different tests), but I also got
some run time errors when using the version
Thanks for your reply!
I'll investigate further and report a bug if necessary.
How do we manipulate strings at compile time when using static
ifs?
static if (std.string.indexOf(S, ")") < -1)
...
else
...
This always returns false regardless if S contains a 7 or not.
from http://dpaste.dzfl.pl/64025e0a
mixin(StructNestType!("B", "b1"));
but I would like to modi
37 matches
Mail list logo