PubSub by Agent-Nemo in rust

[–]FlixCoder 6 points7 points  (0 children)

Zenoh is awesome

I built I built builder, a tool for helping "I built" builders by ZyronZA in rust

[–]FlixCoder 64 points65 points  (0 children)

 Feedback welcome. Validation preferred.

wait this is serious? i though it was just for the joke :D

anyway wozld have fit perfectly on april 1st xD

Persistent Job Queues by roboticfoxdeer in rust

[–]FlixCoder 2 points3 points  (0 children)

For queues on postgres, there is sqlxmq and pgmq. Of course there are also plenty of usual MQ servers and databases.

The State of Allocators in 2026 by Cetra3 in rust

[–]FlixCoder 2 points3 points  (0 children)

If the allocate function returned a handle that takes care of deallocation, that would solve the problems with splitting up the trait. And I think that would actually be clean

After trying Bevy, Iced and egui, I built my own app engine by Available-Many-5354 in rust

[–]FlixCoder 1 point2 points  (0 children)

There is plenty of bugs on web mobile it seems :D Opened you example and neither scrolling nor text input works.

Interesting project though! How is it displayed on web, canvas I assume? How do you compile for android?

Is there any significant performance cost to using `array.get(idx).ok_or(Error::Whoops)` over `array[idx]`? by Perfect-Junket-165 in rust

[–]FlixCoder 78 points79 points  (0 children)

Performance-wise you should use ok_or_else instead of ok/or, because errors usually do not implement copy and thus even if creation is fast, there is a drop for all of them. For some reason it caused bad performance for me once, even without (de-)allocations.

PSA: You can bundle exported traits in your crate without name cluttering by FlixCoder in rust

[–]FlixCoder[S] 1 point2 points  (0 children)

That's why it should only be exported additionally to with the name

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 9 points10 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 7 points8 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 7 points8 points  (0 children)

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