Re: Slides share: DMesos - Not only a re-implementation of Mesos

2017-07-15 Thread Dsby via Digitalmars-d
On Saturday, 15 July 2017 at 15:57:18 UTC, 鲜卑拓跋枫 wrote: On Friday, 14 July 2017 at 05:07:11 UTC, Dsby wrote: On Monday, 10 July 2017 at 17:29:01 UTC, 鲜卑拓跋枫 wrote: [...] 我也希望能用D做出来。 我们也在研究过raft, akka这些技术。 raft算法的翻译我同事也有个port到D版本的。只是具体什么样,我没参与也没关心。 我们也在上海,我看链接里介绍,你现在也在上海工作,在EMC? 只是不知道你们开始做没?

Re: Slides share: DMesos - Not only a re-implementation of Mesos

2017-07-13 Thread Dsby via Digitalmars-d
On Monday, 10 July 2017 at 17:29:01 UTC, 鲜卑拓跋枫 wrote: Dear all, I am a D-language amateur from China, and just want to share you with a slides from me that post on MesosCon Asia 2017(Beijing):

Re: Beta 2.075.0-b1

2017-06-28 Thread Dsby via Digitalmars-d-announce
On Thursday, 29 June 2017 at 01:44:10 UTC, Walter Bright wrote: On 6/27/2017 12:51 AM, Dsby wrote: what about DIP1000? Is it default? No. When will it be default? 2.076 or 2.077?

Re: Advice wanted on garbage collection of sockets for c++ programmer using D

2017-06-28 Thread Dsby via Digitalmars-d-learn
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

Re: Beta 2.075.0-b1

2017-06-27 Thread Dsby via Digitalmars-d-announce
On Monday, 26 June 2017 at 11:53:57 UTC, Martin Nowak wrote: First beta for the 2.075.0 release. This release comes with various phobos additions, a repackaged std.datetime, configurable Fiber stack guard pages (now also on Posix), and optional precise scanning for the DATA/TLS segment

Re: Garbage collection and closures.

2017-06-19 Thread Dsby via Digitalmars-d-learn
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':

Re: Garbage collection and closures.

2017-06-19 Thread Dsby via Digitalmars-d-learn
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

Re: D now available on Codefights.com

2017-06-14 Thread Dsby via Digitalmars-d-announce
On Wednesday, 14 June 2017 at 01:17:12 UTC, Ivan Kazmenko wrote: Hey, The site https://codefights.com is a place to test and improve your programming skills. The challenges include interview-type problems, shortest code contests, duels with other coders, monthly tournaments, and more. If

Re: Developer positions at Sociomantic Labs

2017-06-12 Thread Dsby via Digitalmars-d-announce
On Monday, 12 June 2017 at 16:54:09 UTC, Joseph Rushton Wakeling wrote: Hello all, I'm happy to announce that we have some new D developer positions on offer at Sociomantic: https://www.sociomantic.com/jobs/d-software-developer-adserving/

Yu(玉) - 0.1.0-b1 : COW String and Vector—— Dlang‘s Toolkit

2017-06-06 Thread Dsby via Digitalmars-d-announce
Add COW string Rebuild Vector Use COW : when is the Value-type and struct don't hasElaborateAssign Use Deep-Copy : when hasElaborateAssign Disable copy: when is Ref-Type and Pointer Change async-socket all CallBack to nothrow Rm yu.array.IAppder add

Re: Phobos 2

2017-06-01 Thread Dsby via Digitalmars-d
On Thursday, 1 June 2017 at 18:40:05 UTC, Brad Anderson wrote: A (surely controversial) idea popped into my head while talking in #d on Freenode. The C++ guys are making an STL2 (the highlight of it being that it is range based). What about taking all the lessons learned from Phobos and

Re: D for BigData: the first BetterC library by Tamediadigital

2017-05-19 Thread Dsby via Digitalmars-d-announce
On Saturday, 25 February 2017 at 14:32:00 UTC, Ilya Yaroshenko wrote: HyperLogLog++ is advanced cardinality estimation algorithm with normal and compressed sparse representations. It can be used to estimate approximate number of unique elements in an unordered set. hll-d [1, 2] is written in

Yu(玉) - 0.0.4 : A Dlang's Toolkit

