On Sat, Nov 5, 2016 at 10:09 AM (EST), I wrote:
> ... Now that I think this through, I think I can do a passable job of that.)

Actually, no, I do not.

Extracting the locale from a name is straightforward:

conamed=:3 :0
  'a b'=. _2{.I.'_'='_',y
  if. (0=a)+.1~:#;:y do.  NB. implied
    18!:5 ''
  elseif. b=a+1      do.  NB. indirect
    ".b}.y
  elseif.            do.  NB. direct
    <}:a}.y
  end.
)

And, getting the name of an adverb argument is trivial:

   ;u`''

However, this does not address the issue faced by jtrace, which is
finding the locale that jtrace was invoked from.

As a workaround, I would recommend assuming that that locale was the
base locale. This potentially reduces the utility of the jtrace
facility, but it seems like the right balance of simplicity.
Specifically, I am recommending changing line 8 of executet_jtrace_
and executep_jtrace_ from

   ". 't_z=. ', ; t_x
and
   ". 't_z=. ',t_x=. '(',(;:^:_1 t_x),')'

to

   do_base_ 't_z=. ', ; t_x
and
   do_base_ 't_z=. ',t_x=. '(',(;:^:_1 t_x),')'

Does this make sense?

Thanks,

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to