This reminds me of this verb written by Dan Bron quite a while ago:
   whereDefined=: 3 : '(4!:4{.;:y) {:: (4!:3''''),<''Source of definition
not found for "'',''".'',~y'
   whereDefined 'plot'
c:\users\devon_mccormick\j64-807\addons\graphics\plot\plot.ijs




On Tue, Apr 9, 2019 at 1:29 PM 'Mike Day' via Programming <
programm...@jsoftware.com> wrote:

> Don’t know about Ian, but I’ve just pasted this into my iPad’s start.ijs
> and it worked!
>
>    load'~/user/start.ijs'
>    whereis 'plot'
> +------+----------------------------------+
> |jzplot|/j/addons/graphics/plot/jzplot.ijs|
> +------+----------------------------------+
> |z     |/j/addons/graphics/plot/plot.ijs  |
> +------+----------------------------------+
>
> Useful...
> Thanks
>
> Mike
>
> Sent from my iPad
>
> > On 9 Apr 2019, at 17:19, Don Guinn <dongu...@gmail.com> wrote:
> >
> > Trying again before Gmail is too helpful.
> >
> > I wrote this verb which I have found to be quite useful.
> >
> > whereis=:3 : 0
> >
> > u=.<'_'
> >
> > if. '_'={:y
> >
> > do.
> >
> > 'y l'=.([:,<)"0<;._2 y
> >
> > elseif. #n=.I.'__'E.y
> >
> > do.
> >
> > l=.<y}.~n+2
> >
> > y=.<n{.y
> >
> > elseif.
> >
> > do. l=.cofind y=.<y
> >
> > end.
> >
> > l,.(4!:4"1([:<;)"1 y,.u,.l,.u){a:,~4!:3''
> >
> > )
> >
> >
> > whereis 'plot'
> >
> > ┌──────┬──────────────────────────────────────────┐
> >
> > │jzplot│c:\j64-901\addons\graphics\plot\jzplot.ijs│
> >
> > ├──────┼──────────────────────────────────────────┤
> >
> > │z │c:\j64-901\addons\graphics\plot\plot.ijs │
> >
> > └──────┴──────────────────────────────────────────┘
> >
> > xxx=.1
> >
> > whereis 'xxx'
> >
> > ┌────┬┐
> >
> > │base││
> >
> > └────┴┘
> >
> >> On Tue, Apr 9, 2019 at 10:16 AM Don Guinn <dongu...@gmail.com> wrote:
> >>
> >> I wrote this verb which I have found to be quite useful.
> >>
> >> On Tue, Apr 9, 2019 at 7:36 AM Eric Iverson <eric.b.iver...@gmail.com>
> >> wrote:
> >>
> >>> Ian,
> >>> Loaded_j_ needs a tweak before it meets your needs. Currently load
> updates
> >>> Loaded after the load. We are considering a base library change where
> it
> >>> is
> >>> updated before the load is done and this would give you what you want.
> >>>
> >>> On Tue, Apr 9, 2019 at 9:21 AM Eric Iverson <eric.b.iver...@gmail.com>
> >>> wrote:
> >>>
> >>>> Ian,
> >>>> I don't think 4!:3 meets your needs (duplicates). The load verb
> >>> maintains
> >>>> Loaded_j_ and this might meet your needs.
> >>>>
> >>>>> On Tue, Apr 9, 2019 at 8:49 AM bill lam <bbill....@gmail.com> wrote:
> >>>>>
> >>>>> Does this work?
> >>>>>
> >>>>> MYSCRIPT=: >{:4!:3''
> >>>>>
> >>>>>> On Tue, Apr 9, 2019, 8:29 PM Ian Clark <earthspo...@gmail.com>
> wrote:
> >>>>>>
> >>>>>> How can I *reliably* fetch the path of the script being loaded,
> >>> whilst
> >>>>> it
> >>>>>> is being loaded?
> >>>>>>
> >>>>>> Everything I've tried either fails or fingers the wrong script on
> >>>>>> occasions. Especially if my script is the subject of "load" or
> >>>>> "require" by
> >>>>>> another script.
> >>>>>>
> >>>>>> I want to be able to write at the top of my script, say
> >>>>>>
> >>>>>> cocurrent 'myloc'
> >>>>>> MYSCRIPT=: theScriptCurrentlyBeingLoaded''
> >>>>>>
> >>> ----------------------------------------------------------------------
> >>>>>> For information about J forums see
> >>> http://www.jsoftware.com/forums.htm
> >>>>>
> ----------------------------------------------------------------------
> >>>>> For information about J forums see
> http://www.jsoftware.com/forums.htm
> >>>>
> >>>>
> >>> ----------------------------------------------------------------------
> >>> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> >>
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



-- 

Devon McCormick, CFA

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

Reply via email to