2017-05-18 Thread Dsby via Digitalmars-d-announce
add Buffer add http 1x parser add shared lib load https://github.com/dushibaiyu/yu/ https://github.com/dushibaiyu/yu/archive/v0.0.4.zip

Re: erro when use core.runtime

2017-05-17 Thread Dsby via Digitalmars-d-learn
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?

Re: erro when use core.runtime

2017-05-17 Thread Dsby via Digitalmars-d-learn
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 ’中:

erro when use core.runtime

2017-05-17 Thread Dsby via Digitalmars-d-learn
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’未定义的引用

Re: Yu(玉) - 0.0.3 : A Dlang's Toolkit in My Used

2017-04-18 Thread Dsby via Digitalmars-d-announce
On Tuesday, 18 April 2017 at 09:24:39 UTC, Dsby wrote: [...] In github : https://github.com/dushibaiyu/yu In dub : http://code.dlang.org/packages/yu

Yu(玉) - 0.0.3 : A Dlang's Toolkit in My Used

2017-04-18 Thread Dsby via Digitalmars-d-announce
algorithm snowflkeId.d : Twitter's Snowflke ID generate algorithm.to generate only ID container : the container base std.experimental.allocator cirularqueue : Cirular Queue Struct Template. vector : Like as C++'s std::vector eventloop : the io(Net) event

Re: Beta 2.074.0-b1

2017-03-25 Thread Dsby via Digitalmars-d-announce
On Friday, 24 March 2017 at 17:35:58 UTC, Martin Nowak wrote: First beta for the 2.074.0 release. This release comes with plenty of phobos additions and a new std.experimental module. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.074.0.html Please report any bugs at

Re: D in China?

2017-03-21 Thread Dsby via Digitalmars-d
On Monday, 20 March 2017 at 12:44:32 UTC, Laeeth Isharc wrote: Hi. I'm responsible for technology for an investment management company with its main offices in Hong Kong and London. We also have a small office in Shenzhen, and we're interested in becoming more involved in the Chinese

Re: What is PostgreSQL driver is most stable?

2017-03-15 Thread Dsby via Digitalmars-d-learn
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

Re: Questionnaire

2017-02-08 Thread Dsby via Digitalmars-d-announce
On Wednesday, 8 February 2017 at 18:27:57 UTC, Ilya Yaroshenko wrote: 1. Why your company uses D? a. D is the best b. We like D c. I like D and my company allowed me to use D d. My head like D e. Because marketing reasons f. Because my company can be more efficient with D for some

Re: GC question

2017-02-03 Thread Dsby via Digitalmars-d-learn
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

Re: RefCounted: conflicting overloads of refCountedPayload()

2017-01-28 Thread Dsby via Digitalmars-d
On Saturday, 28 January 2017 at 21:24:11 UTC, bitwise wrote: On Saturday, 28 January 2017 at 20:14:29 UTC, bitwise wrote: [...] Managed to get a repro working. Commenting out the alias 'X' makes the error go away. If someone can confirm my sanity, I'll file a bug for this. [...] I think

Re: parent class get the subclass object

2017-01-16 Thread Dsby via Digitalmars-d
On Monday, 16 January 2017 at 19:31:50 UTC, Mike Parker wrote: On Monday, 16 January 2017 at 16:31:41 UTC, Brian wrote: No, you don't understand I want to express meaning. other programing language is allow this. Your code more like the old C++. If a high-level programing language or need

Re: SmartRef: The Smart Pointer In D

2017-01-15 Thread Dsby via Digitalmars-d-announce
On Sunday, 15 January 2017 at 17:24:25 UTC, biozic wrote: On Sunday, 15 January 2017 at 15:56:30 UTC, Dsby wrote: and : In https://github.com/dlang/phobos/blob/master/std/typecons.d#L147 ~this() { debug(Unique) writeln("Unique destructor of ", (_p is null)? null: _p);

Re: Android LDC in a Container

2017-01-15 Thread Dsby via Digitalmars-d-announce
On Sunday, 15 January 2017 at 17:40:01 UTC, Andre Pany wrote: Hi, on Dockerhub I published a repository which makes it really easy to develop Android applications using LDC and Joakims work. The repository contains Android 1.1.0 beta from https://github.com/joakim-noah/android/releases and

