Show HN: Bike – macOS Native Outliner (opens in a new tab)hogbaysoftware.com
513 pointsGive it a try, it feels different. (movie on home page if you don't have Mac)
Other Features:
• In text mode Bike works like a normal text editor. In outline mode rows are constrained to outline hierarchy.
• .bike file format is HTML subset, so files are easy to parse and manipulate. Bike also supports .opml and .txt.
• Scriptable via AppleScript. Javascript plugin API also expected in future, though no timing on that.
• Architecture needed to support fluid editing also makes Bike faster/more scalable than most (all?) outliners and many text editors. I test performance using the Moby Dick Workout[^1].
Implementation Notes:
• View is built using CALayers[^2].
• Animations are performed by Core animation and Motion[^3] lib.
• View performance is determined by visible text, not document size.
Model representation is interesting in that it’s just a flat list of rows. Each row has a `level` property, outline structure is determined dynamically. View implementation requires that each row has a unique ID.
I’m using OrderedDictionary from Swift Collections[^4] to store rows. This is Bike’s performance bottleneck for large outlines. Eventually I may change to augmented b+tree and then should be able to work with gigabytes worth of outline. That will be fun, but not sure it’s actually needed. Already probably fast enough for 99% of use cases as is.
Hope you find Bike interesting. I’m happy to answer any questions.
[^1]: https://www.hogbaysoftware.com/posts/moby-dick-workout/
[^2]: https://developer.apple.com/documentation/quartzcore/calayer
[^3]: https://github.com/b3ll/Motion
[^4]: https://github.com/apple/swift-collections
Comments (236) 69 threads
Show all comments
Showing thread 3 of 69
I think you started working on this around the time I was working on multi-block text selection in Notion. I remember seeing a preview tweet in a Andy Matuschak thread and thinking “great minds!”. When I started working on it, I was so surprised that no outliner I tested had multi-item text selection! It’s a unique fusion. I’m curious about how you handled deletions across different indent levels… Do you know of any other outliners with it besides Bike and Notion?
Bike's editor is pretty much:
OutlinerLayer RowLayers LineFragmentLayers
I use CoreText to line break and render into each LineFragmentLayer. A whole new level of performance is possible if I knew more metal/opengl, but right now rendering text on CPU and sending as line fragments to CoreAnimation.
> Do you know of any other outliners with it besides Bike and Notion?
It's hard to define "outliner". This has been a main feature of TaskPaper for a long time... but TaskPaper is maybe a bit more "text editor" than outliner. Also tools like orgmode and probably lots more are pretty much outliners and also have all text editor features.
But yeah, for tools that feel more like an outliner it's not a common feature. In particular Bike even allows you too over indent and movies lines around without moving children. I think that's pretty unique, and goes together with multiline selection in Bike's case.