KnowledgeGarden / lite-net-3

lite-net as a web app with authentication and privacy; simplest-possible note taking app for network and non-linear thinking.
Apache License 2.0
12 stars 0 forks source link

Entries should be scanned for matches once a [[topic]] exists #26

Open Travis42 opened 4 years ago

Travis42 commented 4 years ago

I like the Roamlike feature, but I think it could be better:

KnowledgeGarden commented 4 years ago

I am a huge fan of the idea that you save a note and after a while, it appears with all the known topics identified, then you identify new ones to add to its internal collection. It does not do that because there are so many other things which come before that, the large one being conversation from the simple JSON database to the SQL database sqlite3. When you think about the computational complexity of doing that pattern recognition, it is combinatoric in the sense of NumWords in the note times NumTopics available. Javascript being single threaded doesn't make that trivial; it's not like in Java where you spin up a background thread and let it run on its own. There may be these possibilities:

In the long run, an advanced version of LiteNet will become client-server with a powerful backside capable of doing far more things than we can now.

Travis42 commented 4 years ago

Not a bad point about the runtime. Maybe a way around it would be if there were a function that checked onChange the entry to see if it matches any wikilinks and then suggests adding a wikilink to matched words. There should be far less wikilinks than total words, and we're only checking the current entry, so it should be less computationally intense.

KnowledgeGarden commented 4 years ago

The way I imagine it working is that, for each topic label, write a RegEx which finds each instance and replaces with [[

As a matter of fact, the present codebase is written in plain vanilla node.js and is not event-based; AppRun is an event-based node system which would be ideal for this, but in some sense, there is interested in rewriting everything into something a bit more reactive - Vue, Clojurescript, etc.