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
- Assignment: $attribute = expression;
- Conditional: if(expression) { statements} else { statements }
- Iteration: $attribute.each(x){statements}
- Declaration: var(x);
Of these, #3 and #4 are esoteric: almost no one needs to know them.
An expression above is also quite simple:
- A quoted string, a number, or the keywords true or false
- A simple attribute reference to this note: $Attribute
- An attribute reference to any note or collection of notes: $Attribute(paths)
- The result of a binary operator (like + or -) applied to two expression: expression op expression. (example: 2+2)
- The result of a dot operator applied an an expression: $Attribute.operator(arguments). (example: $MyString.count)
- The result of a function or unary operator: function(arguments). (example: sqrt(2), !$MyBoolean )
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?
p2
Thanks in advance
Tom
Itâs not a separate book; it should link to an appendix with a slightly more formal definition of the language.
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.