Live data from Hacker News

Fine, I'll build my own text editor

dbushell.com

161–170 of 264 posts

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

#162
How is it possible that Notepad++ still has no Markdown support? Only a few imperfect plugins exist for it and those of us without admin rights on a corporate computer can't install those. Even though Markdown has become an extremely dominant filetype due to AI.

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

#163
post #4

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.

The implementation is usually pretty ugly, actually

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

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

#164
post #103
post #31

Sometime around 1980-81 I had a part time job while an undergraduate in college doing system programming/admin for the Caltech High Energy Physics department. Rob Pike was the system programmer/admin before me when he was a grad student in high energy physics, but he left to go work at Bell Labs. One day another student, Karl Heuer, and I both were engaging in the common programmer pastime of complaining about the sc…

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

I kinda think this is the story of "Oh someone wrote a screen editor -- that's the 10th time I heard from other people".

Like, if you write a text editor nowadays, my thoughts would probably NOT be too different, except that 1) I wouldn't speak out, and 2) I'd congratulate you, for real, because this world doesn't give ordinary people good time.

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

#165

Earlier quoted context omitted.

The implementation is usually pretty ugly, actually

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

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

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

#166
post #43

Earlier quoted context omitted.

That's because they are whining about worthless internet points.

They'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.

Yes thank you! Wouldn't you be confused to see someone getting offended or angry that you have said text editors are beautiful things?

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

#167
post #7

Earlier quoted context omitted.

Literally 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!

On 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=446332…

Very good life lesson. I'm forever thankful.

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

#168
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

He created Go because he believed that the average Google programmer is too stupid to program in C++, and he didn't like Java, the other language created to address this problem.

> He created Go because he believed that the average Google programmer is too stupid to program in C++, and he didn't like Java, the other language created to address this problem.

It is more nuanced than that. Created Go because:

a) C++ deemed excessively and unnecessarily complex, overloaded with features, increasingly difficult to manage

b) Very slow compilation times

c) Wanted a language with built-in concurrency (neither C++ nor Java qualified)

d) Enable fresh-out-of-university team mates to be effective

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

#169

Earlier quoted context omitted.

He created Go because he believed that the average Google programmer is too stupid to program in C++, and he didn't like Java, the other language created to address this problem.

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 was barely used at Google when I was there)

I don't even know what actual production systems Pike ever worked on, before being given carte blanche to go off and make a new programming language to supposedly fit that niche?

In any case, Go is an insulting language to work in, which is not surprising since its origin story seems to involve insults.

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

#170
post #29
post #7

Earlier quoted context omitted.

Literally 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!

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-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.
Post reply on HN