{"by":"_sinelaw_","descendants":150,"id":46135067,"kids":[46137819,46138834,46139988,46139578,46138380,46140845,46140106,46138187,46139942,46142920,46146404,46143990,46141700,46148520,46137992,46147399,46141604,46142269,46138392,46144226,46141462,46143885,46140441,46143444,46143724,46152522,46140297,46149653,46145915,46141652,46142880,46148121,46142734,46165835,46137895,46141073,46139518,46139259,46139391,46145940,46142760,46137789,46148160,46138701,46138789,46156024,46171806,46145932,46145933],"score":187,"text":"I built Fresh to challenge the status quo that terminal editing must require a steep learning curve or endless configuration. My goal was to create a fast, resource-efficient TUI editor with the usability and features of a modern GUI editor (like a command palette, mouse support, and LSP integration).<p>Core Philosophy:<p>- <i>Ease-of-Use:</i> Fundamentally non-modal. Prioritizes standard keybindings and a minimal learning curve.<p>- <i>Efficiency:</i> Uses a lazy-loading piece tree to avoid loading huge files into RAM - reads only what&#x27;s needed for user interactions. Coded in Rust.<p>- <i>Extensibility:</i> Uses TypeScript (via Deno) for plugins, making it accessible to a large developer base.<p>The Performance Challenge:<p>I focused on resource consumption and speed with large file support as a core feature. I did a quick benchmark loading a 2GB log file with ANSI color codes. Here is the comparison against other popular editors:<p><pre><code>  - Fresh:   Load Time: *~600ms*     | Memory: *~36 MB*\n  - Neovim:  Load Time: ~6.5 seconds | Memory: ~2 GB\n  - Emacs:   Load Time: ~10 seconds  | Memory: ~2 GB\n  - VS Code: Load Time: ~20 seconds  | Memory: OOM Killed (~4.3 GB available)\n</code></pre>\n(Only Fresh rendered the ansi colors.)<p>Development process:<p>I embraced Claude Code and made an effort to get good mileage out of it. I gave it strong specific directions, especially in architecture &#x2F; code structure &#x2F; UX-sensitive areas. It required constant supervision and re-alignment, especially in the performance critical areas. Added very extensive tests (compared to my normal standards) to keep it aligned as the code grows. Especially, focused on end-to-end testing where I could easily enforce a specific behavior or user flow.<p>Fresh is an open-source project (GPL-2) seeking early adopters. You&#x27;re welcome to send feedback, feature requests, and bug reports.<p>Website: <a href=\"https:&#x2F;&#x2F;sinelaw.github.io&#x2F;fresh&#x2F;\" rel=\"nofollow\">https:&#x2F;&#x2F;sinelaw.github.io&#x2F;fresh&#x2F;</a><p>GitHub Repository: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;sinelaw&#x2F;fresh\" rel=\"nofollow\">https:&#x2F;&#x2F;github.com&#x2F;sinelaw&#x2F;fresh</a>","time":1764773126,"title":"Show HN: Fresh – A new terminal editor built in Rust","type":"story","url":"https://sinelaw.github.io/fresh/"}