[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-01-16 Thread Evan Balster
I've started this new thread because some users were complaining that the 
length of the previous thread 
 
was making it hard to read and navigate on some devices.

Changelog for version 0.2.1:

0.2.1 — January 16, 2018
   
   - Implemented /* comments */ in the C/JavaScript style.
   - Implemented closures 
    — 
   functions can now "capture" local variables declared outside them.
  - Note: Variables are captured from the place a function is declared, 
  not where it is used.
   - Added the join function, which is simpler than textjoin.
   - Fixed a major error in value conversion that caused a reversion to 
   JavaScript behaviors.
   - Fixed the transclude_index function.



On Wednesday, 17 January 2018 01:15:24 UTC-6, Evan Balster wrote:
>
> Announcing the second generation of my formula plugin for TiddlyWiki.
>
> See the *Formula wiki* for the latest documentation:  
> http://evanbalster.com/tiddlywiki/formulas.html
>
> *Report issues and view source GitHub*:  
> https://github.com/EvanBalster/TiddlyWikiFormula
>
>
> Formula lets you do computation in TiddlyWiki in the style of popular 
> spreadsheet apps Excel and Google Sheets, with the addition of TiddlyWiki's 
> own filter, transclude and variable systems.  Tiddlers can behave like 
> individual rows in a spreadsheet.  A large collection of built-in functions 
> is included, for use with text, numbers, dates, arrays and regular 
> expressions.
>
> Formula is implemented as a widget, with a special *(=* "mushroom 
> bracket" *=)* syntax for inclusion in WikiText, and can also be used in 
> widget/HTML attributes.  Formulas included via transclusion, filters and 
> variables are computed and refreshed like any other part of your wiki.
>
> (= ( sum([tag[Profits]get[value]]) - sum(tag[Expenses]get[value]]) ) * {{
> Tax!!rate}} =)
>
> The second generation of formula adds support for local variables, 
> comments, lambda functions and element-wise operations on arrays (such as 
> filter results), allowing more advanced computations to be expressed inside 
> TiddlyWiki.  Search the wiki for "demo" to see some of the things I've 
> built.
>
>
> The plugin is a work in progress and may have bugs.  Please report these 
> on GitHub or in this thread.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/6fbbf1ee-6a93-4a41-a310-ec81b6fb4893%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-01-17 Thread @TiddlyTweeter
Ciao Evan

IMO, this plugin is SO rich it deserves an EXAMPLE CHANNEL.

I'm wondering if you'd be okay if I started another thread about developing 
examples of usage? Not necessarily for you to answer on but also other folk 
who are developing grasp of what it can do?

FWIW, I'm down on the farm of basic accounts, but I could probably rise to 
the challenge of how you could use your math to visually create kinship 
charts.

Josiah

 

On Wednesday, 17 January 2018 08:17:14 UTC+1, Evan Balster wrote:
>
> I've started this new thread because some users were complaining that the 
> length of the previous thread 
>  
> was making it hard to read and navigate on some devices.
>
> Changelog for version 0.2.1:
>
> 0.2.1 — January 16, 2018
>
>- Implemented /* comments */ in the C/JavaScript style.
>- Implemented closures 
> — 
>functions can now "capture" local variables declared outside them.
>   - Note: Variables are captured from the place a function is 
>   declared, not where it is used.
>- Added the join function, which is simpler than textjoin.
>- Fixed a major error in value conversion that caused a reversion to 
>JavaScript behaviors.
>- Fixed the transclude_index function.
>
>
>
> On Wednesday, 17 January 2018 01:15:24 UTC-6, Evan Balster wrote:
>>
>> Announcing the second generation of my formula plugin for TiddlyWiki.
>>
>> See the *Formula wiki* for the latest documentation:  
>> http://evanbalster.com/tiddlywiki/formulas.html
>>
>> *Report issues and view source GitHub*:  
>> https://github.com/EvanBalster/TiddlyWikiFormula
>>
>>
>> Formula lets you do computation in TiddlyWiki in the style of popular 
>> spreadsheet apps Excel and Google Sheets, with the addition of TiddlyWiki's 
>> own filter, transclude and variable systems.  Tiddlers can behave like 
>> individual rows in a spreadsheet.  A large collection of built-in functions 
>> is included, for use with text, numbers, dates, arrays and regular 
>> expressions.
>>
>> Formula is implemented as a widget, with a special *(=* "mushroom 
>> bracket" *=)* syntax for inclusion in WikiText, and can also be used in 
>> widget/HTML attributes.  Formulas included via transclusion, filters and 
>> variables are computed and refreshed like any other part of your wiki.
>>
>> (= ( sum([tag[Profits]get[value]]) - sum(tag[Expenses]get[value]]) ) * {{
>> Tax!!rate}} =)
>>
>> The second generation of formula adds support for local variables, 
>> comments, lambda functions and element-wise operations on arrays (such as 
>> filter results), allowing more advanced computations to be expressed inside 
>> TiddlyWiki.  Search the wiki for "demo" to see some of the things I've 
>> built.
>>
>>
>> The plugin is a work in progress and may have bugs.  Please report these 
>> on GitHub or in this thread.
>>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/2a4eba54-b9e4-43fb-89a9-9f5b55941632%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-01-17 Thread Stephen Wilson
Hi Evan,
Don't know if your aware, or if it's useful, but Matt did some graph work 
last year.

http://graphs.tiddlyspot.com/

On Wednesday, 17 January 2018 11:19:45 UTC, @TiddlyTweeter wrote:
>
> Ciao Evan
>
> IMO, this plugin is SO rich it deserves an EXAMPLE CHANNEL.
>
> I'm wondering if you'd be okay if I started another thread about 
> developing examples of usage? Not necessarily for you to answer on but also 
> other folk who are developing grasp of what it can do?
>
> FWIW, I'm down on the farm of basic accounts, but I could probably rise to 
> the challenge of how you could use your math to visually create kinship 
> charts.
>
> Josiah
>
>  
>
> On Wednesday, 17 January 2018 08:17:14 UTC+1, Evan Balster wrote:
>>
>> I've started this new thread because some users were complaining that the 
>> length of the previous thread 
>>  
>> was making it hard to read and navigate on some devices.
>>
>> Changelog for version 0.2.1:
>>
>> 0.2.1 — January 16, 2018
>>
>>- Implemented /* comments */ in the C/JavaScript style.
>>- Implemented closures 
>> — 
>>functions can now "capture" local variables declared outside them.
>>   - Note: Variables are captured from the place a function is 
>>   declared, not where it is used.
>>- Added the join function, which is simpler than textjoin.
>>- Fixed a major error in value conversion that caused a reversion to 
>>JavaScript behaviors.
>>- Fixed the transclude_index function.
>>
>>
>>
>> On Wednesday, 17 January 2018 01:15:24 UTC-6, Evan Balster wrote:
>>>
>>> Announcing the second generation of my formula plugin for TiddlyWiki.
>>>
>>> See the *Formula wiki* for the latest documentation:  
>>> http://evanbalster.com/tiddlywiki/formulas.html
>>>
>>> *Report issues and view source GitHub*:  
>>> https://github.com/EvanBalster/TiddlyWikiFormula
>>>
>>>
>>> Formula lets you do computation in TiddlyWiki in the style of popular 
>>> spreadsheet apps Excel and Google Sheets, with the addition of TiddlyWiki's 
>>> own filter, transclude and variable systems.  Tiddlers can behave like 
>>> individual rows in a spreadsheet.  A large collection of built-in functions 
>>> is included, for use with text, numbers, dates, arrays and regular 
>>> expressions.
>>>
>>> Formula is implemented as a widget, with a special *(=* "mushroom 
>>> bracket" *=)* syntax for inclusion in WikiText, and can also be used in 
>>> widget/HTML attributes.  Formulas included via transclusion, filters and 
>>> variables are computed and refreshed like any other part of your wiki.
>>>
>>> (= ( sum([tag[Profits]get[value]]) - sum(tag[Expenses]get[value]]) ) * 
>>> {{Tax!!rate}} =)
>>>
>>> The second generation of formula adds support for local variables, 
>>> comments, lambda functions and element-wise operations on arrays (such as 
>>> filter results), allowing more advanced computations to be expressed inside 
>>> TiddlyWiki.  Search the wiki for "demo" to see some of the things I've 
>>> built.
>>>
>>>
>>> The plugin is a work in progress and may have bugs.  Please report these 
>>> on GitHub or in this thread.
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/4913e897-576f-42c5-9429-4aa040f681a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-01-17 Thread PMario
On Wednesday, January 17, 2018 at 8:15:24 AM UTC+1, Evan Balster wrote:
>
> Announcing the second generation of my formula plugin for TiddlyWiki.
>
> See the *Formula wiki* for the latest documentation:  
> http://evanbalster.com/tiddlywiki/formulas.html
>

Great Work!

I just had a view about your licensing. ... Most of your plugins use MIT 
license, which is great. ... But some don't have any license. ... 

You also should consider, to switch those plugins, that you want to be part 
of the TiddlyWiki core, to be "BSD 3 clause" see: [1]. OR you can also use 
a dual license, for those parts. MIT and BSD-3clause work well together but 
the TW core needs BSD [1]

Just to be clearer. ... If you stay with MIT, it won't be a big problem, 
because MIT allows us to change the license to BSD, once we include stuff 
from your plugins into the core [2]. The other way around would not be 
possible, except with a dual-license. 

have fun!
mario

[1] 
https://github.com/Jermolene/TiddlyWiki5/blob/master/licenses/cla-individual.md#23-outbound-license
[2] 
https://en.wikipedia.org/wiki/License_compatibility#Compatibility_of_FOSS_licenses

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/05ffaefe-a358-4cc0-9946-2d6249a45320%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-01-18 Thread hubertgk
Hi Evan,

Great work on the plugin! 

Just wondering, has IFERROR been implemented yet? It's listed as a function 
under 'Selection' but when I try to use it I get the following exception:

CompileError: unknown function: IFERROR

I'm on version 2.1. The online 'Try Me' field shows the same error.

Thanks!

On Wednesday, 17 January 2018 12:57:25 UTC, PMario wrote:
>
> On Wednesday, January 17, 2018 at 8:15:24 AM UTC+1, Evan Balster wrote:
>>
>> Announcing the second generation of my formula plugin for TiddlyWiki.
>>
>> See the *Formula wiki* for the latest documentation:  
>> http://evanbalster.com/tiddlywiki/formulas.html
>>
>
> Great Work!
>
> I just had a view about your licensing. ... Most of your plugins use MIT 
> license, which is great. ... But some don't have any license. ... 
>
> You also should consider, to switch those plugins, that you want to be 
> part of the TiddlyWiki core, to be "BSD 3 clause" see: [1]. OR you can also 
> use a dual license, for those parts. MIT and BSD-3clause work well together 
> but the TW core needs BSD [1]
>
> Just to be clearer. ... If you stay with MIT, it won't be a big problem, 
> because MIT allows us to change the license to BSD, once we include stuff 
> from your plugins into the core [2]. The other way around would not be 
> possible, except with a dual-license. 
>
> have fun!
> mario
>
> [1] 
> https://github.com/Jermolene/TiddlyWiki5/blob/master/licenses/cla-individual.md#23-outbound-license
> [2] 
> https://en.wikipedia.org/wiki/License_compatibility#Compatibility_of_FOSS_licenses
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/3de36e8a-ea5a-4416-81f5-06eecd1faf63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-01-18 Thread Abraham Samma
A little off topic here (great work Evan) but the problem of licensing or 
lack thereof is an issue for many useful TW5 plugins, here's an example 
, a useful one by 
Danielo Rodriguez but with no license (if he sees this, could he possibly 
clarify the rights given for his plugin if any). 

It would be very useful for all potential plugin authors present and future 
to please include an up to date license for your works. It really helps and 
it is super important I believe.

This probably deserves its own thread. Apologies.

On Wednesday, January 17, 2018 at 3:57:25 PM UTC+3, PMario wrote:
>
> On Wednesday, January 17, 2018 at 8:15:24 AM UTC+1, Evan Balster wrote:
>>
>> Announcing the second generation of my formula plugin for TiddlyWiki.
>>
>> See the *Formula wiki* for the latest documentation:  
>> http://evanbalster.com/tiddlywiki/formulas.html
>>
>
> Great Work!
>
> I just had a view about your licensing. ... Most of your plugins use MIT 
> license, which is great. ... But some don't have any license. ... 
>
> You also should consider, to switch those plugins, that you want to be 
> part of the TiddlyWiki core, to be "BSD 3 clause" see: [1]. OR you can also 
> use a dual license, for those parts. MIT and BSD-3clause work well together 
> but the TW core needs BSD [1]
>
> Just to be clearer. ... If you stay with MIT, it won't be a big problem, 
> because MIT allows us to change the license to BSD, once we include stuff 
> from your plugins into the core [2]. The other way around would not be 
> possible, except with a dual-license. 
>
> have fun!
> mario
>
> [1] 
> https://github.com/Jermolene/TiddlyWiki5/blob/master/licenses/cla-individual.md#23-outbound-license
> [2] 
> https://en.wikipedia.org/wiki/License_compatibility#Compatibility_of_FOSS_licenses
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/0326ce92-e0a6-4547-b453-53991004828d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-01-18 Thread Evan Balster
Hey, all —

You also should consider, to switch those plugins, that you want to be part 
> of the TiddlyWiki core, to be "BSD 3 clause"
>

I can do this the next time I make an update.  With formula in particular 
I'm expecting a period of maturation and conversation with core developers 
before it's considered for a merge.  I'm doing a lot of cowboy coding at 
this stage. 

I'm wondering if you'd be okay if I started another thread about developing 
> examples of usage? Not necessarily for you to answer on but also other folk 
> who are developing grasp of what it can do?
>

Makes perfect sense to me.  I would have some examples to contribute, 
myself.  And I might incorporate others into the formula wiki's repository 
of demos. 

It would be very useful for all potential plugin authors present and future 
> to please include an up to date license for your works. It really helps and 
> it is super important I believe.  This probably deserves its own thread. 
> Apologies. 


Also very sensible.  Make a PSA thread!

Don't know if your aware, or if it's useful, but Matt did some graph work 
> last year.
>

Neat!  I'm working to make formula powerful enough that graphs can be made 
by combining SVG and formula code.  Any input on that is welcome — I'm 
currently writing some complicated programs to test the programming 
capabilities and see what sort of walls I run into.

Just wondering, has IFERROR been implemented yet?
>

What, I have to implement things before I document them?  :)  But 
seriously, that one's my bad.  I think it's commented out in the 
implementation code.  I'll look into fixing that next update.

