Towards SilverBullet 1.0

Right. There’s two scenarios here:

  1. This space script (collection) is getting popular and it’s annoying that people have to copy & paste
  2. This space script (collection) is getting unwieldy and complicated, we need to apply some serious software engineering here

In scenario 1, I think the answer can be to distribute space scripts as Libraries There’s some infrastructure for this now, and I think it may actually be nice to take the linked advanced tasks scripts and move it into a Library/Tasks or similar library so that people can just pull that in.

In scenario 2, indeed the space script can be rewritten as a plug. This is doable today. Potentially we can offer some ways to make this easier, for instance by supporting the space script APIs in a plug environment, so you could basically just copy & paste your space script into a plug (or export it as one), and iterate from there. Not sure if that would work, but it’s something worth exploring.

1 Like

Here’s a few things I would love to have in v1

  1. have a way to hide/collapse the Frontmatter
  2. soft delete
  3. a dedicated menu to browse recent opened pages similar to what intellij offers. This would replace the need for tabs.
  4. a feature to “rename” a path and apply it to all the notes in it.

Example for suggestion 4:
Imagine I have the following notes:

job/organization/org1/meetings
job/organization/org1/notes

I want to be able to easily move everything to
organization/ instead of job/organization

1 Like

have a way to hide/collapse the Frontmatter

Yes please! Another vote for this

1 Like

Is Page: Batch Rename Prefix what you’re looking for?

That’s exactly it! thanks!

  1. Other thing I miss from jetbrains world is CamelHump search:
CamelHumps is a feature that identifies parts of compound names composed according to CamelCase, where each part starts with a capital letter, or when parts of a compound name are separated by underscores. You can type only initial letters of these parts, and JetBrains Rider will find items with matching names automatically.
  1. Also, every time I have to create a new note it takes longer than I would like because I have to type the full note path/name. Maybe we could have a 2 step process where 1st we would decide the path, here we can have autocomplete tools, and then we type the note name.

Anyway, SB is already a great tool, thank you maintainers for all the work!

1 Like

My wish would be a better search where the search results not only show the page name but snippets from the page (like Google and other search engines). Most note-taking apps are lacking in this regard, see also Customize search results

1 Like

I think that being able to search and find notes is something important that makes our notes more valuable when we can find them to consult them.

Being able to search: word + word + not word and case insensitive and sort result by date or another criteria would be very useful.

In addition to being able to customize the search template:

Here’s some more features I remembered:

  1. Soft delete notes
  2. Keep undo after opening a new note note

I’m getting the ideas while using SB. Do you prefer me to create new replies every time I get an idea or edit the old ones?

1 Like

I think now is a good moment to think about these snippets, since Transclusions just got added, which allow doing basically what you need. Just aren’t integrated with search (yet?)

1 Like

Not sure it’s a “1.0” item, but I think having a plugin manager would make things a lot easier for people who don’t have a ton of experience with managing their tools. Something to search for plugins, maybe show the most popular ones? Could also do something similar with libraries.

It would take some backend to manage it, though.

I would love folders and/or note management. I really like the Obsidian approach, where I can easily visualize where my notes actually are.

Note that we do have this: Plugs/TreeView

Ah, I had no idea :sweat_smile:. Thanks!

Currently on my list of things remaining that I would like to get done before a 1.0:

  • Schema support: I didn’t intend to do this originally, but because internally configuration is now validated using JSON schema, I may as well take this one level farther and expose this validation behavior to users. I’m thinking about two areas:
    • space-config: by supporting additional configuration options, and checking their values for the proper types (and potentially use this for completion later at some point)
    • frontmatter: that is, add schemas for tags. This would allow you to e.g. say "every #person tagged page should have a firstName attribute of type string and show validation errors when you’re doing it wrong.
  • Rework of Plugs/Share
  • Move PLUGS into space config
  • A code cleanup and performance improvement pass. I’ve done some of this for 0.9.0, but I bet there’s a lot potential here left. Part of this would also to leverage JSR more heavily for dependencies and perhaps pushing SilverBullet itself (or at least it’s plug APIs) there as a package.
  • Another iteration of the manual and website content
6 Likes

Thank you!!! I absolutely hate feature creep. I’ve seen so many projects become bloated and difficult if not impossible to maintain. I prefer more minimal well designed applications that limit features. I applaud your stand on limiting features to those that are actually needed and used. Thank you again!

4 Likes

Let me bump this topic with some new insight and challenges.

As you may know, I’ve primarily been working on Space Lua recently. The deeper I go with it, the more I convinced that this is The Way. I believe that deeply leveraging Lua will give us more elegant and powerful alternatives to a few things we currently have in SilverBullet.

