Coming from Logseq, Outlines and Linked Mentions

Same here. I actually never looked them directly up, if not for backup or maintainance (but always missed my nvim editor).

Personally I don’t take Markdown or text files as requirement for data sovereignty, as long as the note app provides some form of export to file exchange formats or uses a well known database like SQLite, which allows to export notes via SQL.

Out of interest (and not entirely off topic), why are you looking at SilverBullet as a LogSeq replacement? I hear there’s some people unhappy with the whole move to using a DB on the backend, but that doesn’t seem to be the driver in your case?

This is tricky since there’s no folding support in the live preview renderer at all right now…

Some thoughts that came to my mind, roughly in descending order of importance (sorry for wall of text):

  • [SB] Good mobile support, still offline-first
    • Logseq mobile app wasn’t a great user experience for me.
  • [SB] Sync support out of the box
    • Logseq: reports of stability issues and data loss use to keep up in forums (not an active sync user myself); kinda in-transparent development for this component; not opensource IIRC; vendor-lock in; no possibility to be self-hosted
  • [LOGSEQ] Not-well scaling performance: app was quite snappy with few data, but performance became severely slow with lots of notes/blocks; re-syncing index takes a couple of minutes for my notes (reference: ~60k blocks, ~10k pages)
  • [LOGSEQ] Personal loss of trust in developers: lack of communication (esp. in their Discourse forum); development stalled 1 - 1.5 years ago starting with DB version; known and unfixed bugs (like dead block reference over time), that accumulated, became annoying
  • [LOGSEQ] Roadmap: I am skeptical about their plans to keep database notes in sync with local markdown files, while also providing sync with other devices. Personally I don’t trust this system enough to handle sensitive files.
  • [SB] PWA > Electron app, which consume a lot of memory and resources, and are bundled with outdated browsers
  • [SB] Ability to write directly and comfortably in favorite editor (Neovim), Vim support also in the web app
  • [SB] At some point I realized, that I’ve put all my PKM eggs in one basket and tried to export blocks to a structured database format, in order to avoid vendor lock-in. This turned out to be a cumbersome endeavour with their API (it works, but if you want to retain all information about blocks, pages etc., there are lots of quirks involved)
  • [SB] More expressive querying ability by leveraging custom object types/classes
  • [SB] Need for a mix between outliner and prosa writing, wrappnig everything in bullets sometimes isn’t appropriate.

Yes, actually I liked this step first, in hope for better performance. It doesn’t feel right to directly write into an outliner-managed file, so DB probably might the better storage for these kinds of notes anyway. But then, there are doubts about vendor lock-in (Logseq became venture capital funded) and uncertainty, when DB version actually will be released. Last, it’s my impression, plain file storage is more beneficial for local/offline AI assistance.

3 Likes

On this topic, @chabbi covered it pretty comprehensively. If I may add my own thoughts on top of that:

Logseq has had such solid ideas (some of which came from other PKMs) and has truly changed note taking for me

  • The implementation though… as @chabbi said, I lost trust with the devs a long time ago for many reasons
  • Mobile has been unusable from day one
  • Desktop has so many bugs I’ve had to build up muscle memory for
  • And the performance for an app I spend so much time with all day is…stressful.
  • Change to DB was merely the last straw

Why SB in particular? Again, @chabbi covered it well, but:

  • “dynamic text” + Lua combo makes querying far more powerful than Logseq. Overall, “note taking for programmers” aligns very well
  • no commercial interest, which makes privacy, licensing (I appreciate the MIT license!), lack of a paid tier etc. easy
  • Simplicity: I appreciate:

    One of the technical goals of SilverBullet is that it should be a project that, complexity-wise can still be managed by just me.

1 Like

I’ve pushed the new linked mentions and new block-aware snippet extraction on main, it’s now on the edge builds. You’ll have to run a Space: Reindex to reindex everything to see the results though.

1 Like

I agree with all your points, but this one confused me. Can you elaborate? I want to make sure I’m not missing something.

In my view, the Entity-Attribute-Value (EAV) approach to data modeling makes querying much more flexible in Logseq, versus the relational structure in Silverbullet.

In Logseq I can query items based on their relation’s attributes or even their relation’s relation’s attributes (the datalog video I shared covers this well).

As an example, “give me all TODO items that reference the tag #topic, but only those that reference ‘People’ with the page property ‘team’ = ‘Engineering’”

I agree, that’s a good video, and so is your example. What I was thinking when I wrote that was more general than queries (sorry I didn’t word it well), and around easy “user-space” customization:

  • top/bottom widgets are simply user-changeable lua code
  • customization via space-lua is excellent. I’ve been able to implement things around folding, journals and such
  • I can make tasks appear exactly the way I want in results
  • Injectable JS means things like the date selector in LS can be implemented via userspace in SB

