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 2017-08-29 00:00:00Z and 2017-08-30 00:00:00Z
<heinrich5991> I updated the README, but I can also update that page
13:46
<deen> Please only keep information in one place
13: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
13:47
<heinrich5991> it doesn't look like the wiki page has extra info right now
13:47
<heinrich5991> looks like a copy of the old readme
<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
14:03
<heinrich5991> but if you execute it with visual studio it runs, right?
14:03
<heinrich5991> I vote for "too confusing" btw
14:03
<heinrich5991> soo many arrows
14:03
<Ryozuki> so
14:03
<Ryozuki> you want lot of images instead?
14:03
<heinrich5991> I think that would actually be better
14:04
<heinrich5991> interesting points also are the install C++ extensions for MSVS and the install python for all users
14:05
<Ryozuki> visual studio fills the ddnet folder with shit
<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
14:11
<heinrich5991> could you squash all these commits into one?
14:11
<heinrich5991> wait a second, I can probably tell you the right command
14:13
<heinrich5991> sctt_: you with me? :)
14:13
<sctt_> oh ok
14:13
<sctt_> yes :D
14:13
<sctt_> i thought you could do something like "Squash and merge"
14:13
<sctt_> i saw i somewhere
14:13
<heinrich5991> are you in the git command line with inside the repository?
14:13
<sctt_> yes
14:14
<heinrich5991> what is the upstream git repository named, do you already have a name for that?
14:14
<heinrich5991> git remote -v can show you that
14:15
<sctt_> yes wait 1 sec
14:16
<heinrich5991> Ryozuki: it hasn't created these folders for me, they're probably artifacts from an earlier build
System information (version)
OpenCV => GitHub master from today
Operating System / Platform => Win 8.1
Compiler => VS2015-U3
CMake => 3.7.1
Detailed description & Steps to reproduce
If you do an ...
Using cmake-3.7.20161123-g250c3-win64-x64.msi from the nightly builds and generating project files for the Visual Studio 2017 Community Edition RC results in ZERO_CHECK and ALL_BUILD Intermediate Directories being incorrect. For example I...
14:40
<Ryozuki> (or looks like)
14:41
<Ryozuki> and yes, looks like its a vs bug
14:41
<Ryozuki> can't do nothing then
14: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."
System information (version)
OpenCV => GitHub master from today
Operating System / Platform => Win 8.1
Compiler => VS2015-U3
CMake => 3.7.1
Detailed description & Steps to reproduce
If you do an ...
15:34
<Ryozuki> nice
15:35
<Ryozuki> tho the dlls arent on the output folder
15:35
<Ryozuki> but on the build folder
15:35
<Ryozuki> maybe its possible to add a postbuild command for vs to move these?
15:36
<heinrich5991> but can you start the programs from the msvs UI?
I have a dynamic library that gets a different name depending on configuration, specified in the CMake scripts by:
set_target_properties(${name} PROPERTIES OUTPUT_NAME ${outputName}64)
<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?
<sctt_> heinrich5991: i've read your revision, that's great! but i have some doubts and observations about some point... can we brefly discuss?
19:04
<heinrich5991> sure
19:04
<sctt_> ok so, a general thing
19:05
<sctt_> many things you pointed out are about pieces of code i just copied from tw source
19:05
<sctt_> like LoadPNG and ExtractName
19:05
<sctt_> or general structure of main, it is from map_resave
19:06
<sctt_> does it mean i should also change also the methods i copied
19:06
<sctt_> or just change map_replace_image?
19:06
<heinrich5991> if you want, you can also change map_resave
19:07
<heinrich5991> but it would suffice if the new code is better :)
19:07
<heinrich5991> ddnet source code does have some dark corners that border on unreadability
19:07
<heinrich5991> but we won't fix it all at once, no big refactor or anything
19:08
<sctt_> ok so i will focus on the tool
19:08
<heinrich5991> sure :)
19:08
<sctt_> consider that the things you pointed out on LoadPNG and ExtractName
19:08
<sctt_> are like this also inside the main code
19:10
<heinrich5991> hm. maybe I'll do a follow-up fix of the main code
19:10
<sctt_> ok :D
19:10
<heinrich5991> extractname e.g. is from 2010 :)
19:10
<sctt_> than i have a couple of more questions
19:10
<heinrich5991> go ahead :)
19:10
<sctt_> where you say
19:10
<sctt_> "Is this line still needed?"
19:10
<sctt_> you are referring to an include list
19:11
<heinrich5991> yes
19:11
<sctt_> which include were you referring exactly?
19:11
<heinrich5991> to the graphics
19:11
<sctt_> oh
19:11
<heinrich5991> engine/graphics.cpp
19:11
<sctt_> thats for image info structure
19:11
<heinrich5991> .h
19:11
<heinrich5991> ah ok
19:11
<heinrich5991> so yes, it's still needed
19:11
<sctt_> ok^^
19:11
<sctt_> than
19:11
<sctt_> then*
19: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. :)
19:12
<sctt_> why leakead? it is needed for datafile.addData
19:12
<sctt_> addItem sorry
19:12
<heinrich5991> leaked means: it is never deleted
19:12
<sctt_> yes but i dont want to delete it
19:12
<sctt_> cause it is needed
19:12
<sctt_> where datafile.Finished
19:13
<heinrich5991> after the call to additem, you don't need it anymore
19:13
<heinrich5991> additem makes a copy
19:13
<sctt_> oh
19:13
<sctt_> i didnt know that
19:13
<sctt_> i thought he kept the reference
19:13
<heinrich5991> yea, the joys of c/c++ :)
19:13
<sctt_> but i noticed, when i do getItem
19:13
<sctt_> i don't have a copy
19:13
<sctt_> i have his reference
19:14
<sctt_> that's why i thought it was the same with addItem
19:16
<heinrich5991> but even if it were the case, you'd still leak it after finish
19:16
<heinrich5991> – for every new you must have a delete somewhere
19:16
<heinrich5991> but in this case, it should be doable without new/delete
19:17
<sctt_> if that were the case, i would just have to delete the datawriter
19:17
<sctt_> his destroyer should deallocate the items i guess
19:18
<heinrich5991> no
19:18
<sctt_> so it doesnt :/
19:18
<sctt_> so i have to save all the items into an array and deallocate them after the finish
19:18
<heinrich5991> or jsut don't allocate using new at all
19:19
<sctt_> but considering that after the .finish the program quits and all its memory willl be released, i dont think its worth it
19:19
<sctt_> i can't not allocating them
19:19
<sctt_> the function needs the return a void pointer
19:19
<sctt_> and i can't use the same Item i'm reading, i have to clone it into another memory area
<heinrich5991> I still see some of the code indented with 8 spaces instead of tabs
22:32
<heinrich5991> DataWriter and DataReader should get a g_ prefix
22:33
<heinrich5991> it really doesn't hurt to declare the variables in the main function a bit later, at their use site
22:33
<heinrich5991> i.e. in the loops
22:33
<heinrich5991> but that's it, I think :)
22:33
<heinrich5991> sctt_: ^
22:34
<sctt_> i noticed the spaces, i'm fixing now
22:34
<sctt_> xD
22:34
<sctt_> ok for data
22:40
<sctt_> heinrich5991: ok done^^
22:42
<heinrich5991> ok, looks good now. you really like nonlocal variables, aha :)
22:42
<heinrich5991> sctt_: the newest commits are made by root@term.station
22:42
<heinrich5991> if that's ok, I'll go ahead and merge
22:42
<sctt_> "you really like nonlocal variables" what do you mean? xD
22:42
<sctt_> oooh
22:43
<sctt_> sorry i've read non-canonical, i don't know why :/
22:43
<sctt_> i hate globals, i never use them
22:43
<sctt_> i've not for a piece of code that does only one thing and it's under 100 lines xD
22:43
<heinrich5991> not what I mean, I ment that you declare all your variables at the start of the main function instead of in the loops where they're used
22:45
<sctt_> i did that only because it was like this on the code i started and you didn't tell me to move them
22:45
<sctt_> i'm trying to do things as you are used to :/
22:46
<sctt_> there are people who likes to have data list in the top part xD
22:46
<heinrich5991> anyway, [00:42:15] <@heinrich5991> sctt_: the newest commits are made by root@term.station
22:46
<heinrich5991> is that ok or do you want to change that?
22:47
<sctt_> i don't really care about the name, i would change only if you prefer that
22:47
<heinrich5991> nah, d/c
22:47
<sctt_> ok^^
22:48
<heinrich5991> I'll wait for the travis ci build to finish before merging
22:48
<heinrich5991> should hopefully be done in a couple of minutes ...
22:48
<sctt_> ok :)
22:48
<sctt_> to be honest i'm surprised you are interested in map_image_replace tool
22:49
<sctt_> i hadn't think about a merge when i wrote it