More math: standard-metric converter

179 views
Skip to first unread message

A Gloom

unread,
Nov 4, 2019, 8:45:29 PM11/4/19
to TiddlyWiki


This from the built in help file

  • Decimals (ie: 0.01) and negative numbers (ie: -2) can be entered/typed in text entry field of the "display" of the calculator.
  • The rest of the conversion is automatically filled in by the drop-down select menu (conversion selection).  The converter will handle any conversion using multiplication currently.
    • Most conversions are rounded up at hundreds, can be changed for more accuracy– see editing below.
  • The "=" button is for completing the equation, causing it to produce an answer for the conversion.
  • The "Mn" (memory) button puts the result of an conversion into the first number field, clears the conversion selection, allowing for another conversion to be done with the result of the first conversion.  This can be repeated as many times as desired.

  • Copy to clipboard button saves the result of an operation to clipboard for pasting elsewhere.
  • The "AC" button clears the number entry field and conversion selection.
  • The "?" buttons open a help text tile here.
  • The "Chart" button displays a Standard-Metric conversion chart here in this lower pane.
  • The "Edit" button for an editor for the data tiddler that the select widget draws– will be added.

SPECIAL NOTE:

  • The "RagsConverter" title can be changed by editing the "calcsubtitle" field to what text desired.
ragsconverter.json

A Gloom

unread,
Nov 4, 2019, 9:06:53 PM11/4/19
to TiddlyWiki
already fixing a display bug with the conversion table

Clipboardconv.jpg


@TiddlyTweeter

unread,
Nov 6, 2019, 4:10:05 AM11/6/19
to TiddlyWiki
Ciao A Gloom

Another neat tool by you!

This kind of thing is useful. Small tools category.

Like with "the searchers" it might be good to package and advertise it as an independent bundle or plugin.

By the way on weights, how about a "pounds" to British "stones" converter? :-) Stones makes me less weighty :-).

Best wishes
TT

A Gloom

unread,
Nov 6, 2019, 11:32:13 PM11/6/19
to TiddlyWiki
By the way on weights, how about a "pounds" to British "stones" converter? :-) Stones makes me less weighty :-).

: )  once i add the editor for the stored conversion values (the selection options & table entries), any conversion can be added-- it will use the same editor that the ref wikis bookmark editor and cheat sheets builder use

