Skip to main content

New best story on Hacker News: Show HN: Bike – macOS Native Outliner

Show HN: Bike – macOS Native Outliner
498 by jessegrosjean | 232 comments on Hacker 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://ift.tt/vsR6bkj [^2]: https://ift.tt/HDslkYx [^3]: https://ift.tt/LlJar82 [^4]: https://ift.tt/gPlx9GD

Comments

Popular posts from this blog

New best story on Hacker News: Launch HN: Electric Air (YC W23) – Heat pump sold directly to homeowners

Launch HN: Electric Air (YC W23) – Heat pump sold directly to homeowners 571 by cmui | 527 comments on Hacker News. Hi HN! I’m Chris Mui, founder of Electric Air ( https://electricair.io ). We’re building a residential heat pump system. This will be an all-electric replacement for your home’s furnace and air conditioner that enables more centrally ducted installs, manages your indoor air quality, and saves you money on monthly energy bills. We also streamline purchase, finance and install by selling directly to homeowners. You can place a preorder today at https://electricair.io . Heat pumps work by using refrigerant and a compressor to move energy against a temperature gradient. If you put 1 kWh of energy into a heat pump, you get 3-5 kWh of heating in your home. But this isn’t breaking the laws of physics because heat pumps don’t make heat, they move it around. The extra 2-4kWh gets absorbed from the outdoors, even when it is cold outside. The low pressure refrigerant in the outdo...