alefore/edge
View on GitHub ↗ ★ 88 C++
Edge - a text editor
19 mentions on Hacker News by 3 people: 3 stories, 16 comments · first 2020-03-24 · latest 2025-10-18
20082026
-
For what it's worth it, I'm still developing and using exclusively my own text-based editor/IDE: https://github.com/alefore/edge I wrote recently a bit about my conclusions after ten years of developing it:…
comment by afc · 2025-10-18 · in IDEs we had 30 years ago and lost (2023) -
In my text editor ( https://github.com/alefore/edge ) I use a balanced binary tree containing small chunks (std::vector) of contiguous lines. That works well enough for me: https://asciinema.org/a/314752 This requires loading the entire…
comment by afc · 2023-12-26 · in Text Editor: Data Structures -
…more or less the philosophy of the editor I've been working on (and using ~exclusively) since 2014: https://github.com/alefore/edge/tree/master Some parts of the UI are still defined in the compiled language (so don't fully fit your…
comment by afc · 2023-12-12 · in Text Editor Data Structures: Rethinking Undo -
In my text editor ( https://github.com/alefore/edge ) I keep the undo/redo history always linear, which I find works pretty well. So suppose the user does the following operations: • Insert "Hello" • Insert " world!" • Undo once. • Insert…
comment by afc · 2023-12-12 · in Text Editor Data Structures: Rethinking Undo -
…complexity (log N mostly, operations like "give me a copy with element at position i removed"): https://github.com/alefore/edge/blob/master/src/language/con... I use this throughout my editor. For example, I load a file into a sequence of…
comment by afc · 2023-11-09 · in Why does unsafe multithreaded std:unordered_map crash more than std:map? -
I also use this pattern: https://github.com/alefore/edge/blob/master/src/concurrent/p... I added an optional template Validator parameter that can be used to double-check invariants on the protected fields. I also declared a Protected with…
comment by afc · 2023-04-06 · in MutexProtected: A C++ Pattern for Easier Concurrency -
…a NonNull<> templated type (with specializations for std::unique_ptr<> and std::shared_ptr<>): https://github.com/alefore/edge/blob/af1192a70646f662539bfe6... It's slightly verbose, but has allowed me to delete a ton of CHECK(x != nullptr)…
comment by afc · 2022-04-29 · in The Brilliance of “nil” in Objective-C -
…a preferable paradigm (for how I structure my programs in C++, at least for my text editor: https://github.com/alefore/edge ). In my experience, using sync code looks more readable on the surface but just kicks the can down the road:…
comment by afc · 2020-05-19 · in What Color Is Your Function? (2015) -
…are even less complete. Lastly, I've continued to make significant improvements to my text editor ( https://github.com/alefore/edge ). I think it's interesting that I'm finding it hard to focus on some topics, but I'm currently very…
comment by afc · 2020-05-14 · in Ask HN: What's your quarantine side project? -
…classes or methods). For C++ (and other C like languages such as Java) this is implemented here: https://github.com/alefore/edge/blob/master/src/cpp_parse_tr... (if it seems too complex, part of it is because I cache previous states, as an…
comment by afc · 2020-05-09 · in Ask HN: What are your favorite developer-efficiency tips? -
…just generated programmatically from the repository of notes. The code that extract it is here: https://github.com/alefore/edge/blob/master/rc/editor_comman... (function zke, which receives the output path, the path to the initial note,…
comment by afc · 2020-05-09 · in Ask HN: What are your favorite developer-efficiency tips? -
Probably an unpopular opinion but... Write your own text editor. I've been working on my own ( https://github.com/alefore/edge ) as a side project and using it exclusively for about six years. I don't expect it to be very usable by other…
comment by afc · 2020-05-09 · in Ask HN: What are your favorite developer-efficiency tips? -
…here (which I use, among other things, to hold all lines in a file, in my text editor): https://github.com/alefore/edge/blob/master/src/const_tree.h
comment by afc · 2020-04-28 · in Let’s Invent B(+)-Trees -
…type, rather than optional<T>, to be able to communicate information about the error, though: https://github.com/alefore/edge/blob/876c4328610262b11fda553... ). Cheers!
comment by afc · 2020-04-21 · in Why should I have written ZeroMQ in C, not C++ (2012) -
I was curious about how my text editor ( http://github.com/alefore/edge ) would fare here. I decided to try it with a file with 400k lines, each with ~5 or so words. It worked reasonably well: https://asciinema.org/a/cTMmQMhqLcIQrDbkqx3JFpF…
comment by afc · 2020-03-30 · in Show HN: Write.md – a shareable distraction-free Markdown editor -
Thanks for sharing! This resonates strongly with me. One thing I did (and fairly recently too: https://github.com/alefore/edge/commit/6e93c2bb327f57d13d067... says just 10 days ago) is adjust my text editor ( http://github.com/alefore/edge…
comment by afc · 2020-03-24 · in The Human Log