Re: SmartRef: The Smart Pointer In D

2017-01-15 Thread Dsby via Digitalmars-d-announce
On Sunday, 15 January 2017 at 15:42:19 UTC, Dsby wrote: On Saturday, 14 January 2017 at 17:35:09 UTC, Nordlöw wrote: On Friday, 13 January 2017 at 16:50:37 UTC, Dsby wrote: I write the ref count pointer and the scoped point in D. How do two of these differ from -

Re: SmartRef: The Smart Pointer In D

2017-01-15 Thread Dsby via Digitalmars-d-announce
On Saturday, 14 January 2017 at 17:35:09 UTC, Nordlöw wrote: On Friday, 13 January 2017 at 16:50:37 UTC, Dsby wrote: I write the ref count pointer and the scoped point in D. How do two of these differ from - https://dlang.org/phobos/std_typecons.html#.RefCounted -

SmartRef: The Smart Pointer In D

2017-01-13 Thread Dsby via Digitalmars-d-announce
I write the ref count pointer and the scoped point in D. it just Like cpp's shared_ptr , waek_ptr and unique_ptr . Now, it is Developing. I will write more test before the frist release. And the docs is null. It on github: https://github.com/huntlabs/SmartRef

Re: Making AssertError a singleton

2016-12-12 Thread Dsby via Digitalmars-d
On Tuesday, 13 December 2016 at 03:07:56 UTC, Dsby wrote: On Monday, 12 December 2016 at 17:57:13 UTC, Adam D. Ruppe wrote: On Monday, 12 December 2016 at 16:35:22 UTC, safety0ff wrote: Wouldn't it break chained assertion errors? An Error is unrecoverable anyway, if such a case arises it can

Re: Making AssertError a singleton

2016-12-12 Thread Dsby via Digitalmars-d
On Monday, 12 December 2016 at 17:57:13 UTC, Adam D. Ruppe wrote: On Monday, 12 December 2016 at 16:35:22 UTC, safety0ff wrote: Wouldn't it break chained assertion errors? An Error is unrecoverable anyway, if such a case arises it can always just abort the program immediately. I think all

Re: the best language I have ever met(?)

2016-11-23 Thread Dsby via Digitalmars-d-learn
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

Re: How do we accelerate the development of precise GC, RC and so on?

2016-11-22 Thread Dsby via Digitalmars-d
On Tuesday, 22 November 2016 at 11:20:10 UTC, Jack Applegame wrote: We look forward to sane GC over the years. How do we accelerate the development of precise GC, RC and so on? Maybe we should organize a fundraiser on Kickstarter or somewhere else? I'm not ready to write precise GC, but I'm

Re: [GSoC] Precise GC

2016-10-16 Thread Dsby via Digitalmars-d-announce
On Friday, 14 October 2016 at 03:26:31 UTC, FrankLike wrote: On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan wrote: Hi everyone, I know I'm super late to the party for this, and sorry for that. While my work on the precise GC didn't go as planned, it is closer than it was to be

Re: Beta D 2.071.2-b5

2016-09-22 Thread Dsby via Digitalmars-d-announce
On Wednesday, 14 September 2016 at 12:58:15 UTC, Johan Engelen wrote: On Wednesday, 14 September 2016 at 12:16:51 UTC, Martin Nowak wrote: Fifth and hopefully last beta for the 2.071.2 release. This comes with two more fixes for Issue 16031 and 16460. LDC master is up-to-date with

Re: [GSoC] Precise GC

2016-09-06 Thread Dsby via Digitalmars-d-announce
On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan wrote: Hi everyone, I know I'm super late to the party for this, and sorry for that. While my work on the precise GC didn't go as planned, it is closer than it was to be getting merged. [...] In Mac 32 bit. the test is not pass.

Re: [GSoC] Precise GC

2016-09-01 Thread Dsby via Digitalmars-d-announce
On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan wrote: Hi everyone, I know I'm super late to the party for this, and sorry for that. While my work on the precise GC didn't go as planned, it is closer than it was to be getting merged. [...] wait for merge

Re: @safe fun alayws call @system function?

2016-07-12 Thread Dsby via Digitalmars-d-learn
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

