The hottest Substack posts of Art’s Substack

And their main takeaways
79 implied HN points 14 May 24
  1. Porting a system from Python to Rust led to a significant cost reduction of 1400 times, increased pipeline success rate from 85% to 99.88%, and decreased data availability time from 10 hours to less than 15 minutes.
  2. Moving from reading everything into memory to streaming fashion and eliminating the intermediate JSON format were key improvements in the data processing system.
  3. Python's interpreted nature, dynamic typing, GIL limitations, and multiple packaging options can pose challenges in production systems, making it a less ideal choice for certain needs.
39 implied HN points 24 May 24
  1. In Rust, sending futures between threads safely can lead to compilation errors. This can happen when sharing mutable data across threads that must be protected with a Mutex.
  2. The issue with sending futures between threads safely is due to the fact that futures in Rust are required to implement the 'Send' trait. Problems arise when trying to hold a MutexGuard across an await, causing the future not to be Send.
  3. To resolve issues related to sending futures between threads safely in Rust, one solution is to explicitly introduce a scope to handle locking and unlocking of the MutexGuard around the await, ensuring that the future is 'Send'.
19 implied HN points 16 May 24
  1. Rust offers benefits like performance, reliability, and productivity, with tools like cargo, cargo-llvm-cov, and criterion.rs enhancing its capabilities.
  2. Understanding lifetimes in Rust helps prevent dangling references and ensures data integrity.
  3. Benchmark results show Rust outperforming Python dramatically in terms of speed, with optimizations like different memory allocators significantly impacting performance.
19 implied HN points 15 May 24
  1. In Rust, errors are typically modeled using enums and can be streamlined using libraries like `thiserror` to reduce boilerplate.
  2. Boxing error types in Rust enums can help limit the maximum size of `Result<T>` and affect stack space usage, as illustrated in the example provided.
  3. Compiler optimizations and versions can significantly impact stack allocation for Rust functions, as seen in the comparison between Rust 1.74.0 and 1.75.0.
Get a weekly roundup of the best Substack posts, by hacker news affinity:
3 HN points 12 Jun 24
  1. The One Billion Row Challenge in Rust involves writing a program to analyze temperature measurements from a huge file, requiring specific constraints for station names and temperature values.
  2. The initial naive implementation faced performance challenges due to reading the file line by line, prompting optimizations like skipping UTF-8 validation and using integer values for faster processing.
  3. Despite improvements in subsequent versions, performance was still slower than the reference implementation, calling for further enhancements in the next part of the challenge.
0 implied HN points 14 May 24
  1. Art is launching a Substack soon.
  2. You can subscribe to Art's Substack for updates.
  3. The launch date for Art's Substack is May 14, 2024.