« first day (1980 days earlier)      last day (1523 days later) » 

12:45 PM
It seems that winapi is in a sorry state. :(
 
 
1 hour later…
2:02 PM
@E_net4removesmeta-commentary why so?
heh
 
@Shepmaster I can sell my soul too, if i'd see this on my account :P
 
2:28 PM
@Shepmaster Lacking maintenance recently. github.com/retep998/winapi-rs/issues/867
 
Who said that the syntax highlighting was improved :-(
-1
Q: method try_get cannot infer type

Yonathan Pamungkas PutraI made a function to check all of the row's fields before parsing them into a struct: pub fn check_result_field<'a>(row: &Vec<postgres::Row>) -> ErrorObject { for r in row { for i in 0..row.len() { match r.try_get(i) { Ok(result) => { r...

 
Aw, lifetimes and single quoted strings
 
it's not wrapped in ```rust
it works when you do
done
 
ah
because I added the postgres tag
which changed the default language
whew
 
2:38 PM
well there goes my edits :D
 
I wonder, is that selected postgre as default because postgre was the most left tag on the post.
 
@NebulaFox haha <3
Your edit clobbered my others, so I figured rolling back and adding the code fences was simpler
@ÖmerErden yep, AFAIK
 
I don't understand why stackoverflow doesn't just default to code fences rather than indention
 
@NebulaFox 10-years of history, I suppose
code fences were a Big Thing when they were introduced (like a year ago?)
@ÖmerErden and now a postgres SO member removed that tag, so
 
@Shepmaster well not anymore
 
2:43 PM
@Shepmaster seems like a good meta question
 
@NebulaFox haha, I've even upvoted it already.
Oh, and @Stargateur added an answer
 
I would be nice if there was an easy way to switch between the two instead of having to clear the extra 4 space per line
 
@NebulaFox this may not be what you mean, but you can highlight the indented code and re-indent, which actually de-indents
then it's just adding the backticks
(and indent == control-k)
 
oow, I'll try that when reviewing edits
 
3:00 PM
@LukasKalbertodt chop chop on github.com/rust-lang/rust/issues/53485
 
Oh, holy mother, so many dependents. crates.io/crates/winapi/reverse_dependencies
If only I could do something to help, but Windows is not necessarily my ideal dev environment.
 
are those only 1 level parent crates ?
 
@Shepmaster yeah... not much upvoted :p
 
@ÖmerErden To the best of my knowledge, it only shows direct dependents.
 
any project that include tokio or related is dependents doomed
 
3:12 PM
 
Aye. I couldn't find a tool to track down all (direct + indirect) dependents.
They are all most likely conditional dependencies based on the target platform, but it still might give us an idea of how brittle Windows support could become in the future.
 
isn't some joke in there how brittle windows is in general... he says working on a windows machine
 
Can't do jokes on this matter, especially since I'm targeting Windows machines at work. :[
 
3:28 PM
oooooh
 
Aye, I have to implement a Windows service. New grounds for me too.
 
@E_net4removesmeta-commentary you didn't find cargo ?
 
22 mins ago, by E_net4 removes meta-commentary
Oh, holy mother, so many dependents. https://crates.io/crates/winapi/reverse_dependencies
Yes. But these are direct dependents.
 
oh that
 
3:54 PM
I don't think I'll ever understand the function_name (arg) style
 
@Shepmaster have you ever programmed in Haskell, F#, maybe OCaml?
 
Only the tiniest in Haskell (for the FFI omnibus)
 
@Shepmaster Just to be clear, you mean the space between the function name and the argument list?
 
@E_net4removesmeta-commentary ya
 
this is pure evil
 
4:04 PM
@NebulaFox Is that the preferred style in those languages?
 
I thought Haskell was like O -> M -> G.
 
@Shepmaster yes
@E_net4removesmeta-commentary let f a b = a + b
the O -> M -> G is the type decleration f :: O -> M -> G
(I see what you did there~
 
@NebulaFox where are the parens though?
I get it for languages where the parens aren't needed
as you have to have a space to separate the name and args
Ruby optionally does the same: my_method 1, 2
 
do you know that space is a operator to apply a function in haskell ?
 
@Shepmaster hmm... so it is actually the parens that bother you not the space
 
4:10 PM
@NebulaFox well, it's both together, I suppose
(also "people not using the idiomatic style for the language they are currently using")
 
@Stargateur space is an apply operator? I thought that was $ and .
@Shepmaster ah that's a whole other thing :D
 
@E_net4removesmeta-commentary I can releate
 
@Stargateur Well reminded. Wat.
Apparently, in Ruby one can override the operator that is called on a missing method, so you can just turn bare tokens into a string.
 
Yeah but let's talk about JavaScript
:D
I also want to apologise to the Rust community on stackoverflow for my stupid questions
 
4:24 PM
No worries, we're here to take the trash out help. ;)
@NebulaFox In that latest Q, it might help to have a look at how HashMap declares the method contains_key. Also, this one contains a few more resources on coercion in Rust.
 
@E_net4removesmeta-commentary wonderful thanks
 
@E_net4removesmeta-commentary I looked at something similar to contains_key but found the type declaration would not compile
Sometimes I feel like English isn't my first language
 
One common trick is to preppend a & to induce deref coercion. E.g. if name is a String and fn foo(bar: &str), then you can do foo(&name), since `name is coerced to a string slice.
That should fix at least one of the error messages.
 
Interesting. And then &&"c" twice to make one of the options work
Just remembered: The reason following the type of contains_key would not work is due std::borrow::Borrow<std::str::String> not being implemented... or something like that
Hang on
the trait 'std::borrow::Borrow<&std::string::String>' is not implemented for '&str'
 
4:50 PM
Hmm, that looks like the opposite way? You can borrow a &str out of a String, but not the other way around. :)
 
apparently not the trait 'std::borrow::Borrow<&str>' is not implemented for 'std::string::String'
but there is an implementation for std::string::String as std::borrow::Borrow<str>
I do like how informative the Rust compiler is
 
Oh, right. Yes, the output is always behind a reference.
 
Does anyone knows how paths handle those weird invalid characters on Windows? Eg., what happens if I try use PathBuf::from("??")? The fact that it's just the From trait would indicate that you can just create such invalid paths, which is a shame, but is there anything special to know about that? Is there a path_my_path function somewhere?
 
5:06 PM
@mcarton It will let you create the path value, but you won't be able to create a file or directory with it. I'm not sure if this answers your question.
 
The Path structure comes with absolutely no guarantee of validity, it can be complete trash. But the functions on it often return result or option
 
5:30 PM
Yeah, that's what I expected
Thanks
 
@NebulaFox now, why did you undo the idiomatic style changes after our discussion about idiomatic style?
 
@Shepmaster because mine was the idiomatic style that I learned from crates
wait
my mistake
i'll fix it
fixed
 
@NebulaFox rustfmt is your friend
(and available in the playground)
 
@Shepmaster good point
I'm not use to such nice things
@E_net4removesmeta-commentary also found a solution but lead me to another question
 
@NebulaFox Enjoy the rabbit hole. :)
 
5:37 PM
@E_net4removesmeta-commentary weirdly this is why I got into programming in the first place
Is Rust like quantum mechanics, when you think you understand it, you really don't
I don't understand references
 
5:49 PM
@Shepmaster thank you
 
@NebulaFox np. You'll find I do it quite frequently
It's about 50% of the reason I created the playground in the current form.
 
Thanks for creating the playground. It is an amazing tool for messing around with Rust
 
@NebulaFox sure! Note that I'm not the original creator — just the one who added crates and some other niceties
 
@Shepmaster well thank you for the niceties.
 
In for the fearless concurrency, stay for the niceties.
 
6:02 PM
Hang on, I still need to get my head round the type system before I can be in for the fearless concurrency
 
That's not false. The fearless concurrency, the lack of stupid null pointer exceptions are the main selling points. But the real reason we love to code in rust is the whole set of niceties
 
praise the lack of null pointers
 
But the most painful things when I code in other languages are the bad generics, the lack of tagged unions, of simple modules, etc
 
@DenysSéguret tagged unions? is that when you use enums as a switch?
 
It's just the enums (and matching and their use as result and options)
how did I forget to mention pattern matching ?
 
6:11 PM
yes, enums and pattern matching is what drew me to Rust.
I'm so use to working with them that I feel odd without them
 
@DenysSéguret i gave up after Citadel
i couldn't even finish it, it needs a lot of patience ^^
Maybe i'll try some other time, not sure i am able to comment against the code but it looks really clean to me, just one thing i've noticed whole project has just one trait. But abstraction doesn't needed at all i guess?
 
6:37 PM
Rust is just .. difficult but I like difficulty
 
I sense a C++ fan
 
@ÖmerErden I just released a new version with two new levels (faster to play than Citadel)
 
@DenysSéguret lol looks like you've released right after I've cloned your repo.
 
 
1 hour later…
7:53 PM
@ÖmerErden Do you have suggestions of more traits (without more dyn switch) ? You know I'm not yet a professional Rust coder, I don't have all the idiomatic reflexes
 
8:24 PM
Was there anywhere you wrote code and thought "wow I'm repeating something"
I feel like that's when traits come in
 
BTW, We french people are in trouble :p
I will do my part and avoid any social meeting
Some could argue that my normal way of living
But don't listen to them !
 
After ten years of working from home in Easy. I just switched to Divinity level, with the kids crying and biting themselves and sick and... I have no brain anymore...
 
I was unable to work today too much distraction
as we talk a lot about the situation
 
I'm a contractor and haven't been able to get work. So I'm learning Rust for work
 
I'm rushing the plan and architecture of a new web application in rust/wasm... and it must be sane and handle massive amounts of data and nodes to control plants for months... This needs more brain that what I've left but I must do it
 
8:41 PM
@DenysSéguret Yeah I was in the same situation not much time ago
now I need to find the motivation to implement the ABNF of the sip protocol
I coded 4-5 function today xd
I will do it !
 
I managed to write a first prototype of a rust/wasm application today, covering some core problems, so I hope to have the plan soon enough if I manage to work
 

« first day (1980 days earlier)      last day (1523 days later) »