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