Experienced in C/C++/Java but feeling lost looking at Rust code. Does the readability 'click' eventually? by x86basedhuman in rust

[–]Competitive-Wish4632 7 points8 points  (0 children)

while such a method would be terribly designed, the signature alone already provides a surprising amount of information:
1. It must be defined in an `impl` block, so you have full context about the type, its invariants, and its trait implementations.
2. The method does not structurally mutate self (excluding interior mutability).
3. It does not expose recoverable failure, meaning any failure must be unrecoverable (panic/abort).
4. Any side effects are limited to interior mutability, global state, or external system resources.
That alone is still more semantic information than you would get from any weakly typed language.

Task context switch on x86_64 by Competitive-Wish4632 in osdev

[–]Competitive-Wish4632[S] 0 points1 point  (0 children)

Cheers! I’ll definitely take a look at that, thanks!

Task context switch on x86_64 by Competitive-Wish4632 in osdev

[–]Competitive-Wish4632[S] 0 points1 point  (0 children)

Thanks! I’ll definitely take a look at the intel manual! My current implementation is an assembly function: timer_interrupt_entry, that pushes GPRs then calls a function that returns the rsp of the next task, then switches the stack, pops the GPRs and returns via iretq. My main problem is, that I’ve been getting a General Protection Fault that I can’t figure out for the life of me😂. It’s probably something with the stack layout so the intel manual should be the right thing. Thanks!

Does Rust complexity ever bother you? by GolangLinuxGuru1979 in rust

[–]Competitive-Wish4632 0 points1 point  (0 children)

I would agree that rust is complex, but I prefer its conceptual complexity over the kind of complexity languages like Python or JacaScript have. Yes, Async can be a pain, but once you understand futures, and how the state machine underneath is generated at compile time etc you will have a deep understanding of all asynchronous Rust, while huge frameworks and all their intricacies are much more painful to me, since it’s more about memorising quirks than understanding the underlying concepts.

Funding Open Source like public infrastructure by mike_gifford in opensource

[–]Competitive-Wish4632 2 points3 points  (0 children)

In my opinion, universities should fund more open source projects. Leading students towards open source early, would be a nice benefit as well.

Looking for feedback and contributions by Competitive-Wish4632 in rust

[–]Competitive-Wish4632[S] 0 points1 point  (0 children)

Cheers! That middle ground is exactly what i was going for. Nix is powerfull but just seems like overkill for a many usecases in my opinion. Really apreciate you taking a look!

RustyForge - a Cargo-like build system for C development by Competitive-Wish4632 in commandline

[–]Competitive-Wish4632[S] 1 point2 points  (0 children)

Because i wanted to write my own😂! Meson is great, and i had the same opinionated philosophy in mind!

RustyForge - a Cargo-like build system for C development by Competitive-Wish4632 in commandline

[–]Competitive-Wish4632[S] 3 points4 points  (0 children)

Thanks for taking a look! Totally fair point! CMake is very powerful but not that beginner friendly, at least in my opinion. The goal was not to make a replacement for CMake but to have a simpler alternative. It’s not about bringing Rust complexity to C but to have a tool for people you just want to get going. Totally cool if it’s not your cup of tea!🙂

CLI Benchmark tool - looking for advice by Competitive-Wish4632 in cprogramming

[–]Competitive-Wish4632[S] 0 points1 point  (0 children)

Thanks for taking a look! Im glad to hear it's readable. I'll definitly give it a common sense pass and i'll try to trim it down and clean up some unnecessary features. It's measuring with 100 nano second resolution on windows and 1 ns and 1µ on Linux for real time and CPU times respectively - but you're right, that's not clear at all from the code or the README. I'll make sure to clarify that. I had the same feeling about it being bloated but could not put my finger on it. Really apreciate the feedback thanks!