> In this case, the cost is dynamic dispatch and pointer-chasing.
To sharpen your statement, the cost is missing the CPU caches, which is often caused by failing to pool allocations and reading indirectly.
> But the argument is you're trading some of that performance optimization for maintainability.
Right, but exactly how much? I would argue "very OOP" design styles neuter your ability to optimize the system, and sometimes necessitate that you are kept at arms-length from the system, only capable of "customizing" it via more abstract API layers. I do believe certain OOP practices can make maintaining software easier, but I also believe we have not figured out how to retain control over the computer in the face of these abstractions.
As an example, Clean Coders advocate for "separation of responsibilities" and often speak in terms like "ownership" or what a function/class "knows about" or "should have to know about." When different classes are given different data-fields in the pursuit of making it clearer (what should exist in that scope,) you are creating a constraint which is virally spread through the codebase which runs counter to what the CPU wants. The CPU wants an array, but you can't have an array because the FileManagerFile can't "know about" the FileManagerFileCache, and the FileManagerFileCache can't known about the FileCache, so now each FileManager "owns" its own cache, which is an entirely separate heap allocation.
switch is example of explicit control flow, which Clean Code argues strictly against.
the better approach would be to use implicit control flow using class hierarchies, interfaces, and such and rely on class behavior, polymorphism and runtime dispatch, instead of explicit switch() which tends to multiply itself across the codebase
> I have to think about everything, everywhere, all the time.
I think this is familiarity speaking, which is what you're expressing earlier in the comment anyway. The reality is that we have to think of everything when telling a machine what to do. Exactly how we get that done is preference.
All of that is very dependent on the compiler used to compile it. Using a modern gcc with -march=native will probably have it be somewhere near tcc for performance, at least when I tried it a few years ago. If you compile it with itself maybe much worse? Also this would change based on your processor and so on.
> “I almost fell into this trap (...) I was raised by conservative Christian parents and thereby had so, so much to learn, and unlearn, in order to date comfortable and confidently.
Is this engagement bait? Is this a cultural critique? What is meant to be said here? At any rate, this is the kind of speech which will alienate a lot of people. Look, I'm more on the progressive end of things, I get it, but I think this just feels mean and divisive from the perspective of a conservative OR a Christian, and I find that to be a message made in poor taste... which is difficult because this is such a potentially inspiring and positive talk. I lost the energy to be inspired by the talk due to this style of messaging, but I don't think you should have to. I'm just a bit thrown off, I guess.
This not a rare thing to express. There are a lot of people raised under conservative Christian environments who have spent a considerable amount of time recovering from this. It is not surprising that they feel the need to express something of the journey that has dominated much of their early life.
Taylor Tomlinson puts much of this into her comedy. She often asks the audience to call out if they were similarly screwed up by their religious upbringing. The is a loud audience response every time.
While I don't agree with Andrew Kelly's adversarial attitude, I do understand it a little more from the perspective of someone who had to fight his way out of an ideology that will not seek consensus with his values.
"an ideology that will not seek consensus with his values"
This just seems normal and expected.
Kids are raised by their parents. Parents try to impart their wisdom on their kids, often in the form of rules meant to protect them. These rules are necessarily over restrictive due to simplification during various ages. These rules are also out of date with the new generation.
It's always a right of passage for children to find their own values and how they align with ideologies they have experienced or discovered in the world. And kids thinking their parents messed them up is really just an expression of value mismatch.
> Kids are raised by their parents. Parents try to impart their wisdom on their kids, often in the form of rules meant to protect them. These rules are necessarily over restrictive due to simplification during various ages. These rules are also out of date with the new generation.
> It's always a right of passage for children to find their own values and how they align with ideologies they have experienced or discovered in the world. And kids thinking their parents messed them up is really just an expression of value mismatch.
Right, but not everyone has the same reaction to members of the new generation who don't conform to their values. When my brothers and I didn't end up participating in organized religion as adults, even though my parents still are fairly religious, their reaction was basically "oh well" and to never bring it up again, and we all still have great relationships with them. There are people whose react to their kids not wanting to participate in the same organized religion much more aggressively, and if their kids have "lifestyles" that they consider immoral like being gay or trans, you can forget about any chance of a healthy adult familial relationship between them.
You're not wrong that at a high level, the patterns are somewhat similar, but not all of them are the same magnitude. The values themselves will impact how volatile the conflict is because they're self-describing; parents who highly value tolerance will by definition not be as upset at having kids who don't agree with them on everything, whereas parents who instead place a higher value on conformity and adherence to tradition are going to be a lot less happy with kids who don't end up agreeing with them about that.
You called it "normal and expected". When not everyone has it happen to them, that's not "normal and expected". (It's not necessarily abnormal, but "expected" at the very least is a stretch).
"becoming an adult" is a thing people do, this will include no longer agreeing with everything your parents taught you. This is mundane and what you have described.
"my parents are/were abusive" is something a plurality of people (and especially those raised in evangelical churches) experience.
Within that dynamic, the 'value' at issue here is 'Do I, your child, have a right to my own body and choices?'; Too often, the reply to that is 'no, we expect obedience and obeisance to God, your father, and your mother, in that exact order, because that is the one true way'.
This is a form of domination, not well-meaning 'protection'. It does, in fact, 'mess people up', in their intimate relationships most of all.
Not sure exactly what you mean by own body. However, under the law children generally do not have a right to their own choices and are expected to be controlled by their parents (really look at the stutes around this stuff and you might be surprised). After all, parents are held responsible for their child's actions under the law.
I recommend you spend more time reading about jurisprudence. I’m not sure where you’re based, but in the US, for example, children below even age 13 can make autonomous decisions about their health when it’s determined that they have the capacity, even when the consequences may be life-ending.
And, less relevantly, I personally believe this is the most moral option in such situations. If you have a 15% 1-year survival rate, all treatments either come with a small decrease in mortality, a large increase in risk for detrimental side effects, or both, and you can demonstrate to me that you understand the interplay of these factors, I don’t care if you’re 10 or 100, I believe you should have the right to bodily autonomy.
You have stated an unfortunate fact while hiding your value judgement. Do you think the laws you reference are correct, or no?
Do you understand the difference between having a responsibility to prevent your child from law-breaking and having absolute control over their life in general?
If you have children, or plan to, do you want to control every action they take to protect yourself from hypothetical legal consequence? Do you think you have the right to do so? Do you think you should be able to control what they think and express as well?
These questions are not hypothetical, as an answer in the affirmative is precisely what creates the type of abuse I described above.
The laws are to complicated to go into a full yes or no. But they mostly are. There are some things not covered by law which generally are controlled, such as the clothes, toys, and food bought for the kid.
Why do we allow people to teach a religion that requires someone to be old enough to have informed concent before they can decide to follow it for themselves, when at the same time we disallow sexual activity with those same individuals because they are not old enough to offer informed consent.
Except conservatism, religion, and religious conservatism in particular do not seem to value open-mindedness, discussion and consensus, or a non-judgmental stance.
It’s one thing to try and impart your values onto your children—that seems like what most parents would want to do, although I wouldn’t go so far as saying it’s what they should do. It’s another to say, for example, “you were born with a penis and so if I see you wearing a dress I’ll beat you and send you to a camp where people demean you and question your innermost feelings until you change them or pretend to do so”, instead of having a conversation about gender vs sex vs sexual orientation, gender roles, society, and culture, and “nature vs nurture”.
Christianity is arguanbly the irritating grit that created the pearl of modern science. A strict text that had to be taken literally ... this led to great intellectual progress in order reconcile it all. Bacon, Darwin ... lots of science was done by Christians.
Christianity isn't the only example. Islam and Judaism also have been heavy hitters. As have other cultures but I don't understand enough about them to comment.
I'm not sure the cause and effect are accurate here. It's very likely more the other way: that folks curious about the world and how it works did that research in spite of religion which often attempted to suppress new findings that countered church doctrine or beliefs. Or even suppress findings that happened to be different from earlier mental models.
To be fair, other scientists sometimes do this to. However most begrudgingly accept new findings if they hold up to the scientific method.
I appreciate the response, and I can relate. Perhaps I'm too sensitive to some rumblings I'm perceiving in the US at the moment. I don't know. I genuinely do not know.
The rumblings as in - the push back on the enormous takeover by christian conservatives of the united states, taking away women's rights, voting to teach the bible in schools, and doing their best to mass disenfranchise voters?
There has got to be a way to be strong against a cause without being strong against the people who represent it. I believe this devolves to violence otherwise.
If I talked about how I needed to recover from being raised in a progressive environment, it would not be so well received in well-respected tech circles.
There's an assymetry here no one wants to acknowledge.
I don't know anyone who had to "recover" from being raised by "progressive" parents. Is this actually a thing? What would there be to recover from exactly?
I have so far only completed about 14 minutes of the talk, but I would imagine it to be some sort of relatable analogy which foreshadows what the thesis of the talk is about. The "Christian Parents" are the authority figure and following their rules, lessons, and expectations for dating is a lot like doing only the software engineering tasks that management prioritizes for you. You end up unsatisfied with your life to the point where you become jaded about software (software development is like "dating" in this analogy) instead of learning the skills necessary to wield influence over what you get to work on. I'll watch the rest to see if I'm right.
edit: it's wasn't just about developing software but also using software. You don't have to accept the bad situation you're in (or the bad software you've been given or told to use). Finally, I'll say that while the speaker's comment about conservative christian upbringing isn't a universal one, it is a widely shared one. If you take offense by it maybe take a moment to pause and consider that maybe the way you were exposed to it was probably more balanced than what many others experience, or in the worst case that maybe your negative reaction to it is a sort of defense mechanism that you've learned to shield yourself from confronting the reality that your own conservative christian upbringing was not so good after all?.
From my perspective, I do not perceive the world as "falling apart" and I wonder how much of your perception of the state of things (as if there was a universally defined "perfection" to strive towards instead of humans creating these concepts) falling apart is derived from your faith, which has a vested interest in presenting itself as a real-feeling thing in order to promulgate its existence. As a meme, it appears to be persistent in the environment for roughly 2k years, so clearly there's some fitness to its host species. And contrast its feelings of apocalyptic end times to Buddhism, where things are more cyclical rather than ending soon, and I wonder how your feelings would be affected were you to have been raised in that environment instead.
While I can't speak to the universality or novelty of the world falling apart, I feel the same way.
Some people aren't yet in a place to understand this perspective. Others have been hurt by Christians who failed to live their faith or were otherwise misguided in their actions or teachings. Some slander the faith based on ignorance or misunderstanding.
We're called to forgive our enemies and respond with patience, humility, and compassion. I've found that doing this without losing sight of God's commandments is a struggle that requires daily prayer and reflection.
A thing you might want to consider is that how "good" a person is is largely independent from their level of religious faith.
It is common for religious people to assume they are linked and that a religious person does good deeds because they are faithful while somebody who does bad deeds has less faith.
Which leads to an assumption by some that atheists are have no morals and priest are exception good.
I was raised atheist/agnostic and was one for decades. Now that I'm not, I frequently get unsolicited comments like the one you're responding to. People assume that I haven't considered foundational tenets of my religion, or that they're the first ones to raise basic ethical questions after thousands of years of tradition, teaching, and catechism.
There's a noticeable difference between those who are concerned but care about what I think, and those who have already made up their minds that I'm ignorant. It's tough, especially when it surfaces in longstanding relationships. I've had friends and family jump to all kinds of crazy conclusions about what I believe and why.
I'm not perfect, and I often reflect on whether I'm setting a bad example or being a poor witness to something that's a powerful source of strength and charity. Many times I've fallen short, and I ask for forgiveness. Christ asks me to pick up my cross and follow Him, and I pray for the humility and discernment to do so.
its a gracious outlook of you, to assign ignorance as the root cause of this behaviour. to me that dude looks like any other proselytizer - a man attempting to sway others views, without concern for their concerns. although if you try showing atheist proselytizers how similar they behave to preachers, or indeed compare any of their behaviour to religious zealots, this inevitably short circuits the proselytizer viewpoint and forces fight mode, resulting in termination of any productive discussion.
at the end of the day people say a lot of things, and until life teaches how little words matter, people do care about words by default. it is only those understanding life who look past words to see what truly matters. everything that anything living does in this existence is inherently selfish, otherwise it wouldnt happen, based on science and neurochemistry. this seeming impediment to becoming christlike is not an insurmountable obstacle, rather a beautiful choice we are offered - to accept animality, or to humbly push through the impossible and seek something more ...
may i ask a bit more specifically why your comment evaluating the abstract concept of goodness and its relation to faith is related to this sentence? i'm still not seeing the connection.
"who failed to live their faith" - ie if they had lived up to their faith would have been good. I'm saying that the practice of "faith" and being "good" are largely unconnected. There are plenty of faithful Christians in prison.
By "good" I mean nice, polite, not murdering people. Generally accepted moral behavior.
if someone agrees on what it means to be good, their definition of the term has been subjectively qualified. muslims agree its good to cover their women, you probably dont, both these statements are true. seems to be a central aspect of religion, agreeing on codified morality. im fairly confident that not killing is a moral purported by christianity, therefore it doesnt seem logical to label murderers as christians - based on their murderous behaviour, murderers do not agree with christianity, regardless as to what they verbally state. would you label buddhists as immoral if an individual decided to call himself buddhist post-massacre?
I don't think it's meant to be mean or divisive, he clearly had trouble dating and he feels his conservative Christian upbringing was partially responsible for that. If you think he's wrongly attributing it to those things, fair enough, but his experience is still valid.
EDIT: just saw your reply to a similar comment below, appreciate your response!
I liked the talk and was about to post a link to it in the $dayjob slack, but this threw me off as well. Still watched it to the end, and I still recommended it to a friend (along with the Youtube channel of the "Software should work" conf), but I'm saddened that the talk paints Christianity as something that is inflicted upon you and that you should strive to get rid of.
It's clear that he had a bad experience, and I'm nobody to tell him what to put on the slides and what to leave out, but my impression is that there are lots of believers out there who do cherish their faith, experience it as a very positive force in their lives, and draw from it the power to make the world a better place around them. Speaking for myself, I'd say faith has been a net positive so far in my life.
You’re talking in general about your faith, when this presenter was talking about their specific experience of being raised by conservative Christian parents. I’m not even Christian, and it’s plain to me that there’s massive variation even within one denomination’s congregants, let alone a Baptist vs a Lutheran, for example. It seems like you extrapolated far beyond what he said.
> I’m not even Christian, and it’s plain to me that there’s massive variation even within one denomination’s congregants, let alone a Baptist vs a Lutheran
That's a fair point I agree with. Still, I've met many people who seemingly put all "flavors" of Christian faith in the same negative bucket (implicitly negating the diversity among Christians you call out in your comment). In light of that, my intention was to contribue to the conversation with the very same point you are making, backed by a data point from my own experience: that there are many Christian communities in which faith is practiced in a way that enriches your life, rather than shackling you to a cult.
> It seems like you extrapolated far beyond what he said.
Was it Andrew's intention to talk about Christianity in general? Now you mention it, he might indeed have been focusing only on people "raised by conservative Christian parents".
What if we treat all religions as programming languages for humans? Then a degree program for programming humans at the Omniversity would likely put you through several different religions and then through syncretisms of them.
Most people don't want to learn, so they don't choose to live in the Omniversity.
When you put it that way, I have no issue agreeing wholeheartedly. He’s making an example of incel culture as it appears to him to apply to software culture. After I describe it that way, I think he didn’t have to stoke the religious right in doing so. Something that hadn’t occurred to me until your reply (thank you) was that he might not be aware he’s doing that, and that is where I may be wrong in assessing the “taste” of the messaging. But I will be firm in my initial reason to post: knowingly aggravating each other is a problem in this country. We need compassion and mutual respect. Cooling the temperature of discourse will require a surplus in patience. Maybe even faith. (I am not religious, this is not a dog-whistle.)
I was so pre-occupied with someone being offended by what he was saying that I didn't see the clear positive angles you're showing. I appreciate that.
I feel like a lot of folks have bought into the Christian nationalist position that they are always under attack. Someone saying, "I had a hard time in a conservative Christian upbringing and I had to do some work to find a way to be happy and successful at the things I wanted" is, in no way, an attack on anyone or anyone's beliefs, and to frame it as such kinda just shows how wildly successful that particular propaganda tactic has been.
A few extremists are constantly rattling on about the "War on Christmas", the "War on Christians", etc. Meanwhile, Christians hold literally every lever of power in the US, and saying you're not a Christian in public is disqualifying from most public office in the US; not by law, but de facto, based on the prejudices against other religions and the non-religious. If someone raised in a conservative Christian household saying, "that was hard", is "aggravating" to anyone, then I would say the aggravated party is 100% the one in the wrong. I'm not going to pretend along with Christian nationalists that they need protection from any speech that isn't praising their beliefs and actions.
I honestly don’t get what you’re saying. From my limited experience Mr. Kelley often adopts a confrontational stance, sometimes to the point of appearing antagonistic, but I listened past the intro and did not interpret what he said as “religion bad” or even “conservatism bad”.
It’s one thing to purposefully provoke people, and it’s another to tiptoe around any personal expression or hot-button issue for fear of offending someone, and that is not limited to one end of the political spectrum. I have been on all sides of this; I was raised by a computer scientist (used to speaking freely/veracity being valued) and a doctor (used to self-censorship/not offending being valued), and have worked in academia, industry, and now medicine, and have experienced conservative as well as liberal approaches to both promulgation and suppression of free expression.
It's definitely cultural critique that people who don't agree with his broad political stance will find divisive and mean. I also completely believe that Andrew Kelly is talking sincerely about his own beliefs and experiences, grounded in his own life history - that is, I believe that his own experience is that unlearning some of the conservative Christian values his parents taught him made his own dating life better, at least with respect to the different values he came to have.
I think the lesson here is that you can't divorce a potentially inspiring and positive talk, from the underlying ideological stances that ground that talk, and indeed determine what the speaker thinks count as inspiring and positive. There are a number of points in this talk where I think Kelly's claims that some aspect of computer technology are tempting to blackpill over, are really just that computer technology being useful to people who don't share his political stances. So a listener who doesn't actually share his political stances won't find the argument he is building in those sections of the talk convincing at all.
Its a set up for part 4 (27:45 or so) which talks about irrationally choosing to have faith in humanity. I see it as a sort of "full disclosure" disclaimer. I'd summarize:
> In my past I've dabbled in sorts of faith that I later found to be problematic, but there's also this other faith that I think is good.
Funny enough, I find myself closer to the conservative Christian upbringing I received as a child than ever before, but I totally agree with him on needing to unlearn some things when it comes to dating. Different world in the past I guess, conservative Christian or not.
Taken as a whole, the intro to his talk was pretty cohesive in my opinion, albeit controversial. It made sense when taken together, even though some people will take issue with the subject matter. The point wasn't the little details about his own experience, that was just to get you invested in the story about the degeneration of certain types of communities when people who "graduate" from them leave, and the people who never moved on remain.
Of course, coming from that background one has to learn to recognize some new concepts to even use online dating - stuff like short-term relationships, folks going for high bodycount, that sort of stuff.
Yet, stating that in an open source talk has the subtext of someone wearing a t-shirt "I know HTML - How To Meet Ladies".
It's a gradual distinction for sure, but I consider it a "I know it when I see it" situation.
Parents try to impart their values, but indoctrination for me begins where they won't allow their children to come to their own, potentially disagreeing opinions. Prohibiting contact to peers with other views, that sort of thing.
You can impart values on children and try to lead by example, but ultimately, they're sovereign individuals, not their parents' property. It's the unwillingness to accept that where I see education and guidance cross the border into indoctrination.
A far better qualifier than my "I know it when I see it", for someone pretty certain they weren't indoctrinated, would probably be a grown-up's reflection on their own upbringing. If they're lucky and become an independent person, they will have a good feeling about whether their upbringing involved unacceptable levels of coercion and isolation.
After reading some other comments on what I wrote, I guess I'm just surprised if/that he doesn't know this will offend people, and I see a simple way to make his point without doing so.
Thanks a lot for the effort you've been putting into your comments! It's not often you come across someone on the internet who wants to have a honest conversation and at the same time has empathy with the real-world people at the other end of the cable. Keep it up!
If you haven’t interacted much with people raised by conservative Christians in the United States, they often have strong feelings about how they were raised.
> Is this engagement bait? Is this a cultural critique? What is meant to be said here? At any rate, this is the kind of speech which will alienate a lot of people. Look, I'm more on the progressive end of things, I get it, but I think this just feels mean and divisive from the perspective of a conservative OR a Christian
Maybe, as a progressive, you should listen to the experience before rejecting it solely because "it is too divisive".
And if you reject personal experience and feelings solely because they are not pro-comservative-christians enougj, maybe there is issue there
When you say "listen before rejecting," what would you have me do differently? To call what I'm saying "rejection" seems a bridge too far from what I am intending to say, also. I am making an appeal to civility and compassion in the event that he intended to say what he said knowing that people might feel badly by it.
The comment was not "uncivil" and it was not "lacking compassion". Yes people can feel bad when you say them actions of some in their group affected a person negatively. That does not mean it is uncivil to say "a thing conservative person did affected me negatively".
The "you cant talk about something that negatively affected you, because a conservative person might feel bad" is not compassion. Its effect is biasing what people can say in very much one sided way.
I don't feel that the way you are paraphrasing me represents what I am trying to say at all, and I feel misunderstood. I do think the phrase "appeal to civility" was fine, but the negation of that phrase doesn't exactly equate to an accusation of being "uncivil," if you know what I mean. I don't disagree with what you're saying in the abstract, and I've had this conversation elsewhere in the thread.
He changed what he says his values are when dating women, to make dating woman easier for himself. Why he mentioned it, I don't know. He holds IMHO strange views on internet culture and portrays it as morally superior to not be part of any group mentioned; PUA/any forum/Christianity as a whole. A strange introduction for a software talk.
Idk how that was what you took away from the talk, and I think it says a lot about how you might approach dating, interacting with women, and personal values. He seemingly changed his views/approach to life and dating based on a re-evaluation of his values and experiences, whereas your framing makes me concerned that you believe the only way someone would/could become more attractive is by performing some sort of charade. It’s obvious when this is the case and I am aware of some people becoming frustrated by the experience, thinking that there is a “cheat code” to becoming more interesting/pleasant for others to interact with when it actually requires a radical rewiring of how you view and participate in social interaction; becoming more attractive is really just the side-effect.
Further, his views on PUA in particular might seem strange from the perspective of someone deep inside “internet culture”, and if this is you, from someone raised as a man, who is attracted to women, and who spent many years in the dark corners of the internet, please give broadening your horizons a try. You may just find that the people you think despise you and who you despise have some very good points, and the people who you thought were the only group you had anything in common with are actually quite toxic and full of bad advice.
> makes me concerned that you believe the only way someone would/could become more attractive is by performing some sort of charade.
I am unapologetically my authentic self, I find that works best. If you had broadened your horizons as you say; you'd find the same.
> you may just find that the people you think despise you and who you despise have some very good points, and the people who you thought were the only group you had anything in common with are actually quite toxic and full of bad advice.
There's no need to tell other posters what they think. As for women; I love women, and have always been in long term relationships. Maybe I'm just a lucky guy. I think it's odd though to try and appear superior to these groups as he does. You are right there are toxic people, especially those seeking to earn income and status off of male loneliness. I agree with you fully. Having said that, I stand behind what I said earlier.
The man is running a slide deck in front of his colleagues that is full of crude graphics, memes, and, I guess some anime or something. It’s an unserious talk given by an unserious person for entertainment value. He dons the jester’s hat and signals his alignment with the monied San Francisco tribe to keep his easy job in an air-conditioned environment. If not, he might suffer the awful fate of having to earn his bread hanging drywall or driving a solid waste truck.
Or maybe it's not an act, and he's just naturally funny :)
> to keep his easy job
He had an easy corporate job. Then he quit and spent half a decade burning his savings to work on his "hobby project", in a belief that one day it would become useful enough that the project would become self-sustainable. Now he can afford air conditioning again. Should we not be congratulating him?
WTF are you talking about? He made Zig and is employed by the Zig Foundation, of which he is founder and president. He can't lose his job because he ruffles feathers.
I do not. He spends his time working on a language used by and supported by several startups and a few major corporations, a language that seems heir apparent to C, at least among a lot of developers. The ICO in your name leads me to believe you're a cryptoscammer, so...seems like maybe you're not in a position to be throwing stones regarding how people make a living.
At this point GL is an interface, implementations will come and go, but the interface refuses to die. It's still the simplest way to get started, and the browser (WebGL) demands portability for code written against the API.
Don't let the downvotes get you down. They don't know who funds or constitutes METR. If you actually read these papers, you'll find they cite themselves 4-5 times each publication. They also consider "hosting an HTTP server using Python" to be a "long time horizon" task.
The OP cited a METR study... if you don't think they're credible, fine, but it's hard for me to see how it could be intellectually honest to cite them when their research is helpful to your argument and discredit them when it's not. One might even call this approach "fooling yourself".
The OP is not citing their claims, but their commentary. Do you understand why I find that to be different than citing their findings? We're not talking percentages here.
$0.10 awarded for a correct answer
$0.10 deducted for a wrong answer
$0.00 (no change for a refusal to answer)
There was no detail on whether participants were actually going to be paid, or if they were in the negative at the end, be expected to pay their losses.
I am inclined to believe the effects of the study are real, but not nearly as pronounced as the data. If there were more serious amounts of money on the table, I think common sense would prevail.
I started bowling in my teens and as a programmer have often wondered about how these things work, and have had a few opportunities to peek under the hood of the machines. Incredible stuff. Thank you for this work, I'll point my alleys to your creation when it's public.
If you're starting a new project and can afford it, please for the love of the children, use a different systems language. In so many ways Odin, Rust, Zig, whatever are better. There will be growing pains with respect to collective knowledge and performance, but they are surmountable.
Context: I am a programmer and educator. I am so tired of informing people of these minutiae.
I've tried it, and no. Honestly C++ gets so many complaints partially because so many people use it. It deserves a lot of it.
I just finished my work on a 2.5 yr rust project that was very low-level. The problems I had with it were that the language and library designs will always be behind the current state of the art in performance. Hardware and systems APIs change quickly, and they can shift the optimal design decisions easily for different workloads. E.g. chiplets on your CPUs can change where you want to put your io_urings, their workers, and any relevant sq_poll threads. Your NIC's DMA/TLS facilities can change your memory pool policies - do you want zero-copy APIs, or is the copy required anyways because of all the CPU-local work you have to do? Do you preallocate and feed giant buffers to register with the io_uring, or do you need to share your memory pool with the rest of the application? Do you use a single mutex for the pool, a hierarchy between thread-local and global? Do you also use a chiplet-local allocator?
What's nice about C++ is that your fight isn't against the language and runtime. They don't care what your situation is. They'll work. You do have to assemble it, and other languages make some assemblies a lot easier to do.
Yes Rust and its libraries are getting better. But so's C++.
On embedded, your fight totally is against language and runtime. Since you cannot gave conformant freestanding C++ without exceptions, rtti and most of STL, "using c++" on embedded always turns into "using gcc" or "using clang" — their mutually compatible, but completely standards non-conformant extensions that make writing for embedded reasonable to even attempt. At that point, is the language still c++?
Meanwhile, both rust and zig will gladly compile your standalone function into standalone binary.
Systems programming is very much about minutiae, to a great extent. And this particular detail will affect any systems language, one way or another. Every language has to decide if the calling convention is part of the function signature or not, and every systems language then has to decide whether it allows C functions with the same name as native functions or not. The C++ standard decided to allow this, which actual C++ compiler implementers decided to ignore for whatever reason, but that's just a bug, of which, again, you'll find many others if you actually do systems programming.
I'll also note that "Odin, Rust, Zig" is a weird enumeration - neither Zig nor Odin are anywhere near being a realistic option for a new complete system. Odin is so obscure it doesn't even have a Wikipedia page. Zig is still pre-1.0 and often makes breaking changes to core libraries.
To be fair, Odin _had_ a Wikipedia page and it has been removed because of... people with whatever interests. But I'm still agreeing with your general point. I use C/C++ because it seems to be the least friction option to me overall, and I don't want to deal with language but simply focus on my actual compute problem. (Given that, I spend an unreasonable amount of time in silly fights about language).
I've read about some drama with Odin's Wikipedia page - but I don't think that contradicts my point. If your language community can't even defend a Wikipedia page, you're an obscure language that people can't be expected to choose that easily. That doesn't automatically mean it's a bad language, but it does make it weird to recommend it in the same breath as Rust. It's like saying "choose a language like APL or C or Java" - one of these is not like the others.
> Every language has to decide if the calling convention is part of the function signature or not
Well, of course it is. If you get the calling convention wrong, then you can't actually reliably call the function. I've seen this in e.g. Win32 — pass the function with the wrong calling convention as your callback, and it will dutifully thrash your stack.
The only other option is "pretend that there is only single calling convention that everyone uses" which is apparently somewhat works on platforms that are not 32-bit x86, but only mostly.
> The C++ standard decided to allow this,
Decided to prohibit, actually.
> which actual C++ compiler implementers decided to ignore for whatever reason,
Because it's UB anyway so why bother detecting it, and it mostly works most of the time when people use it, so again, why bother prohibiting it? No promises on keeping things working in perpetuity, of course.
I'm talking about design flaws, not engineering details. I would appreciate if you would respond in spirit. I do think the list I gave is odd, and it is so because it's kind of a mashup of recent pop-culture things. I'm literally just appealing to people to attempt to use something designed with the benefit of 50 years of hindsight. Why am I being downvoted?
I've already pointed out that there is no design flaw here, just an engineering detail plus a non-technical detail (standard vs implementation). Any systems language needs a way to call C functions, and the question of whether a native function is allowed to have the same name as a C function or not is an engineering detail, not a design flaw.
Now, if we were to be talking about memory safety, that would be a very different discussion. But you only mentioned "minutia" as the problem with C and C++, so I don't even know what you were actually meaning to talk about.
Furthermore, in relation to those 50 years of hindsight - Rust and Zig actually go in very different directions on fixing C or C++'s flaws, so it seems that people actually learned very different lessons in those 50 years - and I believe neither agrees with the lessons learned by the other.
You're getting downvoted because your argument is cosmetic, egotistical, and useless. Can you give an objective separation between design flaws and engineering details? One that has zero ambiguity: if I give 100 engineers your criteria and then ask them to categorize 100 different points against it, would give exactly the same results? And would that distinction actually correlate to a historical analysis of programming languages' effects on software project success metrics?
No, because the entire distinction falls apart pretty quickly into "shit I like to discuss and care about" and "shit I don't care about and don't want to talk about."
Systems programming lives and dies by the details you want to ignore. The economics of large software production are mildly affected by language design. But weaknesses there are easily overcome with engineering practices and additional tooling. Almost every complaint about C++ safety I've ever heard hasn't been a problem for me for decades, because I know what libraries, practices, and tools solve those problems. But I've yet to work with another language - and I've programmed in a shit-ton of languages - that gets out of the way as well as C++ when I want to systems-program. Even C. C is strictly lower level, but its lack of abstraction facilities gets in the way more than some of the modern numerical-type-safety stuff of C++ does.
> You're getting downvoted because your argument is cosmetic, egotistical, and useless.
Ouch. (sincerely) I hate to think my ego might be so large and detailed that it could be so irritating to someone through such scarce writing. Are you certain you're identifying me correctly?
> if I give 100 engineers your criteria and then ask them to categorize 100 different points against it, would give exactly the same results?
Fair point, I understand that things I find to be "unnecessary friction" were once very necessary, and are (not infrequently) still necessary today.
> Systems programming lives and dies by the details you want to ignore.
I haven't really given you much to respond to, which is my fault, but I don't think you're yet identifying what I want to ignore, because how could you if I'm not specifying myself entirely? Frankly, I was being too casual with my discourse for many of the people responding to me, I see that now and graciously accept my downvotes. I'd rather have a good conversation than internet karma points, so here goes.
So let me box this in more. A lot of my students just want to get some practice with programming the computer. They want to learn some basic graphics, whether they're using the GPU or not. They want to be direct about programming the computer, and often want to use systems-languages but find C and C++ too difficult to use. It is now common for university students to complete a bachelor's degree while strictly writing Python. *This is the current against which I swim.* I do not think this is a healthy situation. I want there to be: more incentive for students to do "fine grained" (systems) programming. Ultimately, it needs to be more economically relevant _and_ to seem accessible to them. So, in my eyes, if enterprises attempt to use some of the "rounder" (less sharp) tooling *where possible*, students might think they've got a shot and can feel assured there's a point to putting in the effort to learn how to use things like pointers, allocators, profilers, debuggers etc.
I do not want C or C++ to die tomorrow, or next year, or next decade, but in my time writing these languages and their "successors" I do think there are enough meaningful improvements that we owe the next generation a chance to take ownership of something that seems a little less hairy-- even if it is so they can make it hairy and start anew. I simply want them to feel the responsibility and freedom of control.
So what are the improvements? Let's start with C. Let me preface by saying I am aware there are a few tools that are a "must" with C, otherwise you're going to get bit by things like integer conversions or memory corruption. Know your compiler-flags and tools like valgrind and you'll be okay. But what if you didn't have to learn that the hard way? Some of the new languages can put friction in the way of these mistakes, whether by way of incompatible numerical operations on mixed types, or various restrictions on what you can do with a pointer. These are small things, and I hesitate to list many more, but there are so many! I realize I won't be exhaustive enough for you, but we can take it further, sometimes bugs can be introduced via aggressive backend optimizations which operate on undefined/platform defined behavior. Again, in this case, there are languages which simply forego these optimizations by defining the behavior.
Again, I realize there are genuine losses due to these design decisions which I'm advocating for, and I appreciate the pressure you're placing against me to distinguish these from flaws. I don't mean to point at the inventors of the past and to say they just did it poorly, I simply believe the trade-offs are out of calibration now. e.g. C's pre-processor and linkage strategy is to write a bunch of little atomic things so that it all fits in memory. That is still crucial for a lot of the largest systems out there today, but for anything else PLEASE let me write something like `go run .` and be done (this is not an endorsement for Golang specifically.)
The point which inspired me to write any of this is this: the software we run could be faster and lighter if we know how to make it that way. I think C and C++ are good tools to make the absolute fastest and lightest software in a great many cases. Probably the best tools. But what about the people who just want to make a GUI application without learning the framework of the month, or the programming language of the decade? What if you want to know something you can use for the foreseeable future without investing the kind of energy it takes to be a discerning user of C or C++? We're missing out on better software because students are giving up on "finer" tools.
The Zig group claims that Zig can interop with C based libraries w/o too much work. It's one of the reasons I'm digging into it now. But I don't know anything about CUDA and have only done trivial Zig<=>C tests (like my Zig code working with libpng) so far. Are their claims BS? Is Zig just not mature enough? Something else?
The CUDA/HIP APIs are mostly C-like APIs but are really C++ language extensions. e.g. you need triple angle brackets when calling a GPU kernel. The compiler turns that into placing the kernel onto the GPU and running it.
The GPU kernel code itself needs to be compiled and for CUDA that is done with the proprietary nvcc, which is clang-based. HIP is better because it's an open-source llvm backend/frontend but you'd still need to add GPU-specific support to zig/rust/whatever.
> you need triple angle brackets when calling a GPU kernel. The compiler turns that into placing the kernel onto the GPU and running it.
It all boils down to calling CUDA runtime or driver APIs. Compiler just sprinkles fairly trivial amount of syntactic sugar, and under-the-hood glue code. One can launch GPU kernel from a pure C source file compiled with gcc.
> The GPU kernel code itself needs to be compiled and for CUDA that is done with the proprietary nvcc, which is clang-based.
nvcc is not the only option. Clang itself can compile most of existing CUDA code just fine, and the rest usually needs minimal porting.
Also, nvcc is not based on clang. It may use it as the host compiler, but that's the extent of its involvement with clang. IIRC, their front-end used to be based on EDG.
> HIP is better because it's an open-source llvm backend/frontend
CUDA and HIP share most of the front-end code in clang, so CUDA compilation with clang shares the same benefits. What's missing is PTX to SASS assembler, which creates the actual GPU binary, and that part is proprietary to NVIDIA.
AFAIK PTX compilation is the bit that is not mature in the Rust CUDA ecosystem as well, because it has to be reverse engineered rather than simply translated.
My guess is that Zig cannot be considered mature until someone has written an application in it that contains a Lisp interpreter. I'm banking on
Ghostty. Your move MH ;)
C++… I don’t know it well. But I’ve heard there are a lot of different dialects, to the point where it is possible that two C++ programmers might be writing in essentially different languages. How “old” is the language, in that case?
I've been writing C++ for embedded systems the past year or two.
We use a very conservative subset of C++, almost like C with inheritance. We barely even use templates. We try to avoid allocating on the heap. The code is mostly imperative.
Since 2011, a lot of new language features have been introduced. The ones we use are things like smart pointers (that improve lifetime management) and some tweaks for better type safety.
It is said that moden C++ enables a functional programming style. I have never actually seen anybody code that way (it would be hell to write and worse to read) but that could just be the niche I'm in.
What is undeniable is that C++ is so complex and has so many features that you have to choose a subset of the language to enforce a consistent style.
Also a lot of the STL (standard library functions) are deprecated in one way or another, which is a real minefield.
The dialects issue is why I avoid interviewing in C++, because inevitably it turns out the interviewer has some weird view of what "C++" is and doesn't realize it. Years ago I had an interview in "C++14" that required std::optional (C++17) as implemented by a C++14 compiler with only experimental, nonstandard support. In another case, an interviewer on the LLVM team vehemently disagreed with me that you could legally implement std::atomic types with mutexes, as I was going over a story about fixing issues in an awful stdlib that implemented them with mutexes.
This kind of thing doesn't happen when I interview in other languages.
Java was the 800lb gorilla thanks to Sun's marketing.
Write Once Runs Everyone has been the promise of several bytecode formats since UNCOL in 1958, with UCSD Pascal being the most famous one until Java came to be.
Smalltalk was already taking off when Java came to be, it had a role similar to .NET on Windows, on OS/2, with SOM (OS/2's version of COM), doing C, C++ and Smalltalk.
All IBM Visual Age IDEs were written in Smalltalk, however it was exactly IBM alongside Oracle that were the very first to jump onboard to the Java ship.
Thus one day of the other, Smalltalk was out, and Java in.
Eclipse started as a rewrite from Visual Age into Java, and many of the Java early frameworks were ports from Smalltalk.
Also note that while Java has a C++ like syntax, its execution model is closer to Smalltalk and Objective-C, thus why it was such a great fit for Sun, acquiring StrongTalk and re-purposing the JIT compiler into Hotspot.
== Long-ago, Smalltalk systems could be file-copied from say win to mac to unices and would just work.
== Not standardized. Language vendors used proprietary code to lock-in customers and that fragmented the skills base. Skilled Smalltalk-A programmers were not-so-skilled with Smalltalk-B.
I only know them from openMP (more of a Fortran person)… without much thought my gut says that it’d be possible to implement an atomic operation with a mutex, but sort of defeating the purpose. An atomic operation is mostly expected (intended? hoped?) to be backed by some hardware atomic instructions anyway, right?
They insisted that it wasn't legally possible and no one would ever do that, but std::atomic<T>::is_lock_free [0] exists precisely because implementers were doing it. The only case that anyone was ever likely to encounter AFAIK was atomic structs >= 16 bytes on MSVC because they couldn't use cmpxchg16b for reasons.
I had been using a truly awful stdlib on an embedded platform whose implementers saw that freedom as a license to implement all atomics with mutexes. I assume it was because they couldn't be bothered to write new implementations for every platform they supported, so they'd write the basic primitives and got the rest of the implementation "for free". This isn't even close to the dumbest decision they made.
Obviously that wasn't acceptable for any real use, so I wrote up a better implementation, sent it to the vendor as a patch to save their other poor customers the effort, and used it as a one line example in a larger list on my resume that the interviewer seized on. It's not uncommon for a FAANG interview to be adversarial like that.
To sharpen your statement, the cost is missing the CPU caches, which is often caused by failing to pool allocations and reading indirectly.
> But the argument is you're trading some of that performance optimization for maintainability.
Right, but exactly how much? I would argue "very OOP" design styles neuter your ability to optimize the system, and sometimes necessitate that you are kept at arms-length from the system, only capable of "customizing" it via more abstract API layers. I do believe certain OOP practices can make maintaining software easier, but I also believe we have not figured out how to retain control over the computer in the face of these abstractions.
As an example, Clean Coders advocate for "separation of responsibilities" and often speak in terms like "ownership" or what a function/class "knows about" or "should have to know about." When different classes are given different data-fields in the pursuit of making it clearer (what should exist in that scope,) you are creating a constraint which is virally spread through the codebase which runs counter to what the CPU wants. The CPU wants an array, but you can't have an array because the FileManagerFile can't "know about" the FileManagerFileCache, and the FileManagerFileCache can't known about the FileCache, so now each FileManager "owns" its own cache, which is an entirely separate heap allocation.
reply