Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2021-07-14 00:00:00Z and 2021-07-15 00:00:00Z
Avatar
Avatar
fokkonaut
Click to see attachment 🖼️
Weird keyboard
Avatar
its about the layout, thats a typical qwertz layout
04:39
basically most germans have this
Avatar
keeb
Avatar
when starting the ddnet server in windows in a terminal, I don't get any output, why is that?
09:57
the server starts like I expected it to, however without the lines with the password and so on
09:57
it just doesn't print anything
Avatar
hmmm
Avatar
I tried some older versions down to 13.0, however that didnt seem to change much
10:01
ah, if thats important: I used the git bash, not the native cmd
Avatar
that sounds important
Avatar
okay yup in the native cmd it does print stuff
Avatar
can you try starting it by doubleclicking the server?
10:02
consoles on windows are a mess. idk where to start debugging this ^^
Avatar
ah, yeah that also does the same, thanks :)
Avatar
vscode running a server also spawns a terminal window but the output is printed in integrated debug console.
Avatar
Its very common for windows users to use git bash to get a decent command window. It seems that running electron from it does not generate any output. I've read through #3056 and cannot see...
Avatar
Avatar
TsFreddie
vscode running a server also spawns a terminal window but the output is printed in integrated debug console.
mhh i wonder if there's just a good console implementation, that we can use and don't bother with windows console at all 😄
Avatar
Avatar
heinrich5991
consoles on windows are a mess. idk where to start debugging this ^^
On windows we output utf16, mintty (git bash) probably expects utf8
Avatar
Avatar
fokkonaut
basically most germans have this
still weird : D
16:05
so germans can't do
16:05
SHIFT + 2 to make @ : D
16:05
?
Avatar
This will print the debug info for maps that are uploaded to the testing servers in their respective testing channel. The debug text is generated by the debug_load and ddnet_checks binaries from the twmap tool. This means that it will print debug info, whenever 1. when a testing channel is first created for a map 2. when the mapper or tester uploads a map update 3. when a tester marks a map in the testing channel for upload Note that at 3. th...
Avatar
@heinrich5991 have a minute?
Avatar
yes
Avatar
Q: let caps = re.captures(message); I want to do something if either caps.is_none() or caps.unwrap().len() < 3, how best to write that?
Avatar
need access to the elements then?
23:07
or just want to get rid of the unwrap?
23:07
caps.map(|c| c.len() < 3).unwrap_or(true)
Avatar
If it's neither of these cases I want to unwrap
Avatar
ah
Avatar
this is an early return
Avatar
I believe slice patterns are stable
23:09
hmm
23:09
let (x, y, z, rest) = match re.captures(message) { Some([x, y, z, ..rest]) => (x, y, z, rest), _ => return, }
23:09
doesn't really look nice :/
Avatar
Yeah I've been having a lot of annoying cases with error handling like this recently
Avatar
what do you want to return in case of None or len() < 3?
23:11
the same thing? does the function return a Result?
Avatar
In case of None or len < 3 I call a function and I return, the function returns nothing
Avatar
you do need access to the first three elements, right?
23:13
if so, I don't really see anythign better than the ugly match above
Avatar
I don't inside the condition
23:14
I obv need the 3 elements after I've confirmed they exist
Avatar
yea, I don't see anything better than the above
23:14
tell me what you went with 😉
23:14
this is not a threat, I'm just interested. I'm not attached to my solution
Avatar
if let None | Some(0..=2) = caps.map(|m| m.len()) { ... } someone on the rust discord was mentioning this
23:15
don't think it works out but it's interesting
Avatar
huh, interesting
23:16
you don't get access to the x in Some(x) though
Avatar
@heinrich5991 https://paste.pr0.tips/jR here is what I came up with, it's a tad fugly but it'll have to do for now
23:37
I really didn't feel like moving the error handling upwards to use ?
Avatar
ah, I like the filter 🙂
Avatar
the idea was definitely from the guy in the rust discord
23:38
but he wanted to sell me more robust error handling
23:38
and I really am not in the mood right now
Avatar
^^
Exported 63 message(s)