Because the complexity of what can be written in formula is rapidly 
increasing, I'm thinking about ways to improve the plugin's error 
reporting.  Specifically, it's often used in places (attributes, SVG) where 
error text won't be visible...  It's also useful to know when an error 
originates inside a certain function, LET value or transclusion...


On Wednesday, 17 January 2018 01:15:24 UTC-6, Evan Balster wrote:
>
> Announcing the second generation of my formula plugin for TiddlyWiki.
>
> See the *Formula wiki* for the latest documentation:  
> http://evanbalster.com/tiddlywiki/formulas.html
>
> *Report issues and view source GitHub*:  
> https://github.com/EvanBalster/TiddlyWikiFormula
>
>
> Formula lets you do computation in TiddlyWiki in the style of popular 
> spreadsheet apps Excel and Google Sheets, with the addition of TiddlyWiki's 
> own filter, transclude and variable systems.  Tiddlers can behave like 
> individual rows in a spreadsheet.  A large collection of built-in functions 
> is included, for use with text, numbers, dates, arrays and regular 
> expressions.
>
> Formula is implemented as a widget, with a special *(=* "mushroom 
> bracket" *=)* syntax for inclusion in WikiText, and can also be used in 
> widget/HTML attributes.  Formulas included via transclusion, filters and 
> variables are computed and refreshed like any other part of your wiki.
>
> (= ( sum([tag[Profits]get[value]]) - sum(tag[Expenses]get[value]]) ) * {{
> Tax!!rate}} =)
>
> The second generation of formula adds support for local variables, 
> comments, lambda functions and element-wise operations on arrays (such as 
> filter results), allowing more advanced computations to be expressed inside 
> TiddlyWiki.  Search the wiki for "demo" to see some of the things I've 
> built.
>
>
> The plugin is a work in progress and may have bugs.  Please report these 
> on GitHub or in this thread.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/78634ebb-1545-4105-a013-0b6b489cc4d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-01-18 Thread Mr. Mal
I think the now and date function not working in this release. May be 
others can confirm this "bug". 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/d3f5cd5f-4805-4f29-a19a-a65e8e769e8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-01-18 Thread Diego Mesa
Hm - Maybe a great time for all of us start contributing tests! 

On Thursday, January 18, 2018 at 10:18:55 PM UTC-6, Mr. Mal wrote:
>
> I think the now and date function not working in this release. May be 
> others can confirm this "bug". 
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/1201a5ea-6a5f-4df0-8cd2-b3bb403cd5b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-01-18 Thread Evan Balster
Bug(s) confirmed — array and date formatting aren't working correctly.  
Need to investigate why.

There is also an issue with parsing block comments in Formula 0.2.1, which 
has been fixed in the repo.

Suggested format for unit-test and bug-repro contributions:

   - Tag with "FormulaTest"
   - Prefix "Test/"
   - Text comprises a single formula construct (of any type) whose result 
   should render to TRUE, *or* match the result of rendering field "match" of 
   the tiddler if present.
   - Submitted as JSON files here


On Thursday, 18 January 2018 22:18:55 UTC-6, Mr. Mal wrote:
>
> I think the now and date function not working in this release. May be 
> others can confirm this "bug". 
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/623ee922-35a6-4c55-9779-1ead5815e186%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-01-19 Thread Diego Mesa
Hey Evan,

I was going to start adding some more, but the format you described above 
is slightly different than the previous one:

http://evanbalster.com/tiddlywiki/formulas.html#UnitTest%2FFunctions%2Fnth%2Fsorted-return

Which do you think we should stick with?

Diego 

On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:
>
> Bug(s) confirmed — array and date formatting aren't working correctly.  
> Need to investigate why.
>
> There is also an issue with parsing block comments in Formula 0.2.1, which 
> has been fixed in the repo.
>
> Suggested format for unit-test and bug-repro contributions:
>
>- Tag with "FormulaTest"
>- Prefix "Test/"
>- Text comprises a single formula construct (of any type) whose result 
>should render to TRUE, *or* match the result of rendering field "match" of 
>the tiddler if present.
>- Submitted as JSON files here
>
>
> On Thursday, 18 January 2018 22:18:55 UTC-6, Mr. Mal wrote:
>>
>> I think the now and date function not working in this release. May be 
>> others can confirm this "bug". 
>>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/c9cad08e-f18a-486f-8dff-ca07810d13ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-01-19 Thread Evan Balster
Both formats look good, so I'll take the best parts of each:

   - Unit tests:
  - Tiddlers tagged with FormulaTest.
  - Text is expected to render to TRUE
 - Advanced: If the field match is present on the tiddler, text is 
 instead expected to render to the same result as rendering match.
  - Name using a prefix scheme based on the test subject
 - Bugs: FormulaTest/Regression/
 - Functions: FormulaTest/Functions//
- Function names in ALL CAPS
 - Language: FormulaTest/Feature//
- Feature names being things like "Let", "Function", "Closure", 
"Transclude"
 - Syntax & Compilation: FormulaTest/Compiler//
 - Miscellaneous Tests: FormulaTest/Misc/
  - Additional tiddlers used as data in unit tests:
  - Tag with FormulaTestData.
  - Prefix with the unit test's fully-prefixed name, with an additional 
  slash and name.
   
Ideally, unit tests and bug repros should be submitted on GitHub (see my 
call for unit tests there 
) but uploading 
JSON files in this thread is OK too.

On Friday, 19 January 2018 10:37:43 UTC-6, Diego Mesa wrote:
>
> Hey Evan,
>
> I was going to start adding some more, but the format you described above 
> is slightly different than the previous one:
>
>
> http://evanbalster.com/tiddlywiki/formulas.html#UnitTest%2FFunctions%2Fnth%2Fsorted-return
>
> Which do you think we should stick with?
>
> Diego 
>
> On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:
>>
>> Bug(s) confirmed — array and date formatting aren't working correctly.  
>> Need to investigate why.
>>
>> There is also an issue with parsing block comments in Formula 0.2.1, 
>> which has been fixed in the repo.
>>
>> Suggested format for unit-test and bug-repro contributions:
>>
>>- Tag with "FormulaTest"
>>- Prefix "Test/"
>>- Text comprises a single formula construct (of any type) whose 
>>result should render to TRUE, *or* match the result of rendering field 
>>"match" of the tiddler if present.
>>- Submitted as JSON files here
>>
>>
>> On Thursday, 18 January 2018 22:18:55 UTC-6, Mr. Mal wrote:
>>>
>>> I think the now and date function not working in this release. May be 
>>> others can confirm this "bug". 
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/84cf0450-4e1f-4a80-8fad-a37d987b6bec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-01 Thread Diego Mesa
Hey all,

