Moving from Rust to C++
raphlinus.github.io
raphlinus.github.io
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 content is a joke just without it really being funny.
Sorry. It's Nim now.
Edit 1: Well, this just in, Verse is taking off.
Edit 2: Top language this second is JSFuck.
Edit 3: JAI was released two days in the future and was ported to JS.
I dont care.
In this particular case, what's being satirized are a fairly complex mix of perceptions about community and what actually builds a programming language ecosystem. I was able to poke gentle fun at myself (the Android font vulnerability) while also taking down some of the worst arguments out there, sadly common though. All this would be hard to express as a straight opinion piece.
Probably the biggest problem with this piece is that it has a moderately specialized audience. If you follow the adoption of Rust closely, hopefully you'll get a good chuckle. If you're only dimly aware of that, then there are too many insider jokes.
[I had intended to be "in character" in the comments here today, but have reconsidered. Appreciate the feedback, and happy to discuss substantive points]
Now, the thing is, it's entirely believable to me. Having witnessed the Stroustrup paper which honestly had some way less believeable yet honest reactions, i didn't even blink an eye.
I would have gone in with my day believing "well that's just dumb" had something not compelled me to click this post linked in the same mastodon post.
i wonder if the target audience might just be way too small for a post like this.
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.
Satire is dead.
I find this attitude way more exhausting and unoriginal.
The web just goes to shit with jokes which sometimes visibly take a lot of effort (e.g. unless this post was AI-generated and while it's much shorter than the author's usual, it is still to a pretty good standard (some of the hints are easy to miss though the "language evolution" is a huge hammer), other sites have complete redesigns or major flow changes just for that) but usually are not really funny, they dont feel whimsical or enjoyable[0], and from times to times just trigger dread.
This post does cause a pretty good double-take when you follow the author though so it's not bad.
[0] one semi-recurring prank which I do enjoy is subreddits swapping styles, it's completely harmless but it does cause surprise, and sometimes delight as your usual might be swapped with a very well-styled subreddit
It's valuable to have things like that written down every now and then, to give people context about why other people have made the choices they have.
April 1st would be a good time to do Winter's Day if we could pull that off (Winter's Day is a holiday from the Miracleman comics - to celebrate Winter Moran, Miracleman's daughter, by allowing children to run the world for one day per year. In the comic book Miraculous things are possible, so allowing young children to drive fire trucks and so on seems fine...). Maybe in low risk industries we could indulge more of this, so no five year olds driving fire trucks, but there are a lot of jobs adults do that kids wouldn't mess up too badly in a single day if we planned carefully to allow for that.
All these traditions to do something on a specific date often feel a bit forced to me. Especially those imported from other cultures. I would rather things feel more natural and spontaneous, than doing a prank on day x, buy significant other gift on day y, dress up on day z, etc.
April Fools isn't really about jokes, it's more about pranks, and pranks are hard to do well. You need a lot of shared in-group context to be able to pull off a prank that's bold enough to be funny, but innocent enough to not be harmful. You don't have that kind of context on the Internet. So instead you end up with some bland yearly variation on "Our software will substitute X for Y, where Y is something we do well and X is widely mocked and disliked. Here's a mock-up. April Fools!"
Which, y'know... eh. Far too predictable to be funny, and kind of disappointing when you're keen for a real update.
That's the real problem here. You can pretty much always get away with a joke -- if it's actually funny.
When it appeared it felt like magic and wad still unbelievable. It's sad that the things turned out as they are.
> Moving from Rust to C++. Unusual, but probably interesting.
> Written by Raph Linus? Fuck me, he must have a good reason.
> Oh. It's April 1st. I'm going to go organize my garage.
> "Ah yes, the timeless debate of Rust vs C++. It's like watching two old men argue about whose flip phone has better reception. At this point, who cares? The fights over one's choice of programming language are like a bunch of kids arguing over which color crayon is the best. It's petty, pointless, and ultimately irrelevant to the bigger picture. At the end of the day, what matters is not the language you use, but the quality of the code you produce. Choosing a programming language is like choosing a tool for a job – you should use the one that is most appropriate for the task at hand. Whether it's C++, Rust, Python, or whatever else floats your boat, the key is to use it effectively and efficiently. So, instead of wasting time arguing over programming languages, let's focus on writing good code and solving real-world problems. After all, nobody cares what language you used to create the next big thing, as long as it works and gets the job done."
i also agree that this is a troll post rather than an actual joke.
It’s probably fun for consistent readers of a single blog, but I never, ever want to see them on any kind of news aggregator, like here.
Most of the time though, April fool's stunts are bland corporate marketing. Internal comms tend to be like this too, with a Hawaiian shirt casual Friday vibe.
April Fools' Day is actually a super important defense against rogue AI and the Singularity. Think about it: our ancestors had the forethought to coordinate the largest data poisoning attack in history for hundreds of years. Why? To seed enough nonsense in our historical records so that any rogue AI would short-circuit itself into babbling nonsense.
Why do you think it took so long for AGIs like ChatGPT to emerge? Did you really think the AI winter in the 80s and 90s was a "coincidence"? That there were deep architectural and philosophical issues with the approach? Baloney. Without April Fools' Day, we would have become slaves to the Matrix by the late 90s, if not earlier.
Don't believe me? Well, here's proof that AI could have been developed in Medieval Europe by around late 13th century. For being the so-called "Dark Ages", the people of Medieval Europe were incredibly advanced compared to the 21st century, especially when it came to energy production. Get this: by the 11th century, England ALONE had more than 6000 wind and water turbines (Epstein 199) that they all built BY HAND. This allowed them to fine-tune the turbines to their unique environments, making them 100% more efficient than modern, mass produced metal junk.
Do you know what's even more amazing? Our ancestors knew about gravity and exploited it for power generation! What!!! We had a source of unlimited power by the mid-13th century (Epstein 208)!! But no: in the current age, we can't even muster the political power to make gravity-based perpetual motion machines because all of the physicists would whine about breaking Thermodynamics' laws. Well, screw Thermodynamics! Bastard is holding back all of humanity for personal profit by siphoning all of our hard-earned tax dollars towards solar and nuclear power. Gravity is where it's at!!
But I digress: back to AI in the 13th century Medieval Europe. So they had unlimited energy: how could they turn that into useful computations, like calculating SHA-256 hashes with k leading 0s? They had neither electricity nor silicon, or are there more truth bombs to be dropped? In this case, my dear reader, you would be correct to be sceptical. They didn't have any of that: what they DID have was grit, spit, and a whole lot of wooded land. Contrary to popular belief, they DID have computers back then, but they were based on flowing water instead of flowing electrons. They started out as simple time-keepers (Epstein 207), but eventually, medieval scholars (mostly Italian monks) starting seeing the connections between flowing water and logic gates (see [1] for how it would have worked).
So they had the energy and they had the computational ability: why didn't AI take over the world in 13th century Medieval Europe? Simply put: the power of Mother Nature. While our ancestors built computers, they were necessarily made out of a combination of wood and iron, both of which don't fare well when in contact with water. So when Medieval People discovered that their AI was Rampant, their solution was to confound it with April Fools' Day nonsense, so that by the time the AI returned to thinking about world domination, its computational structures would already be half-rotten and rusted. This is also why there is scant evidence of these water-based computers: if they were not purposefully destroyed, they would have been by time, as Medieval Europeans had the foresight to abandon all AI research in favor of just thinking. (Coincidentally, the lessons learned from early medieval computers would be taken to heart by the shipwrights and directly contributed to Europe's dominance during the Age of Sail).
So the next time you complain about April Fools' Day, just remember that it has saved society for hundreds of years. It is one of humanity's ultimate defenses against the Matrix, and if you truly care about your loved ones, you would contribute to it. I know I will.
Originally written as Latex in Microsoft Word 2003.
* [0] Epstein, Steven A. An Economic and Social History of Later Medieval Europe, 1000-1500. Cambridge University Press, 2009.
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.
It should make some kind of statement or call attention to some kind of issue, and the fact that people willingly believed your false report, by itself, should prove your point. That's the purpose.
But, of course, we live in a world where the minute you open your mouth, you're deemed responsible for other people's idiocy, so everyone's just making inane jokes.
If I want to waste my time with stupid nonsense, I go to twitter.
I’ve seen a project revert from python to php. That would sound like a joke to me if I didn’t know why they did it ;)
But I am glad that “April Fool’s” was in the top comment so I didn’t have to waste tooooo much time being perplexed or mad or… foolish
It was a good idea, but it turned out that there was so much friction with the business requirements we had to keep live.
After analysis, there just wasn’t enough runway. It was turning into Frankenstein’s spaghetti API monster. So the plan didn’t work out. It was wise to go back and look at reinforcing the existing product.
There were customers and contracts to fulfill.
Edit: as the “python guy,” I fought to make it work. But lol in retrospect we all made a better decision for the business goal we agreed on.
This is well done.
I can’t tell if the joke is that backwards compatibility is good or whether it’s that the languages are switched there
> C++20 brings us modules, an innovative new feature, and one I’m looking forward to actually being implemented fairly soon. Looking forward, C++26 will likely have stackful coroutines, the ability to embed binary file contents to initialize arrays, a safe range-based for loop, and many other goodies.
> By comparison, the pace of innovation in Rust has become more sedate.
The reason C++ is getting all these new features while Rust isn't is not Rust being held back by backwards compatibility, but that Rust has all those features already.
So he's basically saying: C++ is breaking backwards comparability to (eventually, years after the spec was published) bring us features that Rust already has.
C++, by contrast, has a tradition of maintaining backwards compatibility, but it is not enforced systematically, and in practice migrating to newer versions of C++ can be a painful process. Thus, in many application domains (especially embedded), developers are stuck on very old versions of the language. There's also a very sticky issue of whether binary (ABI) compatibility is guaranteed. There's nothing in the standards process that guarantees this, but there has been huge resistance to proposed improvements that break ABI. This was a particular sticking point for Google[1], as it affects unique_ptr, making it not so much the zero cost abstraction as originally hoped.
Language evolution is a difficult problem, and there is no magic, obviously correct answer to it. But I think Rust has a good, pragmatic approach, and the flaws such as Range are a very small part of the overall language surface area.
Modules are a particularly disruptive to the ecosystem. It's taking a long time to get them properly implemented in C++, and it also requires fairly major changes to code bases, build systems, and other infrastructure to migrate to them. By contrast, Rust has had a decent module system since 1.0 (with various tweaks and changes through the edition mechanism).
Edit: and as 'wongarsu says in a sibling comment, another part of the joke is that Rust doesn't need as much evolution as C++, as it already has a lot of the advantages such as a working module system.
[1]: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p20...
1) Official documentation
2) Official source code
3) Google search
4) ChatGPT4
So I feel, that to get anything done, I need to find those programming languages where syntax did not change, and that have existing documentation and books, with examples that still work, and where reading syntax does not require mind bending to impossible shapes.
I did not read that article as being a joke. It got me more interested about C++, that is refreshing.
That's probably an issue with the setup instructions. You probably don't have it installed right, or ran the compiler wrong, or something like that. Many languages are bad at explaining this part.
Unless this was a tiny hobby language the docs should compile.
Glad I came back through HN to read the comments, because without that I would have left that blog with a very different opinion.
These internet April fools jokes are so tiring.
[ EDIT: I was wrong about X Window. Take back all the karma! ]
:-)
But also, you really should move to C++, for all the reasons you listed!
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 because of the way it failed. It was something that one would think would work, but somehow it didn't. It's always interesting when intelligent and well-informed people are wrong about something. Perhaps there was too much Design and too little boring boiler plate.
https://levien.com/type/myfonts/inconsolata.html
https://levien.com/phd/phd.html
https://en.wikipedia.org/wiki/Sodipodi
https://en.wikipedia.org/wiki/Advogato
https://raphlinus.github.io/xi/2020/06/27/xi-retrospective.h...
They clearly should have migrated to C++ sooner :)
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.
I write C++; the post was hilarious. You're just being salty.
Unrelatedly, given that they all compile down to LLVM IR, in some sense Rust, Swift, and C++ are all syntactic sugar, aren’t they?
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. :)
Especially if you're coming from Swift anyways (which is more closer to Rust than C++).
"WE are better in every aspect, and joining the other team is sooo absurd, the idea is obviously a joke."
So I pick up a Rust project about once a year, and I always try and keep with stable releases. Yet every project I find some small should-be-obvious thing that's nightly only, and I either have to swallow my frustrations and find a work-around or switch to nightly for the project -_-
Yeah, well, joke is on you because I’ve heard this argument in real life.
then using keywords/APIs that start with "__" is even better! it significantly increases readability!
Nested macros are the most powerful feature and very fun to debug!
Saying this as a Rustacean.
also the part where they promoted make/cmake :((((
or claimed they can do unsafe code just fine...
all these are real world positions that i've heard defended by old C++ barnacles v_v
You also bet on wrong languages. M4 is battle-tested, stood the test of time, and is much more stable.
Or more precisely, as a result of that monoculture there is a single implementation of build.rs and it cannot interoperate with anything else. If cargo could optionally generate a build.ninja file or some JSON with the command it runs, it would be so much easier.
However, the experience when doing pure Rust is night and day compared with stuff like CMake. And even in a polyglot build, the Cargo manifest is a reasonably good starting point, as argued recently by matklad[1].
Obviously, build systems and package managers at large scale are very challenging to get right, otherwise we'd have a good solution by now. I personally think Bazel is a pretty good step in the right direction, but it's very clunky and awkward for smaller projects. I found Neil Mitchell's classification[2] useful. Cargo is best-in-class for the "small" and arguably "medium" cases, but starts showing its limitations beyond that. Bazel is the reverse, one of the few really workable choices for "huge" but not a great experience otherwise.
[1]: https://matklad.github.io/2023/03/28/rust-is-a-scalable-lang...
[2]: https://neilmitchell.blogspot.com/2021/09/small-project-buil...
https://fuchsia.googlesource.com/fuchsia/+/master/tools/carg...
I like the Meson model where the meta-build system is opinionated (not as much as cargo in the case of Meson, but still quite a bit) but, at the same time, it doesn't itself take care of the build. The build is done via build.ninja, static analysis and other tools use compile_commands.json. There is no reason why cargo couldn't work this way and even preserve the same command line interface.