Henry, I know where the mines are. I wasn't planning anything so rash, merely posing some idle questions. My code has already used, mema and memf, as well as memr and ic without issue.
Sean. On Tue, 8 Dec 2020 at 16:42, Henry Rich <[email protected]> wrote: > Don't even think about fooling with J memory blocks. Use mema, memr, > memw, memf, memu. Anything else will crash. > > Henry Rich > > On 12/8/2020 11:37 AM, Raul Miller wrote: > > I would classify that as possible, but maybe not in the way that you > > are envisioning. > > > > (1) There's a header that J's array mechanism would need in front of > > that string (in older versions of J -- the newer versions support > > aliasing into arrays, but require a J array to alias -- I haven't > > studied enough to see if there's any way to weasel out of that issue, > > but if there is it would obviously have version dependencies), and > > > > (2) The details of the implementation would be version dependent and > > would have to be approached from the C side in any current version of > > J (because the relevant data structures are not exposed to the J > > environment). > > > > But the primitives are necessarily supported, on the C side (since J > > is implemented in C). > > > > I am guessing that you have some context where you have some other > > codebase doing memory allocation and you think it would be worthwhile > > manipulating that memory directly from J but also feel that the > > overhead of creating a fresh copy is too high? > > > > It's probably worth noting here that most J operations make copies of > > memory during their operation (except in carefully restricted cases). > > > > > -- > This email has been checked for viruses by AVG. > https://www.avg.com > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
