Can I just say I really love #RustLang. 😍 Not only was I able to eliminate an entire category of bugs today thanks to rust reference semantics but I also love the little language features.
Today's programming joy came from loops being expressions and break with a value. I can't count the number of times I've hand-rolled that in C or made an entire function just for one loop so I could use early returns. Having loop expressions as a language feature is really nice. 😁
With the Apollo app for Reddit shutting down soon, I’m going to need to start relying on Mastodon for all of my cute animal photo, gif, and story needs. #Apollo#Reddit#Animals#SmallTalk
@HistoPol
I am no an experienced #rust developer (I am learning, but my professional work, alas, is in Java) but I'd be interested in contributing what I can to a #Lemmy fork.
Former Rust Core team member, Founding Executive Director of the Rust Foundation, and Founder of axo, Ashley Williams will be joining EuroRust 2023 as a speaker! 🚀
Looking to take your Rustlang skills to the next level?
Go beyond the basics by studying design patterns & find tips and tricks that help speed up delivery and make full use of Rust’s lesser-known features: http://mng.bz/GymA
So I wrote this #rustlang program where I read and write a fixed size vec!. My algorithm doesn't always work like I want, so I added code to track where I read and write from it step by step to debug it.
The problem is that this tracking "pollutes" my code and I'd like to use a library or a macro to track get and set of this array so I can cleanly switch this tracking on and off.
Does anyone know a library that does this or do I need to write my own?
#Python folks: Any tips for learning it, coming from #Rust ?
I'm kind of reliant on the strictness of Rust, especially when it comes to using the wrong types and everything. Some way to force me to follow a similar style would be appreciated.
I'm also very reliant on Cargo, it's so clean and integrates everything nicely. I'm not sure if there's an equivalent for Python that matches Cargo.
New newsletter post! I wrote about 2500 words expanding on my thread a few days ago about values, types, and typeclasses, and explaining why I find it confusing that object-oriented languages conflate types with typeclasses.
If anyone's up for a challenge, we'd use some help figuring out why importing cryptography on #PyPy 3.10 causes errors to appear on the #OpenSSL error stack.
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 code in the new win32kbase_rs.sys in the Windows Kernel can also panic. What happens when it does?
There are several places where a panic is invoked in the code - they include bounds check failures (core::panicking::panic_bounds_check), indexing into a slice outside of the length of that slice (core::slice::index::slice_start_index_len_fail_rt), and assertion failures (core::panicking::assert_failed). These all eventually take a common code path through the following series of function calls:
This calls into a custom panic handler, seh_unwind::implementation::raise_exception, which calls RtlRaiseException, imported from the main ntoskrnl binary!