Re: ndslice and limits of debug info and autocompletion

2015-12-21 Thread Jack Stouffer via Digitalmars-d-learn

On Tuesday, 22 December 2015 at 00:21:16 UTC, Jay Norwood wrote:

import std.experimental.ndslice.iteration: transposed;


I don't use visualD so I can't help you there, but I wanted to 
point out that this import is unnecessary.


ndslice and limits of debug info and autocompletion

2015-12-21 Thread Jay Norwood via Digitalmars-d-learn
I'm trying to determine if the debugger autocompletion would be 
useful in combination with ndslice.   I find that using visualD I 
get offered no completion to select core_ctr or epu_ctr where 
epu_ctr is used in the writeln below.


I take it this either means that there is some basic limitation 
in the debug info, or else VisualD just punts after some number 
of array subscripts.


The code builds and executes correctly ... but I was hoping the 
debugger completion would help out with an exploratory mode using 
compiled code.


import std.stdio;
import std.experimental.ndslice;
import std.experimental.ndslice.iteration: transposed;
struct sample{
ulong [10] core_ctr;
ulong [32] epu_ctr;
}


void main() {
auto a1 = new sample[60];
auto t3 = a1.sliced!(ReplaceArrayWithPointer.no)(3,4,5);
writeln(t3[0][0][0].epu_ctr);
}


Re: ndslice and limits of debug info and autocompletion

2015-12-21 Thread Jay Norwood via Digitalmars-d-learn
The autocompletion doesn't work here to offer epu_ctr in the 
writeln statement either, so it doesn't seem to be a problem with 
number of subscripts.   writeln(a1[0].   does offer epu_ctr for 
completion at the same place.


import std.stdio;
import std.experimental.ndslice;
import std.experimental.ndslice.iteration: transposed;
struct sample{
ulong [10] core_ctr;
ulong [32] epu_ctr;
}


void main() {
auto a1 = new sample[60];
auto t3 = a1.sliced!(ReplaceArrayWithPointer.no)(60);
writeln(t3[0].epu_ctr);
}



Re: ndslice and limits of debug info and autocompletion

2015-12-21 Thread Ilya via Digitalmars-d-learn

On Tuesday, 22 December 2015 at 00:21:16 UTC, Jay Norwood wrote:
I'm trying to determine if the debugger autocompletion would be 
useful in combination with ndslice.   I find that using visualD 
I get offered no completion to select core_ctr or epu_ctr where 
epu_ctr is used in the writeln below.


I take it this either means that there is some basic limitation 
in the debug info, or else VisualD just punts after some number 
of array subscripts.


The code builds and executes correctly ... but I was hoping the 
debugger completion would help out with an exploratory mode 
using compiled code.


import std.stdio;
import std.experimental.ndslice;
import std.experimental.ndslice.iteration: transposed;
struct sample{
ulong [10] core_ctr;
ulong [32] epu_ctr;
}


void main() {
auto a1 = new sample[60];
auto t3 = a1.sliced!(ReplaceArrayWithPointer.no)(3,4,5);
writeln(t3[0][0][0].epu_ctr);
}


I don't know how VisualD works, but to provide auto-completion it 
should be able to compile a source code for autocompletion 
information, because simple analyzer would not work with variadic 
templates like opIndex(Indexes...)(Indexes indexes).


Nitpick: t3[0][0][0] is much slower than t3[0, 0, 0].

Best,
Ilya