On Sunday, 31 January 2016 at 05:29:06 UTC, Mike Parker wrote:
On Sunday, 31 January 2016 at 05:28:02 UTC, Mike Parker wrote:
need to call core.thread.attach_this [1] so that runtime is
Sorry, that's core.thread.thread_attachThis
ok。thanks.
On Sunday, 31 January 2016 at 05:28:02 UTC, Mike Parker wrote:
need to call core.thread.attach_this [1] so that runtime is
Sorry, that's core.thread.thread_attachThis
On Sunday, 31 January 2016 at 03:45:01 UTC, Dsby wrote:
Thanks, if I use the D dylib,I should run " rt_init(); " in
every thread which i used the D dylib?
No. rt_init only needs to be called once for the process. You
need to call core.thread.attach_this [1] so that runtime is aware
of your
On Sunday, 31 January 2016 at 03:13:46 UTC, Adam D. Ruppe wrote:
On Sunday, 31 January 2016 at 02:58:28 UTC, Andrew Edwards
wrote:
But it cannot be that simple, so what am I missing?
I'm guessing the macro was there in C to silence compiler
warnings about not using a return value. So I think
On Saturday, 30 January 2016 at 16:06:37 UTC, Chris Wright wrote:
On Sat, 30 Jan 2016 14:41:18 +, Dsby wrote:
Use the D dylib in my C++ program,when the D's GC(in the dylib
runtime) run. will not my program stop?
The GC will stop every thread it knows about. If you have a C++
thread that
On Sunday, 31 January 2016 at 02:58:28 UTC, Andrew Edwards wrote:
But it cannot be that simple, so what am I missing?
I'm guessing the macro was there in C to silence compiler
warnings about not using a return value. So I think your
translation is ok:
NOTUSED(somefunction());
still cal
If I understand correctly, this piece of code:
enum NOTUSED(v) do { (void)(1 ? (void)0 : ( (void)(v) ) ); }
while(0)
can be converted to the following in D:
void notUsed(T)(T v) { return cast(void)0; };
since it always returns cast(void)0 regardless of the input.
But it cannot be tha
On Fri, 29 Jan 2016 18:58:17 -0500, Steven Schveighoffer wrote:
>>> Note the version identifiers BigEndian and LittleEndian can be used to
>>> compile the correct code.
>>
>> This solution is of no use to me as I don't want to change the endianess in
>> general.
>
> What I mean is that you can anno
On Sat, 30 Jan 2016 22:02:10 +, Enjoys Math wrote:
> On Saturday, 30 January 2016 at 21:52:20 UTC, Enjoys Math wrote:
>>
>> class A { static B b; } class B {}
>>
>> doing b = new B() does NOT work.
>>
>> Nor could I create a this() {} at module level
>
> More info:
>
> B : A
>
> so I can't
On Saturday, 30 January 2016 at 21:52:20 UTC, Enjoys Math wrote:
class A { static B b; } class B {}
doing b = new B() does NOT work.
Nor could I create a this() {} at module level
More info:
B : A
so I can't do
class A {
this () {
if (b is null) {
b = new B();
}
}
}
Sin
On 30.01.2016 22:52, Enjoys Math wrote:
class A { static B b; } class B {}
doing b = new B() does NOT work.
Nor could I create a this() {} at module level
It works when you make b const/immutable:
class A {static immutable B b = new B;} class B {}
If you want/need b to be mutable, you can
class A { static B b; } class B {}
doing b = new B() does NOT work.
Nor could I create a this() {} at module level
On Saturday, 30 January 2016 at 13:37:43 UTC, Kagamin wrote:
Alias templates require stack pointer, init probably has it set
to null.
Try this:
FooType foo = FooType();
Yes, that fixed it. Interesting.
On Saturday, 30 January 2016 at 15:57:49 UTC, Griffon26 wrote:
On Saturday, 30 January 2016 at 15:12:26 UTC, Andrew wrote:
foreach(line; pipesLs.stdout.byLine)
pipesSort.stdin.writeln(line);
Because you write sort's input first and read its output later,
it might end up blocking if ls g
On Sat, 30 Jan 2016 14:41:18 +, Dsby wrote:
> Use the D dylib in my C++ program,when the D's GC(in the dylib runtime)
> run. will not my program stop?
The GC will stop every thread it knows about. If you have a C++ thread
that you want to run while the GC is running, you can get that by not
On Saturday, 30 January 2016 at 15:12:26 UTC, Andrew wrote:
foreach(line; pipesLs.stdout.byLine)
pipesSort.stdin.writeln(line);
Because you write sort's input first and read its output later,
it might end up blocking if ls generates too much data. The
output pipe of sort will fill up, c
Hi,
I'd like to run a shell command which involves piping one thing
into another and then processes the output line by line, i.e.
something like "ls -l | sort -k5,5n"
What I've come up so far with is:
import std.process;
import std.stdio;
void main(){
auto pipesLs = pipeProcess(["ls", "-l
Use the D dylib in my C++ program,when the D's GC(in the dylib
runtime) run. will not my program stop?
My lib.so is writed in D, and I use the GC.and then I am used the
dll in my program that is writed in C++.
I want to know when the GC(in lib.so's runtime) start runing,
will my program be stop
Alias templates require stack pointer, init probably has it set
to null.
Try this:
FooType foo = FooType();
On Saturday, 30 January 2016 at 00:16:21 UTC, Ali Çehreli wrote:
> https://issues.dlang.org/show_bug.cgi?id=15623
As I noted on the bug report, they are work when moved from
module scope to inside a function (e.g. main()). At least
there's that workaround...
Ali
Thanks a lot! Now I can con
On Friday, 29 January 2016 at 23:44:56 UTC, Basile B. wrote:
Haven't you seen my answer about constraint ?
If you put a constraint on your function template then invalid
instantiations are rejected. I mean... this language feature is
not just ornamental...
What do you think constraints are u
On Saturday, 30 January 2016 at 01:17:13 UTC, Mike Parker wrote:
On Friday, 29 January 2016 at 19:46:40 UTC, Johannes Pfau wrote:
Now on windows, things are more complicated. First of all, I
can't seem
to simply use "libs": ["foo"] as the linker won't find the C
import .lib file. Then apparent
Am Sat, 30 Jan 2016 01:17:13 +
schrieb Mike Parker :
> On Friday, 29 January 2016 at 19:46:40 UTC, Johannes Pfau wrote:
>
> > Now on windows, things are more complicated. First of all, I
> > can't seem
> > to simply use "libs": ["foo"] as the linker won't find the C
> > import .lib file. The
On Friday, 29 January 2016 at 12:00:25 UTC, Pavel wrote:
Hello!
Is there any debuging support for Intelij Idea's D plugin?
Thanks!
Currently only XamarinStudio/MonoDevelop and DlangIDE allow
debugging on Linux through GDB.
On Windows VisaulD provides debugging support for Visual Studio.
On Saturday, 30 January 2016 at 05:50:33 UTC, Dsby wrote:
Ok.Thank you.
and i want to know how to know when the GC start runing?
See also http://dlang.org/phobos/core_memory
25 matches
Mail list logo