Re: Idea/request: If you have a DUB project, add a code.dlang.org badge to README

2014-12-30 Thread jklp via Digitalmars-d-learn
On Tuesday, 30 December 2014 at 21:12:38 UTC, Kiith-Sa wrote: A few weeks/months ago someone here mentioned that it'd be good if DUB projects linked to code.dlang.org to help anyone who runs into such a project quickly discover other D projects. MAny GitHub projects have "badges"/"shields" on

Re: Idea/request: If you have a DUB project, add a code.dlang.org badge to README

2014-12-30 Thread jklp via Digitalmars-d-learn
On Tuesday, 30 December 2014 at 21:23:53 UTC, Kiith-Sa wrote: On Tuesday, 30 December 2014 at 21:19:52 UTC, jklp wrote: On Tuesday, 30 December 2014 at 21:12:38 UTC, Kiith-Sa wrote: A few weeks/months ago someone here mentioned that it'd be good if DUB projects linked to code.dlang.org to help

Re: getting all children classes in program

2015-01-03 Thread jklp via Digitalmars-d-learn
Off Topic ! But in the same way: --- static string[] IDs; ptrdiff_t getClassID(ClassType, ClassBase)() if ((is(ClassType == class)) && (is(ClassBase == class))) { import std.algorithm; if (!is(ClassType : ClassBase)) return -1; else { auto classTypeString = ClassT

Re: Why is one d file compiled into two files object file & executable.

2015-02-11 Thread jklp via Digitalmars-d-learn
On Wednesday, 11 February 2015 at 05:08:16 UTC, Venkat Akkineni wrote: Hi I am coming from Java. What is the purpose of an object file & why is it generated at compile time in addition to an executable. I know C generates an object file too, but I don't know what the use is. Please point me

Re: Template type deduction and specialization

2015-05-20 Thread jklp via Digitalmars-d-learn
On Wednesday, 20 May 2015 at 06:31:13 UTC, Mike Parker wrote: I don't understand why this behaves as it does. Given the following two templates: ``` void printVal(T)(T t) { writeln(t); } void printVal(T : T*)(T* t) { writeln(*t); } ``` I find that I actually have to explicitly

Re: problem with gc?

2015-05-27 Thread jklp via Digitalmars-d-learn
On Wednesday, 27 May 2015 at 05:48:13 UTC, zhmt wrote: I am writing a echoclient, as below: Ptr!Conn conn = connect("127.0.0.1",8881); ubyte[100] buf; for(int i=0; iWhen it loops about more than 10 times,the throughput will fall from 6request/second to 26request/second. If the code ch

Re: Writeln does not prints if array has more than 500 elements

2015-06-10 Thread jklp via Digitalmars-d-learn
On Wednesday, 10 June 2015 at 21:49:56 UTC, kerdemdemir wrote: ==> NOTHİNG PRINTS What am I doing wrong? Which OS, which terminal ?

Re: Defining constant values in struct

2015-06-16 Thread jklp via Digitalmars-d-learn
On Tuesday, 16 June 2015 at 21:17:37 UTC, tcak wrote: As far as I known, when I define a string with enum and it is used at different parts of code, that string is repeated again and again in executable file instead of passing a pointer to string. So, using enum with string doesn't seem like a

Re: access violation With dll?

2015-07-16 Thread jklp via Digitalmars-d-learn
On Thursday, 16 July 2015 at 17:04:09 UTC, Taylor Hillegeist wrote: Beleive it or not the code below does work. However I get an access violation after every run? any Ideas why? +Code to Run DLL function+++ import core.runtime; import std.stdi

Re: access violation With dll?

2015-07-16 Thread jklp via Digitalmars-d-learn
On Thursday, 16 July 2015 at 17:22:50 UTC, jklp wrote: On Thursday, 16 July 2015 at 17:04:09 UTC, Taylor Hillegeist wrote: [...] Your proto is wrong. Your forgot the FFI convention (__cdecl = extern(C)). Try this instead: --- extern(C) alias Proto = void function(char*, int); Proto func =