I am trying to use this plugin in button actions like so:

\define updateActions(newVal)
> <$action-setfield $field="t1" $value="0"/>
> <$action-setfield $field="t2" $value=$newVal$/>
> <$action-setfield $field="t3" $value=(=3+1=)/>
> <$action-setfield $field="t4" $value=(={{!!t3}}+20=)/>
> \end
>
>
> <$button actions=<> >
> Do it!
> 
>


I am trying to make a spaced-repetition system like this. Any help would be 
greately appreciated! 


On Friday, January 19, 2018 at 2:44:29 PM UTC-6, Evan Balster wrote:
>
> Both formats look good, so I'll take the best parts of each:
>
>- Unit tests:
>   - Tiddlers tagged with FormulaTest.
>   - Text is expected to render to TRUE
>  - Advanced: If the field match is present on the tiddler, text 
>  is instead expected to render to the same result as rendering 
>  match.
>   - Name using a prefix scheme based on the test subject
>  - Bugs: FormulaTest/Regression/
>  - Functions: FormulaTest/Functions//
> - Function names in ALL CAPS
>  - Language: FormulaTest/Feature//
> - Feature names being things like "Let", "Function", 
> "Closure", "Transclude"
>  - Syntax & Compilation: FormulaTest/Compiler/  Name>/
>  - Miscellaneous Tests: FormulaTest/Misc/
>   - Additional tiddlers used as data in unit tests:
>   - Tag with FormulaTestData.
>   - Prefix with the unit test's fully-prefixed name, with an 
>   additional slash and name.
>
> Ideally, unit tests and bug repros should be submitted on GitHub (see my 
> call for unit tests there 
> ) but 
> uploading JSON files in this thread is OK too.
>
> On Friday, 19 January 2018 10:37:43 UTC-6, Diego Mesa wrote:
>>
>> Hey Evan,
>>
>> I was going to start adding some more, but the format you described above 
>> is slightly different than the previous one:
>>
>>
>> http://evanbalster.com/tiddlywiki/formulas.html#UnitTest%2FFunctions%2Fnth%2Fsorted-return
>>
>> Which do you think we should stick with?
>>
>> Diego 
>>
>> On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:
>>>
>>> Bug(s) confirmed — array and date formatting aren't working correctly.  
>>> Need to investigate why.
>>>
>>> There is also an issue with parsing block comments in Formula 0.2.1, 
>>> which has been fixed in the repo.
>>>
>>> Suggested format for unit-test and bug-repro contributions:
>>>
>>>- Tag with "FormulaTest"
>>>- Prefix "Test/"
>>>- Text comprises a single formula construct (of any type) whose 
>>>result should render to TRUE, *or* match the result of rendering field 
>>>"match" of the tiddler if present.
>>>- Submitted as JSON files here
>>>
>>>
>>> On Thursday, 18 January 2018 22:18:55 UTC-6, Mr. Mal wrote:

 I think the now and date function not working in this release. May be 
 others can confirm this "bug". 

>>>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/28c238ca-c797-466a-97f5-0b8cbf64e2ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-01 Thread Diego Mesa
Hey all,

Sorry a better example of what Im trying to accomplish:

<$button >
<$formula-vars val1="2+3" val2="<>+6" val3="{{!!t2}}+12">
<$action-setfield $field="t1" $value=<>/>
<$action-setfield $field="t2" $value=<>/>
<$action-setfield $field="t3" $value=<>/>

Do it!



I can understand why it wouldn't work, but it seems tobias' excellent 
setvars plugin will allow you to do something like this:


<$setvars
_attr1=<>
_attr2={{!!title}}
_attr3="1 2 3"
_attr4="[all[current]tagging[]]"
var1="attr1 \ = literal = \ attr2"
var2="attr3[n] \ \ [attr4[1,2][when-empty]] \ \ [attr3[][][ - ]]"
var3="if(attr1 ? [attr4]) || attr3 attr2"
var4="if(attr1 == attr2 ? attr3[1]) || [attr3[2]]">
* <>
* <>
* <>
* <>



 Does formula let you do this type of cascading? 

On Thursday, February 1, 2018 at 2:32:34 PM UTC-6, Diego Mesa wrote:
>
> Hey all,
>
> I am trying to use this plugin in button actions like so:
>
> \define updateActions(newVal)
>> <$action-setfield $field="t1" $value="0"/>
>> <$action-setfield $field="t2" $value=$newVal$/>
>> <$action-setfield $field="t3" $value=(=3+1=)/>
>> <$action-setfield $field="t4" $value=(={{!!t3}}+20=)/>
>> \end
>>
>>
>> <$button actions=<> >
>> Do it!
>> 
>>
>
>
> I am trying to make a spaced-repetition system like this. Any help would 
> be greately appreciated! 
>
>
> On Friday, January 19, 2018 at 2:44:29 PM UTC-6, Evan Balster wrote:
>>
>> Both formats look good, so I'll take the best parts of each:
>>
>>- Unit tests:
>>   - Tiddlers tagged with FormulaTest.
>>   - Text is expected to render to TRUE
>>  - Advanced: If the field match is present on the tiddler, text 
>>  is instead expected to render to the same result as rendering 
>>  match.
>>   - Name using a prefix scheme based on the test subject
>>  - Bugs: FormulaTest/Regression/
>>  - Functions: FormulaTest/Functions//
>> - Function names in ALL CAPS
>>  - Language: FormulaTest/Feature//
>> - Feature names being things like "Let", "Function", 
>> "Closure", "Transclude"
>>  - Syntax & Compilation: FormulaTest/Compiler/>  Name>/
>>  - Miscellaneous Tests: FormulaTest/Misc/
>>   - Additional tiddlers used as data in unit tests:
>>   - Tag with FormulaTestData.
>>   - Prefix with the unit test's fully-prefixed name, with an 
>>   additional slash and name.
>>
>> Ideally, unit tests and bug repros should be submitted on GitHub (see my 
>> call for unit tests there 
>> ) but 
>> uploading JSON files in this thread is OK too.
>>
>> On Friday, 19 January 2018 10:37:43 UTC-6, Diego Mesa wrote:
>>>
>>> Hey Evan,
>>>
>>> I was going to start adding some more, but the format you described 
>>> above is slightly different than the previous one:
>>>
>>>
>>> http://evanbalster.com/tiddlywiki/formulas.html#UnitTest%2FFunctions%2Fnth%2Fsorted-return
>>>
>>> Which do you think we should stick with?
>>>
>>> Diego 
>>>
>>> On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:

 Bug(s) confirmed — array and date formatting aren't working correctly.  
 Need to investigate why.

 There is also an issue with parsing block comments in Formula 0.2.1, 
 which has been fixed in the repo.

 Suggested format for unit-test and bug-repro contributions:

- Tag with "FormulaTest"
- Prefix "Test/"
- Text comprises a single formula construct (of any type) whose 
result should render to TRUE, *or* match the result of rendering field 
"match" of the tiddler if present.
- Submitted as JSON files here


 On Thursday, 18 January 2018 22:18:55 UTC-6, Mr. Mal wrote:
>
> I think the now and date function not working in this release. May be 
> others can confirm this "bug". 
>


-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/79735907-0328-4d93-8914-c3bdd716064e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-01 Thread Diego Mesa
Update: 

This cascading does indeed work:

<$button >
<$formula-vars val1="2+3">
<$action-setfield $field="t1" $value=<>/>
<$formula-vars val2="<> + 10">
<$action-setfield $field="t2" $value=<>/>
<$formula-vars val3="<> + 100">
<$action-setfield $field="t3" $value=<>/>



Do it!




On Thursday, February 1, 2018 at 2:57:44 PM UTC-6, Diego Mesa wrote:
>
> Hey all,
>
> Sorry a better example of what Im trying to accomplish:
>
> <$button >
> <$formula-vars val1="2+3" val2="<>+6" val3="{{!!t2}}+12">
> <$action-setfield $field="t1" $value=<>/>
> <$action-setfield $field="t2" $value=<>/>
> <$action-setfield $field="t3" $value=<>/>
> 
> Do it!
> 
>
>
> I can understand why it wouldn't work, but it seems tobias' excellent 
> setvars plugin will allow you to do something like this:
>
>
> <$setvars
> _attr1=<>
> _attr2={{!!title}}
> _attr3="1 2 3"
> _attr4="[all[current]tagging[]]"
> var1="attr1 \ = literal = \ attr2"
> var2="attr3[n] \ \ [attr4[1,2][when-empty]] \ \ [attr3[][][ - ]]"
> var3="if(attr1 ? [attr4]) || attr3 attr2"
> var4="if(attr1 == attr2 ? attr3[1]) || [attr3[2]]">
> * <>
> * <>
> * <>
> * <>
> 
>
>
>  Does formula let you do this type of cascading? 
>
> On Thursday, February 1, 2018 at 2:32:34 PM UTC-6, Diego Mesa wrote:
>>
>> Hey all,
>>
>> I am trying to use this plugin in button actions like so:
>>
>> \define updateActions(newVal)
>>> <$action-setfield $field="t1" $value="0"/>
>>> <$action-setfield $field="t2" $value=$newVal$/>
>>> <$action-setfield $field="t3" $value=(=3+1=)/>
>>> <$action-setfield $field="t4" $value=(={{!!t3}}+20=)/>
>>> \end
>>>
>>>
>>> <$button actions=<> >
>>> Do it!
>>> 
>>>
>>
>>
>> I am trying to make a spaced-repetition system like this. Any help would 
>> be greately appreciated! 
>>
>>
>> On Friday, January 19, 2018 at 2:44:29 PM UTC-6, Evan Balster wrote:
>>>
>>> Both formats look good, so I'll take the best parts of each:
>>>
>>>- Unit tests:
>>>   - Tiddlers tagged with FormulaTest.
>>>   - Text is expected to render to TRUE
>>>  - Advanced: If the field match is present on the tiddler, text 
>>>  is instead expected to render to the same result as rendering 
>>>  match.
>>>   - Name using a prefix scheme based on the test subject
>>>  - Bugs: FormulaTest/Regression/
>>>  - Functions: FormulaTest/Functions//
>>> - Function names in ALL CAPS
>>>  - Language: FormulaTest/Feature//
>>> - Feature names being things like "Let", "Function", 
>>> "Closure", "Transclude"
>>>  - Syntax & Compilation: FormulaTest/Compiler/>>  Name>/
>>>  - Miscellaneous Tests: FormulaTest/Misc/
>>>   - Additional tiddlers used as data in unit tests:
>>>   - Tag with FormulaTestData.
>>>   - Prefix with the unit test's fully-prefixed name, with an 
>>>   additional slash and name.
>>>
>>> Ideally, unit tests and bug repros should be submitted on GitHub (see 
>>> my call for unit tests there 
>>> ) but 
>>> uploading JSON files in this thread is OK too.
>>>
>>> On Friday, 19 January 2018 10:37:43 UTC-6, Diego Mesa wrote:

 Hey Evan,

 I was going to start adding some more, but the format you described 
 above is slightly different than the previous one:


 http://evanbalster.com/tiddlywiki/formulas.html#UnitTest%2FFunctions%2Fnth%2Fsorted-return

 Which do you think we should stick with?

 Diego 

 On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:
