My TiddlyWiki Math Project

634 views
Skip to first unread message

Stephen Kimmel

unread,
Mar 22, 2016, 11:22:51 PM3/22/16
to TiddlyWiki
My TiddlyWiki math project, which I'm calling Mathcell, has progressed far enough to actually be of some use to people. So I'm unleashing it on the unsuspecting public in hopes of getting some feedback and comments.

A bit of background. About the only software I use more than TiddlyWiki is Microsoft Excel. Inspired by a programming effort that created a Tiny Excel-like app in plain vanilla javascript with no libraries and just 30 lines of code, http://jsfiddle.net/ondras/hYfN3/, I set to work creating my own version. I succeeded and Mathcell (math in a cell) is the result. The essential tiddlers are about 3,000 bytes in total and there are three examples and two datatiddlers that total about another 5,000 bytes.

In essence, you can enter a macrocall, <$macrocall $name="eval1" datatiddler="$:/sk/data" cell="a1"/> in any tiddler and create a Mathcell. In that Mathcell, you can enter formulas or javascript math functions and using a button toggle back and forth between the data entry form and the result. The routine can handle complex math operations, string concatenation and has circular reference protection.

This routine is no match for Excel or even some of the much bigger add-in spreadsheets, but if you need some very flexible mathematics in your wiki, this may suit your needs.

You'll find Mathcell at http://mathcell.tiddlyspot.com/

Mat

unread,
Mar 23, 2016, 1:37:51 AM3/23/16
to TiddlyWiki
That's VERY cool!!! Great job Stephen!

<:-)

Alex Hough

unread,
Mar 23, 2016, 2:53:35 AM3/23/16
to tiddl...@googlegroups.com
I especially like the inline example

Could this be used to create data visualisations?


Alex


On Wednesday, 23 March 2016, Mat <matia...@gmail.com> wrote:
That's VERY cool!!! Great job Stephen!

<:-)

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5c0066d0-0ee9-4869-a9c0-f9390438c898%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ste Wilson

unread,
Mar 23, 2016, 4:18:15 AM3/23/16
to TiddlyWiki
Excellent stuff.  I'm currently slogging through making an engineering wiki/ text book for my level 3 students and this could be very handy for exercise questions/ examples.

stephenteacher.tiddlyspot.com

Ste Wilson

unread,
Jul 15, 2016, 3:57:18 PM7/15/16
to TiddlyWiki
On Wednesday, 23 March 2016 03:22:51 UTC, Stephen Kimmel wrote:

Hi Stephen,
Finally got around to trying something with your Mathcell.
I think I have everything set up but it doesn't seem to evaluate any formula.
I'm sure it's a school boy error on my part...

http://stephenteacher.tiddlyspot.com/#Math%20Force
is the tiddler I am using to present the data and as you can see it returns values but doesn't do the calc.

http://stephenteacher.tiddlyspot.com/#Math%20Force%20Data
Is the data tiddler.

Any insight much appreciated.

Stephen W

Mark S.

unread,
Jul 16, 2016, 5:26:47 PM7/16/16
to TiddlyWiki
Hi Stephen W,

Looking over Stephen's (K) code, it looks like you have to use a data tiddler in all lower case. All references to the data tiddler should also be in lower case.

HTH
Mark


On Friday, July 15, 2016 at 12:57:18 PM UTC-7, Ste Wilson wrote:
On Wednesday, 23 March 2016 03:22:51 UTC, Stephen Kimmel  wrote:
> My TiddlyWiki math project, which I'm calling Mathcell, has progressed far enough to actually be of some use to people. So I'm unleashing it on the unsuspecting public in hopes of getting some feedback and comments.

Hi Stephen,

Finally got around to trying something with your Mathcell.
I think I have everything set up but it doesn't seem to evaluate any formula.
I'm sure it's a school boy error on my part...

Ste Wilson

unread,
Jul 16, 2016, 6:48:38 PM7/16/16
to TiddlyWiki
That's got it, thank you.
Now my only problem is how to integrate this without making it ridiculously easy for my students....

reakt...@gmail.com

unread,
Jul 17, 2016, 12:10:20 PM7/17/16
to TiddlyWiki
This is outstanding! I've been looking for something like this for quite some time, thank you so very much!

Only thing left for me to do is find a way to sort the tables in ascending or descending order by clicking column headers. I haven't had much success with that yet.

Josiah

unread,
Jul 17, 2016, 1:56:53 PM7/17/16
to TiddlyWiki
Table sorting is already done for TW. I just can't recall who did it or where the plugin is.

"Sorttable" is a classic Javascript. I mean its phenomenal & been around a long, long time & honed many times.

Someone recently in TW5 impressively replicated well many of its features and without its overhead.

Let's hope they reply here so you can benefit from it.

Best wishes
Josiah

Jed Carty

unread,
Jul 19, 2016, 6:03:21 AM7/19/16
to TiddlyWiki
I made suitable tables using only wikitext but I am not sure if it can be adapted to this situation. The demo site for what I made is here if you want to look http://ooktech.com/jed/ExampleWikis/DynamicTables/

reakt...@gmail.com

unread,
Jul 19, 2016, 1:32:00 PM7/19/16
to tiddl...@googlegroups.com
It appears that only sorting in ascending order works, is it possible to also allow sorting in descending? Also, one of the features I think I like best about the Dynamic Tables is the inline editing, is there a way to enable this in just a wikitext static table?

Ste Wilson

unread,
Jul 20, 2016, 5:16:04 AM7/20/16
to TiddlyWiki
IF OR AND & ELSE

One of the things I do use in excel is conditional statements in cells. I've had a go putting this in a field with:
=@if(accel="?") text = "blah"

Which hopefully means that if the field accel =? then return the text blah.
My question then is, is this not working due to my appalling syntax or is it beyond the scope of Mathcell?

My follow up question is can text be inserted depending on the value of a field using a widget or macro?



On Wednesday, 23 March 2016 03:22:51 UTC, Stephen Kimmel wrote:

Stephen Kimmel

unread,
Jul 21, 2016, 10:33:22 AM7/21/16
to TiddlyWiki
That was beyond the scope of what I was doing with Mathcell when I wrote it. It's an interesting idea and I'll give it some thought. At this point, the extent Mathcell handles text operations is to add them together or simply reference them.
Reply all
Reply to author
Forward
0 new messages