I need to modify it to accept divide by conversion (shouldn't be too much extra effort)

The converter is part of the RagCalculator XL!1! (which should be out this week) see below

The basic calculator using buttons for add, subtract, multiply, divide (ie 1+2)(important cause it allows use of Mn (see below)), typed entry (Mohammad's math macro) of numbers and math operators

"Multi" mode a string of values all to be operated on by add, subtract, multiply, divide (ie: =5 =9 =1 =3 -2),
"Pi" button for sum (adding) of a series of numbers (ie: 1+2+3), "Σ" button, for product (multiplying) of a series of numbers (ie: 1x2x3)

"Mn" (memory) button puts the result of an operation into a new operation (ie 5+5=, Mn, result1-5=, Mn, result2x4=, Mn...), Copy to clipboard, help display, aux display of the filter syntax producing the math, converter with chart

Clipboardrcalc.jpg


HansWobbe

unread,
Nov 7, 2019, 6:40:50 AM11/7/19
to TiddlyWiki


@ A. Gloom

Your use of ..."Pi" button for sum (adding) of a series of numbers & "Σ" button, for product
Resonated with me because of my time with APL (A Programming Language), which was in part a logically consistent way of teaching algebra.  It introduced the "/" symbol as an operator that applied another operator across all of the element of an argument. For example: " +/ 1 2 " produced 3 as the sum of 1 and 2, while " x/ 1 2 " produced the product of 2.  Of course many other binary operators could also be used such a cieiling (for Largest) and Floor (for smallest)

APL was very well received and earned a "grace Hopper" award for its implementers, as well as achieving considerable commercial success.  The underlying concepts are extremely logical and reduce many of the notation problems that come from trying to standardize the expression of algebraic formulas, functions and operators.

Thank you for sharing your work and for your contributions to the group.


Regards,
Hans


On Wednesday, November 6, 2019 at 11:32:13 PM UTC-5, A Gloom wrote:

...
"Multi" mode a string of values all to be operated on by add, subtract, multiply, divide (ie: =5 =9 =1 =3 -2),
"Pi" button for sum (adding) of a series of numbers (ie: 1+2+3), "Σ" button, for product (multiplying) of a series of numbers (ie: 1x2x3)
...

A Gloom

unread,
Nov 7, 2019, 9:44:27 PM11/7/19
to TiddlyWiki
Hans

Your use of ..."Pi" button for sum (adding) of a series of numbers & "Σ" button, for product
Resonated with me because of my time with APL (A Programming Language),

I was thinking of using APL symbols since they're in extended unicode, was needing short buttons labels (why I used Pi and Σ) but if I add an actual Pi/π key (3.14) I may switch  to +/ for the sum key but I believe there's also a shrunken sum unicode... think ppl would understand +/?
 
It introduced the "/" symbol as an operator that applied another operator across all of the element of an argument. For example: " +/ 1 2 " produced 3 as the sum of 1 and 2, while " x/ 1 2 " produced the product of 2. 

the wikitext sum & product math operators have a similiar layout but reversed

I wonder if thats why they called them reducing operators?

the second function *(what I call multi) of add, subtract, multiply, divide are similar, also reversed
-- =1 =2 =3 +1 (with the calculator-- type in 1 2 3 (1st field) click + button type in 1 (2nd field) click = button)

I was thinking of a dropdown in between text entry fields but went with buttons thinking of a data entry sequence like so:  type in 1 2 3 (1st field), type in 1 (2nd field), click + button, click = button, click Mn button if you want to send result to a new operation)
 
Of course many other binary operators could also be used such a cieiling (for Largest) and Floor (for smallest)

I'm seeing about incorpating the floor and ceil(ing) math operators eventually along with
  • Unary operators apply an operation to each number in the input list (e.g. negate, truncate, sign)
    • =1 =2 =3 =4 +[negate[]] evaluates to -1 -2 -3 -4
    • =1.2 =2.4 =3.6 =4.8 +[trunc[]] evaluates to 1 2 3 4
    • =1.2 =2.4 =3.6 =4.8 +[round[]] evaluates to 1 2 4 5
I believe I can use the macro from my filter builder to allow unlimited chaining (currently at one math filter run) of math operations...


Thank you for sharing your work and for your contributions to the group.

no problem-- the urge to share often overrides the tendency to be solitary-- just retired from a major group project to work on my own stuff and I did say somewhere that the Ref Collective was going to be my grand finale

you would potentially be amused by my resignation "speech"
--*(heav'n alluding to the project, hell to my own pursuits)

A mind not to be changed by place or time.
The mind is its own place, and in itself
Can make a heav'n of hell, a hell of heav'n.
There I may reign secure, and in my choice
to reign is worth ambition though in hell...

HansWobbe

unread,
Nov 9, 2019, 3:58:04 PM11/9/19
to TiddlyWiki
@ A_Gloom

I am not sure people would understand, in spite of the fact that the TiddlyWiki community is much more inclined to accept Symbols, especially as Tags.  One of the frequent complaints about APL was "all of those funny symbols are too hard to understand".  That being said, the trade off was that is was possible to create a function that summed a variable, be it a vector or a higher-order structure, in only 7 keystrokes (as opposed to needing 100+ in COBOL.  The primitive functions were powerful !!


re: ...

A Gloom

unread,
Nov 11, 2019, 4:14:20 AM11/11/19
to TiddlyWiki
Hans
 
I am not sure people would understand, in spite of the fact that the TiddlyWiki community is much more inclined to accept Symbols, especially as Tags.  One of the frequent complaints about APL was "all of those funny symbols are too hard to understand".  That being said, the trade off was that is was possible to create a function that summed a variable, be it a vector or a higher-order structure, in only 7 keystrokes (as opposed to needing 100+ in COBOL.  The primitive functions were powerful !!

I know I need to stop looking at em or i will sidetracked : )  I settled for s+ & px with tooltips giving full name and brief identify info (on right side)

Now the left side-- the Tiddler Explorer is for personal use so I can go with technical symbols-- the regex notations (⊘ for normal regex, ^ for start of line, \b for start of word) for the search bar checkboxes.

the interesting thing about both the calculator and the explorer-- they demonstrate/display the filters used/created by each and have copy to clipboard functionality-- the explorer can be a filter builder (one for the count widget with filter and one for a filter for list widgets or making a export json in advanced search)

Clipboardtiddexpxl.jpg


HansWobbe

unread,
Nov 11, 2019, 10:54:38 AM11/11/19
to TiddlyWiki
At the risk of distracting you (which I certainly do not want to do), it might make sense to make the buttons configurable, to take advantage of the extremely large number of CodePoint options that exist.  After all, TW's UTF8 support makes it quite easy for each person to develop their very own alphabet of symbols thereby creating a personalized learning environment.  ( I started using the Date symbols to form dense Date representations and seem to be progressing ever deeper into the rich Chinese language and the emerging CJK compatibility copdePoints.  Perhaps Wp:BeltAndRoad aspirations are not limited to the physical world. )

...
I know I need to stop looking at em or i will sidetracked : )  I settled for s+ & px with tooltips giving full name and brief identify info (on right side)
...


A Gloom

unread,
Nov 11, 2019, 11:09:42 PM11/11/19
to TiddlyWiki
Hans

At the risk of distracting you (which I certainly do not want to do), it might make sense to make the buttons configurable, to take advantage of the extremely large number of CodePoint options that exist.  After all, TW's UTF8 support makes it quite easy for each person to develop their very own alphabet of symbols thereby creating a personalized learning environment. 

Too late, I'm sidetracked-- we'll now will have the RagsCalculator with customizable Hans keys :)
 
( I started using the Date symbols to form dense Date representations and seem to be progressing ever deeper into the rich Chinese language and the emerging CJK compatibility copdePoints.  Perhaps Wp:BeltAndRoad aspirations are not limited to the physical world. )

oooh, something else to delve into...

HansWobbe

unread,
Nov 13, 2019, 10:49:00 PM11/13/19
to TiddlyWiki

On Monday, November 11, 2019 at 11:09:42 PM UTC-5, A Gloom wrote:
...
 
Too late, I'm sidetracked-- we'll now will have the RagsCalculator with customizable Hans keys :)
 
oooh, something else to delve into...


Gloom:

I am honored that there may be Hans keys.  After 50 years of marriage, it will be interesting to see how others might push my buttons :-)

A Gloom

unread,
Nov 13, 2019, 11:25:11 PM11/13/19
to TiddlyWiki

I am honored that there may be Hans keys.  After 50 years of marriage, it will be interesting to see how others might push my buttons :-)


lol, 50? wow, just hiting 20-- Fri, the 13tth of Dec 2013 was the 13th anniversary-- and considering the wedding gift was a black cat...
Reply all
Reply to author
Forward
0 new messages