And the TiddlyWiki syntax (no javascript) version:
\define fibo(fnmax fni:1 fnm2:0 fnm1:1)
<$list filter="[[$fnm2$]match[0]]">
F,,$fnm2$,, = $fnm2$<br>
F,,$fnm1$,, = $fnm1$<br>
</$list>
<$vars fni={{{ [[$fni$]add[1]] }}}
fn={{{ [[$fnm1$]add[$fnm2$]] }}}>
F,,<<fni>>,, = <<fn>><br>
<$list filter="[[$fnmax$]compare:integer:gt<fni>]"><$macrocall $name=fibo fni=<<fni>> fnmax=$fnmax$ fnm2=$fnm1$ fnm1=<<fn>>/></$list>
</$vars>
\end
<<fibo 25>>
Great stuff Charlie, really inspired. I hope you will enjoy the new possibilities coming in Parameterised transclusions by Jermolene · Pull Request #6666 · Jermolene/TiddlyWiki5 · GitHub
Best wishes
Jeremy
G’day sir,
I’ve actually been doing parameterised transclusion for about a year now, with my own syntax:
{{ blah_blah_tiddler-tiddler-title:::param1:::param2 || tTemplate}}
The parameterised transclusions work is really interesting, I think it will be fantastic for everybody, but I don’t think I’ll ever use it.
Using the pipe as a separator for parameters is a serious turn-off for me. When a symbol starts having too many different uses in too many contexts, that symbol quickly stops providing me visual cues/anchors I need to quickly process what I’m looking at. (Would we call that “symbol-overloading”?)
For every millisecond of cognitive-processing-brake-pumping going on, I quickly get frustrated and miserable.
Although kind of “wordy”, the triple colons have been good for me, so far, because they stand out. I immediately recognise what I’m seeing. No sticks in the cognitive wheels, cognitive wheels not stuck in the mud.
Something like that …
Delayed reaction: thanks for the comment!
A lot of times, when I figure out in my head how to do something in TiddlyWiki, I don’t follow through on doing it because the challenge is no longer there. No challenge, no problem to solve, no interest.
This was one of those rare moments in which I had a desire to accompany my awesome first coffee of the day with a “prove it with code” scratch.
Now that I’ve skimmed the whole referenced page, the immediate reaction:
The buffet of “artefacts” is overwhelming.
For me, too many artefacts, too many ways of doing things, too much thinking, too much to know about. Too much stuff going on: I immediately shut down as a defence mechanism.
I am having a “whoa, I’m tapping out, I’ve got to get out of here” reaction.