Earlier quoted context omitted.
All you need for algotrading is to query an api. Rust would be a poor choice for that anyways, like using a semi truck to carry your bike around.
Performance is super critical in high frequency trading, so Rust sounds like reasonable choice. Having your code run a millisecond faster means beating out a competitor with the same algorithm as you, getting you a better price.
Rust 1.45
221–227 of 227 posts
Re: Rust 1.45
#222This rather niche fixing of unsafe behaviour is excellent: https://blog.rust-lang.org/2020/07/16/Rust-1.45.0.html#fixin... I spent a few years as a scientific programmer and this is exactly the sort of thing that just bites you on the behind in C/C++/Fortran: the undefined behaviour can actually manifest as noise in your output, or just really hard to track down, intermittent problems. A big win to get rid of it.
Re: Rust 1.45
#223Earlier quoted context omitted.
> plenty of libraries with stable APIs that are buggy piles of hacks. E.g. the API: char *gets(char *s); has not changed in probably forty years. Rock stable!
Not A imply not B, does not imply that A imply B.
Re: Rust 1.45
#224Any algo-trading backtest frameworks in Rust?
Not that I'm aware of. I wrote my own. Rust has great libraries to make life easy, eg https://docs.rs/fixed/1.0.0/fixed/ (Note: I haven't benchmarked the 4 or 5+ fixed precision libraries Rust offers to see which is best.)
Re: Rust 1.45
#225I keep seeing more and more news about Rust, and figure that perhaps it is time that I learn something new. 99% of my development work these days is C with the target being Linux/ARM with a small-ish memory model. Think 64 or 128MB of DDR. Does this fit within Rust's world? I've noticed that stripped binary sizes for a simple "Hello, World!" example are significantly larger with Rust. Is this just the way things are…
Re: Rust 1.45
#226Earlier quoted context omitted.
1. Panicing is not in line with how `as` casts are supposed to act. (e.g. `u32value as u8` does not panic but just takes the "lower" one byte.) 2. This might (I haven't profiled it) introduce performance regressions in ways which should not happen. 3. Besides in some usages around `dyn` other usages of `as` get increasingly more alternatives. It's just a question of time until `as` (for int/float casts) is recommende…
> Panicing is not in line with how `as` casts are supposed to act. (e.g. `u32value as u8` does not panic but just takes the "lower" one byte.) So, instead of this being traditional UB, it was a combination of two separate issues: - Rustc erroneously emitting code that exercised an LLVM UB case, and - Imprecise Rust documentation around the exact behavior of float -> int ‘as’ casts
Re: Rust 1.45
#227Earlier quoted context omitted.
Not A imply not B, does not imply that A imply B.
Nobody on the internet but you knows about the contrapositive; but you can fix that!
As you snarkily imply, the contrapositive should be common sense and not need to be stated. Yet your brain failed to see that your comment on gets() is exactly such a needless truism.