Wildcard search in query

Thanks again, Paul. Is there a Syntax name for the methods used in agents and the export code? What do you call this type of coding, or are these methods a Tinderbox standard?

They’re both improvised, special purpose languages.

It cannot be emphasized enough how small these languages are. There are, at present, only four kinds of statements in the action language

  1. Assignment: $attribute = expression;
  2. Conditional: if(expression) { statements} else { statements }
  3. Iteration: $attribute.each(x){statements}
  4. Declaration: var(x);

Of these, #3 and #4 are esoteric: almost no one needs to know them.

An expression above is also quite simple:

  1. A quoted string, a number, or the keywords true or false
  2. A simple attribute reference to this note: $Attribute
  3. An attribute reference to any note or collection of notes: $Attribute(paths)
  4. The result of a binary operator (like + or -) applied to two expression: expression op expression. (example: 2+2)
  5. The result of a dot operator applied an an expression: $Attribute.operator(arguments). (example: $MyString.count)
  6. The result of a function or unary operator: function(arguments). (example: sqrt(2), !$MyBoolean )
2 Likes

I too use Expressions, and similar apps in the past. Sometimes, just doing regex tweaking/tuning abstracted out into such an app can replace some small-scale testing in Tinderbox. If nothing else, it helps focus on the matching process. Sometimes the result is to relaise there may be a better/more efficient approach. IOW, if you need lots of very narrow-foccused regex, it might be Nature suggesting you revisit you’re doc’s attributes (metadata) and finding better ways to seed the strands you are trying to find.

Also, as a doc matures, it helps to keep revisiting any $Text.[i]contains() calls. My experience is that as a doc matures, abstracting these text ‘markers’ into attributes obviates the need to search all the $Text of many notes ‘just’ to find a narrow thread. That doesn’t mean to suggests its what everyone should do, but at least be open to the enlightened self-interest of leveraging attributes to help you hold nuances within your notes.

Hi Mark,

In About Tinderbox Actions that you authored, on page 2, you reference and highlight a book entitled, A Shortcut for Programmers. The link does not work and I cannot find the book/reference anywhere. Do you know who wrote it and do you have an active link?
image
p2
image

Thanks in advance
Tom

1 Like

It’s not a separate book; it should link to an appendix with a slightly more formal definition of the language.

I’ve found regex101 to be helpful, with a catchy URL to boot.

1 Like

Unfortunately my copy of About Tinderbox Actions only has 15 pages and looks like it is incomplete which explains the broken link. I found the first 15 pages helpful, now that I know there is more I am sure myself and others would enjoy the read.

Is there a link to the file that I can re-download?

Many thanks in advance
Tom

I think this was an early version of “Tinderbox Actions and Dashboards”, now in the Tinderbox Help menu.

Thanks Mark. I love these very concise, schematic presentations of aspects of action code (or other aspects of Tinderbox). It helps for the big picture. The rest I can get from the extraordinary “man pages” @mwra maintains.

1 Like