Yes, that error is caused by a bug of
BitArray(https://issues.dlang.org/show_bug.cgi?id=13806).
Having "init" function broke template constraints of
"chain"(and must break dozen of other templates).
pragma(msg, ElementType!(BitArray[])) // prints 'pure nothrow
void(bool[] ba)' - ElementType u
thanks,you are right.
window console show chinese char is not right,
so i try to add this code:
"
extern(C) int setlocale(int, char*);
static this()
{
fwide(core.stdc.stdio.stdout, 1);
setlocale(LC_CTYPE, cast(char*)"china");
}
"
it's looks like solve the problem,but caused another proble
On Saturday, 24 January 2015 at 00:13:34 UTC, Laeeth Isharc wrote:
Hi.
Should the following code work?
Yes, that error is caused by a bug of
BitArray(https://issues.dlang.org/show_bug.cgi?id=13806). Having
"init" function broke template constraints of "chain"(and must
break dozen of other
To avoid confusion, the below is the code that fits the error
message:
import std.bitmanip;
import std.stdio;
import std.array;
import std.range:chain;
void test()
{
int[] a=[1,2,3,4,5];
int[] b=[5,4,3,2,1];
int[] c = chain(a,b).array; // chain two arrays of int
Hi.
Should the following code work?
import std.bitmanip;
import std.stdio;
import std.array;
import std.range:chain;
void test()
{
int[] a=[1,2,3,4,5];
int[] b=[5,4,3,2,1];
int[] c = chain(a,b).array; // chain two arrays of int
writefln("%s",c);
}
void test2()
{
On Sunday, 28 July 2013 at 16:57:54 UTC, Gary Willoughby wrote:
What D related (or interesting development based) twitter
accounts do you guys follow? I'm pretty new to twitter and
trying to follow accounts that i find interesting.
Just remembered when reading this:
http://www.viva64.com/en/b
On Friday, 23 January 2015 at 21:25:01 UTC, Nordlöw wrote:
On Friday, 23 January 2015 at 10:13:43 UTC, Joakim wrote:
InvalidMemoryOperationError generally means that you are
performing certain disallowed memory operations during a full
garbage collection, such as allocating while the gc is runn
On Friday, 23 January 2015 at 10:13:43 UTC, Joakim wrote:
InvalidMemoryOperationError generally means that you are
performing certain disallowed memory operations during a full
garbage collection, such as allocating while the gc is running.
If my app is single-threaded this cannot happen then.
On Friday, 23 January 2015 at 17:32:09 UTC, seany wrote:
Hello
I read this page, but I still have questions :
http://forum.dlang.org/thread/fzbaxwcrbztqedqgm...@forum.dlang.org#post-mailman.1142.1332716016.4860.digitalmars-d:40puremagic.com
I also read this :
http://stackoverflow.com/questio
Hello
I read this page, but I still have questions :
http://forum.dlang.org/thread/fzbaxwcrbztqedqgm...@forum.dlang.org#post-mailman.1142.1332716016.4860.digitalmars-d:40puremagic.com
I also read this :
http://stackoverflow.com/questions/1510989/can-c-be-compiled-into-platform-independent-cod
Currently I'm using dub for the first time and I've run into two
problems so far.
1) I have defined buildTypes in dub.json, as well as subPackages.
However, I want to always build all subPackages in release mode,
regardless of the --build option I'm using to build the main
program. I'm not cl
I tried:
--
import std.stdio, std.algorithm;
auto unique(){
bool[int] c;
return (int a){
if (a in c)
return false;
else{
c[a] = true;
return true;
}
};
}
void main()
{
[1, 5, 5, 2, 1, 5, 6, 6].filter!(unique()).writeln;
On 1/23/15 4:44 AM, ixid wrote:
On Thursday, 22 January 2015 at 16:41:49 UTC, Russel Winder wrote:
Playing with factorial implementations, as you do. I had a D
implementation using ulong. Not sensible obviously since overflow is a
bit of a problem. But the code worked, as did the tests. Now conv
On 1/22/15 10:20 PM, mzf wrote:
i wrote a test code:
void worker(int firstNumber)
{
Thread.sleep(1.msecs);
}
void main()
{
foreach (i; 1 .. 1000) {
spawn(&worker, i );
writeln(i);
}
thread_joinAll();
writeln("ok");
}
sometimes it's ok,sometimes
On Wednesday, 21 January 2015 at 12:00:47 UTC, Nordlöw wrote:
My executable throws as
core.exception.InvalidMemoryOperationError@(0)
when compiled with DMD git master.
I get no stack trace in GDB.
What to do?
InvalidMemoryOperationError generally means that you are
performing certain d
On Thursday, 22 January 2015 at 16:41:49 UTC, Russel Winder wrote:
Playing with factorial implementations, as you do. I had a D
implementation using ulong. Not sensible obviously since
overflow is a
bit of a problem. But the code worked, as did the tests. Now
converting
to BigInt and…
The sta
16 matches
Mail list logo