News for hackers. Stuff that matters.
Re:UFO: A Drone/UAV Programming Library for Rust by blt on Friday April 05, 2019 @05:46PM (#19587363)
A low level flight controller needs only statically allocated memory, so one of the main benefits of Rust is irrelevant. The syntax is still nice though.
Re:UFO: A Drone/UAV Programming Library for Rust by bluejekyll on Friday April 05, 2019 @06:08PM (#19587492)
> so one of the main benefits of Rust is irrelevant

Not sure what you mean with this comment. Even in a context like this, Rust has a lot of safety benefits, but yes you don't have access to the stdlib, and are restricted to core.

Re:UFO: A Drone/UAV Programming Library for Rust by perennate on Friday April 05, 2019 @07:14PM (#19587921)
I think parent meant "one of the main benefits" = safety not as useful because anyway no dynamic allocations are needed to implement a basic flight control algorithm.
Re:UFO: A Drone/UAV Programming Library for Rust by bluejekyll on Friday April 05, 2019 @10:29PM (#19588785)
It also helps with other references, shared mutability, UB, etc.

Allocation and deallocation focuses on small sliver of safety, but yes, That’s not a concern in that context.

Re:UFO: A Drone/UAV Programming Library for Rust by StavrosK on Friday April 05, 2019 @06:04PM (#19587471)
And the much more stringent error checking, as I don't want a null pointer making my quad mow people down.
Re:UFO: A Drone/UAV Programming Library for Rust by vvillena on Saturday April 06, 2019 @05:37AM (#19590023)
There was a comment in another thread that talked about the benefits of using the ownership mechanism to control access to all the I/O. It's possible that Rust is useful to manage not just memory, but all kinds of hardware resources.
Re:UFO: A Drone/UAV Programming Library for Rust by Matthias247 on Saturday April 06, 2019 @03:27PM (#19592526)
As someone who has reviewed, debugged and fixed ton of issues in embedded code before, I strongly have to disagree. There are tons of memory issues that can also happen without dynamic allocations. Invalidated pointers to the stack are a prime example. Multithreading issues (on an RTOS) another one. And forgetting to release resources (e.g. a RTOS mutex lock) is yet another one.