Re: Compilation time profiling

2015-10-25 Thread Vladimir Panteleev via Digitalmars-d-learn
On Sunday, 25 October 2015 at 12:21:33 UTC, tired_eyes wrote: On Saturday, 24 October 2015 at 22:16:35 UTC, Vladimir Panteleev wrote: On Saturday, 24 October 2015 at 21:56:05 UTC, tired_eyes wrote: Hi, are there any tools for compilation time profiling? I'm trying to find what part of the code

Re: An annoying compile issue

2015-10-25 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 26 October 2015 at 03:44:31 UTC, WhatMeWorry wrote: First, isn't Vector!(float,3) a template which creates a tuple consisting of float, float, float; so aren't the argument types identical? I'm not familiar with the gl3n library so I'm not sure what their Vector is, but most D temp

Re: An annoying compile issue

2015-10-25 Thread Rikki Cattermole via Digitalmars-d-learn
On 26/10/15 4:44 PM, WhatMeWorry wrote: I'm porting over some C++/glm/openGL code. I've used gl3n for a while now (successfully) to port over glm code, but I've got this pebble in my shoe: glm::mat4 model; model = glm::scale(model, glm::vec3(size, 1.0f)); // size is a vec2 So my D code consi

An annoying compile issue

2015-10-25 Thread WhatMeWorry via Digitalmars-d-learn
I'm porting over some C++/glm/openGL code. I've used gl3n for a while now (successfully) to port over glm code, but I've got this pebble in my shoe: glm::mat4 model; model = glm::scale(model, glm::vec3(size, 1.0f)); // size is a vec2 So my D code consists of: mat4 model; model = model.sc

Re: `clear`ing a dynamic array

2015-10-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, October 25, 2015 17:15:50 Shriramana Sharma via Digitalmars-d-learn wrote: > Jonathan M Davis via Digitalmars-d-learn wrote: > > > Appender really isn't intended to be used as a > > container - just as a way to make appending more efficient or to have an > > output range which is an arr

Re: `clear`ing a dynamic array

2015-10-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, October 25, 2015 16:23:14 Shriramana Sharma via Digitalmars-d-learn wrote: > Thanks all, for your replies. > > Jonathan M Davis via Digitalmars-d-learn wrote: > > > If you want a container rather than a dynamic array - especially if you're > > looking for full reference semantics - then

fwiw - study of traits of popular posts on hacker news

2015-10-25 Thread Laeeth Isharc via Digitalmars-d-learn
Of course it doesn't follow that merely aping the traits of popular posts will produce the same result as actually having the essence of whatever it is that truly makes a post popular. But this was still quite interesting, and it's nice to see people exploring the data. http://www.dkriesel.c

Re: `clear`ing a dynamic array

2015-10-25 Thread Shriramana Sharma via Digitalmars-d-learn
anonymous wrote: >> I presume this means >> http://dlang.org/phobos/std_array.html#.Appender.reserve but >> how `append` is considered an operator is beyond me. > > That sentence doesn't refer to std.array.Appender. `reserve` > means . The append > op

Re: `clear`ing a dynamic array

2015-10-25 Thread anonymous via Digitalmars-d-learn
On Sunday, 25 October 2015 at 11:45:53 UTC, Shriramana Sharma wrote: http://dlang.org/arrays.html#resize says: """Also, you may wish to utilize the phobos reserve function to pre-allocate array data to use with the append operator.""" I presume this means http://dlang.org/phobos/std_array.htm

Re: Compilation time profiling

2015-10-25 Thread tired_eyes via Digitalmars-d-learn
On Saturday, 24 October 2015 at 22:16:35 UTC, Vladimir Panteleev wrote: On Saturday, 24 October 2015 at 21:56:05 UTC, tired_eyes wrote: Hi, are there any tools for compilation time profiling? I'm trying to find what part of the code increases compilation time and don't want to stumble around.

Re: `clear`ing a dynamic array

2015-10-25 Thread Shriramana Sharma via Digitalmars-d-learn
Jonathan M Davis via Digitalmars-d-learn wrote: > Appender really isn't intended to be used as a > container - just as a way to make appending more efficient or to have an > output range which is an array I get the part about Appender helping to make an output range of a regular array, but I'm n

Re: `clear`ing a dynamic array

2015-10-25 Thread Shriramana Sharma via Digitalmars-d-learn
Thanks all, for your replies. Jonathan M Davis via Digitalmars-d-learn wrote: > If you want a container rather than a dynamic array - especially if you're > looking for full reference semantics - then use std.container.array.Array. Hmmm, pardon me but while I'm sure I don't specifically require

Re: Does D's GC release memory back to the OS?

2015-10-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, October 25, 2015 05:49:42 Richard White via Digitalmars-d-learn wrote: > Just wondering if D's GC release memory back to the OS? > The documentation for the GC.minimize > (http://dlang.org/phobos/core_memory.html#.GC.minimize) seems to > imply that it does, > but watching my OS's memory

Re: `clear`ing a dynamic array

2015-10-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, October 25, 2015 09:34:25 Shriramana Sharma via Digitalmars-d-learn wrote: > rsw0x wrote: > > > use std.container.array > > Thanks all for all the recommendations. When would one use > std.array.appender with a built-in array vs std.container.array.Array? What > are the pros and cons on

Re: `clear`ing a dynamic array

2015-10-25 Thread Olivier Pisano via Digitalmars-d-learn
On Sunday, 25 October 2015 at 04:04:29 UTC, Shriramana Sharma wrote: rsw0x wrote: use std.container.array Thanks all for all the recommendations. When would one use std.array.appender with a built-in array vs std.container.array.Array? What are the pros and cons on either side? Appender