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 2019-06-30 00:00:00Z and 2019-07-01 00:00:00Z
Avatar
@heinrich5991 do you know why we aren't using the c++ operator sugar for json-parser in ddnet?
10:32
the json_.*_get functions lead to pretty darn ugly code
Avatar
I most definitely went overboard breaking compatibility, will have to rewrite this later :/
Avatar
@Learath2 I used operator[] in my json parsing routines pretty heavily
12:30
(and operator char*, operator int etc. after checking the type)
Avatar
where did you use json?
Avatar
in my proof of concept http master servers
12:30
^^
12:31
I'll prolly have to re-do all of this anyways, I just dropped way too much compatibility
12:31
like the servers can't even register on old masters
Avatar
^^
12:31
why did you even touch this file?
Avatar
which file?
Avatar
src/engine/server/register.cpp (except maybe renaming it to register_legacy.cpp and doing some search&replace
12:32
)
Avatar
Oh, I was pretty out of it when I was coding this
12:32
40 hours without sleep and you can't really think much
12:35
Avatar
the registering is the hard partโ„ข ๐Ÿ˜›
Avatar
top left buttons ๐Ÿ˜ฎ
Avatar
well as you can see, it registers just fine, just sends the wrong info as I couldn't bother building the json
Avatar
ah
12:36
I just had a static JSON there because register didn't work
12:36
couldn't tell that it works from the screenshot ^^
Avatar
but I completely cannibalised register.cpp
12:37
I'll give this a git commit, then I'll start fresh, with two new interfaces
Avatar
cp register.cpp register_.cpp;git checkout -- register.cpp;mv register.cpp register_legacy.cpp;mv register_.cpp register.cpp
Avatar
I messed with server.cpp aswell
12:38
I don't mind starting over anyways, it's not too clean
Avatar
@heinrich5991 can you help me link json-builder?
Avatar
I just manually wrote the json ๐Ÿ˜›
13:00
with str_format
13:00
but basically, just do the same as for json-parser I guess
Avatar
I'm shocked
13:01
you? not using a library?
Avatar
shrug
13:01
what goes wrong if you do it the same way as json-parser? (edited)
Avatar
Well I tried linking it the same way, it doesn't work, and you don't mind me hacking it together with str_format
Avatar
as long as you properly escape it (I think we have a JsonEscape function)
Avatar
I get a lot of duplicate symbol _json_string_get in: CMakeFiles/json.dir/src/engine/external/json-parser/json.c.o CMakeFiles/json-builder.dir/src/engine/external/json-parser/json.c.o
Avatar
have you found out why that happens?
13:02
i.e. do you see the duplicate symbols?
13:03
or are you maybe accidentally linking json-parser twice?
13:03
(if that's even possible, dunno=
Avatar
I only see one json_string_get
13:03
json-builder depends on json-parser, so maybe it somehow induces another compilation of it
13:04
cmake is pretty much blackmagic for me
Avatar
link to the github repo of json-builder please
Avatar
The serializing counterpart to json-parser. Contribute to udp/json-builder development by creating an account on GitHub.
13:05
meh, this powerbank cant sustain a laptop, I guess I'm done for the day
Avatar
bye
13:06
why don't you have an outlet near you?
Avatar
circuit breaker popped, and electricians don't seem to work at a reasonable price on sundays
13:08
I have a couple more minutes ๐Ÿ˜›
Avatar
can't you go to uni or so?
13:10
or idk, does starbucks have power outlets? ๐Ÿ˜›
Avatar
they do, but italy doesn't have starbucks
13:11
except for 2 in milan, but milan is pretty far for a starbucks ๐Ÿ˜„
Avatar
perhaps a library?
13:11
ah, probably not on sundays
Avatar
I'll charge it at the neighbours place
Avatar
my client crashed while i was editing a map (just held shift and wanted to paint a big area (20x40 or so)
14:57
obviously with my mouse (edited)
Avatar
:/
Avatar
u have latest version?
14:58
should be fixed
Avatar
do you have a coredump?
Avatar
12.5
14:58
no heinrich
Avatar
weird
Avatar
when i released the shift key and mouse the game crashed immediately
Avatar
@fokkonaut os?
Avatar
windows
Avatar
huh, the breaker decided to work again
18:10
I wonder what changed
Avatar
so many warnings with gcc9
Avatar
i mean it should improve the code
Avatar
Hmm, I don't really like this -Wdeprecated-copy who decided it'd be a good idea to deprecate implicit copy constructors? ๐Ÿ˜›
Avatar
@Learath2 it's only deprecating implicit copy constructors for specific situations
19:28
e.g. when there is a destructor
Avatar
why though?
Avatar
because it indicates a programming error
19:29
and it makes sense for that, if the destructor does anything at all, the implicit copy constructor can cause that work to get doubled, likely leading to double frees
Avatar
@heinrich5991 do you happen to know why IEngineMasterServer was needed?
19:45
(or any of the IEngine* variants of the interfaces at all)
Avatar
presumably because game is only allowed to access the non-IEngine* variants I guess
19:48
was violated by ddrace code on one occasion apparently, the background map in the menus
Avatar
@heinrich5991 another small Q: Is it better to request the interface from the kernel, or pass it in while initializing?
20:02
Seems we use both
Avatar
for highly convoluted stuff use the kernel
20:03
if you just need one interface, pass it
20:03
(dunno)
Avatar
I believe this fixes #1671 (uninitialized variables). Some other things: Use new ddnetchar fields in prediction, small fix for prediction of moving pickups, fix the freeze end tick in ddnetcharacter (will add it to the client later) Also adds a setting for choosing between new/old antiping for grenade like suggested in #1683 (cl_antiping_gunfire 0 to disable).
23:19
If a player is in /spec (sv_pausable 1 required) and would then use /pause, the tee would respawn, but the player would still be in /pause instead of playing again. With this, the player will resume completely
Exported 100 message(s)