Refterm v2 - Resource usage, binary splat, glyph sizing, and more

[deleted] · 763 points · Posted at 10:27:36 on July 12, 2021 · (Permalink)


Refterm v2 - Resource usage, binary splat, glyph sizing, and more

Addressing the floats in the excuse parade.

Saved comment

sievebrain · 202 points · Posted at 11:19:30 on July 12, 2021 · (Permalink)

Man, this guy is on a mission.

Holmqvist · 111 points · Posted at 11:23:44 on July 12, 2021 · (Permalink)

Sincerely hopes that he keeps at it, I'm finding it (and the following discussions) very entertaining and informative.

BigHandLittleSlap · 198 points · Posted at 11:53:41 on July 12, 2021 · (Permalink)*

I feel like he's just... brutalising the Windows Terminal team.

It's like watching one of those boxing matches where the crowd just keeps wincing, and starts to feel sorry for the featherweight getting pummelled into ground by Mike Tyson's bigger, meaner brother that was banned from the sport for ethics violations.

Except that it's actually the little guy up against an entire team that tried to belittle him.

It's a David versus Goliath story where David doesn't faff about with slings. He's got a fucking naval cannon, and is happy to pull the trigger repeatedly. Just to make sure...

"Pikachu used optimisation. It was effective."

-Androth- · 25 points · Posted at 20:02:10 on July 12, 2021 · (Permalink)

programming technology made it possible for hundreds of thousands of incompetent programmers to output torrential amounts of poor quality code.

tso · 1 points · Posted at 10:52:53 on July 13, 2021 · (Permalink)

ecosystem control via code churn?

donotma · 96 points · Posted at 15:20:05 on July 12, 2021 · (Permalink)

V2 was a refutation of the people claiming that there secretly was a good technical reason for the slowdown, the "excuse parade". And I say good. The things I saw people saying in response to the original video were insane. If I found out that a significant number of architects approached their field the same way I'd never get in a building higher than two stories again. Unfortunately short of moving deep into the woods and living disconnected to the rest of society all of us are heavily reliant on software.

And the consternation I've seen about how Casey has presented his case looks like a reason to plug their ears so they don't have to deal with the ego blow. "I can't hear this message, the messenger has dirty shoes!". He's been fine, especially compared to the actually hostile and abrasive people you can find in tech. I don't believe any functioning adult can look at this and call him an asshole bully. To the people who do, how do you even manage day-to-day? Handfuls of Xanax? Do you cry when your compiler gives you an error message?

seamsay · 64 points · Posted at 17:39:32 on July 12, 2021 · (Permalink)

V2 was a refutation of the people claiming that there secretly was a good technical reason for the slowdown, the "excuse parade".

Well let's keep on making excuses then, so this guy ends up with a full featured but fast terminal!

crozone · 23 points · Posted at 00:46:04 on July 13, 2021 · (Permalink)

At this rate it'll only take him two more weekends!

[deleted] · 16 points · Posted at 20:55:52 on July 12, 2021 · (Permalink)

I have actually cried at compiler messages sometimes.. at least under very emotionally distressing times. That's still really funny though!

crozone · 13 points · Posted at 00:47:30 on July 13, 2021 · (Permalink)

One time I spent 4 hours debugging a compiler error that turned out to be a VS caching bug, fixed by deleting the obj and bin directories.

I sympathize.

KevDevBot · 4 points · Posted at 11:48:52 on July 13, 2021 · (Permalink)

An entire weekend trying to debug a project. NOTHING worked. NOTHING changed matter.

Forgot to rebuild it. /wrist

r2d2rigo · 28 points · Posted at 12:12:25 on July 12, 2021 · (Permalink)

That's peak Casey Muratori for you.

He's indeed a genius and has a lot of knowledge to share, but he has to be right, and things have to be done his way.

IMHO he's taking his personal crusade a bit too far and only sees things his way - the Windows Terminal team now must reach performance perfection, god forbid they want to ship something that is useful for 99% of their user base.

bik1230 · 204 points · Posted at 12:15:25 on July 12, 2021 · (Permalink)

Except he was totally willing to accept that it simply was not a priority for the Terminal team. He didn't like that, but could understand it. What set him off was one of the devs claiming that it's basically impossible, while Casey was saying that it's relatively simple.

hi_im_new_to_this · 10 points · Posted at 13:01:20 on July 12, 2021 · (Permalink)

So, Casey is clearly correct on the technical merits, and whatever Microsoft dev was speaking there was clearly wrong. It was pretty obvious early on for people trained in the subject (I'm a graphics engineer, and I agreed with Casey on the merits from the start).

But here's the thing: someone being wrong on the internet is annoying, but if pisses you off so much that you go on a months-long crusade to prove them wrong and to humiliate them as much as possible, writing thousands of lines of code and recording multiple YouTube videos... that's a bit strange. And it doesn't necessarily reflect well on you as a person.

If Casey wanted to make a thing that could serve as an alternative to Windows Terminal, that would be wonderful. He's explicitly not doing that: he's doing a project which is not usable as a real terminal, only designed to humiliate the Microsoft devs as much as he can, and deliberately licensing it so they can't use it to improve their product.

Like, fuck off.

czipperz · 119 points · Posted at 14:32:46 on July 12, 2021 · (Permalink)

months-long crucade

The first commit was a month ago.

to humiliate them as much as possible

I think this is completely misreading the situation. He was told it was incredibly difficult to build and so in response he built it in a weekend.

The reason he's irritated by the statement is because he constantly observes the poor performance as he is working on creating his next project.

multiple YouTube videos

He made one video showing off his demo project. Then, a number of people posted on their blogs/Twitter/hn reviewing the terminal.

One critique, from the creator of the Meson build system, was that the memory usage in the task manager was too high, gpu usage was too high, and that it crashed on handling binary output. He said for these reasons this demo didn't hold up.

In this video, Casey specifically addresses those three points by fixing the relevant problems.

deliberately licensing it so they can't use it to improve their product.

You know that you can purchase a license right? You shouldn't admonish him for not literally donating his labor to a billion dollar corporation. Look up the licensing scheme of QT.

PepegaQuen · 29 points · Posted at 00:28:23 on July 13, 2021 · (Permalink)

Trillion dollar corporation.

Crysist · 125 points · Posted at 14:26:32 on July 12, 2021 · (Permalink)

I mean, that's hyperbole where it makes a huge difference.

It wasn't "someone" -- it was multiple people both working at and contributing to Microsoft's new Terminal for which part of the codebase affects the the VT layer in conhost.

It was the fact that multiple people who should be knowledgeable about it said the performance issue lied elsewhere or couldn't be resolved the way he said it could because "text is hard". Then, only a couple days after closing the issue due to him getting frustrated that his suggestion was referred to as a "doctoral research project", one of the engineers who told him it wouldn't work made an issue using that exact suggestion.

Also, I think describing him as going on a "months-long crusade" involving writing "thousands of lines of code" is trying too hard to lean on obsessiveness when there were 2 others who had contributed to it (the Direct code from Martins, for example) and the actual code took him a couple weekends, with the main demo that showed off the speed improvement done in the first weekend.

I think the strangest thing that's come of this is the amount of people who would ignore the way he was condescended to by the other devs, then criticize him when he finally stopped being polite after being given so many excuses.

I just don't see it that way. Especially from people who should have known better.

hi_im_new_to_this · -32 points · Posted at 14:36:51 on July 12, 2021 · (Permalink)

I certainly agree that the Microsoft devs should've known better, and I certainly agree that they should have handled the issue better. My criticism of Casey shouldn't be read as a defense of the development team.

I just keep asking myself this question: given his behavior during this whole kerfuffle, would Casey Muratori be someone I would like to work with on a project? As a colleague? The fact is, I have worked with people like this: incredible programmers who always knows the best way to do everything (which they frequently do), and that always has prove that they are right about everything (and they frequently are), and let me tell you: I never want to work with those kinds of people again. I'd rather go dig ditches for a living.

cahphoenix · 14 points · Posted at 22:20:11 on July 12, 2021 · (Permalink)

I love those. When you disagree you can't just bring bullshit to the table.

Just say you understand their point of view and move on with your way. Don't come up with cray excuses.

Simple. I would love to work with this guy.

emax-gomax · 47 points · Posted at 14:49:22 on July 12, 2021 · (Permalink)

I feel like you're blowing this whole thing out of proportion. The only reason Casey is doing all this is to prove a point. And he's pretty much done that. He hasn't insulted or demeaned the Microsoft team beyond simply stating and then showing they're wrong. As for working with him on team projects, he's worked on several big video games with multiple teams (including the witness I believe) and I have yet to hear of any complaints. Hell he and Jonathan Blow seem to be real chummy and great friends. If you're taking his passion for efficient software as some justification for how he's an awful person to work with then I believe you're greatly oversimplifying the situation.

9gPgEpW82IUTRbCzC5qr · 15 points · Posted at 18:56:04 on July 12, 2021 · (Permalink)

What is wrong with his behavior? The devs said it would take months to do and he did it in a weekend.

It's not like he is insulting or flaming them, he just falsified their claims.

If that burns professional bridges for you, maybe you should examine the quality of what you are producing professionally.

_tskj_ · 25 points · Posted at 15:12:51 on July 12, 2021 · (Permalink)

Why is it relevant whether you would want to work with Casey? You're never going to work with him and neither am I. I mean what are the chances? I don't see how that's relevant at all.

Olreich · 13 points · Posted at 15:38:08 on July 12, 2021 · (Permalink)

Idk, being the dumbest person in the room is always my favorite place to be in a job. It means that 1) someone else is around that can help me learn and fix things, and 2) I'm not expected to know the answer to everything. The only time I have a problem with someone needing to be always right, is when they are wrong. And so far, I'd vote there's no evidence of him being wrong on this one. The issue with "always right" personalities is when they are actually wrong and refuse to consider the counterpoints.

_tskj_ · 86 points · Posted at 13:44:43 on July 12, 2021 · (Permalink)

I can agree with your points about Casey's personal character perhaps, but the Terminal team consists of grown adults who are paid professionals (and paid very well at that) to do this exact job. You don't have to feel sorry for them.

[deleted] · 116 points · Posted at 14:02:46 on July 12, 2021 · (Permalink)

The common theme of “excuse parades” is that when they run out of excuses, it always just becomes “okay fine, but you’re an asshole”.

I don’t see any place Casey was being an asshole. Casey claimed that the terminal should be faster. Microsoft were assholes and said it would take a PhD to do it. Casey proved them wrong. The excuse parade went on. Casey responded.

Projection is a hell of a drug. Microsoft and the excuse parade are the ones being the assholes here.

[deleted] · 8 points · Posted at 04:59:30 on July 13, 2021 · (Permalink)

The common theme of “excuse parades” is that when they run out of excuses, it always just becomes “okay fine, but you’re an asshole”.

Yep. I was once told I was an asshole for quoting something a person said back back to them. The person basically said they were done but ended up not liking the idea and didn't want to bother. So after I did stuff to help them out (45min of work not a big deal) they ended up not starting and changed their mind on doing that thing for work. I wanted to clarify what was said so I don't misunderstand the person the next time. Apparently I'm an asshole because I knew they didn't do anything and by not pretending it never happened/comforting them I was guilt tripping them for doing no work. Well it's not my fault you feel guilty for asking me for help

People really need to stop making a big deal of minor things. I didn't really care. I wasn't busy that day. A simple I'm sorry or even "my mistake" would have been 100% fine

spakecdk · -26 points · Posted at 14:38:34 on July 12, 2021 · (Permalink)

Microsoft were assholes and said it would take a PhD to do it.

Why is reading comprehension so bad, i keep seeing this. They said that it would take a PhD project worth of research to do this, not what is being repeated. Still wrong, but differently.

_tskj_ · 28 points · Posted at 15:08:44 on July 12, 2021 · (Permalink)

I think we all understand what they meant, and that is even worse, as demonstrated by Casey's weekend worth of effort.

spakecdk · -10 points · Posted at 20:25:57 on July 12, 2021 · (Permalink)

I never claimed otherwise (again, reading comprrhension...) and am completely in agreement with him, but touting lies sours even a victory

Janitor_Snuggle · -1 points · Posted at 04:51:43 on July 13, 2021 · (Permalink)

There's a wonderful irony in you misspelling comprehension when using it as an insult.

spakecdk · -1 points · Posted at 14:28:47 on July 13, 2021 · (Permalink)

If you know the meaning of the word, you wouldn't say this is ironic. But of course a typo means misspelling now.

Hawaiian_Keys · 4 points · Posted at 01:25:27 on July 13, 2021 · (Permalink)

You're a pedantic asshole.

spakecdk · -1 points · Posted at 14:32:59 on July 13, 2021 · (Permalink)

Pedantic would be the guy pointing out a typo. Pointing out false quotations that completely change the meaning which makes people look worse is not pedantic. But in this whole comment section it is obvious that it doesn't matter when so many programmers are acting like children.

Semantic-Salt · 1 points · Posted at 09:48:26 on October 27, 2021 · (Permalink)

Its also pedantic when you point out a difference that doesnt change the underlying point. Wether they said its a 4 year PhD project, or that it requires someone with a PhD, the effect is pretty much the same.

spakecdk · 1 points · Posted at 09:51:26 on October 27, 2021 · (Permalink)

The difference is huge. One is amount of time, other is qualification. You can't make this shit up lmao.

Semantic-Salt · 1 points · Posted at 10:07:10 on October 27, 2021 · (Permalink)

You cant be this stupid lol. The underlying message of the guy stays the same. That message being that decent performance is something that apparently requires lots of time and high expertise.

spakecdk · 1 points · Posted at 10:40:34 on October 27, 2021 · (Permalink)

...but it does. Casey spent lots of time honing his skills, and he is an expert. But that's not the point. The underlying message is very different.

[deleted] · 2 points · Posted at 04:40:54 on July 13, 2021 · (Permalink)

How does the exact words of what they said change anything at all?

Theon · 71 points · Posted at 14:11:52 on July 12, 2021 · (Permalink)

he's doing a project which is not usable as a real terminal

But convincingly proves that the performance gains are achievable and not a phd-level undertaking.

I personally didn't know that, I saw the thread earlier, but I have no experience with graphics programming, maybe he's yet another angry dev talking out of his ass? Guess not!

only designed to humiliate the Microsoft devs as much as he can,

If they're humiliated by superior technical decisions, I don't think that's on him.

and deliberately licensing it so they can't use it to improve their product.

For free, that is.

Sure, given the spirit of FLOSS, it would be all pretty and fluffy if the repo was compatible, everyone benefited and so on, but come on, Microsoft is literally a top 5 company in the world, surely they can reimburse Casey if they truly want to improve their product? But do they?

50653 · 66 points · Posted at 13:47:01 on July 12, 2021 · (Permalink)

It’s not totally a grudge thing. His product is his Youtube channel. He makes educational programming content. It’s similar to his main gig Handmade Hero, which is a game that only exists so that he can make educational videos in the process. I’m enjoying the Refterm content and I think a lot of others are too.

Botondar · 12 points · Posted at 16:28:01 on July 12, 2021 · (Permalink)

Handmade Hero is not his main gig though.

MDTKBS · 49 points · Posted at 14:42:21 on July 12, 2021 · (Permalink)

I gotta push back on the last statement. You expect him to be belittled by a team and then give them his work for free? Not gonna happen. Pay the man if that quality of life improvement isn't a priority for the Windows Terminal team. He clearly has the aptitude and motivation to do it.

KevDevBot · 8 points · Posted at 12:06:28 on July 13, 2021 · (Permalink)

It's not even something worth paying for. It's a cache. It's not some abstract foreign concept. Creating a texture atlas is literally one of the first things you learn to do in graphics programming. This is beginners level stuff. That they're suggesting this is PhD level is especially egregious, and is telling of either their inexperience or immaturity.

An adult needs to be put in charge of that team.

MDTKBS · 3 points · Posted at 13:41:04 on July 13, 2021 · (Permalink)

I think that adult should be Casey for entertainment value. Honestly though, you're correct. The Microsoft team messed up here and they need to fix it.

TheTomato2 · 33 points · Posted at 18:25:40 on July 12, 2021 · (Permalink)*

but if pisses you off so much that you go on a months-long crusade to prove them wrong and to humiliate them as much as possible, writing thousands of lines of code and recording multiple YouTube videos..

But that isn't what happened...

only designed to humiliate the Microsoft devs as much as he can

all he did was make a better version after being told it was impossible. If they are embarrassed its on them.

deliberately licensing it so they can't use it to improve their product.

Think about your backward-ass stupid-ass logic there. Casey is an asshole because he won't write free software for a trillion-dollar company after those people told him to fuck off and he's an idiot and wrong?

Like, fuck off.

No you can fuck off. I would rather have more Casey Muratori's in the world then people like you. People like you are why we can't have nice things.

Janitor_Snuggle · 43 points · Posted at 15:40:42 on July 12, 2021 · (Permalink)*

Months long crusade

It's been like 2 weeks dude. Your over the top hyperbole ruins any points you were making.

cahphoenix · 21 points · Posted at 16:41:42 on July 12, 2021 · (Permalink)

I love it. Fuck them for giving bullshit answers that are so easily disprovable it took a single dev two weekends to two weeks to demo stuff that the MS team said would be a friggin PHD research project.

That would piss me off just as much.

This isn't his way, it's a much much better way. Easily done.

Same shit happened with MS and Azure. My company was trying to use Kubernetes and their service was dog slow. AWS was not slow. We complained that they were slow and put in tickets. They said they were working on improvements, but it took 2 years for it to finally match AWS. So much handholding from us in giving them logs and other data that they should have been able to generate and just did not and they kept arguing it wasn't their fault.

We are not using Azure due to this, and there are so many parallels.

PL_Design · 4 points · Posted at 13:48:12 on July 13, 2021 · (Permalink)

At some point people need to stick to their guns and call out shit when they see it, or things won't ever get better. This isn't a one-off situation where one dude decides to go on a personal crusade for dubious reasons. This is a man who's had to deal with horse shit like this for decades, and is so tired of putting up with it that his only choice left is to go on a crusade.

[deleted] · 15 points · Posted at 22:03:41 on July 12, 2021 · (Permalink)

1) You know microsoft isn't a person? and he didn't shit on a person?

2) Do you have any idea how much shit people said about him here after the first video, or how much shit he was @ messaged on twitter? People kept accusing him of cheating. A guy wrote a blog post just to point out refterm didn't handle binary files and that casey was silly not to use clib memcpy because he isn't using SIMD optimizations when he doesn't. Not realizing if he took 10seconds to use godbolt he would have seen clang done it

3) Also you sound very judgemental

Anyway second video was not for MS

graepphone · 8 points · Posted at 13:13:04 on July 12, 2021 · (Permalink)

They could use it if they actually really wanted to.

r2d2rigo · 7 points · Posted at 13:17:49 on July 12, 2021 · (Permalink)

No, the GPLv2 license of Casey's repo clashes with MS choice of MIT.

He's done it deliberately.

Liorithiel · 28 points · Posted at 16:53:12 on July 12, 2021 · (Permalink)

All it takes is launch Copilot.

graepphone · 56 points · Posted at 13:20:27 on July 12, 2021 · (Permalink)

They just have to pay for it.

Accomplished_Hat_576 · 47 points · Posted at 13:42:21 on July 12, 2021 · (Permalink)

Why is this downvoted? If a open source project has a single author they can literally do whatever the fuck they want in terms of licensing.

He could change the license every single day if he wanted.

Of course he could sell a commercial license to Microsoft.

hi_im_new_to_this · -25 points · Posted at 13:25:12 on July 12, 2021 · (Permalink)*

They can't, as Casey is very well aware. There is no scenario where Microsoft is going to negotiate and purchase a license from him. First off all, I guarantee that the Windows Terminal team has neither the authority nor the budget to negotiate something like that, it would have to pass through like 8 layers of managers. And it would be terrible PR for Microsoft, so it's never going to happen on those grounds alone.

