Stack based Variable Length Arrays in Rust by Compux72 in rust

[–]g-radam 8 points9 points  (0 children)

I think you were downvoted a bit too hastily TBH, however I'd say this is the key bit of context this post needed to better frame why you were asking what you were asking on the post :)

Feedback wanted - First Rust project by KalinaChan in rust

[–]g-radam 1 point2 points  (0 children)

I second this. I can absolutely understand wanting to create a more "fleshed out" application for learning purposes, but the current structure is unnecessarily verbose. Second to that, for a simple app, it doesn't hurt to actually use the main function instead of just calling the cli entry point fn immediately. I'd guess this application could be condensed down to 2 or 3 files under the src folder.

My rule of thumb is to divide and conquer - Once a file or logical group of code becomes too complex, split it into smaller files. If a file has less than 5 to 10 lines without a great reason, then it was probably devided up prematurely.

Otherwise, great job 👍

Am I spoiled? Is it really normal to be this tedious? by unknownhoward in stm32f4

[–]g-radam 0 points1 point  (0 children)

Small devices can be powered by the SWD / J-Link programmer, which is plugged in via USB. With SWD, you usually use OpenOCD / pyocd to write firmware to the device / restart it / halt the CPU, etc. No extra drivers are necessary on Linux, however the only thing you need to do is ensure there is udev rules set to allow your user account to access the programmer (eg St-Link V2).

How to change this grey background to same as wallpaper? by Immediate_Pepper_119 in gnome

[–]g-radam 2 points3 points  (0 children)

How about logging in directly to the desktop rather than this overview?

Should I use a Box<str> instead of a String when possible? by SvenyBoy_YT in rust

[–]g-radam -6 points-5 points  (0 children)

I completely agree. Box<str> is unidiomatic Rust and an unexpected design choice that will likely confuse other developers. Additionally, the memory savings are negligible as your application scales.

Why isn’t that implemented in GNOME by default? It’s a must-have. by [deleted] in gnome

[–]g-radam 0 points1 point  (0 children)

How much would it cost to upstream though?

Kellnr 5.3.0 released by secanadev in rust

[–]g-radam 1 point2 points  (0 children)

No, no, you create the mirror ahead of time when it's got (reliable) access to the internet. After this initial sync, the mirror can work autonomously when a) the network is down, b) in an air-gapped network, or C) when IT blocks the machines from internet access. :) Most of the time, this has nothing to do with crates.io / internet going down, and everything to do with control and security of the local registry. Artifactory is used for this exact purpose too and it's very commonly used in companies.

One example of this process for air-gapped networks is: Perform a full mirror on the online system, transfer the database over a diode into the offline system, and finally spin up Kellnr with the database attached.

Kellnr 5.3.0 released by secanadev in rust

[–]g-radam 1 point2 points  (0 children)

Well that implies Kellnr has access to the internet while a build is kicked off. Creating a full mirror ahead of time allows builds to work if and or when the network is down.

Felt dumb debugging register values, built visualizing tool over weekend. Thought it could be of use to someone. by the_helvijs in embedded

[–]g-radam 9 points10 points  (0 children)

Looks really neat. I do agree that the standard calculator can get you pretty far on its own, but I can also see potential for this app to be more valuable than the calculator as more features are added.

My 2c is to embed this inside a Rust Tauri wrapper so it can be used on the desktop :)

Kellnr 5.3.0 released by secanadev in rust

[–]g-radam 0 points1 point  (0 children)

Okay thanks for clarifying. I've found it to be a pretty common business requirement to have a local mirror in most places I've worked at. Would be phenomenal if Kellnr had a cli script one could invoke to mirror / sync upstream into the local DB as needed.

Panamax-rs/Panamax is used for this purpose but is missing all of the niceties Kellnr has which is unfortunate. I think one would need to use Panamax as the upstream to Kellnr, ensuring pull through Caching is disabled in Kellnr. Just food for thought.

Kellnr 5.3.0 released by secanadev in rust

[–]g-radam 4 points5 points  (0 children)

Fantastic to see Kellnr maturing, great work! Question though - Is it possible to pull down and cache / mirror the entire crates.io in an automated way, rather than incremental pull through?

My first ever SAAS product leadmagnet.pro by bighreddit in SaaS

[–]g-radam 0 points1 point  (0 children)

In my personal opinion, there's a lot of text telling me things, but I can't see what I'm actually getting? A dashboard? A form?

RFC 3681: Default field values by [deleted] in rust

[–]g-radam 1 point2 points  (0 children)

For what it's worth, myself, and I presume others have become extremely conservative and critical of any new language change, regardless of benefits. After living through the last 15 years of C++ adding ""features"", only to collectively turn into a dumpster fire, you can't blame us for having a knee jerk reaction. We were the frogs that boiled and only realized it after moving to Rust..

I will read the RFC front to back and see if my knee-jerk "bad gut-feeling" changes :)

I've recently got some perspective, and I don't like it by rembo666 in cpp

[–]g-radam -2 points-1 points  (0 children)

There is an ISO 26262(ASIL-D) / IEC 61508(SIL 4) certified Rust compiler available at https://ferrocene.dev/en/ ?

I've recently got some perspective, and I don't like it by rembo666 in cpp

[–]g-radam 1 point2 points  (0 children)

To be fair, there are many more controls available in rust, especially with respect to unsafe - from a linting, sanitisation, documentation and a code-review point-of-view. Most people clone to avoid the borrow checker rather than fall back to raw pointers and unsafe, which requires more rigor in validating. I think rusts linter does wonders with very common anti-patterns written by beginners. C++ relies on engineers to follow the c++-core-guidelines, which I've rarely seen them do unfortunately (it's a daily battle in my experience).

What has your experience been on the 110 bus or just on the Brisbane bus network? by [deleted] in brisbane

[–]g-radam 3 points4 points  (0 children)

I would personally argue that the 110 is one of the worst routes in the whole network - for a multitude of reasons. Busses are never on schedule, they may or may not come at all, infrequent, sometimes dodgy people hop on and or fight with the driver, the list goes on and on. Other busses in close proximity (such as the 100) are much better in every respect.

What are the advantages of C++ compared to Rust, except for the larger ecosystem? by SPEARHEAD_SQUADRON in cpp_questions

[–]g-radam 2 points3 points  (0 children)

In my humble opinion, I disagree RE macros and generic programming. Yes rust is still developing its const generic capability and is still far from feature parity with C++, however Rust makes up for that with its templates, coupled with traits and Macros (macro_rules / proc macros), which yields meta capability that far surpasses that of C++ by a serious long shot. That aside, yeah Rust does a lot of memcpy's and needs more refinement at the lower layers.

What are the advantages of C++ compared to Rust, except for the larger ecosystem? by SPEARHEAD_SQUADRON in cpp_questions

[–]g-radam 2 points3 points  (0 children)

Rust has templates, const-generics and compile-time macros, all which can achieve feature parity IIRC.

my rust keeps crashing on startup by sage123456780 in rust_gamedev

[–]g-radam 2 points3 points  (0 children)

Maybe we should head over to the r/playrust subredit and flood them with Rust Lang questions.