TiddlyPWA: putting TiddlyWiki on modern web app steroids
val.packett.cool
val.packett.cool
I told my Dad I wanted to make a website for my favourite computer game so he sat me infront of MS Frontpage and got me started. After I while I got to the point i've made a forum but all the comments where dummy text in static HTML, so my Dad setup PHP on the computer and basically left me to it with a single index.php file and a intro to PHP book. The problem was when I looked things up, I was always asking the wrong questions. So instead of asking, "how can I store comments in a database and then fetch them for displaying?", I asked "how can I append a new comment to my HTML file?". I wound up with some crazy (working!) forum where every time a comment was added it would append to a HTML file. Then I wanted a more complex layout I had to figure out how to use a regex to append it in the right place. Then even more crazy regex to handle editing and deleting comments. Then when the file got too big I wanted to add pagination and this took me ages to get right shifting comments between pages when a comment was deleted so there was still 10 per page.
Eventually I discovered that databases exist and i've been a web developer for 18 years now.
Crazy to think there's now a cool use case for an entire app stored in a single .html file. Maybe I wasn't as dumb as I thought back then.
Hey static sites are a thing that keep coming back no matter how much things change. It doesn't matter how fancy your back-end for rendering/populating a website is when at the end of the day a lot of sites really really have no real need to be that dynamic. They could easily be rendered out to static files and be much more performant. Not to mention that if your backend falls over you still have some simple static files to spit out so people might not even notice downtime.
I remember also starting building a forum and browser games using text files as database :)
Essentially CSV files pretty much, although I didn't think of them as CSV or similar.
Then you go full circle and realize some databases just work with a file in the end and maybe we were on the right path to be db engineers
Remember, if it’s worth doing, it’s worth doing half-assed.
Tiddlywiki was great because it was a single file, the whole point of tiddlywiki was being a single self-modifying html file. No app needed.
And back when it was created it worked fantastically. Then browser vendors closed a number of 'security loopholes' and TW stopped working as intended.
I understand wanting a modern app-style hypertext-note-taking thing. I don't understand why you'd use TW as a template.
This effort https://val.packett.cool/blog/tiddlypwa/ is remarkable as the mobile side of saving is not as robust as on the desktop side of things and there is a scaling limit on performance as the number of tiddlers grows. Also the syncing between tw documents between different desktop/mobile clients can be a challenge with diffing.
Since then I've moved back to plain vanilla vim for a wiki (map gf :tabe <cfile><CR>) but tw.html is still good for data other than plain text and TiddlyPWA https://tiddly.packett.cool/ is a great effort to revisit TiddlyWiki again.
Probably because tiddlywiki is very close to ideal for certain use-cases. One of the main reasons I switched away from tiddly wiki was I needed better mobile support and syncing was always a monumental pain. Not to mention saving the HTML file was fundamentally broken in modern browsers at the time.
I'm actually using obsidian in essentially the same way I used tiddlywiki so this is VERY interesting to me.
Pardon me, but what are you talking about?
I built my ADHD wiki site on TiddlyWiki. Never knew it was not working as intended:
TiddlyWiki is great for the reasons you mentioned.
Obviously, generically letting webpages, even local ones, have this sort of access to disk had lots of security implications. So, eventually all browsers removed this functionality. Now, you need all these extensions or tools to save the file.
But I was wondering how much of this is the effect of the internet on cognition? Specifically in the "ADHD bingo", there are things like "having 50 tabs open" or "forgetting why I was looking at my phone". Isn't that just computers destroying our attention? Or do I have ADHD?
So it may not be what you knew before. Or it may still be that, but also other new stuff.
I was getting fed up with not having my notes on my phone, so I finally wrote a mini-Leo PWA, with an equally minimal sync server like in this article. I immediately fully switched to it.
The whole thing is way more crude than this author's though, especially the sync. That's literally implemented as two buttons in the app, "send to server" and "load from server". Better not hit the wrong one :D
This sacrifices the ability to keep your notes as separate files, which is a really undersold virtue of TW run with the node server. If I decide I want to switch away from TW some day, I've got a folder full of markdown files.
[0]: https://tiddlywiki.com/static/Windows%2520HTA%2520Hack.html