jtc icon indicating copy to clipboard operation
jtc copied to clipboard

doco changes

Open soniah opened this issue 5 years ago • 5 comments

soniah avatar Jun 03 '20 23:06 soniah

  1. lib/jtc_guide.hpp: Hmmm, do you think debugging (-d) is the option regular users would ever use (and hence worth mentioning in the mini-guide)? - If so, then why -ddd and not any other forms? (like -d, or -dd, or -dddd, etc)? - the number of times -d is given increasers the depth of the debugs, maybe somehow reword the debug option usage then? Or you think -ddd is a compromise between the verbosity and a revealed programming logic?

  2. lib/wp_guide.hpp - agree, the current description of the lexemes in the mini-guide is somewhat incomplete. The semantic of the lexeme's content (<>,<txt>) in fact is overloaded and depends on the suffix (search type). E.g., in searches like <..>r, <..>R, <..>l it signifies the pattern to match (even the empty one), while in other lexemes (like <..>N, '<..>P, <..>a) it defines the namespace where the match goes. I tried summarizing that in the user guide, thus this section in the mini-guide needs to be reworked a bit deeper.

what do you think?

ldn-softdev avatar Jun 04 '20 09:06 ldn-softdev

  1. my intention was to indicate that adding debugging flags makes understanding the query logic easier when working through the examples (it certainly did for me). Maybe "you can use -d debug flags to see the steps the jtq engine is taking" (or similar)

  2. I see, searches vs namespace. When I saw your solution it github with <> which matches the whole thing, it surprised me (but makes sense). I was thinking it's good to point out.

These are all minor, jtc is so powerful it takes a while to get your head around things 😄

soniah avatar Jun 05 '20 00:06 soniah

2. I see, searches vs namespace. When I saw your solution it github with <> which matches the whole thing, it surprised me (but makes sense). I was thinking it's good to point out.

yes, I see. it indeed might be confusing at first - it's the suffix of the search which defines the search behavior, e.g.: for all the numerical JSON searches:

  • <..>d - will search (recursively) and match the given number (e.g.: <3.14>d)
  • <..>D - will match a JSON numeric using RE pattern (e.g.: <-?[1-3]\.>D)
  • <>N - will match any JSON numeric and optionally will preserve it into a namespace if given (e.g.: <num>N)

Look, I will not merge this PR, but rather will work on a better wording for the lexemes explanation in the mini-guide (and will mentioned the -d option(s) too). Big thank you for your feedback.

ldn-softdev avatar Jun 05 '20 13:06 ldn-softdev

I wrote some more doco changes. Unfortunately this current PR hasn't been closed, so I can't open a new PR.

Here are the changes: https://github.com/soniah/jtc/commit/661777b7c91cd04f7440d263e503f7359e7e3fb0

soniah avatar Jun 23 '20 04:06 soniah

Updates made.

soniah avatar Jun 24 '20 23:06 soniah