On Sat, Jun 29, 2013 at 12:15 AM, Michal D. <[email protected]> wrote: > So I have to clarify that this discussion is about a language similar to J > but not J itself, since obviously none of this stuff can be changed in J. > > Maybe it makes sense to disallow fills altogether and instead result in an > error. How much expressive power is really lost since you usually want to > box the result anyways and might prevent errors (due to values being equal > to fills)?
We could imagine an adverb which made all fill operations within its derived verb be error operations. Implementing something like this would require support from the interpreter. So I think this is doable. I do not know if this is a good or bad idea. > The problem with boxed arrays is that they are not contiguous in memory > with all the corresponding performance concerns. Has any thought been > given to a more fine grained shape representation for ragged arrays? I am not sure that this is the problem. The memory allocations are sequential, and quite likely adjacent. What steps have you taken to isolate this problem? > On the other hand, how hard is it for the interpreter to recognized boxed > arrays where the boxed items have the same rank (# @: $) and implement them > as contiguous ragged arrays? (Perhaps the best solution if possible). Another approach is to use a flat (1 dimensional) array and keep the relevant shape information in a companion array. Here, you would need to perform "manually" the steps that the interpeter would normally perform for you. But if your problem is really unique enough (if interpreter performance is orders of magnitude too slow) this might be good for you. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