@safe fun alayws call @system function?

2016-07-12 Thread Dsby via Digitalmars-d-learn
How can i call @system function in a @safe function?

Re: IUP, CD, IM, lua interfaces in D.

2016-06-29 Thread Dsby via Digitalmars-d-announce
On Tuesday, 28 June 2016 at 10:17:10 UTC, mogu wrote: Now IUP library collections' interfaces accomplished. IUP(3.18): http://code.dlang.org/packages/iupd IM(3.10): http://code.dlang.org/packages/imd CD(5.9):http://code.dlang.org/packages/cdd lua(5.3.3):

Re: Telegram Supergroup as an alternative to IRC

2016-06-17 Thread Dsby via Digitalmars-d
On Thursday, 16 June 2016 at 14:33:07 UTC, Dechcaudron wrote: Hey there community, I've been using D for the last couple of months already. I usually have to drop by the IRC to ask some fast questions and so on, but IRC and its clients' limitations make it kind of a pain to communicate

Re: We want to start the 'Programming In D 'in Chinese, do you have any good suggestions?

2016-06-12 Thread Dsby via Digitalmars-d
On Friday, 10 June 2016 at 20:24:47 UTC, Meta wrote: On Friday, 10 June 2016 at 14:26:31 UTC, FrankLike wrote: Hi,everyone: The 'Programming In D' is a good book for new D coders,we want to start it in Chinese, do you have any good suggestions? Thank you.

About GC: The Future of Rust : GC integration

2016-06-07 Thread Dsby via Digitalmars-d
http://rustaceans.cologne/2016/06/06/rust-anniversary-part-2.html in sides 3. : The Future of Rust in the last 2 pages: •GC integration In rust, it will add the GC integration. but in our D, many people want to kill the GC. It like a joke.

Re: Andrei's list of barriers to D adoption

2016-06-07 Thread Dsby via Digitalmars-d
On Tuesday, 7 June 2016 at 08:05:58 UTC, Russel Winder wrote: On Mon, 2016-06-06 at 16:56 +, Wyatt via Digitalmars-d wrote: [...] So instead of debating this endlessly, I think this is about the tenth time this has come up in the last two years, why doesn't a group of people who know

Re: Beta D 2.071.1-b2

2016-06-05 Thread Dsby via Digitalmars-d-announce
On Friday, 3 June 2016 at 16:16:27 UTC, Johan Engelen wrote: On Monday, 30 May 2016 at 09:24:21 UTC, Johan Engelen wrote: On Sunday, 29 May 2016 at 21:53:23 UTC, Martin Nowak wrote: Second beta for the 2.071.1 release. http://dlang.org/download.html#dmd_beta

DIP74 and precise GC

2016-05-21 Thread Dsby via Digitalmars-d
I look the DIP in the wiki: http://wiki.dlang.org/DIP74 and in GSOC ,https://forum.dlang.org/thread/jcfwcdvvfytdkjrpd...@forum.dlang.org which will be come true nearest。

Re: D equivalent of C++ bind ?

2016-05-16 Thread Dsby via Digitalmars-d-learn
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

Re: Help test Google flatbuffers

2016-05-15 Thread Dsby via Digitalmars-d
On Saturday, 14 May 2016 at 15:25:58 UTC, Brian wrote: Project: https://github.com/putao-dev/google-flatbuffers Pull address: https://github.com/google/flatbuffers/pull/3856 dub project: http://code.dlang.org/packages/flatbuffers Great!

Re: Async or event library

2016-05-12 Thread Dsby via Digitalmars-d-learn
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

Re: D equivalent of C++ bind ?

2016-05-12 Thread Dsby via Digitalmars-d-learn
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.

Re: D equivalent of C++ bind ?

2016-05-12 Thread Dsby via Digitalmars-d-learn
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

Re: The end of curl (in phobos)

2016-05-06 Thread Dsby via Digitalmars-d
On Friday, 6 May 2016 at 08:32:03 UTC, Robert burner Schadek wrote: As discussed yesterday at DConf, curl in phobos must go. The plan is as follows. 1. undocument everything curl related in may 2016 2. deprecate everything curl related in may 2017 3. delete everything curl related in may 2018

Re: Async or event library

