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 2020-07-06 00:00:00Z and 2020-07-07 00:00:00Z
Avatar
cl_default_zoom is broken/ignored. I kinda noticed it a few weeks ago before smooth zoom, but it was playing around with smooth zoom that made me actually confirm it. (btw smooth zoom is hawt!)
Avatar
@Learath2 but I want to load a CSaveTee after the map changed
Avatar
2322d93 Add teehistorian info to ddnet-setup - def-
Avatar
@fokkonaut I had some of that done in safe_reload. The idea would be to allocate space for the CSaveTee's std::move or std::copy them over, reconstruct the gamecontext, then std::move them back
06:33
But the harder part is to move the tees into the correct teams
Avatar
why?
06:36
just saving all information, + team
Avatar
Problem is that as soon as the gamecontext is constructed, I think the players haven't joined yet
07:20
So you can't use a variable inside Reset and as the gamecontext is being destroyed, you cant store anything in that legally.
07:20
So there is no good place to store this
Avatar
so you need a variable inside CGameContext instead
Avatar
@heinrich5991 can't, it's getting destructed
Avatar
that you set in Reset
Avatar
Well you could store it in a variable in Reset, then move it
07:33
Then you wait for all the players to join
07:33
Move to their teams as they join
Avatar
GER2 Novice Perma server dont show up in ddnet tab
Avatar
You can Design your Github profile using Username/README.md repo, this amazing update is under deve...
Avatar
[quakenet] ChillerDragon BOT 2020-07-06 16:19:41Z
omg thats crazy @Soreu
Avatar
[quakenet] ChillerDragon BOT 2020-07-06 16:21:01Z
is this planned or active?
16:24
Fulltime github influencer artist. ChillerDragon has 67 repositories available. Follow their code on GitHub.
16:24
ah its working
16:24
not sure if i like it tbh
16:24
you can use it to create big image banners lol
Avatar
I don't see it working yet
Avatar
[quakenet] ChillerDragon BOT 2020-07-06 16:26:22Z
it is
16:26
Avatar
there's one of example repos: https://github.com/katmeister/.github
Config files for my GitHub profile. Contribute to katmeister/.github development by creating an account on GitHub.
Avatar
[quakenet] ChillerDragon BOT 2020-07-06 16:27:30Z
oh indeed in private browser i do not see it hm
Avatar
so it's just not tricked by mobile's desktop mode
16:27
16:27
:p
Avatar
[quakenet] ChillerDragon BOT 2020-07-06 16:28:41Z
nah seems to be only for the account owner during beta
Avatar
Also, you created repo named as your nick, while they created one named .github
16:28
so...
Avatar
[quakenet] ChillerDragon BOT 2020-07-06 16:29:00Z
ah interesting
Avatar
guess there are two ways and both are tested
16:30
imo the .github version makes more sense, but for sure there will be people voting for both
Avatar
[quakenet] ChillerDragon BOT 2020-07-06 16:30:56Z
i also prefer .github
16:31
sounds more future proof and obvious what it is
16:32
microsoft is going wild feature wise and yeeting on availability
16:32
hope github doesnt end like minecraft ... feature bloated and unusable unstable
16:32
or like skype :troll:
Avatar
since microsoft github has more downtime (edited)
16:38
greenthing
Avatar
in /pause there is no Free view listing (Spectate players still work normally, only every other spectate way is broken) !obrazek
Avatar
[quakenet] ChillerDragon BOT 2020-07-06 17:19:20Z
ye in the beginning i was more joking about it but slowly its really noticeable
17:19
idk maybe i might also be spending more time on github nowerdays
Avatar
imagine not using ddnet client
Avatar
can't, I'm using it since the very beginning
Avatar
ᶰ°Konͧsti 2020-07-06 17:53:43Z
gamerclient>DDNet client kek
Avatar
@deen heyo, how the /r works? How I can enable it?
Avatar
ᶰ°Konͧsti 2020-07-06 19:21:07Z
@fearxito everyone in ur team has to write /practice first
19:22
I get it
Avatar
ur rank wont count
Avatar
Yeah, I know thanks, well I don't know that everyone has to write /practice first
Avatar
I dont think it has to be everyone
19:55
Iirc it was majority voting so you only need 50% + 1
Avatar
only >50%
Avatar
Can anyone help me with a 128 player mask? i dont really understand why this doesnt work correctly: https://github.com/fokkonaut/F-DDrace/commit/fa74501da03b4087fed1876d98f054b57294c0f0
Avatar
~ negates all bits
20:28
you use Mask128() both for 0 (all bits disabled) and -1 (all bits enabled), at least one of these usages is wrong
Avatar
oh, so
20:29
ah that makes sense i guess
20:29
and how do i solve the one with the ~
Avatar
you need to flip all the bits of the whole mask
20:30
you can overload operator~ to do this
Avatar
doesnt work
Avatar
why not?
20:30
usually looks like this
Avatar
~ only takes 1 operand
20:31
|= 2
Avatar
oh wait, yea, i removed the paramter
Avatar
I think the error you get would even be decent for this, in C++ standards atleast
Avatar
what does the error say? and you probalby shouldn't return Mask&
Avatar
what should i return?
20:33
Avatar
Mask128
20:33
Mask128& would mean that you return a reference
Avatar
wait, heinrich, uhm
20:34
so setting the mask 0 means no one can see it and -1LL means everyone can?
20:34
for the long long
Avatar
yes
20:34
because -1 is represented as 0xffff_ffff
20:34
all bits are set
Avatar
-1 is only guaranteed to be all ones in C++ past a certain standard when they made the representation two's complement
20:36
(just an inconsequential fun fact, there are no sign and magnitude implementations out there to worry about 😛 )
Avatar
@heinrich5991 would this be correct?
20:40
Mask128 operator~() { m_aMask[0] = ~m_aMask[0]; m_aMask[1] = ~m_aMask[1]; return *this; }
Avatar
no
Avatar
why?
Avatar
if I say int i = 3; ~i; that doesn't change i
20:41
your implementation changes the operand of ~
Avatar
?
20:42
that's not a question
Avatar
i dont understand
Avatar
These are not the questions of a programmer, my grandmother reacts like this when I try to teach her how to create contacts on her phone 😛
20:47
What part do you not understand?
20:54
Mask127 operator~() const is the signature I'd use and it'd tell you what's wrong with yours
Avatar
it wouldn't tell the exact steps to fix it though
Avatar
Yeah but it might give a hint as to what you meant I guess
Avatar
isnt the random word generator for /save on an already existing code not good
20:56
its like if you tried to register for a website but it said "sorry, that password is taken"
Avatar
it's not exactly a trivial problem to solve @louis, Zwelf tried and it broke quite a bit
Avatar
@Learath2 what do i do inside of the ~ function with the two halfs of the mask?
21:03
i got the rest working btw, the mask works
Avatar
uf, I'm disappointed that you aren't even trying c++ Mask128 operator~() const { Mask128 t; t.m_aMask[0] = ~m_aMask[0]; t.m_aMask[1] = ~m_aMask[1]; return t; }
Avatar
thats how i did it lol
Avatar
Is it now?...
Avatar
It's not what you sent here
Avatar
yess, true
Avatar
and there is no operator~ in either of your commits
21:13
Turns out I'm not telepathic and can only see as much as you show
Avatar
i know this sounds stupid, but i had it that way before, and then changed it, and right now i had this on my screen again
Avatar
point is, inside of this operator, you are not allowed to modify this
21:15
hence the const there to protect you from mistakes
Avatar
I'd also probably add a constructor that takes two uint64_ts so I can just write return Mask128(~m_aMask[0], ~m_aMask[1]);
Avatar
true
21:29
thanks alot
Avatar
btw, I did this before and sadly compilers are not quite smart enough to optimize this well 😦
21:33
they are smart enough to optimize std::bitset well though, except for MSVC
21:33
with msvc you can use the compiler builtin to do a 128bit shift, which optimizes great, so you can do that
21:34
(not that the performance matters that much in this case honestly)
Avatar
optimize what?
21:39
the ~ should be well-optimized
21:39
is it the << ?
Avatar
Checking and setting flags doesn't optimize well
21:43
The shifts optimized decently in clang, horribly in gcc and MSVC
Avatar
I've been wondering why there is no processor support for any 128 bit operation except imul
21:51
does the ALU get too complex?
Avatar
the question they're asking themselves is probably: is it work the die space?
Avatar
worth*?
Avatar
ye
Avatar
possibly, I'd have guessed simd would benefit from these existing but I'm not very good with vectorization
Avatar
struct uint128 { private: uint128(uint64_t a, uint64_t b) : a(a), b(b) { } uint64_t a; uint64_t b; public: static uint128 zero() { return uint128(0, 0); } static uint128 one() { return uint128(0, 1); } ...
21:55
doesn't look that nice, indeed
Avatar
@Learath2 Isn't SSE 128bit, then AVX 256bit and AVX512 512bit?
21:55
oh, you mean for a single 128 bit number
Avatar
but I also don't know how good it can be
Avatar
I guess it's not very common when vectorizing to need a 128b + 128b
Avatar
+ looks fine
21:57
struct uint128 { private: uint128(uint64_t a, uint64_t b) : a(a), b(b) { } uint64_t a; uint64_t b; public: static uint128 zero() { return uint128(0, 0); } static uint128 one() { return uint128(0, 1); } ...
Avatar
or just use unsigned __int128 since our compilers probably support it anyway?
Avatar
__int128 seems to optimize even worse
Avatar
struct uint128 { private: uint128(uint64_t a, uint64_t b) : a(a), b(b) { } uint64_t a; uint64_t b; public: static uint128 zero() { return uint128(0, 0); } static uint128 one() { return uint128(0, 1); } ...
22:08
dunno what you're talking about, unsigned __int128 optimizes slightly better for check_flag and is the same optimum for add
Avatar
it's been a while since I checked it, I think it was optimized less consistently across compilers
22:11
(and isn't supported at all in MSVC)
22:14
besides https://godbolt.org/z/BSAXzu std::bitset optimizes better in all compilers, if all you want is checking and setting bits
struct uint128 { private: uint128(uint64_t a, uint64_t b) : a(a), b(b) { } uint64_t a; uint64_t b; public: static uint128 zero() { return uint128(0, 0); } static uint128 one() { return uint128(0, 1); } ...
Avatar
oops
22:15
hm
Avatar
(atleast it optimizes to less instructions, I know that doesn't always mean better performance and it'd probably be impossible to predict with the insane pipelines of new cpus)
22:17
s/optimizes/generates/
Avatar
nah, should be better
22:17
no branches
Avatar
If you want to do arithmetic though, _int128 does work if it exists
Avatar
arithmetic optimized fine in my own impl too
Avatar
+ and - are trivial, / and * are the ones that are hard to get right
Avatar
ᶰ°Konͧsti 2020-07-06 22:20:33Z
Most important DDNet dev change my mind
Avatar
most important ddnet bug tester*
Avatar
ᶰ°Konͧsti 2020-07-06 22:24:02Z
troll
Avatar
Most important DDNet dev, change my mind
(edited)
22:24
the comma really helps
Avatar
@heinrich5991 and funnily enough, clang optimizes both your add and the native add to the exact same instructions, which is shorter than the gcc one
Avatar
hum
Avatar
and without using compiler intrinsics, the msvc one just looks abysmal 😄
22:30
even with the intrinsics the code generated is just not as clean as clang and gcc, but atleast it's readable
Avatar
it sets up a stack
22:31
ah
22:31
maybe you need that due to SSEH
22:31
SEH*
Avatar
It also actually calls the constructor
22:32
it should be a trivial constructor to inline, I wonder why it won't
22:35
lol there is no /O3 in msvc that's why
22:37
at /O2 it looks better, still not as cute as clang or gcc
Avatar
found a bug where the score hud at the bottom right corner doesnt show i downloaded ddnet source with git clone --recursive https://github.com/ddnet/ddnet and ran it with the cmake gui for windows on visual studio 2017
Exported 190 message(s)