6 ms·
Text editors are like mechanical watches or fountain pens. There is just so much beauty in the machinery that makes them. For me, there are hardly any other mod
by pmkary 17d ago
Text editors are like mechanical watches or fountain pens. There is just so much beauty in the machinery that makes them. For me, there are hardly any other modules that are this satisfying to watch being made. Each time I find a new one (a good one like this), with everything on ropes and rendering and I-beam placement computations and ... it feels like a Christmas gift.
- pmkary 17d ago[flagged]
- pmkary 17d agoLiterally I only praised and wrote how much I love something and how beautiful text editors are. And there are people who cannot stand this :))) oh wow!
- qsera 17d agoSeriously. What is so beautiful about text editors? (I am not the downvoter btw).
- pmkary 16d agoThere is just an insane amount of engineering and work you have to do. Measuring text and shaping fonts is a nightmare, computing chart atlases, having infinite scroll with virtual lines coming to and out of the screen, all the strange data structures to preserve optimized decoration rendering, ropes and ropes (hard data structures), navigating with the keyboard, computing which character interaction is closer to the I-beam when jumping up and down, also caching your previous movements to go back where you actually were. CRDT and atomic editing strategies... There are hundreds and thousands of articles and papers and stuff covering these things. It’s just something we take for granted with so much beauty in the background.
- qsera 16d agoI think you are over estimating it. Sure unicode support is a hell hole. But if you stick to ascii, it is not very hard, that is including syntax highlighting. virtual lines ....I don't know about CRDT or atomic editing though...
- pmkary 13d agoYeah maybe, but I still think even a little terminal editor is very beautiful. On CRDT, or Atomic Editing, If you're interesting reading the blogs of Zed, VS Code, and the archives of Atom are very interesting.
- DonHopkins 17d agoOn text editor related topics, you should have thrown down the gauntlet and been explicitly clear that emacs rules, vi sucks, spaces are supreme, tabs are terrible, and mixing them is miscegenation. That way you only offend evil people, so their downvotes are delightful. Revel in them instead of whining! Since you enjoy beautiful machinery, here are some classic clockworks: https://news.ycombinator.com/item?id=44633225 https://news.ycombinator.com/item?id=44633225 https://donhopkins.com/home/documents/EmacsRedisplayAlgorithm.pdf https://donhopkins.com/home/documents/EmacsRedisplayAlgorith... https://donhopkins.com/home/archive/emacs/skull-and-crossbones.txt https://donhopkins.com/home/archive/emacs/skull-and-crossbon... https://donhopkins.com/home/archive/emacs/mw/display.c https://donhopkins.com/home/archive/emacs/mw/display.c https://donhopkins.com/home/code/emacs.ps.txt https://donhopkins.com/home/code/emacs.ps.txt https://donhopkins.com/home/archive/NeWS/news-tape/utilities/term/term.ps https://donhopkins.com/home/archive/NeWS/news-tape/utilities...
- pmkary 16d agoVery good life lesson. I'm forever thankful.
- roarcher 17d agoA word of unsolicited advice: HNers are a prickly lot and will downvote without explanation because you stepped on some unknowable pet peeve of theirs that probably nobody else in the world shares. This happens all the time but you likely only notice when you happen to get downvoted before any upvotes and end up at 0 or -1. If your comment is reasonable, it will usually come back up. But complaining about downvotes will certainly earn more of them.
- jasonkester 17d agoDon’t forget the old “downvote the other comments so mine goes to the top “ trick. All your best stuff will get downvoted by at least somebody eventually. For some reason, that somebody always gets in early enough that you notice.
- card_zero 17d agoI don't think that's certain at all. What affects votes is: 1. Being near the top of the page 2. Having a downvote already You can curtail the bandwagon effect by complaining.
- roarcher 17d ago> You can curtail the bandwagon effect by complaining. I've observed the opposite--complaints are often more heavily downvoted than the original downvoted comment. The one I originally replied to is an example, at least at the moment.
- graemep 17d agoI quite often upvote comments I disagree with that have been downvoted for no apparent reason. Sometimes I vouch for flagged comments for the same reason too. That said, the last one I vouched for was flagged again and so were all the commentor's other comments.
- rezonant 16d agoDon't forget the post score is a balance of up votes and down votes. This mean 2 down votes and 0 up votes registers the same (-1) as 10 down votes and 8 up votes (-1). So there's no sense treating it like the community has forsaken you.
- ameminator 17d agoSometimes people down vote for no reason. Unfortunately, when one complains about it, they look like a whiner.
- wolletd 17d agoThat's because they are whining about worthless internet points.
- rootlocus 17d agoThey're asking about a reaction. "What did I say wrong?" is a valid question IMO, even if wrong is subjective, it's part of the question.
- pmkary 16d agoYes thank you! Wouldn't you be confused to see someone getting offended or angry that you have said text editors are beautiful things?
- andsoitis 16d ago> Wouldn't you be confused to see someone getting offended or angry that you have said text editors are beautiful things? Yes perhaps, but that doesn't mean I need to care why or that I can demand someone explain themselves. Let it go and you'll feel better!
- ycislost 16d agoDownvotes and flags are used for narrative control
- fsckboy 17d agoi didn't downvote it but I thought it was pretty empty. "how do i love thee, let me count the ways" has been done before, and his love was more interesting than that you like text editors generically, and you don't mention anything you like. I'm not in favor of more poesy in tech circles. i like text editors but I feel they contain "everything but the kitchen sink" (if you know you know) and that makes them somewhat impenetrable and difficult to modify and bend to new purposes even though they contain so much capability and potential, and the people who do understand them think it's a good idea to drag and drop an URL and have that do a web transaction and download a buttload of text, when what I wanted was just the text... of the url. I'm sure there's some way to turn it off, but instead there should be some way to turn it on. Oh yeah, worse when it's a jpg url, guess what they do with that. in another direction, the point of markdown was to be editable and readable in source form, not to be a replacement for rendered HTML, but the same people who ruined HTML by overloading it are now fully engaged in ruining markdown by overloading it and making it unreadable in source form.
- CamperBob2 17d agoIt's unfortunately all too easy to hit the downvote arrow when you're aiming for the other one, especially for people using touchscreens. I don't know who thought it was a good idea to put those character-size icons on adjacent lines, or who thinks it's a good idea to leave them there, but... this is one of those cases where it's better to assume it's an accident rather than an attack. It's also true that there are a lot of asshats^H^H^H^H^H^H^H empty boats around here, but the above advice still applies, I think.
- dspillett 16d agoI just assume that downvotes without explanation just mean that I am right and that has somehow made someone unhappy. Unless I've been deliberately bait-y, which does sometimes happen, of course. Sometimes I reread later I realise that I've come across in an unpleasant manner that I did not intend, or I misunderstood and my comment is irrelevant, necessary, or occasionally just plain wrong. The real fun comes when you divide the audience: a few of my fairly negative comments around AI have bounced between -1 and 1-or-2 for days after posting, as some hate it and down vote then others see that as unfair and upvote, almost all without leaving any comment about why they agree or disagree (with either the content or my style).
- noduerme 16d agoHah. Yes. The one-dimensional up/down mechanism leaves a lot to be desired. Your response could be so wildly engaging that literally everyone on HN has voted on it; so controversial that the masses and the bots are evenly split between loving and hating it; and so immaculately well-written that no one can think of anything to add or to counter it with which wouldn't embarrass themselves. That's usually what I tell myself after I get a single downvote and no reply ;)
- bluGill 16d agoI think eventually HN should see something getting a lot of votes and count everything as an upvote. (presumably if it is bad long before then a mod should have noted and removed the bad post)
- xyzelement 16d agoDon't stress about it. The other day there was a thread about public bathroom descriptions and someone said "wow this has a countdown timer before the doors automatically open, how stress inducing" and I wrote "shit or get off the pot". Now overall it's a well up voted comment but occasionally can see someone taking it down a point. What a psychological mystery. A normal person sees a humorous quip and either chuckles or ignores. So a down vote is what.. someone offended by mild profanity? Someone who perceives me (correctly I guess) as not being empathetic to bathroom anxiety. Point being - who cares. Make a post you think would be valuable for some reason (funny, informative) and move on. Someone is going to take issue with everything and that's just the beauty of the diversity of life.
- deleted 16d ago[deleted]
- alansaber 17d agoThe implementation is usually pretty ugly, actually
- bensyverson 16d agoI implemented a pretty simple iOS/macOS text editor using TextKit 2, and it was astonishing how many hacks, workarounds and manual implementations were needed to support even the most basic features. That codebase is the polar opposite of a finely crafted pen, and the ugliness all comes from the API.
- pmkary 16d agoThat is exactly it. You know what an engineer you are making a system as complex as that? I don't know your codebase but I'm quite aware of TextKit and I can see what a hard and consuming job you must have done. I wish I could see your editor too.
- bensyverson 16d agoThanks—I might return to it and open source it soon… It was a pre-Claude Code project, and it was hard to feel any momentum. It's basically a note-taking tool for capturing quick one-off notes in Markdown, but it stores a lot of surrounding metadata (location, any current calendar events, device type, etc) in the YAML front matter. It feels like it would be even more relevant in this era, but there's a lot of work to do on the UI.
- pmkary 16d agoI actually built a fully featured text editor with Codex last month for a GUI toolkit I was building from the scratch. It worked quite well. You should give it a try. Perhaps you can offload much of the refinements to the llms now
- NetMageSCW 16d agoI am surprised- I reimplemented Notepad for Windows CE and it was pretty much a wrapper around a standard Windows control. It was just a couple of pages of MFC code I believe.
- bitwize 17d agoYes, but... On one otherwise tranquil morning Master Foo's meditations were disturbed by cries of distress. Finding that they came from one of the novices, he inquired "What is the difficulty here?" The novice replied, "I am frustrated by my tools. Every day I must use many different editors because neither Emacs nor vi nor any of these other random editors has all the features I require." Master Foo nodded. "How," he asked, "would a master of the Great Way resolve this difficulty?" The student thought for a few moments, then replied. "Well, it's obvious. I will write the best editor ever. It will do everything I need. It will do everything everyone needs. And the world will be a better place because..." The novice's speech halted as Master Foo rapped him sharply across the back of the head with his staff. "Um. Master?" the student asked, rubbing the back of his head gingerly. "In what way have I erred?" "Fool!" said Master Foo. "Do you think I want to learn yet another editor?" Upon hearing this, the novice attained enlightenment. —from The Rootless Root (https://www.catb.org/~esr/writings/unix-koans/index.html https://www.catb.org/~esr/writings/unix-koans/index.html)
- willtemperley 17d agoYes, but ... Sometimes there are genuine reasons to build a text editor. It's really hard to build a full WYSIWYG graphics editor without modelling text layout yourself, especially for more advanced work like properly curving the text.
- hippietrail 15d agoEvery coder/developer/programmer/software engineer should write a text editor at least once.
- sph 16d agoThere are two possibly conflicting lessons from this koan: a) the world doesn’t need another editor b) if you build an editor, it should have an intended audience of one: yourself.