>
> Bug(s) confirmed — array and date formatting aren't working 
> correctly.  Need to investigate why.
>
> There is also an issue with parsing block comments in Formula 0.2.1, 
> which has been fixed in the repo.
>
> Suggested format for unit-test and bug-repro contributions:
>
>- Tag with "FormulaTest"
>- Prefix "Test/"
>- Text comprises a single formula construct (of any type) whose 
>result should render to TRUE, *or* match the result of rendering field 
>"match" of the tiddler if present.
>- Submitted as JSON files here
>
>
> On Thursday, 18 January 2018 22:18:55 UTC-6, Mr. Mal wrote:
>>
>> I think the now and date function not working in this release. May be 
>> others can confirm this "bug". 
>>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/7dc92ef4-5c72-420e-a5bf-d11c12c8513b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-01 Thread Evan Balster
Hey, Diego —

I've been interested in supporting "cascading" in a single widget in 
formula-vars, but there's no way for a widget to know the order in which 
attributes are written with certainty.  For that reason and because I've 
now implemented "cascading" in formulas' LET construct, I've been thinking 
about adding an idiom for constructing key-value objects in formulas, and 
making it possible to export one of these as a set of TiddlyWiki variables.

That would look something like this:

<$formula-vars $dict="""
  dict(
t1 = 0,
t2 = <>,
t3 = 3+1,
t4 = t3+20)
  """>
  ...


At which point the primitive objects usable in formulas start to look a lot 
like JavaScript's!  Hashmaps (aka "objects" aka "dictionaries") are useful 
for lots of things...

On Thursday, 1 February 2018 15:07:36 UTC-6, Diego Mesa wrote:
>
> Update: 
>
> This cascading does indeed work:
>
> <$button >
> <$formula-vars val1="2+3">
> <$action-setfield $field="t1" $value=<>/>
> <$formula-vars val2="<> + 10">
> <$action-setfield $field="t2" $value=<>/>
> <$formula-vars val3="<> + 100">
> <$action-setfield $field="t3" $value=<>/>
> 
> 
> 
> Do it!
> 
>
>
>
> On Thursday, February 1, 2018 at 2:57:44 PM UTC-6, Diego Mesa wrote:
>>
>> Hey all,
>>
>> Sorry a better example of what Im trying to accomplish:
>>
>> <$button >
>> <$formula-vars val1="2+3" val2="<>+6" val3="{{!!t2}}+12">
>> <$action-setfield $field="t1" $value=<>/>
>> <$action-setfield $field="t2" $value=<>/>
>> <$action-setfield $field="t3" $value=<>/>
>> 
>> Do it!
>> 
>>
>>
>> I can understand why it wouldn't work, but it seems tobias' excellent 
>> setvars plugin will allow you to do something like this:
>>
>>
>> <$setvars
>> _attr1=<>
>> _attr2={{!!title}}
>> _attr3="1 2 3"
>> _attr4="[all[current]tagging[]]"
>> var1="attr1 \ = literal = \ attr2"
>> var2="attr3[n] \ \ [attr4[1,2][when-empty]] \ \ [attr3[][][ - ]]"
>> var3="if(attr1 ? [attr4]) || attr3 attr2"
>> var4="if(attr1 == attr2 ? attr3[1]) || [attr3[2]]">
>> * <>
>> * <>
>> * <>
>> * <>
>> 
>>
>>
>>  Does formula let you do this type of cascading? 
>>
>> On Thursday, February 1, 2018 at 2:32:34 PM UTC-6, Diego Mesa wrote:
>>>
>>> Hey all,
>>>
>>> I am trying to use this plugin in button actions like so:
>>>
>>> \define updateActions(newVal)
 <$action-setfield $field="t1" $value="0"/>
 <$action-setfield $field="t2" $value=$newVal$/>
 <$action-setfield $field="t3" $value=(=3+1=)/>
 <$action-setfield $field="t4" $value=(={{!!t3}}+20=)/>
 \end


 <$button actions=<> >
 Do it!
 

>>>
>>>
>>> I am trying to make a spaced-repetition system like this. Any help would 
>>> be greately appreciated! 
>>>
>>>
>>> On Friday, January 19, 2018 at 2:44:29 PM UTC-6, Evan Balster wrote:

 Both formats look good, so I'll take the best parts of each:

- Unit tests:
   - Tiddlers tagged with FormulaTest.
   - Text is expected to render to TRUE
  - Advanced: If the field match is present on the tiddler, 
  text is instead expected to render to the same result as 
 rendering 
  match.
   - Name using a prefix scheme based on the test subject
  - Bugs: FormulaTest/Regression/
  - Functions: FormulaTest/Functions//
 - Function names in ALL CAPS
  - Language: FormulaTest/Feature//
 - Feature names being things like "Let", "Function", 
 "Closure", "Transclude"
  - Syntax & Compilation: FormulaTest/Compiler/>>>  Name>/
  - Miscellaneous Tests: FormulaTest/Misc/
   - Additional tiddlers used as data in unit tests:
   - Tag with FormulaTestData.
   - Prefix with the unit test's fully-prefixed name, with an 
   additional slash and name.

 Ideally, unit tests and bug repros should be submitted on GitHub (see 
 my call for unit tests there 
 ) but 
 uploading JSON files in this thread is OK too.

 On Friday, 19 January 2018 10:37:43 UTC-6, Diego Mesa wrote:
>
> Hey Evan,
>
> I was going to start adding some more, but the format you described 
> above is slightly different than the previous one:
>
>
> http://evanbalster.com/tiddlywiki/formulas.html#UnitTest%2FFunctions%2Fnth%2Fsorted-return
>
> Which do you think we should stick with?
>
> Diego 
>
> On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:
>>
>> Bug(s) confirmed — array and date formatting aren't working 
>> correctly.  Need to investigate why.
>>
>> There is also an issue with parsing block comments in Formula 0.2.1, 
>> which has been fixed in the repo.
>>
>> Suggested format for unit-test and bug-repro contributions:
>>
>>- Tag with "FormulaTest"
>>- Prefix "Test/"
>>- Text compri

