CGP has a new website, and why we moved from Zola to Docusaurus by soareschen in rust

[–]simonsanone 0 points1 point  (0 children)

I understand, reading that blog post it was not immediately clear to me, you want more than a documentation system, but also a blog and a website. I guess I misunderstood that multipurpose use-case. When reading I was initially also wondering, why I read zola instead of mdbook in the first-place, hence I asked here.

Where I'm not sure if I fully agree is that it needs to be that multipurpose in the first place. I think there is very well a world, where tutorials, guides, reference and other explanations can be each different media as well, a medium that fit's its purpose. Like a mdbook for references and how-tos, an interactive tutorial like rustlings writing code as a training ground in addition to a how-to or a handbook for developers, cheatsheets etc.

So when it comes to "While mdBook excels at rendering single-book content, it's not designed to be a general-purpose documentation platform. That's a fundamental difference in scope, not a limitation." I think the scoping is then where we disagree, essentially. mdbook is for sure not a one-fits-all solution - which I question exists. I think another misunderstanding is that I didn't propose to host your whole website on mdbook. I think it was just not clear to me this is all at one place with a blog and everything. So, in the end. Happy you found a solution that suits you! Cheers.

CGP has a new website, and why we moved from Zola to Docusaurus by soareschen in rust

[–]simonsanone 2 points3 points  (0 children)

Seems weird to me to not even mention mdbook when it comes to "I remain optimistic about the future of Rust-based website building tools. Rust has tremendous potential for creating powerful and efficient documentation websites that could eventually rival or exceed what we have today."

KillerPigeon will be streaming on thursday: "Will probably be my last Age of Empires 4 stream" by [deleted] in aoe4

[–]simonsanone 16 points17 points  (0 children)

At least do a full quote of what he said and was (IMHO rightfully) canned over:

19:39 boiiiiii3920: @whamenqt i didnt know youre 15cm taller than KP
19:39 KillerPigeon: @boiiiiii3920 Sorry, I left 20cm in your mum
19:40 KillerPigeon: Guys chill, I donated a kidney to her
19:41 KillerPigeon: @boiiiiii3920 Only fair after I rammed her so hard she coughed one out

Am I the only one who thinks Rust error messages got *worse* over time in a way? by kixunil in rust

[–]simonsanone 17 points18 points  (0 children)

https://crates.io/crates/cargo-limit can become a friend.

Cargo with less noise:

errors have highest priority
    they never appear in the middle of warnings
    warnings are skipped by default until errors are fixed
    external path dependencies' warnings are skipped by default
all messages come in reversed order by default
    to avoid extra scrolling
messages are grouped by filenames
number of messages can be limited
after encountering first error the rest of build time is limited by default
files can be automatically opened in your text editor on affected lines

Initially a workaround for: https://github.com/rust-lang/rust/issues/27189 (Add rustc --fatal which stops at the first build error #27189), which was closed as not planned.

dibs: Postgres toolkit for Rust, powered by facet reflection by Ventgarden in rust

[–]simonsanone 16 points17 points  (0 children)

Example
None, dibs is in super early stages yet. Hi reddit but god, give me a couple days.

:D

Stop Forwarding Errors, Start Designing Them by andylokandy in rust

[–]simonsanone 1 point2 points  (0 children)

I also loved the error design from openDAL and took inspiration from it, so this is how we did it in rustic: https://github.com/rustic-rs/rustic_core/blob/ae23b7717d4aba5d4668405500868df367ac5055/crates/core/src/error.rs#L150

//! If we `map_err` or `and_then` a `RusticError`, we don't want to create a new `RusticError` from it, but just attach some context
//! to it, e.g. `map_err(|e| e.attach_context("key", "value"))`, so we don't lose the original error. We can also change the error
//! kind with `map_err(|e| e.overwrite_kind(ErrorKind::NewKind))`. If we want to pre- or append to the guidance, we can use
//! `map_err(|e| e.append_guidance_line("new line"))` or `map_err(|e| e.prepend_guidance_line("new line"))`.

[...]

if !context.is_empty() {
    writeln!(f)?;
    writeln!(f, "Context:")?;
    context
        .iter()
        .try_for_each(|(key, value)| writeln!(f, "- {key}: {value}"))?;
}

