... must resist urge to rewrite more things in #rust
2 new #Rust libraries for yous. Read & write GeoJSON Sequences & JSON Sequences.
(rfc8142 & rfc7464)
https://crates.io/crates/geojsonseq
https://crates.io/crates/jsonseq
Oh Heaptrack is a nice programme to measure & analyze heap memory access of a programme. Works nicely & easily with #Rust code.
I'm finding it quite easily to reduce memory allocations in my code.
https://kde.org/applications/en/development/org.kde.heaptrack
https://speice.io/2018/10/case-study-optimization.html
ooohโฆ #Rust's `std::iter::from_fn(move || { โฆ })` is pretty useful. ๐
RT: @gf_256@twitter.com:
The year is 20XX. Web apps are built in C++ and #Rust with WebAssembly, and desktop apps are built in #JavaScript with Electron.
Grrr! I'm not supposed to get segfaults when writing #Rust programmes! This makes things hard
ah #rust lifetime checker we meet again
I'm writing this software in #Rust with reqwest. I wonder is there a caching wrapper for that?
"I know I'll just write a quick #Rust programme to proxy my http connections and add the header that I want".
Oh cripes, I forgot hyper's now gone weird with Futures and the like.
I have also learned about `impl Into<Cow<_>>` to accept a `&T` and `T`. Which, in retrospect, should have been obvious to me, but I just didn't put 2 and 2 together.
It should make my #rust code more cleaner/ergonomic!
"Elegant Library APIs in #Rust"
Now this is an interesting guide!
(I learned about the `impl Into<Option<T>>` which looks very useful!)
https://deterministic.space/elegant-apis-in-rust.html
Ung. I love #Rust in many ways, but the String/&str thing often wrecks my head. Why is there &str *and* &String? Making functions they can take either type is annoying. (currently trying to wrap my head around Borrow vs AsRef).
OMG, I just discovered if you put this in your Cargo.toml (in a #Rust proj) then dev mode will run as fast a release mode!
[profile.dev]
opt-level = 3
Must resist siren song of writing my own library for #JSONSchema validation. Though there is only one #rust library for #JSON schema validation..... Why not 2?
Hacker. #Queer. #OpenStreetMap, #FLOSS, IE/UK Pol, CynicismโชOptimism
โ/enby. pronoun.is/they ๐ณ๏ธโ๐๐ณ๏ธโโง๏ธ๐ฎ๐ช๐ช๐บโถโโ๐ฒ
Liberate everything. โถ