Note that explicit verbs are a special case of tacit verbs.  In the
case of explicit verbs, the data structure which represents the verb
represents an explicit definition.  For example:  [: : - is a tacit
definition, while 4 : 'x - y' is an explicit definition.

In most cases, tacit verbs will have to be re-evaluated "for each
record".  (The exception would be if relevant special code existed for
the tacit verb).

-- 
Raul

On Sun, Jan 8, 2012 at 10:19 PM, Ric Sherlock <tikk...@gmail.com> wrote:
> For explicitly defined verbs/functions yes they'll need to be
> reinterpreted for each record. I think I'm right in saying that if the
> verb/function is tacitly defined then that is not the case (someone
> correct me if I'm wrong!).
>
> On Mon, Jan 9, 2012 at 2:36 PM, Tom Szczesny <tav...@gmail.com> wrote:
>> What surprised me was that the code in cutl was being reinterpreted by the
>> J-interpreter for each element.
>> I guess that's because the the conjuction is applied to a defined function,
>> and not a primitive.
>>
>>
>> On Sun, Jan 8, 2012 at 5:06 PM, Ric Sherlock <tikk...@gmail.com> wrote:
>>
>>> To be precise cutl is being "fed" csvfile one record at a time by the
>>> conjunction cut ( ;. ). ( cutl;._2 ) will chop its right argument into
>>> bits using the last item of the right argument (probably a line-feed)
>>> as the record delimiter (fret) and apply the verb u (in your case (
>>> ','&cutl ) to each of those records.
>>>
>>> http://www.jsoftware.com/docs/help701/dictionary/d331.htm
>>>
>>> On Mon, Jan 9, 2012 at 6:50 AM, Tom Szczesny <tav...@gmail.com> wrote:
>>> >
>>> >    ',' &cutl;._2 csvfile
>>> >
>>> > I was amazed that  cutl  loops through csvfile one 'record' at a time,
>>> > as none of the 9 control structure patterns listed in the Primer were
>>> > evident.
>>> >
>>> >
>>> >
>>> > On Mon, Jan 2, 2012 at 12:44 PM, Joey K Tuttle <j...@qued.com> wrote:
>>> >
>>> >> I believe that there are a collection of csv related utilities in addons
>>> >> ( require 'csv' will make those available to you).
>>> >>
>>> >> However, for years I have used a simplistic verb to bring .csv files
>>> >> into a j session as a table of enclosed values -
>>> >>
>>> >>    cutl =: 3 : 0
>>> >> :
>>> >>  y =. y,x
>>> >>  q =. y e.'"'
>>> >>  qs =. ~:/\q
>>> >>  }.^: ('"'&=@([:{.1:{.]))&.> (qs<y e.x) <;._2&((q<:qs)&#) y
>>> >> )
>>> >>
>>> >>    tablecsv =: 3 : 0
>>> >>     ',' tablecsv y   NB. allows choosing an alternative delimiter
>>> >> :
>>> >>     x &cutl;._2 y
>>> >> )
>>> >>
>>> >>
>>> >> On 2012/01/02 09:22 , Tom Szczesny wrote:
>>> >> > Some languages, like q, have a built-in command for reading, parsing,
>>> and
>>> >> > loading data from csv files:
>>> >> >     t: ("SSDIDSSIFFFIS";enlist ",")  0: `:/home/tom/t.csv
>>> >> >
>>> >> > Other languages, like a+, do not, and the user needs to write a
>>> function
>>> >> to
>>> >> > read, parse and load data from csv files.
>>> >> >
>>> >> > > From a cursory review, it appears that j is in the a+ camp.
>>> >> > Please confirm that such a facility does not exist in j, before I
>>> start
>>> >> > writing my own.
>>> >> >
>>> >>
>>> >> ----------------------------------------------------------------------
>>> >> 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

Reply via email to