On Tuesday, 27 June 2017 at 09:54:19 UTC, John Burton wrote:
I'm coming from a C++ background so I'm not too used to garbage
collection and it's implications. I have a function that
creates a std.socket.Socket using new and connects to a tcp
server, and writes some stuff to it. I then
On Monday, 19 June 2017 at 09:10:16 UTC, Dsby wrote:
On Saturday, 17 June 2017 at 17:15:50 UTC, Adam D. Ruppe wrote:
On Saturday, 17 June 2017 at 14:19:34 UTC, ANtlord wrote:
[...]
Where the variable is defined that is referenced in the
closure.
So:
[...]
if the uses parma is 'scope':
On Saturday, 17 June 2017 at 17:15:50 UTC, Adam D. Ruppe wrote:
On Saturday, 17 June 2017 at 14:19:34 UTC, ANtlord wrote:
[...]
Where the variable is defined that is referenced in the closure.
So:
[...]
if the uses parma is 'scope':
void uses(scope void delegate() dg);
will it be not
I am in openSUSE.
I see the code in runtime.
it is only support Windows in default.
in posix only version (Shared) is will build.
why?
On Thursday, 18 May 2017 at 04:53:36 UTC, Dsby wrote:
Linking...
../../.dub/build/library-debug-linux.posix-x86_64-dmd_2073-368A963AFD76168526BD99BBB313FD4B/libyu.a(runtime_a21_4e7.o):在函数‘_D4core7runtime7Runtime17__T11loadLibraryZ11loadLibraryFxAaZPv
’中:
Linking...
../../.dub/build/library-debug-linux.posix-x86_64-dmd_2073-368A963AFD76168526BD99BBB313FD4B/libyu.a(runtime_a21_4e7.o):在函数‘_D4core7runtime7Runtime17__T11loadLibraryZ11loadLibraryFxAaZPv
’中:
/usr/include/dmd/druntime/import/core/runtime.d:222:对‘rt_loadLibrary’未定义的引用
On Tuesday, 14 March 2017 at 16:24:31 UTC, Paolo Invernizzi wrote:
On Tuesday, 14 March 2017 at 13:32:31 UTC, Suliman wrote:
On Tuesday, 14 March 2017 at 13:21:39 UTC, Paolo Invernizzi
wrote:
On Tuesday, 14 March 2017 at 13:13:31 UTC, Suliman wrote:
[...]
I'm using ddb [1], a full-D
On Friday, 3 February 2017 at 11:36:26 UTC, osa1 wrote:
On Friday, 3 February 2017 at 10:49:00 UTC, Kagamin wrote:
Leaks are likely in 32-bit processes and unlikely in 64-bit
processes. See e.g.
https://issues.dlang.org/show_bug.cgi?id=15723
This looks pretty bad. I think I'll consider
On Friday, 18 November 2016 at 17:54:52 UTC, Igor Shirkalin wrote:
The simpler - the better.
After reading "D p.l." by A.Alexandrescu two years ago I have
found my past dream. It's theory to start with. That book
should be read at least two times especially if you have
On Tuesday, 12 July 2016 at 09:17:37 UTC, ag0aep6g wrote:
On 07/12/2016 11:09 AM, Dsby wrote:
How can i call @system function in a @safe function?
You can't. You can mark the @safe function @trusted [1]
instead. @trusted functions are considered memory-safe by the
compiler and can be called
How can i call @system function in a @safe function?
On Monday, 16 May 2016 at 15:11:26 UTC, chmike wrote:
On Thursday, 12 May 2016 at 10:38:37 UTC, Dsby wrote:
[...]
Thank you. Would you agree to help me understand it ?
The only thing I don't understand is why the function template
argument is defined as T and the argument as auto ref T
On Tuesday, 10 May 2016 at 13:34:36 UTC, chmike wrote:
vibed uses libevent, a C library.
The discussion is regarding a possible pure D equivalent of
libevent.
libasync is an interesting proposal but it is apparently slower
than libevent. I don't know the current status because vibed
improved
On Tuesday, 10 May 2016 at 15:33:03 UTC, chmike wrote:
Thanks. This does the job but it's not as concise.
The std.functional.partial can not use in runtime, only on
complier time.
and it can not bind args that more than one.
On Tuesday, 10 May 2016 at 09:39:53 UTC, chmike wrote:
Is there an equivalent in D of the C++11 std.bind template
class
[http://en.cppreference.com/w/cpp/utility/functional/bind] ?
Here is a blog post showing different examples of its use
On Thursday, 5 May 2016 at 08:19:26 UTC, chmike wrote:
Hello I have seen the wiki page
https://wiki.dlang.org/Event_system and would like to know the
current status. Is there a working group for this subject ?
This is a topic I'm interested in and did some modest work on
some years ago.
this is the test Code:
import std.container.rbtree;
import std.stdio;
class TClass
{
int i;
}
void main()
{
RedBlackTree!(TClass) list = new RedBlackTree!(TClass)();
auto t = new TClass();
list.insert(t);
writeln("The rbtree length is ",list.length());
import std.signals;
import std.stdio;
class hh
{
mixin Signal!();
void haha(){emit();}
}
class ff
{
void show()
{
writeln("ff show");
}
}
void main()
{
auto h = new hh();
void show()
{
writeln("main show");
}
auto f = new ff();
On Friday, 18 March 2016 at 17:24:27 UTC, Ali Çehreli wrote:
On 03/18/2016 03:50 AM, Dsby wrote:
foreach (i ; 0..4) {
auto th = new Thread(delegate(){listRun(i);});//this is
erro
_thread[i]= th;
th.start();
}
void listRun(int i)
{
writeln("i = ", i); // the value is
On Friday, 8 April 2016 at 05:31:10 UTC, Olivier Pisano wrote:
On Friday, 8 April 2016 at 03:27:04 UTC, Dsby wrote:
when the soft start, call GC.disable().
use "new " create a class , struct or a array. and use
destory(T/void *) to call the ~this(), then GC.free to free
the memory, and use
when the soft start, call GC.disable().
use "new " create a class , struct or a array. and use
destory(T/void *) to call the ~this(), then GC.free to free the
memory, and use RAII in class or Struct.
And user the Timer, or in some where to call : GC.enable(),
GC.collect(), GC.disable();
In
Like this:
ubyte[] fun()
{
ubyte[] str = cast(ubyte[])"hello world";
ubyte[] by = Mallocator.instance.allocate(str.length);
by[] = str[];
return by[5..$];
}
void mian()
{
ubyte[] aa = fun();
// i want free the aa's momeny.
//Mallocator.instance.deallocate(aa);// it is
On Friday, 18 March 2016 at 11:09:37 UTC, Atila Neves wrote:
On Friday, 18 March 2016 at 10:50:34 UTC, Dsby wrote:
foreach (i ; 0..4) {
auto th = new Thread(delegate(){listRun(i);});//this is erro
_thread[i]= th;
th.start();
}
void listRun(int i)
{
writeln("i = ",
foreach (i ; 0..4) {
auto th = new Thread(delegate(){listRun(i);});//this is erro
_thread[i]= th;
th.start();
}
void listRun(int i)
{
writeln("i = ", i); // the value is not(0,1,2,3), it all is
2.
}
I want to know how to use it like std::bind.
On Thursday, 10 March 2016 at 23:56:14 UTC, ZombineDev wrote:
On Sunday, 6 March 2016 at 09:54:49 UTC, Dsby wrote:
I want to use the filelogger to my application.
is the sharedLog() global and thread-safe.
Yes, `FileLogger` internally uses `lockingTextWriter`, so it
should be safe to call
I want to use the filelogger to my application.
is the sharedLog() global and thread-safe.
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
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
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.
the Code:
class MyClass
{
this(){
by = new ubyte[1];
++i;
}
~this(){
GC.free(by.ptr);
by = null;
writeln("free");
}
void show(){
writeln(i);
};
On Friday, 29 January 2016 at 12:43:53 UTC, Dsby wrote:
the Code:
class MyClass
{
this(){
by = new ubyte[1];
++i;
}
~this(){
GC.free(by.ptr);
by = null;
writeln("free");
}
Ok.Thank you.
and i want to know how to know when the GC start runing?
I want to know How can i track the GC when it's runing?
And Which algorithm is D's GC used,only Scan-Mark?
33 matches
Mail list logo