Live data from Hacker News

Moving from Rust to C++

raphlinus.github.io

91–100 of 145 posts

Re: Moving from Rust to C++

#91
post #90

Earlier quoted context omitted.

If you haven't heard of him, the joke's on you. Maybe. In any case, his work is worth looking into. He has done interesting work in font creation, font building primitives, rasterization, 2D drawing, and resistant social network graphs (which turns out to be more or less equivalent to the Old Sk00l Google Juice system). He was recently instrumental in performing a wonderful experiment in editor building -- wonderful…

> He was recently instrumental in performing a wonderful experiment in editor building -- wonderful because of the way it failed. They clearly should have migrated to C++ sooner :)

Yes, C++ does have fast JSON parsers.

Re: Moving from Rust to C++

#92

Funny thing, I've been moving Swift to C++, for real. I'm paying a price, but also getting some benefits. I'm not convinced that giving up on C++ and rewriting everything in a new language is a great idea. If I could get some compiler extensions to give me some experimental toys and syntactic sugar, I'd never be tempted by Rust/Swift/etc.

For what use cases have you been moving from Swift to C++ and what benefits have you seen?

Unrelatedly, given that they all compile down to LLVM IR, in some sense Rust, Swift, and C++ are all syntactic sugar, aren’t they?

Re: Moving from Rust to C++

#93
> First, I consider myself a good enough programmer that I can avoid writing code with safety problems. Sure, I’ve been responsible for some CVEs (including font parsing code in Android), but I’ve learned from that experience, and am confident I can avoid such mistakes in the future.

Yeah, well, joke is on you because I’ve heard this argument in real life.

Re: Moving from Rust to C++

#94

I wonder what's the consensus on HN about April Fools blog posts like this one. It's probably a cultural thing but I really feel like it's a waste of time, both for the readers and the writer. I don't want to be overly negative because of course they can be a way of publicizing cool things (in this case an open source library). It's just that every April 1st I open a lot of links only to be disappointed that their co…

There's no consensus, but there doesn't need to be either. If you think a submission should not be on HN, flag it. If enough people agree, it'll most likely be off the front page. (There are times when the mods overrule user flags, but I don't expect April Fools posts to be one of those cases.)

My personal standard is to flag any low-effort April Fools posts, whether I find them funny or not. At least build something neat as part of the joke. I'm not quite sure what a cool project to support a lame language war joke would have been. Given the zeitgeist, maybe a project that's using LLMs to auto-convert C++ to Rust releasing a mode that does the inverse?

This is post actually feels like almost the worst case. It's a low effort blog post, not funny, just reiterates stale language war talking points, and ends with self-promotion.

Re: Moving from Rust to C++

#95
post #11

Earlier quoted context omitted.

as you said, its annoying and a complete waste of time. Its essentially someone lying to their audience. As someone trying to build a reputation or a following, how do you do that?

This is truly an impressive thread. HN will really complain about anything. It doesn't matter how innocuous the article. Some might say everyone on here is chronically online, but I don't think that's true. It's really just part of the culture that every post on here is treated as an invitation to read into the author's intentions and assume the worst of their character. Doesn't matter what the article is actually ab…

You're doing it yourself! Right now, with that comment you just made, you're complaining about complaining, you're "[reading] into the author's intentions and assume the worst of their character", are you not?

Re: Moving from Rust to C++

#96

Nice april fools, but not as good as the "Really" proposal from last year: https://www.kdab.com/cpp23-will-be-really-awesome/

Nice, though the enum part wasn’t convincing, because separate compilation can still lead to not all cases being covered. Or rather, an enum type in C and C++ is really an integer type plus some associated constants, and the values that can be stored in that type aren’t restricted to the constants.

Re: Moving from Rust to C++

#97
post #11

Earlier quoted context omitted.

as you said, its annoying and a complete waste of time. Its essentially someone lying to their audience. As someone trying to build a reputation or a following, how do you do that?

I think the tradition of April Fools (and related, Onion-like satire) serves an important epistemological function, even more relevant and important in today's information environment. You cannot rely on tone and confident expression, but rather read critically. In this particular case, what's being satirized are a fairly complex mix of perceptions about community and what actually builds a programming language ecosy…

To be fair to the commenters here, I don't know you, I use both Rust and C++, and I have followed both languages pretty closely for a while without paying attention to the "characters" (the personalities and drama just don't interest me). This didn't hit as a joke to me - it hit as someone who was running from Rust to C++ for bad reasons, and doing it badly.

The arguments you were trying to make in a satirical way have basically already been accepted by everyone (except the small slice of people who will never be convinced by them), so the satire just doesn't make sense. Part of the humor of satire is that you are laughing at the fact that some people on the other side of the argument might agree with it.

Re: Moving from Rust to C++

#98
post #4

Given I have never heard of this person, the joke isn’t very funny. These internet April fools jokes are so tiring.

If you haven't heard of him, the joke's on you. Maybe. In any case, his work is worth looking into. He has done interesting work in font creation, font building primitives, rasterization, 2D drawing, and resistant social network graphs (which turns out to be more or less equivalent to the Old Sk00l Google Juice system). He was recently instrumental in performing a wonderful experiment in editor building -- wonderful…

Sorry but I didn't know the author either.

And with due respect, none of his work is directly aplicable in the majority of software development roles I have been involved with, directly and indirectly.

And that's fine. There's nothing to be ashamed of nor it is something to shame someone for.

The world is large and specialized.

If we were speaking about Linus or Bill Gates then perhaps it would be a surprise for some tech savy person to not know them.

Re: Moving from Rust to C++

#99
post #92

Funny thing, I've been moving Swift to C++, for real. I'm paying a price, but also getting some benefits. I'm not convinced that giving up on C++ and rewriting everything in a new language is a great idea. If I could get some compiler extensions to give me some experimental toys and syntactic sugar, I'd never be tempted by Rust/Swift/etc.

For what use cases have you been moving from Swift to C++ and what benefits have you seen? Unrelatedly, given that they all compile down to LLVM IR, in some sense Rust, Swift, and C++ are all syntactic sugar, aren’t they?

Yes, and no. I think Swift is doing some things that it can't optimize as well yet. I have some guesses about what that is (forced ref-counting, less control over memory layout, generics), but all I know is I'm getting significant performance gains in some graphics/geometry algorithms where I want to be a performance perfectionist and control everything. This is not a common use case. For building a basic app for iOS, Swift would be way easier.

I've also decided to support other platforms, and when you want to build for Linux, Android, Windows... Swift loses appeal.

Swift is quickly gaining on C++'s infamous "complexity". If you get in the deeper with generics, it's rough.

I've seen recent experiments by Herb Sutter and Sean Baxter, giving C++ a new syntax or adding experimental features as compiler extensions. This makes me think C++ is going to continue to evolve. How exactly, nobody's sure. :)

Post reply on HN