Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dureuill
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
151.
▲
by
dureuill
5y ago
note that IME, pyo3 was nowhere near as stable and reliable than pybind (or boost::python), at least at the time I last used it (2y ago? I remember soundness issues around inheritance, and I got a bona fide segfault without any unsafe). The
152.
▲
by
dureuill
5y ago
This is not what I mean. I mean make it mandatory for these networks to allow interconnection with eg the fediverse, so that I can connect with people on Facebook or Twitter without having an account on these services myself. Currently user
153.
▲
by
dureuill
5y ago
i mean forcing the dominant networks to interoperate with the fediverse. i can open as many diaspora and mastodon accounts as i want, i will still be alone because everyone i know is on twitter and facebook. make it mandatory that facebook
154.
▲
by
dureuill
5y ago
good news. we also need interoperability requirements for social networks. like twitter and facebook must be mandated by law to provide access to their networks to smaller networks. only then would people be free to leave these networks wit
155.
▲
by
dureuill
5y ago
Or implied by the #[keep_calm] attribute
156.
▲
by
dureuill
5y ago
That attempts to provide it. I have been trying to use autocxx for a while, without success at the moment. It is very actively developed though so I trust that we'll get there eventually.
157.
▲
by
dureuill
5y ago
That's probably correct, I did not use concepts at the moment (stuck in C++14 right now). I certainly have my beefs with both features (modules that are orthogonal to namespace, no standard way to find modules, new and exciting ways of
158.
▲
by
dureuill
5y ago
> There are times when writing/profiling Rust when I wish I had access to exceptions instead of `Result` propagation. This introduces a whole bunch of design issues, but isn't `panic` (in unwinding mode) basically C++'s ex
159.
▲
by
dureuill
5y ago
I'm not convinced they're comparable. C++20 is adding a module system to C++. That's a major change to the compilation model. It is also adding concepts, a major change in the way templates are to be written. The very article
160.
▲
by
dureuill
5y ago
This is not a data race in the sense that Rust prevents. Case in point, here is the same race condition in Rust: - playground[0] (see for yourself) - inline code (not that long): use std::thread; use std::sync::atomic::AtomicU32;
161.
▲
by
dureuill
5y ago
My experience is mainly with C++, but from my own evaluation I'm x2 to x3 more productive overall in Rust than in C++. The reasons are a simpler build system that makes using the ecosystem faster, more expressive type system (iterators
162.
▲
by
dureuill
5y ago
> the maturity of the libraries in that area, While true for C++ which is not very interoperable, C being very interoperable means that there is no advantage into using a C API from C rather than from Rust. > how security critical yo
163.
▲
by
dureuill
5y ago
You could get productive in Rust in 3 months max, and then the productivity gains would quickly outweigh the initial investment
164.
▲
by
dureuill
5y ago
In general, I think they should go for Rust. See [1]. Now, embedded is a special case. You need platform support, and possibly certification, none of which are a given in Rust today. Arguably, not in C23 either at the moment, though. [1]:
165.
▲
by
dureuill
5y ago
Simple indeed. As such, it has "missing parts" that I think are important: 1. Reasons to intentionally panic are mainly for invariants that you failed to express through the type system, and so that have to be checked at runtime,
166.
▲
by
dureuill
5y ago
Yes, which also serves as a way to explicitly point out that the "surprising operation" is intended. Hopefully this even reminds you of putting an explanatory comment there.
167.
▲
by
dureuill
5y ago
> The thing is, C also makes me aware of what is happening, by letting programs fail when I forget about certain things. Not necessarily. Many C programming errors invoke Undefined Behaviour, and then "appearing to work correctly&qu
168.
▲
by
dureuill
5y ago
Yes, cxx.rs is really good for what it is! There's also autocxx that aims at generating cxx bridges directly. What Rust lacks is, to my knowledge, a C++ interoperability working group. cxx.rs (which is useable but by no means finished)
169.
▲
by
dureuill
5y ago
Great, now I want the same for Rust <-> C++
170.
▲
by
dureuill
5y ago
Sorry for not being clear. Should have written "when I start writing Rust" at this point. I have been using Rust personally since 2016, and professionally since 2019. Most of our codebase is naturally still in C++ (we're not
171.
▲
by
dureuill
5y ago
I measured it. On multiple projects. Some I started writing in Rust, so this is not the "rewrite effect" at play. I observe x2 to x3 on development time alone, long term if we compound review, debugging and maintenance I wouldn&#x
172.
▲
by
dureuill
5y ago
> I don't think the OP meant iterating on performance problems specifically, just generally iterating on code as one does when they write it. Also, every programmer at some point iterates about performance problems, not matter their
173.
▲
by
dureuill
5y ago
> But as the market exists right now, Rust developers are twice as expensive and the product they deliver is twice as bad. What? Why? I've been developing C++ for 10 years and seen firsthand the problems it causes and that are addre
174.
▲
by
dureuill
5y ago
there is lib.rs that I find much more efficient to discover crates. Requests is currently #6 in its Web programming > HTTP client category[0]. The download counts, number of contributors, version history, and dependent crates is also pro
175.
▲
by
dureuill
5y ago
Thanks. We've been using external projects since some of them are old style CMake, ripe with global variables, but apparently we could've used add_subdirectory for some other libs. I'll keep that in mind for future refactorin
176.
▲
by
dureuill
5y ago
I never found a C++ IDE capable of understanding our root CMake project so it can gives us autocompletion and inline errors. We have a root project that's fully CMake, that orchestrates our sub libraries (also using CMake, declared wit
177.
▲
by
dureuill
5y ago
Curious what kind of code you have. Sure, we don't have anywhere close to our C++ codebase in Rust, but we did integrate with a library that's on the bigger side, and compile times of the Rust part have been negligible compared to
178.
▲
by
dureuill
5y ago
The difference between the two is that "OnceCell" is more of a "vocabulary type" that is used to build other types and might get exported in public APIs, while regex is more of a "leaf type", if that makes sens
179.
▲
by
dureuill
5y ago
I wouldn't start a green field C++ project if I can help it[1], but if I had to I would probably go with the standard library with maybe as little boost as possible. [1]: http://cliffle.com/blog/prefer-rust/
180.
▲
by
dureuill
5y ago
Funny, I have a full time C++ job, and really don't see the appeal. Rust feels superior in every regards and especially dev experience. Want to exchange jobs ;-)?
More ›