T
Thank you so much for your kind and encouraging words! I’m still a student and currently learning English. I’d also like to take an English proficiency exam, so for now, I’d like to keep using translation tools to participate in discussions here.
T
I've decided to stop keeping a diary after all
T
shard7: Would you consider adopting an IPC/RPC-based approach instead, where you do not have to deal with using the C ABI? I tend to dislike RPC approaches because they're brittle even on single-host setups. Particular pain points: If the RPC server dies, in general what clients do is not cleanly defined. It could hang, fail silently, or even crash. The need to orchestrate multiple processes is a PITA, because it's not as simple as just starting or killing everything. It is entirely possible…
T
ShangBrol: That moves the burden of translation from one writer to all readers, including the mods. I, as a reader can easily ignore such posts, but for mods it might be not so easy. I consider that a better tradeoff than someone with weak English being unable to get assistance with Rust at all. And note that I'm not saying that the writer shouldn't translate at all - but I'd prefer to have both clear native language and a bad English translation done by the writer (using their choice of tools…
T
New week, new Rust! What are you folks up to?
T
That moves the burden of translation from one writer to all readers, including the mods. I, as a reader can easily ignore such posts, but for mods it might be not so easy. Edit: I also think a diary is a blog not a series of forum posts, hence doesn't belong here. In addition, in the form of a diary it might be not so interesting to justify posting, a summary of the experience over some time might be preferable.
T
Hmm, I agree that that’s good general advice for a blanket impl, but it seems very unlikely to ever be applicable to the particular combo of Read + Write, and in particular will never enable the creation of a trait object (because you can't coerce Box<SomethingNotSized> to Box<dyn Trait> regardless of what Trait is), so it is not useful for a trait that exists for the sake of trait objects. Do you think it should be included anyway?
T
Thank you for your reply! I’m really glad I started this topic too!
T
Suggestion: // vvvvvv impl<T: ?Sized + std::io::Read + std::io::Write> ReadWrite for T {}
T
Pull request rust-lang/rust Correct and expand E0225 error explanation. (#166021) main ← kpreid:e0225 kpreid opened 03:48AM - 16 Nov 26 UTC +47 -13 * “Multiple types” should be “multiple traits”. * Closures are not relevant. (Th…is phrasing probably came from seeing `Box<Fn()>` as being something different from a normal trait, but today, `dyn` makes them all recognizable as trait objects.) * Explain and demonstrate two possible solutions for a problem that seems to require multiple traits, in…
T
As always, thanks a ton! StefanSalewski: That is a grammar issue, "defined it textually" would be a valid option. Yes, I was missing the word "it" here, that was a mistake. StefanSalewski: Are you sure you intend to use the verb "to err" here? I sometimes use "err towards" as a shortened form of the idiom "err on the side of ___" (definition). However, that might be a confusing rephrasing of the idiom, and additionally it's clearer to say "usually prefer" as you suggest. So I will change it to…
T
I've been working on Colorlessgithub.com/veecore/colorless-rs, an experimental rust toolkit to address the classic "function coloring" problem without code duplication or coroutine overhead. Quick Taste Here is a streaming key-value parser driven by callbacks (`ColoredFnMut`): #[colorless(C)] fn parse_records<'a, S, D>(mut source: S, mut sink: D) -> Result<usize, ()> where S: ColoredFnMut<(), C, Output = Option<&'a str>>, D: ColoredFnMut<(&'a str, &'a str), C, Output = Result<(), ()>>, { let…
T
By the way, I guess Write is only implemented for Vec<u8> since write accepts byte slice, but this fact isn't reflected by this label.
T
Certainly, you did an excellent work. Your code is a good documented and well structured. At quick glance, you pass multiple separate config parameters in some calls. I would prefer to aggregate the parameters under some structure. Even, if the structure will be changed in future, the signature of the methods will remain the same.
T
Yeah, generally refactoring is a never stop game.
T
user16251: What is its significance? My guess is that one might not realize, unless it was brought to your attention, that a Vec can function as a write buffer, which is quite useful. For example, you can have functions that output to a type that implements Write, and these will work whether you're writing to a file/socket, a buffered file/socket, or just an (in-memory) Vec.
T
I was curious about this as well, and I got this response, which I found to be informative: Trait labels in std docs - #2 by Anlis
T
On mobile so I'll pass on tracking down the PR, but the idea is to highlight "significantly important" traits that a type implements.
T
I noticed in Rust 1.100.0 the Vec documentation highlights the Write trait: Why is this? What is its significance?
T
That's more in tune with what the forum is for. I think just asking questions about what you're learning and validating it every now and then is a good idea. I have a couple of threads where I ask for help on a few things and get a lot of insightful help and discussion.
T
Yes, that is also my understanding of the flagging system.
T
Thank you for sharing that. My counterpoint for you to consider would be the following: a forum (or blog or whatever) is, by its nature, intended for public consumption. (If you want to keep a diary just for the sake of keeping a diary, then you could do it the old school way of writing it down in a private notebook). Given the fact that this is an English language forum (I don't actually know what the forum rules are on different languages, but it is de facto English language), then who are…
T
I don't have a reference for this at the moment, but if I remember correctly flags are not just for problematic posts, they're considered appropriate whenever we want to call moderators for something. And in this case your original question warrants their answer.
T
There’s something that’s been bothering me, so I’d like to say it. I don’t think it’s right for a forum to discourage other languages simply because English is the main language used here. I believe a forum should be welcoming to people who speak different languages. Also, I use both Japanese and English in my posts. That said, I really appreciate what you said about there being people who might be interested in following my learning journey. Thank you for that.
T
Presenter: One of the obvious dangers of AI, it may one day rewrite all code in some cryptic programming language no human is capable of understanding, just because AI understands it much better and finds so efficient to work with ... Voice from the hall: "Do you mean Rust?" Happened, really, yesterday during real meeting.
T
Well the "wrong" thing here, that I wanted to raise with the mods, is that this isn't the sort of forum where people keep personal diaries. It's also an English language forum, so I have to agree with the commenter in the other thread that having a learning diary, in Japanese, pinned to the top of the forum simply isn't what this forum is designed for. None of this is to say you shouldn't keep a diary - do whatever you want to. It's very common for people to do what you're describing, but they…
T
You’re free to flag my post, but I believe that reporting should be reserved for cases where a user has actually done something wrong.
T
I flagged your original post for review by the moderators because my understanding is that this forum is not the right place for what amounts to a personal blog. Consider that every day when you update it, it gets bumped to the top of the forum; it basically becomes a sticky. Consider also if more people started doing the same thing with their own threads - it doesn't scale well. I just felt that, technologically, this website is not the right medium for your diary.
T
Thank you so much for your thoughtful reply! I also really appreciate your offer to communicate in Japanese. I’m glad you don’t have a negative view of my learning diary. I’ll take your words, “Be bold,” to heart. For now, I’ve decided to pause my diary until I’ve had some time to sort out my feelings.
T
MusicalNinjaDad: A little later moving to a meta level by taking the off-topic discussion to a off-topic discussion of the off-topicness of the off-topic discussion (I think ...) ^ this