[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-01 Thread Diego Mesa
Thanks for the reply Evan this seems like a really useful feature

On Thursday, February 1, 2018 at 3:24:58 PM UTC-6, Evan Balster wrote:
>
> Hey, Diego —
>
> I've been interested in supporting "cascading" in a single widget in 
> formula-vars, but there's no way for a widget to know the order in which 
> attributes are written with certainty.  For that reason and because I've 
> now implemented "cascading" in formulas' LET construct, I've been thinking 
> about adding an idiom for constructing key-value objects in formulas, and 
> making it possible to export one of these as a set of TiddlyWiki variables.
>
> That would look something like this:
>
> <$formula-vars $dict="""
>   dict(
> t1 = 0,
> t2 = <>,
> t3 = 3+1,
> t4 = t3+20)
>   """>
>   ...
> 
>
> At which point the primitive objects usable in formulas start to look a 
> lot like JavaScript's!  Hashmaps (aka "objects" aka "dictionaries") are 
> useful for lots of things...
>
> On Thursday, 1 February 2018 15:07:36 UTC-6, Diego Mesa wrote:
>>
>> Update: 
>>
>> This cascading does indeed work:
>>
>> <$button >
>> <$formula-vars val1="2+3">
>> <$action-setfield $field="t1" $value=<>/>
>> <$formula-vars val2="<> + 10">
>> <$action-setfield $field="t2" $value=<>/>
>> <$formula-vars val3="<> + 100">
>> <$action-setfield $field="t3" $value=<>/>
>> 
>> 
>> 
>> Do it!
>> 
>>
>>
>>
>> On Thursday, February 1, 2018 at 2:57:44 PM UTC-6, Diego Mesa wrote:
>>>
>>> Hey all,
>>>
>>> Sorry a better example of what Im trying to accomplish:
>>>
>>> <$button >
>>> <$formula-vars val1="2+3" val2="<>+6" val3="{{!!t2}}+12">
>>> <$action-setfield $field="t1" $value=<>/>
>>> <$action-setfield $field="t2" $value=<>/>
>>> <$action-setfield $field="t3" $value=<>/>
>>> 
>>> Do it!
>>> 
>>>
>>>
>>> I can understand why it wouldn't work, but it seems tobias' excellent 
>>> setvars plugin will allow you to do something like this:
>>>
>>>
>>> <$setvars
>>> _attr1=<>
>>> _attr2={{!!title}}
>>> _attr3="1 2 3"
>>> _attr4="[all[current]tagging[]]"
>>> var1="attr1 \ = literal = \ attr2"
>>> var2="attr3[n] \ \ [attr4[1,2][when-empty]] \ \ [attr3[][][ - ]]"
>>> var3="if(attr1 ? [attr4]) || attr3 attr2"
>>> var4="if(attr1 == attr2 ? attr3[1]) || [attr3[2]]">
>>> * <>
>>> * <>
>>> * <>
>>> * <>
>>> 
>>>
>>>
>>>  Does formula let you do this type of cascading? 
>>>
>>> On Thursday, February 1, 2018 at 2:32:34 PM UTC-6, Diego Mesa wrote:

 Hey all,

 I am trying to use this plugin in button actions like so:

 \define updateActions(newVal)
> <$action-setfield $field="t1" $value="0"/>
> <$action-setfield $field="t2" $value=$newVal$/>
> <$action-setfield $field="t3" $value=(=3+1=)/>
> <$action-setfield $field="t4" $value=(={{!!t3}}+20=)/>
> \end
>
>
> <$button actions=<> >
> Do it!
> 
>


 I am trying to make a spaced-repetition system like this. Any help 
 would be greately appreciated! 


 On Friday, January 19, 2018 at 2:44:29 PM UTC-6, Evan Balster wrote:
>
> Both formats look good, so I'll take the best parts of each:
>
>- Unit tests:
>   - Tiddlers tagged with FormulaTest.
>   - Text is expected to render to TRUE
>  - Advanced: If the field match is present on the tiddler, 
>  text is instead expected to render to the same result as 
> rendering 
>  match.
>   - Name using a prefix scheme based on the test subject
>  - Bugs: FormulaTest/Regression/
>  - Functions: FormulaTest/Functions//  Name>
> - Function names in ALL CAPS
>  - Language: FormulaTest/Feature//
> - Feature names being things like "Let", "Function", 
> "Closure", "Transclude"
>  - Syntax & Compilation: FormulaTest/Compiler/  Name>/
>  - Miscellaneous Tests: FormulaTest/Misc/
>   - Additional tiddlers used as data in unit tests:
>   - Tag with FormulaTestData.
>   - Prefix with the unit test's fully-prefixed name, with an 
>   additional slash and name.
>
> Ideally, unit tests and bug repros should be submitted on GitHub (see 
> my call for unit tests there 
> ) but 
> uploading JSON files in this thread is OK too.
>
> On Friday, 19 January 2018 10:37:43 UTC-6, Diego Mesa wrote:
>>
>> Hey Evan,
>>
>> I was going to start adding some more, but the format you described 
>> above is slightly different than the previous one:
>>
>>
>> http://evanbalster.com/tiddlywiki/formulas.html#UnitTest%2FFunctions%2Fnth%2Fsorted-return
>>
>> Which do you think we should stick with?
>>
>> Diego 
>>
>> On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:
>>>
>>> Bug(s) confirmed — array and date formatting aren't working 

[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-01 Thread coda coder
Hi Evan

On Thursday, February 1, 2018 at 3:24:58 PM UTC-6, Evan Balster wrote:
>
>
> That would look something like this:
>
> <$formula-vars $dict="""
>   dict(
> t1 = 0,
> t2 = <>,
> t3 = 3+1,
> t4 = t3+20)
>   """>
>   ...
> 
>
> At which point the primitive objects usable in formulas start to look a 
> lot like JavaScript's!  Hashmaps (aka "objects" aka "dictionaries") are 
> useful for lots of things...
>
>
At which point, one wonders why you don't add another idiom... json.

<$formula-vars $thing="""
  json {
t1: 0,
t2: <>,
t3: 3+1,
t4: t3+20}
  """>
  ...


thoughts?

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/10fb3cba-3012-477f-8e48-fd2f861d0b0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-01 Thread Evan Balster
Hey, Coda —

With the full set of values supported, working with JSON data would be 
perfectly feasible.  Putting it directly in formulas is a can of worms, 
though.  I'm already treading a fine line between conforming to WikiText 
syntax *and* filter syntax *and* standard spreadsheet syntax while 
maintaining a consistent code style...  Merging JSON into that, with its 
syntactic nuances, would threaten to over-constrain things.

On the upside, you could just do

json({{MyJsonTiddler}})

On a related note, I want to support excel style array literals, but the 
distinction with transclusions will be nuanced when they nest.  Fortunately 
Excel and Sheets both include a 2D array syntax already...

{1, 2, 3; 4, 5, 6; 7, 8, "fish"}

The curly braces are, of course, anathema to the JavaScript developer.  :)


On Thursday, 1 February 2018 16:09:57 UTC-6, coda coder wrote:
>
> Hi Evan
>
> On Thursday, February 1, 2018 at 3:24:58 PM UTC-6, Evan Balster wrote:
>>
>>
>> That would look something like this:
>>
>> <$formula-vars $dict="""
>>   dict(
>> t1 = 0,
>> t2 = <>,
>> t3 = 3+1,
>> t4 = t3+20)
>>   """>
>>   ...
>> 
>>
>> At which point the primitive objects usable in formulas start to look a 
>> lot like JavaScript's!  Hashmaps (aka "objects" aka "dictionaries") are 
>> useful for lots of things...
>>
>>
> At which point, one wonders why you don't add another idiom... json.
>
> <$formula-vars $thing="""
>   json {
> t1: 0,
> t2: <>,
> t3: 3+1,
> t4: t3+20}
>   """>
>   ...
> 
>
> thoughts?
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/820e6c10-3cd4-4ad2-9570-b7155bf4b076%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-02 Thread Diego Mesa
Hey Evan,

Just wanted to bump this to see if Formula 0.2.2 could make its way to the 
site when you get a chance.

Best,
Diego 

On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:
>
> Bug(s) confirmed — array and date formatting aren't working correctly.  
> Need to investigate why.
>
> There is also an issue with parsing block comments in Formula 0.2.1, which 
> has been fixed in the repo.
>
> Suggested format for unit-test and bug-repro contributions:
>
>- Tag with "FormulaTest"
>- Prefix "Test/"
>- Text comprises a single formula construct (of any type) whose result 
>should render to TRUE, *or* match the result of rendering field "match" of 
>the tiddler if present.
>- Submitted as JSON files here
>
>
> On Thursday, 18 January 2018 22:18:55 UTC-6, Mr. Mal wrote:
>>
>> I think the now and date function not working in this release. May be 
>> others can confirm this "bug". 
>>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/ec57f7d1-d60c-4d08-894e-0f4d3faa59c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-02 Thread Evan Balster
Tomorrow, probably.  I've been away at the NAMM Show for imitone, and I've 
had a lot of catching up to do.

On Friday, 2 February 2018 15:48:35 UTC-6, Diego Mesa wrote:
>
> Hey Evan,
>
> Just wanted to bump this to see if Formula 0.2.2 could make its way to the 
> site when you get a chance.
>
> Best,
> Diego 
>
> On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:
>>
>> Bug(s) confirmed — array and date formatting aren't working correctly.  
>> Need to investigate why.
>>
>> There is also an issue with parsing block comments in Formula 0.2.1, 
>> which has been fixed in the repo.
>>
>> Suggested format for unit-test and bug-repro contributions:
>>
>>- Tag with "FormulaTest"
>>- Prefix "Test/"
>>- Text comprises a single formula construct (of any type) whose 
>>result should render to TRUE, *or* match the result of rendering field 
>>"match" of the tiddler if present.
>>- Submitted as JSON files here
>>
>>
>> On Thursday, 18 January 2018 22:18:55 UTC-6, Mr. Mal wrote:
>>>
>>> I think the now and date function not working in this release. May be 
>>> others can confirm this "bug". 
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/cceb921a-b00a-45a1-ac4d-d2f2d86e0a36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-02 Thread coda coder
NAMM.  Jeez... always wanted to go, never have.  Probably never will (too 
old, too lazy).

On Friday, February 2, 2018 at 4:42:23 PM UTC-6, Evan Balster wrote:
>
> Tomorrow, probably.  I've been away at the NAMM Show for imitone, and I've 
> had a lot of catching up to do.
>
> On Friday, 2 February 2018 15:48:35 UTC-6, Diego Mesa wrote:
>>
>> Hey Evan,
>>
>> Just wanted to bump this to see if Formula 0.2.2 could make its way to 
>> the site when you get a chance.
>>
>> Best,
>> Diego 
>>
>> On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:
>>>
>>> Bug(s) confirmed — array and date formatting aren't working correctly.  
>>> Need to investigate why.
>>>
>>> There is also an issue with parsing block comments in Formula 0.2.1, 
>>> which has been fixed in the repo.
>>>
>>> Suggested format for unit-test and bug-repro contributions:
>>>
>>>- Tag with "FormulaTest"
>>>- Prefix "Test/"
>>>- Text comprises a single formula construct (of any type) whose 
>>>result should render to TRUE, *or* match the result of rendering field 
>>>"match" of the tiddler if present.
>>>- Submitted as JSON files here
>>>
>>>
>>> On Thursday, 18 January 2018 22:18:55 UTC-6, Mr. Mal wrote:

 I think the now and date function not working in this release. May be 
 others can confirm this "bug". 

>>>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/937c5b05-d489-4574-a4de-716f3e3685e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-02 Thread TonyM
Evan and any others?

On installing the 0.2.0 Version I noticed a lot of my date functions are 
returning 
ComputeError: Cannot auto-convert "" to a date!
and in other views 
ComputeError: Cannot auto-convert "2017122410592500" to a date! 

This is from of the following

A Macro <>

Where item-touched is a date field with or without a date

\define daystoday(datefield)
(= days( now(), date( {{!!$datefield$}} )  ) =)
\end


In short it seems to no longer tolerate empty fields 


Nor handle dates the same way,


Any suggestions from your intimate knowledge?


Thanks

Tony


On Saturday, February 3, 2018 at 9:42:23 AM UTC+11, Evan Balster wrote:
>
> Tomorrow, probably.  I've been away at the NAMM Show for imitone, and I've 
> had a lot of catching up to do.
>
> On Friday, 2 February 2018 15:48:35 UTC-6, Diego Mesa wrote:
>>
>> Hey Evan,
>>
>> Just wanted to bump this to see if Formula 0.2.2 could make its way to 
>> the site when you get a chance.
>>
>> Best,
>> Diego 
>>
>> On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:
>>>
>>> Bug(s) confirmed — array and date formatting aren't working correctly.  
>>> Need to investigate why.
>>>
>>> There is also an issue with parsing block comments in Formula 0.2.1, 
>>> which has been fixed in the repo.
>>>
>>> Suggested format for unit-test and bug-repro contributions:
>>>
>>>- Tag with "FormulaTest"
>>>- Prefix "Test/"
>>>- Text comprises a single formula construct (of any type) whose 
>>>result should render to TRUE, *or* match the result of rendering field 
>>>"match" of the tiddler if present.
>>>- Submitted as JSON files here
>>>
>>>
>>> On Thursday, 18 January 2018 22:18:55 UTC-6, Mr. Mal wrote:

 I think the now and date function not working in this release. May be 
 others can confirm this "bug". 

>>>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/e971bbcd-f882-45a6-8765-942767a7d135%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-02 Thread Diego Mesa
Hey Tony,

Earlier in this thread Mr. Mal reported the date related functions as not 
working and Evan confirmed. A fix is forthcoming

On Friday, February 2, 2018 at 7:50:16 PM UTC-6, TonyM wrote:
>
> Evan and any others?
>
> On installing the 0.2.0 Version I noticed a lot of my date functions are 
> returning 
> ComputeError: Cannot auto-convert "" to a date!
> and in other views 
> ComputeError: Cannot auto-convert "2017122410592500" to a date! 
>
> This is from of the following
>
> A Macro <>
>
> Where item-touched is a date field with or without a date
>
> \define daystoday(datefield)
> (= days( now(), date( {{!!$datefield$}} )  ) =)
> \end
>
>
> In short it seems to no longer tolerate empty fields 
>
>
> Nor handle dates the same way,
>
>
> Any suggestions from your intimate knowledge?
>
>
> Thanks
>
> Tony
>
>
> On Saturday, February 3, 2018 at 9:42:23 AM UTC+11, Evan Balster wrote:
>>
>> Tomorrow, probably.  I've been away at the NAMM Show for imitone, and 
>> I've had a lot of catching up to do.
>>
>> On Friday, 2 February 2018 15:48:35 UTC-6, Diego Mesa wrote:
>>>
>>> Hey Evan,
>>>
>>> Just wanted to bump this to see if Formula 0.2.2 could make its way to 
>>> the site when you get a chance.
>>>
>>> Best,
>>> Diego 
>>>
>>> On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:

 Bug(s) confirmed — array and date formatting aren't working correctly.  
 Need to investigate why.

 There is also an issue with parsing block comments in Formula 0.2.1, 
 which has been fixed in the repo.

 Suggested format for unit-test and bug-repro contributions:

- Tag with "FormulaTest"
- Prefix "Test/"
- Text comprises a single formula construct (of any type) whose 
result should render to TRUE, *or* match the result of rendering field 
"match" of the tiddler if present.
- Submitted as JSON files here


 On Thursday, 18 January 2018 22:18:55 UTC-6, Mr. Mal wrote:
>
> I think the now and date function not working in this release. May be 
> others can confirm this "bug". 
>


-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/e4e8deec-4b52-4a1d-8ad4-2a46d6169a24%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-02 Thread BurningTreeC
Hi Evan,

I've found this *handsontable* library and tried making a basic widget 
here: spreadsheet widget 


The docs  look promising 
and the interface is very nice - the license is MIT

Simon

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/6a693a56-e4e4-4ae8-80f9-f795bd142000%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-03 Thread Evan Balster
Hey all —

Formula 0.2.2 is out:  https://evanbalster.com/tiddlywiki/formulas.html
GitHub:  https://github.com/EvanBalster/TiddlyWikiFormula

Changes:

   - Fixed a bug in the parsing of /* block comments */. // line comments also 
   work.
   - Implemented regular expression literals in the JavaScript style: 
   /regex/g
  - May be used as a Datum 
  
  - When converting strings to regex, both JavaScript and TiddlyWiki 
  styles will be recognized.
   - Formula errors now mention LET assignments they lie inside.
   - Formulas as Tag Attributes 
   

 are 
   now facilitated by a mod using the experimental Mod-Loader Plugin 
   .


*Tony* — I fixed some coercion bugs in 0.2.1 but I'm not sure if those 
cover the issues you're reporting.

The blank definitely won't be treated as a date (what would it default to, 
anyway?)

