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 2022-12-25 00:00:00Z and 2022-12-26 00:00:00Z
Avatar
bf03e37 Fix wrong numbers (thanks BumM for report) - def-
00:28
92567ce Fix issues when closing multiple editor popups at the same time - Robyt3 f9827a1 Merge pull request #6181 from Robyt3/Editor-Popup-Fixes - def-
00:28
2f4facc Fix CheckAtomic.cmake - hack3ric 8d1c6ae Merge pull request #6182 from hack3ric/master - def-
Avatar
464cbbb Try to fix macOS CI failure again - def- 2a63277 Merge #6183 - bors[bot]
Avatar
chillerdragon BOT 2022-12-25 07:39:54Z
I had it on my 10 year old iPhone but I reset it last week :( still got it on my iPad. It’s really nice that someone went through the trouble of porting it to iOS all those years ago. I fear it is not a community project or open source something that one could revive or manually flash on a iPhone. It felt more like they wanted to make a business out of it. (@Kicker)
i still have it on my 10 years old ipad poggers2
😭 1
Avatar
Hi from tokyo
🇯🇵 1
09:58
Its 18:58
09:58
Bye sunday
10:06
Kek
Avatar
Voxel reported a new crash in editor: ``` ------------------- Error occurred on Saturday, December 24, 2022 at 20:35:50. DDNet.exe caused an Access Violation at location 0000000000000000 DEP violation at location 0000000000000000. AddrPC Params 0000000000000000 202C33342D203A58 000001F46866A850 0000002BCA9FB3D0 00007FF63FBA7D11 000001F46866A850 00007FFDE4309459 0000000000000000 DDNet.exe!0x127d11 00007FF63FB96DEA 0000000041C47CEC 0000000000000000 0000002BCA9FB640 DDN...
Avatar
I hope this won't break in any older curl versions we still might use somewhere. In file included from src/engine/shared/http.cpp:16: src/engine/shared/http.cpp: In member function ‘int CHttpRequest::RunImpl(CURL*)’: src/engine/shared/http.cpp:219:35: warning: ‘CURLOPT_PROTOCOLS’ is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Wdeprecated-declarations] 219 | curl_easy_setopt(pHandle, CURLOPT_PROTOCOLS, Protocols); | ^~~~~...
Avatar

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-ad...
Avatar
[quakenet] ChillerDragon BOT 2022-12-25 13:54:15Z
deen starring own repos again xd
Avatar
chillerdragon: when do you give a teeworlds motivation video for developers
Avatar
Avatar
[quakenet] ChillerDragon
deen starring own repos again xd
Easy to misclick, there is no confirmation or anything
Avatar
[quakenet] furo BOT 2022-12-25 14:53:22Z
Hey! The hours played the past 365 days that's seen on player profiles does not seem to add up. Let's say a player plays under one hour each day, their total will still be 0 because it gets rounded down to nearest hour (0) for each date. Also the JSON should probably return in seconds and the field "hours_played_past_365_days" is total playtime and not the past 365 days.
Avatar
@deen ^
Avatar
but then hours_played_past_365_days is misleading if you send seconds
Avatar
[quakenet] ChillerDragon BOT 2022-12-25 16:08:28Z
@Jupstar ✪ actually thought about it xd
16:08
but lazy
Avatar
``` src/engine/client/backend/vulkan/backend_vulkan.cpp: In member function 'void CCommandProcessorFragment_Vulkan::VerboseAllocatedMemory(VkDeviceSize, size_t, EMemoryBlockUsage)': src/engine/client/backend/vulkan/backend_vulkan.cpp:90:74: warning: unknown conversion type character 'z' in format [-Wformat=] 90 | dbg_msg("vulkan", "allocated chunk of memory with size: %zu for frame %zu (%s)", (size_t)Size, (size_t)m_CurImageIndex, pUsage); | ...
Avatar
furo: Thanks for report. I fixed the hours_played_past_365_days. It was a conscious decision not to print out the seconds played, but only hours resolution
16:25
Do you have a good use case for wanting seconds?
Avatar
[quakenet] furo BOT 2022-12-25 16:35:36Z
deen: Well, mainly because that's the way it's stored. And also because it doesn't show any decimals. For example if you take a look at the activity array, it usually says 0 hours played if they play under an hour which is misleading.
Avatar
This reverts commit a59613e56fac0fc354c9ec8403a8130a16ef098a.

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan...
Avatar
I didn't want this to be too much of a way of stalking people
17:07
so I thought 1 hour accuracy is fine-ish
Avatar
I am interested if there are some users of eCON out there. Is it widely used?
Avatar
If you have a use case for seconds, we can think about it
Avatar
[quakenet] furo BOT 2022-12-25 17:26:49Z
Fair enough, just a bit weird. I personally don't have any use case, as I have the data parsed locally.
Avatar
what about minutes
Avatar
@deen yup, i just fetched and same error for #6185
Avatar
I hope this won't break in any older curl versions we still might use somewhere. In file included from src/engine/shared/http.cpp:16: src/engine/shared/http.cpp: In member function ‘int CHttpRe...
Avatar
I see, can reproduce it
Avatar
names collision...
18:13
IStorage is a class defined in system headers
18:13
so we might need to use namespace
Avatar
Yeah, that's why we use the win32 mean and lean definition
18:13
I'll try to fix it
18:13
define*
Avatar
ugly fix, wrap #include curl into its own namespace 😄
18:14
probably wont compile anyway
Avatar
ce480b0 Ignore .spv vulkan files for in-directory builds - def- 2772389 Merge #6186 - bors[bot]
Avatar
latest commit fails later
Avatar
@heinrich5991 #6188 is not fixed with MinGW64, at least for system.cpp
Avatar
This reverts commit a59613e. Checklist Tested the change ingame Provided screenshots if it is a visual change Tested in combination with possibly related configuration options Written a unit...
Avatar
cant we use like __mingw_printf or smth
18:31
its kinda ridiculous that this doesnt work lmao
Avatar
Avatar
Chairn
@heinrich5991 #6188 is not fixed with MinGW64, at least for system.cpp
what's the problem there?
Avatar
same warning as for backend_vulkan.cpp, see linked issue #6187
Avatar
src/engine/client/backend/vulkan/backend_vulkan.cpp: In member function 'void CCommandProcessorFragment_Vulkan::VerboseAllocatedMemory(VkDeviceSize, size_t, EMemoryBlockUsage)': src...
Avatar

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-ad...
Avatar
%I64d throws no warning on MinGW
Avatar
but PRId64 doesn't work?
Avatar
@Chairn But I used exactly %I64d for it in https://github.com/ddnet/ddnet/pull/6188/files
Avatar
it expands to %lld and throws warning: unknown conversion type character 'l' in format
Avatar
that seems like a bug in mingw
Avatar
did you get the latest v ersion of 6188?
Avatar
but PRI64d is defined
Avatar
i pushed a new one later
Avatar
while you define it if not defined (edited)
Avatar
Avatar
heinrich5991
that seems like a bug in mingw
not being able to use z is the real bug
18:39
its c++ standard
Avatar
link?
Avatar
perhaps we need to include <cinttypes.h>?
18:39
for PRId64
18:39
<cinttypes>
Avatar
already included
Avatar
its simply bcs of microsofts stupid own c ansi
Avatar
do we use %z or %zd?
Avatar
@Chairn try __mingw_printf ignore the compile time warning that is unrelated
18:40
and see if it works
Avatar
we use %zu
Avatar
Avatar
heinrich5991
do we use %z or %zd?
zu
Avatar
eh. yea, seems to belong to C++11
18:41
why does the microsoft compiler not conform 😦
Avatar
legacy reasons xd
18:41
windows is bloat xd
Avatar
Avatar
Jupstar ✪
@Chairn try __mingw_printf ignore the compile time warning that is unrelated
does it print or format the string? we need format
Avatar
guess there are mingw prefixed versions for that too
Avatar
we can't use __mingw_printf anyway; it's certainly not available when compiling with msvc
Avatar
msvc probably checks all types anyway
18:42
so aslong it doesnt crash who cares
18:42
all args*
Avatar
and i got this with __mingw_printf warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
Avatar
wdym "check all args"?
Avatar
ah yeah, nvm
Avatar
i could imagine it checks if args are available, bcs they know that their anti standard thing causes too many problems
18:43
or: it wouldnt crash just not do the right thing
18:44
i just wonder why they dont fix it for c++ explicitly
18:46
anyway, just use PRId64 and cast to int64_t?
18:46
size_t is not required to be the same as int64_t
18:47
long long <=> long
Avatar
it seems msvc can deal with a size_t argument to %zu
Avatar
uint64_t *
Avatar
according to my extensive™ godbolt experiments
Avatar
Avatar
heinrich5991
it seems msvc can deal with a size_t argument to %zu
did they fix it or what
18:47
ah
18:47
does it offer old msvc versions?
18:48
i wonder if thats new
18:48
also did u use std::printf (as in c++ version ^^)
Avatar
no, I used printf
18:49
but I used C++ to compile
Avatar
Avatar
Jupstar ✪
does it offer old msvc versions?
no
Avatar
so we can fix it for mingw and call it a day? xd
Avatar
yeah, might be cleaner
Avatar
can mingw's libc deal with %zu?
18:50
if so, we could simply suppress the warning for mingw and call it a day
Avatar
@Chairn did it output smth wrong?
Avatar
Avatar
Jupstar ✪
@Chairn did it output smth wrong?
you mean compiler or runtime?
Avatar
runtime
Avatar
what should i trigger to see that?
Avatar
i dunno where we even still use it tbh
18:51
i saw so many commits removing my usages xD
18:52
"dbg_gfx 4"
Avatar
#include <cstdio> int main() { printf("%d %d %d %d %d %d %d %d %zx\n", 0, 0, 0, 0, 0, 0, 0, 0, (size_t)0x123456789abcdef0); }
18:52
try this
Avatar
then u should see it
Avatar
(I forgot the return 0;)
Avatar
this fixes system.cpp c++ #ifdef __MINGW32__ #undef PRId64 #define PRId64 "I64d" #endif
Avatar
wtf xd
18:55
all these weird workarounds
Avatar
Avatar
heinrich5991
#include <cstdio> int main() { printf("%d %d %d %d %d %d %d %d %zx\n", 0, 0, 0, 0, 0, 0, 0, 0, (size_t)0x123456789abcdef0); }
no warning, normal output
Avatar
i could swear on wine it didnt work when i tested it once. but if win7 works, i guess its fine
Avatar
wait what? something weird
18:57
sample file from heinrich throws no warning, but backend_vulkan does...
Avatar
c3909d7 Just quiet curl warnings for now - def- ac2246a Merge #6190 - bors[bot]
Avatar
Avatar
Chairn
sample file from heinrich throws no warning, but backend_vulkan does...
its bcs system.h enables a printf warning
18:57
but maybe gcc is not updated for this yet
18:57
on windows
Avatar
I'd say we start ignoring the warning on mingw then?
Avatar
that's what i usually do 🙂
Avatar
no, I mean suppress the warning
19:00
so that mingw users don't see it
Avatar
with a push macro?
Avatar
with a -Wno-warning-name in CMakeLists.txt
19:05
around 2 years ago
19:05
or it was a different bug
Avatar
hmmmmmm
19:06
weird
19:06
how do you dig up these messages? ^^ (edited)
19:06
it used %zu a while ago
Avatar
Avatar
heinrich5991
how do you dig up these messages? ^^ (edited)
i remember what i saw and try to find it xd
19:07
anyway if it works now then so be it
Avatar
Avatar
Jupstar ✪
i remember what i saw and try to find it xd
that‘s my technique too haha
Avatar
looks like PRId64 or PRIu64 are redefined everywhere...
Avatar
its overly complicated anyway
19:27
who cares for integer types lol
19:27
just print it
Avatar
integer types ≤ 64 bit are represented the same way on 64 bit platforms
19:27
on 32 bit platforms, there's a difference between 32 and 64 bit integers
Avatar
streaming is faster anyway than parsing the formats ^^
Avatar
the problem is that system.h is included first, defines its own version, and then it gets erased in following inclusion which includes cinttypes or inttypes.h
Avatar
Avatar
Chairn
the problem is that system.h is included first, defines its own version, and then it gets erased in following inclusion which includes cinttypes or inttypes.h
so why is it so
19:29
cant we remove this hack
Avatar
there's no header guard in those files, so they can be included multiple times
19:30
any definition in system.h gets erased silently
Avatar
system.h should include inttypes.h, probably
19:30
so it won't add this definition
19:30
or the hack could be removed completely, as jupstar says
Avatar
Counter proposition to #6188. Redefines our own specifiers

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrin...
Avatar
@Chairn troll
Avatar
at laest, no more warning 🤷‍♂️
Avatar
mute the warning if its wrong
Avatar
that's not why warnings exist
Avatar
if a warning is incorrect, it should be removed instead of worked-around
Avatar
it is not incorrect in MinGW, it warns that the specifier will be printed directly and the remaining arguments are printed incorrectly
19:48
so the code is functionnally incorrect in these cases
Avatar
what did we even talk about the last hour xD
19:49
that it works and the warning is incorrect
Avatar
that might have been about %zu though
19:50
what is PRId64 defined as in mingw?
19:50
sorry if I asked before, let me scroll up
Avatar
and lld is not supported in mingw?
Avatar
but he replaced the %zu
Avatar
lld works fine
Avatar
zu doesn't?
Avatar
anyway, it's just 2 undefines and 2 defines
19:52
zu do'esnt
19:52
it prints zu
Avatar
%zu is standard since c99, wtf?
Avatar
it's documented as not supported
19:54
welcome to the party btw 😉
Avatar
Avatar
Chairn
lld works fine
then we don't have to define PRId64 for mingw, no?
Avatar
it still echoes a warning though
Avatar
then this part is broken
19:55
but we shouldn't use %zu apparently
Avatar
if it works it works
19:56
if msvc finally complies to standard, thats nice to have
Avatar
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
19:57
%zu doesn't work on mingw apparently
Avatar
chairn said it does
19:57
so they probs fixed it
Avatar
Avatar
Chairn
zu do'esnt
here he said it doesn't
Avatar
I bet it's microshit's msvcrt that doesn't support it. Barely compliant bs
Avatar
Avatar
heinrich5991
here he said it doesn't
then try __mingw_ functions
19:58
better than all these weird hacks
Avatar
if i build master branch and try ./DDNet "dbg_gfx 4", it segfaults due to formatting
19:58
so it's a real problem
Avatar
Imagine being a multi billion dollar company and not being able to support a format specifier
Avatar
Avatar
Chairn
if i build master branch and try ./DDNet "dbg_gfx 4", it segfaults due to formatting
then finally try the mingw variants lol
Avatar
crash with dbg_gfx 4
Avatar
Avatar
Jupstar ✪
then finally try the mingw variants lol
which ones? they both crash
20:04
mingw64 and cygwin (msys64 in fact) i think (edited)
Avatar
weird af
20:04
msvc works, but ur not
20:04
win7 problems
20:04
good that win7 is dead
Avatar
msys64 in fact
Avatar
it crashes in C:\windows
Avatar
because stack is corrupted due to wrong format specifier
Avatar
but heinrich tested on gotbold
20:05
so just drop win7 😉
Avatar
or it just reads too far
20:06
yeah sure, send me new pc
Avatar
win10 works fine too
20:06
and linux probably too
20:06
also u a doctor, u can easily get highly paid job lol
Avatar
what if i don't want?
20:07
im fine with teaching
Avatar
Avatar
Chairn
what if i don't want?
You have to want it
Avatar
exactly
Avatar
also i guess u arent teaching for free
Avatar
yeah, but France doesn't pay well its teachers
20:07
barely 2k/month
Avatar
anyway, why do the mingw variants even exists
20:09
only for xp stuff
20:09
rip
20:09
imagine a world where we wouldnt need to support windows
20:10
in that world u also would be a well paid teacher probably
Avatar
how the hell can there be an error in a line i didn't touch... https://github.com/ddnet/ddnet/actions/runs/3777226868/jobs/6420942984
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
Avatar
sort the includes alphabetically
Avatar
hardest thing about our cmake setup xd
Avatar
Avatar
Chairn
this fixes system.cpp c++ #ifdef __MINGW32__ #undef PRId64 #define PRId64 "I64d" #endif
what exactly are the typedefs for int64_t and int64 on mingw?
20:22
are they different?
Avatar
long long
Avatar
hard to believe that mingw defined them wrong xD
Avatar
they don't
20:25
they use windows defines
20:25
so windows does it wrong
Avatar
man this too confusing
Avatar
mingw tries to use most of Microsoft header
Avatar
Avatar
Chairn
mingw tries to use most of Microsoft header
what if u add __USE_MINGW_ANSI_STDIO before inttypes.h
Avatar
tried it, no success
Avatar
in cmake?
Avatar
ok
20:27
mhh
Avatar
it is already defined somewhere
20:28
dunno where
Avatar
we really need std::format like formatting
20:28
but i dont want to trigger c fanboys
20:29
or streamed dbg_msg << "some text" << integer
20:29
ez
Avatar
okay, msys knows lld, but not zu
Avatar
this is not very localizable, unfortunately
Avatar
yep
20:31
for localizations std::format like
Avatar
it is, but you can't change order of words in relation to data
20:31
in both case, you can't change order of data
Avatar
you can, with printf and friends
Avatar
you can change data with words, but not first %d with second %s for instance
20:32
data is what comes after the format string
Avatar
so u fear that ppl might change it in the localization?
Avatar
nah, ive never seen it happen
20:33
but it could
20:33
maybe there's some translation where it's reversed and nobody knows 😄
Avatar
second %2$s with first %1$d
Avatar
not unlikely 😄
Avatar
$ symbol?
Avatar
Avatar
heinrich5991
second %2$s with first %1$d
oh interesting
20:34
never seen it
Avatar
it's a POSIX extension and I made sure that we support it everywhere for translations
Avatar
I can't find the tests anymore
Avatar
do you think MSVC supports it?
Avatar
if he wrote tests xd
Avatar
I had to change the function I call for MSVC
20:36
now I can't find it anymore
20:36
either I dreamt it or someone changed it back, deleting the tests
Avatar
not sure if the test were on DDNet, but they are on upstream
Avatar
oh, I only did it in teeworlds?
Avatar
no $ in data/languages
Avatar
time to cherry-pick 😄
Avatar
This is supported on Windows (https://docs.microsoft.com/en-us/cpp/c-runtime-library/printf-p-positional-parameters) and on POSIX, so basically everywhere. Add some tests to verify that the target system does indeed support these positional parameters. (cherry picked from commit ddd2b9319076efa81ca87e2f9582e328824f37db)

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration ...
Avatar
042f892 Allow translations to reorder string substitutions - heinrich5991 4f02f6d Merge #6192 - bors[bot]
Avatar
what is the target to only compile and run c++ tests ?
Avatar
run_tests
Avatar
nah, it runs rust tests as well, and those takes age
Avatar
We have run_rust_tests in the makefile but I don't see a way to only run the non-rust tests
Avatar
testrunner builds it but doesn't run it, so i guess it's fine for now
Avatar
I'll add a target for the C++ tests
Avatar
do the rust tests take ages to compile or ages to run?
22:49
@Chairn ^
Avatar
Rust test take around 10 seconds to run, whereas the C++ testrunner takes 2.5 seconds
Avatar
@bencie could u ban 69? He's on Multieasy with the name cosmaisy
22:49
U can check him out
Avatar
@SuP wrong channel
22:49
where do i ask
Avatar
#reports
22:49
this channel is about development discussion
Avatar
Avatar
Chairn
both?
(because you likely only have to compile them once)
Avatar
$ time ninja run_rust_tests real 0m20,192s
22:50
which file should i touch to trigger compilation?
Avatar
hmmm, not sure exactly
Avatar
src/rust-bridge/test/*.rs
Avatar
try touch src/**/*.rs
22:52
or that
Avatar
$ touch src/rust-bridge/test/*.rs $ time ninja run_rust_tests real 0m31,674s
22:53
so 10 secs compilation and 20 secs runtime
Avatar
yea, that's a lot
Avatar
i7-4700MQ
Avatar
Requested by Chairn, because the Rust tests are slow on their computer.

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan...
Avatar
i7-8705G for me
22:54
(and 2 seconds for running)
Avatar
shouldn't run_tests also depends on run_rust_tests?
Avatar
it does
22:55
check a few lines below
Avatar
lel, it now runs c++ tests first then rust 😄
22:59
dammit, too slow to bors r+ 😢
Avatar
16c58fe Add target run_cxx_tests to only run C++ tests - heinrich5991 139cf14 Merge #6193 - bors[bot]
Avatar
Avatar
Chairn
lel, it now runs c++ tests first then rust 😄
Shouldn't they run in parallel if they are independent?
Avatar
they both need access to the terminal
23:24
so can't run them in parallel
Avatar
Avatar
heinrich5991
i7-8705G for me
That's an interesting CPU+GPU combo 😄
Avatar
where do you get the GPU from?
Avatar
The G stands for integrated AMD GPU on an Intel CPU, doesn't it?
23:30
I remembered that I was suprisied when they worked together
Avatar
interesting, seems to be the case
23:30
I'm just using the onboard graphics card
23:31
so some intel stuff
Avatar
oh right, addition on-die intel graphics
Avatar
Avatar
heinrich5991
so can't run them in parallel
we could cache the terminal output and print it out when test is finished only
23:34
Just 2 seconds for me, so doesn't matter
Avatar
@Zwelf It seems like we are still seeing duplicate team ranks inserted. Is it possible that we insert them via mysql + sqlite both now? I see hundreds of team ranks being inserted every night from servers, the other ones seem fine.
Exported 363 message(s)