About The Tinderbox Way

Dear Eastgate,
I am currently rereading “The Tinderbox Way”.
I have a question because there were many parts that were unclear for me.
I am a complete outsider when it comes to programming languages.
Learning about unknown languages ​​is one of the pleasures for me.
Music begins with understanding the words of an unknown world.

=====beginning of quatation
This book assumes that you are generally familiar with the elements of Tinderbox.
If you’re new to Tinderbox, it may help if you explore the program a little,
and spend some time with the manual, just to get your bearings.
=======End of quatation

Q01 : What does “look into the program a little bit” mean?
How many things should I investigate?
What are the basics of the program that I should know?
How many program conventions and definitions should I learn?
What I need to know and how deep it is for the program?

If possible, please introduce any books that I should refer to or recommend.
What area of ​​programming are you referring to?
For example XML Perl CCC Python etc…
Or how the programming language is written?
For example, what is the meaning of the left side and the right side
with an equal sign in between?

Q02 : What does “element” in “the elements of Tinderbox” refer to?
Where can I find out?

Yours, WAKAMATSU
P.S
I apologize if a similar question has been asked before.

When I wrote this, I merely wanted to say that this book is an explanation or discussion of an artifact — perhaps, by courtesy, an artwork — to which I direct the curious reader.

You might imagine, for example, setting out to write about (say) Bach’s Chaconne from BWV 1004. There’s lots to talk about. Sometimes it’s useful to remind people: flrst, listen to the violin. You may be wrapped up in theory and musicology and whatnot, and that’s fine, but sometimes you just have to listen. This is what I had in mind when I said "look into the program.” (This needs to be argued because everyone understands that music is art and demands attention, but few people acknowledge that software is an art and fewer still pay attention.)

Now, you will already see that the question I am asking is a dangerous question. It’s the question the Devil asks Faust: will you look into things as they are. But, honestly, in this passage I’m simply asking the reader to excuse the faults of the argument when the artwork itself excuses them. (If it, in fact, it does.)


I am a complete outsider when it come to music. More complete since I became severely — verging on profoundly — deaf. But I’ve long understood that, while I enjoy some music, I don’t always understand what I do enjoy, and I seldom feel confident that what I do not enjoy is in any way defective. In some cases (Bruckner symphonies in my 30s, Mozart operas in my 60s) I have learned enough to enjoy works that I don’t properly understand.

This is not a surprise: who fully understands Manet’s Olympia, or Pollock’s Mural?


What I referred to as “the elements of Tinderbox”, back in 2006, are simply the things you have recently been discussing: attributes, values, actions, agents, prototypes, and views. These are simple enough, but there are ideas behind them.


I am currently working on a short book about recent advances in Tinderbox which might please you, I think it will not be long delayed. Perhaps 8-10 weeks. One thing I hope to do in that book is to suggest quite a few useful books on related topics.


I have to say that, when I was writing The Tinderbox Way back in 2006, I think you were the reader I was hoping for.

3 Likes

This is a profound question.

In a query (in Tinderbox or elsewhere), the glyph = interrogates comparison.

Tinderbox aside, consider the assertion that

A = B

This might assert that A is the same object as B. Or, it might assert that, while A and B are not the same object, they are (in our sense at least) equivalent. For example, if A is 2 and B is also 2, then A and B are currently equal.

Or, perhaps, if A is the third in C major, and B the tonic in E minor, then A and B are the same note and therefore equal. Or, perhaps C in Cmaj and E in Emin should be considered equal.

In Tinderbox queries, we usually write A==B to emphasize that we really are asking whether two attributes have equivalent values.


Often in programming (and Tinderbox actions), = has a different meaning:

A = B

means: take whatever value B has, and store it in a memory location which, for convenience, we will call A. This is an esoteric use of “=” and its appropriation is probably unfortunate: Ken Iverson argued for using A←B, but this did not catch on

Dear Mark Bernstein,
Thank you for considering the answer with the musical analogy.

This might assert that A is the same object as B. Or
It might assert that, while A and B are not the same object,
they are (in our sense at least) equivalent.
Or, it might assert that, while A and B are not the same object,
they are (in our sense at least) equivalent.
For example, if A is 2 and B is also 2, then A and B are currently equal.

This analogy has a really interesting twist.
Rameau believed at the time that “different pitches express different worlds.”
Renewing the Baroque idea, “Do Mi So”, “Mi So Do”, “So Do Mi”
He suggested that they all express the same musical world!
[Reference books]
Jean-Philippe Rameau : “Traité de l’harmonie” (1722)
Jean-Philippe Rameau : “Nouveau système de musique théorique” (1726).

At that time, Gottfried Wilhelm Leibniz wrote about calculus such as Leibniz’s notation.
It was also the time when it was announced, and research into “mnemonic techniques”
was developing (?) year by year.
Thanks to Rameau’s declaration that “chords with different heights are
considered the same”,the chords up to that point were we used to be careful
when handling it, but now we only need one third of it.
Thanks to functions and mechanisms for treating certain things equally,
calculations become faster.
It’s very interesting because it resonates with the fact
that it is now possible to reduce the number of things we memorize.

