I think I am now addicted to writing and implementing traits to be able to chain function calls :ablobcatheartsqueeze:
For example, implementing your own trait on Result makes error handling much easier because you can just chain a function that maps the error to your error type with possible arguments!
You can just use map_err, but chaining is slimmer and more flexible.
Rust is the perfect language for chaining! Especially with .await and the ? operator :ferrisdance:
Oh wow, did you know that in #Rust you can use Option as an iterator such that your types align, when you want to return a chain of iterators from a function, but also have an else case where the iterator is empty!?
The more I use Skyline for #proteomics / #peptidomics the more I want to build a simpler alternative. Mostly just as a finder/viewer, without the parts doing statistics. Something like that.
I also really want to build something to extract and store thousands of spectra from tons of DDA and peptide search results. 🤔
「 UI in Rust is difficult because it's hard to share data across this component tree without inheritance. Additionally, in a normal UI framework there are all sorts of spots where you need to mutate the element tree, but because of Rust’s mutability rules, this "alter the tree however you want" approach doesn't work 」
via warp.dev
Dear Lazyweb: what’s a good hashing crate that’s very fast and lightweight and very unlikely to have conflicts, that’s not the sha family?
I’m not sure cryptographic security is important in this case, because the source of the data is already sha512-checked, but I still want something that can catch little things like cache corruption, and that can act as a unique key for usually-small data
I saw xxhash, but I guess I don’t understand enough to know if this is going to make the odds of conflicts practically nonexistent (I don’t want to have to check for conflicts at all) #rust#rustlang
Je viens tout juste de mettre à jour mon tutoriel pour apprendre le langage Rust en français. Notamment les parties sur les durées de vie et la généricité. Vous pouvez voir tout ça ici : https://blog.guillaume-gomez.fr/Rust
Just tagged #miette v5.9.0 with a couple of nice changes. Most notably, diagnostics in the .diagnostic_cause() chain will be rendered with their snippets, so you don't lose diagnostic info along the way when you wrap them! Thanks to @Hemera for the change!
In this #InfoQ article, Vitaly Bragilevsky shares findings and insights about the Rust community and ecosystem, and discusses the peculiarities and pitfalls of starting new projects in #Rustlang or migrating from other languages.
The theme is going to be announced at the submission opening - you can use it, but it's optional since the jam only wants to get people to write games in Rust.
I was (and still am) looking into various Rust build integration issues over the last weeks, specifically when integrating Rust code into existing C code bases.
Today I ran into one that is very easy to fix, and that e.g. shaves off half of the shared library size from librsvg.
Distros might want to do this explicitly in their builds for now.
Make sure to always pass --gc-sections (or equivalent) to the linker when linking a Rust staticlib into an executable or shared library. And in case of the latter, also make sure to only exports the symbols you want to export (librsvg did that part correctly).
Apparently this was also not mentioned anywhere in the Rust docs, and from looking around there seem to be more projects that are not aware of this. So I also added a section about this to the Rust docs (well, reference).
I've spent a good part of my weekend working on upgrading the GStreamer Rust bindings on Servo. The presentation by Martin Robinson from @igalia at @rustnl was a real inspiration.
I just published my first Rust :rust: crate: https://crates.io/crates/presage. I don't think anyone beside me will ever use it but I still felt very nervous 😬.
In the new Rust Windows kernel GDI code, there is a new global allocator registered named gdi_alloc::Win32Allocator . It calls Win32AllocPool with a fun new pool tag name, "Rust"!
The Rust Windows kernel GDI code also has symbols for fallible_vec::FallibleVec<T,A> , which looks like a non-panicking Vec implementation. try_extend, try_extend_from_slice, try_splice_in, and try_insert are all implemented.
The methods are generic over the allocator type A; some of these FallibleVec method implementations use the registered global allocator gdi_alloc::Win32Allocator , and others use the gdi_alloc::TaggedAllocator with the GDI-specific pool tags.
#Rust kennt keine "NULL"-Werte. Werde ich sie vermissen? Ich denke nicht 😁
Java-Code wäre einfach nicht dasselbe, wenn man nicht immer wieder auf null prüfen müsste oder einem eine NullPointerException um die Ohren fliegt, weil man den Check vergessen hat. Ja, Java kann auch seit einiger Zeit mit Optionals umgehen, aber leider wird das noch nicht so konsequent genutzt.
Rust ohne null ist eine schöne Design-Entscheidung. #SoftwareDevelopment#LearningRust#RustLang
@janriemer Der Vergleich ist schon beeindruckend. Ich möchte aber auch Optional in Java nicht schlecht reden und die Entwicklung in Java erst recht nicht. Wenn ich ein Team von guten Java-Entwickler:innen und eingespielte Prozesse habe, werde ich davon nicht so schnell loskommen. Man sollte sich aber stets umschauen, was es sonst noch gibt und sich auch fragen, warum es bestimmte Konzepte als Standard in eine Sprache geschafft haben.
Ein Vorteil neuerer Programmiersprachen ist, dass sie die Fehler der "Alten" nicht machen müssen. #SoftwareDevelopment#LearningRust#RustLang