11:23 <+sctt_> hi 11:23 <@heinrich5991> hi 11:29 < ddnet-commits> [ddnet] heinrich5991 opened pull request #845: Add Windows CMake compilation instructions (master...pr_ddnet_cmake_readme) https://git.io/v5ZAX 15:06 <@heinrich5991> sctt_: is the pull request more or less done now? 15:27 <@heinrich5991> is there someone capable of making good screenshot guides for windows? https://github.com/ddnet/ddnet/pull/845#discussion_r135739812 15:27 <@heinrich5991> Ryozuki: are you, or do you maybe know someone who is? :) 15:38 <+Ryozuki> i am able 15:41 <+Ryozuki> heinrich5991, you could extend https://wiki.ddnet.tw/Compiling_DDRaceNetwork 15:41 <+Ryozuki> we got a nice wiki e.e why not use it 15:41 <+Ryozuki> (that page is outdated/incomplete btw) 15:44 <@heinrich5991> I updated the README, but I can also update that page 15:46 <@deen> Please only keep information in one place 15:46 <@deen> when people go to compile ddnet, they will be on github already, so keep the info there. Merge all the additional info from the wiki into that and make the wiki a link to github readme 15:47 <@heinrich5991> it doesn't look like the wiki page has extra info right now 15:47 <@heinrich5991> looks like a copy of the old readme 15:47 <+Ryozuki> yes... 15:47 <@deen> Don't make copies of information... 15:47 < ddnet-commits> [ddnet] def- closed pull request #845: Add CMake compilation instructions (master...pr_ddnet_cmake_readme) https://git.io/v5ZAX 15:47 <@deen> No one wants to maintain multiple versions 15:47 <+Ryozuki> 07:21, 18 June 2016‎ 15:47 <+Ryozuki> anyways its rly old 15:48 <+Ryozuki> (last edit) 16:00 <+Ryozuki> http://i.imgur.com/NGMMxIp.png 16:00 <+Ryozuki> http://i.imgur.com/8HoUF90.png 16:00 <+Ryozuki> good? 16:00 <+Ryozuki> or to confusing 16:02 <+Ryozuki> (visual studio adds *lots* of files over the place, idk if there is some kind of clean cmd, also the end build ends up at Debug/ and the dlls needed arent there 16:03 <@heinrich5991> but if you execute it with visual studio it runs, right? 16:03 <@heinrich5991> I vote for "too confusing" btw 16:03 <@heinrich5991> soo many arrows 16:03 <+Ryozuki> so 16:03 <+Ryozuki> you want lot of images instead? 16:03 <@heinrich5991> I think that would actually be better 16:04 <@heinrich5991> interesting points also are the install C++ extensions for MSVS and the install python for *all users* 16:05 <+Ryozuki> visual studio fills the ddnet folder with shit 16:05 <+Ryozuki> and it is run from ddnet/build 16:05 <+Ryozuki> i dont see why it does that 16:05 <@heinrich5991> does it? which files for example? 16:08 <+Ryozuki> http://i.imgur.com/01wm6Oq.png 16:08 <+Ryozuki> http://i.imgur.com/F2TND1o.png 16:09 <@heinrich5991> :D that's not good 16:09 <@heinrich5991> let me boot my windows computer 16:10 <+sctt_> heinrich5991: yes, this morning i've tested a lot map_replace_image tool and it seems to work well in many situations, so i guess im not going to add any other commits 16:11 <@heinrich5991> could you squash all these commits into one? 16:11 <@heinrich5991> wait a second, I can probably tell you the right command 16:13 <@heinrich5991> sctt_: you with me? :) 16:13 <+sctt_> oh ok 16:13 <+sctt_> yes :D 16:13 <+sctt_> i thought you could do something like "Squash and merge" 16:13 <+sctt_> i saw i somewhere 16:13 <@heinrich5991> are you in the git command line with inside the repository? 16:13 <+sctt_> yes 16:14 <@heinrich5991> what is the upstream git repository named, do you already have a name for that? 16:14 <@heinrich5991> git remote -v can show you that 16:15 <+sctt_> yes wait 1 sec 16:16 <@heinrich5991> Ryozuki: it hasn't created these folders for me, they're probably artifacts from an earlier build 16:16 <+Ryozuki> mmm 16:16 <+Ryozuki> let me test again 16:18 <+sctt_> heinrich5991: origin https://github.com/sctt/ddnet.git (fetch) origin https://github.com/sctt/ddnet.git (push) 16:18 <@heinrich5991> sctt_: do "git remote add remote https://github.com/ddnet/ddnet" 16:18 <+sctt_> done 16:19 <@heinrich5991> git fetch upstream 16:19 <@heinrich5991> and then you can do git rebase upstream/master 16:19 <+sctt_> fatal: 'upstream' does not appear to be a git repository 16:19 <+sctt_> :( 16:19 <@heinrich5991> duh 16:19 <@heinrich5991> git remote rename remote upstream 16:19 <@heinrich5991> a typo from me 16:20 <+Ryozuki> https://help.github.com/articles/syncing-a-fork/ 16:20 <+Ryozuki> oh 16:20 <+Ryozuki> its not that :P 16:20 <+sctt_> heinrich5991: ok it worked now^^ 16:20 <+sctt_> Ryozuki: thanks i will read that :D 16:20 <@heinrich5991> then do git rebase upstream/master 16:21 <+sctt_> ok it applied 16:21 <+Ryozuki> i recloned ddnet 16:21 <+Ryozuki> im getting a error with cmake now 16:21 <+Ryozuki> :D 16:21 <@heinrich5991> :( 16:21 <+Ryozuki> it doesnt use bundled libs? 16:21 <@heinrich5991> Ryozuki: btw, you can clean your repository with git clean 16:21 <+Ryozuki> CMake Error at CMakeLists.txt:126 (message): 16:21 <+Ryozuki> You must install Curl to compile the DDNet client 16:21 <+Ryozuki> + with all libs 16:21 <@heinrich5991> Ryozuki: did you clone with --recursive? 16:22 <@heinrich5991> otherwise do a git submodule update --init 16:22 <+ddnet-discord> https://cdn.discordapp.com/attachments/293493549758939136/352095607076159489/Screenshot_6.png 16:22 <+Ryozuki> hein 16:22 <+Ryozuki> oh 16:22 <+Ryozuki> im dumb 16:22 <+Ryozuki> :D 16:22 <+Ryozuki> always forget that.. 16:22 <@heinrich5991> sctt_: do a git rebase upstream/master again and mark all but the first commit as "squash" 16:22 <@heinrich5991> and don't reclone ^^ 16:23 <+sctt_> heinrich5991:git rebase upstream/master Current branch master is up to date. 16:23 <@heinrich5991> ah right 16:23 <@heinrich5991> I ment git rebase -i upstream/master 16:23 <@heinrich5991> -i for interactve 16:23 <+sctt_> oh i see 16:24 <+sctt_> my editor opened, how to mark the commits as squash? xD 16:24 <+sctt_> i see pick 46d51e2 Update map_resave.cpp 16:24 <@heinrich5991> replace pick by squash 16:24 <+sctt_> should i rename pick into squash> 16:24 <@heinrich5991> yes 16:24 <+sctt_> oh ok 16:24 <+Ryozuki> heinrich5991, using the cmake gui and building with vs2017 fills the ddnet folder also 16:25 <@heinrich5991> I have vs2015. mh 16:25 <@heinrich5991> have you selected a different build folder? 16:25 <+sctt_> can i rename the first commit name during this process? 16:25 <+Ryozuki> Desktop/ddnet/build 16:25 <@heinrich5991> you'll be prompted afterwards, sctt_ 16:25 <+sctt_> ok :D 16:26 <+Ryozuki> heinrich5991, looks like vs is generating the object files at ddnet folder instead of build 16:26 <+Ryozuki> idk why 16:26 <@heinrich5991> so I should install msvs 2017? :( 16:27 <+Ryozuki> it currently builds generating the object files at ddnet and then moves those to the build folder 16:27 <+Ryozuki> but the folders remain there 16:27 <@heinrich5991> hmm 16:27 <+sctt_> heinrich5991: ok it finished 16:27 <+sctt_> but i still see all the commits 16:28 <@heinrich5991> then do git push origin +master 16:29 <+sctt_> heinrich5991: ok it worked :D i see only one commit now, thank you 16:30 <+Ryozuki> git clean -f doesnt remove the folders :/ 16:30 <@heinrich5991> -fd 16:30 <@heinrich5991> but do -nd first 16:30 <@heinrich5991> to see which it would remove 16:31 <+Ryozuki> to late 16:31 <+Ryozuki> λ git clean -fd 16:31 <+Ryozuki> Removing build/data/ 16:31 <+Ryozuki> doesnt remove folders 16:31 <@heinrich5991> git clean -nxd 16:31 <@heinrich5991> that also removes files ignored by git 16:31 <@heinrich5991> (the -x) 16:31 <+Ryozuki> that looks good 16:32 <+Ryozuki> and worked 16:32 <+Ryozuki> -xdf 16:33 <+Ryozuki> mmm what about writing a bat script to build it 16:33 <+Ryozuki> and cleaning the mess 16:33 <+ddnet-discord> what mess? 16:33 <+ddnet-discord> build should be simple cmake && make 16:33 <+Ryozuki> the mess that vs2015 produces 16:33 <+Ryozuki> 2017* 16:33 <+ddnet-discord> use a separate build directory and tell microsoft not to make a mess? 16:34 <+Ryozuki> i cant, the program does what it wants 16:34 <+Ryozuki> i built in a separate folder 16:34 <+Ryozuki> yet it generates a bunch of folders on ddnet root folder 16:34 <@heinrich5991> I'm currently installing msvs 2017, I'll check what went wrong 16:34 <+ddnet-discord> that sounds like a bug 16:34 <@heinrich5991> I don't even know how it knows about the existence of that folder 16:35 <@heinrich5991> other than the fact that it is the shared root of all source files 16:35 <+Ryozuki> im gonna try from command line and using msbuild 16:36 <+Ryozuki> oh 16:36 <+Ryozuki> mmm 16:36 <+Ryozuki> forget what i say 16:36 <+Ryozuki> said* 16:37 <+Ryozuki> (tried again, still makes folders on ddnet) 16:37 <@heinrich5991> is the problem resolved? 16:37 <+Ryozuki> no 16:37 <@heinrich5991> I just aborted my installation of msvs 2017 ^^ 16:37 <@heinrich5991> meh 16:37 <+Ryozuki> D: 16:38 <+Ryozuki> im sry for confusing you 16:38 <+Ryozuki> https://github.com/opencv/opencv/issues/7796 16:38 <+Ryozuki> ^ 16:39 <+Ryozuki> another project, with same issue 16:40 <+Ryozuki> and this is the cmake bug issue https://gitlab.kitware.com/cmake/cmake/issues/16458 16:40 <+Ryozuki> (or looks like) 16:41 <+Ryozuki> and yes, looks like its a vs bug 16:41 <+Ryozuki> can't do nothing then 16:42 <@heinrich5991> "This issue has been fixed and is now available in our latest update. You can download the update via the in-product notification or from here: https://www.visualstudio.com/vs/ Thanks to everyone who provided feedback, votes and solutions for this problem." 16:42 <@heinrich5991> Ryozuki: could you try updating your vs? this post is from august the 14th 16:43 <+Ryozuki> hmm maybe wait 16:43 <@heinrich5991> "Closing this, as I can confirm this has been fixed in Visual Studio 15.3.0." 16:43 <+Ryozuki> (i got 15.0 new is 15.3, hope this fixes it) 16:43 <@heinrich5991> in the cmake issue 16:43 <+Ryozuki> oh 16:43 <+Ryozuki> nice 16:43 <+Ryozuki> will update 16:45 <@heinrich5991> sctt_: unfortunately there are quite some minor style issues remaining, but that shouldn't be hard to fix 16:45 <@heinrich5991> I could either annotate the appropriate locations in the pull request 16:45 <@heinrich5991> or, since I'm in an awesome mood today, fix it myself :) 16:46 <+sctt_> xD 16:46 <@heinrich5991> the former is probably better for you, the latter is easier for you :) 16:46 <+Ryozuki> haha 16:46 <+sctt_> if you tell me what's the problem i can fix it, np 16:46 <@heinrich5991> kk, then let me begin the review :) 16:46 <+sctt_> ok :D 16:46 <+sctt_> i have to go out in 20 mins so i'll fix it tonight 16:47 <@heinrich5991> sure, no pressure 16:47 <+Ryozuki> i should have thought about updating before, my bad :/ 16:47 <@heinrich5991> np 17:22 <@heinrich5991> deen: have you tried this function already? https://msdn.microsoft.com/en-us/library/windows/desktop/ms633543(v=vs.85).aspx 17:27 <@deen> yeah, didn't work according to user reports 17:28 <@deen> i think SDL2 has functions for dpi stuff, but they actually do nothing 17:29 <@heinrich5991> this one? SDL_WINDOW_ALLOW_HIGHDPI 17:29 <@deen> yes 17:29 <@heinrich5991> https://wiki.libsdl.org/SDL_WindowFlags 17:29 <@deen> it might be implemented on macosx, but apparently not yet on windows 17:33 <+Ryozuki> updated vs and the bug is gone 17:33 <@heinrich5991> good :) 17:34 <@heinrich5991> I added a comment to the opencv issue: https://github.com/opencv/opencv/issues/7796#issuecomment-325700775 :) 17:34 <+Ryozuki> nice 17:35 <+Ryozuki> tho the dlls arent on the output folder 17:35 <+Ryozuki> but on the build folder 17:35 <+Ryozuki> maybe its possible to add a postbuild command for vs to move these? 17:36 <@heinrich5991> but can you start the programs from the msvs UI? 17:36 <+Ryozuki> yep 17:37 <@heinrich5991> then it should be good, right? 17:38 <+Ryozuki> not if i run outside vs 17:38 <+Ryozuki> cause dlls arent copied 17:38 <+Ryozuki> to the output folder 17:39 <+Ryozuki> https://stackoverflow.com/questions/9994045/copy-target-file-to-another-location-in-a-post-build-step-in-cmake 17:39 <+Ryozuki> smth like that would fix it 18:25 <@Nimda> Zadrotos_final by Opana just released on Oldschool at 2017-08-29 18:21 20:34 <+Toer> hey, it seems that my isp latley has problems with the master servers of tw, does anyone has a script to fetch the addresses i could put on my server, or already set up something like this? 21:04 <+sctt_> heinrich5991: i've read your revision, that's great! but i have some doubts and observations about some point... can we brefly discuss? 21:04 <@heinrich5991> sure 21:04 <+sctt_> ok so, a general thing 21:05 <+sctt_> many things you pointed out are about pieces of code i just copied from tw source 21:05 <+sctt_> like LoadPNG and ExtractName 21:05 <+sctt_> or general structure of main, it is from map_resave 21:06 <+sctt_> does it mean i should also change also the methods i copied 21:06 <+sctt_> or just change map_replace_image? 21:06 <@heinrich5991> if you want, you can also change map_resave 21:07 <@heinrich5991> but it would suffice if the new code is better :) 21:07 <@heinrich5991> ddnet source code does have some dark corners that border on unreadability 21:07 <@heinrich5991> but we won't fix it all at once, no big refactor or anything 21:08 <+sctt_> ok so i will focus on the tool 21:08 <@heinrich5991> sure :) 21:08 <+sctt_> consider that the things you pointed out on LoadPNG and ExtractName 21:08 <+sctt_> are like this also inside the main code 21:10 <@heinrich5991> hm. maybe I'll do a follow-up fix of the main code 21:10 <+sctt_> ok :D 21:10 <@heinrich5991> extractname e.g. is from 2010 :) 21:10 <+sctt_> than i have a couple of more questions 21:10 <@heinrich5991> go ahead :) 21:10 <+sctt_> where you say 21:10 <+sctt_> "Is this line still needed?" 21:10 <+sctt_> you are referring to an include list 21:11 <@heinrich5991> yes 21:11 <+sctt_> which include were you referring exactly? 21:11 <@heinrich5991> to the graphics 21:11 <+sctt_> oh 21:11 <@heinrich5991> engine/graphics.cpp 21:11 <+sctt_> thats for image info structure 21:11 <@heinrich5991> .h 21:11 <@heinrich5991> ah ok 21:11 <@heinrich5991> so yes, it's still needed 21:11 <+sctt_> ok^^ 21:11 <+sctt_> than 21:11 <+sctt_> then* 21:12 <+sctt_> This allocates and leaks the CMapItemImage. Either make it global (meh) or pass in a pointer. Ask me about this one if you don't know what to do. :) 21:12 <+sctt_> why leakead? it is needed for datafile.addData 21:12 <+sctt_> addItem sorry 21:12 <@heinrich5991> leaked means: it is never deleted 21:12 <+sctt_> yes but i dont want to delete it 21:12 <+sctt_> cause it is needed 21:12 <+sctt_> where datafile.Finished 21:13 <@heinrich5991> after the call to additem, you don't need it anymore 21:13 <@heinrich5991> additem makes a copy 21:13 <+sctt_> oh 21:13 <+sctt_> i didnt know that 21:13 <+sctt_> i thought he kept the reference 21:13 <@heinrich5991> yea, the joys of c/c++ :) 21:13 <+sctt_> but i noticed, when i do getItem 21:13 <+sctt_> i don't have a copy 21:13 <+sctt_> i have his reference 21:14 <+sctt_> that's why i thought it was the same with addItem 21:16 <@heinrich5991> but even if it were the case, you'd still leak it after finish 21:16 <@heinrich5991> – for every new you must have a delete somewhere 21:16 <@heinrich5991> but in this case, it should be doable without new/delete 21:17 <+sctt_> if that were the case, i would just have to delete the datawriter 21:17 <+sctt_> his destroyer should deallocate the items i guess 21:18 <@heinrich5991> no 21:18 <+sctt_> so it doesnt :/ 21:18 <+sctt_> so i have to save all the items into an array and deallocate them after the finish 21:18 <@heinrich5991> or jsut don't allocate using new at all 21:19 <+sctt_> but considering that after the .finish the program quits and all its memory willl be released, i dont think its worth it 21:19 <+sctt_> i can't not allocating them 21:19 <+sctt_> the function needs the return a void pointer 21:19 <+sctt_> and i can't use the same Item i'm reading, i have to clone it into another memory area 21:19 <+ddnet-discord> Did you ever think about some kind of Code Reformatter? To standardize whole code, at least in structure? Without changing naming convention? 21:20 <+sctt_> i know that because before i was using the same Item 21:20 <+sctt_> and the result map was messy, cause the reader probably was doing his calculation on the item i modified while i shouldnt have done that 21:20 <+sctt_> so i decided to clone it instead of directly modify it 21:20 <+sctt_> and that solved the problem 21:21 <@heinrich5991> you could passi n a pointer to a CMapItemImage 21:21 <@heinrich5991> given by the caller 21:21 <@heinrich5991> and just write in there 21:21 <@heinrich5991> the caller just puts the CMapItemImage on the stack 21:21 <@heinrich5991> like CMapItemImage Buffer; 21:22 <+sctt_> yes but it is the main who does addItem 21:22 <+sctt_> so the new Item can't be destroyed by the ReplaceItemFunction 21:22 <@heinrich5991> ReplaceImageItem(.., &Buffer); 21:23 <+sctt_> oh 21:23 <+sctt_> so add a new parameter on ReplaceImageItem 21:23 <+sctt_> referring to the new Item 21:24 <+sctt_> that will oblige me to do more checks inside the main 21:24 <+sctt_> to see if it is allocated 21:24 <@heinrich5991> (feel free not to fix ExtractName if you mean) 21:24 <@heinrich5991> *if you want 21:25 <@heinrich5991> not really 21:25 <+sctt_> why? you want to fix it? xD 21:25 <@heinrich5991> I can fix it later, yes 21:25 <@heinrich5991> see, you can do it like this: 21:26 <@heinrich5991> ReplaceImage item works like before, but gets passed the pointer to CMapItemImage *pBuffer 21:26 <@heinrich5991> if you change the image stuff, just return pBuffer 21:26 <@heinrich5991> if not, do the stuff like before 21:27 <@heinrich5991> this way, you either get back a pointer to the Buffer (which is a variable in main) or to the DatafileReader item 21:27 <@heinrich5991> you don't have to deallocate either of these, so you don't need any extra code in main 21:27 <+sctt_> so you mean 21:27 <+sctt_> the main will create the new CMapItemImage 21:28 <+sctt_> as an object 21:28 <@heinrich5991> without any "new" keywords involved 21:28 <@heinrich5991> yes 21:28 <+sctt_> and pass it as a pointer 21:28 <@heinrich5991> yes 21:28 <+sctt_> and the function will return that pointer 21:28 <+sctt_> if it was actually the wanted item 21:28 <+sctt_> yeah that could work :D 21:29 <+sctt_> heinrich5991: ok that's clear now 21:30 <@heinrich5991> cool 21:30 <+sctt_> heinrich5991: last question, you said to print messages like usage 21:30 <+sctt_> what do you use in ddnet for that? 21:30 <+sctt_> dgb_msg? 21:30 <@heinrich5991> just use dbg_msg 21:30 <@heinrich5991> doesn't look nice, but it's something 21:30 <+sctt_> ok^^ 21:30 <+sctt_> so i will have to compile in debug mode to see them, correct? 21:31 <@heinrich5991> no, it always displays them 21:31 <+sctt_> oh good 21:31 <+sctt_> in stderr? 21:31 <+sctt_> or stdout? 21:31 <@heinrich5991> no, stdout 21:31 <@heinrich5991> IIRC 21:31 <+sctt_> okok 21:31 <+sctt_> very last question xD 21:31 <+sctt_> you said you want to fix ExtractName 21:31 <+sctt_> so should i still fix LoadPNG? 21:32 <+sctt_> it's a tw pasted code that too 21:32 <@heinrich5991> yes, that seems very easy to fix 21:32 <+sctt_> ok cool^^ 21:33 <+sctt_> ok so i will start to rework the code in a while and let you know :D 21:34 <@heinrich5991> cool 21:34 <@heinrich5991> just ping me on github when you're done 22:46 <+sctt_> heinrich5991: curiosity, if you are using hungarian notation, why you don't put 'n' before integers? xD 22:47 <@heinrich5991> it's only used to distinguish where a variable comes from in TW 22:47 <@heinrich5991> g_ for globals, m_ for members, s_ for statics 22:47 <@heinrich5991> and then a for arrays and p for pointers, mh. 22:47 <+sctt_> yeah that's hungarian notation 22:48 <+sctt_> you use it everywhere but not for integers 22:48 <+sctt_> xD 23:51 <+sctt_> @heinrich5991 you still here? 23:52 <+sctt_> heinrich5991: 23:52 <@heinrich5991> yes 23:52 <@heinrich5991> :) 23:52 <+sctt_> :) 23:52 <+sctt_> i've finished the fixes 23:52 <+sctt_> but... 23:52 <+sctt_> i've noticed i don't get any output from dbg_mesg 23:52 <+sctt_> :/ 23:53 <@heinrich5991> put dbg_logger_stdout() into your main function 23:54 <@heinrich5991> before any dbg_msg statements 23:55 <+sctt_> ok :D 23:56 <+sctt_> heinrich5991: oh god 23:56 <+sctt_> i've got like 10 lines of garbage 23:56 <+sctt_> like [2017-08-29 23:50:47][storage]: added path '$USERDIR' ('/root/.teeworlds') 23:56 <@heinrich5991> that's ok 23:56 <@heinrich5991> WAIT 23:56 <@heinrich5991> why do you execute stuff as root? 23:56 <+sctt_> well if he spams, maybe i should spam too xD 23:56 <+sctt_> i'm on a VM 23:56 <@heinrich5991> ok 23:57 <@heinrich5991> (still doesn't hurt to use a user account, but ok) 23:58 <+sctt_> it's a live 23:58 <+sctt_> he has only root by default