HackerTrans
TopNewTrendsCommentsPastAskShowJobs

kimundi

no profile record

comments

kimundi
·5 anni fa·discuss
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: https://play.rust-lang.org/?version=stable&mode=debug&editio...
kimundi
·5 anni fa·discuss
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 want it back where it was, you need to spent the same amount of energy to move it in exactly the same way in the opposite direction.
kimundi
·5 anni fa·discuss
Separating the "get to/from moon" vehicle from the "land on/start from moon) vehicle has indeed been the plan for many years now.
kimundi
·5 anni fa·discuss
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 can have them behind the pointer types `&T`, `Box<T>` or `Arc<T>`.

If Rust had defined a special struct `Str` for `&str`, then it would have to define special structs for all the combinations possible: Str, ArcSlice, BoxPath, etc.
kimundi
·5 anni fa·discuss
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 make it the first type in the std lib that works similary (see interior mutability and UnsafeCell), so I personally intepret that as "unlikely to be an issue".
kimundi
·5 anni fa·discuss
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 way to this day in Rust. :D
kimundi
·5 anni fa·discuss
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 passenger section. Add some seats that can automatically tilt 90 degrees and the forces might be barely noticable.