On 07/02/2014 08:29 PM, Puming wrote:
> I want to spawn several similar tasks and then wait for all of them to
> complete to go on do some other things
If you don't care about account for each of them individually,
core.thread.thread_joinAll would work. The following program starts two
waves o
I've been trying to figure DUB out and have been having a bit of
trouble. I'm trying to make a simple program that uses Derelict
GL3 and SDL2. I keep getting this error though:
derelict.util.exception.SharedLibLoadException@C:\Users\Kyoji\AppData\Roaming\dub\packages\derelict-util-1.0.1\source\de
Hi,
I want to spawn several similar tasks and then wait for all of
them to complete to go on do some other things, like:
```d
void task(int id)
{
// do the stuff
}
void main()
{
foreach (i; 0..10) {
spawn(&task, i);
}
wait(?); // wait for all task to complete
doSomeOtherThings()
On Thursday, 3 July 2014 at 02:02:19 UTC, safety0ff wrote:
On Thursday, 3 July 2014 at 01:55:14 UTC, safety0ff wrote:
Actually, this is an enhancement because adding:
enum b = blah
Makes them fail. :(
The question is now: how can the delegate be evaluated for the
return value but not for the
On Thursday, 3 July 2014 at 01:55:14 UTC, safety0ff wrote:
Actually, this is an enhancement because adding:
enum b = blah
Makes them fail. :(
The question is now: how can the delegate be evaluated for the
return value but not for the enum?
Actually, this is an enhancement because adding:
enum b = blah
Makes them fail. :(
Everything compiles fine except for function qux2:
http://dpaste.dzfl.pl/9d9187e0b450
Is this a bug or an enhancement for CTFE?
It would be really nice to have this feature because core.simd
has functions such as: void16 __simd(XMM opcode, void16 op1,
void16 op2, ubyte imm8);
Where all the a
Ah yes I never noticed that "in" was in the binary op table. In
my defense, searching for "in" usually yields too many results to
be useful. Thanks to everyone for your help!
On Monday, 30 June 2014 at 15:58:50 UTC, Jason King wrote:
On Monday, 30 June 2014 at 15:19:39 UTC, Adam D. Ruppe wrote:
On Monday, 30 June 2014 at 15:14:24 UTC, Jeremy Sorensen wrote:
documentation means "import core.sys.windows.windwos"
The Windows headers that come with D are pathetically
On Wed, Jul 02, 2014 at 02:35:54PM +, Vlad Levenfeld via
Digitalmars-d-learn wrote:
> On Wednesday, 2 July 2014 at 14:14:57 UTC, Dicebot wrote:
> >struct S
> >{
> > int opIn_r(int key)
> > {
> > return key*2;
> > }
> >}
> >
> >void main()
> >{
> > assert((42 in S.in
On Wednesday, 2 July 2014 at 16:24:40 UTC, Vladimir Panteleev
wrote:
On Wednesday, 2 July 2014 at 16:06:08 UTC, Kashyap wrote:
I got the following error -
C:\Users\labuser\dlang\druntime>dir
..\dmd\src\vcbuild\Win32\Release\dmd_msc.exe
C:\Users\labuser\dlang\druntime>shell script.sh
shell 1.
On Sunday, 29 June 2014 at 15:06:25 UTC, Jeremy Sorensen wrote:
The only question I have is what happens when you use
SUBSYSTEM:WINDOWS:4.0 (Which I understand means XP or higher)
and the program runs on something older?
Windows XP is version 5.1.
4.0 was Windows NT 4 (which I believe was the
On Wednesday, 2 July 2014 at 16:06:08 UTC, Kashyap wrote:
I got the following error -
C:\Users\labuser\dlang\druntime>dir
..\dmd\src\vcbuild\Win32\Release\dmd_msc.exe
C:\Users\labuser\dlang\druntime>shell script.sh
shell 1.01
make -f posix.mak
DMD=../dmd/src/vcbuild/Win32/Release/dmd_msc.exe
Hi,
I was able to build dmd on my windows machine using VS2013 (using
the vs2010 sln file). However, I am not sure how to proceed with
building the druntime and phobos. Could someone please point me
to instructions for the same?
I tried the following
1. Downloaded make and shell (digital mar
Dicebot:
Yep, I think it is D1 legacy approach. opBinary should be more
appropriate.
I hope the usage of the old operator overloading functions will
generate deprecation messages soon.
Bye,
bearophile
On Wednesday, 2 July 2014 at 14:35:55 UTC, Vlad Levenfeld wrote:
On Wednesday, 2 July 2014 at 14:14:57 UTC, Dicebot wrote:
struct S
{
int opIn_r(int key)
{
return key*2;
}
}
void main()
{
assert((42 in S.init) == 84);
}
Thanks! I wonder, why the
On Wednesday, 2 July 2014 at 15:36:23 UTC, Kozzi11 wrote:
Thanks! I wonder, why the _r and lack of documentation?
Maybe something from old days? But in current http://dlang.org/operatoroverloading.html#Binary";
target="_blank">doc there is a opBinary:
Yep, I think it is D1 legacy approach. op
On 07/02/2014 07:35 AM, Vlad Levenfeld wrote:
On Wednesday, 2 July 2014 at 14:14:57 UTC, Dicebot wrote:
struct S
{
int opIn_r(int key)
{
return key*2;
}
}
void main()
{
assert((42 in S.init) == 84);
}
Thanks! I wonder, why the _r
I think it is the old syntax, meaning
On Wednesday, 2 July 2014 at 14:14:57 UTC, Dicebot wrote:
struct S
{
int opIn_r(int key)
{
return key*2;
}
}
void main()
{
assert((42 in S.init) == 84);
}
Thanks! I wonder, why the _r and lack of documentation?
On Saturday, 28 June 2014 at 20:40:21 UTC, Ary Borenszweig wrote:
This doesn't work:
class Foo {
this() {
this = new Foo;
}
}
Error: Cannot modify 'this'
However you can do this:
class Foo {
this() {
auto p = &this;
*p = new Foo();
}
}
It even changes the value of this!
struct S
{
int opIn_r(int key)
{
return key*2;
}
}
void main()
{
assert((42 in S.init) == 84);
}
Is this possible?
The documentation for std.container lists "in" as an operator in
the container API but only associative arrays actually seem to
support it.
On Wednesday, 2 July 2014 at 13:36:17 UTC, pgtkda wrote:
Is there a similar method as Math.Ceiling in D?
http://msdn.microsoft.com/en-US/en-en/library/zx4t0t48(v=vs.110).aspx
http://dlang.org/phobos/std_math.html#.ceil
Is there a similar method as Math.Ceiling in D?
http://msdn.microsoft.com/en-US/en-en/library/zx4t0t48(v=vs.110).aspx
On Wednesday, 2 July 2014 at 08:58:46 UTC, Rene Zwanenburg wrote:
On Wednesday, 2 July 2014 at 08:39:06 UTC, pgtkda wrote:
Is there a way to get the max size of an integer?
int.max
The same exists for other built-ins and enums.
thank you very much
On Wednesday, 2 July 2014 at 08:39:06 UTC, pgtkda wrote:
Is there a way to get the max size of an integer?
int.max
The same exists for other built-ins and enums.
Is there a way to get the max size of an integer?
27 matches
Mail list logo