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-06-21 00:00:00Z and 2022-06-22 00:00:00Z
Avatar
webhook should show 2 issues soon
06:43
i have another crash dump if anyone wants it. i dont remember what i was doing though (happened 13 days ago)
06:44
i believe it had to do with the load map menu in the editor but not certain
Avatar
Today cloudflare was down
08:15
And half the internet with it
Avatar
and the ddnet masterserver as well, probably
08:21
one more bullet point on the list of stuff that properly decentralized masters should protect from
Avatar
ye ddnet masterserver was down, also 90% of games justatest
Avatar
This is desirable mainly because libpng is maintained and pnglite is not. pnglite was last updated in 2007 (15 years ago) and probably has a lot of security vulnerabilities. libpng is an actively maintained library also used by browsers like Firefox or Chromium, so it's less likely to contain security vulnerabilities, also it's more likely to be packaged by Linux distributions. This also refuses to load images of types not supported by pnglite, which allows us to think about backw...
Avatar
are issues no longer shown here?
10:18
or was it bc cloudflare
Avatar
I know of no change to issues
10:24
so they're probably still being shown here
10:25
@Jupstar ✪ or @Learath2: where would I place the stuff that wraps libpng? libpng shouldn't be linked by the server, but placing it in src/engine/shared makes the server require it. it's not a client-only dependency either, some tools need it. ideas?
Avatar
I doubt jupstar will be inclined to give you ideas given he is vehemently against you wrapping it at all 😛
Avatar
he also wrote a wrapper
Avatar
New folder maybe? src/engine/gfx_common?
Avatar
I'm just extending it
10:30
internet was gone, so my examples didn't go through: src/engine/image/, src/engine/png/, src/png/
10:30
why gfx? graphics, I guess
10:31
how about src/engine/gfx? @Learath2
Avatar
@deen @Learath2 @heinrich5991 I founded PR https://github.com/ddnet/ddnet/pull/3527 and from commit it was set just for windows family, but I notice that I have same crash issue with SIGPIPE on linux (ubuntu at least) so maybe u know why that was for windows just?
by making libcurl handle the signal itself See https://curl.se/libcurl/c/CURLOPT_NOSIGNAL.html Checklist Tested the change ingame Provided screenshots if it is a visual change Tested in combin...
Avatar
@Faulty the commit looks like it's done on everything BUT windows
10:36
note the exclamation mark in #if !defined(CONF_FAMILY_WINDOWS)
10:36
it negates the condition
Avatar
oh, my bad 🤦‍♂️ (edited)
10:37
so idk reason
Avatar
Avatar
heinrich5991
how about src/engine/gfx? @Learath2
Sounds fine to me, though I'd want even more of the gfx code in there not just png but it is a start I guess
Avatar
which version @Faulty?
11:19
and can you create an issue?
Avatar
used master branch - commit 02/06/2022 at 17:00 (Merge #5311) I will try to move signal(SIGPIPE, SIG_IGN); to server.cpp main(), maybe that helps ok, I will create an issue
Avatar
I'm too lazy right now to write code to test this, but I think this should work. What do you think, is it sufficient? @heinrich5991 Checklist Tested the change ingame Provided screenshots if...
Avatar
Used master branch - commit 02/06/2022 at 17:00 (Merge #5311) ``` Thread 4 "DDNet-Server" received signal SIGPIPE, Broken pipe. [Switching to Thread 0x7ffff4b9a700 (LWP 1530826)] libc_write (nbytes=24, buf=0x7fffec01b133, fd=12) at ../sysdeps/unix/sysv/linux/write.c:26 #0 libc_write (nbytes=24, buf=0x7fffec01b133, fd=12) at ../sysdeps/unix/sysv/linux/write.c:26 #1 __libc_write (fd=12, buf=0x7fffec01b133, nbytes=24) at ../sysdeps/unix/sysv/linux/write.c:24 #2 0x00007ffff7d90459...
Avatar
@Ryozuki do you still use tailwindcss? Are you enjoying the utility class approach?
Avatar
anyone know the wordle game?
12:01
Guess the hidden word in 6 tries. A new puzzle is available each day.
Avatar
speaking from experience tailwind is better than monolithic classes, hands down
12:24
especially for breakpoints
Avatar
Avatar
heinrich5991
@Jupstar ✪ or @Learath2: where would I place the stuff that wraps libpng? libpng shouldn't be linked by the server, but placing it in src/engine/shared makes the server require it. it's not a client-only dependency either, some tools need it. ideas?
yeah dunno faced same problem, guess just smth simple like engine/image, tho single dir for single file also sucks
12:27
but gfx is fine too, tho its not directly gfx related
12:28
how would sdl call it
12:28
media
Avatar
Avatar
Learath2
@Ryozuki do you still use tailwindcss? Are you enjoying the utility class approach?
Yes i like it
Avatar
person is having gpu usage more than 50% and fps ~300 on gtx 1650, while person with nobo laptop gets 600 fps. what is possible to do?
14:25
more details in #general
14:25
gpu usage is literally 50%
14:25
and more
14:27
and yes i asked to close all apps
Avatar
Avatar
Gewinum
person is having gpu usage more than 50% and fps ~300 on gtx 1650, while person with nobo laptop gets 600 fps. what is possible to do?
nvidia optimus
14:56
his nvidia GPU uses 50%, his intel gpu 70%, worst invention ever xD
14:57
it basically calculate the game on nvidia card, but nvidia card is not connected to the laptop monitor, then it gives back the calculated frame to intel card, intel card displays it
14:58
laptop manifacturer saved 50cents. u have a bad laptop for ever
Avatar
understandable
15:05
i feel bad for this person
Avatar
does someone with clang experience know why it doesn't like this statement?
15:21
for(auto & m_aPoint : pDestQuads[QuadsCounter].m_aPoints)
15:22
it was a normal for loop before, i copied this from Check clang-tidy modernizing warning
15:22
but it doesnt like it xD
Avatar
what is m_aPoints for type maybe try const auto& if that doesn't work, type of m_aPoints probably doesn't have .begin() and .end() member, try to call pDestQuads[QuadsCounter].m_aPoints.begin() to confirm
Avatar
weird it suggested to use the new construct instead of a normal loop if m_aPoints its not eligible for that :/
15:25
for(int j = 0; j < 5; j++) { pDestQuads[QuadsCounter].m_aPoints[j].x += f2fx(pQuadPos[0]) - pDestQuads[QuadsCounter].m_aPoints[4].x; pDestQuads[QuadsCounter].m_aPoints[j].y += f2fx(pQuadPos[1]) - pDestQuads[QuadsCounter].m_aPoints[4].y; }
15:25
it was like this before
Avatar
Fixes hotkeys triggering console input and UI editbox input at the same time when the console is open and a UI editbox is selected. Closes #5467.

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 if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics t...
Avatar
what is the error it says
Avatar
now its like this
15:26
for(auto & m_aPoint : pDestQuads[QuadsCounter].m_aPoints) { m_aPoint.x += f2fx(pQuadPos[0]) - pDestQuads[QuadsCounter].m_aPoints[4].x; m_aPoint.y += f2fx(pQuadPos[1]) - pDestQuads[QuadsCounter].m_aPoints[4].y; }
15:26
both versions compile and run correctly, its a CI test problem
Avatar
i mean the naming is weird, as red said
15:26
name it Point
15:26
not m_aPoint
15:26
but generally it looks correct to me
Avatar
paste function code, maybe you declared pDestQuads as const& and therefore can't take by normal reference
Avatar
its ddnet naming not mine^^
15:26
its not my class
Avatar
i dont find that code
Avatar
its CQuad class that has m_aPoint property
15:27
bool InsertDestinationQuads(const float pGameAreas[2][2][2], const CQuad *pQuads, const int NumQuads, const CMapItemGroup *pLayerGroups[2], CQuad *pDestQuads, int &QuadsCounter) { bool bDataChanged = false; for(int i = 0; i < NumQuads; i++) { MapObject Obs[2]; Obs[0] = CreateMapObject(pLayerGroups[0], fx2f(pQuads[i].m_aPoints[4].x), fx2f(pQuads[i].m_aPoints[4].y), 0, 0); float pVisibleArea[2][2]; if(GetVisibleArea(pGameAreas[0], Obs[0], pVisibleArea)) { float pQuadPos[2]; Obs[1] = CreateMapObject(pLayerGroups[1], 0, 0, 0, 0); if(!AdaptVisiblePoint(pGameAreas, pVisibleArea, Obs, pQuadPos)) continue; pDestQuads[QuadsCounter] = pQuads[i]; for(auto & m_aPoint : pDestQuads[QuadsCounter].m_aPoints) { m_aPoint.x += f2fx(pQuadPos[0]) - pDestQuads[QuadsCounter].m_aPoints[4].x; m_aPoint.y += f2fx(pQuadPos[1]) - pDestQuads[QuadsCounter].m_aPoints[4].y; } QuadsCounter++; bDataChanged = true; } } return bDataChanged; }
15:27
that's the complete method if it helps you
Avatar
doesnt exists for me
15:28
u sure its ddnet?
Avatar
pretty sure^^
Avatar
what file?
Avatar
this is my file
15:28
CQuad sh ould be defined here i guess
15:28
#include <game/mapitems.h>
Avatar
pDestQuads is a pointer, can't for loop over it
Avatar
but then its not ddnet code xd
Avatar
m_aPoints is ddnet code
Avatar
anyway, just give me the error
15:29
the error text
Avatar
Avatar
f
m_aPoints is ddnet code
m_aPoints is correct but the loop variable should be named Point and not m_aPoint
Avatar
Run scripts/fix_style.py --dry-run src/tools/map_replace_area.cpp:433:14: error: code should be clang-formatted [-Wclang-format-violations] for(auto & m_aPoint : pDestQuads[QuadsCounter].m_aPoints) ^ Error: Process completed with exit code 1.
Avatar
Avatar
Robyt3
m_aPoints is correct but the loop variable should be named Point and not m_aPoint
i understand, you are right
15:30
i copied and pasted from clang warning
Avatar
yeah, clang warning just removed the plural s from the name I guess
Avatar
also the & should be directly before the name
Avatar
i think
15:31
for(auto &DemoRecorder : m_DemoRecorder)
Avatar
so for(auto &m_aPoint : pDestQuads[QuadsCounter].m_aPoints) ?
15:31
ok i try
Avatar
yes, then it will pass the clang format
Avatar
weird that it suggest styles that it doesnt like itself xD
Avatar
Avatar
Jupstar ✪
i think
that whitespace is ignored
Avatar
Avatar
f
weird that it suggest styles that it doesnt like itself xD
we also have a fix-style
Avatar
Avatar
ReD
that whitespace is ignored
doubt
15:32
clang-format is very strict
Avatar
heinrich runned it for me but now he is offline
15:32
for this only row ill rather fix it by hand
Avatar
int main() { int a[5]; for (auto & x : a) { } } works on godbolt, clang https://godbolt.org/z/7KPjPToa8
int main() { int a[5]; for (auto & x : a) { } }
15:34
its like the one it is complaining about
15:34
is there a difference i cant see?
15:34
oh yes the space between for and (
Avatar
Avatar
ReD
int main() { int a[5]; for (auto & x : a) { } } works on godbolt, clang https://godbolt.org/z/7KPjPToa8
its not a compiler error
15:35
clang-format is text formatting
15:35
compile and running works ok for me
15:35
im trying to pass all CI now
Avatar
ah you're right sorry
Avatar
i try with for(auto &m_aPoint : pDestQuads[QuadsCounter].m_aPoints) first and lets see
Avatar
it's just like python all over again
Avatar
Avatar
Jupstar ✪
for(auto &DemoRecorder : m_DemoRecorder)
seems that it worked! (edited)
15:40
Check style / check-style (pull_request) Successful in 2m
15:41
thanks
Avatar
next time you can ignore (only!) the clang-format stuff and let someone else run it
15:42
i though you were offline or i would have asked ^^
15:43
was just a single line anyway, np
Avatar
I was indeed offline
15:43
just came back online ^^
16:21
81e24ce Only enable UI editbox hotkeys when UI is enabled - Robyt3 3d98a4b Merge #5468 - bors[bot]
16:40
bcb367c Added map_replace_area tool - sctt 742cb95 Added map_replace_area to build - sctt 87ab234 Fixed indentation - sctt eebabaa Fix indent - ChillerDragon 1db79fb Log rcon messages (fixes #5342) - def- 44a79d5 Add chat and rcon to integration test - ChillerDragon 9a89e58 Add lsan.supp for opengl leak (fixes #5296) - def- 735b0bd fifo: read() doesn't null-terminate! - def- de55d49 Fix motd undef behavior - def- 442ae7d Make it easier to run integration tests - def- 5768e52 Minor fixes - def- afd4504 Fix integration argument parsing - ChillerDragon e207fa5 Merge branch 'ddnet:master' into sctt-map_replace_area - sctt 46b500e map_replace_area: handled layergroups parameters (offset/clip/parallax) with adaptation between source and dest map - term bc24395 Increase client boot timeout for integration test - ChillerDragon fad8afc Fix whitespace is CMakeLists.txt - heinrich5991 65ad57a Change from pnglite to libpng for PNG reading - Jupeyy 9550846 Refuse to load images of types not supported by pnglite - heinrich5991 f3bde7c map_replace_area: fixed alphabetical order in CMakeLists.txt - sctt 2112426 map_replace_area: minor fixes to pass CI tests - sctt ce3577d map_replace_area: fixed indentation - sctt 8c392c9 map_replace_area: other minor fixes to pass CI tests - sctt 923e9ac Run scripts/fix_style.py - heinrich5991 4625b55 Move PNG handling to src/engine/gfx - heinrich5991 a9d4ae4 map_replace_area: hopefully last fixes to pass CI tests - sctt 9b0396e map_replace_area: hopefully last last fixes to pass CI tests - sctt b75289d Merge #4829 #5343 #5465 - bors[bot]
Avatar
Avatar
Gewinum
person is having gpu usage more than 50% and fps ~300 on gtx 1650, while person with nobo laptop gets 600 fps. what is possible to do?
install nvidia control panel and enforce nvidia gpu there (like murpi indicated)
Avatar
Avatar
f
for(auto & m_aPoint : pDestQuads[QuadsCounter].m_aPoints)
m_aPoint is neither an array nor a member variable, just name it Point, it wont shadow another variable then
Avatar
Avatar
Chairn
m_aPoint is neither an array nor a member variable, just name it Point, it wont shadow another variable then
yes, i understand clang cannot guess hungarian notation stuff, so it just renamed it like that
17:08
anyway the real problem was the space between m_aPoint and & (edited)
Avatar
@f damn boi, contributing for ddnet
17:17
like last time lol
Avatar
aah I remember
Avatar
On the way to add default values to the snapshots... I polished up a little bit the snapshot stats:
Avatar
Avatar
deen
and you closed it normally or it crashed?
i don't know what you updated but now when i alt f4 it takes like 3 seconds for the game to close, where as before it was instant
Avatar
``` /home/chiller/Desktop/git/ddnet/src/tools/map_replace_area.cpp:667:18: warning: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-const-int-float-conversion] return Value == INEXISTENT; ...
18:27
I am this close to adding a "build should not pollute working tree" check to the CI
Avatar
  • zoom
  • new hud
  • emote chooser
  • chat input
  • scoreboard
*...did i miss something?
  • statboard
  • show more chat dont render
  • ingame browser
  • f1/f2 console what do you think?
Avatar
@Learath2
🛁 3
👈 3
20:31
this image is accurate
Avatar
I've seen this image with a simpler painted person
Avatar
but its more fun if its anime realted
20:33
xD
20:33
related*
Avatar
Avatar
GitHub
Click to see attachment 🖼️
render everything in demos
Avatar
66099ab map_replace_area: fixed implicit int to float conversions - sctt 222539e map_replace_area: removed standard inclusions - sctt 110eed9 Merge #5471 - bors[bot]
Avatar
2ab4404 Ignore map_replace_area - ChillerDragon f8810ae Merge #5470 - bors[bot]
Avatar
Avatar
Ryozuki
@Learath2
better version
Avatar
but wait, why is int pointing at something?
Avatar
cause its l-value
21:04
it points to r-value
Avatar
that's not how I model it
Avatar
a variable is an address in which you can find the value
21:05
that's the sense
Avatar
not rly
21:11
the variable may be the value itself
21:12
constness ftw
Avatar
this
Avatar
Avatar
Ryozuki
not rly
yes, for const int^^
21:14
but not for int
Avatar
who knows
21:14
the variable may be constified by some optimization
21:14
checkmate
21:15
21:15
never trust c++
Avatar
yes you are right ofc
Avatar
use rust
21:15
:3
Avatar
Speaking this morning at The Linux Foundation's Open-Source Summit, Linus Torvalds talked up the possibilities of Rust within the Linux kernel and that it could be landing quite soon -- possibly even for the next kernel cycle.
Avatar
@T tee i found the origin
21:34
thats poggers
Exported 201 message(s)