As for the other one, 2017122410592500 isn't quite a valid TiddlyWiki date 
under current semantics.

*2017 12 24 10 59 25 00*

The last bit (milliseconds) should be either 3 digits or completely 
absent.  AFAIK TiddlyWiki dates are never expressed to "centisecond" 
precision so this looks out of place to me.  I'm strict about what Formula 
interprets as a date, because these strings of digits could also be numbers.


*BurningTree* — that's a nice looking spreadsheet UI.  Consider your 
experimentation encouraged!


On Friday, 2 February 2018 22:30:02 UTC-6, BurningTreeC wrote:
>
> Hi Evan,
>
> I've found this *handsontable* library and tried making a basic widget 
> here: spreadsheet widget 
> 
>
> The docs  look promising 
> and the interface is very nice - the license is MIT
>
> Simon
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/8c149fa2-b6e9-4c00-bf08-8bdf35c0cae9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-03 Thread TonyM
Evan,

Thanks again for your work.

To the point : *So I suppose I am asking, "can the treatment of empty or 
blank date fields be restored?", or could you "tell me a way to treat such 
fields to avoid the errors?"*

I will return to blank dates shortly.

*Date Format*
First, removing the trailing "00" or using 000 does indeed let a date 
display correctly THANKYOU
I was erroneously setting dates to one digit short
<$action-setfield $field=date-field $value=<> 
$timestamp=no />
Previously however this was tolerated. As was a date field with only the 
date 0MM0DD and other combinations (I have not retested)

*Blank dates*

This behaviour has changed, I am now getting these errors below when 
previously use of date fields that had empty or a single space in the date 
field were tolerated and no result was returned,

ComputeError: Cannot auto-convert "" to a date!
ComputeError: Cannot auto-convert " " to a date!

I was using the existence of a date-field to trigger the display, time 
stamp or edit of that and other fields


   - For example if item-started existed it allows you to "select, enter or 
   time stamp the date"  item-started
   - Basically the existence of item-started indicates the tiddler is now 
   under disposition management (regardless of its value or not)
   - It also provides the ability to optionally provide a item-completed or 
   item-cancelled dates
   - If I accidentally cancelled the item and cleared the item-cancelled 
   date, to instead set the completed date, I would have a blank cancelled 
   date field.
   
*Why permit " " dates*
If I am using the existence of a date field empty or otherwise I use a 
filter that includes has[fieldname]
Of note was that this has[fieldname] filter often seemed only to work when 
the field existed and was not empty, hence the use of " "

On example of where formulas was tolerant of blank and space was in the 
following, which calculates the number of days between the date-fields 
value and today.

\define daystoday(datefield)
(= days( now(), date( {{!!$datefield$}} ) ) =)
\end


Other examples, It is fine for these to return nothing

(= if(tw_date({{!!$datefield$}})=now(),"Today","Not Today") =)


\define showtodayrange(datefield1,datefield2)
> 
max=<>/> 
\end


<$if value=(={{!!$datefield$}}=)>
 Has value (=date({{!!$datefield$}})=)
 <$set name=indate value= (=date({{!!$datefield$}})=)>
 
<$else>
 No Value (={{!!$datefield$}}=)
 <$set name=indate value=(=now()=)>


The above also seems broken, using The *Condition* plugin for TiddlyWiki, 
version 0.1.0 (disabled or not)


*So I suppose I am asking, "can the treatment of empty or blank date fields be 
restored?", or could you "tell me a way to treat such fields to avoid the 
errors?"*


Thanks in advance,

Tony



On Sunday, February 4, 2018 at 12:54:42 PM UTC+11, Evan Balster wrote:
>
> Hey all —
>
> Formula 0.2.2 is out:  https://evanbalster.com/tiddlywiki/formulas.html
> GitHub:  https://github.com/EvanBalster/TiddlyWikiFormula
>
> Changes:
>
>- Fixed a bug in the parsing of /* block comments */. // line comments 
> also 
>work.
>- Implemented regular expression literals in the JavaScript style: 
>/regex/g
>   - May be used as a Datum 
>   
>   - When converting strings to regex, both JavaScript and TiddlyWiki 
>   styles will be recognized.
>- Formula errors now mention LET assignments they lie inside.
>- Formulas as Tag Attributes 
>
> 
>  are 
>now facilitated by a mod using the experimental Mod-Loader Plugin 
>.
>
>
> *Tony* — I fixed some coercion bugs in 0.2.1 but I'm not sure if those 
> cover the issues you're reporting.
>
> The blank definitely won't be treated as a date (what would it default to, 
> anyway?)
>
> As for the other one, 2017122410592500 isn't quite a valid TiddlyWiki date 
> under current semantics.
>
> *2017 12 24 10 59 25 00*
>
> The last bit (milliseconds) should be either 3 digits or completely 
> absent.  AFAIK TiddlyWiki dates are never expressed to "centisecond" 
> precision so this looks out of place to me.  I'm strict about what Formula 
> interprets as a date, because these strings of digits could also be numbers.
>
>
> *BurningTree* — that's a nice looking spreadsheet UI.  Consider your 
> experimentation encouraged!
>
>
> On Friday, 2 February 2018 22:30:02 UTC-6, BurningTreeC wrote:
>>
>> Hi Evan,
>>
>> I've found this *handsontable* library and tried making a basic widget 
>> here: spreadsheet widget 
>> 

[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-03 Thread BurningTreeC

>
> *BurningTree* — that's a nice looking spreadsheet UI.  Consider your 
> experimentation encouraged!
>
> Challenge accepted!

best wishes

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/3f3612f4-1825-47bc-a660-ea2f759fd7bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-04 Thread Evan Balster
Hey, Tony —

The tw_date function should do what you want:  It manually turns other 
things into dates, bypassing the normal "interpretation" mechanism.  It 
will accept MMDD dates with each subsequent part being optional.  It 
might not work on data that have been interpreted as numbers, which can 
happen with {{transclude}} syntax...  To avoid the interpretation, you can 
use the "transclude" or "variable" functions to fetch raw, uninterpreted 
text:

... tw_date(transclude("tiddler", "field")) ...

Basically the idea is that all automatic conversion can be bypassed or done 
manually.

The "fall-back" behaviors you're describing would best be implemented with 
the "iferror" function, which formula doesn't implement yet.  Other than 
that I advise using some string-related functions to figure out what kind 
of data you're dealing with.  For example, 
len(trim(x))==0
tells you if some data is blank (ie, only whitespace or nothing at all).

I might have to investigate the interoperation problems between formula and 
condition.

On Saturday, 3 February 2018 21:35:13 UTC-6, TonyM wrote:
>
> Evan,
>
> Thanks again for your work.
>
> To the point : *So I suppose I am asking, "can the treatment of empty or 
> blank date fields be restored?", or could you "tell me a way to treat such 
> fields to avoid the errors?"*
>
> I will return to blank dates shortly.
>
> *Date Format*
> First, removing the trailing "00" or using 000 does indeed let a date 
> display correctly THANKYOU
> I was erroneously setting dates to one digit short
> <$action-setfield $field=date-field $value=<> 
> $timestamp=no />
> Previously however this was tolerated. As was a date field with only the 
> date 0MM0DD and other combinations (I have not retested)
>
> *Blank dates*
>
> This behaviour has changed, I am now getting these errors below when 
> previously use of date fields that had empty or a single space in the date 
> field were tolerated and no result was returned,
>
> ComputeError: Cannot auto-convert "" to a date!
> ComputeError: Cannot auto-convert " " to a date!
>
> I was using the existence of a date-field to trigger the display, time 
> stamp or edit of that and other fields
>
>
>- For example if item-started existed it allows you to "select, enter 
>or time stamp the date"  item-started
>- Basically the existence of item-started indicates the tiddler is now 
>under disposition management (regardless of its value or not)
>- It also provides the ability to optionally provide a item-completed 
>or item-cancelled dates
>- If I accidentally cancelled the item and cleared the item-cancelled 
>date, to instead set the completed date, I would have a blank cancelled 
>date field.
>
> *Why permit " " dates*
> If I am using the existence of a date field empty or otherwise I use a 
> filter that includes has[fieldname]
> Of note was that this has[fieldname] filter often seemed only to work when 
> the field existed and was not empty, hence the use of " "
>
> On example of where formulas was tolerant of blank and space was in the 
> following, which calculates the number of days between the date-fields 
> value and today.
>
> \define daystoday(datefield)
> (= days( now(), date( {{!!$datefield$}} ) ) =)
> \end
>
>
> Other examples, It is fine for these to return nothing
>
> (= if(tw_date({{!!$datefield$}})=now(),"Today","Not Today") =)
>
>
> \define showtodayrange(datefield1,datefield2)
> > 
> max=< ))">>/> 
> \end
>
>
> <$if value=(={{!!$datefield$}}=)>
>  Has value (=date({{!!$datefield$}})=)
>  <$set name=indate value= (=date({{!!$datefield$}})=)>
>  
> <$else>
>  No Value (={{!!$datefield$}}=)
>  <$set name=indate value=(=now()=)>
> 
>
> The above also seems broken, using The *Condition* plugin for TiddlyWiki, 
> version 0.1.0 (disabled or not)
>
>
> *So I suppose I am asking, "can the treatment of empty or blank date fields 
> be restored?", or could you "tell me a way to treat such fields to avoid the 
> errors?"*
>
>
> Thanks in advance,
>
> Tony
>
>
>
> On Sunday, February 4, 2018 at 12:54:42 PM UTC+11, Evan Balster wrote:
>>
>> Hey all —
>>
>> Formula 0.2.2 is out:  https://evanbalster.com/tiddlywiki/formulas.html
>> GitHub:  https://github.com/EvanBalster/TiddlyWikiFormula
>>
>> Changes:
>>
>>- Fixed a bug in the parsing of /* block comments */. // line comments 
>> also 
>>work.
>>- Implemented regular expression literals in the JavaScript style: 
>>/regex/g
>>   - May be used as a Datum 
>>   
>>   - When converting strings to regex, both JavaScript and TiddlyWiki 
>>   styles will be recognized.
>>- Formula errors now mention LET assignments they lie inside.
>>- Formulas as Tag Attributes 
>>
>> 
>>  are 
>>now facilitated by a mod using the experimental Mod-Loader Plugin 
>>

