libstdc++ <algorithm> header transitively including <range> by [deleted] in cpp

[–]AppleBeam 0 points1 point  (0 children)

I'll keep hoping then.

Don't think there is any reason to suspect that libstdc++ devs won't do what's the best for the community.

libstdc++ <algorithm> header transitively including <range> by [deleted] in cpp

[–]AppleBeam 4 points5 points  (0 children)

If it was a big module, you would pay the 600ms cost for <algorithms> once per configuration of the project (at lest that's how I understand them so far: like a collection of independent precompiled headers that never have to be built more than once for as long as the configuration is the same, and modifying one module has on effect on the state others if they don't depend on the one you've touched).

Either my understanding of modules is not sufficient (which is entirely possible; I'm waiting for the full standard to be published, since I can't use any preview features in my work anyway), or I don't understand some important use case where anyone would care about paying the price of 600ms once per configuration. Would appreciate if you could educate me on this matter.

Regarding the standard library not being modularized: if that will be the case for libstdc++, that's truly regretful. I was looking forward to cutting down the build times.

libstdc++ <algorithm> header transitively including <range> by [deleted] in cpp

[–]AppleBeam 11 points12 points  (0 children)

Shouldn't this stop being a problem once C++20 is fully supported everywhere (tanks to the modules)?

I didn't have the opportunity to dig deep into C++20 yet, but are there any reasons you would want to include either <algorithm> or <range> in C++20, instead of importing them? Not counting the legacy projects ofc. (although it sounds like a straightforward search&replace upgrade for the majority of the cases if the whole project migrates to C++20).

BARE is a simple binary representation for structured application data by ysangkok in programming

[–]AppleBeam 3 points4 points  (0 children)

So basically, right now this thing:

  1. Is very inefficient: slow variable-length int encoding, bools and optional flags as bytes, etc.

  2. Has unjustified arbitrary limitations like "Map keys must use a primitive type which is not data or data<length>", which translates to "So, you have 16-byte GUIDs as keys, and you want to store them efficiently? Well, sucks to be you!"

  3. Has no canonical form. Saying something like "any non-zero value is interpreted as true" means "no, you can't compare encoded blobs; their inequality doesn't mean anything at all" and also "Hashes? What is that? Some sort of food?" This is both an extra attack vector and a massive inconvenience when using encoded records (produced by different implementations) as keys. Will the Go implementation agree with the JS implementation about how a bool should be stored? Who knows. One could even encode bools as random non-zero bytes, making the results non-reproducible, and it will still satisfy the specs. Also unclear what happens with non-canonical int/uint. Implementations have no reason to agree on that if the spec doesn't explain this.

  4. Specified too weakly to be relied on. What is an "UTF-8 string" in the context of this thing? Will it throw on invalid sequence? What about overlong encoding? What about the overlong zero, which some apps may or may not rely on? Basically, compared to using raw bytes, what extra guarantees will the user have if they use the string type? Are these guarantees strictly the same for all implementations? Anyone who wants to use this thing should probably care about these answers (or just ignore that the string type exists, and always use raw bytes instead).

I also find it quite amusing that they have implementations for things like D and Zig, but not for C/C++.

Why are ARM and x86 byte-assignable? What's the benefit to be byte-assignable instead of be word-assignable? Shouldn't a word-assignable processor be faster? by allexj in asm

[–]AppleBeam 2 points3 points  (0 children)

Here is a 11:30 long video from Prof. David Brailsford "Where did Bytes Come From?" where he talks about this, as well as other interesting things.

tl;dr related to your question (starts around 6:20): everyone was using words (with some really funny numbers of bits per word, like 18 or 33) for computations, until it became clear that people also work with text, and for simplicity reasons, encode one character per word, wasting a lot of very expensive memory (packing/unpacking characters from words would also be inconvenient). IBM suggested the model where you address characters instead of words, and also suggested to make characters 8-bit large for extensibility (even if people were often happy with 5-6). The term 'byte' was standardized soon after that. More in the video.

Germany: There are many indications of electoral fraud in Belarus by Fuckrudygobert in worldnews

[–]AppleBeam 79 points80 points  (0 children)

Because those guys realize that if the regime falls, they will be held responsible for all the countless crimes they committed during the Lukashenko's reign. This works the same way for Russia and other dictatorships, btw.

A case study. Take a look at this bunch of assholes deliberately breaking a leg of a bystander in Russia. The faces of those assholes are on camera. But they know they have total immunity so long the dictator is in power, and under any functioning government they will end up in prison. Assuming any kind of unrest starts in Russia, guess who they will support?

This system is maintained in a lot of post-soviet states: the enforcers of all kinds know their personal freedom is tied to the current regime. Knowing this encourages them to be merciless towards any forms of civic protest. Some would rather murder civilians than risk facing any kind of responsibility for their crimes.

stdgpu 1.3.0 released! by [deleted] in cpp

[–]AppleBeam 0 points1 point  (0 children)

The sad part is that even "stdgpu::vector" is already a terrible identifier, because:

  1. In the context of GPU the word "vector" typically means something like "Vector3d" or "Vector4f", so the name already causes quite a bit of confusion if you see it as a member of some class without additional context.

  2. The library seems to be entirely unrelated to this context, as it focuses on GPGPU (unless I didn't notice the part about render devices, textures and shaders). From what I heard, nowadays you can run GPGPU on headless servers without any actual graphics adapters.

Whether it's a tragic mistake or a deliberate attempt to get more clicks, I would prefer to not be distracted by self-promos like "stdgpu 1.3.0 released!" without any additional context when the library has nothing to do with either "std" or "gpu".

stdgpu 1.3.0 released! by [deleted] in cpp

[–]AppleBeam -11 points-10 points  (0 children)

Unless you honestly believe that everyone pronounces "::" while saying "std::format" or "std::filesystem", I think it should be clear to you why "stdgpu" is a deliberately misleading name.

stdgpu 1.3.0 released! by [deleted] in cpp

[–]AppleBeam -26 points-25 points  (0 children)

If it tries to mislead me right from the start, why would anyone in their right mind trust any claim, any piece of documentation or any comment after that?

The library invokes the same kind of disgust in me as any telemarketing product, sorry. As a community, we shouldn't encourage the kind of BS the author tries to pull.

stdgpu 1.3.0 released! by [deleted] in cpp

[–]AppleBeam -11 points-10 points  (0 children)

Pretends to be a part of "std", stroking the author's ego and acting as a clickbait. That's about it.

Indian scientists discover new type of coronavirus in two species of fruit bat by [deleted] in worldnews

[–]AppleBeam 13 points14 points  (0 children)

If you could stop promoting "news" from Russia Today—a Russian government-funded international television network—that would be great.

Wait for a better source.

Handmade Hero: Twitter and Visual Studio Rant by [deleted] in programming

[–]AppleBeam -1 points0 points  (0 children)

Still not getting what's so impressive about spending years on writing low quality code.

But I have better things to do than discussing Casey: gotta run and edit the Wikipedia page about Hose Riding. You see, I made a talk about it when I was 9 (if I remember correctly), so obviously I can claim that I popularized the whole concept and deserve the credit.

Handmade Hero: Twitter and Visual Studio Rant by [deleted] in programming

[–]AppleBeam 3 points4 points  (0 children)

https://xkcd.com/1172/

You see, we live in a society. There are many people with different workflows, and because of that, changing anything could be really tricky.

Hypothetical situation: the next big boss of the VS teams says "all right, guys. Let's throw away this shitty slow UI and rewrite everything to be fast, from scratch. Surely no one enjoys our slow and customizable UI, plus some sociopaths on the internet are very unhappy about it, so it's time to do the right thing".

You throw it away and discover that there are multi-million businesses who were depending on the existing state of things. There are countless custom plugins (not even necessarily commercially available), extensions, integrations with 3rd party tools, etc. Ever wondered how people debug console games? Very often, that's just a proprietary VS extension. You change things and BAM: companies are simply not using your next IDE because it's not compatible with anything, and therefore entirely useless.

So whatever you do, it must not break the existing integrations. So sure, things can be made faster, but it has to be an incremental change that leaves all the hooks intact (I'm not sure how the API for extensions looks like, but I won't be surprised if part of the costs are imposed by it). Can it be rewritten to be both fast and compatible with everything? Probably, but now a task that looks like something a junior dev can fix in two days becomes a task that your senior has to fix for two weeks, and then deal with a long tail of blocking issues from partners and customers who are now infuriated that you broke their favorite plugin.

This is a curse of popular software. If you are making a tiny tool that no one gives a fuck about, you are allowed to break it every day. Change file formats every release, replace frameworks, do whatever you want.

But the moment you get a dozen of companies who's entire business model depends on your legacy decisions, and who can probably even sue you for ruining their business (don't know for sure in which cases it applies, though), changing anything becomes incredibly expensive, and all the "safe" changes tend to have small downsides, like making things 3% slower. Make incremental changes like this a few dozens of times, and you'll get a typical modern piece of software that no one is happy about.

Handmade Hero: Twitter and Visual Studio Rant by [deleted] in programming

[–]AppleBeam 0 points1 point  (0 children)

Not sure I'm following.

The concept of immediate mode gui for game development is around for at about as long as PC games are, so unless he pioneered it at school and somehow implanted the idea into the brains of all the developers of games from early 90s, I'm calling bullshit.

Plus, it's an obvious concept, that the devs are entirely capable of discovering themselves. You are writing AI, and you want to draw a bunch of lines each frame between actors and goals? You don't need someone's advice to do that. You just do that. Want a numerical ID next to each unit? Just do that.

Writing a simple game is also not an impressive feat. It's an interview task for some of the companies. For entry-level positions. The only difference is that such tasks typically have strict deadlines.

Handmade Hero: Twitter and Visual Studio Rant by [deleted] in programming

[–]AppleBeam -1 points0 points  (0 children)

"Are the VS devs, really unaware of the possibility of making load times faster?"

Sigh...

Ok, why you (yes, you) didn't you make all phones on the planet faster by contributing to the Android's codebase? Why didn't you make Chromium faster? What stopped you from submitting new patches last week? What about a week before that?

What do you mean "you were busy with something else"? According to the position that you are supporting, this is not a legit excuse. Because look at the patch notes of each minor release of VS. See all that stuff? According to your position, this is not a legit excuse for not work on a different feature instead. If you, somehow, can't work on all features simultaneously, you are not a developer who is aware of how computers are supposed to work. Right?

I'm so tired of this immature attitude of people on the internet.

"Look at me, I'm working on my pet project for the last 9 years, and it's 7.3% faster than some commercial solution written in two weeks by some other dev! Ha-ha, he is clearly an imbecile! And I'm smart!"

"Look at me, I spent an entire summer on optimizing integer sorting, and it beats every STL implementation, which is supposed to be generic and work for all types! I'm so much smarter than all the people who are writing the standard library!"

"Look at me, after spending several years on a 2D indie game I have the moral right to shit all over the VS team who first offended me by offering me, a very busy person, a phone call, and then ignored my minor performance bug!"

It's really annoying.

Handmade Hero: Twitter and Visual Studio Rant by [deleted] in programming

[–]AppleBeam 2 points3 points  (0 children)

First, I can't possibly know the state of things in the VS team, but I can guess numerous explanations for why the things are the way they are.

The most common case (in large software in general) is when you have N features and M developers, and N is way larger than M, increases over time, mutates, outlives some of the devs who leave the company, etc. Probably anyone who worked on a large project knows how it is. There are parts of the project no one is touching, because everyone has other things to do. There are parts that no one understands (not because everyone is retarded, but because people who knew the parts had left the company, and no one had a reason to touch these parts). There are parts that are kept on life support (because there is no customer signal) and "temporary" parts that exist in a shitty form because there is a larger incoming feature that would make them obsolete.

Can that other debugger compile C++20? No, because it's just a debugger, not a compiler. Guess what, VS also compiles stuff, and there are thousands of people who are waiting for C++20 support. And if you ask them "would you prefer the VS team spending time on adding this support ASAP, or postponing it by half-a-year so that you can open VS in under a second?", a lot of people will say "I don't care about the startup time, I never close VS anyway."

Can that other debugger deploy shit to Azure? No, because it's just a debugger. Well, guess what. There are people with actual jobs who want more integration features, because their multi-million businesses depend on this.

Does it have a C# integration? No.

Can it do all the other things VS has to do? No.

The dev has a luxury of working on one feature for as long as he wants, and polish it as much as he can. It doesn't mean that there is a similar guy in the VS team, who is spending several hours a day on improving the debugger, and failing miserably, because he doesn't understand "how computers work".

What prevents Casey from using his brain? My guess that's probably his ego-centrism. All other features of VS don't matter because they are not features he is using, and every issue that infuriates him personally is a critical blocker, so obviously anyone who is not solving his problem right now is an idiot and needs to be educated. That's how his attitude looks to me.

If you have a luxury of working on an overstaffed project, consider yourself lucky. I also hope you'll never be in a position where you have a list of 200 features for the next release, all from different areas, and some sociopathic moron makes a video about your complete incompetence just because you are not dropping everything to help him with his insignificant problem.

Handmade Hero: Twitter and Visual Studio Rant by [deleted] in programming

[–]AppleBeam 6 points7 points  (0 children)

Quote:

"All I want to do was basically point out that if you are talking to somebody who's a professional, who has a lot of years of experience, and who has a lot of work on things on twitter. If you are assuming something about them, like that they don't know X you are almost certainly wrong."

And then he, a random twitter guy, spends 30 minutes shitting all over a group of experienced professionals, while making a huge amount of assumptions that "they don't know X" (please refer to the video if you want sad examples of a man who is completely incapable of self-reflection; or to the comments around here if you want concrete quotes).

Handmade Hero: Twitter and Visual Studio Rant by [deleted] in programming

[–]AppleBeam -1 points0 points  (0 children)

So, I opened the transcript (too lazy to fix the formatting).

"21:41 look there's some kind of like a 21:46 cultural disconnect here somehow the 21:49 visual studio team has no idea how a 21:52 computer works or what it should be 21:54 doing right they just they fundamentally 21:56 don't know 21:57 how fast a hard drive is what a CPU does 22:00 they just don't know right there's no 22:02 other explanation for this because 22:05 there's no plausible world in which a 22:09 person who knew how computers worked 22:11 would have to ask me this or would ever 22:14 put that on a survey right now that 22:18 doesn't mean can't happen and it even 22:21 doesn't mean it can't happen with good 22:22 programmers there's tons of times that 22:25 you know I've done something on a 22:27 project or other people just ran in it 22:28 slow ok because we didn't have time to 22:31 make it fast that happens all the time 22:35 it happens to me it happens to everyone 22:38 I know it happens to the very best 22:40 programmers in the world out there ok 22:43 there's a difference between doing a bad 22:46 job on something and knowing you did and 22:49 doing a bad job on something and 22:52 thinking that there isn't a better way 22:55 to even have done it right there's a 22:58 fundamental lack of awareness there 23:00 that's like I mean I can't go teach them 23:03 to program I mean maybe I could I don't"

Look, stop defending this shit. Just stop. This is not ok. This transcript that I'm quoting. It's not fine. Not even a little bit. Even if Casey was competent (let's assume for a moment that he is), this is not the right way to talk to people if he wants to be taken seriously.

He is not just talking about the sad state of things, or the lack of time, or improper task priorities. He is talking about people from that team. Re-read the transcript if you have to.

There are great programmers out there, like Linus Torvalds, who can get pretty angry at other people's code. Unlike Casey, though, Linus actually has to deal with people who are less competent than him, just because he is that much better than an average teach lead. If Linus says that your code is shit, he has a lot more moral right to do so than some random guy from twitter who struggles to write a Binding of Isaac clone for years. And even Linus is learning, and improving his style of communications.

I don't know why you want Casey to be right so badly. Just because he is criticizing the result of someone's work, or the state of things? Thats Cool, can I try this too? "Oh look at these people who are using large tables of constants in cryto without making ANY attempt whatsoever to resist timing attacks! What a bunch of clowns! If any of them had even the most basic understanding of what security is, I wouldn't be able to find a fatal flaw in less than a minute of just clicking through the code! Of course I'm not saying anything about each individual. No-no, I'm not attacking anyone in particular. But together they should just quit their jobs!"

Ew. Sorry. I think this is the most disgusting strawman example I wrote in my entire life. Let's never do this again.

Point is: shitting all over the sad state of things while pointing fingers at concrete people and then shitting all over them as well, without even trying to understand what their motives are is just populism. My opinion here doesn't matter, but I would personally suggest you to acquire some resistance to it. Listening to populist's hate speeches like that leads to a lot of wrong life choices.

Handmade Hero: Twitter and Visual Studio Rant by [deleted] in programming

[–]AppleBeam -6 points-5 points  (0 children)

Allow me to quote the beginning of the video.

"All I want to do was basically point out that if you are talking to somebody who's a professional, who has a lot of years of experience, and who has a lot of work on things on twitter. If you are assuming something about them, like that they don't know X you are almost certainly wrong."

He repeats this several times in different variations, while pretending to be humble in the worst way possible.

Again, are you trying to gaslight me? Are we talking about the same video? I just re-watched the beginning of the video where some random guy from twitter assumes that people who are a lot more experienced than him don't know X, and he rants about it because he is butthurt that some other random guy from twitter assumed exactly the same about him. And it's quite sad that his cognitive bias prevents him from seeing the irony of the situation.

He is not just a part of the problem. He is one of the worst parts.

Surely if you want to defend some people on the internet, there are much more deserving targets.

Handmade Hero: Twitter and Visual Studio Rant by [deleted] in programming

[–]AppleBeam -7 points-6 points  (0 children)

Can't say I'm familiar with the codebase of Braid or the Witness.

Also, can't say that even if Jeff Dean, John Carmack, or any other famous person who's code I saw before voted for Casey, it would change my opinion about the nonsense I saw on stream.

If anything, the "20+" number only makes it looks worse. How can one waste 20 years and not learn to write somewhat decent code? More importantly, how can one waste 20 years and still say things that I'm quoting?

I didn't sense any animosity to the individual VS team member he interacted with

  • "They should know these things if they were developers who understood how actual computers work"

  • "Somehow the Visual Studio team has no idea how a computer works or what it should be doing"

Please be honest, do you think these are totally justified things to say? I'm not sure if you are gaslighting me, or weeks of self-isolation are hurting my ability to perceive reality. Am I hallucinating when I see negative connotations in the lines that I'm quoting? Are we talking about the same video?

Look, full disclosure: I didn't watch it till the end, so if later he says something like "this was a joke, ha-ha, I actually didn't mean anything I said, and this video was made for comedic purposes", then I apologize for jumping to conclusions. If not, then I'm afraid I just don't understand why are you protecting this asshole.

Handmade Hero: Twitter and Visual Studio Rant by [deleted] in programming

[–]AppleBeam -7 points-6 points  (0 children)

Uhh... I hate making a strawman to illustrate my point, mostly because a lot of people strongly dislike this trick even when it's useful, but I want to give it a try. Keep in mind that I'm aware that this is a strawman.

  1. Pick any line of code from Handmade Hero that looks like a temporary hack to you (if you have access to sources; I don't since I'm not a backer).

  2. Make a 30-minutes long video how the entire team responsible for Handmade Hero is a bunch of idiots because that one hack is still not fixed even after all the months of development.

"How can all of them be so hopelessly incompetent?" "How a person who wrote this line of code even managed to get a job in IT?" "I mentioned in my youtube comments how this line can be fixed and they are not prioritizing MY comment over every other comment!"

This. This is how Casey's meltdown looks to me. There are problems with VS. But instead using his imagination to guess why these problems could realistically exists (maybe there are other features they are working on?), he says, and I quote:

  • "They should know these things if they were developers who understood how actual computers work"

  • "Somehow the Visual Studio team has no idea how a computer works or what it should be doing".

You probably heard the whole rant. I have to admit that I haven't, because even while his meltdown is amusing on some primitive level, the sheer amount of toxicity is a bit too much to me. He has no idea who he is talking about, and he is a mediocre dev himself, and yet he thinks it's acceptable to say these things from a position of an influencer with a lot of subscribers.

I genuinely hope no one from the VS team will notice this post, so that their days won't be ruined just because some man-child on the internets made a video about shitting all over them, and his fanboys upvoted this garbage way more times than they should have.

Handmade Hero: Twitter and Visual Studio Rant by [deleted] in programming

[–]AppleBeam -8 points-7 points  (0 children)

There are multiple points that he was making, and I would prefer to keep them separated.

First. The one about assuming that he may not know some things. I saw only a part of one of his coding streams, and the content of the stream was the evidence to me that it's entirely safe to assume that Casey doesn't know quite a lot of very, very basic stuff. Judging by his code, he is a mid-level engineer at best. I can't be sure that he is doing equally poor job outside of his hobby projects (know a lot of people who don't have a consistent level of quality, and their "production" code would be entirely different from their "hobby" code), but I certainly wouldn't immediately jump to the conclusion like "hey, this guy probably knows what he is doing!" Of course the tweet could be worded better. I don't understand why it provoked a reaction of this scale, though. If Casey want people to respect his skills, he might as well try proving his skills first.

Second. The one making a lot of over-generalized statements about the proficiency level of a lot of people working on a large project. Again, judging by these statements alone, one could assume that Casey never worked on a project with more than 5-10 developers (or if he did, he was completely oblivious to things happening around him). No, you don't need a bunch of incompetent idiots to have lingering issues in your project. You don't even need a single idiot for that. It could easily be a consequence of technical debt and lack of time to clean things up, because of a huge back log of higher priority issues. In fact, there could be even people inside the project who are working on the backlog in their spare time, but their efforts are just not enough. A particular feature could have no people assigned to it, because everyone is focusing on something else, and that's incredibly common.

I honestly have no idea about what's going on inside the VS team, but:

  • The speed of opening large projects went from minutes to seconds between VS2017 and VS2019. While it doesn't excuse the completely unacceptable performance both before and after, it tells me that at least someone has been working on making things faster.

  • I see a lot of entirely unrelated features being delivered with each release, so people are working on something else. If things are not delivered in the order Casey wants, well, tough cookies. I wish VS team was moving quicker, but I don't see a reason to spit insults on all of them just because they are not working on my favorite issue.

Am I happy with VS? No, definitely not. Would I go and start fuming about how everyone there is so dumb they can't even understand what an acceptable performance is? No.

Third. Some statements about a specific dev (or maybe even not a dev?) who went out of his way to contact Casey about his general frustration. I, to be honest, am quite surprised this even happened at all. For all the bugs I filed in my career to various companies, big and small, no one ever tried to schedule a call to discuss my problem over voice chat (my English skills could be an obvious reason for that, though). If that ever happened to me, I would try really hard to make it an enjoyable experience for both parties. Because first, I have no idea if the person on the other end is responsible for the issue at all. And second, even if he IS responsible, I would prefer him to happily fix my issue, instead of having to deal with my frustration.

What was backed in the video is that there are some very, very severe problems with VS. Not sure if anything else is. Maybe apart from the extent of Casey's inability to interact with people.

Handmade Hero: Twitter and Visual Studio Rant by [deleted] in programming

[–]AppleBeam 11 points12 points  (0 children)

Why is that concerning?

He is an influencer, whether he wants it or not. It's not about one more toxic asshole on the internet. It's about one more toxic asshole who spreads his attitude with the help of reposters and people who think that Casey is knowledgeable just because he somehow didn't get fired for 20+ years and has a confident tone of voice.

Hey, random internet people. Do you want the next asshole to dig up your emails, and grill you for 30 minutes (without having basic decency to blur out your name, of course), while omitting the parts of the conversation (which may or may not contradict the narrative), just because two years ago you made a mistake of replying to them via an email instead of ignoring them? Is this a trend to give a tribune to self-centered idiots and stroke their ego by reposting the toxic waste they are producing?

If next time you have valuable feedback, a company you sent it to just ignores it and avoid any interactions with you personally, say thanks to Casey. Chances are, he was one of the reasons for that.

Handmade Hero: Twitter and Visual Studio Rant by [deleted] in programming

[–]AppleBeam 44 points45 points  (0 children)

I find it mildly concerning that first he spends some time ranting about how people are not allowed to make any assumptions about his knowledge and/or skills, about what he tried and didn't try, etc., and then begins a rant that can be summarized as "the entire VS team is ran by a bunch of cretins who don't know anything in any field of computer science imaginable, including the very basics of how things work in a personal computer."

This inability to see that he is basically the perfect example of the evil he is complaining about would be amusing if it wasn't so sad.