Only if the definition is active.

Thanks,

-- 
Raul


On Sun, Oct 29, 2017 at 8:20 PM, Devon McCormick <devon...@gmail.com> wrote:
> For an individual name, you could use "whereDefined" to good effect:
>
>    whereDefined=: 3 : '(4!:4{.;:y) {:: (4!:3''''),<''Source of definition
> not found for '',''.'',~y'
>    whereDefined 'calendar'
> E:\Users\DevonMcC\j64-804\system\main\stdlib.ijs
>    whereDefined 'calendar_z_'
> E:\Users\DevonMcC\j64-804\system\main\stdlib.ijs
>    load 'dt'               NB. Load my own version of "calendar"
>    whereDefined 'calendar'
> E:\amisc\Jsys\user\code\datetime.ijs
>    whereDefined 'calendar_z_'
> E:\Users\DevonMcC\j64-804\system\main\stdlib.ijs
>
>
>
>
> On Sun, Oct 29, 2017 at 6:56 PM, Raul Miller <rauldmil...@gmail.com> wrote:
>
>> Well... I suppose you could do what I do:
>>
>> (1) Have cygwin.com's system installed. (Need to pick 32 or 64 bit as
>> appropriate for your version of windows - probably the 64 bit version.
>> You do not need any of the optional packages.)
>>
>> (2) Start up a cygwin shell. The command structure is a bit different
>> from the windows command prompt, so that might throw you. One of the
>> biggest issues is that / separates directories instead of \ (actually,
>> in windows command shell, you can often use / for the directory
>> separator, just not always).
>>
>> (3) change directory to the J system directory. (Note that cygwin's
>> command shell wants you to cd d: where windows command shell expects
>> d: as a command and has an independent "current directory" for each
>> drive - as a first approximation, cygwin only has one current
>> directory.)
>>
>> (4) use something like this to search:
>>
>>    /usr/bin/find addons -iname '*.ijs' | xargs egrep rand11.*=:
>>
>> or you can just search for rand11 instead of where it's defined, if
>> you are curious about that.
>>
>> Note that windows has its own find command which works different, and
>> depending on how you have cygwin installed you may or may not have
>> that find first in your path. Specifying /usr/bin/find gets you this
>> one.
>>
>> (You might also have luck with windows find.)
>>
>> If you like this approach, you can also bundle it up as a script, but
>> that's more steps, so I'll stop here for now.
>>
>> Thanks,
>>
>> --
>> Raul
>>
>>
>> On Sun, Oct 29, 2017 at 4:03 PM, 'Skip Cave' via Programming
>> <programm...@jsoftware.com> wrote:
>> > Bob,
>> >
>> > Thanks for the tip. It would be nice if there was a packages table of
>> > contents on the Jsoftware.com website, with links to each package as well
>> > as links to all the defined verbs in each package. Then one could track
>> > down useful verbs using the Jsoftware.com website search bar. Perhaps
>> > having a separate search engine for packages and defined verbs on the
>> > website would be even a better approach. When working on a project, I
>> > invariably find myself searching to see if the function I need has
>> already
>> > been developed, or whether I will need to build it myself. If I build it
>> > myself, other more experienced forum members usually can improve on it,
>> > making it faster, more space-efficient, and often more general.
>> >
>> > Windows' explorer search is excruciatingly slow, even on my new i7
>> machine
>> > with SSD. It searched for the keyword rand11 on my system for several
>> > minutes, but never found anything.
>> >
>> > On a related topic, it could be useful if there was a way for J forum
>> > members to submit new or improved verbs to be considered for inclusion in
>> > existing packages, or even to propose new packages that members could
>> > contribute to, such as machine learning, or NLP. I have seen many useful
>> > verbs discussed and polished in the forum, but those verbs then get
>> buried
>> > in old forum posts, undocumented, and mostly forgotten. The partition
>> verb
>> > discussion currently going on in the forum is but one of many such
>> > examples. Perhaps members could vote on submissions to be included in
>> > packages, or whether to start a new package. Contributors would be
>> > acknowledged in the verb definitions. I use Google forms (free) for
>> voting
>> > schemes like this (https://goo.gl/Wgr9mx). It auto-summarizes votes in a
>> > spreadsheet.
>> >
>> > New mathematical approaches are being developed every day, but the J
>> > package library has been fairly static for some time.
>> > Particularly the fields of machine learning and natural language
>> processing
>> > are discovering new approaches and methods at a rapid pace (neural nets,
>> > deep learning, word2vec, doc2vec etc.). J is particularly suited to
>> > concisely handle the dominantly array-centric algorithms in these fields.
>> > However, Python seems to be the choice for developing algorithms in these
>> > fields, even though J has much more concise and flexible array primitives
>> > than Python.
>> >
>> > Skip
>> >
>> >
>> >
>> > Skip Cave
>> > Cave Consulting LLC
>> >
>> > On Sun, Oct 29, 2017 at 10:34 AM, robert therriault <
>> bobtherria...@mac.com>
>> > wrote:
>> >
>> >> Hi Skip,
>> >>
>> >> I did a search with the finder on my mac for the text "rand11=" and
>> those
>> >> were two of the files that were shown to contain it. It is the trick
>> that I
>> >> use to find the origins of verbs that don't show up in the usual ways.
>> >>
>> >> Cheers, bob
>> >>
>> >> > On Oct 29, 2017, at 12:23 AM, 'Skip Cave' via Programming <
>> >> programm...@jsoftware.com> wrote:
>> >> >
>> >> > Bob, thanks for the link.
>> >> > I searched the jsoftware.com website for the rand11 verb, and none of
>> >> the
>> >> > hits showed the code, or what package the function might be in. I just
>> >> > found a brief description, with no indication what package the verb
>> might
>> >> > be in:
>> >> >
>> >> > rand11 random <http://www.jsoftware.com/docs/help602/user/script_
>> >> random.htm>
>> >> > v generate y random numbers in interval (_1,1)
>> >> > Where does one find the list all the packages that are included in
>> the J
>> >> > distribution, both standard & optional, along with the verbs in each
>> >> > package. Suppose I know the name of a verb in some package (usually
>> from
>> >> > reading someone's code), how do I know which package that verb is in,
>> and
>> >> > whether the package must be "loaded" (like stats), or "required" (like
>> >> > plot).
>> >> >
>> >> > Skip
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > Skip Cave
>> >> > Cave Consulting LLC
>> >> >
>> >> > On Sun, Oct 29, 2017 at 1:20 AM, robert therriault <
>> >> bobtherria...@mac.com>
>> >> > wrote:
>> >> >
>> >> >> I found it in j602 in this path ~/j602/system/packages/stats/
>> random.ijs
>> >> >>
>> >> >> setrl=: 9!:1
>> >> >>
>> >> >> deal=: (# ? #) : (? #) { ]
>> >> >> dealx=: ] #: ?~ : ? & (*/)
>> >> >> toss=: ? @ (# #) { ]
>> >> >> tossx=: ] #: (?@# */)
>> >> >> rand01=: ?@$ 0:
>> >> >> rand11=: <: @: +: @: rand01
>> >> >>
>> >> >> and it remains in the newest version of the j beta
>> >> >> ~/j64-806/addons/stats/base/random.ijs although with more
>> documentation
>> >> >>
>> >> >> cocurrent 'z'
>> >> >>
>> >> >> setrl=: 9!:1                NB. set random link
>> >> >>
>> >> >> deal=: (# ? #) : (? #) { ]  NB. deal x items from y (no repetition)
>> >> >> dealx=: ] #: ?~ : ? & (*/)  NB. deal x items from shape y (no
>> >> repetition)
>> >> >> toss=: ? @ (# #) { ]        NB. pick x items from y (with
>> replacement)
>> >> >> tossx=: ] #: (?@# */)       NB. pick x items from shape y (with
>> >> >> replacement)
>> >> >> rand01=: ?@$ 0:             NB. generate y random numbers in interval
>> >> (0,1)
>> >> >> rand11=: <: @: +: @: rand01  NB. generate y random numbers in
>> interval
>> >> >> (_1,1)
>> >> >>
>> >> >>
>> >> >> Cheers, bob
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>> On Oct 28, 2017, at 10:46 PM, 'Skip Cave' via Programming <
>> >> >> programm...@jsoftware.com> wrote:
>> >> >>>
>> >> >>> I found this verb description in the Jsoftware website"
>> >> >>>
>> >> >>> rand11 random <http://www.jsoftware.com/docs/help602/user/script_
>> >> >> random.htm>
>> >> >>> v generate y random numbers in interval (_1,1)
>> >> >>>
>> >> >>> Bu I can't find the actual code implementing the rand11 function
>> >> >> anywhere
>> >> >>> on the Jsoftware site. Can anyone point me to the code?
>> >> >>>
>> >> >>> Skip
>> >> >>> ------------------------------------------------------------
>> ----------
>> >> >>> 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
>> ----------------------------------------------------------------------
>> 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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to