Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
adventofcode
Advent of Code solutions of 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 and 2023 in Scala (by sim642)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
advent-of-code-2020
:christmas_tree: My Advent of Code solutions in Rust. http://adventofcode.com/2020
-
Clippy
A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
I can't seem to get at the platform-specific source using the normal Rust documentation viewer, but here it is in GitHub (and, for comparison, the Windows one).
Cargo.toml
There is an RFC to solve this: https://github.com/rust-lang/rfcs/issues/671
(see: https://github.com/sfackler/rust-postgres/blob/e15c9b1415f69821799f1370246581c1600a6196/postgres-protocol/src/types/mod.rs#L137)
You might want to look at Rayon instead, which is designed for compute-heavy parallelism. If your algorithm can be expressed using iterators, it's likely pretty straightforward to parallelize it with Rayon. Otherwise, you might look at rayon::join() which you can call recursively.
Can any data structure be concurrent? I'd like to practice concurrency but I'm lacking off of ideas. I'm very inspired by Jon Gjenset's concurrent hashmap. Any suggestion would be deeply appreciated!
I chose to reuse the first puzzle of adventofcode.com 2020.
it even comes with a space invaders example: https://github.com/parasyte/pixels/tree/master/examples/invaders
Cool to see the itertools approach here though :) Link to the solution I saw before
It looks like the current implementation is very naive and still needs to be expanded on: https://github.com/rust-lang/rust-clippy/issues/4520#issuecomment-703163340
In Haskell, you can do this with various trickery involving GADTs/constraints/singletons.
Also, for a much more fleshed out version of this see https://github.com/MayorMonty/mtrx