I have the need to create an enum flag like structure to specify
certain properties of a type easily.
e.g.,
enum properties
{
Red,
Blue,
Hot,
Sexy,
Active,
...
}
But some properties will be mutually exclusive. I would like to
contain all those rules for in the enum itself
On Thursday, 19 January 2017 at 02:51:03 UTC, rikki cattermole
wrote:
On 19/01/2017 3:35 PM, Ignacious wrote:
On Thursday, 19 January 2017 at 02:25:44 UTC, Adam D. Ruppe
wrote:
On Thursday, 19 January 2017 at 02:15:04 UTC, rikki
cattermole wrote:
On 19/01/2017 3:08 PM, Ignacious wrote:
On Thursday, 19 January 2017 at 02:25:44 UTC, Adam D. Ruppe wrote:
On Thursday, 19 January 2017 at 02:15:04 UTC, rikki cattermole
wrote:
On 19/01/2017 3:08 PM, Ignacious wrote:
class Y
{
int y;
alias y this;
}
class X
{
Y[] x;
alias x this;
}
This should not fail:
X x = new
class Y
{
int y;
alias y this;
}
class X
{
Y[] x;
alias x this;
}
Yet X ~= 3; fails.
3 should be implicitly convertible to Y and then ~ should assign
it.
?
string concatenation is weird.
We can do stuff like
writeln(x);
where x is, say a struct and it prints fine
but when we do
writeln(x ~ " ok");
it fails and requires us to convert x!
Why can't string concatenation automatically try to convert the
arguments? Is there any reason this is bad
On Saturday, 14 January 2017 at 11:32:10 UTC, Marc Schütz wrote:
You can utilize a little-known `switch` syntax trick in
combination with `foreach`. Because a `foreach` over tuples is
unrolled at compile time, it works even if your fields don't
have exactly the same types:
On Saturday, 14 January 2017 at 08:30:04 UTC, Meta wrote:
On Saturday, 14 January 2017 at 05:29:49 UTC, Nicholas Wilson
wrote:
enum XX
{
X = Q.X.offsetof,
Y = Q.Y.offsetof
//ect.
}
and then
*(cast(void*)(this) + x) = e; //if inside struct/class
or
*(cast(void*)(q) + x) = e; // if
When doing common functionality for a switch, is there any way to
optimize:
switch(x)
{
case X:
q.X = e;
break;
case Y:
q.Y = e;
break
etc...
}
e is basically a value that, depending on the what kind(x), we
assign it to a field in q. The name of
On Wednesday, 11 January 2017 at 19:23:10 UTC, Razvan Nitu wrote:
Hi,
I am currently trying to create a function
makeMultidimensionalArray which allocates memory for a
multidimensional array. It is very similar with [1],
the difference being that it is uninitialized. Here is the code:
auto
On Wednesday, 11 January 2017 at 03:49:42 UTC, Joakim wrote:
On Tuesday, 10 January 2017 at 18:48:17 UTC, Ignacious wrote:
[...]
It's probably not easier, and in any case, android-x86 won't be
supported, largely because I don't have any working x86 devices.
[...]
Ok, well the x86 thing
On Wednesday, 11 January 2017 at 19:23:10 UTC, Razvan Nitu wrote:
Hi,
I am currently trying to create a function
makeMultidimensionalArray which allocates memory for a
multidimensional array. It is very similar with [1],
the difference being that it is uninitialized. Here is the code:
auto
Well, I posed a reply but I guess it didn't get though ;/
I'm only suing android-x86 because I thought it would be easier
to test/debug. My device is a cortex-arm7.
Two questions I have:
1. In the command lines present there is a lot of use of `x86`. I
used them to compile the hello world
How difficult is it to build for x86/x64?
Would be nice to be able to use something like
http://www.android-x86.org/
as a test instead of an actual device.
Does one simply have to use the proper ldc2/dmd and link in the
correct libs? or is it more complex?
Also, I'm a bit confused on how
On Monday, 9 January 2017 at 08:28:04 UTC, Joakim wrote:
On Monday, 9 January 2017 at 00:40:35 UTC, Ignacious wrote:
On Sunday, 8 January 2017 at 22:19:31 UTC, Joakim wrote:
On Sunday, 8 January 2017 at 21:52:01 UTC, Ignacious wrote:
Not sure what is going on, of course ;) So much BS just to
On Sunday, 8 January 2017 at 22:19:31 UTC, Joakim wrote:
On Sunday, 8 January 2017 at 21:52:01 UTC, Ignacious wrote:
Not sure what is going on, of course ;) So much BS just to do
something that is suppose to be simple ;)
test.d
void main()
{
}
here is test.o
On Sunday, 8 January 2017 at 20:34:21 UTC, Joakim wrote:
On Sunday, 8 January 2017 at 19:58:06 UTC, Ignacious wrote:
I suppose it will be easier to install a real ubuntu distro
rather than relying on windows? All these issues seem to be
related to outdated versions?
Distributor ID: Ubuntu
Yeah, not a good idea to build from source yourself. Try the
advice here, ie see if you can install a package with that
library or just symlink to the older library if not:
http://askubuntu.com/questions/771047/erlang-error-while-loading-shared-libraries-libncursesw-so-6
Well, the only
when one prints out a string with some extended(I guess it's
unicode), writeln prints out the ascii versions that do not
correspond to what they really are. e.g., an umlaut is printed
out as 1/2 or something.
how to get it to print the correct codes?
On Monday, 2 January 2017 at 03:08:10 UTC, Joakim wrote:
On Sunday, 1 January 2017 at 09:34:24 UTC, Ignacious wrote:
Can you try
sudo apt-get install libconfig9
I don't know if that will install something different, but
it's the command I see others using online. Otherwise, check
if the
Can you try
sudo apt-get install libconfig9
I don't know if that will install something different, but it's
the command I see others using online. Otherwise, check if the
libconfig++9 package you installed included libconfig.so.9,
which is what ldc is linked against. If not, install the
On Saturday, 31 December 2016 at 12:31:07 UTC, Nicholas Wilson
wrote:
On Saturday, 31 December 2016 at 11:39:39 UTC, Nicholas Wilson
wrote:
[...]
Oh and `kernel` could be a template function that would need
its args forwarded to it.
Alias it away using a wrapper?
On Thursday, 29 December 2016 at 10:14:53 UTC, Joakim wrote:
On Wednesday, 28 December 2016 at 23:33:57 UTC, Ignacious wrote:
What is the current status for building android apps in D? I
would like to create simple graphic based apps but don't wanna
get bogged down in trying to get car moving
On Saturday, 31 December 2016 at 06:33:10 UTC, Ignacious wrote:
On Saturday, 31 December 2016 at 05:52:00 UTC, Ignacious wrote:
On Thursday, 29 December 2016 at 10:14:53 UTC, Joakim wrote:
[...]
Is there any way to get a package that works for windows?
While the steps don't seem too
On Saturday, 31 December 2016 at 05:52:00 UTC, Ignacious wrote:
On Thursday, 29 December 2016 at 10:14:53 UTC, Joakim wrote:
[...]
Is there any way to get a package that works for windows? While
the steps don't seem too difficult to do, things never go well
for me(something always breaks...
On Thursday, 29 December 2016 at 10:14:53 UTC, Joakim wrote:
On Wednesday, 28 December 2016 at 23:33:57 UTC, Ignacious wrote:
What is the current status for building android apps in D? I
would like to create simple graphic based apps but don't wanna
get bogged down in trying to get car moving
On Thursday, 29 December 2016 at 10:14:53 UTC, Joakim wrote:
On Wednesday, 28 December 2016 at 23:33:57 UTC, Ignacious wrote:
What is the current status for building android apps in D? I
would like to create simple graphic based apps but don't wanna
get bogged down in trying to get car moving
What is the current status for building android apps in D? I
would like to create simple graphic based apps but don't wanna
get bogged down in trying to get car moving without any wheels.
27 matches
Mail list logo