On 6/20/2010 11:15 AM, P Kishor wrote: > > Because of my recent, small, trouble with NiceSlice (NiceSlice > affected some DBI-specific code adversely), I started thinking -- I > really know almost nothing about slicing, and slicing is the very > basics of PDL, and, I certainly am not going to learn anything if I > learn NiceSlicing. > > ... > > There is analog here. I really know nothing about slicing. And, > NiceSlice is not helping. First, I have to learn slicing and indexing, > and once I am good at it, only then can I pass the judgment that that > syntax is not good enough, and I should be using NiceSlice. > > Which brings me to the docs -- the docs on indexing and slicing really > need a lot of work.
Yes, I guess things are well known to those who know it well. This is the sort of documentation work that Daniel Carrera and others have been working to improve. The crux of the matter appears to be the confusion/conflation of indexing and slicing which doesn't make it clear where to go to get one's questions answered. From my point of view, NiceSlice is just a terser way to express the standard slicing operations. But since I started learning slice() and then moved to NiceSlice syntax, I may have avoided the lack of clarity with new users starting out with NiceSlice. > PDL is also compounded with another problem -- since it deals with > complex arrays, it becomes hard to visualize these arrays. And, > personally, until I can visualize them, I can't really deal with 'mv' > and 'at' and slice very easily. I find drawing diagrams of my array > with pen on paper, and then trying to figure out what exactly does mv > do, or what exactly do I need to say in order to grab a chunk out with > slice. (doesn't help much that the darn arrays are indexed starting at > 0, so when I want to work with the 3rd column of the 4th array in an > AoA, I really mean a[3][2]. A visualizer would be cool, kinda like the > IDE of PLT-Scheme which actually draws arrows between functions, but > that may be just too complicated. The Scientific Programming with PDL book was very instructive to me. Work is underway to fold it into the PDL on-line docs. --Chris _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
