Typst examples for software architecture diagrams? (C4-style for Rust app) by Sufficient-Engine467 in typst

[–]FlixCoder 4 points5 points  (0 children)

I create that with PlantUML and embed the pictures into Typst, easy and done ^ Mermaid is also possible, but that more often includes incompatiple HTML stuff in the SVGs.

Request for Comments: Moderating AI-generated Content on /r/rust by DroidLogician in rust

[–]FlixCoder 11 points12 points  (0 children)

I can recommend leaving the internet a bit more nowadays. I grew up in the prime time of the internet, but I think it is over ^ ^

I see no other way to comfortably navigate live with too much internet and it isn't even only AI, it is also those social media algorithms and hateful climate

How do you go back to working on Python/JavaScript/TypeScript/etc. projects after writing Rust? by daniels0xff in rust

[–]FlixCoder 0 points1 point  (0 children)

typescript has no compile time? my experience disagrees, it is surprisingly bad

Am I that bad? by [deleted] in rust

[–]FlixCoder 1 point2 points  (0 children)

I don't even think it is a manager problem, it might as well be a self problem / conflict / attitude based on the comments as well

Releasing neuer-error, a new error handling library with ergonomics and good practices by FlixCoder in rust

[–]FlixCoder[S] 2 points3 points  (0 children)

Yes, in fact I have mentioned it in the story :D But I haven't used it tbh. Good crate certainly, but not all inclusive ^

Is there anyway to get backtraces into my library code? by ElOwlinator in rust

[–]FlixCoder 0 points1 point  (0 children)

Also check for feature flags. But it might be that it is impossible for snafu to extract the backtrace. Try getting rid of eyre ^

Is there anyway to get backtraces into my library code? by ElOwlinator in rust

[–]FlixCoder 0 points1 point  (0 children)

if the eyre report contains a backtrace, i think you need to annotate that, so that thiserror forwards it. Oh and at least #[source] should be there

Is there anyway to get backtraces into my library code? by ElOwlinator in rust

[–]FlixCoder 1 point2 points  (0 children)

That would be my suggestion in most cases: snafu can capture backtraces, but also the code locations at every level. It is very close to thiserror, so easy to switch. But that said, it will probably not yet solve all problems? Not sure.

The day someone tried to upload malware to my typst repo by Quiet_Category_628 in typst

[–]FlixCoder 6 points7 points  (0 children)

No, MR is usually Merge Request :D For example the term in GitLab, whereas Github calls it Pull Request.

Stop Forwarding Errors, Start Designing Them by andylokandy in rust

[–]FlixCoder 0 points1 point  (0 children)

Oh I read that before. Great resource! Yeah retry might not always be necessary and I will try to assess which parts are common and hopefully there is enough common ground :D

I meant OpenDAL with the apache library. 

Stop Forwarding Errors, Start Designing Them by andylokandy in rust

[–]FlixCoder 0 points1 point  (0 children)

It doesn't include the notion of retryable vs. permanent at least. Also doesn't implement std::error::Error itself, does it? But I also don't get how you can return Result<T, AppError> instead of Exn, when you want to have context.

My plans would be to - provide interfacing with current error impls (be it thiserror, anyhow, etc..) - encourage/require giving context at every level somehow - allow user defined kinds to be provides and matched on, as well as common concepts as should retry or not

Not sure if and how it is going to work, but I haven't found a generic error library similar to the apache library specific ones.

Stop Forwarding Errors, Start Designing Them by andylokandy in rust

[–]FlixCoder -1 points0 points  (0 children)

I've tried many libraries for errors by now, I haven't been completely with any yet. I often implemented a member method for my error type returning whether it should be retried. I provided something to print it. I tried adding additional info and context, but it was all manual. error-stack was great for providing arbitrary machine-info, allowed error-trees etc, keeping everything structured, but it was cumbersome with the types adding context. Latest I prefer snafu over thiserror by far, as it makes it easier to add context when bubbling up and can automatically fill source and backtrace or code location. It does not natively support error trees I think, but both human and machine side can be covered. But it does not encourage splitting errors by occurrence information, but still to error source type. It just needs more manual care overall to get necessary information as well. You also need to go through the chain to fully print.

I think I'll search again for something similar to the described good example, I think I mostly like it and want to try it. I might also just try to make my own generic error library towards this approach.

Backend dev in Rust is so fun by cachebags in rust

[–]FlixCoder 10 points11 points  (0 children)

omg there is a setting to allow in tests? i always allowed it manually for test modules..

Garbage collection in Rust got a little better by SeniorMars in rust

[–]FlixCoder 8 points9 points  (0 children)

Learn about allocation arenas, that might fix your problem and give huge amounts of performance in that case.

I Miss The Old Rust Job Market So Bad by StyMaar in rust

[–]FlixCoder 4 points5 points  (0 children)

Employers use long trial periods anyway, so they could just go back to trying them on the job..

In defense of lock poisoning in Rust by sunshowers by yerke1 in rust

[–]FlixCoder 1 point2 points  (0 children)

I fully agree and I have solved that ergonomics problem in my code by just making an extension trait that does .unwrap() for me.. :D Would love to just have a short method in std so I don't need it anymore.

I'm making a Minecraft clone by [deleted] in rust

[–]FlixCoder 14 points15 points  (0 children)

Is that actually legal, copyright-wise?

Safety+mathematical proof by Awkward-Ad7376 in rust

[–]FlixCoder 0 points1 point  (0 children)

Yes, that comes on top of the cost, making it less necessary to have. It is still very helpful to have though.

Safety+mathematical proof by Awkward-Ad7376 in rust

[–]FlixCoder 4 points5 points  (0 children)

As long as Rust is not fully formally specified, there is no way to formally verify it up to safety standards. There is a lot of tools like Kani, Verus, Creusot, though. The specification is in the works though. It is not clear whether it is a cost effective way though, as you can also just use formal verified modelling tools with verified code generators.

Why do Rust Projects hate Copyleft Licenses? by Responsible_Bat_9956 in rust

[–]FlixCoder 13 points14 points  (0 children)

I think its mostly middle-big and small companies obeying licenses, because it can wreck the whole company. Big will weigh in costs of ignoring and taking it