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. 😁
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.
@soller imagine this must be quite special to you as BDFL of @redox . I actually don't remember if i discovered redox or #RustLang first, anyways coding some rust on a #riscv based @system76 device running redox is what I am hoping for. might the best of you and the community converge!
I regularly use and love #Typescript. I used to use #Python the most – it’s what I learned in and I am more interested in backends than frontends. I also am regularly using and really enjoying #Kotlin (so much better than #Java). But truly Typescript is bae.
#Julia is a joy to work with. Very much like Python but more powerful. If it had the library support Python or #JVM has I would probably prefer to use Julia for backends.
But Typescript really changed the game and now that’s probably my favorite language not just because of the language itself but because it has web dominance. Until I can write #WASM with Python or Kotlin or Rust, and I’m building #web applications, TS is my lingua franca.
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!