[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-06 Thread Diego Mesa
Hey Evan,

Sorry if Im missing something, but is

now() and date(12,12,12)

not working?

Thanks!

On Sunday, February 4, 2018 at 2:09:26 AM UTC-6, Evan Balster wrote:
>
> Hey, Tony —
>
> The tw_date function should do what you want:  It manually turns other 
> things into dates, bypassing the normal "interpretation" mechanism.  It 
> will accept MMDD dates with each subsequent part being optional.  It 
> might not work on data that have been interpreted as numbers, which can 
> happen with {{transclude}} syntax...  To avoid the interpretation, you can 
> use the "transclude" or "variable" functions to fetch raw, uninterpreted 
> text:
>
> ... tw_date(transclude("tiddler", "field")) ...
>
> Basically the idea is that all automatic conversion can be bypassed or 
> done manually.
>
> The "fall-back" behaviors you're describing would best be implemented with 
> the "iferror" function, which formula doesn't implement yet.  Other than 
> that I advise using some string-related functions to figure out what kind 
> of data you're dealing with.  For example, 
> len(trim(x))==0
> tells you if some data is blank (ie, only whitespace or nothing at all).
>
> I might have to investigate the interoperation problems between formula 
> and condition.
>
> On Saturday, 3 February 2018 21:35:13 UTC-6, TonyM wrote:
>>
>> Evan,
>>
>> Thanks again for your work.
>>
>> To the point : *So I suppose I am asking, "can the treatment of empty or 
>> blank date fields be restored?", or could you "tell me a way to treat such 
>> fields to avoid the errors?"*
>>
>> I will return to blank dates shortly.
>>
>> *Date Format*
>> First, removing the trailing "00" or using 000 does indeed let a date 
>> display correctly THANKYOU
>> I was erroneously setting dates to one digit short
>> <$action-setfield $field=date-field $value=<> 
>> $timestamp=no />
>> Previously however this was tolerated. As was a date field with only the 
>> date 0MM0DD and other combinations (I have not retested)
>>
>> *Blank dates*
>>
>> This behaviour has changed, I am now getting these errors below when 
>> previously use of date fields that had empty or a single space in the date 
>> field were tolerated and no result was returned,
>>
>> ComputeError: Cannot auto-convert "" to a date!
>> ComputeError: Cannot auto-convert " " to a date!
>>
>> I was using the existence of a date-field to trigger the display, time 
>> stamp or edit of that and other fields
>>
>>
>>- For example if item-started existed it allows you to "select, enter 
>>or time stamp the date"  item-started
>>- Basically the existence of item-started indicates the tiddler is 
>>now under disposition management (regardless of its value or not)
>>- It also provides the ability to optionally provide a item-completed 
>>or item-cancelled dates
>>- If I accidentally cancelled the item and cleared the item-cancelled 
>>date, to instead set the completed date, I would have a blank cancelled 
>>date field.
>>
>> *Why permit " " dates*
>> If I am using the existence of a date field empty or otherwise I use a 
>> filter that includes has[fieldname]
>> Of note was that this has[fieldname] filter often seemed only to work 
>> when the field existed and was not empty, hence the use of " "
>>
>> On example of where formulas was tolerant of blank and space was in the 
>> following, which calculates the number of days between the date-fields 
>> value and today.
>>
>> \define daystoday(datefield)
>> (= days( now(), date( {{!!$datefield$}} ) ) =)
>> \end
>>
>>
>> Other examples, It is fine for these to return nothing
>>
>> (= if(tw_date({{!!$datefield$}})=now(),"Today","Not Today") =)
>>
>>
>> \define showtodayrange(datefield1,datefield2)
>> > 
>> max=<> ))">>/> 
>> \end
>>
>>
>> <$if value=(={{!!$datefield$}}=)>
>>  Has value (=date({{!!$datefield$}})=)
>>  <$set name=indate value= (=date({{!!$datefield$}})=)>
>>  
>> <$else>
>>  No Value (={{!!$datefield$}}=)
>>  <$set name=indate value=(=now()=)>
>> 
>>
>> The above also seems broken, using The *Condition* plugin for TiddlyWiki, 
>> version 0.1.0 (disabled or not)
>>
>>
>> *So I suppose I am asking, "can the treatment of empty or blank date fields 
>> be restored?", or could you "tell me a way to treat such fields to avoid the 
>> errors?"*
>>
>>
>> Thanks in advance,
>>
>> Tony
>>
>>
>>
>> On Sunday, February 4, 2018 at 12:54:42 PM UTC+11, Evan Balster wrote:
>>>
>>> Hey all —
>>>
>>> Formula 0.2.2 is out:  https://evanbalster.com/tiddlywiki/formulas.html
>>> GitHub:  https://github.com/EvanBalster/TiddlyWikiFormula
>>>
>>> Changes:
>>>
>>>- Fixed a bug in the parsing of /* block comments */. // line 
>>>comments also work.
>>>- Implemented regular expression literals in the JavaScript style: 
>>>/regex/g
>>>   - May be used as a Datum 
>>>   
>>>   - When converting strings to regex, both JavaScript and 
>>>   TiddlyWiki styles wil

[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-09 Thread Evan Balster
Hey, Diego —

Pardon the slow reply.  I've been pretty busy with Real Work since my 
convention trip.  I expect to do some more work on formulas this weekend 
and will be tracking down the issue.

In the future, please file an issue on the plugin's GitHub 
 if possible!  
Makes this stuff easier to keep track of.

On Tuesday, 6 February 2018 15:30:19 UTC-6, Diego Mesa wrote:
>
> Hey Evan,
>
> Sorry if Im missing something, but is
>
> now() and date(12,12,12)
>
> not working?
>
> Thanks!
>
> On Sunday, February 4, 2018 at 2:09:26 AM UTC-6, Evan Balster wrote:
>>
>> Hey, Tony —
>>
>> The tw_date function should do what you want:  It manually turns other 
>> things into dates, bypassing the normal "interpretation" mechanism.  It 
>> will accept MMDD dates with each subsequent part being optional.  It 
>> might not work on data that have been interpreted as numbers, which can 
>> happen with {{transclude}} syntax...  To avoid the interpretation, you can 
>> use the "transclude" or "variable" functions to fetch raw, uninterpreted 
>> text:
>>
>> ... tw_date(transclude("tiddler", "field")) ...
>>
>> Basically the idea is that all automatic conversion can be bypassed or 
>> done manually.
>>
>> The "fall-back" behaviors you're describing would best be implemented 
>> with the "iferror" function, which formula doesn't implement yet.  Other 
>> than that I advise using some string-related functions to figure out what 
>> kind of data you're dealing with.  For example, 
>> len(trim(x))==0
>> tells you if some data is blank (ie, only whitespace or nothing at all).
>>
>> I might have to investigate the interoperation problems between formula 
>> and condition.
>>
>> On Saturday, 3 February 2018 21:35:13 UTC-6, TonyM wrote:
>>>
>>> Evan,
>>>
>>> Thanks again for your work.
>>>
>>> To the point : *So I suppose I am asking, "can the treatment of empty 
>>> or blank date fields be restored?", or could you "tell me a way to treat 
>>> such fields to avoid the errors?"*
>>>
>>> I will return to blank dates shortly.
>>>
>>> *Date Format*
>>> First, removing the trailing "00" or using 000 does indeed let a date 
>>> display correctly THANKYOU
>>> I was erroneously setting dates to one digit short
>>> <$action-setfield $field=date-field $value=<>> 0MM0DD0hh0mm0ss000>> $timestamp=no />
>>> Previously however this was tolerated. As was a date field with only the 
>>> date 0MM0DD and other combinations (I have not retested)
>>>
>>> *Blank dates*
>>>
>>> This behaviour has changed, I am now getting these errors below when 
>>> previously use of date fields that had empty or a single space in the date 
>>> field were tolerated and no result was returned,
>>>
>>> ComputeError: Cannot auto-convert "" to a date!
>>> ComputeError: Cannot auto-convert " " to a date!
>>>
>>> I was using the existence of a date-field to trigger the display, time 
>>> stamp or edit of that and other fields
>>>
>>>
>>>- For example if item-started existed it allows you to "select, 
>>>enter or time stamp the date"  item-started
>>>- Basically the existence of item-started indicates the tiddler is 
>>>now under disposition management (regardless of its value or not)
>>>- It also provides the ability to optionally provide a 
>>>item-completed or item-cancelled dates
>>>- If I accidentally cancelled the item and cleared the 
>>>item-cancelled date, to instead set the completed date, I would have a 
>>>blank cancelled date field.
>>>
>>> *Why permit " " dates*
>>> If I am using the existence of a date field empty or otherwise I use a 
>>> filter that includes has[fieldname]
>>> Of note was that this has[fieldname] filter often seemed only to work 
>>> when the field existed and was not empty, hence the use of " "
>>>
>>> On example of where formulas was tolerant of blank and space was in the 
>>> following, which calculates the number of days between the date-fields 
>>> value and today.
>>>
>>> \define daystoday(datefield)
>>> (= days( now(), date( {{!!$datefield$}} ) ) =)
>>> \end
>>>
>>>
>>> Other examples, It is fine for these to return nothing
>>>
>>> (= if(tw_date({{!!$datefield$}})=now(),"Today","Not Today") =)
>>>
>>>
>>> \define showtodayrange(datefield1,datefield2)
>>> > 
>>> max=<>> ))">>/> 
>>> \end
>>>
>>>
>>> <$if value=(={{!!$datefield$}}=)>
>>>  Has value (=date({{!!$datefield$}})=)
>>>  <$set name=indate value= (=date({{!!$datefield$}})=)>
>>>  
>>> <$else>
>>>  No Value (={{!!$datefield$}}=)
>>>  <$set name=indate value=(=now()=)>
>>> 
>>>
>>> The above also seems broken, using The *Condition* plugin for TiddlyWiki, 
>>> version 0.1.0 (disabled or not)
>>>
>>>
>>> *So I suppose I am asking, "can the treatment of empty or blank date fields 
>>> be restored?", or could you "tell me a way to treat such fields to avoid 
>>> the errors?"*
>>>
>>>
>>> Thanks in advance,
>>>
>>> Tony
>>>
>>>
>>>
>>> On Sunday, February 4, 2018 at 12:54:42 PM U

