Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Luca Dorigo
    @ldorigo
    Haha, good naming
    Arlen22
    @Arlen22
    Hello, glad to see this room
    Arlen22
    @Arlen22
    My random thoughts of the night. TiddlyWiki needs a revision or diff system of some sort that works and works well. The tiddlers array will always stay for efficient rendering, but we need a way to save the history. I think first of all we need a filter to exclude certain tiddlers from the revision history. Second, we need options to only make a new revision under certain rules such as each day or hour, or once a certain number of characters gets changed then it would break off a new revision. Third, I don't know whether this should be a server or client side thing. I think it should be a client side thing, but then we need an additional storage area to store the history in the HTML file and this creates bloat. Maybe we need a server based revision history (based on data folders) which the client could access using more of a diff source view. Maybe we just need git. Maybe we need to integrate git into the TiddlyWiki server so it saves a revision (conveniently called a checkpoint) based on criteria.
    Maybe we just need to do it manually. One thing we do need to do is hard code .tid files into the boot sequence so they can be written using a simple JavaScript function instead of calling render tiddler. Then we can guarantee that the tid format will never change. At this point I don't quite know how to
    simply and accurately serialize and deserialize tiddlers. I guess I just need to look at the code yet.
    The tid format is actually very good for diffs.
    The complex code of the boot loader is mostly used in loading plugins, though anything is possible.
    Arlen22
    @Arlen22
    The complex code of the load tiddlers node sequence, I should say.
    I'm looking forward to the boot loader being brought up to speed with the modularity of the core. And do I ever wish I could somehow implement typescript support. After all, it does support es5. But I can hardly see that happening. I should figure out a way to generate a definitely typed @types definition. I think it should work using the module directive. That would be neat. I could write out the types for all 2000 modules in the core. Ok, only several hundred. The core has a lot of wikitext files as well.
    Arlen22
    @Arlen22
    Speaking of thousands of files, the boot loader already makes it possible to compile all the tiddlers that make up a plugin into one file. So the core can be completely contained in one file -- all 2000 tiddlers totalling 1.5 MB, because it is actually a plugin from the boot loaders perspective. It loads a faster because there is much less file IO. Plus you get the benefit of being allowed small 1KB tiddlers on 4KB block size drives without a size penelty.
    Mario Pietsch
    @pmario

    but then we need an additional storage area to store the history in the HTML file and this creates bloat.

    This is my biggest concern

    One thing we do need to do is hard code .tid files into the boot sequence so they can be written using a simple JavaScript function instead of calling render tiddler.

    The server version does exactly that. Every tiddler that is part of the "tiddlers" directory will be loaded into the TW and served as a "single file version"

    Then we can guarantee that the tid format will never change. At this point I don't quite know how to

    The .tid format is as simple as it can be. ... The only 1 field needed is "title" ... Then there are 2 spaces ... The rest is the text field. That's it.

    Mario Pietsch
    @pmario

    And do I ever wish I could somehow implement typescript support.

    IMO TW should stay pure javascript.

    There is no real value in introducing source code, that needs to be transcoded into javascript, that it is possible to be debugged and executed. ... Use a proper editor with a recent hinter, and you will get the same advantages, without the downsides.

    The main concern for me is maintenance. Other users may want to use CoffeeScript to build TW. You want Typescript. An other one may want to use Dart.

    After several years most of those languages are gone, "pure" JS will stay!

    This message was deleted

    ... It loads a faster because there is much less file IO. Plus you get the benefit of being allowed small 1KB tiddlers on 4KB block size drives without a size penelty.

    IMO file IO and hard disk size is not a concern anymore. ... Most users have mobile devices and make fotos of 1MByte+++ in size and don't even think about, what that means.

    Mario Pietsch
    @pmario

    ... At this point I don't quite know how to simply and accurately serialize and deserialize tiddlers. I guess I just need to look at the code yet.

    That's always a good thing ;) .. boot.js isn't that complicated. ...

    ---------------------- Starting with "deserialize" ------------------------

    • Just start at the top and search for: //////////////

      • This will give you a very rough overview, about the elements, that are part of boot.js. You'll find:

        • utilities
        • module mechanism
        • barebones tiddler objec
        • barebones wiki store
        • browser definitions
        • server definitions
        • node definitions
        • main startup functions
        • main boot ... at the very end.
    • Then start over from the top again

      • Just skim the functions and their comments
      • Don't go into code details
    • When you've gone from the top to the bottom, you should have a better overall picture.

    • search for: deserializerType .... it's main part is in "barebones wiki store"

      • you can go into details there.
      • see: $tw.Wiki.prototype.deserializeTiddlers
      • also see: "Register the built in tiddler deserializer modules" a view lines below!!
    Mario Pietsch
    @pmario

    -------------- Serializing Tiddlers is like "rendering" them to a TEXT format ---------------

    A lot of templates are involved.

    • $:/core/templates/tid-tiddler
      • It uses 2 widgets: <$fields and <$view
      • IMPORTANT have a very close look at the backticks in the code !!!
    • in wiki.js see: exports.renderTiddler = function(outputType,title,options) {
      • it uses outputType, template, options

    I did start to understand it as I had a very close look at: saver-handler.js

    /*
    Save the wiki contents. Options are:
        method: "save", "autosave" or "download"
        template: the tiddler containing the template to save
        downloadType: the content type for the saved file
    */
    SaverHandler.prototype.saveWiki = function(options) {
        options = options || {};
        var self = this,
            method = options.method || "save",
            variables = options.variables || {},
            template = options.template || "$:/core/save/all",
            downloadType = options.downloadType || "text/plain",
            text = this.wiki.renderTiddler(downloadType,template,options),

    If you follow the paths, you'll begin to understand it. ... IT's very sophisticated and a bit tricky

    • the starting point here is the: .\core\templates\save-all.tid

    I hope that helps!
    have fun!

    Andreas Hahn
    @Drakor

    Third, I don't know whether this should be a server or client side thing.

    As far as I'm aware, the tiddlyweb API has server side revisions and given how we're aiming to support the full API, I can see that being implemented eventually.

    Arlen22
    @Arlen22
    Interesting, I'll look into it.
    Abhishek Tripathi
    @TwistingTwists_gitlab
    Hello,
    Is there a way to create forms in tiddlywiki ?
    patoCode
    @patoCode
    hoe create dockerfile for tiddly, please help me
    pubmania
    @pubmania

    Hi I am trying to create a button that mimics the behaviour of "Create a new tiddler tagged with this one". I used this

    <$action-sendmessage $message="tm-new-tiddler" text='<$transclude tiddler="$:/category">' tags={{!!title}} />

    which works fine so long as title does not have white space but if it has white space it takes each word as a separate tag instead of making whole title the tag.

    Please can someone help me achieve this?

    dev4light
    @dev4light
    anyone answering questions here?
    dev4light
    @dev4light
    I see that tiddlywiki is constantly downloading the whole contents with all tiddlers at each refresh. Any way to avoid this?
    (I've it configured using docker and it has Basic Authentication enabled)