More than that, by acting like he has, Casey has shown himself not to be operating in good faith here. The way he's antagonizing not just Microsoft the company but also individual Microsoft developers, means that Microsoft is never going to be able to enter into a good-faith negotiation with him. You can't negotiate with crusaders.

Casey knows all this, he's certainly smart enough. He made this to make a point, and to humiliate people that annoyed him online. Mission accomplished on both counts. Now, can he please fuck off?

Axxhelairon · 13 points · Posted at 19:51:55 on July 12, 2021 · (Permalink)

ugh every single one of your comments is appallingly pathetic apologist bullshit, just please stop trying so hard to defend microsoft for trying to punch down and getting uppercut instead

graepphone · 54 points · Posted at 14:14:40 on July 12, 2021 · (Permalink)

Imagine being accused of acting in bad faith for

  • Raising an issue, creating a benchmarking tool for reproducibility
  • Working with the terminal team to identify performance bottlenecks
  • Pointing out that the suggested solution is not the right path for meaningfully increasing performance
  • Giving a solution to the terminal team that would (and did) speed up rendering by orders of magnitude.

All that to be rewarded by two Microsoft employees thoroughly dismissing everything because they don't want to believe that they could possibly be wrong.

Who exactly is acting in bad faith here?

adjustable_beard · 28 points · Posted at 14:20:05 on July 12, 2021 · (Permalink)

I completely agree. The tone from the MS team was completely dismissive from the start.

It felt like they were saying "your ideas are cute, but we're smarter than you and what you're suggesting would require PhD research."

lookatmetype · 16 points · Posted at 15:25:58 on July 12, 2021 · (Permalink)

