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 2021-06-14 00:00:00Z and 2021-06-15 00:00:00Z
Avatar
looks wrong to me

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 if it works standalone, system.c especially
  • [ ] 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
@M|aria. cuter name
08:13
d873a5d Fix str comp parameter in updater - Jupeyy df2f666 Merge pull request #3906 from Jupeyy/pr_fix_auto_update_len - def-
Avatar
how do i change client-side system messages ?
Avatar
go to OnMessage
09:25
and look for client id
09:25
there are comments about it
Avatar
Avatar
Anime.pdf
go to OnMessage
where ? (edited)
Avatar
search thru project
Avatar
Avatar
Anime.pdf
search thru project
where is project file ?
09:40
Avatar
its data folder
09:43
download sources
12:52
Give that man a slice of Ukraine
Avatar
Fixes #3907.

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 if it works standalone, system.c especially
  • [ ] 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-add...
Avatar
69f987d Fix bors.toml for Ubuntu 18.04 - heinrich5991 92a271a Merge #3908 - bors[bot]
Avatar
``` [2021-06-14 09:18:48][http]: libcurl version 7.22.0 (compiled = 7.55.0-DEV) […] [2021-06-14 09:18:49][http]: http https://master4.ddnet.tw/ddnet/15/servers.json [2021-06-14 09:18:49][http]: http https://info2.ddnet.tw/info
  • About to connect() to info2.ddnet.tw port 443 (#0)
  • Trying 104.21.78.207... * getaddrinfo(3) failed for master4.ddnet.tw:443
  • Couldn't resolve host 'master4.ddnet.tw'
  • Closing connection #0
[2021-06-14 09:18:49][http]: task failed. libcurl error: Couldn'...
Avatar
Avatar
Astramast
Give that man a slice of Ukraine
ok ez
Avatar
@Learath2 do you know another (preferably free-to-play) game that uses libcurl?
15:16
[2021-06-14 09:18:48][http]: libcurl version 7.22.0 (compiled = 7.55.0-DEV) […] [2021-06-14 09:18:49][http]: http https://master4.ddnet.tw/ddnet/15/servers.json [2021-06-14 09:18:49][http]: http ht...
Avatar
Avatar
heinrich5991
@Learath2 do you know another (preferably free-to-play) game that uses libcurl?
hmm, nope none come to mind, sorry
Avatar
wasnt someone from a worms game here?
15:44
maybe they do
15:44
he used to hang around in this irc channel
15:45
Hedgewars! It's a blast!
15:46
heh they moved to libera chat too
Avatar
@Ryozuki I have a function that writes out to something that implements std::io::Write I need to write to a String what is the best way to do that?
15:47
I was thinking of just outputting to a Vec<u8> and then going ot a string from there
Avatar
yup
15:48
that's the best way, I think
Avatar
A Cursor wraps an in-memory buffer and provides it with a [Seek] implementation.
15:48
a cursor around a vec is the best i think
Avatar
that seems to just extra code when a Vec also works
Avatar
i guess
15:49
xd
15:51
@Learath2 remember that if u dont wrap the writer around a bufwriter the writes are unbuffered
15:51
i see leddit ppl saying hehe rust is slower than java due to this
Avatar
doesn't really matter for a vec, I think
Avatar
Seems like the serverlist can't be accessed in a netcafe consistently.
15:57
Still can't get the log out of players. So I can't tell why.
Avatar
Avatar
TsFreddie
Seems like the serverlist can't be accessed in a netcafe consistently.
I mean consistently can not be accessed.
Avatar
can you just go to a netcafe and check? ^^
16:12
My social anxiety won't let me
16:12
Never been to those places
16:12
I directed him to use a custom cfg that has a cn domain plus a Chinese cdn
16:13
Still didn't work
Avatar
Huh, maybe some firewall blocking it?
Avatar
maybe. But I don't know what firewall would block a traffic from tencent
16:15
Also in these places I would imagine they don't have a admin windows account. Might be worth checking.
16:15
Although not sure what would be different about it
16:19
or it might be a policy thing where they can only serve Chinese games
16:20
Scratch that, they can connect to servers just fine
16:20
πŸ˜‡
Avatar
@TsFreddie might they be MITM every connection?
Avatar
Possible
Avatar
can you ask them to show a certificate in the browser for https://master1.ddnet.tw/ddnet/15/servers.json ? (edited)
Avatar
Will do
16:22
Although most of them struggled to paste a string into their file explorer
16:22
I'll do my bestπŸ˜…
16:24
Ah this one isn't replying. I'll wait for the next "victim"
Avatar
!invite
16:36
$invite
Avatar
$invite
Avatar
i cant add the ddnet bot to my server, why?
Avatar
I think the bot is in 100 different discords, and the developer would need to send their ID card to discord to allow the bot in more servers
Avatar
other servers have the ddnet bot?
16:44
can they rename it or is it advertisement
Avatar
people can rename bots, but I think only ddnet-related discords would have an incentive to use the bot ^^
Avatar
@deen its now your turn, to verify your bot (edited)
Avatar
it's not deen's bot
16:51
it's jao's AFAIK
16:51
and as said, you have to send your ID to discord AFAIK, not everyone will want to do that
Avatar
blame discord
Avatar
@Ryozuki do you know if collecting the stream from .fetch() has a performance penalty over .fetch_all() in sqlx?
Avatar
@Learath2 i think fetch returns a stream
17:15
which i guess is like a iterator
17:15
fetch all is probs the collected items of that
17:16
@Learath2 i think fetch is better
17:19
stream is an async iter
17:19
i guess if u have to map or filter it its better fetch
Avatar
b2cce3b Add sponsored servers by Davide (huge thanks!) - def-
Avatar
Does anyone know where and what files are created by ddnet on macOS which should be removed on uninstallation? @Learath2 ? (edited)
Avatar
@Luca the only thing outside of it's dir that ddnet touches is the teeworlds folder in Application Support
Avatar
Okay @Learath2 so I would roll with these?! "~/Library/Preferences/DDNet-Server-Launcher.plist", "~/Library/Saved Application State/org.DDNetClient.app.savedState", "~/Library/Application Support/Teeworlds/" (edited)
Avatar
this will also remove the files created by Teeworlds
18:23
both ddnet and teeworlds write into that folder
18:23
what are you coding? πŸ™‚
Avatar
Yes that is true.
Avatar
Avatar
heinrich5991
what are you coding? πŸ™‚
homebrew uninstaller
Avatar
is it customary for homebrew uninstallers to remove user settings?
Avatar
imagine wanting to uninstall ddnet feelsbadman
Avatar
it is not
18:27
That is why I am asking
18:28
So i guess it would be better to not delete the teeworlds dir
18:34
@heinrich5991 good you mentioned it. I didn't think about that. I would have kept it in πŸ™‚
Avatar
np
Avatar
Avatar
heinrich5991
is it customary for homebrew uninstallers to remove user settings?
also about this: The zap stanza describes a more complete uninstallation of files associated with ddnet. The zap procedures will never be performed by default, but only if the user uses --zap on uninstall. So you probably could also remove the teeworlds dir. On the other hand most users know this dir exists (because of skins, binds, entities, ...) so they might as well delete it by hand.
Avatar
ah, it's not by default
Avatar
zap does then work of a cleaner app.
Avatar
that makes it less of an issue
Avatar
yeah but I guess better delete less than too much?!
18:39
I mean I would be pretty sad if my config would get lost this way.
Avatar
yea
Avatar
Also, from now on, ddnet on the Mac will be updated automatically if it was originally installed with Homebrew. If this turns out to be a problem for any reason, please let me know.
Avatar
wdym, updated automatically?
18:43
I think our autoupdater doesn't work on macos
Avatar
if a new version is available
Avatar
will it be updated by brew?
Avatar
ah. sounds good. don't think it'll be a problem
18:44
thanks for working on packaging ddnet πŸ™‚
Avatar
No worries. I need ways to procrastinate πŸ™‚
Avatar
now brew is one of two package managers that have an up-to-date version
18:46
List of package versions for project ddnet in all repositories
Avatar
it has been since 15.1.3
18:49
it's the only thing I am contributing to ddnet xD besides some translations
Avatar
is the serverlist script online somewhere
Avatar
which serverlist script?
Avatar
the program that generates the json
18:51
is it in libtw2?
Avatar
yes
18:51
stats_browser
Avatar
ok ty
Avatar
I re-used an old project
18:51
you need --format json (edited)
18:52
be careful running the script, you're incurring traffic for every server hoster in teeworlds
Avatar
yes
18:52
but the cloudflare is really slow for me
18:52
sometimes takes 4-5 seconds to load
Avatar
Avatar
heinrich5991
be careful running the script, you're incurring traffic for every server hoster in teeworlds
isn't that a huge vulnerability?
Avatar
@Deleted User do you want to host master3?
18:53
please don't run it for private purposes only, that doesn't scale
Avatar
has ddnet still some server?
18:54
i doubt my vps can handle alot of requests (edited)
Avatar
Avatar
Luca
isn't that a huge vulnerability?
atleast not 2k players are requesting the info πŸ˜„
Avatar
Avatar
Deleted User
sometimes takes 4-5 seconds to load
but only the first connection?
Avatar
its random
18:58
when i switch tabs
18:58
is the load high btw? or is it getting ddos'd?
Avatar
you could fix the tab switching instead of scraping the servers another time πŸ˜‰
Avatar
in what way, caching the current list and silently update?
Avatar
not throwing the http master serverlist away when switching tabs
Avatar
https://ddnet.tw/status/ CPU is 100% often
19:00
if thats the server same
Avatar
the http master server class has all the data
Avatar
Avatar
Deleted User
if thats the server same
nice english
19:02
i mean is master1 == ddnet.tw
Avatar
you can simply not throw the server info away on tab change @Deleted User
19:03
then there will be no reloads when switching tabs
Avatar
yes, i generally think it should always show the list
19:03
even if its outdated
Avatar
that would require caching
Avatar
the normal user doesnt understand it anyway "fetching master list"
Avatar
but not throwing the old info before obtaining the new one sounds good
Avatar
well caching = writing it and load it at client start
19:04
from that one its always just updating that file
19:04
since it doesnt throw away
Avatar
yea, enter permission problems etc.
19:05
and concurrency issues with multiple clients
19:05
but maybe you can put it into the sqlite3 db
Avatar
isnt read write safe?
Avatar
it's certainly not atomic
Avatar
well i guess and start and closing client its as safe as the ddnet_settings.cfg
19:08
at*
Avatar
which is also not safe and we get reports for that
19:08
also that is already doing the rename trick IIRC
Avatar
requieres a quick ahdn xd
19:08
hand
19:08
yeah the rename trick could be done too ofc
19:09
anyway, i'll see what i'll do
Avatar
lockfiles monkalaugh
Avatar
@heinrich5991 || @Ryozuki https://paste.pr0.tips/6S do you see a way to make this work?
19:22
Issue is that sqlx::error::Error isn't Copy so I don't really see how I can get it out of the closure
Avatar
what's the error?
19:23
this looks like it could compile in my brain
Avatar
ERROR: No such paste.
Avatar
mixed the O with 0
Avatar
i wonder what r u doing
19:25
i never had to use pin in my life
19:25
xd
Avatar
streams and async in general is very new in rust, it's tough to use
Avatar
does adding a move fix it?
Avatar
Need to pin that stream because the new stream created by filter_map is no longer Unpin and you can't .next on it
Avatar
Avatar
Ryozuki
does adding a move fix it?
It would take err by value meaning I can't get it outside
Avatar
seems like you're not allowed to take a reference to the outside variable somehow?
19:28
you could circumvent this particular problem with an Arc<AtomicPtr<>>, probably
19:28
hm, I don't understand the error message, I think
Avatar
I'm allowed to take a reference to the outside, I think I just am not allowed to let e escape
Avatar
I want to create a simple websocket server. I want to process the incoming messages and send a response, but I get an error: error: captured variable cannot escape FnMut closure body --> src...
Avatar
hm a fold is an interesting idea
19:30
but I can just avoid this construct anyway, I just wanted to check if any of you encountered this
19:31
I'll just map the stream items to Result<Row, Error> and handle the error later
Avatar
i havent rly used much streams
Avatar
couldn't ger2 host a master? seems like a complete OP machine compared to the others anyway
Avatar
I guess we could try, yes
Avatar
[2021-06-14 21:47:23][http]: fetching https://master1.ddnet.tw/ddnet/15/servers.json [2021-06-14 21:47:23][http]: task done https://master1.ddnet.tw/ddnet/15/servers.json [2021-06-14 21:47:23][http]: fetching https://master1.ddnet.tw/ddnet/15/servers.json [2021-06-14 21:47:24][http]: task done https://master1.ddnet.tw/ddnet/15/servers.json [2021-06-14 21:47:24][http]: fetching https://info2.ddnet.tw/info?name=%5EpDetektiv%20Keks [2021-06-14 21:47:27][http]: task failed. libcurl error: Operation too slow. Less than 500 bytes/sec transferred the last 10 seconds [2021-06-14 21:47:27][http]: fetching https://master1.ddnet.tw/ddnet/15/servers.json [2021-06-14 21:47:28][http]: task done https://master1.ddnet.tw/ddnet/15/servers.json [2021-06-14 21:47:34][http]: task failed. libcurl error: Operation too slow. Less than 500 bytes/sec transferred the last 10 seconds looks like the main reason it sometimes is so slow is bcs info2.ddnet.tw doesnt respond? or just generally slow connection to that server
19:50
its also insanly slow over browser
Avatar
so the problem isn't even the server list rn?
Avatar
yeah
Avatar
but it waits for info2.ddnet.tw for some reason?
Avatar
cloudflare timeout
19:51
in browser
19:51
so yes
19:51
dunno how that could be different
19:51
but its the same IP
19:52
maybe its still the connection after all
19:52
but yeah in brwoser the info is much slower
19:52
often takes 5-10 seconds or timeouts
Avatar
I think it uses http/2 to cloudflare
19:53
so it can multiplex over one connection
Avatar
ah sry, but master1 is indeed a different ip
19:55
or is it just as soon as it routes to cloudflare?
19:55
probably
Avatar
yes, master1 and info2 are the same server
19:58
but I think db is different
Avatar
but i guess cloudflare checks per URL? bcs master1 always fast and info2 always slow for me πŸ˜„
19:59
probably bcs info2 has a ddos incomming or smth
Avatar
pamonha1487777 2021-06-14 20:04:06Z
hi good afternoon i want to know how do i become adm on ddnet on fng map
Avatar
admin? i don't think you can apply to be an fng admin (edited)
Avatar
pamonha1487777 2021-06-14 20:05:45Z
but why
Avatar
@noby who's the admin of DDNet FNG
20:06
or is that just all ddnet admins
20:07
also @pamonha1487777 let's move to questions, not rly a dev topic
Avatar
i don't see a reason for another admin lol
Avatar
@heinrich5991 no, info2 is db.ddnet.tw
21:16
@Deleted User yes, it's because of a DoS against info2. I don't know how the attackers found out its ip address
Avatar
Is there any way for me to test changes to the ddnet-discordbot without running it myself? I'm trying to set up the bot right now, but it seems hard and I'm running into problems
Avatar
Use it for the "determine best masterserver" job, so that we can debug failures.

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 that affect existing maps
  • [ ] Tested the change with [ASan+UB...
Avatar
i wanna confirm, is that why refresh is slightly longer than it was previously? (1-2 seconds)
Avatar
that only affects the ddnet tab, I think
21:46
i noticed after 15.5 refresh takes 1-2 seconds longer, any tab
Avatar
are you sure it takes longer? πŸ˜›
Avatar
but theoretically it should be shorter, since it doesn't communicate with any server to get ping
21:46
yes
Avatar
not only taking longer to the first server shown?
Avatar
@heinrich5991 I can reproduce that. Refresh takes multiple seconds for me at the moment
Avatar
let me check right now, using internet tab
Avatar
ah, only ddnet tab
21:47
then yeah, the info2 problem
Avatar
initial load was 6 seconds
21:47
got it ok
21:47
subsequent reloads are not that bad, 2 seconds
Avatar
reloads take <0.5s for me
21:49
but the initial load does indeed take long
Avatar
that's weird
21:50
it must favor connections close to EU?
21:50
how many master servers are located there?
Avatar
1
Avatar
and elsewhere?
Avatar
1, in china
Avatar
huh, im kinda in the middle xd
Avatar
you're likely connecting to the one in europe
Avatar
well, if I can't have USA2, can I have USA master server πŸ˜„ @deen
21:51
i would again sponsor it
21:51
or even host it if it came to that
21:51
but obviously not ideal (edited)
Avatar
I guess not throwing away the old list when refreshing would help with these problems πŸ˜›
Avatar
and maybe caching the serverlist across restarts
Avatar
yea makes sense
21:52
at the very least caching
Avatar
@lynn can you create a file called ddnet-serverlist-urls.cfg next to your settings_ddnet.cfg and make the only line https://heinrich5991.de/teeworlds/temp/servers-2021-06-14.json
21:55
and report the performance
Avatar
yes one moment
21:57
so this will override?
Avatar
yes
Avatar
jesus christ
21:57
that is so much better
21:57
thanks lol
Avatar
argh
Avatar
literally 0.5 like u said earlier
Avatar
ehm, this is just a snapshot
21:58
you can't keep using it πŸ˜›
Avatar
but I'll go set up a similar master soonβ„’
transheart 1
Avatar
So why is it faster than the one we have?
Avatar
because cloudflare apparently makes things slower
22:00
I'll set it up on ger2 when I get to it
Avatar
[quakenet] deen BOT 2021-06-14 22:00:52Z
meh
Avatar
bad idea?
Avatar
[quakenet] deen BOT 2021-06-14 22:01:07Z
no, cloudflare making things slower is meh
Avatar
Fixes #3899.

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 if it works standalone, system.c especially
  • [ ] 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-add...
Avatar
c5cd8d3 Add a new failure log level to the HTTP module - heinrich5991 343d81e Merge #3910 - bors[bot]
22:37
97b53c4 Don't set cached pings for servers without info - heinrich5991 ca14d87 Merge #3911 - bors[bot]
Avatar
@heinrich5991 If cloudflare is adding a lot of latency, can we use some cdn where we just upload the static file every 5 seconds?
Avatar
didn't find a cdn where this would be cheap @deen
Avatar
e.g. aws bills per PUT request
Avatar
Would it help to pay for Cloudflare? I think they have better routing for paid accounts
Avatar
I don't know, I could ask cloudflare support I guess
22:47
I'll write a ticket
22:47
but I guess it could just be the detour to cloudflare's servers that could cost us
22:47
although I learned in network class that splitting up TCP connections can speed them up
Avatar
@lynn now better?
23:21
I set up master3.ddnet.tw
Avatar
let me test
23:29
so remove the file you mentioned?
23:29
@heinrich5991 way better now
Avatar
nice πŸ™‚
Avatar
@heinrich5991 [2021-06-15 01:41:22][serverbrowse_http]: found master, url='https://master1.ddnet.tw/ddnet/15/servers.json' time=0ms [2021-06-15 01:41:22][http]: fetching https://master1.ddnet.tw/ddnet/15/servers.json [2021-06-15 01:41:22][http]: task done https://master1.ddnet.tw/ddnet/15/servers.json [2021-06-15 01:41:24][serverbrowse_http]: found master, url='https://master2.ddnet.tw/ddnet/15/servers.json' time=967ms [2021-06-15 01:41:24][serverbrowse_http]: found master, url='https://master3.ddnet.tw/ddnet/15/servers.json' time=20ms [2021-06-15 01:41:24][serverbrowse_http]: determined best master, url='https://master1.ddnet.tw/ddnet/15/servers.json' time=0ms 0ms
Avatar
wowow (edited)
Avatar
thats bad xd
Avatar
can you restart and check if the problem persists?
Avatar
sure
Avatar
that might be our timekeeping "optimization"
Avatar
now it says 70, but the 0 is to be expected?
Avatar
no
23:43
the 0ms is probably from our caching time_get values
Avatar
ahh
23:43
i understand
Avatar
make sure to create a bug report
Exported 329 message(s)