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

Earlier comments
ymolodtsov#
My only suggestion would be to add some padding to the text field, at least as an option.
telesilla1 reply#
If this supported multi-user synchronous editing Google-docs style I'd be thrilled.
jessegrosjean3 replies#
Sorry that's not likely. I'm a single developer, not ready to run a server. More likely (though still have many more basic features on roadmap) is automatic merging support when a Bike file is stored on something like Dropbox.

In fact that would be a pretty great service (for someone else to develop). "Dropbox", but for strutted data (xml, json, whatever) that knows how to merge trees and make use if unique ids. Maybe it wouldn't work, each merge situation needs a special case solution. But for Bike files at least I think it might work pretty well.

nehalem2 replies#
Did you have a look at [y-js](https://github.com/yjs/yjs)? They claim to be suitable for p2p collaborative editing and they have bindings for other languages as well.

Continue this thread — 1 reply

jamil7#
Which other languages?
jitl1 reply#
I think you could encode a “shelf” last-write-wins CRDT into your HTML using data attributes without exploding your file size. You would need to add a data-version attribute, and if you want to support hand-editing or editing by programs that don’t understand the CRDT, a CRC32 or other parity as data-parity so your loader can tell when a user might have edited a row without updating data-version.

Shelf is really simple - the JS implementation is tiny (https://github.com/dglittle/shelf) and a walkthrough of the algorithm here is a quick read: https://bartoszsypytkowski.com/shelf-crdt/amp/
It wouldn’t handle character level sync - but would let you merge documents at a rows/items/blocks level.

jessegrosjean#
Thanks for the tip, I'll keep a reference to this. I will say that it's still unlikely that I tackle this myself anytime soon. I'm a single programmer, and not all that fast at that. Lots of more basic stuff to do on Bike, and iOS version... going to keep me busy for a while.
Leftium#
Simplenote survived the Moby Dick workout. It lags a little after paste, and hangs momentarily on redo. It may work better with more structured data. (I used the markdown file in the webapp; didn't test native/mobile versions.)

So https://www.simperium.com/overview/ might be a low-effort option to add syncing without managing your own server.
> - Data transparently moves across mobile, web, and desktop versions of your app
> - Your users can read and write data even when they're offline
> - Multiple users can collaborate with the same data at the same time
> Simperium persists your data for you in buckets... Every Simperium object is JSON data that is stored in a bucket.
> Simperium does some basic conflict resolution for you automatically... When two edits are made for the same field though, Simperium supports automatic resolution for strings (currently) and will merge the two edits together.

joshspankit#
Let me know when I can have the same item under N nodes.

Not a copy, but a leaf with multiple parents.

nopcode#
I would consider dropping notion for this if there was a good Windows cousin.

Load more comments