Based on my quick and dirty benchmarking, it's similar in terms of performance. The vector comparison is consistent, the unpacking comparison is about 1.5x faster if it can exit early, but 4x slower otherwise. Here are the results: https://pastebin.com/QL4sNzhj (the code is straight from the article, the benchmarking done with google benchmark).
Fun fact: the French word engin still retains its original meaning of contrivance, contraption. But we still translate "search engine," which refers to this archaic English meaning, as moteur de recherche ("search motor").
It's funny how little time it takes to go from "cultural" to "ethnic". Say what you think instead of using whistles: you think that Denmark conforms to your racially focused worldview, that it's "pure", or whatever. Am I correct?
Funnily enough, Denmark is a few places below France in "ethnic fractionalization", yet somehow, racists worldwide insist that France has become a shithole because of immigration.
It’s not a “whistle.” Culture is virtually co-extensive with ethnicity in most places in the world. I come from a country whose name literally just translates into “country of $ethnic_group.” To the point where the largest country in the world, China, has lumped myriad different populations into the ethnic grouping of “Han Chinese” to cultivate cultural uniformity.
I'm not sure what the complaint is here. I don't mind saying outright that I believe ethnicity is deeply intertwined with culture and that the two concepts are inseperable. Ethnic groups are essentially defined by their shared heritage, experiences and culture. When we talk about cultural diversity, we inevitably also discuss the ethnic diversity of a population.
I really don't think that is a controversial position, but clearly you disagree.
I program MCUs as a hobby. I wish I could use something better than C. Even C++ with RAII would be better. But somehow, even C++ support is spotty, with unsupported features, broken debugging, etc. for seemingly no reason. And all device-specific libraries are written in C, so I'd have to write C++ wrappers for every little thing. Send help...
That's why I said "almost anything". I am aware that f.ex. kernel development and embedded work is still firmly in the C domain.
I am not evangelizing for Rust, Golang or anything in particular. I am evangelizing for periodically asking yourself "Am I still using the best tool for the job?" which most people never do.
It’s a cult, but you don’t have to join the cult. I use Rust both privately and more and more frequently professionally and I don’t really notice the cult community outside of smiling at it once in a while when it blows up on HN.
We’re mostly adopting rust to replace our C, to protect us from ourselves. It’s just so much easier to hand off these sort of projects to developers who mainly work with things like Java or C#. Partly because of the memory “safety” but also because things like enums work the way they expect them to being sum types, and so on. It’s also very clear when something is intended not to be mutable. The borrow checker is probably the biggest struggle, where with C, everything is a struggle.
Rust still has a long way to come though, and maybe it’ll never get there. I do think we’ll see an uptake as performance increasingly matters due to cloud costs and ESG. Right now though, I’d argue that unless you know why you “want” to use Rust then maybe you shouldn’t.
I saw your comment on an older C# thread in which you said (paraphrased) that C# is not bad, has nothing really stellar, and is just kind of bland.
If you could theoretically swap out the entire back-end of a programming language, and hypothetically you did that to C# by allowing developers to write C# styling and syntax that could be compiled to Rust, it would probably not be a big loss. The type primitives would be an apples-apples comparison at best, or "Rust is just better" if you really scrutinized the types closely. Where does that leave the rest of the language? A better regex implementation? Rust would probably win. A better GUI experience? Rust is speedily approaching usable APIs there at the same time Microsoft is trying to sunset the best they had.
Mostly agreed with your comment though I still have to remark that every community has zealots and it's mystifying to me why are people so annoyed by Rust's. So it's hard to agree that "Rust is a cult".
As you said, it's a pragmatic but also kinda niche language. I don't reach for it unless I can't do the job with others, easier and quicker to work with languages.
> ... every community has zealots and it's mystifying to me why are people so annoyed by Rust's.
Because they're the ones that we keep hearing from right now. When it was the Haskell zealots showing up every few days, they were annoying. When it was the Lisp zealots, they were annoying.
The C sphere is actually refreshingly free of zealotry (mainly I guess because there isn't such a thing as a "C community" and even despite C being the main attack target of language zealots - funny enough nobody complains about those pesky assembly coders and their hippie attitude towards memory safety lol).
The "religious zeal" was also an important reason why I switched back to C from C++ and why I don't have much interest in Rust. I can't quite stand the "holier than thou" attitude in.parts of those communities.
> This was an important reason why I switched back to C from C++ and why I don't have much interest in Rust. I can't quite stand the the "holier than thou" attitude in.parts of those communities.
This is 100% baffling to me. Let me explain.
1. Every single area has zealots. Yours included. And we're not talking only work. Every hobby area as well.
2. What the attitude of the most toxic 0.1% of the users of a thing is has exactly ZERO correlation with whether the thing is good and worth using.
3. By resisting only those 0.1% toxic zealots you are only demonstrating meaningless rebelliousness. As a supposed adult you should be immune to what are people hyping up and form your own opinion. INFORMED opinion. Not one based on the "many people praise it hence I, the intellectual, will stay far away from that obvious nonsense" stance.
4. Have you considered that maybe, just maybe, Rust is praised because it's actually good? Have you considered that the Rust community is not trying to cheat its way into your heart, and that the love Rust gets is justified by the people who need its features? Seems like you did not, and that's disappointing.
In other words, I have zero clue of your thought process here, maybe you can help me understand?
Back in my home town the VW Golf had an ardent fan base, yet one of my friends still bought one after he graduated. He didn't call the people who loved VW Golf zealots. He did his research and concluded that with his budget and mechanic skills the VW Golf is the ideal option.
I spent 20 years with C++ as my main language, and the endless and heated "style discussions" where personal.opinions are thrown around like facts were just tiring and a massive waste of time.
And it's such endless circular discussion where the extremists show up (I guess the equivalent in Rust is shaming projects that use unsafe, IIRC there have been quite a few dramas in the past). Shit like this is simply mentally exhausting, and in now 7 years of C as my main language I did not encounter this even once). In general C coders seems to be a quite relaxed, happy and tolerant bunch.
In the end I did seriously look into Rust for a time and decided that's not my thing and instead watch progress from the sidelines in case anything interesting happens in the language to give it another try.
What's quite obvious when watching from the outside is that it's almost always people with a crab emoji in their profile who are more likely to talk shit about C programmers (myself included in a couple of cases via subtweeting).
I usually just shrug it off and move on, because what else is there to do?
> In the end I did seriously look into Rust for a time and decided that's not my thing and instead watch progress from the sidelines in case anything interesting happens in the language to give it another try.
FYI I did the same because the kind of work that I do does not desperately need Rust's benefits.
But I'll always call out biased and prejudiced people and I don't care about what the HN group-think believes.
> I usually just shrug it off and move on, because what else is there to do?
1. Stop thinking that the zealots are representative of... anything at all, really. (I don't include myself in that group of zealots. I get ticked off by bias and firmly held preconceived notions. That's why I commented as much in the entire sub-thread started by me.)
2. Do your own research like you did.
3. Refuse to think about trolls and zealots. Which is what all of us as healthy adults in this attention-predatory age of the internet should do.
As a supposed adult you should be ok with the fact that not everyone will like your favorite toy and way of life.
I don’t use rust because I don’t have enough time in my life right now for discovering a new language just for the pleasure of it and even if I had, my real alternatives would be functional languages, not rust vs C++ which I use daily in a big project that has incentives stacked into C++ favor
If I responded in this fashion to someone who had already expressed concerns about a holier-than-thou attitude in parts of the community, I hope it would give me food for thought.
Just passing the ball? Yeah, I'd consider that + using a throwaway to be a set of circumstances that don't merit a response at all. ;)
I've already made my points several times. If you don't engage on the concrete arguments and are trying to be vaguely argumentative without substance then you're kind of polluting the replies.
Okay, and the direct version is that you responded to a general and rather vague comment about a holier-than-thou community by demonstrating in highly fluent detail exactly what that looks like in practice. To attempt a persuasive argument is by definition to engage in rhetoric. In the way you did so, specifically to persuade that the concern is unfounded, you behaved precisely as you sought to argue no one does. In short, you proved beyond doubt that your opponent's claim is valid. In rhetoric, there is no more abject form of failure.
Also, you behaved quite rudely as well as counterproductively - to the point that, if I felt any investment in the Rust community, I would now be asking you please to stop trying to represent it, at least until you can do so competently enough not to embarrass those you purport to defend.
If I found I'd erred as you have, it would bother me a lot. How you handle it is, happily for me, not my problem. But now at least you can't say you've never been told.
The point is that the guy who was bombarded by feedback that VW Golf is good did not go out of his way to avoid buying it. He did his own research, formed his own informed opinion, and didn't go against the grain due to misguided notions.
You are bombarded by feedback too, such that these endless discussions are just tiring and mentally exhausting, and improving a language by overfocusing on security is just a massive waste of time. (In some areas, it could make the difference between economic viability or not, or between possibility of explorative prototyping and mental exhaustion from friction during development).
I am assuming that you did your own research, formed your own informed opinion, and ignored the feedback nevertheless because you know who is right :-)
As a diligent programmer I research my tools and make my own conclusions when they are good and when they are inappropriate for the task at hand. Like everybody else should.
I don't even use Rust for a while now, by the way, because its lower speed of iteration was an ill fit for my contracting work. I love what it's doing but it is not a silver bullet (but then again, what is?).
...and by the way, mental exhaustion is pretty much a given if you are a pro. That's one of the reasons we are paid gobs of money.
As for the "feedback" you are alluding to, it's more like people throwing feces at me but feel free to disagree. None of them have addressed my questions except maybe one. They all rushed into snark just like you did. Even 1000 such comments are not interesting or informed feedback and can't advance any discussion.
I am still here and still open to discuss... with the people who bother to discuss.
I can't remember Linux zealots raving irrationally about C though (although when googling I'm sure something will come up). Topics like Wayland or systemd on the other hand, oh my...
They are alive and well in this sub-thread of mine, quite a lot of them even. :) Down-voting and never engaging because who wants their bias challenged?
But even if it was true (I'd contest it's not) can't you ignore it and judge the language on its merits? We are not teenagers for a long, long time now, we should be making up our own mind about things.
I have not done either. "Curmudgeon" is a "get off my lawn, kids!" grandpa btw. :)
I have not denied you anything, I implored you to ignore the zealots that exist IN EVERY ECOSYSTEM and judge the thing based on what it can actually do.
Please don't misrepresent what I said, that's not arguing in good faith.
Heh, this grandpa has written like 3x more python than C this year. And the C part was no choice - that was all I had on these devices.
Edit: from what I hear from my peers (translation: other programmers that I have coffee or drinks with), if I started a new server application today and I needed the performance of a compiled language, I should use Go not Rust.
I believe servers are where the propensity of C like languages to allow you to shoot yourself in the foot is the problem, isn't it?
Before the current "AI" hysteria, HN was full of "I've rewritten this thing that was working just fine in Rust". No mention of how it's better, has more features - or even has all the original's features - or anything about why you should use the rewrite instead of the original.
Am I supposed to use a tool just because of what it's made of, or because it solves a problem for me?
I don't need a 100% drop-in. Barely anyone does. I've observed at least 80% of all of the coreutils features are not used by 90% - 99% of programmers and sysadmins.
Ask people if they used all flags of `sort` and report back results as a test of my hypothesis.
> The right questions according to who?
This is tiring. I told you twice that I'd prefer you engaging in technical merits. You keep drawing attention to what is annoying you but you'll have to talk to your friends and family about that because I am not interested.
I don't see many CVEs in coreutils. Maybe one or two, in several decades? I do on occasion use obscure flags (or at least ones that are obscure to me).
I am getting tired of being misinterpreted, not of the argument itself because the argument ended several comments ago and the person focused on being a little rebel ("who gets the determine the right questions" is his favorite pet peeve apparently).
There is no argument currently, just people trying really hard to miss the point that was stated very clearly.
Mine was that some people needlessly -- and very immaturely -- rebel against using Rust because of something they saw on HN 5 years ago. There's no Rust zealotry here for a long time.
I chased after a few people asking them if they really tried it or they simply resist something because it's gaining popularity.
It is but there are other technical and non-technical merits too. "Security" doesn't trump all. If you need secure, turn off your computer.
I tried Rust and downloaded some projects that should be comparatively simple (e.g. text editor). "cargo build" downloaded and built about 500 dependencies. The Rust ecosystem had a chance to convince me, and it sure has some convincing results. But it wasn't my cup of tea.
If you included hundreds of dependencies to do what you can't easily do yourself within the "safe" framework, that may or may not be the language's or the ecosystem's failure. But the attribute "secure" for such a project is questionable. As NPM history or a certain guy or the recent events around the xz project illustrate well.
Rust only works for a few popular targets, but if it is just a hobby then Zig might be an option. C interop is pretty seamless, so you don't face the problem of having to reinvent the universe.
In my experience interop is rarely a language problem, lion share of time is consumed by reading the docs, testing if you understood the docs correctly, testing what's implied but not written in the docs and figuring out how to cope with idiosyncratic interface.
I guess I don't understand the point. Could someone summarize why I would use this rather than writing my utilities in something that doesn't compile to a quirky, limited programming language?
Because the runtime for those utilities is available on just about every Linuxy OS there is. Saves you having to install the runtime separately, eg in your CI pipeline.
It's not, really. The claim would be that it's portable, but bash can be a little finicky in that respect.
The documentation didn't mention what version of bash is required, but it'll be something. And plenty of systems will have old versions of bash - especially once you move out of the world of "my laptop" - obviously.
As has been mentioned elsewhere, it makes many times more sense to just learn bash, than to learn this. You likely already know some, and it excels at the jobs it's designed for - which is chiefly to launch processes and pipe output around. Subshells are elegant, even if making sure everything launched by your script is 100% finished before you exit can be a pain.
As usual, the US plays lone wolf and screws its "allies" over. We have a saying in France: promises only bind those who believe them. I'll belive the US is actually intent on curbing global tax evasion when I see it.
How can you frame a paper from 1965 as "very old" when the linked article is about Grothendieck, who started his math PhD in 1950 (and presumably studied math before that)?
The very very old solution I'm adverting to is Euclid's axioms. They don't define what "point" or "line" means, they just specify some axioms about them.