Massif (and valgrind in general) is a nice tool and using it I tried to
investigate where memory leaks. I found that more than 50% of heap
consumed by unknown code. How can I get what those symbols is? May be
there is some option to hint valgrind where to find symbols or may be I
should rebuild
On Saturday, 9 March 2013 at 23:40:25 UTC, Zhenya wrote:
Although of course I would want to know what's wrong with
constrait,because it protect doArray against incorrect using.
I don't worry about effiency very much,I just wanted to right
n-dimensional tree of intervals.And for doing it I needed
Although of course I would want to know what's wrong with
constrait,because it protect doArray against incorrect using.
I don't worry about effiency very much,I just wanted to right
n-dimensional tree of intervals.And for doing it I needed
n-dimensional array with opIndex like it.
On Saturday, 9 March 2013 at 23:05:56 UTC, Ivan Kazmenko wrote:
this code fails with message:NDimensionalArray.doIndex(Array)
if (is(Array _ : NDimensionalArrayType!(T,s),const(int[]) s))
cannot deduce template function from argument types
!()(int[2u][2u],const(int[]))
Tell me please,am I wro
On 03/09/2013 10:35 AM, Andrea Fontana wrote:
...
this works. Is this:
bool[typeof(_fun((ElementType!Range).init))] mySet;
the right way?
It's ok, but the redundant parentheses around the element type are
confusing.
this code fails with message:NDimensionalArray.doIndex(Array)
if (is(Array _ : NDimensionalArrayType!(T,s),const(int[]) s))
cannot deduce template function from argument types
!()(int[2u][2u],const(int[]))
Tell me please,am I wrong?
And if yes,what should I change to make it work?
I'm no D e
template NDimensionalArrayType(T,alias size)
I think your use of "alias size" is incorrect.
See http://dlang.org/declaration.html
--rt
Andrei Alexandrescu:
Yah,
There are 3 problems:
- In a successive post I have also added a template constraint,
so Range is an InputRange.
- firstDistinct() packs two behaviours that are better kept
separated, it's like a takeDistinct. It's better to remove the
final take, and return all di
On 3/8/13 1:34 PM, Chris Cain wrote:
On Friday, 8 March 2013 at 18:17:22 UTC, bearophile wrote:
auto firstDistinct(Range)(Range r, in size_t n) {
bool[ForeachType!Range] mySet;
return r.filter!((k) {
if (k in mySet)
return false;
mySet[k] = true;
return true;
}).take(n);
}
I have to say, tha
Andrea Fontana:
Maybe two versions (filter and cachedFilter) or a bool template
param?
In the meantime I have filed the problem, I hope Andrei will take
a look:
http://d.puremagic.com/issues/show_bug.cgi?id=9674
Bye,
bearophile
Andrea Fontana:
Is this:
bool[typeof(_fun((ElementType!Range).init))] mySet;
the right way?
I don't know if that's the best way, but I think it's OK. (I
think it should even go in the D wiki, so if it's not the best to
do it, someone will improve it.)
Bye,
bearophile
Hi!
this code fails with message:NDimensionalArray.doIndex(Array) if
(is(Array _ : NDimensionalArrayType!(T,s),const(int[]) s)) cannot
deduce template function from argument types
!()(int[2u][2u],const(int[]))
Tell me please,am I wrong?
And if yes,what should I change to make it work?
templ
On Friday, 8 March 2013 at 22:59:23 UTC, Namespace wrote:
Wow, very large. I'm going to read this tomorrow in a rested
state in more detail. But it arouses my interest to write
something yourself from scratch.
But a quick question: Why is the internal array in the separate
struct 'Data' encapsu
On Saturday, 9 March 2013 at 09:32:43 UTC, Andrea Fontana wrote:
On Saturday, 9 March 2013 at 09:13:26 UTC, Andrea Fontana wrote:
On Saturday, 9 March 2013 at 01:36:53 UTC, bearophile wrote:
Is it a good idea to replace std.algorithm.filter with
something like that filter2 (plus some missing
On Saturday, 9 March 2013 at 09:13:26 UTC, Andrea Fontana wrote:
On Saturday, 9 March 2013 at 01:36:53 UTC, bearophile wrote:
Is it a good idea to replace std.algorithm.filter with
something like that filter2 (plus some missing methods)?
Bye,
bearophile
Maybe two versions (filter and cache
On Saturday, 9 March 2013 at 01:36:53 UTC, bearophile wrote:
Is it a good idea to replace std.algorithm.filter with
something like that filter2 (plus some missing methods)?
Bye,
bearophile
Maybe two versions (filter and cachedFilter) or a bool template
param?
I was thinking about @pure f
16 matches
Mail list logo