Yes, the macros parse the string at compiletime and generate code that does the formatting as given by them. Here is an example for how the code would look like expanded:…
Think of raising an orbit like moving an item from one side of your desk to the other. You have to put energy into doing it, but the end result is just as much in balance with gravity as the starting point. So if you…
Separating the "get to/from moon" vehicle from the "land on/start from moon) vehicle has indeed been the plan for many years now.
With dynamically sized types like `str`, Rust allows to separate "what kind of pointer + metadata is this" from "what kind of data does it point at". So, for example, you can have the types `str`, `[T]` or `Path`, and…
The github discussion thread where that originates from also contain the language designers optimistically discussing how in the worst case `Pin` just has to be hardcoded to exclude these optimizations. Which wouldn't…
Fully agree with that, and Rust makes that very easy still. Its 5-10 lines to spawn multiple threads that communicate with each other either via shared state or message passing, and I solve most paralleism problems that…
The flip will be less extreme in later designs because they will have better/larger RCS control thrusters to rotate it without involving the main engines. Also the center of rotation can be controlled to be inside the…
Affinity is a property of the type in Rust, so any given value is affine or not depending on which type it has.
Note that that is passing by value, so its moving/copying ownership. Its like having a immutable integer variable and copying it to a different mutable variable.
Wasm programs can only crash by triggering a "trap", which has the well defined semantic of aborting the entire (wasm) function stack at that point. It depends on the embedding host how much backtrace or debugging…
I think they just meant that Rust references are like normal first-class generic types. Eg, you can nest them to get a &mut &T for example, since they behave more like a pointer in that regard. C++ references on the…
Rusts references behave like plain raw C/C++ pointers at runtime, without any bookkeeping code running at all. The magic all lies in the compiletime borrow checker, which roughly works like this: - All data is accessed…
I don't have concrete examples, but in general: For one, the build system/dependency system is much more easier to handle. Rust uses the cargo package manager, and depending on an external library is as simple as adding…
Hi, me and a few others in the Rust community kinda hashed out an plan of how you would do safe code un- and reloading Rust. Its nothing official, and has no implementation or official RFC/proposal yet, but the idea…
The multi threaded architecture of servo is actually more energy friendly than existing engines for the same workloads, since distributing the same amount of work over more cores means that each core has to do less, and…
Note that I'm not really familiar enough with versioned symbols to know whether there is much more to it than just a specially formatted name.
The default name mangling of Rust library symbols is already kinda versioned because it includes a hash of the library, so two different versions of a library can coexist at the same time. As far explicitly using the…
That's not a list of Show, that's a list of a single type that instantiates Show. The difference being that in your code you can only put in a single type at a time, eg [Int] or [String], but not both Int and String…
Well, the first two are really just the same thing :P
Yes, though this particular code would not compile because one of the lifetimes is not declared.
Rust actually has two different reference counted smart pointers: `Rc`, which uses non-threadsafe reference counting, and hence is not sendable across thread boundaries; and `Arc`, which uses atomic reference counting…
Yes, the macros parse the string at compiletime and generate code that does the formatting as given by them. Here is an example for how the code would look like expanded:…
Think of raising an orbit like moving an item from one side of your desk to the other. You have to put energy into doing it, but the end result is just as much in balance with gravity as the starting point. So if you…
Separating the "get to/from moon" vehicle from the "land on/start from moon) vehicle has indeed been the plan for many years now.
With dynamically sized types like `str`, Rust allows to separate "what kind of pointer + metadata is this" from "what kind of data does it point at". So, for example, you can have the types `str`, `[T]` or `Path`, and…
The github discussion thread where that originates from also contain the language designers optimistically discussing how in the worst case `Pin` just has to be hardcoded to exclude these optimizations. Which wouldn't…
Fully agree with that, and Rust makes that very easy still. Its 5-10 lines to spawn multiple threads that communicate with each other either via shared state or message passing, and I solve most paralleism problems that…
The flip will be less extreme in later designs because they will have better/larger RCS control thrusters to rotate it without involving the main engines. Also the center of rotation can be controlled to be inside the…
Affinity is a property of the type in Rust, so any given value is affine or not depending on which type it has.
Note that that is passing by value, so its moving/copying ownership. Its like having a immutable integer variable and copying it to a different mutable variable.
Wasm programs can only crash by triggering a "trap", which has the well defined semantic of aborting the entire (wasm) function stack at that point. It depends on the embedding host how much backtrace or debugging…
I think they just meant that Rust references are like normal first-class generic types. Eg, you can nest them to get a &mut &T for example, since they behave more like a pointer in that regard. C++ references on the…
Rusts references behave like plain raw C/C++ pointers at runtime, without any bookkeeping code running at all. The magic all lies in the compiletime borrow checker, which roughly works like this: - All data is accessed…
I don't have concrete examples, but in general: For one, the build system/dependency system is much more easier to handle. Rust uses the cargo package manager, and depending on an external library is as simple as adding…
Hi, me and a few others in the Rust community kinda hashed out an plan of how you would do safe code un- and reloading Rust. Its nothing official, and has no implementation or official RFC/proposal yet, but the idea…
The multi threaded architecture of servo is actually more energy friendly than existing engines for the same workloads, since distributing the same amount of work over more cores means that each core has to do less, and…
Note that I'm not really familiar enough with versioned symbols to know whether there is much more to it than just a specially formatted name.
The default name mangling of Rust library symbols is already kinda versioned because it includes a hash of the library, so two different versions of a library can coexist at the same time. As far explicitly using the…
That's not a list of Show, that's a list of a single type that instantiates Show. The difference being that in your code you can only put in a single type at a time, eg [Int] or [String], but not both Int and String…
Well, the first two are really just the same thing :P
Yes, though this particular code would not compile because one of the lifetimes is not declared.
Rust actually has two different reference counted smart pointers: `Rc`, which uses non-threadsafe reference counting, and hence is not sendable across thread boundaries; and `Arc`, which uses atomic reference counting…