{"by":"jessegrosjean","descendants":236,"id":31409077,"kids":[31411107,31411522,31410795,31413358,31410089,31410637,31412305,31410888,31410208,31416329,31427469,31409833,31416651,31411338,31410560,31411658,31410713,31411603,31409878,31412754,31409908,31412075,31415916,31416569,31410746,31412764,31419971,31413375,31437292,31409839,31410267,31411112,31410351,31413887,31413289,31409927,31414498,31413758,31416117,31414463,31417277,31411062,31411643,31412283,31410314,31415686,31411091,31418590,31413410,31417760,31411340,31412434,31411648,31409906,31410981,31414839,31420200,31409574,31416096,31411731,31410581,31413481,31414813,31415333,31410998,31410512,31414094,31415546,31413284],"score":513,"text":"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.<p>Give it a try, it feels different. (movie on home page if you don&#x27;t have Mac)<p>Other Features:<p>• In text mode Bike works like a normal text editor. In outline mode rows are constrained to outline hierarchy.<p>• .bike file format is HTML subset, so files are easy to parse and manipulate. Bike also supports .opml and .txt.<p>• Scriptable via AppleScript. Javascript plugin API also expected in future, though no timing on that.<p>• Architecture needed to support fluid editing also makes Bike faster&#x2F;more scalable than most (all?) outliners and many text editors. I test performance using the Moby Dick Workout[^1].<p>Implementation Notes:<p>• View is built using CALayers[^2].<p>• Animations are performed by Core animation and Motion[^3] lib.<p>• View performance is determined by visible text, not document size.<p>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.<p>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.<p>Hope you find Bike interesting. I’m happy to answer any questions.<p>[^1]: <a href=\"https:&#x2F;&#x2F;www.hogbaysoftware.com&#x2F;posts&#x2F;moby-dick-workout&#x2F;\" rel=\"nofollow\">https:&#x2F;&#x2F;www.hogbaysoftware.com&#x2F;posts&#x2F;moby-dick-workout&#x2F;</a><p>[^2]: <a href=\"https:&#x2F;&#x2F;developer.apple.com&#x2F;documentation&#x2F;quartzcore&#x2F;calayer\" rel=\"nofollow\">https:&#x2F;&#x2F;developer.apple.com&#x2F;documentation&#x2F;quartzcore&#x2F;calayer</a><p>[^3]: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;b3ll&#x2F;Motion\" rel=\"nofollow\">https:&#x2F;&#x2F;github.com&#x2F;b3ll&#x2F;Motion</a><p>[^4]: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;swift-collections\" rel=\"nofollow\">https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;swift-collections</a>","time":1652788190,"title":"Show HN: Bike – macOS Native Outliner","type":"story","url":"https://www.hogbaysoftware.com/bike/"}