Alternate version of "Notes on tiddlers stored in a data tiddler" (VERY long!)

I haven’t had time to do more than skim, but I’m already boggling at the sheer amount of work you put into this writeup. Bravo!

I’ll just respond to one part that jumped out at me…

This is a general quirk of the way that variables are handled in filters — i.e., when a variable is undefined, it’s treated as a blank value, but not a null one. So [<count>else[0]] won’t produce 0 when <<count>> is undefined, because [[]else[0]] gets (unhelpfully) evaluated to [[]].

Introducing the mathematics operators “solves” the problem because (quoting from that page)

If the argument cannot be interpreted as a number, the value 0 is used (e.g. foo is interpreted as the number 0)

So you could in fact omit the else[0] entirely and get the same result from [<count>add[1]subtract[1]]. But for a more semantically sensible fix, I’d recommend [<count>!match[]else[0]] or [<count>!is[blank]else[0]]. :wink:

1 Like

Thanks. After writing it in vscode and porting it to TW… then having to break it apart for size reasons (anyone found out before that there’s a 32000 character limit to posts?) I was sure there would be such issues. I will fix them this evening, or during breaks during the remaining work day. If for some reason you want them sooner, everything is at https://github.com/CrossEye/TW5-SuppNotesDemo/tree/main/post. (Edit: Done.)

Thank you. That one was driving me nuts!

1 Like

Why not [<count>add[0]] or even [<count>add[]]? Seems to work.

Even simpler! Thanks. I’m not going to update the posts as they stand, but I will at some point add a few more steps with suggestions made here.

1 Like

I can’t believe I hadn’t thought of it before! I discovered it while building this, but have already used the same technique twice more. It’s such a simple debugging help and trivial to create.

1 Like

I’m sure you’ve noticed, but it’s worth remarking that links within this notes JSON tiddler are not “seen” by the relink mechanism. (If my note has a link to [[HelloThere]], renaming that tiddler results in a “dead link” in my note.)

I understand that’s not within the scope of what you can do from within your package here. And the risk of totally losing connection for notes on X by renaming X is a much bigger priority!

Still, the tutorial at Step 10 might want to flag this as another loose end.

1 Like

That’s a good point. I will look to see how Relink extensions work, and if it’s something we could add to this. That may not be soon, though.

rather than “specific tiddlers” why not have a filter? I just put it into the view template itself as a filter field. And changed the <% if … %> condition to take out your is[tiddler]!is[system] since someone might actually want this template to appear on system tiddlers or even VIRTUAL tiddlers (make a note on a missing/virtual tiddler, and have the template work fine)…

<$let templatefilter={{$:/supp-info/notes/view-template!!filter}}>
<% if [<currentTiddler>subfilter<templatefilter>] %>

(and close this let towards bottom as needed)

1 Like

Aspects of relink have been integrated … since v5.1.14, then v5.2.2 or so, yes? Even if there are advanced features that are still queued up for v5.4.0 …

(So, ordinary novice users now are used to having most user-facing connections “just work” on rename — perhaps noticing that there’s a checkbox for tags and list field updates — even if they have no memory of a time when preserving links across a rename was a fragility-point solved by a plugin.)

Your project here would just need to be bundled with another “sub-plugin” for relink (which seems to have 4 now?), if I understand correctly.

(If v5.4.0 is going all-in on integrating the robust set of @Flibbles Relink plugin functions, then I guess you would then no longer require a “sub-plugin”, but Relink-within-supp-notes would be an ordinary plugin to which the core would be directly receptive. Presumably many solutions that store data differently may want to be paired with relink-ish tweaks.)

1 Like

Good point. I’ve updated the TODO list with this.

That sounds right, and I have no issues creating plugins when necessary. At the moment, this is just distributed as a JSON bundle. Including a plugin feels odd. But I will investigate at some point.

1 Like

Thanks @Scott_Sauyet for you contribution, I will certainly work through this when I get time at my desktop. I do think walkthroughs are helpful to many users on their learning journey so great work.

2 Likes

This will significantly increase the workload for documentation. However, it will make reading less stressful for the reader.


I finished reading, but skipped a lot of content. My takeaways:

Learned some JSON manipulation techniques.

Discovered where to learn how to create new filter operators using JavaScript.

Found out where to learn how to set hooks with JavaScript to trigger automatic updates during renaming.

There’s a claim circulating that with the release of Gemini 3, front-end developers could be entirely eliminated. It remains to be seen whether this complex project can be completed solely by Gemini 3.

1 Like

I certainly wasn’t thinking of this as replacing any of the existing documentation, only as another style to add in places like these forums.

I’m gratified that there were useful bits for you.

I’m extremely skeptical of such claims. Every time some new new technology is hyped to reduce the need for programmers, the number of programmers increases steadily. If nothing else, we are needed to fix all the problems caused by the reliance on AI for complex work! :wink:

But I want to point out that from my perspective, this was not a complex project. The coding took me a few hours. Writing it up took closer to fifty hours, though. Part of that was a desire to give explicit information about every little decision. And part is simply that I write slowly.

Clearly this is not something I would do too often, but I do believe having some instances of documenting the process of creating small tools can help the overall learning environment.

1 Like

This style of documentation, progressing from simple to complex versions, is itself a formal documentation style. The C language compilation guide I studied follows precisely this style.

I believe the project is complex because TiddlyWiki itself is a complex project. Customizing TiddlyWiki requires extensive background knowledge, making it challenging for AI to accurately grasp its intricate details.

The reason I believe in the impact of gemini3 is that I saw news reports about a company eliminating its entire front-end department.

1 Like

Sure, if you’re coming in with zero knowledge, this will take a while. That reminds me of something I was planning to do in the first post here, but forgot to do: describe the target audience. I will try to add that soon. (Edit: Done.)

I’m sure it will happen some more too. I’m also sure that they will come to regret it when they start beating their heads against the wall on bugs. This is likely to end in disaster.

Scott “above and beyond” Sauyet.

1 Like

If v5.4.0 is going all-in on integrating the robust set of @Flibbles Relink plugin functions…

@Springer, what? It is? I can’t find anything on that.

1 Like

@Flibbles check this post by Jeremy

1 Like

Oh. Right. I even commented on that thread, just never read all of it. And I guess I thought that whole thread was rather theoretical.