[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-11 Thread Evan Balster
Hey all —

Formula 0.2.3 is out:  https://evanbalster.com/tiddlywiki/formulas.html
GitHub:  https://github.com/EvanBalster/TiddlyWikiFormula

Changes:

   - Add Array Literal  with 
   conventional syntax, eg. {1, 2, 3, "fork"}.
   - Add array constructor function (added in 0.2.2 but undocumented)
   - Enhanced Cell Reference 
syntax
  - Column names must be capitalized
  - Support $ absolute references (does not affect formula behavior)
  - The compiler now recognizes cell ranges (but they are unsupported)
   - Fixed date-to-string conversion producing an undefined result.
   - Fixed an error when failing to convert an object to a string.

Thanks Diego for pointing out the date conversion problem, which was quite 
nasty.  I think there may be an outstanding problem with array-to-string 
conversion, which I'll try to fix in my next update.


Check out the Auto-Map demo in the latest wiki:  
https://evanbalster.com/tiddlywiki/formulas.html#Auto-Map

It's a bit crude but it demonstrates a first take at a self-organizing 
graph of links within a wiki.


For my next update, I'm thinking about adding a dictionary type (a 
key-value map like JavaScript's objects) and some related functionality.  
Excel and Google Sheets don't support key-value maps so I'm considering my 
options for syntax design.


On Saturday, 3 February 2018 19:54:42 UTC-6, Evan Balster wrote:
>
> Hey all —
>
> Formula 0.2.2 is out:  https://evanbalster.com/tiddlywiki/formulas.html
> GitHub:  https://github.com/EvanBalster/TiddlyWikiFormula
>
> Changes:
>
>- Fixed a bug in the parsing of /* block comments */. // line comments 
> also 
>work.
>- Implemented regular expression literals in the JavaScript style: 
>/regex/g
>   - May be used as a Datum 
>   
>   - When converting strings to regex, both JavaScript and TiddlyWiki 
>   styles will be recognized.
>- Formula errors now mention LET assignments they lie inside.
>- Formulas as Tag Attributes 
>
> 
>  are 
>now facilitated by a mod using the experimental Mod-Loader Plugin 
>.
>
>
> *Tony* — I fixed some coercion bugs in 0.2.1 but I'm not sure if those 
> cover the issues you're reporting.
>
> The blank definitely won't be treated as a date (what would it default to, 
> anyway?)
>
> As for the other one, 2017122410592500 isn't quite a valid TiddlyWiki date 
> under current semantics.
>
> *2017 12 24 10 59 25 00*
>
> The last bit (milliseconds) should be either 3 digits or completely 
> absent.  AFAIK TiddlyWiki dates are never expressed to "centisecond" 
> precision so this looks out of place to me.  I'm strict about what Formula 
> interprets as a date, because these strings of digits could also be numbers.
>
>
> *BurningTree* — that's a nice looking spreadsheet UI.  Consider your 
> experimentation encouraged!
>
>
> On Friday, 2 February 2018 22:30:02 UTC-6, BurningTreeC wrote:
>>
>> Hi Evan,
>>
>> I've found this *handsontable* library and tried making a basic widget 
>> here: spreadsheet widget 
>> 
>>
>> The docs  look promising 
>> and the interface is very nice - the license is MIT
>>
>> Simon
>>
>

-- 
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+unsu

[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-18 Thread @magasine
Hi

I'm trying to use 2 fields as arguments to a function and results in error: 
"ComputeError: Can not convert 5 to number"

(= divide( {{!! total_presencas}} , {{!! total_integrantes}} ) =)

I also tried filters and the same thing happens

(= [tag{!!grupo}tagging[]has[Presenças]count[]] / [tag{!!grupo}tagging[]
count[]] =)

Sorry, I have little code experience and I do not know what the error is.

TIA

Manoel.


Em quarta-feira, 17 de janeiro de 2018 05:15:24 UTC-2, Evan Balster 
escreveu:
>
> Announcing the second generation of my formula plugin for TiddlyWiki.
>
> See the *Formula wiki* for the latest documentation:  
> http://evanbalster.com/tiddlywiki/formulas.html
>
> *Report issues and view source GitHub*:  
> https://github.com/EvanBalster/TiddlyWikiFormula
>
>
> Formula lets you do computation in TiddlyWiki in the style of popular 
> spreadsheet apps Excel and Google Sheets, with the addition of TiddlyWiki's 
> own filter, transclude and variable systems.  Tiddlers can behave like 
> individual rows in a spreadsheet.  A large collection of built-in functions 
> is included, for use with text, numbers, dates, arrays and regular 
> expressions.
>
> Formula is implemented as a widget, with a special *(=* "mushroom 
> bracket" *=)* syntax for inclusion in WikiText, and can also be used in 
> widget/HTML attributes.  Formulas included via transclusion, filters and 
> variables are computed and refreshed like any other part of your wiki.
>
> (= ( sum([tag[Profits]get[value]]) - sum(tag[Expenses]get[value]]) ) * {{
> Tax!!rate}} =)
>
> The second generation of formula adds support for local variables, 
> comments, lambda functions and element-wise operations on arrays (such as 
> filter results), allowing more advanced computations to be expressed inside 
> TiddlyWiki.  Search the wiki for "demo" to see some of the things I've 
> built.
>
>
> The plugin is a work in progress and may have bugs.  Please report these 
> on GitHub or in this thread.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/19401ad0-48b8-4a1b-ab13-4696031099f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Formula 0.2: Functional computing & spreadsheet formulas for TiddlyWiki

2018-02-18 Thread Evan Balster
Hello —

In your first code example, there is a space after the !!, which is invalid 
syntax for a TiddlyWiki transclusion.  Or rather, it's looking for a field 
whose name begins with a space (and no such field exists).

In your second example, you use filters, which always produce an array 
(list) of things as a result.  Even with the count[] operator you are 
producing an array which contains the count.  (Automatic conversion might 
be reasonable here but it's not how Formulas thinks...)  I suggest using 
the "count" *function* instead:

count([tag{!!grupo}tagging[]has[Presenças]]) / count([tag{!!grupo}tagging[]
])

You could also use the function "first" to grab the first item from the 
array.

On Sunday, 18 February 2018 16:32:54 UTC-6, @magasine wrote:
>
> Hi
>
> I'm trying to use 2 fields as arguments to a function and results in 
> error: "ComputeError: Can not convert 5 to number"
>
> (= divide( {{!! total_presencas}} , {{!! total_integrantes}} ) =)
>
> I also tried filters and the same thing happens
>
> (= [tag{!!grupo}tagging[]has[Presenças]count[]] / [tag{!!grupo}tagging[]
> count[]] =)
>
> Sorry, I have little code experience and I do not know what the error is.
>
> TIA
>
> Manoel.
>
>
> Em quarta-feira, 17 de janeiro de 2018 05:15:24 UTC-2, Evan Balster 
> escreveu:
>>
>> Announcing the second generation of my formula plugin for TiddlyWiki.
>>
>> See the *Formula wiki* for the latest documentation:  
>> http://evanbalster.com/tiddlywiki/formulas.html
>>
>> *Report issues and view source GitHub*:  
>> https://github.com/EvanBalster/TiddlyWikiFormula
>>
>>
>> Formula lets you do computation in TiddlyWiki in the style of popular 
>> spreadsheet apps Excel and Google Sheets, with the addition of TiddlyWiki's 
>> own filter, transclude and variable systems.  Tiddlers can behave like 
>> individual rows in a spreadsheet.  A large collection of built-in functions 
>> is included, for use with text, numbers, dates, arrays and regular 
>> expressions.
>>
>> Formula is implemented as a widget, with a special *(=* "mushroom 
>> bracket" *=)* syntax for inclusion in WikiText, and can also be used in 
>> widget/HTML attributes.  Formulas included via transclusion, filters and 
>> variables are computed and refreshed like any other part of your wiki.
>>
>> (= ( sum([tag[Profits]get[value]]) - sum(tag[Expenses]get[value]]) ) * {{
>> Tax!!rate}} =)
>>
>> The second generation of formula adds support for local variables, 
>> comments, lambda functions and element-wise operations on arrays (such as 
>> filter results), allowing more advanced computations to be expressed inside 
>> TiddlyWiki.  Search the wiki for "demo" to see some of the things I've 
>> built.
>>
>>
>> The plugin is a work in progress and may have bugs.  Please report these 
>> on GitHub or in this thread.
>>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/8ed90ed3-4eb3-49ab-bce4-3de6615f4846%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.