For me, I tend to use the things in the list above far more than the expressivity of querying that Datalog can offer. But even with the relational model SB uses around querying, there is a lot of hackability in post processing relational query results. I imagine your example can be implemented by filtering in post processing, even if the resulting code is not as concise as in Datalog.

There are certainly many entire query classes that can simply not be done at all without EAV, but I’ve not come across too many of these in the PKM context. This might well be indicative of my own constrained thinking. I’d love to learn how you use EAV based querying in the PKM context. Perhaps some illustrative examples would help. Perhaps I’m not using it as well as I could be!

I am a Logseq → SB user, and did so for these reasons:

  • more consistent behavior between mobile and desktop
  • better syncing (was using hacks before, which ended up with data loss somewhat regularly)
  • I can add custom functionality in Lua way more easily than I could create a Logseq plugin which would only work on desktop anyways
  • I was exporting pages to my personal website, but with Logseq that meant running a script on my desktop, but in SB it’s a button I can press inside the sb interface whenever I want (the share functionality made this process even easier)
  • the outliner aspect of Logseq ended up not being something I valued, as I wanted to write in prose to put things on my website anyways
2 Likes

Works great (side note: ./silverbullet upgrade-edge is awesome!).

One thing: alignment is off. The children are “outdented” while they actually need to be indented wrt to the parent:

Ehm, I’m not sure I understand what I’m looking at. When I try what you’re describing I get the children indented.

and on the sup page linked mentions:

That talk indeed is an excellent introduction of Datalog.

I agree with you, it is a beautiful language for graph queries, especially to find recursive relations of entities (objects, tags etc. in SB). It’s also fun to use, when you got the hang out of it. Imagine tags “SQLite”, “Relational database”, “Database”, and there is need to query backlinks for all kinds of databases, without knowing these relations before-hand. Datalog makes this possible in a concise way. In (some?) SQL dialects there is WITH RECURSIVE CTE like with newer SQLite versions, but I did not find that as elegant - also not sure, if SB supports this?

I don’t know what Logseq actually did to Datalog or its DataScript dialect - but performance for recursive queries was atrocious! I had luck, when it did crash the whole app right away, instead of freezing it for some time :slight_smile: . Then I gave up on complex queries like these, despite need for it …

1 Like

Formatting on my end is off in several ways, no idea why:

Original:

Linked mention:

I’m using Chromium on Windows 11.

Edit: Formatting is perfectly fine on Edge/W11. Strange, SB formatting is otherwise all fine on Chromium.

I did something to make linked mentions kind of work for items like tasks. The slash command copy generates a uid and assigns an attribute and tag to the item. The tag is copied to clipboard and can be used wherever the item is mentioned.

function get_attr(text, attr)
  return string.match(text, "%[" .. attr .. ":%s?([^%]]*)%]")
end

local function random_alphanum(len)
  local chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
  local result = {}

  for i = 1, len do
    local idx = math.random(#chars)
    result[i] = chars:sub(idx, idx)
  end
  return table.concat(result)
end

slashCommand.define {
  name = "copy",
  run = function()
    local line = editor.getCurrentLine()
    
    local temp = editor.getCursor()
    editor.moveCursor(line.to)

    local uid = get_attr(line.text, "uid")
    if uid == nil then
      uid = random_alphanum(5)
      editor.insertAtCursor("[uid: " .. uid .. "] ", false, true)
    end
    
    local tag = "#uid-" .. uid
    if string.match(line.text, tag) == nil then
        editor.insertAtCursor(tag, false, true)
    end
    editor.moveCursor(temp)
    editor.copyToClipboard(tag)
  end
}

Example:

  1. Tasks and progress which could be scattered in space.

  2. Tags collect all the linked mentions



I’m guessing some CSS tricks could hide the uid attribute and just show a minimal button instead of the full tag.

It might be possible to make a plug by extending this instead of changing the core functionality of SB unless I’m missing something.

I would also appreciate if someone could point me to a way to sort the "Objects tagged with " section by creation date, last modified or date header, link or ilink (if available) ?

I love the new ‘eye’ icon for transclusions, makes it faster to go to them.

If there is a way to override its behavior, we open the page in the right side panel instead. Making it even easier to quickly change its contents and go back to where we came from. Which makes it closer to ‘live editing’ like in Logseq.

That would be quite a project. It would be more feasible to maybe let e.g. Ctrl or Cmd-clicking opening it in a new tab or browser window.