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 2023-01-18 00:00:00Z and 2023-01-19 00:00:00Z
Avatar
Avatar
Jupstar ✪
@deen is it not in release client?
I'm not sure what change we are talking about
Avatar
Avatar
deen
I'm not sure what change we are talking about
The one with unpack delta error
Avatar
Wasn't that a server fix?
07:50
The server change for that is not in 16.7 (https://github.com/ddnet/ddnet/pull/6214)
From #5646. Checklist Tested the change ingame Provided screenshots if it is a visual change Tested in combination with possibly related configuration options Written a unit test (especially b...
Avatar
No it's client side
07:51
Or both
07:52
It's ez to reproduce on Linux. I can later test
Avatar
i hecking love c++
Avatar
And this isn't even that bad 😄
Avatar
tbf u can create such code in most languages 😄
16:01
its the std code
16:01
thats why its alien
16:01
altho std code in rust doesnt look alien
Avatar
maybe MSVC standard code looks better xD
Avatar
u dont need to use __ in names
Avatar
well u dont need to, but someone defined it as good style xD
Avatar
#[stable(feature = "rust1", since = "1.0.0")] #[inline] pub fn binary_search_by<'a, F>(&'a self, mut f: F) -> Result<usize, usize> where F: FnMut(&'a T) -> Ordering, { // INVARIANTS: // - 0 <= left <= left + size = right <= self.len() // - f returns Less for everything in self[..left] // - f returns Greater for everything in self[right..] let mut size = self.len(); let mut left = 0; let mut right = size; while left < right { let mid = left + size / 2; // SAFETY: the while condition means `size` is strictly positive, so // `size/2 < size`. Thus `left + size/2 < left + size`, which // coupled with the `left + size <= self.len()` invariant means // we have `left + size/2 < self.len()`, and this is in-bounds. let cmp = f(unsafe { self.get_unchecked(mid) }); // The reason why we use if/else control flow rather than match // is because match reorders comparison operations, which is perf sensitive. // This is x86 asm for u8: https://rust.godbolt.org/z/8Y8Pra. if cmp == Less { left = mid + 1; } else if cmp == Greater { right = mid; } else { // SAFETY: same as the `get_unchecked` above unsafe { crate::intrinsics::assume(mid < self.len()) }; return Ok(mid); } size = right - left; } // SAFETY: directly true from the overall invariant. // Note that this is `<=`, unlike the assume in the `Ok` path. unsafe { crate::intrinsics::assume(left <= self.len()) }; Err(left) }
16:02
this is the rust std code
16:02
beautifully commented too
16:02
#standards
16:03
u can even learn
16:03
TIL about match reordering
Avatar
__ in name is not a matter of style, it's a requirement for the std library to be compatible with all possible codes
16:13
standard says that name beginning with _ are reserved. It avoids case where macro would replace code in std headers (edited)
Avatar
Avatar
Chairn
__ in name is not a matter of style, it's a requirement for the std library to be compatible with all possible codes
It is a bit of a weird solution making all the code ugly tho
Avatar
yeah its pretty ugly, but yeah for macros it makes sense tho if they would want to they could add some compiler specific mode that disallows macros, or only allows certain ones
16:24
then they could escape all this trouble probably
16:25
except you do it on purpose lol
16:26
the only use case for macros i currently see is string concat and name of a variable i dunno if there are more, but template lib and constexpr/consteval can replace pretty much everything
Avatar
Avatar
Ryozuki
#[stable(feature = "rust1", since = "1.0.0")] #[inline] pub fn binary_search_by<'a, F>(&'a self, mut f: F) -> Result<usize, usize> where F: FnMut(&'a T) -> Ordering, { // INVARIANTS: // - 0 <= left <= left + size = right <= self.len() // - f returns Less for everything in self[..left] // - f returns Greater for everything in self[right..] let mut size = self.len(); let mut left = 0; let mut right = size; while left < right { let mid = left + size / 2; // SAFETY: the while condition means `size` is strictly positive, so // `size/2 < size`. Thus `left + size/2 < left + size`, which // coupled with the `left + size <= self.len()` invariant means // we have `left + size/2 < self.len()`, and this is in-bounds. let cmp = f(unsafe { self.get_unchecked(mid) }); // The reason why we use if/else control flow rather than match // is because match reorders comparison operations, which is perf sensitive. // This is x86 asm for u8: https://rust.godbolt.org/z/8Y8Pra. if cmp == Less { left = mid + 1; } else if cmp == Greater { right = mid; } else { // SAFETY: same as the `get_unchecked` above unsafe { crate::intrinsics::assume(mid < self.len()) }; return Ok(mid); } size = right - left; } // SAFETY: directly true from the overall invariant. // Note that this is `<=`, unlike the assume in the `Ok` path. unsafe { crate::intrinsics::assume(left <= self.len()) }; Err(left) }
y c++ can be ankward
16:27
rust >>
Avatar
@Ryozuki if !true || true /* test */ || true {} rustfmt doesnt like to format this as soon as there is a multiline comment inside the line, any command to force it?
Avatar
'拏 MAhdiyar 2023-01-18 16:50:17Z
Hi , how to install conan ? Visual Studio 2022
Avatar
Avatar
Jupstar ✪
@Ryozuki if !true || true /* test */ || true {} rustfmt doesnt like to format this as soon as there is a multiline comment inside the line, any command to force it?
hmm idk
16:52
file a bug
Avatar
Datasette is a tool for exploring and publishing data. It helps people take data of any shape, analyze and explore it, and publish it as an interactive website and accompanying API.
17:42
i need to try this
17:42
with ddnet
Avatar
Avatar
deen
Wasn't that a server fix?
almost forgot
18:18
u defs have to release a new client version with that fix
18:18
its in the release and creates the lag mentioned
18:19
if i rename to name with special chars, all ppl that e.g. have linux are affected
18:19
not only me
18:19
so can make others lag with that
18:20
and the lag is > 1 second, so its more heavy than ddos (edited)
18:21
u can reproduce it with linux on any server by renaming from "nae" to "ᴷᵉᵏᶳ"
Avatar
chillerdragon BOT 2023-01-18 18:22:46Z
Rip Linux users. Windows masterrace!
Avatar
on windows it might get triggered too
Avatar
what about macos?
Avatar
but dunno how to do it reproduceable
18:23
macos probs also affected
Avatar
Somebody know out of the head where the tees get rendered (in the code)?
Avatar
render.cpp
Avatar
chillerdragon BOT 2023-01-18 18:23:32Z
templeOS?
Avatar
::RenderTee
Avatar
chillerdragon BOT 2023-01-18 18:23:48Z
Pro
18:24
Also players.cpp
Avatar
Avatar
Jupstar ✪
its in the release and creates the lag mentioned
what change?
Avatar
dunno the specific commit it was with the delta unpacking
18:33
u hot fixed it but apparently didnt release a client version with it
Avatar
But the problem was never in 16.7
18:33
From #5646. Checklist Tested the change ingame Provided screenshots if it is a visual change Tested in combination with possibly related configuration options Written a unit test (especially b...
18:33
So how can I remove code in 16.7 that was not added there?
Avatar
i just tested it with steam client
Avatar
Avatar
Jupstar ✪
u can reproduce it with linux on any server by renaming from "nae" to "ᴷᵉᵏᶳ"
maybe those things shouldn't be said here till there's a released fix pepeCorn (to avoid people doing it)
18:34
its defs inside the client
Avatar
Avatar
ReiTW
maybe those things shouldn't be said here till there's a released fix pepeCorn (to avoid people doing it)
this specfic way only affects linux
18:35
windows might have other ways tho
Avatar
Avatar
ReiTW
maybe those things shouldn't be said here till there's a released fix pepeCorn (to avoid people doing it)
pepe_popcorn
Avatar
i mean where should i say it else xD
18:37
who cares
Avatar
according to snail this channel is useless anyway
18:38
@snail we useless sadSnail
Avatar
ed1bf05 Update translations for upcoming 16.7 - def- 1cdbb1b Version 16.7 - def- 09c21d5 For integrated and discrete GPUs always prefer what comes first in the list - Jupeyy dbfaecc Minor brazilian portuguese fix (by Akari) - def- 8cd3335 Update russian.txt to incoming 16.7 update - lolipodass d4afa55 Update french translations - Chairn 99dae9e Update spanish.txt - n0Ketchp 9ac6b39 Update spanish.txt - n0Ketchp 58558c4 Add error handling when enumerating physical devices - Jupeyy 31a69c5 Followup fixes for physical devices - Jupeyy 0aefd10 Add warning for missing integrated CPU driver - Jupeyy 2c2f319 Update Korean translations by CHaBek - cwh7435 47cb543 Add new french translations for 16.7 - Chairn 3cfefd1 Update brazilian_portuguese.txt - rffontenelle 50cefec Add ui_smooth_scroll_time variable to adjust smooth scrolling - Robyt3 5d04254 Update simplified_chinese.txt - Cheeser0613 9a882b4 Update traditional_chinese.txt - Cheeser0613 c5b020d Missing parameter in error list - Jupeyy d00fee3 Show current memory usage in assert too - Jupeyy 750129c Version 16.7.1 - def- 8a75365 Quick fix for old client on new server - def- 8d04415 Version 16.7.2 - def-
Avatar
@Jupstar ✪ can you test if 16.7.2 tag fixes it?
Avatar
maybe make a hidden chan for trusted devs
Avatar
Avatar
deen
@Jupstar ✪ can you test if 16.7.2 tag fixes it?
sure
Avatar
epic github bot
Avatar
Avatar
deen
@Jupstar ✪ can you test if 16.7.2 tag fixes it?
seems fine
Avatar
Great, thanks
18:42
Should be released in ~1 hour
Avatar
btw how u decide when a new major
18:42
we can do like kernel
Avatar
you mean 16->17?
Avatar
"when it feels the minor is too big in number"
18:42
ye
Avatar
When a big feature comes or when we are at 16.9 already
18:43
16.10 would look stupid
18:43
true
18:43
or maybe we could go with the date
18:43
its unfun but rly ez to pinpoint
18:43
23.01
18:43
23.1.0
18:43
*
Avatar
Some people complain about 16 being a too large number for the development progress we have, but I don't care, they can just imagine a 0. prepended
18:44
Date I don't like. It only works when there is consistent amount of work going in
18:44
What if everyone is busy and we have no new features for 6 months? That should be 1 digit higher, not 6
18:44
when we release again
Avatar
well why?
Avatar
anyway, release numbers don't matter much, so not worth putting much thought into it
Avatar
but ye i was just saying it for fun xd
Avatar
I think the next release should increase 1 of the numbers by exactly 1 , otherwise feels like there could be versions inbetween that you misseds
19:46
This fixes issues that prevented vanilla 0.6.5 clients from joining DDNet servers with sv_vanilla_antispoof 1 (closes #2074). The dummy map was not valid. The size of the tiles and game layers was calculated incorrectly. The last member variable included in CMapItemLayerTilemap version 2 should be m_Data. Previously only the size of the member m_aName was subtracted from the total size, which was resulting in an incorrect item size, as the size of the following 5 members also needs...
Avatar
64578d4 Improve str_hex documentation - Robyt3 0e59b84 Add str_hex_cstyle to print bytes as a C style array - Robyt3 1a9357b Fix sv_vanilla_antispoof for vanilla 0.6.5 clients - Robyt3 0ba6c1c Merge #6289 - bors[bot]
22:20
Avatar
65cb2ed Ensure integer wrapping instead of preventing overflow/underflow - Robyt3 4a4d6c5 Merge #6284 - bors[bot]
Exported 118 message(s)