Matt,

 Thank you for sharing! It uses JS and non-deterministic! So, it should
have the issue Jeremy noted!
But based on your previous post, Jeremy and Mario note, also Mark
explanation in another post (
https://groups.google.com/d/msg/tiddlywiki/jlBObreG30w/moxP900xBAAJ)

Is it possible to make it deterministic to address the performance issue? I
mean generate a random number and freeze until
a browser refresh?


Best wishes
Mohammad


On Wed, Sep 11, 2019 at 8:33 PM Matthew Lauber <[email protected]> wrote:

> Indeed, it's here:  https://mklauber.github.io/tw5-plugins  At the time,
> I was running into an issue where I couldn't use <<time
> "[UTC]YYYY0MM0DD0hh0mm0ssXXX">> as a param to a filter, so I couldn't make
> it deterministic and easily based on render time.  I'm seeing some
> interesting ideas here though in Mario's post to create some default seed
> tiddlers to update.  If there's interest in trying to get this into the
> core, I'd be happy to work on it.  As it is, my plugin, non-deterministic
> as it is, hasn't been an issue in my years of using it.
>
> Matt
>
> On Wednesday, September 11, 2019 at 6:10:55 AM UTC-4, Jeremy Ruston wrote:
>>
>> Hi Mohammad
>>
>> On 11 Sep 2019, at 08:47, Mohammad Rahmani <[email protected]> wrote:
>>
>> As there is no random filter (I expect to have it with math operators) in
>> TW core, is it possible using machine clock and TW 5.1.20+ math ops create
>> a macro to generate random numbers?
>>
>>
>> This has come up before, it might be helpful to dig up the old references.
>>
>> The reason there is not a simple [random[]] operator is that filter
>> operators are supposed to be deterministic: they must return the same
>> results for the same inputs, regardless of when they are called. This
>> property is required for the refresh mechanism to operate correctly. In
>> particular, using a non-deterministic filter with the list widget will
>> cause thrashing on every refresh cycle.
>>
>> To make it work, one needs to add a seed operand, and initialise that
>> value via a new action widget that can assign a random value to a tiddler.
>> I think somebody made a plugin a few years ago to do this.
>>
>> Best wishes
>>
>> Jeremy
>>
>>
>>
>>
>> Best wishes
>> 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/CAAV1gMA6b-EtuP4KjSWfir9jy2eAh65c-QwnvTL9kQH43qYNCw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMA6b-EtuP4KjSWfir9jy2eAh65c-QwnvTL9kQH43qYNCw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>> --
> 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/b401dd79-e59a-4741-ac0e-3e256646d6de%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/b401dd79-e59a-4741-ac0e-3e256646d6de%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAAV1gMCX3ww1ph7jiBM%2Bk4gG_EUsB82sazF4ZRqnY5rgJsDK%2BA%40mail.gmail.com.

Reply via email to