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

camgunz2 replies#
In particular I love these features:

- "respects your computer's memory and battery"
- "uses open file formats"
- "is scriptable"
Feels like we should also think about these kinds of things when we think about "organic" software. Kudos to the developer for these.

jxy4 replies#
How much memory and battery do all the animation use?
stevenbedrick1 reply#
Probably very little if it is built on top of CoreAnimation, since that set of OS APIs is extremely heavily optimized specifically to enable animation-rich UIs that are light in terms of CPU and battery use.
armadsen2 replies#
Indeed. As far as I know, Core Animation was originally created as part of work on the first version of iOS (née iPhoneOS), where the target device, the original iPhone, was pretty severely memory and CPU constrained.

Continue this thread — 2 replies

jessegrosjean#
I think the architecture needed to support them means the total package is less than most apps. For example consider scrolling:

In Bike it's fast enough that when you scroll it just updates what you can see on the screen. This means you only pay memory for visible text. For most macOS apps scrolling performance is achieved by pre-rendering before and after the visible scroll area. So you pay for that cache and you also pay for the background processing required by pre-rendering.
Also consider simple things like window resize. In Bike that only effects visible text. If you open a large document in TextEdit you will see that resize is quite slow and processor and memory intensive. (you can test with https://www.hogbaysoftware.com/posts/moby-dick-workout/). And then after that resize there's lots of background processing to refill a bunch of layout caches I guess. On the other hand resize is instant and only does work for visible text in Bike.
I don't think the animations are expensive, but it's hard to test because that work happens in Mac OS window server and I'm not an expert there. If they really are a problem and you are on battery then you can turn off animations in preferences.

sudhirj#
CALayer is part of the OS toolkit, so probably not much. It’s the same system the OS itself uses, so probably a shared lib, and it’s heavily optimised. Similar to animating your web page with only CSS animations. It’s all baked into the existing rendering system already.
jessegrosjean#
If anyone digs in and profiles Bike 1.0 you'll unfortunately find that it is wasting some CPU with a timer. This will be fixed soon and is not related to underlying architecture or animations. It's me coalescing events from user defaults with a Combine API that I didn't fully understand.
b3morales#
Jesse is certainly one of the patron saints of open formats in the Apple world given he invented TaskPaper.
kall3 replies#
This is an impressively well stripped down app. It's all I ever wanted from OmniOutliner (remember when it shipped with OS X?).

Unfortunately, I've been drawn in by the linking functionality in Roam/Logseq and cannot go back to a simple outliner, though this makes me want to.
I don't think I'm a fan of the animated cursor while typing. It somehow makes the typing feel slower, like it takes some physical effort for the cursor to push forward.

jessegrosjean1 reply#
It can feel that way for some people. Seems different per user, there's a preference to change the speed in settings.

Also yet need to remember that you don't need to wait for it, sometimes you might just get mesmerized by it and then it feels slow, but if you just type it will keep up with you. It's only ever the "last" animation that fully completes if you are typing fast.

marcuskaz#
I'll have to try it again, I didn't realize there was a setting for it. I uninstalled it because the typing felt really slow and awkward.

My two cents, default disable so it feels faster, it sounded like speed and smoothness was one of the many selling points.

lf-non#
Yes, I am in the same boat. I started using Logseq when I switched to linux as my primary workstation and could no longer use OmniOutliner.

I used to focus a lot on structuring and organizing things properly before. But after I started using linking, tags, ref embeds etc. more I found that I was more productive by just quickly dumping specific things into poorly organized isolated notes, and adding headers, cross-linking/organizing/merging them much later if they survive.
I later learnt (to my surprise) that people had written whole books about similar methodologies (zettelkasten etc.) but yet to sit down and explore any of them.

zaphod4prez#
Another plug for linking... I loved Taskpaper and would be very interested in adopting Bike, but I need those sweet links/backlinks
jitl1 reply#
Congratulations on the release! It’s cool to see more outliners with multi-item text selection. The “fluid” animations look really delightful — I’m jealous! I know you’ve shared some details about the animation implementation, but I’m curious about how much system stuff you take advantage of. Is your view accessible through VoiceOver? What parts of the Cocoa text system do you use (or, what do you use instead for layout and shaping)? (https://developer.apple.com/library/archive/documentation/Te...)

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?

jessegrosjean1 reply#
Thanks!

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.

burntcaramel1 reply#
I imagine then you would had to reimplement behaviour for text selection from scratch? Impressive stuff!
jessegrosjean#
Yes, all the basic needed to be implemented. Impressive or dumb or maybe just persistent.
mpolichette#
I've been using Workflowy for years now. I really love it.

They been working lots of interesting features in but stick to the basics that everything starts as a list. You would be surprised what is possible w/ just a list!

Load more comments