Below you will find pages that utilize the taxonomy term “rust”
Rust - Simple graphs algorithms
Graphs (and trees - their special case) are data structures used in modeling complex problems such as finding an optimal route, exploring possible moves in a game, caching engines, modeling relations and more . That’s why they are very often the fundament of software engineer interview tasks in big companies - FAANG. Let’s implement some basic graph algorithms in Rust. Rust - single ownership and self reference Rust is a great programming language that achieves memory safety by forcing a single ownership model and borrow-checker mechanism.
Rust - Copy vs Clone vs Dupe
One of the features I love in Rust is very explicit copying. Every potentially expensive copy (clone) is clearly visible and can be easily caught during code review even though a small piece of code has been changed. That is probably one of the biggest advantages of Rust over C++. Nevertheless, more experienced Rust programmers know that it is not always easy to judge if some clone is expensive or not.
Carbon instead of Rust? Which is the true successor of C++
Carbon, a new programming language by Google that was announced at CppNorth 2022 conference as part of the presentation “Carbon Language: An experimental successor to C++” by Chandler Carruth on July 22nd 2022 (link ). The news spread quickly over the Internet and a few friends reach out to me to ask about my opinion about it and if Rust is going to die because of the appearance of a new baby of a big player in this industry.
Rust and Cpp interoperability
I’m a huge Rust enthusiast and you can read more about it in my previous article . Today, I’m gonna show you 2 examples of how Rust can be used together with some existing C and C++ codebases. Rust was designed with its FFI (Foreign Function Interface) in mind so it allows cheap (or even zero cost) interoperability with C and C++. For both solutions (plain C and C++), I’ll demonstrate that we can call C/C++ and Rust code back and forth (pass Rust callback to C++ code).
Usually, I’m skeptical about new technologies and programming languages. I take every novelty with a pinch of salt. Not because of the steep learning curve and lack of time but because I saw too many examples where promises were not delivered. The majority of the new technologies provided only minor improvements which were not really worth migration time. When I heard about Rust for the first time, my feelings were the same: if you need strongly typed high-performance native language without GC, why not just modern C++11 (or newer) instead of a new language?
How the type error cost NASA $ 327 million
On December 11, 1998, NASA launched the Mars Climate Orbiter - robotic space probe designed to explore Martian climate from orbit and also to act as a communications relay for polar lander sent 2 months later. Nobody expected that after 9 months journey it will crash in the atmosphere from such simple software mistake. Hard problems in NASA scale NASA puts a lot of effort into reliability. A lot of things can happen in space that we do not observe so often (or never) on Earth e.