Re: [Jprogramming] how do you pass a verb with a named object local to an adverb?

2017-04-25 Thread 'Pascal Jasmin' via Programming
The save function is pretty cool. Applications include "transaction rollback" on an entire locale/object. From: Xiao-Yong Jin To: "programm...@jsoftware.com" Sent: Tuesday, April 25, 2017 10:43 PM Subject: Re: [Jprogramming] how do you pass a verb with a

Re: [Jprogramming] how do you pass a verb with a named object local to an adverb?

2017-04-25 Thread Raul Miller
What do you mean by "extra copies" and how have you been measuring that? (Most of the time, a "copy" just means incrementing a reference count. There have been some exceptions, though, for boxed data, for example.) Thanks, -- Raul On Tue, Apr 25, 2017 at 9:19 PM, Xiao-Yong Jin wrote: > >> On

Re: [Jprogramming] how do you pass a verb with a named object local to an adverb?

2017-04-25 Thread bill lam
You misread my message, locale in J is also global. Passing the name of a locale and the content of locale are quite different. you may serialize the content of locale into a noun but I think this is not needed in most cases. Вт, 25 апр 2017, Xiao-Yong Jin написал(а): > What kind of mess it would

Re: [Jprogramming] how do you pass a verb with a named object local to an adverb?

2017-04-25 Thread Xiao-Yong Jin
What kind of mess it would be if you remove locale support. I would argue that encapsulating using locale is central to J's growth. Do you think you can remove locale in any of those important packages distributed by JAL? And they are solving a huge number of problems for me. On the flip side, I

Re: [Jprogramming] how do you pass a verb with a named object local to an adverb?

2017-04-25 Thread bill lam
J program usually uses globals to share data. Encapsulation is a paradigm commonly used by other programming languages, but as said in other posts, J tends to focus on solving problems. Each programming language has its own style, J needs not imitate paradigm of other programming languages. On 26

Re: [Jprogramming] how do you pass a verb with a named object local to an adverb?

2017-04-25 Thread 'Pascal Jasmin' via Programming
The localed structure is very natural for keeping a resource open and bound to functions within it. (file or database/table) A locale can be instanced along with a different resource of the structure it expects. There are of course ways to do that on a "global heap" with arrays of resources,

Re: [Jprogramming] how do you pass a verb with a named object local to an adverb?

2017-04-25 Thread Xiao-Yong Jin
> On Apr 25, 2017, at 6:30 PM, Eric Iverson wrote: > > I have not followed this discussion at all and am probably way off base. > > But how is: > > allocate a few structures, and pass their pointers to the same function in > separate callings > > different from: > > allocated a few globals i

Re: [Jprogramming] mt addon benchmarks for J805 vs J806

2017-04-25 Thread Henry Rich
I welcome the chance to improve users' important programs. The i.-family speedups were important for some programs we know about, but not all. If anyone has an application where more speed would be important to them, I encourage them to (1) use the Performance Monitor to find the slow parts o

Re: [Jprogramming] how do you pass a verb with a named object local to an adverb?

2017-04-25 Thread Eric Iverson
I have not followed this discussion at all and am probably way off base. But how is: allocate a few structures, and pass their pointers to the same function in separate callings different from: allocated a few globals in an agreed upon locale (call it the heap), and pass their names (pointers)

Re: [Jprogramming] how do you pass a verb with a named object local to an adverb?

2017-04-25 Thread Xiao-Yong Jin
Sorry, I misunderstood you. The problem is that I have global named states (large arrays) that needs to hide from other names in different locales. For recursive or iterative applications I want to be able to keep the current state and continue at a later time. Such kind of thing seems simple t

Re: [Jprogramming] how do you pass a verb with a named object local to an adverb?

2017-04-25 Thread Raul Miller
That was not my solution, that was me quoting and reformatting someone else's work. I have not attempted a solution, because I do not yet understand the problem. Thanks, -- Raul On Tue, Apr 25, 2017 at 3:13 AM, Xiao-Yong Jin wrote: > Thanks for writing a long reply. I think it is better for

Re: [Jprogramming] how do you pass a verb with a named object local to an adverb?

2017-04-25 Thread Xiao-Yong Jin
Thanks for writing a long reply. I think it is better for us if I can convince you that your solution does not work before discussing the question about why. I've tried to rename my code so it should appear better to your standard. in_z_=:2 :'(u` ,&(,&''_''@:,@:>) n)~' NB.accepts global nam

Re: [Jprogramming] how do you pass a verb with a named object local to an adverb?

2017-04-25 Thread Xiao-Yong Jin
> On Apr 24, 2017, at 9:15 AM, Jose Mario Quintana > wrote: > > " > NB.the parsing rule is a little odd. > NB.Using a one liner without defining l gives syntax error. > " > > This one seems to work: > > in_z_=:2 : '(u` (,&(,&''_''@:,@:>)) n)~' Thanks. I must have made some mistakes