[twdev] Re: New Feature PR: shuffle[] filter operator for deterministically randomizing list orders

2019-01-22 Thread Mohammad Rahmani
Thanks Matt,
 That is really amazing!

Cheers
Mohammad

On Monday, January 21, 2019 at 8:32:13 AM UTC+3:30, Matthew Lauber wrote:
>
> Yes, this would be an excellent use for it.  In the settings -> Default 
> Tiddlers box, you can put something like `[shuffle[]first[N]]` and you'll 
> get N random tiddlers from the list of all tiddlers.  To be more specific, 
> just pass in the input list you want to select from, e.g. 
> `[tag[TAG]shuffle[]first[N]]`
>
> On Sunday, January 20, 2019 at 1:05:14 PM UTC-5, Mohammad Rahmani wrote:
>>
>> Matt,
>>  Good job, thank you!
>> One question: in TW-Scripts, I like whenever I visit the page a random 
>> tiddler be shown. Can shuffle operator do that?
>> I was trying to use Tobias Beer macro: 
>> https://tobibeer.github.io/tb5/#Tagline%20Macro
>>
>> --Mohammad
>>
>

-- 
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/19caad62-d893-44b8-8fd4-1f773fa23274%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: New Feature PR: shuffle[] filter operator for deterministically randomizing list orders

2019-01-22 Thread Diego Mesa
Hey Matt,

Just to voice my opinion, I think it should be part of the core. This could 
be a great, easy, built-in way to encourage a "Random" option for the story 
river, sidebar, etc. just like wikipedia's 

https://en.wikipedia.org/wiki/Special:Random

Diego


On Monday, January 21, 2019 at 11:57:10 AM UTC-6, @TiddlyTweeter wrote:
>
> Ciao Matt,
>
> It think it is a neat tool with good potential usage. I think it should be 
> a plugin. Not in the core. Mainly because most users are unlikely to need 
> it.
>
> My two cents
> Josiah
>

-- 
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/d99e4173-8ff8-47d1-b01d-cbde793c07b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: New Feature PR: shuffle[] filter operator for deterministically randomizing list orders

2019-01-21 Thread @TiddlyTweeter
Ciao Matt,

It think it is a neat tool with good potential usage. I think it should be 
a plugin. Not in the core. Mainly because most users are unlikely to need 
it.

My two cents
Josiah

-- 
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/b3c5f26d-b1be-482d-bd2c-4eb000f479a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: New Feature PR: shuffle[] filter operator for deterministically randomizing list orders

2019-01-20 Thread Matthew Lauber
Yes, this would be an excellent use for it.  In the settings -> Default 
Tiddlers box, you can put something like `[shuffle[]first[N]]` and you'll 
get N random tiddlers from the list of all tiddlers.  To be more specific, 
just pass in the input list you want to select from, e.g. 
`[tag[TAG]shuffle[]first[N]]`

On Sunday, January 20, 2019 at 1:05:14 PM UTC-5, Mohammad Rahmani wrote:
>
> Matt,
>  Good job, thank you!
> One question: in TW-Scripts, I like whenever I visit the page a random 
> tiddler be shown. Can shuffle operator do that?
> I was trying to use Tobias Beer macro: 
> https://tobibeer.github.io/tb5/#Tagline%20Macro
>
> --Mohammad
>

-- 
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/4c88aa04-2048-462c-9f25-41dd5bb4e61a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: New Feature PR: shuffle[] filter operator for deterministically randomizing list orders

2019-01-20 Thread TonyM
Matt,

I think such a filter operator would naturally be in the core given similar 
support in most languages, and tiddlywiki uses filters to operate its 
fundamental logic.

However this can be dependant on the level of "bloat" to the core. If it 
requires a lot of bytes to implement it should be left out and placed in a 
plugin, perhaps in the tiddlywiki plugin library but documented on 
tiddlywiki.com. It is traditional to present a plugin first, unless you can 
persuade the "developers" over in GitHub or here to include it in the core.

I expect a lot of people would not use this feature, but I can see why it 
would be valuable to some. Text based games, Flash card study notes, 
randomised questions, random stories, daily message, random post etc... 

Regards
Tony


On Sunday, 20 January 2019 15:21:50 UTC+11, Matthew Lauber wrote:
>
> All, 
>I've opened a Pull Request 
>  for feedback for a 
> filter operator that I think could be useful in a variety of situations.  
> This is a "shuffle" operator.  It takes as a optional parameter a "seed" 
> value, and based on that value, randomizes the list.  So, every time you 
> shuffle with the seed "test" you'll get the list back in the same random 
> order, but if you then seed with "apple", you've get a different order.  If 
> you don't provide a seed, you'll get a new order every time it's rendered.  
>
> With this filter operator it's possible to:
>
>- Display a list in a random order via "shuffle[]"
>- Display the list in an order that changes when you press a button, 
>via "shuffle{state tiddler}"
>- Select a random subset of tiddlers from a list via 
>"shuffle[]first[N]"
>- Select a random subset of tiddlers from a list that changes when you 
>press a button, via "shuffle{state tiddler}first[N]"
>
> I think this is a pretty basic tool that allows users to invent a variety 
> of solutions on top of it, and I think it would be useful.  I'd like to 
> hear feedback on whether people think it's worth putting in the core, or if 
> it should stay as plugin.  (It's available at present from my plugin 
> library at https://mklauber.github.io/tw5-plugins)
>
> Matt Lauber
>

-- 
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/6a6e0e01-bce2-4e0c-826e-2ae5427910d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: New Feature PR: shuffle[] filter operator for deterministically randomizing list orders

2019-01-20 Thread Mohammad Rahmani
Matt,
 Good job, thank you!
One question: in TW-Scripts, I like whenever I visit the page a random 
tiddler be shown. Can shuffle operator do that?
I was trying to use Tobias Beer 
macro: https://tobibeer.github.io/tb5/#Tagline%20Macro

--Mohammad

-- 
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/48bb217c-d259-4069-a5bc-9f557595baa4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.