I am looking forward to your book being published soon.
Also, your continued responses.
Yours, WAKAMATSU
P.S
Unfortunately, when performing in real life,
“Do Mi So”, “Mi So Do”, and “So Do Mi”
must be made to sound different.

2 Likes

I look forward to the new short book!
„The Tinderbox Way“ is a book that I (after having read it fully a few years ago) regularly dip into and always find triggers new ideas how to use the program or solve problems.

Dear Mr. Mark Bernstein,
This is a continuation of the question.

[from The Tinderbox Way 2nd edition]
What Tinderbox Isn’t (and Why)

[Don’t try to fit a square peg in a round hole;
use programs to do what they do best.
The cost of an extra application or two is insignificant compared
to the value of your time.]

Q03 : What does “use programs” mean here?
What are you encouraging them to use?

(Page 178/382)
runCommand: Working With Outside Programs
The Tinderbox action
$Text=runCommand("ls [3]
Q04 : Why is the rightmost parenthesis in runCommand() not closed here?

Yours, WAKAMATSU

If someone decided to write a novel using Apple’s Numbers application (a “program”), that would be fitting a square peg into a round hole by using Numbers for a different purpose than what it was designed for.

Not that this wouldn’t work. But when instead we have other programs such as Pages or Word or others that are designed for things like writing short notes, or essays, or even novels, then using one of them novel writing is a better idea. It is more “round peg in round hole”. It is a better “fit”.

And so, using Tinderbox to calculate the orbit of the Bennu asteroid is probably possible, but not a good use of one’s time. It’s a very round peg in very square hole.

1 Like

Dear Mr.Paul Walters,
Thank you for your kind explanation.
I asked this “use programs” question because
As you explained, how can I get a better “fit”.
What kind of programs can be used with Tinderbox?
I wanted to ask a question like this, but the way I wrote it was unclear.
Yours, WAKAMATSU

My copies of The Tinderbox Way (ed.1/ed.2/ed.3) do not have that line. But lines of code do wrap owing the use of a two-column layout that thus has short/narrow lines of $Text. In this case read the next line(s) until you see a semi-colon (;) which indicates the end of the ‘line’ of code. Tinderbox also describes this as an expression.

This links neatly back to the point of having some experience of—or exposure to—code. By the latter I mean understanding how to do something even if you can’t actually do that thing yourself. I understand how a flute works—the mechanics of the instrument, how sound is made, etc.—but I can’t actually play the flute. This helps in the code context as one can see the broad structure, e.g. where a ‘line’ ends, even if not clear as how or what the actual code does.

I think it helps to also have a general idea of:

  • data types. Not as complex as it sounds. We know we can’t literally an an apple and a pear but we happily add numbers (e.g. 2 + 3 = 5). Thus software code often has the notion of ‘types’ of data. The novice doesn’t need to know all about each of these, but rather to have an understanding that not all types of data are handled the same way. A good example is sorting. By default, Tinderbox uses lexical sort where characters sort by their ASCII/Unicode character number. Thus ‘a’ sorts after all capitals so 'ABa" not ‘AaB’ which would be most people’s instinct. Numbers are less useful if ‘11’ sorts before '2; (1, 11, 2 not 1,2,11). And so on…
  • zero-based counting. A legacy from early computing when everything was in short supply including computer memory. So numbering from zero, not one saved precious resource. Not needed now, but why re-write what works. For the novice it just means that if you see reference to zero-based in context you count 0/1/2… not 1/2/3…
  • line ends (we just touched on this above).
  • escaping. Which fewer keys on the keyboard, some symbols acquire multiple possible meaning. So, is the character ‘/’ a divide operator or simply a solidus (forward slash)? Escaping is a means for the human to tell the computer I mean the literal value of the character they have typed. You don’t ned to understand how it works, but to it helps to know why you might be asked to escape a character by someone trying to help you.

… and there are other topics but these are general basics you will meet interacting with any code. It is tempting to claim it is all too difficult to understand and take no interest. If so, you are limited by copy/paste and if things go wrong you will have no idea what has happened. A little interest slowly grows knowledge, even if only so as to phrase a better question when seeking help from others. It is enlightened self-interest.

What ever you need. For instance a lot of Tinderbox users employ Tinderbox alongside and in unison with Bookends and DEVONthink. Why, because they are designed/optimised differently from Tinderbox. so, why use Tinderbox as your primary reference manager if you have an application (program) like Bookends that is designed for the purpose. There is not ‘must do’ here. Again it is enlightened self-interest. You can use a hammer to drive in a screw but surely the screwdriver sat next to it is a better tool. the same applies with apps. A regular problem you will see in the forum is people arriving with a problem and insisting the only way to resolve is by an ill-suited method (because they know no better).

‘runCommand()’ is not an app it simply allows Tinderbox to talk to the Mac’s Unix shell and the many small command line applications offered by the shell. There apps are, by design, small and do one thing. Like a toolbox you take the tool(s) needed and use them in the order needed to complete the task.

So having other apps and no using them simply because you feel Tinderbox ought to to something it either wasn’t designed for or does only with a lot of set-up, is self-defeating.

Tinderbox is indeed a ‘toolbox for notes’ .now, a note can—because some insist on it—contain and image. But this does not mean Tinderbox is an image editor.

use programs to do what they do best

@PaulWalters gets this right.

People sometimes tend to use their familiar tools for things to which those tools aren’t best suited. They use their screwdriver as an awl, a small pry-bar, a hammer. This is fine in a pinch, but it’s not ideal.

In familiar Tinderbox terms, you can use Tinderbox as an everything bucket. If you find yourself collecting thousands of pdfs, though, you might be happier using DEVONthink to store them and using Tinderbox to think about them. You can use Tinderbox notes to write very long articles. All things being equal, you might be happier drafting the article in Tinderbox as a collection of short, focused notes. Then, when you’ve got the organization right, you might copy the text into Scrivener, Pages, or InDesign to format everything for the page.

1 Like

Dear Dr.Mark Anderson,
I made a typo.
The page number was P172.
Yours, WAKAMATSU

Dear Mr. Mark Bernstein,
Thank you for your reply.
I will try various ways to use it.
Yours, WAKAMATSU

OK, that look like a typo. My TBWay v3 (albeit a late proofing draft) doesn’t have that. My copy has the same section at page 339:

I think the example in your copy should, at the line you indicate, read:

$Text=runCommand("ls ~/Documents")

I hope that helps.

Not entirely esoteric… as a past FORTRAN77 programmer, (vectorized for markov chains and monte carlo nonsense), setting a variable with = is very efficient. This is one thing that is very straightforward for me! I’m glad we don’t have constructs (<== and ==> etc) and things because I find them counterintuitive.

Maybe for Mr. Wakamatsu, the expansion you gave is adequate, A= B is equivalent to “Set A to the value of B” … but come to think of it, even Atari Basic on my 1200XL used LET A = B… that was esoteric! LOL

Dear Dr.Mark Anderson,
Thank you for writing to correct the content.
I will immediately write the correction in the text.

Did it happen when I read from ePub to PDF?
I checked, even with the ePub version I purchased
2016.June 21st
The Tinderbox Way.epub
p153
It was a typo in the same description.

In 2nd Edition, mistakes are just that, but
This has been corrected in the new 3rd version.
Is that what you mean?
Are the content and volume of articles different in 2nd VS 3rd?
Yours, WAKAMATSU
P.S
In your A Tinderbox Reference File
When I read the example of runCommand(commandStr[, inputsStr, dirStr])
I was trying this command.
I confirmed that it worked without any problems.

I think the page numbering and version are leading us astray. So let us ignore that and simply note that
for reasons unknown, your copy (and possibly others has a line of text on page 153 that reads:

$Text=runCommand("Is [3]

It should read:

$Text=runCommand("ls ~/Documents")

The corrected version explains why the runCommand() operator is not closed in the example you give—it’s a typographic error!

Dear Dr.Mark Anderson & Eastgate,
Thanks a lot for checking the contents.

After that, I have read a lot. but
I came across a question in the Actions section.
(I apologize for asking so many detailed questions.)

Q05 : Which is the correct way to describe it?
The Tinderbox Way (2nd Edition)
A Technical Overview of Actions

$Color="red or $Color=“red” ??

Yours, WAKAMATSU

Short answer: Yes, this is an obvious a typographic error

If you try to run the code as illustrated above, i.e.

if($Status=="urgent") { $Color="red
}else { $Color="blue"}

… nothing happens. Why? Because the code fails silently when it encounters the unclosed string "red`. If we close up the code on one line for clarity:

if($Status=="urgent") { $Color="red}else { $Color="blue"}

we can see that the action to take if the condition is true is to set a $Color value, which is passed as a string in double-quotes, i.e. "red}else { $Color=". Also the remains of the whole action, i.e. blue"} does not make sense and this likely causes the action to fail

If we correct the missing double-quote the value become "red" which is both more believable as a colour name and is a properly delimited string, the code runs correctly.

FWIW. I do not suggest you try, but you can actually make a Tinderbox custom colour called ‘red}else { $Color=’. I only did so to test the above. You can make the colour but you can’t set it via code.

Sometimes what look like an obvious typo is just that very thing. :slight_smile:

Note: a quicker way to resolve these questions about the text of The Tinderbox Way would be to contact the author directly via email. The book has a at least 3 editions (and it appears edition #3 may also have some reprint/updates within the edition’s life), so it is hard for fellow users to answer the questions unless they have the same exact edition as you have. The book’s author will have that information.

†. This typo also appears in the book’s second edition, and likely the code example was simply re-used verbatim in the third edition

Dear Dr.Mark Anderson,
Thank you for taking your precious time and
for your detailed explanation.
Over the years, I have been gradually becoming clearer
about the content and meaning of The Tinderbox Way.

I should have emailed the author.
I did not notice.
Thanks for the advice.
Yours, WAKAMATSU

1 Like

Don’t worry :slight_smile: . There was no criticism implied in suggesting contacting the author. It is simply to get an authoriatative answer more quickly.