2016-05-05 Thread Dsby via Digitalmars-d-learn
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.

Re: GSoC 2016 - Precise GC

2016-05-03 Thread Dsby via Digitalmars-d-announce
On Monday, 2 May 2016 at 15:29:15 UTC, Jeremy DeHaan wrote: Hi everyone! I'm a little late to the party as far as my announcement goes, but I have been busy reading code and doing research for my project. [...] Great!

How can I save a class use the RedBlackTree?

2016-05-02 Thread Dsby via Digitalmars-d-learn
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());

std.signals Can not connect a delegate without in Object

2016-04-29 Thread Dsby via Digitalmars-d-learn
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();

Re: Whitch can replace std::bind/boost::bind ?

2016-04-22 Thread Dsby via Digitalmars-d-learn
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

Re: about destroy and delete.

2016-04-21 Thread Dsby via Digitalmars-d
On Wednesday, 20 April 2016 at 09:00:41 UTC, Daniel Kozak wrote: On Wednesday, 20 April 2016 at 08:10:15 UTC, Dsby wrote: I see https://dlang.org/deprecate.html#delete ... so, I want to know why don't destroy direct printf ? if you call destroy on struct pointer it is same as assign null to

Re: about destroy and delete.

2016-04-20 Thread Dsby via Digitalmars-d
And ,will destroy mark the memory in GC to be free?

about destroy and delete.

2016-04-20 Thread Dsby via Digitalmars-d
I see https://dlang.org/deprecate.html#delete The delete will be removeed, when will be deprecate? and i test destroy/GC.free and delte in struct, the value is difference; struct Struct { string value = "struct"; ~this() { writeln(value); } } void main() { auto

Re: How about use Gc as a big memory pool?

2016-04-08 Thread Dsby via Digitalmars-d-learn
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

How about use Gc as a big memory pool?

2016-04-07 Thread Dsby via Digitalmars-d-learn
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

Can i get a array Slicing where the top from?and how?

2016-03-31 Thread Dsby via Digitalmars-d-learn
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

Re: Whitch can replace std::bind/boost::bind ?

2016-03-19 Thread Dsby via Digitalmars-d-learn
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 = ",

Whitch can replace std::bind/boost::bind ?

2016-03-18 Thread Dsby via Digitalmars-d-learn
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.

Will D support WebAssembly?

2016-03-18 Thread Dsby via Digitalmars-d
Chrome Canary、Firefox Nightly and Microsoft Edge can use WebAssembly。 WebAssembly : https://en.wikipedia.org/wiki/WebAssembly

Re: is module ( std.experimental.logger) thread-safe.

2016-03-10 Thread Dsby via Digitalmars-d-learn
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

is module ( std.experimental.logger) thread-safe.

2016-03-06 Thread Dsby via Digitalmars-d-learn
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?

2016-01-30 Thread Dsby via Digitalmars-d-learn
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

Re: Use the D dylib in my C++ program,when the D's GC(in the dylib runtime) run. will not my program stop?

2016-01-30 Thread Dsby via Digitalmars-d-learn
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

Re: Use the D dylib in my C++ program,when the D's GC(in the dylib runtime) run. will not my program stop?

2016-01-30 Thread Dsby via Digitalmars-d-learn
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.

Re: D vs Rust

2016-01-30 Thread Dsby via Digitalmars-d
On Thursday, 28 January 2016 at 22:30:51 UTC, nbro wrote: [...] I retransmission this post in rust's user-forum. It is url: https://users.rust-lang.org/t/rust-vs-dlang-i-want-more-experienced/4472 there have more point.

Why is it a memory ERRO.

2016-01-29 Thread Dsby via Digitalmars-d-learn
the Code: class MyClass { this(){ by = new ubyte[1]; ++i; } ~this(){ GC.free(by.ptr); by = null; writeln("free"); } void show(){ writeln(i); };

Re: Why is it a memory ERRO.

2016-01-29 Thread Dsby via Digitalmars-d-learn
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"); }

Re: Why is it a memory ERRO.

2016-01-29 Thread Dsby via Digitalmars-d-learn
Ok.Thank you. and i want to know how to know when the GC start runing?

How can i track the GC when it's runing?

2016-01-25 Thread Dsby via Digitalmars-d-learn
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?