News for hackers. Stuff that matters.
Re:Taking ML to production with Rust by psv1 on Monday December 02, 2019 @06:07AM (#21681455)
> Rust doesn't have to replace anything. It can be used to create complementary packages especially ones that use C/C++.

I'm not sure that I understand correctly - are you suggesting that people use Rust as an additional layer between Python and C++?

Re:Taking ML to production with Rust by mcherm on Monday December 02, 2019 @06:52AM (#21681644)
The original article is proposing that the existing C and C++ libraries be rewritten in Rust for performance reasons (while continuing to use Python to access the functionality).
Re:Taking ML to production with Rust by blub on Monday December 02, 2019 @08:53AM (#21682268)
I guess you meant memory-safety reasons because Rust is attempting to be as fast as C and C++, not the other way around.
Re:Taking ML to production with Rust by cogman10 on Monday December 02, 2019 @09:10AM (#21682386)
Depends on the domain.

For single threaded applications, as fast is the goal. There is potential for it to be faster due to stronger restrictions around pointers.

Multithreaded code is slated to be faster mainly because rust provides safety for patterns that would be difficult to do right in C++ (see servo css handling).

That is to say, you could do the same thing in C++, but getting it right is harder to do.

Re:Taking ML to production with Rust by blub on Monday December 02, 2019 @10:45AM (#21683374)
Concurrency patterns that are difficult to execute in the decades old codebase of Firefox, which also happens to be a browser aka nightmare of complexity.

The same environmental conditions don't apply to other software and it's perfectly possible to write blazing fast multithreaded software in C++. In fact that's SOP.

Re:Taking ML to production with Rust by eden_h on Monday December 02, 2019 @06:41AM (#21681591)
I've heard this suggestion fairly frequently - that people use Rust as a wrapper over C++ bindings to add in safety to the C++ underneath.

Mostly regarding using BLAS etc in Rust rather than C++. It seems a little pointless as the unsafe nature is within the underlying code, so it only santises input/output.

Re:Taking ML to production with Rust by pjmlp on Monday December 02, 2019 @06:45AM (#21681612)
For that use case it is more productive to actually use static analysis tooling for C++.
Re:Taking ML to production with Rust by blub on Monday December 02, 2019 @08:52AM (#21682262)
"people use Rust as a wrapper over C++ bindings to add in safety to the C++ underneath."

Adding a thin wrapper over an insecure library won't magically make it secure. That's why pure Rust or pure Swift versions of various algorithms and functionalities are worth so much - guaranteed memory-usage correctness.