« first day (1252 days earlier)      last day (2244 days later) » 

1:09 AM
Search for "Producing a Minimal, Complete, Verifiable example for Rust"
I would love me some feedback
(or just... add to it)
@E_net4 And now the tag info does mention the playground
 
1:36 AM
@E_net4 @набиячлэвэли — y'all do stuff with raw transformations of bits, yeah? Maybe interested in internals.rust-lang.org/t/pre-rfc-frombits-intobits/7071
 
2:15 AM
@FrancisGagné oops, I cut I little too much off the top...
 
@Shepmaster that was my fault, it was formatted badly to begin with
copy-paste sometimes doesn't handle newlines as I expect
 
 
9 hours later…
11:29 AM
Which extension do I install for VSCode?
 
11:51 AM
There are 2 extensions, both are more or less the same
 
12:33 PM
So upon reading the github issue.. I see one is maintained by an user. whereas other one is offical from RLS
 
@Shepmaster LGTM, though I do wonder whether this should be moved closer to the top.
 
12:48 PM
Also github.com/editor-rs/vscode-rust seems no developments from October..
 
@cswl I use the one from the Rust team
 
It seems more actively developed..
 
@cswl I use the one developed by the user because there were good reason at the time I choose, but I cannot remember why.
 
It's currently seems inactive.. and looking for a maintainer :\
 
1:04 PM
@cswl Maybe I will switch to the official extension, then :p
 
 
1 hour later…
2:14 PM
It's a powerhouse of answers today, yeah!
 
I like the question
Reminds me of my struggles with [T; N] not being converted automatically to &[T] this weekend
(I was trying to have const C: [&'static [u8]; 3] = [b"1", b"42", b"1984"]; and it failed horribly because the arrays have different sizes)
 
2:35 PM
@MatthieuM. did you figure it out?
 
2:53 PM
I painstakingly created a &'static [u8] constant for each array element, then used the constants in the array, and it worked... not a great fix :x
(I first tried &b"1"[..] but [..] is not a const fn :x)
 
woah, that's surprising.
 
interestingly, it seems to work on the playground, so now I'm confused :x
 
I was just about to link to it ;-)
 
Oh! I actually, it may just be a surprising diagnostic: play.rust-lang.org/…
The error I have here is that the explicit type is a slice, while the expression yields an array.
I checked, and it worked if I harmonize the expected type with the expression type (both slice and array mode)
however the lack of match probably confuses the compiler, and the diagnostic is very confusing.
Guess I now have to go back to my code and clean my mess up :p
 
 
3 hours later…
5:49 PM
@MatthieuM. So you wanted C[++]-like array decay? :P
 
@набиячлэвэли array.rot()
 
You may get dibs on the rot crate. You're welcome.
 
 
2 hours later…
7:32 PM
> ConfusedByCode
Suppose that's an apt name
 
 
1 hour later…
8:46 PM
> lots of bool parameters can get sorta hard to read. I like to do:
>
> struct IsMethodCall(bool);
> struct IsImplTrait(bool);
>
> and then use those types instead of plain bool. Then the caller can do `check_path_parameter_count(span, segment, IsMethodCall(true), IsImplTrait(false))` or whatever.
interesting way of "faking" named parameters
 

« first day (1252 days earlier)      last day (2244 days later) »