Moving from Rust to C++
121–130 of 145 posts
Re: Moving from Rust to C++
#122Earlier quoted context omitted.
That said, for those of us that don't have the luxury of working only in Rust, the cargo monoculture is a problem. 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.
This is in fact one part of the post that was based on an unironic kernel of truth. I've wrestled with this more than most people. In particular I tried to fit cargo into the Fuchsia build system, with only partial success. That approach has been abandoned and Fuchsia now translates Cargo manifests into GN build rules, which seems to be the prevailing approach for polyglot builds, especially with Bazel. However, the…
Re: Moving from Rust to C++
#123Re: Moving from Rust to C++
#124Earlier quoted context omitted.
This is in fact one part of the post that was based on an unironic kernel of truth. I've wrestled with this more than most people. In particular I tried to fit cargo into the Fuchsia build system, with only partial success. That approach has been abandoned and Fuchsia now translates Cargo manifests into GN build rules, which seems to be the prevailing approach for polyglot builds, especially with Bazel. However, the…
Do you have a pointer for the translation? As soon as you have a transitive dependency on libc or any other Rust binding to a C library that approach would seem to fail due to the presence of build.rs.
https://fuchsia.googlesource.com/fuchsia/+/master/tools/carg...
Re: Moving from Rust to C++
#125Earlier quoted context omitted.
Do you have a pointer for the translation? As soon as you have a transitive dependency on libc or any other Rust binding to a C library that approach would seem to fail due to the presence of build.rs.
Yes, the tool is cargo-gnaw. It does not evaluate build.rs files itself, but there is a process for evaluating them at the time the crate is vendored. 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.
Re: Moving from Rust to C++
#126Earlier quoted context omitted.
Maybe I am being dumb, but isn’t the opposite true? Or is that the joke? I can’t tell if the joke is that backwards compatibility is good or whether it’s that the languages are switched there
There is no backwards compatibility with popular programming languages. Syntax, dependencies, documentation etc changes so fast, that when I tried to get some simple example working, there were not any working examples at: 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…
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.
Re: Moving from Rust to C++
#127I 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…
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
Re: Moving from Rust to C++
#128Earlier quoted context omitted.
One of the most important people in the later development of X Window, also worked on other 2D drawing APIs. [ EDIT: I was wrong about X Window. Take back all the karma! ]
I was only tangentially involved in X, but was active in a lot of related projects (some Gtk infrastructure, Ghostscript, the seeds of what became Inkscape), and now work on GPU-accelerated font rendering. I also played a central role in getting Rust adopted at Google, and now one of my passions is advancing the Rust GUI space, as I feel like that has enormous potential.
Re: Moving from Rust to C++
#129Earlier quoted context omitted.
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++
#130Earlier quoted context omitted.
I don't feel like this content is "just" a joke. It is a joke, it's also a discussion of what the author views as c++'s shortcomings. 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.
Yeah but, is there any argument that’s more tiresome than Rust people pointing and laughing at C++?