Specifically, I think it can replace the following things:

  • Query blocks and query language
  • Template blocks and template language
  • Expression language
  • Templates (such as to create snippets, live template widgets, perhaps new page templates)
  • Space Script
  • Some use cases for Plugs

So pretty much all the power user features that SB offers.

If I would have known or realized what I could do with Lua, I would not have built any of these features as they are, and would have built Lua equivalents instead. But, here we are.

This has happened before.

Old timers may remember that in earlier SilverBullet versions had a whole lot more things built in. All the snippets like /h1 etc were all hard coded before. I then invented the whole templates with hooks mechanism and was able to delete a whole lot of builtin functionality and moved them into libraries.

That was pretty great, but also meant people had to do some migration work to move from one system to the next.

With a move to fully leverage Lua, we may face a similar if not bigger migration challenge.

What would be the nicest for me, would be to simply rip the bandaid:

  1. Finish up the missing pieces of all the “new ways”
  2. Simply delete the old mechanisms
  3. Live happily ever after

But this would be rather brutal to the community, because it would basically break everybody who used any of these SB features (like templates, queries etc.). Of course, you can pin your version and simply never upgrade, but…

A softer approach would be to deprecate the old systems, but keep them in place for some time. I’d leave the code there, but not invest much in it (as is already a little bit the case). I’d update the documentation with all the new ways, re-record the videos with the new ways, which would naturally lead to all new users simply not even realizing the old systems are still there. Then, after some amount of time, I’d release versions of SB that more and more vocally would start to warn users that they need to migrate to the New Way, and then eventually delete the old mechanisms. If people don’t want to make the effort, they could freeze their versions to an old SB release of course, but they’d never get any new stuff.

Another approach would be to attempt to automate the migration. With a lot of effort, I could write functionality that would attempt to rewrite your Query Language queries to Lua Query Language queries. That replaces query blocks with Lua expression directives. Or template blocks with Lua expression directives. A (for me) cheaper solution could be to leverage AI to do this (with some smart prompting) but that would mean that I’d have to ask everybody to pass all their content through some LLM to migrate, which many will likely not be very comfortable with.

For my sanity (code base size and maintenance) I’d really like to get to a point where eventually only one system exists and I can delete the old code, and my sense is that one system should be Lua based.

I’m bringing this up in this 1.0 thread because I think my new target for 1.0 is to make Space Lua feature complete. That means: there’s a Lua way to do all the things listed as the things to be replaced (at the top of this post). I don’t think I would immediately delete the then-legacy mechanisms, but at least “hide” them (from docs) or at least clearly mark them as deprecated.

Anyway, a bit of a train of thought update. But I’m interested in your perspectives, especially on what you think a reasonable migration path could be.

3 Likes

Couldn’t we migrate a lot of the older stuff into a single legacy plug which would be opt-out and at some point we make a cut and make it opt-in? Most of the stuff is in plugs already anyways. It’s mostly the lezer stuff for parsing thats not super contained as it needs to be build. Maybe we could even move it into a separate repo? But I definitely support the idea that there should be one way to do stuff.

3 Likes

Hi :slight_smile: Been a minute since I’ve been around, but not stopped using SB. Just a busy time in life right now… Hope everyone’s doing well.

Personally: I’m 100% for Space Lua and when I happened to read about it last night I was thrilled to see the development.

The migration bit is indeed odd, and I think that attempting to auto-migrate is probably more effort than having the community help one another and establish “best practices” or so–like how naturally occurred when Space Scripts were introduced originally. I think Lua also makes this easier in some ways as the stdlib is a lot less… confusing (?) than JS’s… at least, IMO. Then again I love me some metatables, so I’m probably the wrong person to ask :wink:

I think @MrMugame 's idea of a plugin could be a really elegant way to support the transition.

Do you have any idea when Space-Lua will be available or rather when all the current functions will be migrated to Space-Lua?

In my opinion, the sooner space lua is available before a hard break, the better. Give us more time to transition and build new tools with it. You’ve mentioned it before that Space-Lua will most-likely be ‘the future’ so I stopped investing too much time into Space-Scripts and other functions.

That said, regardless of the strategy we should add some kind of note to the soon-to-be-deprecated functions way in advance and forward them to the new way to do it - Space-Lua.

This function will be deprecated with version 1.0.0 and no longer work with version 1.1.0 - Please use Space-Lua Function X instead > Link - as an example.

That depends on the plan tho.


I’d prefer this approach. This would allow us to compare functions and results of the old and new way and makes it way easier.


Things will break anyway. There will be so many edge cases esp. since SB offers so much freedom. Not really sure if it is worth it.

Having a web tool that can help with the transition would be great tho. Some kind of Space-Script to Space-Lua translator e.g.

And preparing some guides with examples could help too.

Cheers
CF

3 Likes