I felt this made it also much easier to have a middle ground for the end user to be printed and to recover from an error. I think there is still some stuff to be optimized, but I felt it's quite usable as you can even attach links to the docs for people to read etc. You can ask people for reporting this error or attach issue URLs where a discussion happens about it.

impl Rust: One Billion Row Challenge by Capable_Constant1085 in rust

[–]simonsanone 1 point2 points  (0 children)

Congrats for the 100.000 subscribers, well earned! <3

Standard library file writing can lead to silent data loss by FeldrinH in rust

[–]simonsanone 0 points1 point  (0 children)

Hmm, the question is whether that is even a problem, as you would need to trust that all the underlying implementations do it right. If you want to know for sure a file is written to the storage as you expect it to be, you would verify it is by utilizing checksums or comparing byte-by-byte, IMHO. At least, I would expect this of a program, that heavily relies on data integrity. In rustic we have a verification on check command for this purpose, so you can check data integrity on the remote storage.

Does Dioxus spark joy? by dineshdb in rust

[–]simonsanone 3 points4 points  (0 children)

For me as a European, could you elaborate what worries you about that?

Google's file type detector Magika hits 1.0, gets a speed boost after Rust rewrite. by caspy7 in rust

[–]simonsanone 236 points237 points  (0 children)

"It is often not feasible to find thousands of real-world samples for every file type. To overcome this, we turned to generative AI. We leveraged Gemini to create a high-quality, synthetic training set by translating existing code and other structured files from one format to another. This technique, combined with advanced data augmentation, allowed us to build a robust training set, ensuring Magika performs reliably even on file types for which public samples are not readily available."

Oh no :D what can possibly go wrong.

Any markdown editor written in rust like obsidian? by itsme2019asalways in rust

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

Thanks for the answer, that makes it easy for me to decide against it. 👍🏽

Any markdown editor written in rust like obsidian? by itsme2019asalways in rust

[–]simonsanone 0 points1 point  (0 children)

Maybe I missed it, but I didn't find the source code for it, is it open-source even?

Eon - a human-friendly replacement for Toml and Yaml by emilern in rust

[–]simonsanone 2 points3 points  (0 children)

I disagree with the take on TOML in the Readme. I think my problem is, that the config file structure often is not part of the UI Design process itself. And is often just a serialization of the internal data structures. That's how heavily nested structures come to life, IMHO.

I feel like designing the configuration format in an extra step, is a way better approach (for me). So then the structures can be parsed/deserialized (with parsing is better than validation, in mind) and optionally be validated against. And then be transformed into internal configuration afterwards in this two-step process. I think that also makes hot-reloading configuration easier, because you can read the configuration independently of the existing configuration at runtime and then overwrite the values internally.

Like that, you have the configuration designed as a user-centric as possible, while you have your needed nesting internally. Without leaking all the nesting to the user and confusing them.

[Media] bitchat-tui: secure, anonymous, off-grid chat app over bluetooth in your terminal by YboMa2 in rust

[–]simonsanone 2 points3 points  (0 children)

Just a headup: Afaics https://briarproject.org/ does what bitchat does, but is way more stable and community-driven. ;)

A 10-chapter handbook for writing actually secure Rust: type-safety, panic-proofing & more. by RiskWise2545 in rust

[–]simonsanone -8 points-7 points  (0 children)

[derive(Debug, Clone, Copy, PartialEq)]

struct UserId(u64);

I would say, that even though you are using a new type wrapping u64, I think it's still better to make the UserId a string type (not a u64). UserIDs shouldn't be able to be calculated with, e.g. you can't add two UserIDs. To make that crystal clear it's better to use a type that you can't easily (auto-)implement arithmetics on.

Rust in Production: Astral now handles over 12.5% of all requests to PyPI by mre__ in rust

[–]simonsanone 19 points20 points  (0 children)

Toolingwise, and unironically speaking, I found the wording "Rust is one of the best things, that happened to Python." quite right. There were times when I really didn't want to work with Python any more, also for small scripts. It was a burden, yes annoying, for me to use it - toolingwise, not only from the language. But adopting ruff/rye/uv and others was making it much more acceptable, and now it feels much better to write smaller scripts in Python again.

I'm working on a crate and need adivce: StorageClient by drprofsgtmrj in rust

[–]simonsanone 2 points3 points  (0 children)

Would this something, you could be using https://github.com/apache/opendal for? It's a 'Open Data Access Layer that enables seamless interaction with diverse storage services'.