Live data from Hacker News

Fine, I'll build my own text editor

dbushell.com

181–190 of 263 posts

Re: Fine, I'll build my own text editor

#181
post #97
post #16

Earlier quoted context omitted.

I’m trying to phrase this to not be “that guy” but have you used Code on large code bases? Vscode on my m2 Mac routinely crashed when doing file search. That is why I switched to zed. I do miss the configurablity though

What counts as large? There can be some perf issues if you don’t exclude node_modules and build outputs from search, but I’ve never seen it crash.

It was a mono repo with 30+ projects Most were react apps. I’m going to guess at least 5000 files in the repo.

And yes, node_modules was excluded.

Re: Fine, I'll build my own text editor

#182
post #8

Earlier quoted context omitted.

A 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 w…

I always blame it on the HN UI, especially on a touch device. The up/down vote arrow is a pretty small target and once you hit it, the arrows go away with no visual indication of which way you voted.

If you look close there is either a unvote or undown added to the line. However that is easy to miss. I've learned to always check that line on a touch device because there is no way to consistently hit the tiny arrow correctly (at least not for my body)

Re: Fine, I'll build my own text editor

#183
post #170
post #29

Earlier quoted context omitted.

Seriously. What is so beautiful about text editors? (I am not the downvoter btw).

There 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 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...

Re: Fine, I'll build my own text editor

#185

I literally just got Fable to write me a text editor. Well, I'll be honest, I got it to wrap the KDE KTextEditor library which is like 90% of a text editor. I had been using Kate which was what an LLM suggested was the closest to something like Sublime Text on Fedora. But even Kate, which was great, had too much going on. So I asked Fable to take the text editor part (KTextEditor) and wrap it using Rust with an LSP s…

Why you burned all the tokens and energy for something that is out there like 1000 times? I don't think this is the future, would be a stupid future.

Re: Fine, I'll build my own text editor

#186

Earlier quoted context omitted.

Bullshit. He describes the actual reasons here: https://go.dev/talks/2012/splash.article#TOC_4 . And anyway, since when is not liking something a bad reason to try your hand at creating a better thing?

They are probably referring to what Rob said in a presentation. "The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be e…

Ah, well, I take it back then. Sorry dist-epoch!

Re: Fine, I'll build my own text editor

#187
Seems to me that in the short term everybody screams “DO NOT OPTIMIZE THAT CODE”, in the medium term everybody shrugs “buy a new computer”, and in the long term everybody gradually migrates to the solutions that optimized that code.

I think the mainstream narrative around performance optimization is simply wrong. Inefficiency isn’t a constant, it’s a percentage. You look at software that’s 10x as fast and say yours will run that well in 20 years, and it does, but by then the other guy is 100x as fast, the gap is actually wider, everybody’s doing things that take advantage of all that speed, and you’re either 20 years in the past, still dog slow, balancing the two, or given up. Your software stays bad, and it happens again if you wait again, forever.

The idea that optimization matters less over time is short-term thinking.

It’s not the end-all, of course. Other things matter, context matters, it’s possible to over-invest, it doesn’t matter if your execs can just force people to use it, many of us are genuinely only planning two years out, etc.

Re: Fine, I'll build my own text editor

#188

Earlier quoted context omitted.

If average Google programmers are too stupid to program in C++, what kind of qualities are needed to get good at programming in C++? Like 140+ IQ? Or one needs to really sit down, think through, slow down, which is against the "velocity"?

He's also wrong; the average Google programmer was more than capable of producing good C++ and Google's C++ tooling and standardization was excellent. Source: worked there. That's not to say that C++ is a good or appropriate language or that the codebase wouldn't have been better served by another language. But "stupidity" was never the problem. And Go is not the "another language" I think fits the bill (and in fact…

Thanks for sharing. Do you mind to share a bit more about your observation and experience with C++ in Google? I'm just curious what kind of guidelines and practices produce better C++ code, because I have used C++ in my side projects, but I found it difficult to command -- it was always like handling a lot of dishes without breaking any -- that's why I talked about IQ.

And when you said "before being given carte blanche to go off and make a new programming language to supposedly fit that niche?", did you mean that (https://go.dev/talks/2012/splash.article#TOC_4) is not justified? I'm just curious.

Re: Fine, I'll build my own text editor

#189
post #103

Earlier quoted context omitted.

It's amazing just how many stories of Rob Pike seem to show him being both a dick and wrong

There is a correlation between having strong opinions and sounding like a dick. But also between having strong opinions and having impact. Luckily there are also people who manage to have impact while giving out a different vibe

There is also a correlation between having strong opinions and just being a dick.

Imagining yourself the next Richard Dawkins is a fulltime occupation for a lot of smart kids.

Re: Fine, I'll build my own text editor

#190

Fine, I do this since several decades. I use an editor-construction kit named "Emacs" to build my own Editor, and IDE, and git porcelain, and organizer, and wiki. And many things more. IDE with e.g. LSP integration, rustix and many other programmer-related modes and enhancements like tree-sitter. Git porcelain with magit. Organizer with Org-Mode. Wiki with denote.

The only thing I miss in emacs is concurrency/multi-threading. Apart from that, it's a complete software for me. Anyone can build it to anyone's liking.
Post reply on HN