Re: ESR on post-C landscape

2017-11-14 Thread bauss via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 04:31:43 UTC, Laeeth Isharc wrote: He mentions D, a bit dismissively. http://esr.ibiblio.org/?p=7724&cpage=1#comment-1912717 Couldn't read that without cringing.

Re: ESR on post-C landscape

2017-11-14 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 04:31:43 UTC, Laeeth Isharc wrote: He mentions D, a bit dismissively. http://esr.ibiblio.org/?p=7724&cpage=1#comment-1912717 I think that the date he mentions in that paragraph (2001) speaks a lot for his argument, i.e. completely outdated.

Re: ESR on post-C landscape

2017-11-14 Thread codephantom via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 16:38:58 UTC, Ola Fosheim Grostad wrote: It [C]is flawed... ESR got that right, not sure how anyone can disagree. Well I 'can' disagree ;-) Is a scalpel flawed because someone tried to use it to screw in a screw? Languages are just part of an evolutionary cha

Re: BinaryHeap as member

2017-11-14 Thread balddenimhero via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 04:13:16 UTC, Era Scarecrow wrote: On Monday, 13 November 2017 at 16:26:20 UTC, balddenimhero wrote: In the course of writing a minimal example I removed more than necessary in the previous pastebin (the passed IntOrder has not even been used). Thus here is the c

Re: NIO+Multithreaded TCPSocket listener, very low cpu utilisation

2017-11-14 Thread kdevel via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 19:57:54 UTC, ade90036 wrote: while(true) { listeningSet.add(listener); if (Socket.select(listeningSet, null, null, dur!"nsecs"(150)) > 0) { Why do you ever timeout? This loop consumes 100 % (a single core) when idle on my machi

Re: NIO+Multithreaded TCPSocket listener, very low cpu utilisation

2017-11-14 Thread kdevel via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 19:57:54 UTC, ade90036 wrote: socket.send("HTTP/1.1 200 OK Server: dland:v2.076.1 Date: Tue, 11 Nov 2017 15:56:02 GMT

NIO+Multithreaded TCPSocket listener, very low cpu utilisation

2017-11-14 Thread ade90036 via Digitalmars-d-learn
Hi Forum, Let's cut the chase, i'm a newby in Dlang. I have 15+ years experience in java and 7+ years experience in C++. I found D very fascinating and the sugar coated syntax very appealing to my style of coding. (groovy like) I've been trying to learn Dland and bring it thought the motio

Re: ESR on post-C landscape

2017-11-14 Thread Joakim via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 04:31:43 UTC, Laeeth Isharc wrote: He mentions D, a bit dismissively. http://esr.ibiblio.org/?p=7724&cpage=1#comment-1912717 Eh, he parrots decade-old anti-D talking points about non-technical, organizational issues and doesn't say anything about the language i

Re: ESR on post-C landscape

2017-11-14 Thread Era Scarecrow via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 06:32:55 UTC, lobo wrote: And I fixed it all right – took me two weeks of struggle. After which I swore a mighty oath never to go near C++ again. ...[snip]" Reminds me of the last time I touched C++. A friend wanted help with the Unreal Engine. While skeptical

Re: ESR on post-C landscape

2017-11-14 Thread Ola Fosheim Grostad via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 11:55:17 UTC, codephantom wrote: The reason he can dismiss D, so easily, is because of his starting premise that C is flawed. As soon as you begin with that premise, you justify searching for C's replacement, which makes it difficult to envsion something like D.

Re: string version of array

2017-11-14 Thread Timoses via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 14:00:54 UTC, Dr. Assembly wrote: On Tuesday, 14 November 2017 at 08:21:59 UTC, Tony wrote: On Tuesday, 14 November 2017 at 07:56:06 UTC, rikki cattermole wrote: Thanks. That flipped function calling syntax definitely takes some getting used to. if you consider

Re: string version of array

2017-11-14 Thread Dr. Assembly via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 08:21:59 UTC, Tony wrote: On Tuesday, 14 November 2017 at 07:56:06 UTC, rikki cattermole wrote: On 14/11/2017 7:54 AM, Tony wrote: Is there an easy way to get the string representation of an array, as would be printed by writeln(), but captured in a string? st

Re: ESR on post-C landscape

2017-11-14 Thread codephantom via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 04:31:43 UTC, Laeeth Isharc wrote: He mentions D, a bit dismissively. http://esr.ibiblio.org/?p=7724&cpage=1#comment-1912717 The reason he can dismiss D, so easily, is because of his starting premise that C is flawed. As soon as you begin with that premise, you

Re: ESR on post-C landscape

2017-11-14 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 06:32:55 UTC, lobo wrote: "[snip]...Then came the day we discovered that a person we incautiously gave commit privileges to had fucked up the games’s AI core. It became apparent that I was the only dev on the team not too frightened of that code to go in. And I f

Re: minElement on array of const objects

2017-11-14 Thread Aurelien Fredouelle via Digitalmars-d-learn
On Monday, 13 November 2017 at 14:28:27 UTC, vit wrote: On Monday, 13 November 2017 at 12:15:26 UTC, Nathan S. wrote: [...] Is Unqual necessary here?: https://github.com/dlang/phobos/blob/master/std/algorithm/searching.d#L1284 https://github.com/dlang/phobos/blob/master/std/algorithm/searching

Re: string version of array

2017-11-14 Thread Tony via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 07:56:06 UTC, rikki cattermole wrote: On 14/11/2017 7:54 AM, Tony wrote: Is there an easy way to get the string representation of an array, as would be printed by writeln(), but captured in a string? struct Foo { int x; } void main() { Foo[]

Re: string version of array

2017-11-14 Thread rikki cattermole via Digitalmars-d-learn
On 14/11/2017 8:16 AM, Andrea Fontana wrote: On Tuesday, 14 November 2017 at 07:56:06 UTC, rikki cattermole wrote: On 14/11/2017 7:54 AM, Tony wrote: Is there an easy way to get the string representation of an array, as would be printed by writeln(), but captured in a string? struct Foo {    

Re: string version of array

2017-11-14 Thread Andrea Fontana via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 07:56:06 UTC, rikki cattermole wrote: On 14/11/2017 7:54 AM, Tony wrote: Is there an easy way to get the string representation of an array, as would be printed by writeln(), but captured in a string? struct Foo { int x; } void main() { Foo[]

Re: string version of array

2017-11-14 Thread rikki cattermole via Digitalmars-d-learn
On 14/11/2017 7:54 AM, Tony wrote: Is there an easy way to get the string representation of an array, as would be printed by writeln(), but captured in a string? struct Foo { int x; } void main() { Foo[] data = [Foo(1), Foo(2), Foo(3)]; import std.conv : text