Thinking Domain Math

Thinking domain math is a simple freeform spreadsheet style.

Cells are in the form: HOW_TO_FORMAT VARIABLE_NAME (VALUE) OPERATOR

HOW_TO_FORMAT VARIABLE_NAME (VALUE) OPERATOR So lets say you want to add up a tool list. In your editor you would have these cells And in your thought or comment you would see The default operator is = which assigns the output of the cell to the respective variable.

The default variable name is tot so if you are only adding up one set of things per thought you can leave off the variable name and simply put \$(89.95) and \$(15.20) etc. and the total can simply be either \$() or \$tot() as you like. You can also use the default variable as a junk or scratchpad variable to display expressions when you don’t need the result placed in a named variable, for example \?(a * b + c) which will display the expression result and incidentally add the result to tot which can be ignored.

Display-only cells (those without expressions or values) are expanded on a second pass so they always show final results for that variable. This allows display cells like \$tool() to be anywhere, even at the top, and still show totals. If you want to show the current value of a variable, basically the subtotal, at that place in the page, you can put the word now in the cell like this \$tool(now).

Math cells can go anywhere. Inside table cells, in free text, wherever you want.


Some examples of JavaScript math expressions that can be in cells


\$a(22.50) → $a(22.50)
\$b(abs(-22)) → $b(abs(-22))
\?c(pow(2,3)) → ?c(pow(2,3))
\?d(2 ^ 3 + 5 / 13) → ?d(2 ^ 3 + 5 / 13)
\?e(pow(2,3) + (5 * 2)) → ?e(pow(2,3) + (5 * 2))

\$f(a + 0.50) → $f(a + 0.50)yes, variables are expanded
\$f(20)- → $f(20)-
\$f() → $f()

\?(pi) → ?(pi)


Additional operators for sums and totals

The ~ and () operators allow changing the context for variable expansion. This is mainly useful for summing rows and displaying complex totals. These operators are mainly for generating display, though the ~ operator does assign the displayed (subtotal) value into the respective variable which is nice for gaining access to those values.

The ~ operator works like the = operator in that it fills the designated variable except that it causes variables being expanded to take on the value that was last operated on (i.e. visble) for that variable instead of the current value of the variable in the sheet. You can think of this like a row sum … though it is not limited to a physical row or to only summing, as the expression can be any valid mathjs expression.

Example: \$(a+b)~ will show the last value used to change variable a added to the last value used to change variable b … which if in the same row, would be the sum of the values those cells are showing in the current row.

The () operator defers this cell to the second pass, hence all variables in any expression have their final value no matter where they are in the flow of the page.

Example: \$(a-b+c)() would show the result of the expression a – b + c after all other operations on a and b and c are complete, no matter where in the page this cell is physically located.

For example, here is a nice little spreadsheet utilizing math cells with these operators.
 
item cost paid remaining
Skirting \$k(250)+ \$p(250)+ \$(k-p)~
6 Blocks \$k(1.50*6)+ \$p(0)+ \$(k-p)~
Jack \$k(30)+ \$p(0)+ \$(k-p)~
       
       
       
Total \$k() \$p() \$(k-p)()

and the output is
 
item cost paid remaining
Skirting $k(250)+ $p(250)+ $(k-p)~
6 Blocks $k(1.50*6)+ $p(0)+ $(k-p)~
Jack $k(30)+ $p(0)+ $(k-p)~
       
       
       
Total $k() $p() $(k-p)()

And hey, if you just want to calculate something simple, like the ounces in coke can, you can simply put it in the page as mathjs. The formula is PI * radius^2 * height / oz conversion

ounces in a coke can = \?(
radius = 1.25;
height = 4.415;
conversion = 1.805;

pi * radius ^ 2 * height / conversion;
)

ounces in a coke can = ?(
radius = 1.25;
height = 4.415;
conversion = 1.805;

pi * radius ^ 2 * height / conversion;
)
 

Tags

  1. math
  2. spread sheets
  3. kudos

Comments


Seth says

Seth says
seems very useful … i  need this stuff for various projects … #kudos → nathan

They scope to just one thought … right?

Si says
They scope to one item. i.e. a thought body, or a comment. Very similar to a spreadsheet. Played around with various scoping, but the item scope came out as the overall most useful. Could create a special syntax for a global and/or whole thought scope if that is someday needed, but currently I don’t need it and can only think of a very few times I would. Could also just throw in a plugin if you need such expanded ability.

Si says
What I am using this for right now is spreadsheeting several rental properties and the needed repairs to bring them up to code verses the long term income.

Seth says

See Also

  1. Thought Well here i am back in this reality with 306 viewings related by tag "kudos".
  2. Thought To upload mp3 files to Fillmore box 6300 with 107 viewings related by tag "kudos".
  3. Thought Go Mark! with 102 viewings related by tag "kudos".
  4. Thought 2016C - FALL CD catalog production with 85 viewings related by tag "kudos".
  5. Thought Making up Others with 84 viewings related by tag "kudos".
  6. Thought Amazon's Buy Box Games with 52 viewings related by tag "kudos".
  7. Thought Fo Hammer popped up at the FBI today. with 43 viewings related by tag "kudos".
  8. Thought Other Math Curiosities with 19 viewings related by tag "math".
  9. Thought Footer problem on individual page at speaktomecatalog.com with 19 viewings related by tag "kudos".
  10. Thought Meatloaf with 17 viewings related by tag "kudos".
  11. Thought Lovely tag cloud! with 16 viewings related by tag "kudos".
  12. Thought Bookmarks Love with 15 viewings related by tag "kudos".
  13. Thought about: how it works - ideabuzz with 13 viewings related by tag "kudos".
  14. Thought OMG We are back in business ... with 11 viewings related by tag "kudos".
  15. Thought Probably the most pertinant speech yet this century with 10 viewings related by tag "kudos".
  16. Thought spreadsheets with 1 viewings related by tag "spreadsheets".
  17. Thought Conversation Rooms with 1 viewings related by tag "kudos".
  18. Thought Conversations are Kewl with 0 viewings related by tag "kudos".
  19. Thought Google spreadsheet soon with 0 viewings related by tag "spreadsheets".
  20. Thought about: rolling hypocycloids with 0 viewings related by tag "math".
  21. Thought Monday Morning Math with 0 viewings related by tag "math".
  22. Thought Some math musing re philosophy of mind with 0 viewings related by tag "math".
  23. Thought WikiCalc with 0 viewings related by tag "spreadsheets".
  24. Thought about: rima regas - google+ - maths simple visual how trigonometry works with 0 viewings related by tag "math".
  25. Thought [title (18359)] with 0 viewings related by tag "math".
  26. Thought web spreadsheets with 0 viewings related by tag "spreadsheets".
  27. Thought about: TrimSpreadsheet - TrimPath - Trac with 0 viewings related by tag "spreadsheets".
  28. Thought you now can embed Num Sum spreadsheets in items with 0 viewings related by tag "spreadsheets".
  29. Thought Group Listing with 0 viewings related by tag "spreadsheets".
  30. Thought Cell server test with 0 viewings related by tag "math".
  31. Thought open source javascript spreadsheet engine with 0 viewings related by tag "spreadsheets".