Lurker News
Bike’s most original feature is the “fluid” text editing. Lots of text editors have animated some interactions (cursor movement, insert newline, etc), but I think Bike is the first designed from the ground up to support fluid editing.

Give 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 31 of 69

soapdog1 reply#
This is a great outliner. I'm quite impressed by how fluid it is. Great work!

quick question: why you chose to go with HTML instead of making OPML the default file format? I'm not judging, I'm just curious.

jessegrosjean3 replies#
I want more structure in the file format. OPML is perfect for plain text outliners. But if you want to support rich text then you need to encode the HTML as plain text. This means it's all of the sudden harder to process with web tools like xpath.

Also (not sure this will happen, but I plan to try) I expect to add different node types. For example right now every node is a paragraph. In future might have ... A HEADING (innovation I know). Again that maps really well to HTML, not as well to OPML.
Plus I just like the fact that .bike files are HTML. Makes me confident that they will live and be readable far into the future.

d3nj4l1 reply#
Have you considered using the org format? I'm not saying it'll be good (I've not seen an implementation outside emacs that really gets it) but org-mode has been the best outliner I've personally used.
jessegrosjean#
I haven't looked too much into it. If someone really wanted it and was motivated to help write I would (might, contact me first) support, but generally the existing formats are what I will focus on.
psydvl1 reply#
Why not to use markdown formatting?

For example, Dynalist use this idea for their files
And node itself is heading, while when they need paragraph with heading they create _note="" attribute into element

jessegrosjean#
Markdown is great and I build another app, FoldingText, around it.

But for my own use I over time realized that was a mistake. All the parsing and formatting adds complexity. I think rich text (which to be clear Bike does not yet have, though I will add soon) is a simpler way to work from user perspective. Just issue commands instead of remember and see formatting rules. It's cleaner and simpler for my uses.

soapdog#
I understand, thanks for sharing. I've seen some outliners using node attributes to change how the content is interpreted in OPML and thus being able to use them for things beyond plain-text. I'm quite partial to OPML, but HTML is cool too and easier to reuse.

Anyway, congratulations on the impressive first public release. The more outliners the better in my opinion.