Yes, and don't get hung up over this tacit/explicit idea.  It's a continuum.  Say you want the list of all the integers between the highest & lowest items of a list a.  You start by writing

lowest =: <./ a
highest =: >./ a
range =: highest - lowest
spread =: i. 1 + range
result =: lowest + spread

[if a is 5 7 10 this gives result = 5 6 7 8 9 10]

and then you see patterns in the processing, and you refine to

hilo =: (>./ a) , (<./ a)
result =: ({: hilo) + i. 1 + -/ hilo

and maybe eventually to

result =: (+  i.@:>:)/ -~/\  (<./ , >./) a

[I'm not saying this is the best code, but it's the way I'm thinking about the problem right now]

I never wrote a "tacit verb" but I certainly used J-like tacit thinking.

Henry Rich

On 11/20/2017 5:14 AM, Raul Miller wrote:
Also, there's the trace facility, for people who want to understand
the parsing process.

http://www.jsoftware.com/help/release/trace.htm

I suppose it might help to have had some prior exposure to shift
reduce parsers ( https://en.wikipedia.org/wiki/Shift-reduce_parser ).
But it seems useful to me. Just try not to use names.  (You can use
names, but you need to understand J's locale facility - for example
using fully qualified locale references - with the current
implementation of trace.)

The dissect facility really does a better job, though, for dealing
with understanding how data gets processed in tacit verbs. (The trace
facility will only show the process of building that verb - trace
shows the execution of that verb as a single step because of how
parsing and execution work).

Thanks,



---
This email has been checked for viruses by AVG.
http://www.avg.com

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

Reply via email to