>
>
> One approach would be to use ;: to break elements and their contents
> into separate words.
>
> A different approach would be to construct the left argument  for ;: based
> on
> an xpath specification.  (Though there are limits here, in the context of
> keeping track of what was found with wildcards, and I would really prefer
> to go a couple passes with "resulting state at each character" sequential
> machines.)


XML has a tree-like structure and I would say . Passing all necessary
structures between the invocations of the tacit verb creates a lot of
progamming/runtime overhead.


> It seemed to me that a pair of set/get verbs in the name
> > family of foreign conjunctions could make the tacit solution practical.
>
> How about
> get=: ". bind ]
> set=: 4 :'(x)=:y'


Perfect, but is not it slow? Am I right that each invocation of the explicit
verb requires parsing?

> But as there is total ignoring of that point I'll take it as the advice to
> > choose another tool.
>
> That could work.
>
> That said, note that you really haven't described the problem you are
> trying to solve in enough detail for us to give coherent advice



Fair enough.
I have huge files with log events (one event per line) that I would like to
analyze in the following way:
Get timestamp for each line. Determine  the type of the message by looking
at the message text. Group events by this type. Then comes the analysys part
at which J excels (and I don't have questions in this area  yet).
Problem:
I can not predict beforehand what will be the message string that identifies
each message type and what is its place in the log string. Therefore I would
like to build a dictionary that would held already known types (from the
beginning of the parsing). Each next string is compaired against the
dictionary. If there is a string containing the same substring as current -
they are of the same class and this substring identifies the type. Length of
substring is predefined. So my idea was to go line-by-line and maintain the
corresponding structure.

Danil


Raul
----------------------------------------------------------------------
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