Mark S.' Fibonacci sequence macro is really interesting & clever. I'm getting interested in the idea of using macros similar to that to select Tiddlers to create "sample sub-series".
An example would be for a screenplay you want to analyse. Its well known that most mainstream movies have a "three-act" structure and sub-structures/patterns within them. It might be interesting to sample a screenplay that is in, say, 1,000 tiddlers, using mathematical patterns to better understand its screenplay structure. That sampling would not be from a Fibonacci sequence, but seeing it, I realised we can now do "sample patterns" macros quite elegantly. So far I been using random sampling. This opens a better way. Early thoughts. I'll formulate a better question about this at some point. Best wishes Josiah On Friday, 18 October 2019 23:58:48 UTC+2, Mohammad wrote: > > Resend for email users! > > The entry in TW-Scripts > https://kookma.github.io/TW-Scripts/#Fibonacci%20Sequence > <https://www.google.com/url?q=https%3A%2F%2Fkookma.github.io%2FTW-Scripts%2F%23Fibonacci%2520Sequence&sa=D&sntz=1&usg=AFQjCNEMEQFmUsPd5hFTXjTGcYi_CXq1Rw> > > --Mohammad > > On Friday, October 18, 2019 at 7:47:05 AM UTC+3:30, Mohammad wrote: >> >> Added to TW-Scripts. >> https://kookma.github.io/TW-Scripts/#Fibonacci%20Sequence >> >> --Mohammad >> >> On Friday, October 18, 2019 at 12:39:05 AM UTC+3:30, Mark S. wrote: >>> >>> Oops. Here's a fix for fibonacci >>> >>> \define fibber(last,next,count)<$list filter="[<__count__>!regexp[^0$]]" >>> emptyMessage="<<__last__>> <<__next__>>" > >>> <$set name="count" filter="[<__count__>subtract[1]]" select=0> >>> <$set name="next" filter="[<__last__>add<__next__>]" select=0> >>> <<__last__>> <$macrocall $name=fibber last=<<__next__>> next=<<next>> >>> count=<<count>>/> >>> </$set></$set> >>> </$list> >>> \end >>> >>> >>> <<fibber "0" "1" "6">> >>> >>> >>> >>> >>> On Thursday, October 17, 2019 at 1:56:34 PM UTC-7, Mark S. wrote: >>>> >>>> >>>> >>>> \define fibber(last,next,count) >>>> <$list filter="[<__count__>!regexp[^0$]]" emptyMessage="<<last>> >>>> <<next>>" > >>>> <$set name="count" filter="[<__count__>subtract[1]]" select=0> >>>> <$set name="next" filter="[<__last__>add<__next__>]" select=0> >>>> <<__last__>> <$macrocall $name=fibber last=<<__next__>> next=<<next>> >>>> count=<<count>>/> >>>> </$set></$set> >>>> </$list> >>>> \end >>>> >>>> <<fibber "0" "1" "6">> >>>> >>>> >>>> >>>> On Thursday, October 17, 2019 at 12:50:21 PM UTC-7, Mohammad wrote: >>>>> >>>>> Sounds great Mark! >>>>> >>>>> I think it is not far from writing Fibonacci >>>>> <https://en.wikipedia.org/wiki/Fibonacci_number> sequence in >>>>> Tiddlywiki :-) >>>>> >>>>> --Mohammad >>>>> >>>>> -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/03c2fe03-907e-404d-bd40-5e55fbdad109%40googlegroups.com.

