Hey Evan, In your Try Me example box,
<<now YYYY-0MM-0DD>> does not work. On Thursday, December 14, 2017 at 10:06:27 PM UTC-6, Evan Balster wrote: > > Hey, all — > > Version 0.1.0: > > https://evanbalster.com/tiddlywiki/formulas.html > https://github.com/EvanBalster/TiddlyWikiFormula > > - Adds a bunch of math functions (min/max, rounding, exponential, > trigonometry, random, miscellaneous) > - Further compiler improvements > - Includes a spreadsheet prototype; cell names are treated as indexes. > > This ought to get it past the post for basic usability. > > > >> Can you give an example for both so as to better understand what you want >> / use? >> > > I'd like to be able to use formulas in tags, like this: > <svg viewBox=(="0 0 " & {{!!width}}*2 & " " & {{!!height}}*2=)> > > > An immediate Application I am interested in is adding Days or Months to >> Date Serial values. >> > > Spreadsheet date functions are older than dirt and I'm aggressively > imitating Google/Excel syntax, so it'll probably happen sooner or later. > While I haven't added a date datatype yet, it's a natural fit for the > project — and once I do it will be quite easy to add new functions for > processing them. > > Myself, I'm trying to figure out if it's going too far to throw in some > matrix/complex math, perhaps based on mathjs.org. Most people won't want > that stuff as badly as I do... > > > On Thursday, 14 December 2017 20:27:14 UTC-6, TonyM wrote: >> >> Evan, >> >> I am really keen to use this as it seems to fill some serious gaps I have >> come across, in a very elegant way. An immediate Application I am >> interested in is adding Days or Months to Date Serial values. >> >> Imagine a Button that adds 7 days or 7 months to a Due date for example. >> >> However I am sure it is obvious the following parts of a Date Serial >> number need to increment differently, such as if +7 days moved into a new >> month (of length 28, 29, 30 and 31), or +7 months moves into a new year >> etc... >> >> I understand there are other tools to achieve this but the process is >> more convoluted. >> >> I just wanted to point out this possible extension to see if there was >> some immediate "functions" that we could include or its just too deep a >> rabit hole to go Down? >> >> Perhaps a Date function that could increment/decrements a date serial >> number buy the specified units (Min, Hr, Day, Week, Month, year) and honour >> the calendar rules? >> and if possible the ability to count the difference in specified units >> between two date serial numbers. Ideally allowing us to take the result and >> add it back to another date with the correct units. >> >> I imagine the libraries and source you are using may have such functions. >> >> Anyway, Do as you wish with this request, including ignoring it, if it is >> too much. >> >> Thanks >> Tony >> >> >> Love this work. >> Tony >> >> >> On Tuesday, 12 December 2017 19:19:13 UTC+11, Evan Balster wrote: >>> >>> Hello, all — >>> >>> For perhaps a year or two now I've had my own ideas about how to >>> approach making something like "spreadsheet formulas for TiddlyWiki", >>> something I know many other folks are interested in. >>> >>> Currently I use a macro-based facility in my accounting wiki. I'm also >>> aware of Tobias Beer's "let filter". Just today I became aware of the >>> impressive MathCell project... However, I feel somewhat strongly that >>> "formulas" should be a general-purpose idiom on the level of filters, >>> transclusion and macros — that is, they should be possible to use in >>> WikiText, as attribute values and potentially also in filters. >>> >>> Right now I'm dipping a toe in the water of TiddlyWiki module >>> development, and I'll be interested in guidance and feedback as I approach >>> this task. This is my first JavaScript project (!) and my first dive into >>> TiddlyWiki core logic. However, it's not my first dataflow compiler >>> project so I'm making quick progress. >>> >>> >>> Here's my progress after two days' tinkering: >>> https://evanbalster.com/tiddlywiki/formulas.html >>> >>> No operator parsing yet, but formulas are functional. They can process >>> transclusions, filters and variables, and basic arithmetic and summing >>> functions are provided. I decided to go with a "mushroom bracket" syntax >>> like the below for the wiki parser: >>> >>> (= add([tag[Expense]get[value]], {{Soda-Pop!!value}}) =) >>> >>> There's also an <$eval> widget that exposes a few more options. >>> >>> >>> I'm trying to keep the syntax and behavior close to that of formulas in >>> Excel/Google Sheets while preserving TiddlyWiki's native idioms for data. >>> (If the plugin is paired with a suitable spreadsheet UI, there could be a >>> case for a "range" syntax in the future — but for now it's focused on >>> fetching from Tiddlers.) >>> >>> Probably my biggest misgiving at this point is that my approach has had >>> me re-inventing some source processing. The plugin has its own (small) >>> compiler, and I'm left wondering if it would be more sensible to have the >>> widget "eval" its children and defer more to the wiki parser. >>> >>> >>> Anyway, very interested in feedback about syntax, bugs and code review. >>> I'll be particularly interested to see if Jeremy has any good tips on >>> architecture. >>> >>> -- Evan >>> >> -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikidev+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywikidev@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/c4104352-b2fb-4901-8e8f-15781517eee4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.