Yes, this is the only correct take. They assumed that Casey is some random internet guy who thinks he knows a lot. (You should never assume that about other people until proven otherwise - that's called being gracious). They basically didn't say what they were thinking - which is that people who work on the Terminal full time clearly know more than anyone else out there and anyone else who pretends to know better is clearly a fool. I don't understand how anyone could read that thread and think that Casey is the one being rude.

jokasx · 1 points · Posted at 23:00:35 on July 12, 2021 · (Permalink)

I knew the world was still full of ass kicking people for microsoft, but this thread has opened my eyes that it is still so extreme.

_tskj_ · 15 points · Posted at 13:47:07 on July 12, 2021 · (Permalink)

He can fuck off when they get their act together though. Yes he humiliated them, but people being paid six figures to do their job terribly, impacting thousands of people trying to do their job, certainly deserve to be humiliated.

hi_im_new_to_this · -12 points · Posted at 13:58:33 on July 12, 2021 · (Permalink)*

Dude, the statement that they "deserve to be humiliated" is pretty fucking chilling coming from a mature adult.

MintPaw · 22 points · Posted at 14:26:59 on July 12, 2021 · (Permalink)

What about that statement is "chilling"? Saying a multibillion dollar company should be humiliated because its output is really poor?

It's not like Casey is harassing developers, he opened one Github issue with a problem that effects the class he's teaching. And replied to people giving him excuses.

I find it hard to see this as some kind of appalling inhumane treatment in the way you're describing it.

Janitor_Snuggle · 1 points · Posted at 04:57:07 on July 13, 2021 · (Permalink)

He's just being morally outraged because any technical argument he put forward was thoroughly debunked.

His behaviour here and Microsoft employees behaviour at the center of this follow the same path: bullshit technical excuse parade that are debunked, then pivoting into moral outrage over how the debunker(s) treated them while they were acting like jackasses and arguing in bad faith.

[deleted] · 16 points · Posted at 14:20:30 on July 12, 2021 · (Permalink)

If you don’t want to be humiliated, instead of saying stupid shit like “it’s a phd dissertation” to write not garbage code, be an adult and either accept help or acknowledge an issue and say it’s not a target now.

Instead, Microsoft developers got intentionally antagonistic and as a result, were humiliated as a developer proved their claims.

That you’re seeing Casey as the immature one of the kerfuffle says a lot.

_tskj_ · 4 points · Posted at 14:12:48 on July 12, 2021 · (Permalink)

They do though? If I showed up to work everyday and didn't do my job, maybe I should feel a bit ashamed and maybe be humiliated if I don't change? Thieves should be humiliated.

Not the one downvoting you btw.

chucker23n · 1 points · Posted at 21:54:17 on July 12, 2021 · (Permalink)

They can't, as Casey is very well aware. There is no scenario where Microsoft is going to negotiate and purchase a license from him. First off all, I guarantee that the Windows Terminal team has neither the authority nor the budget to negotiate something like that, it would have to pass through like 8 layers of managers. And it would be terrible PR for Microsoft, so it's never going to happen on those grounds alone.

It would also be a dumb idea from an engineering point of view to buy and attempt to integrate a foreign codebase when you already have a working one.

zcatshit · 3 points · Posted at 00:01:13 on July 13, 2021 · (Permalink)

Have you seen Microsoft's acquihire approach? They've literally bought new companies to acquire products when they already own three competing offerings.

The people who spend the money and the people who do the work often don't talk a lot.

chucker23n · 1 points · Posted at 05:52:01 on July 13, 2021 · (Permalink)

Have you seen Microsoft's acquihire approach? They've literally bought new companies to acquire products when they already own three competing offerings.

Yes, and that’s silly in its own ways, but can you imagine them doing so to improve… text rendering performance in the terminal?

zcatshit · 1 points · Posted at 07:43:57 on July 13, 2021 · (Permalink)

With my budget, no, but if it aligns with their WSL plans, I wouldn't see it as off the table.

chucker23n · 2 points · Posted at 08:00:50 on July 13, 2021 · (Permalink)

Sure, but it's a calculus that probably looks something like:

  1. do we think text rendering is slow in the terminal?
  2. if so, do we think we can't fix that ourselves with a reasonable amount of effort?
  3. if so, do we want to buy this codebase in particular (which will include vetting)

And so far, it seems they kind of bailed out at 1.

gredr · 4 points · Posted at 14:16:15 on July 12, 2021 · (Permalink)

Like the guy who posted the giant pile of messages and commentary about how `git pull` does the wrong thing? Yeah, maybe you're right, but if you're too big of a dick, then nobody's going to listen to you.

emax-gomax · 20 points · Posted at 14:53:57 on July 12, 2021 · (Permalink)

Correction: if the team is too prideful to admit when their wrong and listen to you then no-one will listen to you.

The guy was no angel but he made several valid points and the team seem to have just up and stopped responding to him because they found him annoying.

gredr · -4 points · Posted at 15:23:44 on July 12, 2021 · (Permalink)

See, that's the thing with people. They're people. They react like people do. "Meritocracy" doesn't trump "I don't want to have to deal with assholes".

emax-gomax · 18 points · Posted at 15:28:28 on July 12, 2021 · (Permalink)

When you're the leader of a big project used by hundreds of thousands of people I'd like to think you'd be mature enough to hear out disparaging opinions and deal with somewhat overzealous contributors. In this case I say meritocracy wins. You can hate the guy with a passion, But if his points are valid and his changes fix them then rejecting them because "he's an asshole" is an extremely childish response IMO.

gredr · 4 points · Posted at 16:08:23 on July 12, 2021 · (Permalink)

Clearly meritocracy didn't win here, though. The guy seemed to have good suggestions, but he's being ignored. You could argue that meritocracy should win, but empirical evidence suggests it doesn't.

Because it doesn't win (not always, at least), it's worthwhile to learn some tact and diplomacy. You'll be more successful, people will like you, you might even make some friends.

emax-gomax · 5 points · Posted at 16:13:51 on July 12, 2021 · (Permalink)

I'm not denying any of that... but the reason it didn't win is because it isn't a meritocracy. If it was the guys opinions would've been heard. Regardless I think it's strange to say the submitter needs deplomacy but the devs who outright shunned him don't. This should cut both ways and so far seeing as the maintainers are in a position of power their response feels inadequate to me.

I do want to clarify I haven't seen any of the comments made by the creator of the blog post. I'm not sure where to find them, so perhaps he really was being outrageous and demanding. But from my POV the end product git is still flawed and the only guy willing to fix it is also the only one the maintainers refuse to hear out.

gredr · 1 points · Posted at 16:39:37 on July 12, 2021 · (Permalink)

Exactly, it's not a meritocracy, because they don't exist whenever humans get involved. Humans get frustrated, they get tired of dealing with bullshit, they act in petty ways.

I'm not saying that the maintainers shouldn't also exhibit diplomacy, I'm saying that they're also not perfect, so one shouldn't be surprised when one's lack of diplomacy is met with a lack of diplomacy.

chucker23n · 0 points · Posted at 21:56:28 on July 12, 2021 · (Permalink)

I'd like to think you'd be mature enough to hear out disparaging opinions and deal with somewhat overzealous contributors.

Oh, they are: by showing him the door. Part of being mature is knowing you don’t have to take abuse.

You can hate the guy with a passion, But if his points are valid and his changes fix them then rejecting them because “he’s an asshole” is an extremely childish response IMO.

On the contrary. Nobody wants a diva on a team.

r2d2rigo · -9 points · Posted at 13:19:01 on July 12, 2021 · (Permalink)

That's exactly what I wanted to say in the end - he could still show that they're in the wrong without coming through as the massive douche he's being now.

_tskj_ · 23 points · Posted at 15:16:25 on July 12, 2021 · (Permalink)

He made unsubstantiated claims. He then substantiated his claims when pressed (rather rudely by the people at Microsoft). How could he possibly come through as any less of a douche short of being completely silent? That's not a rhetorical question, I want you to give specific example of what could have been done better.

emax-gomax · 25 points · Posted at 14:55:27 on July 12, 2021 · (Permalink)

How so? They said it was impossible. He showed it wasn't. How else could he have approached this situation? Frankly I don't see Casey as having done anything wrong or being all that douchey for simply backing up his claims.

[deleted] · 10 points · Posted at 15:17:59 on July 12, 2021 · (Permalink)

/r/programming has a major issue with backing up claims. Try calling people out to provide sources for their claims (unless you care about being down voted). It’s worth an easy 30 downvotes, especially if you call out the FP fanboys and their claims. Multiple FP discord’s will descent upon your comment and downvote it to EA “sense of pride” levels.

MdxBhmt · 9 points · Posted at 16:05:04 on July 12, 2021 · (Permalink)

Do you have a source?

[deleted] · 1 points · Posted at 17:14:14 on July 12, 2021 · (Permalink)

Here my most recent fight with /r/programming basing their opinions of feelings instead of facts and downvoting asks for sources while upvoting blatant lies.

https://reddit.com/r/programming/comments/oh52jc/mutability_in_code/

MdxBhmt · 5 points · Posted at 17:18:53 on July 12, 2021 · (Permalink)

That's a topic with 4 upvotes and 67% ratio. That's an awful bad sample for /r/programming as a whole. But that's besides the point: you didn't ask a single question on your post, let alone for a source or evidence. You yourself didn't provide any evidence whatsoever.

You were downvoted for your tone alone. And hey, I just asked for source and evidence and was not downvoted, seems like /r/programming has no problem with that, even ~10 comments deep.

[deleted] · -3 points · Posted at 17:24:59 on July 12, 2021 · (Permalink)*

I asked for sources at least twice.

I was not “down voted for tone” I was down voted for not accepting the cargo cult.

I do not require providing evidence. I am not making any claims. The claimant is responsible for providing evidence for their claims.

Now I did make a claim that “aliasing optimizations are nothing in comparison to needlessly running malloc, copy, free over and over again”. Did you want evidence for that or are we all in agreement that this is simply a fact?

This is just more of the “excuse makers” predictable go to. “You’re down voted for tone” is literally just “I ran out of arguments, therefor you’re an asshole!” I don’t think I had any tone issues in this thread.

MdxBhmt · 6 points · Posted at 17:48:20 on July 12, 2021 · (Permalink)

I asked for sources at least twice.

In other posts, after you set your foot and put out your feelings (and not facts) in writing.

I do not require providing evidence. I am not making any claims.

You do here, yet you have (very) poor evidence.

his is just more of the “excuse makers” predictable go to. “You’re down voted for tone” is literally just “I ran out of arguments, therefor you’re an asshole!” I don’t think I had any tone issues in this thread.

The one making excuses is you, here. A topic with 4 upvotes while you get -22 downvotes is evidence of an FP discord-cargo-cult that is out there to get non-believers? And they are large enough in /r/programming? The math does not pans out your way.

[deleted] · 1 points · Posted at 18:11:31 on July 12, 2021 · (Permalink)

No I absolutely do not require providing evidence against claims just because you don’t like the fact that I dismissed claims out of hand for not providing evidence. That is not how burden of proof works.

that which has been asserted without evidence can be dismissed without it.

You’re free to respond over there to the places you think I require providing evidence.

However, I am certain that you’re not going to argue in any semblance of good faith already, given that you’ve already inferred tone into posts that simply is not there purely because you don’t like what’s being said.

Incidentally, exactly what’s happening here. The people don’t like that their claims are being proven wrong or dismissed and have automatically defaulted to “well his tone isn’t getting anyone anywhere”. There was no tone except “you’re wrong, here’s the proof even though it’s not up to me to provide it”.

[deleted] · 0 points · Posted at 20:34:54 on July 12, 2021 · (Permalink)

You want evidence of /r/programming not liking facts and instead upvoting feelings?

Literally this chain. I am being downvoted for saying that the burden of proof rests with the person making the claim. And you are being upvoted for saying that I have a burden of proof because I am dismissing claims which have no evidence to back them up.

The irony of you questioning whether /r/programming downvotes people asking for evidence while simultaneously downvoting literally how burden of proof works because they dislike burden of proof is palpable.

MdxBhmt · 6 points · Posted at 20:41:56 on July 12, 2021 · (Permalink)

The irony of you questioning whether /r/programming downvotes people asking for evidence while simultaneously downvoting literally how burden of proof works because they dislike burden of proof is palpable.

The irony that I just did that on my first comment and I'm not being downvoted is flying over your head.

[deleted] · 1 points · Posted at 20:53:22 on July 12, 2021 · (Permalink)

What did I not give you evidence of? You asked where Reddit down voted people asking for a source and I gave you the most recent example I had and you proceeded to ignore that because the thread didn’t have enough points (likely because it was written by a toddler, and it STILL managed positive points).

You’re free to friend me and watch as /r/programming downvotes me for asking for evidence. It usually happens once a month or so.

You also indicated somewhere that I had to provide proofs over in the other thread and I stated “go over there and ask for the proofs you want in the relevant place and I’ll give them to you”.

What I will not do is provide counter proofs for other people’s claims. That’s not how it works. They made claims. They need to prove those claims.

MdxBhmt · 5 points · Posted at 21:13:12 on July 12, 2021 · (Permalink)

You asked where Reddit down voted people asking for a source

You made way more claims than that, and the top level comment does not ask for sources. You are moving the goal post because you know you made a ridiculous claim.

You’re free to friend me and watch as /r/programming downvotes me for asking for evidence. It usually happens once a month or so.

And the only common denominator of that is not /r/programming opinion on sources, but on you.

You also indicated somewhere that I had to provide proofs over in the other thread and I stated “go over there and ask for the proofs you want in the relevant place and I’ll give them to you”.

Bad comprehension, I pointed out the irony out of you not backing up your claims, over and over again.

What I will not do is provide counter proofs for other people’s claims. That’s not how it works. They made claims. They need to prove those claims.

And I have no asked you to do so. I asked you to provide good evidence that /r/programming has a source&evidence problem. That there is a FP-discord-cargo-cult-conspiracy. Those are your claims, no one else's.

[deleted] · 0 points · Posted at 21:21:02 on July 12, 2021 · (Permalink)

Whatever dude. I gave you the most recent evidence. This was not a case of me not providing it. This was a case of you not liking the evidence provided. Just cause you don’t like it doesn’t mean it isn’t reality.

I have no idea what other claims you’re talking about, but I’ll gladly back them up if you point it out.

Again. If you want to see this happen over and over and over again, feel free to friend me. It’ll for sure happen inside of the next couple weeks.

emax-gomax · 5 points · Posted at 15:21:07 on July 12, 2021 · (Permalink)

Is this true? I've been on this sub for like a year or two and I haven't noticed this at all. Admittedly this is the first flame war in a while.

Regardless I find it pretty demoralising to ask someone to justify themselves and when they do u label them a douche... like do the people asking just wanna see the guy fail and when he proves his point their too embarrassed to admit how short-sighted they were? God that's depressing.

[deleted] · 3 points · Posted at 16:32:18 on July 12, 2021 · (Permalink)

is this true

absolutely it is

/r/programming regularly upvotes demonstrable lies because “they feel right” and upon being asked for evidence always responds the exact same way:

First, they downvote.

Second, they (sometimes) respond by reiterating the claims as if this makes it more true.

GonziHere · 1 points · Posted at 13:10:06 on November 4, 2021 · (Permalink)

(I know this is old but), I've found out about it just now and I didn't take it as an attack on Microsoft coders as much as the example how the whole industry "doesn't care" so much that he can outperform random app by double digits.

The thing is that when you just say that it is the case, you are being laughed at, so he didn't just say it, he had shown it. If he now says that, say, the web is slow, he cannot be dismissed as easily.

cinyar · -13 points · Posted at 13:40:39 on July 12, 2021 · (Permalink)

to humiliate them as much as possible

which... does he really achieve that? Do the devs really give a fuck? do the rest of us?

And it doesn't necessarily reflect well on you as a person.

Agreed, there are no winners here.

salbris · 2 points · Posted at 16:49:26 on July 12, 2021 · (Permalink)

That's a strawman though I recall the Microsoft dev just saying that text rendering is a complex thing. And that was after Casey said it was "extremely easy".

[deleted] · 40 points · Posted at 17:52:36 on July 12, 2021 · (Permalink)

[deleted]

salbris · 2 points · Posted at 18:18:01 on July 12, 2021 · (Permalink)

He did, but he was specifically referring to the concept of "text rendering" not the specific project they are working on. Just because Casey is aware of that research and it's implications for rendering doesn't make it any less complex. I guarantee you half the people following this story couldn't do what Casey did in a month.

munchbunny · 10 points · Posted at 19:13:08 on July 12, 2021 · (Permalink)

I've worked on text rendering before, including a lot of the Unicode stuff that's being discussed, and I absolutely couldn't do what Casey did in a month.

That said, I do think that specific Microsoft dev was clearly missing the point. Yes, text rendering is complex, but there are obviously some performance gains to be found, so why not just acknowledge that, throw an item on the backlog for optimizing performance, and move on?

salbris · 0 points · Posted at 19:26:31 on July 12, 2021 · (Permalink)

Again he wasn't dismissing the optimizations he was dismissing Casey's argument that its easy. That's all. They have opened up several issues to fix the performance problems.

bik1230 · 17 points · Posted at 01:02:17 on July 13, 2021 · (Permalink)

But it isn't about text renderig at all. Windows terminal works by calling a standard text drawing API on Windows. Casey's terminal works exactly the same. Casey was saying that the terminal has to do is very simple, which is absolutely true.

Janitor_Snuggle · 1 points · Posted at 04:49:40 on July 13, 2021 · (Permalink)

I wouldn't bother arguing with that guy, he's clearly just jumping from excuse to excuse hoping something will stick.

KevDevBot · 1 points · Posted at 12:18:46 on July 13, 2021 · (Permalink)

That people are conflating hard with slow is what bothers me most. Just because it's a complex programming problem, is not an excuse for it being slow. All the edge cases shouldn't have a 100x performance impact on rendering - it's just that simple.

Janitor_Snuggle · 0 points · Posted at 04:48:34 on July 13, 2021 · (Permalink)

Ahh here goes the excuse parade again. This one is fresh.

salbris · 1 points · Posted at 12:50:39 on July 13, 2021 · (Permalink)

For the record I'm not defending the performance of the windows terminal. It's clearly poor.

Godd2 · 1 points · Posted at 13:19:46 on July 13, 2021 · (Permalink)

I guarantee you half the people following this story couldn't do what Casey did in a month.

But the maintainers of WT presumably don't live in that half.

salbris · 1 points · Posted at 13:42:58 on July 13, 2021 · (Permalink)

I honestly have no idea about the maintainers. It's possible that for most of them this is the first time doing text rendering.

Overunderrated · -11 points · Posted at 13:24:08 on July 12, 2021 · (Permalink)

Everything looks simple when you know the answer.

sebamestre · 27 points · Posted at 13:51:11 on July 12, 2021 · (Permalink)*

What is your point?

Is he somehow wrong because he knows more about performance than MS Terminal team?

When someone explains something I don't understand, should I deny it, and call them out for being an ivory tower elitist?

How about instead I investigate whether their claims make sense, or explain that the proposed changes are out of scope for the project, or that they don't align with the skillset or values of my team?

_tskj_ · 36 points · Posted at 13:48:09 on July 12, 2021 · (Permalink)

Professional software engineers paid the highest salary in the software world, working for one of the largest and most successful software companies in the world can't figure out the answer?

dnkndnts · 6 points · Posted at 14:23:57 on July 12, 2021 · (Permalink)

Narrator: nope

lookatmetype · 49 points · Posted at 13:49:04 on July 12, 2021 · (Permalink)

This is the same attitude that Casey is fighting against and I hope we, as an industry, fight against too. No, you should NOT settle for mediocre, garbage software. You should be professionals - who take pride in their craft and want to achieve the best, especially in cases where it is EASY to do so.

geeky_username · 36 points · Posted at 15:53:31 on July 12, 2021 · (Permalink)

Or at least acknowledge the issue

"Yes we know it's currently slow, but we're working on other features right now"

TheTomato2 · 12 points · Posted at 23:16:54 on July 12, 2021 · (Permalink)

This really the crux of this whole issue. It's like people don't want to believe their code is garbage and start doing mental gymnastics to justify it. That is way more worrisome than people just writing slow code, acknowledging it and not caring.

geeky_username · 2 points · Posted at 15:53:41 on July 12, 2021 · (Permalink)

Or at least acknowledge the issue

"Yes we know it's currently slow, but we're working on other features right now"

delfinom · -6 points · Posted at 04:30:18 on July 13, 2021 · (Permalink)

Your attitude is just as bad and toxic for the industry. Who decides what is mediocre or garbage? What standard are we following. Engineering used to be about solving the problem at hand effectively. I can give you a $2 million wrench forged out the purist steel on the planet or a $10 wrench from Harbor freight. Is the $2 million one subjectively better. Sure the price tag is higher but both solve the problem of tighten in a nut here.

Microsoft devs didn't have high performance in mind as it wasn't their immediate problem. It doesn't make their software garbage or mediocre, just unfit for whatever task needs performance. Just don't use the tool and move onto one that meets your needs.

You don't see me whining that $10 wrench snaps if I apply too much force on it unlike that $2 million one.

BigHandLittleSlap · 97 points · Posted at 12:24:37 on July 12, 2021 · (Permalink)*

Do you prefer people that are wrong? Because that's the alternative.

Look, I know where you're coming from. A lot of people have made comments about Casey's attitude, and I understand.

But there's a sickness, a rot that goes all the way to the core of programming as a profession. There's this popular notion that optimisation of any kind, no matter how straightforward and quick, is a waste of time because hardware will get faster.

That hasn't been true for a decade, except in the sense that we have more cores now. A single CPU core has only gone up in performance by about 50% during that long period. In the past, that would be the year-on-year speedup.

Hardware has changed and programmers must adapt. Casey is an old soul in the sense that he still has his hair, but he thinks and talks like me, someone who started with computers before you were born. In those days we had to be frugal, and efficient, and smart.

Those days have come again. We can't rely on Moore's law any more for free wins. We have to start thinking like the programmers in the 1990s writing games that ran at 60 fps on hardware with less grunt than the controller in your disk drive.

It's not about perfection. It's about embracing a kind of zen: The simpler solution is not only less work, but also a better fit for the modern machine. That miracle of engineering is a true marvel, a beast of a thing that can absolutely fly if you just let it. If you stop hobbling it with your foolish, outdated notions that weren't even correct "back then". They were never a good idea! In the past we didn't have the capacity to waste, now we don't have the right kind of machine for those approaches.

Write code that's linear and straightforward and you too can revel in the unbridled speed that your personal supercomputer can do in a straight line.

TylerDurd0n · 18 points · Posted at 16:50:00 on July 12, 2021 · (Permalink)

Thank you - it annoys me to no end that so many users and developers seem to be fine with just wasting the potential processing power of their machines with wasteful practices.

And it's not even like modern apps are more efficient, in many cases they have less features and require more memory, more CPU cycles and GPU cycles than before (because we had the brilliant idea to a) render websites on the GPU and b) hire React developers instead of C++ people to build shiny new bloatware).

My personal take is that this is because the main purpose of operating systems and lot of software has become to lock in users to ecosystems than actually serve a local need on the system:

There is no reason for Razer/Logitech/et. al. to require people to install their Electron (or otherwise CEF-based) bloatware just to install device drivers, but try downloading "just" the driver - outside of business periphery you might not find an official link for those.

So the software has become a pure marketing tool, requiring you to create an account just to download drivers (see also: Nvidia Geforce Experience) or to even use it (see also: Windows Home Edition, if you don't know the workarounds) and then you want it to work on as many systems as possible with as low a maintenance burden as possible and these websites-as-apps do just that. They also allow in-place updating, making sure that you can regularly show some nice unsolicited update notifications to also remind people about the cool new features they are missing out on because they don't have that premium subscription (see also: Discord).

Run a few of these (and e.g. some game launcher) on your machine and you might have as many Chromium GPU, Renderer and Plugin hosts running as you might have Chrome/Edgium tabs. It's madness..

Thank you for coming to my TED talk.

Bricktop8877 · 7 points · Posted at 14:03:54 on July 12, 2021 · (Permalink)

I don't necessarily agree that it's a black or white battle between people who think optimisation is a waste of time vs people who need 100% optimisation. As software engineers we need a certain level of pragmatism to know what is suitable and so often the solution may not be perfect but somewhere in between.

RockstarArtisan · 57 points · Posted at 13:31:38 on July 12, 2021 · (Permalink)

IMHO he's taking his personal crusade a bit too far and only sees things his way - the Windows Terminal team now must reach performance perfection, god forbid they want to ship something that is useful for 99% of their user base.

That's a strawman. He never said this. He made the demo because of the excuses made, he made an update because the excuses kept coming. There's nothing wrong with backing your claims with proof and that's what he did. That's so much better than the usual unsubstantiated complaints, I'd love to see more of constructive criticism like this.

I'm not a fan of people like Jonathan Blow, who strike to me as arrogant and very up their own arse, but Casey doesn't seem to be this way. Or at least in this case, I don't follow him elsewhere.

gary_oldman_sachs · 11 points · Posted at 18:15:28 on July 12, 2021 · (Permalink)

Blow and Casey are inseparable—they're friends and frequent collaborators because they recognize the same qualities in each other. I don't know how you can dislike one but not the other.

[deleted] · 5 points · Posted at 21:41:34 on July 12, 2021 · (Permalink)*

[deleted]

KevDevBot · 1 points · Posted at 12:21:45 on July 13, 2021 · (Permalink)

Well, Blow's code is commercial. Considering the rampant theft in the game dev world, I don't blame him one bit for not sharing his code.

RockstarArtisan · 14 points · Posted at 18:36:25 on July 12, 2021 · (Permalink)

As I said, what I've seen from Casey so far is a couple of youtube videos where he either gives a tutorial or in this case proves his point by example, an example I can download and run.

What I've seen from Blow is pretentious twitch streams where he makes grandiose unsubstantiated claims about his programming language (that I can't download), among other things.

Also, their delivery is very different.

Zegrento7 · 27 points · Posted at 13:00:30 on July 12, 2021 · (Permalink)

You're right whenever an optimization is either too much work to implement/test, makes too little difference, or both. This is not such a case.

This attitude is what lead to us having an OS that requires 4GB(!!) of RAM and an 8th gen Intel Core just to install it

tomz17 · 5 points · Posted at 15:16:54 on July 12, 2021 · (Permalink)

and an 8th gen Intel Core

just to install it

Nah, that's artificial AF. The previews ran on older cpu's, and the lack of an extreme version 8-core in the 8-series (IIRC) means that there are previous-gen cpu's with identical instruction sets (including AVX2) that are FASTER than every single 8-series ever released. AFAIK they will literally have to put in an explicit check for an 8-series, since the instruction set isn't any different (i.e. compiled code for the 8 series would otherwise run on older CPU's as well).

I'll leave explaining the corporate bullshittery as an exercise for the reader.

gnuvince · 18 points · Posted at 14:23:12 on July 12, 2021 · (Permalink)*

the Windows Terminal team now must reach performance perfection

I think the point is not for them to reach performance perfection — Casey mentions multiple times that he has not looked at the output of a profiler to optimize the code — but rather to reach reasonable performance.

[deleted] · 59 points · Posted at 13:11:06 on July 12, 2021 · (Permalink)*

performance perfection

He literally just wants them to reach a baseline of performance that isn’t a thousand times slower than it should be…

There no optimization involved in what’s going on here.

Stop raising the straw man.

We have idiots on Reddit endless running around parroting bullshit like “runtime immutability actually executes faster because compiler optimizes better because no aliasing” and they’re upvoted for it even though it’s trivially shown to be a complete lie.

Stop cargo culting.

IceSentry · -17 points · Posted at 14:22:05 on July 12, 2021 · (Permalink)*

Come on, it's written by someone that has written performance oriented code for multiple decades. It's optimized just by that fact alone. It's ridiculous to assume that it's just the naive approach that your run of the mill programmer would use to write a terminal. Sure, it's not optimized in the sense that he hasn't profiled it, but it's optimized by his experience in performance and rendering.

edit: I think some of you are misunderstanding my point. The things casey did to avoid performance pitfall are fairly easy, but they are still optimizations. A cache is an optimization. Avoiding abstraction is an optimisation. It's just casey's default way to write code so to him it's not optimized, but for a lot of devs they would go for abstraction and no cache at first because it seems easier. They don't realise how expensive those abstractions are. Casey is very aware of that so he just avoids it.

Let me phrase this differently. Casey used memoization because he knew that he would need to get the same glyph often and he knows that memoization is the easiest solution for that kind of problem. Memoization is, according to wikipedia, an optimisation technique, therefore, refterm was optimized.

_tskj_ · 28 points · Posted at 15:21:58 on July 12, 2021 · (Permalink)

You talk like the Windows Terminal is thrown together by a bunch of interns or two dudes in their free time whose day job is selling ice cream. This is literally their job!

IceSentry · -1 points · Posted at 17:38:00 on July 12, 2021 · (Permalink)

My point isn't that the terminal team shouldn't know how to do this. I just disagree with the claim that casey's refterm is unoptimized. It's clearly optimized otherwise you'd get performance like windows terminal. It's just that those optimization are so ovvious to casey that he doesn't consider them as optimization. Sure, they aren't anything fancy, but a cache is still an optimization that windows terminal isn't using.

[deleted] · 8 points · Posted at 21:52:06 on July 12, 2021 · (Permalink)*

[deleted]

IceSentry · 2 points · Posted at 23:25:15 on July 12, 2021 · (Permalink)

Walking straight is literally using the optimal path. Just because it's the most simple, obvious, path doesn't mean it isn't optimized.

[deleted] · 3 points · Posted at 23:34:19 on July 12, 2021 · (Permalink)*

[deleted]

IceSentry · 2 points · Posted at 23:54:01 on July 12, 2021 · (Permalink)

Maybe it's a language barrier at this point because in french, using a direct translation if I say that I have an optimized solution or an optimal solution they both mean essentially the same thing.

Beidah · 2 points · Posted at 02:32:36 on July 13, 2021 · (Permalink)

Well, "optimized" is a verb, which implies an action is being taken. "Optimal" is a adjective, which means it's an innate quality of something. They mean the same thing literally, but the connotations are different.

_tskj_ · 1 points · Posted at 17:56:27 on July 12, 2021 · (Permalink)

Yes but they should also be obvious to anyone who is paid to do this. By your definition anything that compiles is optimized. Or anything that literally doesn't loop forever is optimized.

IceSentry · 0 points · Posted at 18:28:13 on July 12, 2021 · (Permalink)

I don't know what definition you think I'm using for optimization, but it's not that at all. A cache is an optimization and avoiding abstraction is an optimization. It basic optimization sure, but it's still optimization. We also have a very clear example of what happens if you don't do those fairly basic optimizations. You get something like windows terminal that works in plenty of basic workload but fall apart at "scale". If refterm is not optimized then what is windows terminal?

_tskj_ · 3 points · Posted at 18:55:26 on July 12, 2021 · (Permalink)

No I definitely see your point. I think the reason people here (and Casey) hesitate to call it optimized is that no measurements were made. Casey presumably programmed it in a way he thought would be good, but so presumably did the Terminal team. For something to be optimized I feel you have to make a measurement to conclude that option B is actually faster than option A. For all anyone knows, including Casey, including that cache might actually be slowing the program down. Maybe unlikely, but without actually measuring the consequences in some form (even just running time on it), I struggle to call it an optimization.

You see this all the time with inexperienced people. "I optimized it by removing this branch!" Yeah well maybe, but maybe also you made it more difficult for LLVM to optimize it, so you actually deoptimized it. The second Casey made any kind of decision based on measurements I would agree to optimizations. Otherwise, writing any code at all more efficient than the worst possible implementation you are capable of imagining is an optimization. Suddenly every program you have ever written is "optimized" because it's not as bad as you could have made it had you tried. The word just kind of loses all meaning at that point.

IceSentry · 2 points · Posted at 20:37:42 on July 12, 2021 · (Permalink)

That's why I talked about Casey's experience in my original comment. He's done enough work on rendering to know that doing it like he did will be faster than not using a cache. He didn't need to profile it because he knew it would be better. It's very obvious to him and doing it proved that it was indeed really fast. I understand not wanting to call it optimized because it wasn't profiled, but in a way running a benchmark in both terminals and seeing the difference is essentially measuring his approach. We know not using a cache like windows terminal is slow and now we know that using a cache is faster.

Casey just started with the assumption that a cache would be faster because his previous experience showed him that using a cache in similar situations was helpful. He essentially already had numbers of how slow it was without a cache, he hypothesized that using a cache would be much faster, used a cache and without much surprise it was faster. I really don't see how that's not an optimization.

_tskj_ · 1 points · Posted at 22:13:49 on July 12, 2021 · (Permalink)

Okay fine it's some kind of optimization. But it's in the same kind of class of optimization as not using a linked list to represent the characters in the terminal. Is it also optimized because of that? Because I wouldn't call that an optimization as much as not doing something completely inane.

I agree that it actually is somewhat optimized, I'm just reluctant to use your experience-based definition because absolutely everything you program is then to some degree optimized - it would be impossible not to optimize anything just by the virtue of not doing completely insane things. My quick one-off python script reads in the entire file in one call instead of doing one call per byte? Optimized. Yes I used experience to avoid doing something that would have killed performance. But I would also feel like an idiot asking my colleagues to have a look at my "optimized" python script.

Olreich · 18 points · Posted at 15:47:10 on July 12, 2021 · (Permalink)

So, here are the big insights from refterm on how to make fast code:

  • Cache things instead of recomputing them
  • Don't abstract away the work you need to do
  • Don't allocate anymore than you have to

Like yeah, he's been working on games and game engine tech, but those don't seem particularly surprising except maybe the abstraction bit. Turns out, abstractions are usually not zero-cost. But I think we mostly know that and that people just don't care.

salbris · 3 points · Posted at 16:52:37 on July 12, 2021 · (Permalink)

Are those not optimizations?

Olreich · 3 points · Posted at 17:29:00 on July 12, 2021 · (Permalink)

They are. I was arguing against the idea that you need to be a performance-guru to get this kind of speed up. All it takes is a few basic principles that most programmers have come across before, with maybe the exception of "abstractions considered harmful".

Me and all my "run-of-the-mill programmers" at work use caches and avoid allocating inside loops all the time, and we definitely aren't focused on performance at all.

salbris · 2 points · Posted at 18:20:42 on July 12, 2021 · (Permalink)

There is world of difference between a bit of memoization and the kind of caching Casey is doing. For one he already knows (from prior experience) that caching in that case will be helpful. So it's an optimization, just one that he has prior knowledge of.

Olreich · 3 points · Posted at 19:01:51 on July 12, 2021 · (Permalink)

I don't think there is much difference between them. It's a hash table that points to different places in a texture based on the hash of the input. Maybe it looks different because refterm's implementation of it is from-scratch instead of using off the shelf components?

IceSentry · 1 points · Posted at 17:42:12 on July 12, 2021 · (Permalink)

I'm not saying you need to be a performance guru.

My point isn't that the terminal team shouldn't know how to do this. I just disagree with the claim that casey's refterm is unoptimized. It's clearly optimized otherwise you'd get performance like windows terminal. It's just that those optimization are so obvious to casey that he doesn't consider them as optimization. Sure, they aren't anything fancy, but a cache is still an optimization that windows terminal isn't using.

To some people using abstraction isn't an issue, but for someone like casey he avoids abstraction as much as possible for the sake of performance. The default way he writes code is more efficient. Of course you don't need to be a performance guru to not write abstraction, but it's still an optimization that casey just does right away instead of waiting to realise that abstractions are expensive because he already knows that. I know plenty of devs that might be aware that abstractions cost performance, they just don't realise how much.

Olreich · 1 points · Posted at 18:56:24 on July 12, 2021 · (Permalink)

Hmm, I guess where we draw the line on optimization matters. Because you could argue that the starting point is any number of places. I don't generally consider the kind of advice that refterm uses to be optimizations, but yeah, it's definitely "optimized" compared to Windows Terminal.

[deleted] · 6 points · Posted at 15:30:07 on July 12, 2021 · (Permalink)

You know what? I am going to prove you wrong.

I have literally 0 experience writing this level of code in windows (I’ve wrote 3 C# desktop utility applications for work). Most of my work experience is in COBOL. Most of my personal project work is written in Rust/Actix, HTML and JavaScript.

I know absolutely nothing about Direct anything. I don’t know shit about text graphemes. I know even less about conio.

Now, I don’t have a job that i can just do what Casey did. So it’s going to take a longer period of time, but I’ll time track actual effort involved of going from 0 to writing a terminal.

Let’s see if your claim that “you need decades of experience in writing performance oriented code” holds any weight.

IceSentry · 1 points · Posted at 17:38:43 on July 12, 2021 · (Permalink)

That's not what I'm saying. I'm saying that it's not unoptimized code.

My point isn't that the terminal team shouldn't know how to do this. I just disagree with the claim that casey's refterm is unoptimized. It's clearly optimized otherwise you'd get performance like windows terminal. It's just that those optimization are so obvious to casey that he doesn't consider them as optimization. Sure, they aren't anything fancy, but a cache is still an optimization that windows terminal isn't using.

[deleted] · 6 points · Posted at 17:54:39 on July 12, 2021 · (Permalink)

And I am saying that if you just stop believing that “any thought towards performance is a premature optimization” then a render cache is just something you would default to.

There are entire middlemen products built around render caches for websites that developers deploy because rendering is expensive. When even bootcamp front end web developers understand this, to me, this just makes it the default state of affairs.

It’s only been the last 20 or so years that “optimization” and “giving a modicum of thought towards speed” have somehow come to mean exactly the same thing (thanks, Haskell).

IceSentry · 2 points · Posted at 18:25:11 on July 12, 2021 · (Permalink)

I never said it was premature, I just said it was an optimization. It's a basic optimization, but it's still an optimization. You seem to think that I disagree with you that optimization is important. I don't. I just disagree that refterm is not optimized because we have a clear example of a codebase that used too many abstractions instead of thinking about performance.

peppermilldetective · 1 points · Posted at 22:01:36 on July 12, 2021 · (Permalink)

This entire discussion can give way to a new discussion on "what is an optimization, and what is a design?".

To me, if you start from point A and move to point B because you believe that point B is better, that is an "optimization" (particularly, a "hypothesized optimization" since calling it a "true optimization" requires measurements). If you start from point A because you believe point A is a good start, then that is a design.

What Casey did here, can be argued about if it was an "optimization" or a "design". He used ideas that are typically called "optimizations" because they are things applied to "point A"s to create a "point B". Here, however, I don't know if he had a point A. We can consider the Windows Terminal "point A", but can we do that when refterm isn't a fork of Windows Terminal? Further, can we consider Windows Terminal "point A" when refterm isn't even trying to mimic it, only trying to show a proof of concept?

A better approach is this: optimization is a process, design is a thing.

You go from one design to another via an optimization. Each design is not an optimization because then any design could be called an optimization. For example, if I have a poorly made parsing tool that takes 30s to parse one line of text, and I change it to utilize OOP (assuming the algorithm stays somewhat the same so the only change is the introduction of OOP) and that reduces the parse time to 10s/line, does that make OOP an optimization? Another example is if I go from a Linked List to a Double-Linked List, or from a Linked List to an R/B tree. Are either of those optimizations? If the transition nets a measured improvement, then yes. However, if in either case I started with OOP, or started with Double-Linked List or R/B tree, are they still optimizations? No, they are designs.

The idea of caching and batching and reducing allocations has been around for a while (our CPUs have had caches for decades). They are usually referred to as "optimizations" because when we hear them being used it's because they were not being used before. This is usually because the code bases are old, or the people who created them did not know about caching and such. The introduction of caching into a code base that previously did not have caching is an optimization, but caching itself is not an optimization. If someone has knowledge of caching, they can apply it from the beginning. If you use caching from the beginning, it is point A. There is no prior point to compare to where one can say "this improved the code base and is therefore an optimization" as there was no code base prior to it.

The reason I want to distinguish these definitions ("optimization" vs "design") is because I have seen a trend where developers will not learn about the optimizations because they are "optimizations", and "premature optimization is the root of all evil". These are not "optimizations", they are "designs". They are tools. If you know of them, you can use them, and there is no evil to be found there. This is echoed in the same paper (iirc, same paragraph, even) that spawned the term "premature optimization is the root of all evil". I can use a hand saw to cut wood, but why use a hand saw if I know of and can use a table saw?

Also, I apologize if this comes across as confrontational to anyone as the point was to be more educational. If you do not know of a design, it's okay to not know. Being unwilling to learn of something can be a problem for a multitude of reasons, but that is a separate discussion.

IceSentry · 1 points · Posted at 23:41:43 on July 12, 2021 · (Permalink)

I don't agree that design and optimization are different things. Casey designed refterm based on his previous knowledge to be optimal at rendering really fast. A design can be optimized based on previous knowledge and that's literally what Casey did. An optimal design is optimized otherwise it wouldn't be optimal. Something being optimized isn't limited to the process of optimization it can be called optimized because the design is optimal for a given problem.

_bloat_ · 1 points · Posted at 05:00:45 on July 13, 2021 · (Permalink)

Something being optimized isn't limited to the process of optimization it can be called optimized because the design is optimal for a given problem.

Hm, I wouldn't call something "optimized" if say a random text generator somehow produced the optimal solution to a given problem on the first run. So imho a piece of code can be optimal without having been optimized.

IceSentry · 1 points · Posted at 05:29:14 on July 13, 2021 · (Permalink)

This isn't random though.

Casey used his already existing knowledge of rendering and writing efficient code to come to the conclusion that for this to not be slow he would need to use a cache. He used a cache and now he has a renderer that's much faster than windows terminal. His design was optimized by his experience on the matter. Sure, it could be even more optimized if he profiled it, but the current implementation is still optimized.

_bloat_ · 2 points · Posted at 05:53:18 on July 13, 2021 · (Permalink)*

I don't like this definition, because it allows to call every piece of code "optimized". You can always imagine a less efficient version and everyone who can program has knowledge and experience they can refer to.

Like a beginner who just came up with their own implementation of selection sort suddenly produced an optimized sort algorithm, because they know it's usually faster than random sort multiple times until the order is correct.

IceSentry · 1 points · Posted at 13:22:34 on July 13, 2021 · (Permalink)*

Yes, using a more performant algorithm for your use case is an optimization that you can do at the design stage. How is that not an optimization? It's choosing a more optimal solution based on previous knowledge. That's pretty much literally what optimizing mean.

I don't understand why everyone in this thread assumes this is somehow a slippery slope argument. If a beginner used bogo sort then learned that merge sort is better and implements it, how is that not just someone optimizing their code?

Chosing a more efficient solution is an optimization. Casey used memoization to improve the performance of his terminal. Memoization is literally defined as a kind of optimization.

_bloat_ · 1 points · Posted at 14:10:46 on July 13, 2021 · (Permalink)

Yes, using a more performant algorithm for your use case is an optimization that you can do at the design stage. How is that not an optimization?

Because like I said, that's a definition which makes every piece of code "optimized". I can always think of a less efficient way of doing things, so by default all of my code is optimized greatly according to your definition. The definition I prefer is that an optimization always refers to a previous piece of code, which measurably got improved.

I don't understand why everyone in this thread assumes this is somehow a slippery slope argument.

Because it is. Or can you point me to some code which is unoptimized according to your definition - i.e. someone picked the slowest possible solution in every part of the code?

IceSentry · 1 points · Posted at 15:37:21 on July 13, 2021 · (Permalink)*

Litterally any piece of code that wasn't written with the goal of being efficient. If you are aware of a performance pitfall and use a known solution to that pitfall you optimized your design. If you are aware of it but think it doesn't matter in your case then you didn't optimize it. Or if you aren't aware of it then you didn't optimize. Just using C instead of python is a form of optimization done at design time because we know that python is slow based on prior measurements.

The whole point of casey was to prove that using a cache to optimize rendering is easy for a terminal. The design was optimized to fit those criteria. Casey wasn't just randomly chosing a solution. He knows that using a cache is an optimal way to do this so he optimized his design accordingly. His solution wasn't created in a vacuum.

_bloat_ · 1 points · Posted at 16:25:12 on July 13, 2021 · (Permalink)

Litterally any piece of code that wasn't written with the goal of being efficient. If you are aware of a performance pitfall and use a known solution to that pitfall you optimized your design. If you are aware of it but think it doesn't matter in your case then you didn't optimize it.

That is exactly what Casey says about his code:

It is nothing more than a straightforward implementation of a tile renderer, with a very simple cache to ensure that glyph generation only gets called when new glyphs are seen. It is all very, very simple. A more complex codebase that parsed Unicode and rendered glyphs itself would likely be much faster than refterm for many important metrics.

He is aware of where his code can be optimized, but didn't think it matters, hence he didn't optimize it by your definition.

Just using C instead of python is a form of optimization done at design time because we know that python is slow based on prior measurements.

So every software out there which doesn't use the most inefficient programming language or runtime is automatically optimized?

The whole point of casey was to prove that using a cache to optimize rendering is easy for a terminal. The design was optimized to fit those criteria. Casey wasn't just randomly chosing a solution. He knows that using a cache is an optimal way to do this so he optimized his design accordingly. His solution wasn't created in a vacuum.

So every application which caches results is optimized? This probably covers almost every piece of code out there, because you'll find patterns like this everywhere:

int x = compute_something_expensive();
do_something(x);
do_something_else(x);

vs

do_something(compute_something_expensive());
do_something_else(compute_something_expensive());

Almost every programmer out there isn't just randomly choosing one of those solutions, they know that caching the result of compute_something_expensive is (likely) an optimal way to do things so they optimized their design accordingly by introducing x. Their solution wasn't created in a vacuum either.

So how is this not a slippery slope?

IceSentry · 1 points · Posted at 16:38:39 on July 13, 2021 · (Permalink)*

Something being optimized isn't a boolean flag. Using memoization is an optimization but it doesn't mean there's now no way to optimize the code even more. Using a faster language is an optimization, it doesn't have to mean that it's the only optimization.

Taking your code block, the first one is more optimized than the second one, I don't see what's so controversial about saying that.

[deleted] · 20 points · Posted at 14:51:45 on July 12, 2021 · (Permalink)

“I have run out of excuses, therefor Casey is an asshole!”

It’d be funny if it weren’t so predictable and sad.

_Bjarke_ · 12 points · Posted at 19:03:34 on July 12, 2021 · (Permalink)*

He's indeed a genius and has a lot of knowledge to share, but he has to be right, and things have to be done his way.

That's not true. a) If you find a better way he will 100% listen. 2) On stream, he encourages people not just follow everything he says blindly, but to question it, and go find their own way of programming that they enjoy. 3) He says things like "I like" and "I prefer". Etc...

He's only calling out on things he legitimitly sees as bad engineering and he usually has everything ready to back up his claims. The problem is that other peoples way is usually OOP which is by all messurable metrics objectively bad software engineering.

The thing OOP is good at is that it lets developers think of one object in terms of life-time, functionality, error handling, etc.. Instead of data collection & algorithms - thus giving the illustration of simplicity, at the expense of creating complexity, and poor performing software. The stage of individual object thinking might be easier to wrap your head around, which I think is why OOP has become an industry standard. The problem is that people think individual object thinking is the last stage of programming, and even think it's a good stage for software. It's not, it's a very, very bad stage. It produces terrible, way too complicated software (as this drama beautifully demonstrates).

The Win-Term guys probably are - top of the line OOP developers - yet, they were unable to make good quality simple software.

Casey explains it better - Programming stages of mental development with respect to architecture: Individual Element thinking vs Grouped element thinking.

https://www.youtube.com/watch?v=f4ioc8-lDc0&t=4464s

norman784 · 6 points · Posted at 15:31:57 on July 12, 2021 · (Permalink)

He has a cruzade against bad code in general, just check it out an old rant of him https://twitter.com/cmuratori/status/1246930755860586496, I agree with him that our apps are just a pile of crap, just because we have more resources it doesn't mean we need to ship apps faster instead of at least optimize them.

gnus-migrate · 6 points · Posted at 04:09:30 on July 13, 2021 · (Permalink)

It really doesn't matter how many features your terminal emulator has if it can't provide any of them in a reasonable amount of time. When my terminal emulator is slow, I'm going to think twice before running commands in it, I'm going to have to use workarounds to avoid it slowing down the commands I do run. This is my experience with Windows Terminal today, and it's really frustrating.

Performance isn't a nice to have, it's a feature that really affects how you use a product. I'd like to not have to think twice about running commands when I use WE, nothing more.

JustCallMeBen · 3 points · Posted at 06:07:23 on July 13, 2021 · (Permalink)

the Windows Terminal team now must reach performance perfection

His slapped together side project is hundreds of times faster than their product.

Nobody is asking for perfection, the point he makes is that the terminal is much, much slower than it should be.

-Androth- · 2 points · Posted at 20:06:33 on July 12, 2021 · (Permalink)

that may be, but it's hard love.

although i'm a bit worried. he locked down his discord i guess due to invasion by incompetents. and jon blow isn't streaming programming anymore. he likely got demoralized by incompetents in his chat.

we can't lose those two.

MuslinBagger · -2 points · Posted at 16:38:46 on July 12, 2021 · (Permalink)

Windows terminal is garbage. The thing just slows down the FPS on my ryzen 3800x PC to a crawl. It’s basically useless and I have to switch to the Ubuntu app instead in order to use WSL.

maest · -6 points · Posted at 15:27:49 on July 12, 2021 · (Permalink)

Sounds like he'd be an awful coworker.

[deleted] · -2 points · Posted at 17:21:47 on July 12, 2021 · (Permalink)

Can someone rewrite this with the plot to Rocky, thanks

allo37 · 49 points · Posted at 22:26:06 on July 12, 2021 · (Permalink)*

Honestly, mad respect for this guy. A lot of people like to walk around saying "It's so simple, I am very smart", but this dude is actually putting his money where his mouth is and proving it.

PM5k · 160 points · Posted at 15:07:15 on July 12, 2021 · (Permalink)

This would have not happened if not for how arrogantly dismissive that one maintainer was, calling it a doctoral project. I think a lot of people piled on top when the conversation got diverted toward Casey’s comments being terse. I have read the original issue three times over and it feels like it’s people not even bothering to maturely handle the fact that he didn’t pepper his replies with tangents and emojis and the fact that they find that rude somehow (it isn’t, get over it.)

So that got to be a distraction to the whole point he was making: a bunch of very clever people could not accept the fact that a customer pointed out performance issues on their repo, they got precious about it and became dismissive and passive-aggressive instead of using all that typing time to investigate whether there is a quick win. When they outright lied (or maybe they just lacked experience to identify this quick win), Casey took it upon himself to prove a point.

I don’t think it’s a “crusade” like others are saying. He has the time, he wanted to show the maintainers and the rest of the community just how badly entrenched some of these developers are when it comes to accepting that they have made mistakes or released suboptimal code. The god complex is real and they leaned on it instead of listening to someone very clever and who actually had a point. Not only that but he even took time to write a proof for it.

In a month, not a lot of people will remember this, but I wish that someone in MS who’s got some semblance of power and a brain saw this and kicked the Terminal team a bit, if not for the fact that they could have made an effort, then just for them simply being atrociously dismissive and bullheaded about there being a fix that was in fact not at the scope of a PhD project.

OrdinaryRedditor · 47 points · Posted at 21:27:12 on July 12, 2021 · (Permalink)

The PhD dissertation comment really is something. It was so bad that even if we took it as gospel and assumed it did indeed require a doctorate, it'd still be a terrible excuse since they're one of the privileged companies that could easily pull that off:

  1. Microsoft has the resources to fund as many PhDs as they'd like solely for advancing their tech stack.

  2. Windows' terminal technologies date back decades, which would have been enough time to get several researchers through that process.

  3. Improvements to text rendering wouldn't be limited to Terminal, almost 100% of user-facing apps could benefit from advancements there.

  4. Even if they didn't want to go through that process, they could hire people who work deeply with those text rendering issues (and hopefully have PhDs) to help the people who won't try to deal with it because "text hates you."

PM5k · 26 points · Posted at 21:38:19 on July 12, 2021 · (Permalink)

I guess my main annoyance was the dismissive nature of their comments as if they didn’t care or felt accused. Personally, this was my sticking point.

As a developer you should be curious about stuff like that. I get it, we can all be busy, and sometimes we burn out, but unless you’ve completely given up on the discipline - you should relish the idea of knowing you can improve your code. I know I do. I took a really long time before I transitioned from getting upset about code review or issue comments telling me that I did something suboptimal or something I wrote was not as good as it could have been, but when you learn to put the software before your pride - you get to learn from other people and let them help you make stuff better. I think software dev took me on this weird rollercoaster that starts with extreme impostor syndrome and paranoia that everyone’s out to out you as a shit dev and replace you, to a place where everyone I work with just wants to write nice code and see stuff succeed rather than backstab each other. I would wish that upon others and hope they get to see this in their careers.

ack_error · 5 points · Posted at 02:22:31 on July 13, 2021 · (Permalink)

This is also the downside of having dev staff directly responding to customers. It cuts red tape and can help the devs work much more closely with users, but occasionally a flippant remark that would be OK in private becomes a firestorm in public. Making a few of these mistakes as a dev makes you appreciate why companies have PR staff and community managers and the restraint they have in responses.

I appreciate the uphill battle that the current Terminal team has, but this was clearly not the right response when there are decades of examples of console I/O being done an order of magnitude faster than in Windows.

habarnam · 0 points · Posted at 09:50:46 on July 13, 2021 · (Permalink)

Improvements to text rendering wouldn't be limited to Terminal, almost 100% of user-facing apps could benefit from advancements there.

Not really, no. At least not using Casey's code. The rendering being done in refterm is for a very niche case of text output: monospace font output in a grid. Also refterm doesn't have a software renderer as it uses the GPU to build the font texture atlas.

Godd2 · 7 points · Posted at 13:27:14 on July 13, 2021 · (Permalink)

Also refterm doesn't have a software renderer as it uses the GPU to build the font texture atlas.

Funny thing is, Windows Terminal also uses GPU rendering. In fact, it's one of their selling points:

The Windows Terminal is a modern, fast, efficient, powerful, and productive terminal application for users of command-line tools and shells like Command Prompt, PowerShell, and WSL. Its main features include multiple tabs, panes, Unicode and UTF-8 character support, a GPU accelerated text rendering engine, and custom themes, styles, and configurations.

habarnam · 2 points · Posted at 18:44:50 on July 13, 2021 · (Permalink)*

I didn't know that, I was sure I saw this objection raised somewhere on github, so thank you for clarifying. :)

KillianDrake · 11 points · Posted at 00:28:22 on July 13, 2021 · (Permalink)

I'm not surprised, I raised the same issues early on and some of the devs on that team were extremely defensive about the project which was painfully janky and performing worse than the old console. It eventually got to be about even with the old console but they basically just did a massive rewrite to end up at the same place using far more resources (like my GPU) to somehow come out even.

It didn't make sense to me, a terminal should be blazing fast and my hunch was correct - I didn't even expect 100X perf increase, I'd be happy if it was twice as fast, 5X as fast. But that they left 100X on the table and really are quite arrogant and dismissive about it even today... says a lot about how that team is run and how the current gen of MS developers view hardware. It's just some infinite resource to be used and abused - sells more Azure credits.

BigHandLittleSlap · 28 points · Posted at 21:34:05 on July 12, 2021 · (Permalink)

The irony of this is that the Windows Terminal performance issues are very superficial, minor annoyances. Microsoft really needs to hire several people like Casey and make a "performance team" to run around and fix more critical performance issues.

As a random example, I found that SQL Server cannot respond to any query in under 150 microseconds, no matter how trivial it is, such as "SELECT 1". Not on localhost, not over named pipes, and not with shared memory either. It just can't do it.

This actually matters for some applications that make heavy use of cursors, because they require a round-trip to the database server for each row. The performance is entirely latency limited. If there's a hard floor that you can't get past, then that's the ultimate limit for applications like this. Believe me, there's many business applications out there that are slow and affecting peoples' day to day lives because of this issue.

I would like faster terminals, but many people need SQL Server latency to be lower.

Of course, there are many more such examples where someone with Casey's attitude could make a material difference to Microsoft's product quality.

PM5k · 14 points · Posted at 21:45:59 on July 12, 2021 · (Permalink)

That sort of hits the nail on the head in many ways. Lots of things could be better if people responsible for product would see things from the dev side more. We may not live in a perfect world, but that’s no excuse to allow tech debt to build up or performance to be left on the table just because.

Funnily enough very recently I’ve had to “justify” my desire to introduce code profiling as a formal process and there’s been several discussions as to why we should do it. It wasn’t until I pointed at several projects that customers have highlighted as being “slow” and said that had we cared about performant code instead of pushed “something” out the door while saying “we will fix it later” (ya never really get to do that) - we would not have the complaints.

Ultimately though, MS has far more resources than a vast majority of tech companies, they have far less of an excuse to let things like this fall through the cracks. Sadly - this may just be what big companies grow up as. Unwieldy and uncaring beasts that prioritise deadlines and profit over robustness and stability and consistent performance.. or maybe I’m a cynical bastard that hasn’t seen enough success stories.

crozone · 14 points · Posted at 06:58:37 on July 13, 2021 · (Permalink)

Microsoft really needs to hire several people like Casey and make a "performance team" to run around and fix more critical performance issues.

After they are done with terminal and SQL server, can we set them on the Windows Shell and Explorer.exe?

It is depressing how slow some UI interactions are in modern Windows compared to say, Windows 98 or macOS 9 running on even average hardware of their time. Opening folders on macOS 9 and scrolling through them feels straight up zippy, even on a 300mhz PowerPC and spinning rust, compared to doing the same on Windows 10 on a multi-GHz Surface Book 2 with an SSD.

Where the hell did the performance go? Are people just so used to how shit modern Windows is that they don't even care that it takes seconds to open a folder full of photos? Or launch a calculator?

GonziHere · 1 points · Posted at 13:19:28 on November 4, 2021 · (Permalink)

Where the hell did the performance go? Are people just so used to how shit

Well, this is why he has made it. Not to attack the cmd in particular, but to prove that we are routinely leaving orders of magnitude of performance on the table. Would you be fine if your car would have 10.000 horses just so that you could use a hundred? Because, we (the developers) are right now.

KillianDrake · 9 points · Posted at 00:32:34 on July 13, 2021 · (Permalink)

A lot of the stuff that make the terminal slow and SQL server slow are probably rooted deep into how Windows works. And those kind of introspective kernel optimizations just seem like they've stopped. Why? Because the expertise is gone. I doubt there's many people left at MS who understand the kernel at a deep level who aren't close to retirement. And their bosses who are younger than them will never approve anything for fear of "breaking" something. There's no Bill Gates to say "fuck it all, do what I say and the buck stops here" to force innovation forward. Satya is a guy who will be your buddy, but ultimately he knows - bloated Windows = more Azure credits and besides, he figures people can just use Linux on Azure if Windows bugs them so much.

AGreenTejada · 1 points · Posted at 20:43:04 on July 14, 2021 · (Permalink)

But that doesn't make sense, SQL Server 2019 runs on Linux. MOST cloud SQL Servers run on Linux. It's not just the OS, it's that the dev teams choose between keeping compatibility and keeping performance - they choose compatibility every time.

Honestly, what Microsoft needs to do is .NET Core all of their projects - say fuck backwords compatibility, deprecate a bunch of corporate cruft, and make a lighter version of their existing projects that everyone can use.

KillianDrake · 3 points · Posted at 21:22:08 on July 14, 2021 · (Permalink)

Did you know that SQL Server on Linux is really just running the Windows binaries with a conversion layer to turn Windows syscalls into Linux syscalls (like a custom version of WINE)? It's a horror show. No one in their right mind should use it, but hey, it's an easy way for them to tell corporate managers they can reduce "costs" by saving on Windows licenses and moving SQL Server to cloud.

lfairy · 1 points · Posted at 05:21:44 on November 20, 2021 · (Permalink)

IME, the primary reason people use Microsoft stuff is because of compatibility. Because their existing stack is built on it, and it's too annoying to switch to something else.

If Microsoft ditched compatibility and rewrote everything, they'd lose the primary thing that customers pay them for. All to get something that, by virtue of being a rewrite, will be less functional and more buggy than Postgres.

FriendlyRollOfSushi · 29 points · Posted at 23:12:51 on July 12, 2021 · (Permalink)*

A team like that can't happen, because it goes strictly against the main goals of the decision makers in the company: releasing shiny things full of buzzwords and bullshit, and getting promoted to higher management positions so that mundane things like "unhappy customers" is someone else's problem.

I'm using a fast, SSD-equipped Windows 10 laptop right now. It takes almost 2 seconds on this laptop to launch the default Calculator, and it displays a splash screen[1] on launch. A flipping Calculator. And all the inputs I typed while it launces? Lost, of course. So I can't open a calculator and start typing without waiting for a splash screen to be done with whatever is going on there. Even Chrome launches way faster on this laptop.

The final result of years of evolution of MS as a company is that it's incapable of writing something that people would consider a reasonable homework for a CS101 class back in the 90s. Something that launched in about 100ms on Windows 95, with most of this time spent on HDD heads physically moving to the right tracks of a spinning magnetic disk.

Imagine explaining to an engineer from 1995 that "in 2021, a team in Microsoft had to add a splash screen for the Calculator to hide the latency of loading the buttons." How would they even process this sentence? How much alcohol they would need to understand how the company ended up where it did?

If a team full of Caseys existed, and had any power to change things, all those people who got where they are by pushing .NET, XAML, Electron and other shiny stuff to the places it has no right being in would get into trouble, so of course this will never happen. Creating a team like that would be like performing a deliberate career suicide.


[1]

BigHandLittleSlap · 111 points · Posted at 00:38:31 on July 13, 2021 · (Permalink)*

I just tried the Calculator app on my quite old laptop and it "only" takes about 1,100 milliseconds to fully launch. That's not "two seconds", but it's still atrocious. You've got to wonder... what is it even doing that requires a solid 700 milliseconds of processor power and over a second of wall-clock time?

A quick peek reveals that the "calculator" app does all of the following

  • Loads or touches 216 distinct files (mostly WinRT DLLs).
  • Performs 16,669 registry API calls, including stuff like "FIPS algorithm policy" and "DC locator policy".
  • Loads a storage library (for calculator? Storing what!?)
  • Loads URL and web-related libraries -- this is for the currency conversion functionality I assume.
  • Loads a cryptographic library -- makes sense for HTTPS used above.
  • Creates a thread pool -- ditto, this is probably for async HTTP API calls.
  • Directly involves the NVIDIA drivers, including at least one slow file write
  • Loads "imagehlp.dll", which is an EXE metadata reader library typically used for writing compilers or similar tools.
  • Loads "ngcrecovery.dll", which is apparently the Windows Hello Recovery Helper. Wat?
  • Wastes 13 milliseconds faffing about writing to some file calld "nvAppTimestamps", which might be an NVIDIA telemetry log or something.
  • Loads the "Windows.Energy" DLLs. Wat?
  • Loads the Windows CODECs libraries? For video playback support?
  • Loads its own custom font.
  • And even includes OLE2 because why not. Just in case you want to embed calculator in an Excel spreadsheet or whatever.

Craziness.

crozone · 15 points · Posted at 07:09:54 on July 13, 2021 · (Permalink)

I knew Windows 10 was slow but this is next level insanity.

How did you go about profiling this? I want to profile what exactly explorer.exe does when opening a folder... or maybe the Start Menu when you click Start.

BigHandLittleSlap · 21 points · Posted at 07:23:24 on July 13, 2021 · (Permalink)

SysInternals Procmon is your friend for watching high level actions of a process such as file or registry access.

For really fine-grained performance tuning there are more specialised tools, but they tend to be useless if you don't have matching debug symbols.

However, because Calculator is now an "App" instead of an ordinary executable application, most such tools can't even launch it. I'm sure there's a way, I just don't know what it is...

TParis00ap · 3 points · Posted at 20:35:01 on July 13, 2021 · (Permalink)

Maybe Windbg versus Olly/Ida/Immunity. I know that Windbg interfaces better with the Windows Kernel than the other tools...I think?

BigHandLittleSlap · 6 points · Posted at 22:16:19 on July 13, 2021 · (Permalink)

Windbg is for debugging when you have symbols, and you want to go through the code line-by-line. Microsoft helpfully provides a "symbol server" for most of their products, especially Windows, so this is surprisingly easy. I use it regularly to analyze crash dumps. There's nothing to it: Just open the DMP file and click the "!analyze" button it suggests.

Ida is for when you don't have symbols and you want to reverse-engineer a piece of code.

Performance analysis is usually done via ETW or similar APIs, using tools like the Windows Performance Toolkit.

Kazan · 2 points · Posted at 22:35:36 on July 14, 2021 · (Permalink)

Windows 10 isn't slow

but the shell is

crozone · 2 points · Posted at 01:48:20 on July 15, 2021 · (Permalink)

I would consider a huge part of the Windows 10 experience to be the shell and its in-box applications, which are very slow.

I'm sure the kernel, win32, and most of the background services are still plenty fast though, but I don't really care about that if my experience is limited by the shell.

FriendlyRollOfSushi · 54 points · Posted at 02:59:33 on July 13, 2021 · (Permalink)

I'm not even mad at them, that's beyond impressive.

Just the thought of how many man-years were spent on making such a trivial application unusable fills me with a sense of awe.

Before I was half-seriously wondering whether something like a Calculator can reach the level of complexity to have its own critical security vulnerabilities sufficient for remote code execution. I don't think I have any doubts anymore.

Meior · 11 points · Posted at 21:59:24 on July 13, 2021 · (Permalink)

Unusable is a bit strong, no.... It takes 1.1 seconds to open, so it's unusable?

Anonymous7056 · 15 points · Posted at 22:08:07 on July 13, 2021 · (Permalink)

-click-

800 milliseconds later: "Come on, what the fuck is taking so long??!"

Spartan448 · 1 points · Posted at 00:36:37 on July 16, 2021 · (Permalink)

Evidently computer performance works on the same rules as New York traffic

FriendlyRollOfSushi · 14 points · Posted at 23:00:48 on July 13, 2021 · (Permalink)*

It appears to take longer on my machine, but yes, even 1.1 seconds is unusable for quite a few applications.

It's very easy to explain. The quality of your interaction with PC (and many other interfaces, from TV remote to your microwave) depends on how many things you can do with it without switching your focus, and how many times you need to switch it to achieve what you want.

For example, let's say you need to close a window and then do something else. You just throw your cursor in the general direction of [X] and click, THEN you may or may not pay attention of what's on the screen now and where do you need to click next.

Now imagine a window that is not entirely full-screen, and there are a few pixels left, so if you are not paying attention, you are closing the window behind the one you wanted to close. Does it take too much time to aim? No, but this is the difference between "do, then look" and "do, then look, then adjust, then do, then look". The second scenario is infinitely more annoying, and drains your focus way more than it should.

When I open a calculator, I do not expect it to be in unresponsive state for a long time. I want the "do" phase to be "open the calculator, type what I want", and only then pay the attention to what it's trying to communicate back to me. This was solved for decades, and no one complained. You probably work the same way with your terminal, address bar of the browser, microwave, TV remote, car, phone, etc. This becomes muscle memory. An unconscious sequence of actions that you perform before paying attention to what happened.

However, thanks to the current state of things in MS, I simply can't do that. I often start typing before Calculator fully launches. I spent over two decades with faster versions of the same exact app, MS conditioned me to do this, but now my most common use case for the most basic iconic app is completely broken, and no one in MS seems to care. Probably too busy with rolling out another XML and Javascript-based UI framework that takes forever to launch.

SergeantRegular · 8 points · Posted at 20:11:22 on July 14, 2021 · (Permalink)

Strangely, this is one of my biggest gripes with all modern televisions being "smart" TVs. Back in the days of "dumb" TVs, and especially when you had analog controls, changing channels was fast. Not just fast, but literally instantaneous. We didn't realize at the time, but that interface lag that comes with digital processes is real. It doesn't even have to be very long, it just has to be perceptible.

There are plenty of things that have gotten "slower" even though they're technically faster and far more capable. Cars with all-electronic throttle and steering are less "responsive" than older ones with mechanical linkages. Digital audio players and streaming radio are "laggier" than AM/FM tuners. Cartridge-based consoles started the game instantly upon power-on. Hell, old 8-bit computers would boot from floppies in less time than my NVME SSD equippmed Windows 10 computer does.

Software bloat is a very real thing, and I think it outpaces hardware improvements because generational shifts in capability (HDD to SSD, single-thread to multi-thread, 32-to-64 bit) aren't uniform. So not only do you have backwards compatibility issues, but it compounds when you want to add more "automatic features" into a system. Automatic updates, syncing a system clock to a server, all of the crap that was identified in the new Win Calc app...

I know that there at lease used to be a program called nLite, for Win XP. It allowed you to remove whole features from Windows, pre-set applications and other registry tweaks - you could make a really fast installation. I haven't tried to do the same with Windows 10, yet. I think it has diminishing returns when it's less the OS and more of the programs themselves that are bloated.

orderfour · 2 points · Posted at 21:32:02 on July 15, 2021 · (Permalink)

Not just fast, but literally instantaneous.

Because old TV's are kinda like radio now. They are receiving all the time and you were simply tuning into another stream. Fast. But digital is sending out a specific call for something and waiting for the result. I get what you're saying in that's it's so much slower than it used to be, but at least in this case it makes sense.

Suppafly · 2 points · Posted at 14:48:54 on July 14, 2021 · (Permalink)

When I open a calculator, I do not expect it to be in unresponsive state for a long time. I want the "do" phase to be "open the calculator, type what I want", and only then pay the attention to what it's trying to communicate back to me.

I literally just ran into this issue the other day. I got a new laptop for work with Windows 10 a while back and hadn't used the calculator much (I mostly just type them into the browser URL bar and let google handle it). I did start-->run-->calc, and then started typing numbers and then looked up the see that the app was still loading it's interface instead of adding up the numbers I'd been typing.

netherous · 6 points · Posted at 22:15:09 on July 13, 2021 · (Permalink)

On my modern and very powerful system it routinely takes 5-6 seconds to start when absolutely nothing else is happening. I've always wondered at the insane level of bloat that must be present to accomplish this.

ory_hara · 2 points · Posted at 22:38:59 on July 13, 2021 · (Permalink)

Sounds like you might have a network adapter problem, but I might be wrong about this.

ThirdFloorGreg · 3 points · Posted at 04:03:59 on July 14, 2021 · (Permalink)

You could say that in response to literally anything.

NegativeTwist6 · 5 points · Posted at 12:02:47 on July 14, 2021 · (Permalink)

"Doc, it hurts when I pee"

"Sounds like you might have a network adapter problem"

ThirdFloorGreg · 2 points · Posted at 13:04:11 on July 14, 2021 · (Permalink)

But I might be wrong about this.

DebtUpToMyEyeballs · 1 points · Posted at 21:30:48 on July 14, 2021 · (Permalink)

"Oh shit, you're right! I have a network adapter stuck up my urethra."

ory_hara · 1 points · Posted at 01:42:21 on July 15, 2021 · (Permalink)

Network adapters can cause a lot of very annoying problems that can be difficult to diagnose, so you're almost half right!

[deleted] · 7 points · Posted at 20:28:17 on July 13, 2021 · (Permalink)

Upvote for 'faffing about'

drhunny · 7 points · Posted at 21:43:46 on July 13, 2021 · (Permalink)

Coming soon: BLOCKCHAIN.

... in case you want to mine bitcoin from your calculator.

account_destroyed · 2 points · Posted at 22:49:20 on July 14, 2021 · (Permalink)

...in case you want to mine bitcoin from your calculator.

You mean in case Microsoft wants to mine Bitcoin from your calculator

coppit · 5 points · Posted at 21:52:03 on July 13, 2021 · (Permalink)

My guess is that they used some framework that had a bunch of bells and whistles. It might be interesting to create a Hello World app using visual studio and do the same analysis.

UnacceptableUse · 8 points · Posted at 22:58:26 on July 13, 2021 · (Permalink)

Yeah I wonder how much is just loaded in UWP by default

masklinn · 2 points · Posted at 19:28:42 on July 14, 2021 · (Permalink)

There's probably that, but also while the Windows 10 calculator looks simple at first glance, try clicking on the expand button (if you're in the mini mode) then the hamburger menu thing in the top left.

It's got the usual scientific and programmer modes (with bitwise ops, shifting, and bit-toggling keyboard), a graphing mode, a date calculator, unit converters (way more complex than necessary too), and a currency converter.

Only thing it doesn't seem to have is an RPN mode.

PM5k · 14 points · Posted at 06:17:03 on July 13, 2021 · (Permalink)

I choked on my coffee reading this just now. I am going to kindly assume you made 0 of this up and it actually does this. And I am also going to say that I am going to use this in a conversation today. This is absolutely bonkers. Damn.

defnotthrown · 12 points · Posted at 06:46:17 on July 13, 2021 · (Permalink)

It used to be a lot worse in the Win10 preview builds. I had a version running on my laptop with 5200rpm hard-disk. After a fresh boot it took 30s to open the new Calculator. I'm not exaggerating, I used a stopwatch.

ambientocclusion · 2 points · Posted at 20:59:19 on July 13, 2021 · (Permalink)

Just wait until the next version, which includes an email server and a social network.

[deleted] · 2 points · Posted at 21:04:13 on July 13, 2021 · (Permalink)

I wonder if they just have a boiler plate header block they just slap on all their applications that might use some part of what is included in the chunk.

mrg1957 · 3 points · Posted at 21:09:04 on July 13, 2021 · (Permalink)

My guess it's a newbie who ripped off something that worked and modified it; only touching what they changed.

Kazan · 2 points · Posted at 22:35:20 on July 14, 2021 · (Permalink)

Loads the "Windows.Energy" DLLs. Wat?

i bet you that has to do with power saving features for laptops, etc.

ickybus · 1 points · Posted at 16:25:37 on July 14, 2021 · (Permalink)
daveplreddit · 1 points · Posted at 16:30:50 on July 14, 2021 · (Permalink)

Cool. I'm actually going to send this off to Dave Cutler because if I recall, he was on mission to make text scrolling fast on the MIPS and hand-coded it in assembly...

oh_no_aliens · 1 points · Posted at 19:47:16 on July 14, 2021 · (Permalink)

I don't even see this shit when I open up something on Linux.

what the fuck

PM5k · 10 points · Posted at 06:11:02 on July 13, 2021 · (Permalink)*

Ah see that was your mistake! You used a calculator app to calculate and expected it to be fast. Why can’t you use the intended process of opening start menu and typing in your calculation in search and let cortana give you the result? After all - it’s the fast way! Oh and the calculator is deprecated, have you not read the buried issue we hid somewhere deep in the pile of issues? The splash screen is a performance optimisation. We added it for better UX while we load all the legacy code of every calculator since windows 95 in the background so the user feels “involved” and “important” while they wait for the calculator to load. I am closing your issue as “duplicate” now.

<3 Microsoft Dev Team

—- On a much more serious note: it takes about a second for my start menu to open sometimes. Yet it takes an imperceptible amount of time for Microsoft’s power tools omnibar to pop up so I just use that. It’s almost like they load a bunch of crap on start menu every time you open it. Like they’ve never heard of what a cache is or something. I feel like I’m mining Bitcoin each time I click on start. I hope 11 is faster…

7sidedmarble · 2 points · Posted at 13:35:06 on July 13, 2021 · (Permalink)

Why do you use windows then? Linux is free

FriendlyRollOfSushi · 7 points · Posted at 19:07:16 on July 13, 2021 · (Permalink)*

Okay, I guess it is time to induce the range of Linux fans...

I do interact with Linux all the time at work, but if we are talking about personal use, I tried multiple times, and it always ends up being a terrible idea.

There seems to be a universal consensus among the distros that a user is not supposed to have anything working, ever, because "each distro is free to choose whatever they want", "go and fix it yourself, you have the sources" etc., and there should be no obvious ways to fix anything without understanding the implementation details.

Let's say you have a fairly trivial issue: like your sound randomly "farts" all the time, or your wifi drops the connection (and no, it never happened on Windows), or maybe your screen micro-freezes every few minutes. After spending some time googling for the solutions for your issue, the answers you can find will be roughly like this:

  • "This is your fault." (Okay, that's fair)

  • "Go make a better replacement for libsomebullshit that everyone uses." (Okay, that's fair too)

  • "Why are you asking here and not in the mailing list of the lib that causes the issue?" (How is anyone supposed to know which lib causes the issue to begin with?)

  • "Duh, just open blah/blah/foo/bar and add a line "lsghfvosdhfodhis=1305897 253", it's obvious." (No, it is not, I don't even understand what is this config for, and what effect adding this line will have)

  • "Oh, you have no such config? Duh, of course: that's for another distro. Type sudo asdf -xkzdtfgo." (No, thank you; I think I'll spend some time first trying to figure out whether it will do something it should not, because instead of providing user-readable settings page you are making me execute something with unknown consequences)

  • "Duh, what did you expect? You are looking at the thread from 2012. They replaced blah-blah with yadda-yadda in 2013. So type something else instead." (That's fair, I should have used my telepathic abilities to realize that)

  • "Dude, are you dumb? OF COURSE it only works until you reboot the system. Just make it run on each restart." (Thank you)

And it just goes on, and on, and on, infinitely. To the best of my knowledge, there seems to be no distro where it is expected that you can install it on some random moderately-new laptop and end up with a fully-functioning system. For some reason people keep telling that Ubuntu is a distro like that, but that's not even remotely true if you are not using the exact same PC as the guy who maintains each individual package, or not doing the exact same things.

I remember there were stickers like "Works with Windows 7/10/whatever" in some hardware stores, I think Linux distros needs the same: like "You can install Ubuntu/Debian/Arch/Whatever on this machine and it will actually work. And no, you won't have to interact with the toxic community of people who already solved all these issues for their case: it will really work on the first try".

One would think the situation would be any better with devices that are designed to run linux, like Raspberry Pi, but of course it won't.

I had a spare monitor at home, so I decided to make it an always-on screen that shows one web page, all the time. Sounds trivial, right? Only one tiny thing left: make it so that the screen doesn't turn off automatically after N minutes of inactivity.

In a sensible OS there would be a checkbox somewhere in the settings, and it will be searchable by any of the keywords like "power", "screen", "turn off" etc. But because Pi's OS looks and feels like a typical GNU-like software, of course you are supposed to edit 4 unrelated configs, trying to figure out which one corresponds to your version of the OS. In the end, I did find the right one for that exact version, and typed new lines there that I would never guess without reading the sources. Because of course it would be too much to ask to have a commented-out line that the user can just enable: no, it's the user's fault if they don't know the internals of your library that this particular distro decided to use.

My point is: Windows is a terrible OS, but it is an OS. Linux is a great kernel, but there is nothing I would consider calling a user-oriented OS for PC that uses this kernel (if we don't count Windows since now it has WSL).

I'll keep trying every few years. Who knows, maybe at some point some distro will decide to hard-ban every package that doesn't care about the user's experience, will provide meaningful, searchable settings for everything, will realize that hiding obvious actionable errors behind "of course there will be nothing on screen, you are supposed to add this line to the config to enable logging, and then check the log" is not the right thing to do, etc. Maybe someone will even enforce some sort of a config format that makes it so that each of the available options is always present and documented from a searchable UI, and there will be a hard ban on adding any hidden switches to the packages that are not accessible through this centralized interface. I don't expect this to ever happen, tbh.

7sidedmarble · 2 points · Posted at 19:11:59 on July 13, 2021 · (Permalink)

You are absolutely correct: Linux has a high difficulty barrier to being a good daily-driver OS. But imho, we're talking about power users here. Getting your linux system the way you like it is not an insurmountable problem. Can someone like Casey manage it? Probably? I'm not that smart and I do fine.

FriendlyRollOfSushi · 2 points · Posted at 19:31:57 on July 13, 2021 · (Permalink)

IMO it's not "high difficulty", it's "low standards". Or "no standards" even.

It's a 0-effort issue for any person who has any weight in Linux community to say "Okay guys, it's been fun, but let's stop being idiots and start using ONE standardized format for tool-friendly rich configs that can be parsed by any distro, so that they can generate nice UIs that users can interact with in a sensible manner".

I mean, Linus somehow made the entire industry use git (and remember all its completely inconsistent commands to do different trivial things), so for someone of his caliber it wouldn't be that difficult to push for something like that.

Or some distro can say "Okay, it was fun, but we will not accept this and that app because their --help output is not clear enough".

Or "No, you can't make the name of your package 3 characters long: please respect the user's right to infer what your package is doing from its name, which should be descriptive."

Sigh...

7sidedmarble · 2 points · Posted at 19:42:15 on July 13, 2021 · (Permalink)

It's a 0-effort issue for any person who has any weight in Linux community to say "Okay guys, it's been fun, but let's stop being idiots and start using ONE standardized format for tool-friendly rich configs that can be parsed by any distro, so that they can generate nice UIs that users can interact with in a sensible manner".

As to where they go, there is: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

As to forcing every tool on linux to use one format of config... I mean, how would you even enforce that? If that's what you want maybe NixOS is up your alley.

FriendlyRollOfSushi · 1 points · Posted at 21:19:09 on July 13, 2021 · (Permalink)

how would you even enforce that?

The same way everything else gets done in the Linux world: by ranting loudly in mailing lists about how stupid the devs who don't comply are, and how hard it must have been for their parents to teach them to stop eating their own poo.

From the outsider's point of view, that looks like the main mechanism for propagating architectural decisions in Linux, especially the ones related to the kernel.

7sidedmarble · 1 points · Posted at 22:10:46 on July 13, 2021 · (Permalink)

I mean there's a lot of reasons why that isn't happening right now, from logistics to the unix philosophy itself, but I'm not even convinced it's a problem, or even close to the biggest problems facing Linux. Personally I'd rather have working Bluetooth drivers then a single config format for everything.

FriendlyRollOfSushi · 1 points · Posted at 22:42:08 on July 13, 2021 · (Permalink)

That was just an example of low standards, and by no means the only problem, and in my experience, a lot of problems on Linux are solvable by user, but require spending an evening digging through different websites looking for an answer of "how to achieve something trivial".

I never tried using Bluetooth headphones with Linux, for example, but I'm totally expecting that even if they do work, I would have to spend hours looking for a right line in the right config to make them my default audio device even if they lose connection from time to time.

Maybe there is no problem like this (like, maybe there is an intuitive list of audio devices in every single distro, and with a single checkbox I can mark the headphones as "default", and the HDMI speakers in my monitor as "fallback"), but all my experience with Linux distros so far tells me it's going to be an extremely frustrating experience, and it will end up in editing some configs, which will stay relevant for just a few months, until the next big update of the distro.

Narishma · 1 points · Posted at 14:35:26 on July 13, 2021 · (Permalink)

Linux isn't free from resource-wasting crap, especially if you use something like gnome.

Thatar · 1 points · Posted at 06:08:54 on July 13, 2021 · (Permalink)

Chrome stays loaded in the background by default btw, after closing all windows. Funnily enough Windows also tries to keep some of its very basic applications in "sleep mode" to start them faster. I never understood why they added this feature but guess I do now.

But yeah that's pretty ridiculous performance on the calculator. Can't say I've noticed it but it has also been a long time since I used Windows 98.

firefly431 · 1 points · Posted at 05:44:54 on July 13, 2021 · (Permalink)

arrogantly dismissive that one maintainer was, calling it a doctoral project.

Re-reading the issue comments, I don't think this is very accurate, as from what I can tell, it stems from a reasonable misunderstanding.

Here's the relevant comments:

Drawing a monospace terminal display is straightforward. You have two textures that encode your data. You have a pixel shader that div-floors the screen coordinate to figure out a cell index then looks up into the first texture. It encodes one background color, one foreground color, and one cell-glyph index per terminal cell.

The cell-glyph index is then used for a single dependent texture fetch which loads a per-pixel glyph out of the second texture, which is a glyph atlas encoding the cell-glyph coverage in whatever way makes it easiest to compute your ClearType blending values. Combine the background and foreground color using the ClearType algorithm and blending values, output final pixel color, done. (I am assuming the terminal has to support ClearType - if it doesn't, you just blend with a regular coverage value directly and it's even easier).

There would only be one dispatch for the entire terminal display, which is a single full-window quad. Note also that I say "cell-glyph", not glyph, because obviously if you want glyphs that span two cells, you split those into two cell-glyphs accordingly (but the renderer doesn't care).

That's it, right? I mean that is the entire renderer. It'd be a very short pixel shader, modulo the fact that you have a couple different ClearType patterns, so you'd need a few different conditional compilations of the shader.

This would render at thousands of frames per second. The only bandwidth to the card would be downloading texture updates. The parser outputs these - one texture update to change the cell contents in the cell contents texture, and then occasional texture updates to add glyphs to the cell-glyph coverage atlas whenever the parser detects a codepoint that has not previously been rasterized (in normal usage this would happen only at the beginning, and then all relevant glyphs would soon be in the atlas and you'd never need any more updates to it).

Am I missing something? Why is all this stuff with "runs of characters" happening at all? Why would you ever need to separate the background from the foreground for performance reasons? It really seems like most of the code in the parser/renderer part of the terminal is unnecessary and just slows things down. What this code needs to do is extremely simple and it seems like it has been massively overcomplicated.

I believe what you’re doing is describing something that might be considered an entire doctoral research project in performant terminal emulation as “extremely simple” somewhat combatively. I am not aware of the body of work around performant GPU terminal emulation, but I’m somewhat surprised that other accelerated terminals aren’t already doing this (as I imagine we would have heard about it before now had they done so.)

Is there not a significant startup cost to this? Rendering the entire glyph closure available from the font and all of its fallbacks to a texture seems prohibitively expensive, but if you’re removing a stage from the pipeline that determines exactly what glyphs to shape and where you’ll need to do that—as well as reimplement a large portion of a text shaper, no?

I expect that DirectWrite does incredible optimizations on its own, and that we are impeding it from doing so by not intelligently commanding it, but I don’t believe that it’s quite that advanced.

Setting the technical merits of your suggestion aside though: peppering your comments with clauses like “it’s that simple” or “extremely simple” and, somewhat unexpectedly “am I missing something?” can be read as impugning the reader. Some folks may be a little put off by your style here. I certainly am, but I am still trying to process exactly why that is.

From what I can tell, Casey first suggests what (actually is) a very simple approach to text rendering: basically just put each character into one cell, as everything's monospace, right?

Here's the thing: a lot of work goes into rendering text. See this well-known article or this FAQ from Harfbuzz. Suffice to say, the naive approach requires significant alterations to make it work for a modern Unicode world (as Casey did). DHowett, presumably familiar with this, completely misinterprets Casey's argument as rewriting the entire text rendering engine from scratch using the character grid approach, which is indeed a gargantuan task. It seems to me that this is the real problem. Here's the thing: I don't think this is entirely unreasonable, going only off the original comment.

A rebuttal of Casey's comment, from the (imagined) perspective of a WT contributor:

Drawing a monospace terminal display is straightforward.

To me, "drawing a monospace terminal display" includes text shaping and all that jazz, which is hard. That's not straightforward!

You have two textures that encode your data. You have a pixel shader that div-floors the screen coordinate to figure out a cell index then looks up into the first texture. It encodes one background color, one foreground color, and one cell-glyph index per terminal cell.

The cell-glyph index is then used for a single dependent texture fetch which loads a per-pixel glyph out of the second texture, which is a glyph atlas encoding the cell-glyph coverage in whatever way makes it easiest to compute your ClearType blending values. Combine the background and foreground color using the ClearType algorithm and blending values, output final pixel color, done. (I am assuming the terminal has to support ClearType - if it doesn't, you just blend with a regular coverage value directly and it's even easier).

This is pretty misleading as well. We can definitely offload the actual glyph rendering to DirectWrite (though "glyph atlas encoding the cell-glyph coverage in whatever way makes it easiest to compute your ClearType blending values" makes me a little uneasy; what if DW doesn't support that?)

However, how do we compute these "cell-glyph indices"? That sounds like something Uniscribe (the text shaper in Windows) should do for us, but Uniscribe can't do this directly. We'd either have to do it ourselves (how DHowett interprets it) or we'd have to hack around it somehow (what Casey did.)

(snip) one texture update to change the cell contents in the cell contents texture, and then occasional texture updates to add glyphs to the cell-glyph coverage atlas whenever the parser detects a codepoint that has not previously been rasterized (in normal usage this would happen only at the beginning, and then all relevant glyphs would soon be in the atlas and you'd never need any more updates to it).

This is, in all honesty, an egregious misunderstanding on DHowett's part. He interprets "this would happen only at the beginning, and then all relevant glyphs would soon be in the atlas" as "in the beginning, load all glyphs in the font into a texture", which is obviously a terrible idea.

Am I missing something? Why is all this stuff with "runs of characters" happening at all?

It seems that Windows Terminal breaks down text into chunks based on their style, whereas Casey implicitly assumes that this is completely unnecessary. The issue with this is multi-cell glyphs with multiple styles (see "Text Rendering Hates You", section 3.2), at least.

Why would you ever need to separate the background from the foreground for performance reasons?

So that the aforementioned runs are longer and we have fewer draw calls.

It really seems like most of the code in the parser/renderer part of the terminal is unnecessary and just slows things down. What this code needs to do is extremely simple and it seems like it has been massively overcomplicated.

The examples you mention are because you're ignoring the actual hard part, which is internationalization and correct Unicode rendering.

Disclaimer: I'm not an expert, nor am I a contributor to WT. Furthermore, Casey has made some excellent points and identified several areas that can be improved to increase rendering performance.

TLDR: Casey's comment describes only a small portion of the work required for a (Unicode-aware) terminal renderer. (The rest is handled by the shaping and rendering engines in DirectWrite.) DHowett, misinterpreting this, correctly states that rewriting the entire renderer from scratch is completely infeasible and would require significant expertise in the field. He also takes offense at the (perceived) claim that doing so is "straightforward" and "extremely simple."

PM5k · 6 points · Posted at 06:04:59 on July 13, 2021 · (Permalink)

Just before anything else - I have read what you wrote carefully, although my response isn’t gonna be as long. Just letting you know so you don’t think I skipped to the end. I think when I said “dismissive” I meant that the responses were formulated based on fairly terse remarks and without much follow through. I also think Caseys one fundamental mistake was not simply doing the work first and submitting it as a PoC for the purpose of it carrying his argument. This would have directed the convo all on its own and focused the maintainers.

Also, did you see his two videos where he shows his implementation? (That’s not a combative remark, just a sincere question)

He does show how direct write is egregiously slow and a lot of uniscribe stuff is… well it’s not great. I wonder if this could have also been something that would have driven the conversation in the right direction had the work been done in advance and linked to the issue?

However from where I was seeing this unfold, it seemed to me like those remarks were made by someone who should have had the training to interact with a user and “dig deeper” before responding the way they did. I dunno… it’s human to misunderstand things, but I feel like if one is unsure about making a response - it would be prudent to clarify before responding. Every time I had a comment war on git stemmed from me not taking the time to really understand the situation and ask the right questions. Speaking from experience. Makes me ask whether the replies came from a heated place or perhaps had some artificial urgency attached to them based on Casey’s terseness.

firefly431 · -1 points · Posted at 06:27:12 on July 13, 2021 · (Permalink)

Thanks for responding!

I also think Caseys one fundamental mistake was not simply doing the work first and submitting it as a PoC for the purpose of it carrying his argument. This would have directed the convo all on its own and focused the maintainers.

That's an unreasonable amount of work to expect from someone who's just submitting a bug report. I agree that it definitely would have cleared up some of the misconceptions, though.

Also, did you see his two videos where he shows his implementation? (That’s not a combative remark, just a sincere question)

I have, and I've also skimmed through the source code of v1 and a bit of v2. He actually makes several problematic remarks, indicating he doesn't quite know what he's talking about re: Unicode:

// taken from refterm_example_terminal.c, also in the first video, he makes the same claim about what Uniscribe does
static void ParseWithUniscribe(example_terminal *Terminal, source_buffer_range UTF8Range, cursor_state *Cursor)
{
    /* TODO(casey): This code is absolutely horrible - Uniscribe is basically unusable as an API, because it doesn't support
       a clean state-machine way of feeding things to it.  So I don't even know how you would really use it in a way
       that guaranteed you didn't have buffer-too-small problems.  It's just horrible.
       Plus, it is UTF16, which means we have to do an entire conversion here before we even call it :(
       I would rather get rid of this function altogether and move to something that supports UTF8, because we never
       actually want to have to do this garbage - it's just a giant hack for no reason.  Basically everything in this
       function should be replaced by something that can turn UTF8 into chunks that need to be rasterized together.
       That's all we need here, and it could be done very efficiently with sensible code.
    */
    // ...
}

Either he's massively underestimating the work Uniscribe does or he's seriously suggesting someone write their own text shaper. This kind of "belittling" (sorry for the charged language) isn't really productive to discussion.

He does show how direct write is egregiously slow and a lot of uniscribe stuff is… well it’s not great. I wonder if this could have also been something that would have driven the conversation in the right direction had the work been done in advance and linked to the issue?

What, in particular, do you think would have helped? Work around DW/Uniscribe? That's a pretty drastic step, as then you have to deal with Unicode corner cases.

However from where I was seeing this unfold, it seemed to me like those remarks were made by someone who should have had the training to interact with a user and “dig deeper” before responding the way they did. I dunno… it’s human to misunderstand things, but I feel like if one is unsure about making a response - it would be prudent to clarify before responding. Every time I had a comment war on git stemmed from me not taking the time to really understand the situation and ask the right questions. Speaking from experience. Makes me ask whether the replies came from a heated place or perhaps had some artificial urgency attached to them based on Casey’s terseness.

I agree. Nonetheless, there's a lot of work put into WT's renderer, and I can see why Casey's dismissing of it as "extremely simple" could rub them the wrong way.

PM5k · 5 points · Posted at 06:37:03 on July 13, 2021 · (Permalink)

I think to the point about DW and uniscribe - I am not nearly qualified enough to propose workarounds, I simply think that if you have to fight existing API’s to get stuff optimised, that’s a pretty serious sign that maybe those API’s aren’t serving their purpose as well as they should and holding onto them because starting from scratch is hard should not be a barrier. I’m now being dismissive I think. Or at least idealistic. Like I know things aren’t nearly that clear cut, but still, I’ve heard a lot of people over the years say that “refactoring or rewriting this is too much work” and they cling onto the legacy stuff because it works regardless of how fast / maintainable it is - almost like it’s the only good solution and everything else isn’t worth doing.

And yeah, Casey did end up oversimplifying some of that stuff, I just wonder how much of it stems from inexperience and how much of it comes from “you have the resources we don’t, you’ve got no excuse for not figuring this out, it’s not my job to tell you ‘how’” - just because he was fed up. Does that make what he said any easier to digest? I guess not.

wisam910 · 29 points · Posted at 04:18:12 on July 13, 2021 · (Permalink)*

I'm really glad Casey did this demonstration.

I honestly had no idea it was possible to write software that performs this fast.

I mean, I knew software was slow and bloated, but I had no idea it was this bad.

I thought maybe terminals can get 5x faster than they currently are, but I also thought this would require some sort of herculean effort.

I didn't realize it is such a low hanging fruit.

This is a big teaching moment for the entire industry.

I've been listening to Jonathan Blow and Casey Muratori for a while now, but this demo still completely blew me away.

I really had no idea such a feat was possible.

This changes all my assumptions about everything in the web stack (my main "specialty").

I already know that most people do crazy stuff that don't need to be done (all the AWS and K8S bullshit).

But this pushes me to question even more fundamental points: the way we store/retrive/query data. To me it seems that SQLite is the "state of the art" in this regard, but maybe even that is 10x slower than it needs to be due to faulty assumptions.

averynicepirate · 9 points · Posted at 13:09:37 on July 13, 2021 · (Permalink)

Went from embedded to webdev and the web stack is one of the most bloated space.

  • NPM/node_modules dependency hell
  • Site generator that produces unsecure thrash
  • Endless toolchains, bundlers, polyfills, post-processing, etc...most people don't even know what is going on and just do npm run start and hope for the best, else google the error message
  • Intrusive ads that everyone sees as the norm now
  • Crazy trackers that runs in the background, hell some site even mine bitcoins with your machine while you browse

The PC is faster than the fastest computer in the world of 1996 (when web came out) and I still struggle to scroll a page sometimes.

_Bjarke_ · 6 points · Posted at 18:47:12 on July 13, 2021 · (Permalink)

That is the best possible outcome of this drama <3

Casey completely opened my eyes too a couple of years ago. It was a crazy experience, it completely changed the way I approach problems and write code.

It took me a while to shake off those OOP habits though, but it's worth it, the software you write not only becomes much faster, but it also becomes much simpler, and at the same time it becomes more enjoyable too to write code and solve problems, as you deal with less friction from made-up problems.

KillianDrake · 3 points · Posted at 12:47:14 on July 13, 2021 · (Permalink)

SQLite is slow because it is simple, built to be small, deals with an inefficient structure intentionally (single file) and doesn't implement most of the SQL standard beyond the basics and even then implements most of it poorly. It is just widely used because it's a drop-in simple SQL engine ideal for desktop programs.

But on the larger scale, SQL Server suffers from basic bloat issues. I'm not sure who actually focuses on performance anymore. Maybe RavenDB?

wisam910 · 1 points · Posted at 13:42:08 on July 13, 2021 · (Permalink)

SQLite is supposed to be very efficient in its use of resources ..

KevDevBot · 0 points · Posted at 12:48:30 on July 13, 2021 · (Permalink)

Ironically the web doesn't suffer the same way as desktop ecosystems. Web HAS to be performant. Individual websites may be slow, but the building blocks of the web are very fast. JS for example is orders of magnitude faster than python / PHP / Ruby, and JS needs that speed for obvious reasons. Not that there isn't room for improvement, but the incentives are totally different from desktop. A fast web is business critical.

wisam910 · 2 points · Posted at 13:41:20 on July 13, 2021 · (Permalink)

My beef is not with the platform (the browser, the js engine, the network protocol, etc) but with how you use it.

Casey's hardware is very powerful but windows terminal is very slow on it. So it's the software that is the problem.

That is, the majority of the libraries and programs that people use to make websites.

Also, um, I don't know in what virtual reality you live but the vast majority of websites have shit performance.

KevDevBot · 1 points · Posted at 14:04:07 on July 13, 2021 · (Permalink)

Individual websites may be slow, but the building blocks of the web are very fast

As in a lot of websites are coded poorly, but web technology generally is quick.

_Ashleigh · 106 points · Posted at 12:15:46 on July 12, 2021 · (Permalink)

This goes to show most optimization is in high level algorithms/design instead of low level hacks.

[deleted] · 21 points · Posted at 13:05:17 on July 12, 2021 · (Permalink)

It’s really not. Casey is just showing the base level of performance things have when you just stop making terrible, cargo cult programming choices. There’s no optimization going on here.

_Ashleigh · 95 points · Posted at 13:18:41 on July 12, 2021 · (Permalink)*

Sorry, if I wasn't clear, but that's exactly my point.

"Stop making terrible choices" to me means putting a little thought into the design.

[deleted] · 72 points · Posted at 13:23:39 on July 12, 2021 · (Permalink)

No, you’re clear. I just just woke up and my brain processed it wrong. Sorry about that!

_Ashleigh · 28 points · Posted at 13:58:49 on July 12, 2021 · (Permalink)

Ah, we've all been there 😜

SexlessNights · -3 points · Posted at 19:33:07 on July 12, 2021 · (Permalink)

So drinks after work?

salbris · 13 points · Posted at 16:54:35 on July 12, 2021 · (Permalink)

What I'm curious about is exactly why there is such a performance difference. What are these "cargo cult programming choices" that the Windows team made?

Han-ChewieSexyFanfic · 34 points · Posted at 17:46:35 on July 12, 2021 · (Permalink)

That’s the cargo cult cult, where a redditor just invokes the magic words “cargo cult” and it automatically constitutes a cogent argument.

munchbunny · 11 points · Posted at 19:25:23 on July 12, 2021 · (Permalink)*

They're not. It's a strawman. The issues that Casey points out aren't really results of cargo culting in how you write code. However, several of them (allocating memory in inner loops, not minimizing draw calls, etc.) are common sources of performance issues that subject matter experts would tell you are worth optimizing up front.

You could call it "bad code", but not "cargo culting".

[deleted] · 10 points · Posted at 19:43:13 on July 12, 2021 · (Permalink)*

[deleted]

munchbunny · 1 points · Posted at 20:56:08 on July 12, 2021 · (Permalink)

Not sure I follow. The root cause isn't use of std::string. It's allocating on the heap in an inner loop. Doesn't matter if you malloc-ed it, new-ed it, or RAII-ed it through std::string.

If "parsing data without hitting the heap inside a loop" is supposed to be common knowledge, then I'd consider "std::string does heap allocations" in the same category for anyone doing string manipulations in C++.

[deleted] · 6 points · Posted at 21:07:28 on July 12, 2021 · (Permalink)*

[deleted]

lookatmetype · 2 points · Posted at 21:50:02 on July 12, 2021 · (Permalink)

Their excuse for using std::string and not ... you know just using a C-style array allocated on the stack is because the former improves "code maintainability".

munchbunny · 2 points · Posted at 21:45:16 on July 12, 2021 · (Permalink)

That seems like an awfully broad definition of "cargo cult" programming advice.

Maybe you've read something different than what I've read, but the advice I've seen has never been "just use std::string, it's good enough", it was always "wherever you're doing char*'s, use std::string instead". Same goes for naked pointers and the stdlib smart pointers. And that's not bad advice for newbies in the context of the epidemic of memory safety problems these practices are supposed to prevent.

gredr · -1 points · Posted at 21:33:44 on July 12, 2021 · (Permalink)

The cargo cult says, "just use std::string, it's good enough."

That's lazy, not "cargo cult". std::string works and is understood (to some extent, at least) by the team. The cargo cult is doing things they explicitly do not understand in hopes of getting a completely unrelated result.

wisam910 · 4 points · Posted at 23:55:12 on July 12, 2021 · (Permalink)

abstraction-based programming is the main culprit here.

By not thinking about what's going on under the hood, you end up wasting the computer's resources. A lot of the time, collapsing abstraction layers not only makes the code faster, it also makes it clearer.

However, this runs counter to the mainstream programming education that focuses on treating computers like abstract machines and treating programming like a mostly mental activity where the computer is just the "current hardware implementation" of some "idealized" computation theory.

newtoreddit2004 · 1 points · Posted at 02:33:52 on July 15, 2021 · (Permalink)

Lol inbf4 people come in claiming algorithms and data structures shouldn't be asked in interviews because no one uses them in real life

Daell · 64 points · Posted at 11:57:18 on July 12, 2021 · (Permalink)*
mighty_panders · 212 points · Posted at 12:13:35 on July 12, 2021 · (Permalink)*

Damn is krixano insufferable. Sure, Windows terminal sucks, but this overly antagonistic attitude is just counterproductive. Using the github issues as a personal soapbox to shit on devs is not a good approach to get anything done. It's far more likely to make them ignore the topic because it's generating too much hatred.

delfinom · 50 points · Posted at 17:01:21 on July 12, 2021 · (Permalink)

Jesus, krixano is one hell of a fucking Casey fanboi. His entire issue is enough code of conduct violations to get banned from any sane project.

[deleted] · 10 points · Posted at 05:42:38 on July 13, 2021 · (Permalink)

[deleted]

7sidedmarble · 8 points · Posted at 13:44:26 on July 13, 2021 · (Permalink)

In my experience on the internet, there is, and always has been, a subculture to programming of very toxic and elitist people who really like the idea of being the genius programmer in the room, but generally don't actually work in the industries they find worthwhile (games, graphics, systems, etc). Goes along with accusing everyone else of being stupid that actually does work in fields outside what they deem as "cool", like web stuff. These are people that really love talking about programming, and thinking about it, but don't actually do it that much, or at least not professionally.

Not saying that's Casey whatsoever, but this kind of person generally loves people like Casey and Jonathan Blow cause they validate their world view of being the hardcore programmer in the room.

codec-abc · 1 points · Posted at 12:27:21 on July 13, 2021 · (Permalink)*

Honestly, Casey is a bit like the old Linus. He is good technically but he can improve a lot on the social skills. In the issue, he is ok but the exposure (mostly rants) on Youtube and Twitter is a bit too much imho. This is especially easy for him in the position he is in. But the poor maintainers have a lot to deal with and no need to go on your high horses with them. I still remember the VSCode issue where a guy tried to use git for the first time (with VSCode) deleted his whole code and then created an issue insulting the developers. The bottom line is be cool with the maintainers even when they are wrong. State your argument without being a dick. It will be nicer for them and you actually have more chance to get a helping hand from them. No need to put a light on then on the social networks. We all write bad code from time to time.

zadjii · 57 points · Posted at 16:10:28 on July 12, 2021 · (Permalink)

Dude's unbearably insufferable, and frankly just wrong. E.g., from comment

Windows Terminal, Conhost, ConPTY, etc.

  • Increased OOP, Increased C# and .NET, Increased layers
  • Increased Memory, Increased CPU
  • Decreased Performance
  • OOP is not necessarily bad
  • The Terminal actually doesn't use .NET or C#, so that's just wrong.
  • No duh it has more layers? The Terminal is doing more things than the console, so obviously there will be more layers.
  • The memory footprint of the console has been going down over the years, and the performance has been steadily improving.

But this dude isn't there to have a good faith discussion.

Astarothsito · 1 points · Posted at 18:31:12 on July 12, 2021 · (Permalink)

Well, if I understood correctly, the problem is the rendering performance, I think it is an issue but I can't read yet a 1GB file in the console yet. But if he can then it is really bad that the terminal couldn't do it.

Maybe he could measure piping performance or something else that really matters but rendering text? (or developers should stop that practice to log everything in the console and put it in a file or something else).

munchbunny · 3 points · Posted at 19:41:18 on July 12, 2021 · (Permalink)

Not just the rendering performance. In the original issue Casey also mentioned performance overhead coming fro Conhost and ConPTY.

But rendering performance is absolutely one of the problems.

zadjii · 1 points · Posted at 19:29:58 on July 12, 2021 · (Permalink)

I mean the rendering performance of the terminal is good, not great. He's got a proposed solution that's unbelievably amazing, just one that's a little tricky to implement in the Terminal today. There are plenty of other places in the pipeline that the bottleneck exist though - IMO, those are more important to optimize than just maximizing FPS.

OP of terminal#10623 is just being combative for the sake of it though.

FullPoet · 2 points · Posted at 11:57:52 on July 13, 2021 · (Permalink)

It isnt good. Its fucking awful.

Have you been paying attention?

deadair3210 · 0 points · Posted at 16:30:46 on September 2, 2021 · (Permalink)

Seems perfectly fine with rclone puking its debug output at full speed, so the question would be are you? Both preview and stable are plenty fast for most people, and if you are bottlenecking on outputting text to the console you probably should rethink and maybe output to something else

[deleted] · -55 points · Posted at 13:56:02 on July 12, 2021 · (Permalink)

[deleted]

wordandahalf · 33 points · Posted at 14:04:12 on July 12, 2021 · (Permalink)*

Make them quit by flaming a volunteer on GitHub issues?

mighty_panders · 23 points · Posted at 14:24:15 on July 12, 2021 · (Permalink)

Shouting at people how shitty they are has zero constructive benefits. Sure you can critizie them but then actually starting a dialogue, recommending some actionable points, providing feedback (preferably not laced with swear words) is an actual contribution towards a goal. Dumping rant after rant on volunteer contributors burns them out, makes them leave and shrinks the team. Actively hurting the chances of issues getting worked on.

If level-headed discourse without bringing their axe to grind along is too hard for some people maybe they shouldn't be part of communities.

IshKebab · -8 points · Posted at 17:56:45 on July 12, 2021 · (Permalink)

I don't know. Some projects need to hear a rant like this to kick them into gear. I have never used Windows Terminal so I have no idea if it's appropriate here but I've definitely seen rants like that have a good effect in the past. Of course nobody likes being on the receiving end of it.

NoInkling · 1 points · Posted at 05:10:02 on July 13, 2021 · (Permalink)*

Some people (by their own admission) respond well to fat-shaming - does that mean it's always, or even commonly, justified to use that tactic?

xImReD · 106 points · Posted at 12:10:39 on July 12, 2021 · (Permalink)

🍿🍿🍿 - https://github.com/microsoft/terminal/issues/10623

I understand Muratori's point with the whole refterm saga, and I think it was handled very badly by the windows terminal team inside github issues.

But this dude is just straight up riding on the wave against the windows terminal without providing anything relevant beside parroting what was said by Muratori in his videos, which at this point I assume the windows terminal team has already seen.

emax-gomax · 47 points · Posted at 15:08:43 on July 12, 2021 · (Permalink)

I think Krixano is a real asshole. Like... more than one his points against the team was they took too long to do X. Who cares? X is here, we've all got it. Casey tried to make things better, this guy just seems to wanna throw blame around for why things aren't better.

BigOnLogn · 24 points · Posted at 17:15:58 on July 12, 2021 · (Permalink)

Honestly, it was going very well until DHowett made the "doctoral research project" comment. In my opinion, Casey and the MS Terminal members were having a reasonable discussion on how to proceed. Casey even seemed on board to make changes to termbench that would help the MS Team.

It seems to me that DHowett took offense to Casey telling them (at length and in great detail) that what the MS Team has been struggling with for years is actually quite easy, given sound architectural decisions.

It's like this scene in Spider-Man (2002). Which, of course, led to this scene.

zadjii · 10 points · Posted at 18:00:17 on July 12, 2021 · (Permalink)

You know, I wonder what timeline we'd be in if the comment was instead

I believe what you’re doing is describing something that might be considered an entire doctoral research project in performant terminal emulation as “extremely simple” 😅

Because I believe that comment was originally intended to be a joke. But tone is hard to convey on the internet, and now a misunderstanding has spiraled into all this.

CabbageCZ · 116 points · Posted at 12:18:20 on July 12, 2021 · (Permalink)

Idk man, the refterm project is really cool and hats off to the developer, but I can't get behind a seemingly unrelated rando (?) getting into a straight up flamewar about it in the issue tracker.

Cmuratori proves his point by making a kickass project showing that what he talks about is possible and not that complicated. This other guy just shows up yelling at people about it. Idk not a huge fan.

[deleted] · 67 points · Posted at 13:20:10 on July 12, 2021 · (Permalink)

[deleted]

EatMeerkats · 3 points · Posted at 05:49:23 on July 13, 2021 · (Permalink)

He's going to be in for a shock if any potential employer looks up his Github and sees his comments. Even if he were right, nobody wants to hire someone with that kind of attitude.

_tskj_ · -31 points · Posted at 14:08:49 on July 12, 2021 · (Permalink)

I mean then I get it, it sucks living on noodles and seeing people clearly much more incompetent than yourself making six figures for subpar work you could do on the weekends.

delfinom · 20 points · Posted at 17:03:58 on July 12, 2021 · (Permalink)

Krixano is a complete random, not even Casey. He has nothing to show he is more competent.

TheTomato2 · 5 points · Posted at 18:34:26 on July 12, 2021 · (Permalink)

Uh I don't think anyone is on that guy's side here.

gabriel_schneider · 15 points · Posted at 12:12:55 on July 12, 2021 · (Permalink)

Unfortunately the code is intentionally GPLv2 licensed and we‘ll honor this wish entirely. As such no one at Microsoft will ever look at either of the links.

wtf??

hi_im_new_to_this · 57 points · Posted at 12:31:09 on July 12, 2021 · (Permalink)

I don't know what exact policy Microsoft has about this, but if the policy is something like "you cannot even look at GPL-licensed code that does something comparable to what you are working on", that would be a pretty understandable policy for a company like Microsoft. It's one of those things companies do for liability reasons, they can't risk getting sued for copyright infringement.

amakai · 22 points · Posted at 14:05:31 on July 12, 2021 · (Permalink)

I do not believe that MS devs never actually look at GPL code. This is probably a line they write to avoid legal issues and have plausible deniability.

Hacnar · 2 points · Posted at 11:22:29 on July 13, 2021 · (Permalink)

This has been MS policy for years, AFAIK their C++ compiler team couldn't ever look at gcc.

Ardyvee · 68 points · Posted at 12:30:52 on July 12, 2021 · (Permalink)

Due to a license incompatibility (GPLv2 is more restrictive than MIT), you couldn't use refterm's code on the Windows Terminal project. And to avoid liability issues, that means that Microsoft employees can't look at it lest they unknowingly reproduce parts of the code they saw and end up violating the license.

It's why the only proper way to replicate software without permission would be through clean room design.

BUSfromRUS · 22 points · Posted at 12:47:38 on July 12, 2021 · (Permalink)

Microsoft is free to buy a license from Casey.

MdxBhmt · 23 points · Posted at 14:37:15 on July 12, 2021 · (Permalink)

Something went wrong. Try reloading.

Many reloads after and 3 tab reopenings, I managed to see the tweet. Is like twitter UX is enhanced by not wanting to go there.

lithium · 9 points · Posted at 14:59:07 on July 12, 2021 · (Permalink)

Thought I was the only one. Thankfully seeing that fail message every time reminds me that I don't really need to be reading twitter bullshit anyway.

tickettoride98 · 3 points · Posted at 04:47:13 on July 13, 2021 · (Permalink)

On Chrome it nearly always takes me 3 reloads of a linked tweet to actually see it. It's bizarre that Twitter is either unaware, or doesn't care, that it's broken for the most used browser.

Worth_Trust_3825 · 4 points · Posted at 17:14:29 on July 12, 2021 · (Permalink)

It's meant to be like that if you're on mobile device to trick you into getting their shitty electron app.

_tskj_ · 4 points · Posted at 14:10:01 on July 12, 2021 · (Permalink)

I don't know if you're being facetious, but it does seem only fair.

BUSfromRUS · 10 points · Posted at 14:29:02 on July 12, 2021 · (Permalink)

While I don't see it ever happening and I'm pretty sure we'll never hear about any of this ever again, it's a completely reasonable option.

anengineerandacat · -8 points · Posted at 16:37:08 on July 12, 2021 · (Permalink)

It's a mechanism to bait some cash out of a problem that isn't really a problem since the product is in technical preview.

Imagine someone came to you and critiqued some work and then was like "I have a solution but it'll cost you XYZ for the instructions to it and you'll have to do the assembly and modifications yourself".

Except you also can't view the solution blueprints to see if it'll work for your project for fear of being sued for copying / stealing.

nightcracker · 14 points · Posted at 17:20:37 on July 12, 2021 · (Permalink)

Imagine someone came to you and critiqued some work and then was like "I have a solution but it'll cost you XYZ for the instructions to it and you'll have to do the assembly and modifications yourself".

What you described is perfectly normal contracting work. Hell, Casey has given them much more than is typical: a working tech demo prior to any payment. Normally the company hires them based on nothing more than reputation and a vague promise/expectation that their skills can improve the issue.

Except you also can't view the solution blueprints to see if it'll work for your project for fear of being sued for copying / stealing.

That is their narrative. That's not what the GPL says or how it's enforced. It's quite the opposite in fact: Casey lets them view the solution - it's open source! The only thing he doesn't allow is copying them into the proprietary codebase for free.

chucker23n · -8 points · Posted at 22:02:07 on July 12, 2021 · (Permalink)

What you described is perfectly normal contracting work.

No. Contracting is when a client asks a contractor to fix an issue.

This is snake oil salesmanship: the contractor claims the issue exists in the first place, then kindly offers a paid solution.

_tskj_ · 1 points · Posted at 16:43:40 on July 12, 2021 · (Permalink)

I'm perfectly capable of doing my own job thank you very much.

Of course if it wasn't my area of expertise I would consider contracting the expert.

These guys are paid millions to be software engineers, they're capable of doing some engineering. Casey isn't bating them expecting a payout, he's just not willing to give his labour for free to a multi billion dollar company so they can profit off of it.

anengineerandacat · -1 points · Posted at 17:19:17 on July 12, 2021 · (Permalink)

I am just saying it degrades what he is trying to accomplish here; IMHO the first video and his original response was 110% acceptable and really the only appropriate response given that someone on their team considered the change something that warranted a PhD.

The second video... it's whatever, it's cool to see he expanded on his work but it comes off as being an asshole and not very helpful.

As a result, all of this drama occurred and what'll happen is likely nothing that wasn't already going to happen looking over their backlog; it might be the most optimal solution and now thanks to Casey a baseline will be presented but the one that ships is the one who gets to eat.

_tskj_ · 8 points · Posted at 17:54:01 on July 12, 2021 · (Permalink)

There's no way to win if that's your view. Did you watch this video? He just calmly addressed the flaws in his original work which people pointed to and claimed was the reason for his better performance. He was responding to criticism in a constructive way. How is that being an asshole? He could have remained silent, but then they would have declared victory because there was a binary parsing bug, or because the emojis sometimes weren't the correct size or whatever.

anengineerandacat · 1 points · Posted at 18:43:38 on July 12, 2021 · (Permalink)

He could have remained silent, but then they would have declared victory because there was a binary parsing bug, or because the emojis sometimes weren't the correct size or whatever.

Sometimes that is what it takes to be the better man. There isn't a winning or loosing here it's not a game it's just a conversation.

I watched the video to the end, he is highlighting changes to refterm but also constantly back-referencing an "excuse parade" to the point it becomes petty.

The best outcome that could come from all of this is that some optimization issue is prioritized and an announcement is made reflecting the comments from the team and an apology is issued; I highly doubt that organization will be reaching out to Casey for consulting let alone thinking about licensing any of refterm's logic considering they have an entire department available that can optimize DirectWrite itself to suite their needs if push came to shove.

At this point though, I doubt even an apology would occur.

_tskj_ · 7 points · Posted at 18:58:15 on July 12, 2021 · (Permalink)

I don't really think Casey cares about an apology or not, I think he just cares about the end result of not garbage software. That's commendable in a way, he's not demanding an apology because his ego got hurt.

tickettoride98 · -4 points · Posted at 04:54:18 on July 13, 2021 · (Permalink)

Except Casey is either being naive, or an ass, or both in his responses there.

Because I guess a $2 trillion market cap is insufficient for them to pay for a license to a piece of GPLv2 software because they don't want to have to license their own software as GPLv2? It's so insane.

Uh, it's far more insane to change the license of their entire project so they can include some code from a reference renderer implementation, which isn't just some drop-in code for the project. GPLv2 is a viral license, they're not going to deal with the potential cascading effect of that virality for some reference code.

devraj7 · 2 points · Posted at 16:52:21 on July 12, 2021 · (Permalink)

Pretty standard in the industry and the main reason why the GPL is usually banned pretty much everywhere.

KuroSaru · 10 points · Posted at 08:00:54 on July 13, 2021 · (Permalink)

just watched his last twitter rant, 100% with this guy. frankly as a whole globally programming standards and quality of code has just gotten worse. AAA games are a perfect example of horrible code, sadly AAA game dev's have enough issues with the stupid deadlines they have to meet so I don't blame them for just getting X to work.

jagt · 27 points · Posted at 13:26:39 on July 12, 2021 · (Permalink)

I agree with all casey's points. But there's only one thing that I'd like to point out is that enterprise software development is really different: there're just too many factors affecting the final product, and IMO it's a very real problem that is extremely difficult to solve.

bendmorris · 12 points · Posted at 19:16:44 on July 12, 2021 · (Permalink)

Exactly this. If you're in a big organization like this, it's one thing to be the person who cares about performance and know you could do a lot better if you wrote it yourself with no constraints. But it's quite another to have the political capital to actually make it happen, even if technically it's not all that hard.

_Bjarke_ · 9 points · Posted at 22:16:31 on July 12, 2021 · (Permalink)*

Jesus. How many times must it be said? Almost zero optimization efforts have been put into the code, except for the pipe stuff and caching... Why do you guys not understand that this was a minimally simple version with no optimization efforts put into the code itself at all! Casey is not even a "performance person"!

bendmorris · 8 points · Posted at 00:26:34 on July 13, 2021 · (Permalink)

I do understand that. I don't think you understand the comment you're replying to though.

_Bjarke_ · 6 points · Posted at 00:59:48 on July 13, 2021 · (Permalink)

You are right, I did not! Sorry about that.

bendmorris · 7 points · Posted at 01:25:17 on July 13, 2021 · (Permalink)

No worries!

No question that Casey's point on this not being that hard a problem technically is true, and the excuses are just excuses. But inside Microsoft you have people who are incentivized to act like experts when they may not be (the devs don't seem to know much about graphics, and are literally writing a terminal renderer?) and keep making incremental changes that they spin as important improvements. There might not be someone on the team who really knows what they are doing, and even if there was, they might not be able to convince everyone to let them do things their way, as it wouldn't reflect well on everyone else. Just an unfortunate reality of being part of corporate dev teams and dealing with people and egos.

_Bjarke_ · 3 points · Posted at 22:33:40 on July 12, 2021 · (Permalink)

there're just too many factors affecting the final product

Could you mention a few?

_tskj_ · 18 points · Posted at 14:11:25 on July 12, 2021 · (Permalink)

I mean, just don't call it enterprise development then? Call it lean agile kanban development.

[deleted] · 1 points · Posted at 22:11:51 on July 12, 2021 · (Permalink)

Sounds like an excuse. I'll need sources

At work I was on an 11 million line codebase. I rather work on that then unreal engine

_Bjarke_ · 0 points · Posted at 22:12:40 on July 12, 2021 · (Permalink)

What problems exactly are extremely difficult to solve? What do you do think that justifies? And why would it justify that?

flight212121 · 6 points · Posted at 13:05:41 on July 12, 2021 · (Permalink)

How (fast) is the mac terminal compared to Windows’?

lookatmetype · 34 points · Posted at 13:50:41 on July 12, 2021 · (Permalink)

All the default terminals are around the same ballpark. Kitty and Alacritty are way faster than all of them, and refterm is way faster than these two still.

TheTomato2 · 18 points · Posted at 18:53:18 on July 12, 2021 · (Permalink)

Windows is definitely slower than linux terminals.

alibix · 3 points · Posted at 22:35:15 on July 12, 2021 · (Permalink)

Are there benchmarks for refterm against alacritty and kitty?

wisam910 · 5 points · Posted at 02:01:22 on July 13, 2021 · (Permalink)

Yes, before refterm was implemented, there was termbench.

FYI alacritty crashes on it.

https://github.com/cmuratori/termbench

wisam910 · 6 points · Posted at 05:24:53 on July 13, 2021 · (Permalink)

Kitty does not run any faster than the macos terminal.

It doesn't even render Arabic at all! Not even disjointed. It just renders question marks.

seamsay · 7 points · Posted at 19:31:40 on July 12, 2021 · (Permalink)

and refterm is way faster than these two still.

Really?! Any idea why? It's really surprising to me that this guy can outperform two terminals that are specifically designed to be fast in just a weekend, did he think of some new trick that no-one else has thought of before or something?

lookatmetype · 22 points · Posted at 21:54:36 on July 12, 2021 · (Permalink)

Casey's code style is to typically use zero dependencies, use datastructures that solve the problem AT HAND, not some generic problem, use extremely simple C++ constructs, and write code that is easy to maintain and modify. Another big thing I've noticed in his code is that he almost never worries about memory allocation because he always allocates up front and manages memory at a very high level.

Mike Acton describes this style of programming as "Data-oriented design": https://www.youtube.com/watch?v=rX0ItVEVjHc

You can get very fast code, very quickly using this methodology.

Unfortunately it requires unlearning a lot of orthodoxies about how to do "professional" software engineering (Object Oriented Enterprise Grade Programming, for example). He made the Handmade Hero series on Youtube in which he uses this style of programming to make a game engine.

wisam910 · 7 points · Posted at 05:26:03 on July 13, 2021 · (Permalink)

He doesn't start with faulty assumptions.

The only trick is he uses an LRU cache for glyphs.

That's basically it.

seamsay · 2 points · Posted at 07:02:36 on July 13, 2021 · (Permalink)

What are the faulty assumptions that kitty and alacritty use?

wisam910 · 3 points · Posted at 07:51:36 on July 13, 2021 · (Permalink)

I don't know, but they clearly have some wrong assumptions, otherwise they would have achieved something much better.

gredr · -4 points · Posted at 21:48:42 on July 12, 2021 · (Permalink)

I don't know why, but one thing to remember is that "refterm2" isn't actually a terminal. There's a warning right there, if you try to use it you're going to have a bad day.

It's possible that he's produced a wicked-fast tech demo that was optimized for the specific use cases he's demonstrating, and that adding in all the bits that support the weirdo edge cases that inevitably come into play (especially when you're playing the compatibility long game like MS does), it'll settle into something closer to other high-performance terminals.

I don't know that this is true, maybe he's operating on a whole other level, but it's possible.

jonathrg · 11 points · Posted at 22:47:34 on July 12, 2021 · (Permalink)

Did you look at the videos? The number of times he emphasized and demonstrated how unoptimized it is is very large

gredr · -7 points · Posted at 23:37:02 on July 12, 2021 · (Permalink)

So you're saying that he is operating on a whole other level? He's a terminal developer the likes of which the world has never seen?

I'm not saying he is or he isn't; I didn't make it very far into either of his videos. I'm just offering possibilities as to why refterm2 is so much faster than other ostensibly "optimized for speed" terminals.

KillianDrake · 6 points · Posted at 00:40:47 on July 13, 2021 · (Permalink)

To be honest, being a "terminal developer" is not a glamorous position all the best programmers in the world strive to. So it's quite obvious that it's going to be some random devs on such a team. And this is just maybe bad luck on their part that one of those "best programmers" got annoyed enough to look into if terminals can't be faster and I'm not surprised such a programmer figured out very quickly that they can be.

But I'm just disappointed those programmers that work on Terminal didn't take this as a learning moment, stayed humble and tried to see what was worth implementing or at least put forth a more technical (or even political) rationale for why it might not be as easy for them - instead of dismissing it out of hand without even looking at it.

jonathrg · 3 points · Posted at 02:11:35 on July 13, 2021 · (Permalink)

I'm not saying any of what you're suggesting, I just repeated one of the key points of the videos, and frankly I'm not interested in elaborating those points for you just because can't be bothered to watch the videos yourself.

wisam910 · 9 points · Posted at 02:00:15 on July 13, 2021 · (Permalink)

This video demonstrates that this excuse is false.

If you bothered to watch it.

Some context:

This is version two, which makes this a two-weekends project.

Version 2 performs better than version 1, AND it has more features.

So this idea that "if you add features it will get slow" is just an excuse.

The reason you can't use this as a terminal has nothing to do with rendering speed.

Terminals have to do things like, parse command line arguments, pipe input/output of processes, parse batch files, etc, which this program does not do.

What this program does is the rendering component.

No matter what features you add to the terminal, it will have no bearing on the rendering.

I mean, this terminal has features that Windows Terminal does not have, such as correctly laying out Arabic text with diacritical marks.

Windows terminal DOES NOT have this feature. Its rendering of Arabic is abysmal.

fafok29 · 1 points · Posted at 11:09:41 on July 18, 2021 · (Permalink)

I think what u/gredr meant is that this is terminal RENDERER and not fully capable terminal, so I think you will be unable to run something like vim.
But I don't agree that adding all required features to make it fully capable will drastically reduce performance.

salbris · -16 points · Posted at 16:57:14 on July 12, 2021 · (Permalink)

refterm is way faster than these two still.

And yet apparently there are "no optimizations" in the code. Ya right...

tech6hutch · 24 points · Posted at 18:04:53 on July 12, 2021 · (Permalink)

I think, by no optimizations, he means beyond the different structural decisions. He hasn’t attempted to squeeze performance out of that structure.

salbris · -13 points · Posted at 18:16:38 on July 12, 2021 · (Permalink)

That's like saying a Space X rocket has no innovation because it "has different structural decisions" involved in making it.

Optimization is everything that makes the thing faster. Whether that's a layman looking up a tutorial on Youtube, a thorough analysis using a profiler, or an expert using techniques he's learned in his lengthy career.

Hell, if we throw aside semantics we can easily say that Casey is writing "more optimal" code "without even trying to" because it's second nature to him.

_bloat_ · 20 points · Posted at 19:42:55 on July 12, 2021 · (Permalink)

Optimization is everything that makes the thing faster.

By that logic every program is optimized greatly, because there's always a less efficient way of doing things. Then calling software optimized has no meaning at all.

ontheworld · 2 points · Posted at 20:30:06 on July 12, 2021 · (Permalink)

I wonder if my boss will let me get away with calling my code optimized because I'm not using bogosort...

salbris · -3 points · Posted at 20:00:27 on July 12, 2021 · (Permalink)

Well then what does it mean? If we take it to mean using a profiler then that's a highly restrictive definition. How about all the optimizations done without a profiler?

_bloat_ · 2 points · Posted at 20:32:43 on July 12, 2021 · (Permalink)

I'd say an optimization always refers to a previous state, which gets improved in one way or another. Hence by that definition the first iteration of a piece of code can't be optimized, because there's no prior version of it, and an alteration of that code can only be called an optimization if it's actually improving it in terms of cpu/gpu/ram/... usage, which kind of depends on measuring/profiling.

salbris · -1 points · Posted at 20:50:23 on July 12, 2021 · (Permalink)

Can't you see how useless that is of a descriptor here? A program without "optimizations" can be either slow or fast depending on the original author.

_bloat_ · 2 points · Posted at 04:42:38 on July 13, 2021 · (Permalink)

I don't see that as an issue in the definition. All I expect from optimized code is that it is faster or less resource intensive than its former versions. But I don't expect it to be fast in absolute terms.

But of course, if you have a better definition I'm all ears.

salbris · 1 points · Posted at 13:41:34 on July 13, 2021 · (Permalink)

But that's the problem the baseline for the "optimization" is highly variable. Unoptimized code from Casey could be 100x faster than my optimized code.

_bloat_ · 1 points · Posted at 15:47:07 on July 13, 2021 · (Permalink)

But that's the problem the baseline for the "optimization" is highly variable. Unoptimized code from Casey could be 100x faster than my optimized code.

I don't see that as a problem. "XYZ was optimized" is not supposed to tell me anything about the absolute performance of the code, only that XYZ improved relatively to its former state. So when Casey says his code is not optimized it only means, he never attempted to write the most efficient code he's capable of, so there's likely a lot of room for optimizations.

It's like in school, when one one student only needed to attended class and still performed better in exams than their classmate who spend dozens of extra hours learning. In that scenario one student attempted to optimize their grades, while the other didn't and still got better results.

salbris · 1 points · Posted at 16:22:36 on July 13, 2021 · (Permalink)

So when Casey says his code is not optimized it only means, he never attempted to write the most efficient code he's capable of, so there's likely a lot of room for optimizations.

Let's be fair he means "I didn't even try and it's fast". But the point he's making by saying that is wrong because that's like an architecture saying "I just made the building the way I know how". In other words it's fast because he's a skilled and experienced engineer not because the problem is "trivially easy".

lookatmetype · 8 points · Posted at 19:45:57 on July 12, 2021 · (Permalink)

Hell, if we throw aside semantics we can easily say that Casey is writing "more optimal" code "without even trying to" because it's second nature to him.

That's exactly what's happening here. And he's posted over 1000 hours of Youtube video to show how you can do the same.

7sidedmarble · 0 points · Posted at 13:47:45 on July 13, 2021 · (Permalink)

I think it does bare saying that there is a gulf of time and work investments in doing most or the VT escape sequences, and doing all or enough to actually render complex curses-like programs like Vim, Emacs, htop, etc. It's pretty easy to implement the basics. It's really hard to make sure that some of those programs run correctly.

zadjii · 9 points · Posted at 16:12:59 on July 12, 2021 · (Permalink)

I'm just shocked that this miscommunication in a single thread has led to a months-long flamewar. It's reflected incredibly poorly on everyone involved in my opinion. There's definitely some interesting ideas here, but there are more constructive ways of having this discussion.

graepphone · 12 points · Posted at 03:49:33 on July 13, 2021 · (Permalink)

Has it actually reflected poorly on everyone?

I know you'd like to believe that Casey is coming off just as bad as the terminal team but perhaps you should sit down and actually assess what has happened as a result instead of minimising your own culpability.

qWx75D3obVYEzmD · 3 points · Posted at 22:53:25 on July 13, 2021 · (Permalink)

perhaps you should sit down instead of minimising your own culpability

wow, perfect example. I couldn't think of something this condescending if i tried.

delfinom · -23 points · Posted at 17:06:16 on July 12, 2021 · (Permalink)

The best part is, the flame war is really some ego cult regurgitating their own jizz. The other side (Microsoft) is literally saying nothing other than continuing work as normal.

7sidedmarble · 2 points · Posted at 13:33:22 on July 13, 2021 · (Permalink)

Why does someone like Casey even use windows? I've met a lot of other incredibly smart developers out there the exact same.

Windows didn't even have a terminal that I would call functional in any respect until very recently. WSL is also extremely recent. I would say you can scrape by on windows today, if you have to. But for the life of me I don't know why you pick it. But then again, I work on servers that will run on Linux, and he works on games that will mostly run on windows. So maybe there's some convenience there I don't know.

_Bjarke_ · 6 points · Posted at 18:29:08 on July 13, 2021 · (Permalink)

There are no good options. Windows / Links / Mac doesn't matter, you can list hundreds of reasons why each one of them would be a dealbreaker. In the end, it all boils down to hardware manufacturers. They've made making operating systems incredibly complicated, that there's very little innovation in making them. 3 major operating systems + a couple of toy ones, is not a big sample size. And each of them has years and years of technical debt.

Back in the days, every time you had to make a game, you had to make your own operating system, and thousands of developers wrote operating systems! It was normal, and it wasn't that hard either.

If you're interested in this problem, check out The Thirty Million Line Problem https://www.youtube.com/watch?v=kZRE7HIO3vk

Also by Casey incidentally.

CT_DIY · 2 points · Posted at 00:25:24 on July 14, 2021 · (Permalink)

I think its simpler really. Hes a game developer the overwhelming majority of gamers game on windows not linux.

TooManyLines · 1 points · Posted at 01:52:03 on July 14, 2021 · (Permalink)

https://twitter.com/cmuratori/status/636069066021597184?lang=en

Also linux doesn't have a good debugger. No gdb is not a good debugger. No visual studio is also not good, but still better. Remedybg is the best one out there and windows only.

ve1h0 · -2 points · Posted at 16:18:18 on July 12, 2021 · (Permalink)

Maan, this feels like beating a dead horse at this point. It is interesting and insightful. Keep it up!

_Bjarke_ · 3 points · Posted at 22:23:11 on July 12, 2021 · (Permalink)

Wait... what!? xD

ItsAGallimimus · -47 points · Posted at 14:09:13 on July 12, 2021 · (Permalink)

All of this effort spent on a terminal that isn't even for a good operating system. But it is entertaining and educational so that's cool, I guess

lookatmetype · 30 points · Posted at 15:28:01 on July 12, 2021 · (Permalink)

The core algorithm (glyph caching + GLSL shader) is OS agnostic and written in a portable language (C). Anyone can take that code, use freetype or whatever instead of DirectWrite and make their own terminal out of it.

lithium · 27 points · Posted at 15:00:47 on July 12, 2021 · (Permalink)

DAE LINUX GUYS?

UltimaN3rd · 10 points · Posted at 20:34:52 on July 12, 2021 · (Permalink)

I use arch btw

stuaxo · 1 points · Posted at 21:37:28 on July 13, 2021 · (Permalink)

I'm so glad this exists, it's been long long years of terminals being pants on Windows, and this will change the future default to being snappy and standards compliant, what's not to like ?

grooomps · -36 points · Posted at 15:07:48 on July 12, 2021 · (Permalink)

i bet the ms devs on github are laughing now
he's just doing their work for him for free at this point

oscooter · 7 points · Posted at 23:54:48 on July 12, 2021 · (Permalink)*

Nope. He’s licensed it with GPLv2 so MS can’t use it. He said he’d be open to doing it for Microsoft if they paid him for it but obviously not gonna happen. And a MS dev already has a pull request up implementing one of the major functionalities.

awson · 1 points · Posted at 08:44:25 on July 13, 2021 · (Permalink)

Which PR it is? I can't find any.

oscooter · 1 points · Posted at 11:40:15 on July 13, 2021 · (Permalink)

Ah I was mistaken. It’s not a pr yet, just an issue that’s currently being worked

wisam910 · 2 points · Posted at 02:03:00 on July 13, 2021 · (Permalink)

refterm is licensed under GPLv2 which means the Microsoft guys are not allowed to even read it for educational purposes. They have to purchase a separate license from him if they want to use it or even just look at it.

grooomps · 3 points · Posted at 02:34:25 on July 13, 2021 · (Permalink)

ok that's actually 10x more hilarious then!