Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.org/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 2024-08-02 00:00 and 2024-08-03 00:00
Avatar
help guys, I'm starting the game, everything is lagging, the laptop is new, I don't know what to do
Avatar
@var #general
Avatar
Avatar
Learath2
Here some with actual writing @Jupstar βœͺ (edited)
answer is 4902
01:35
thank me later
Avatar
ws-client BOT 2024-08-02 03:42
<ChillerDragon> assembly is clearly for maffs genius
03:43
<ChillerDragon> i debugged 10 minutes because i assumed 14 - 8 is 8
Avatar
MilkeeyCat 2024-08-02 06:25
first time had to use lifetimes in rust, i feel so smart rn xd
Avatar
MilkeeyCat 2024-08-02 07:31
@Learath2 they are not read only anymore! πŸŽ‰
Avatar
MilkeeyCat 2024-08-02 07:43
maybe it's time to write some tests justatest
Avatar
ws-client BOT 2024-08-02 07:51
<ChillerDragon> is it weird that i somehow desire all features in the tw protocol that browsers and http have?
07:51
<ChillerDragon> I really wish a client would send its supported compression alorithms to the server and the server only uses those.
07:52
<ChillerDragon> So if a client does not support huffman the server just does not send huffman compressed payloads
07:53
<ChillerDragon> Implementing huffman is the worst
Avatar
Avatar
MilkeeyCat
@Learath2 they are not read only anymore! πŸŽ‰
write only no read
Avatar
Avatar
louis
write only no read
MilkeeyCat 2024-08-02 07:55
hm?
Avatar
ws-client BOT 2024-08-02 08:03
<ChillerDragon> woah gcc is doing some dances when i try to multiply something xd
08:03
<ChillerDragon> @MilkeeyCat how did you implement multiply in your language?
08:04
<ChillerDragon> apparently mul is slow ...
Avatar
ws-client BOT 2024-08-02 08:06
<ChillerDragon> that just works like i assume it works?
08:06
<ChillerDragon> imul rax, 2
08:06
<ChillerDragon> multiplies what is in rax by 2 and stores the result in rax?
Avatar
MilkeeyCat 2024-08-02 08:07
Two-operand form β€” With this form the destination operand (the first operand) is multiplied by the source operand (second operand). The destination operand is a general-purpose register and the source operand is an immediate value, a general-purpose register, or a memory location. The intermediate product (twice the size of the input operand) is truncated and stored in the destination operand location.
https://www.felixcloutier.com/x86/imul it should work like that, yea xd
Avatar
ws-client BOT 2024-08-02 08:15
<ChillerDragon> So weird that there is mul and imul
Avatar
MilkeeyCat 2024-08-02 08:15
for signed and unsigned multiplication (edited)
Avatar
ws-client BOT 2024-08-02 08:15
<ChillerDragon> I can just add with add but somehow i need fakin imul
08:16
<ChillerDragon> so imul is signed?
Avatar
MilkeeyCat 2024-08-02 08:16
yep
Avatar
ws-client BOT 2024-08-02 08:16
<ChillerDragon> seems nice i dont think i will ever use anything other than imul then
08:16
<ChillerDragon> new instruction unlocked
Avatar
MilkeeyCat 2024-08-02 08:16
i use imul even for unsigned numbers
Avatar
ws-client BOT 2024-08-02 08:16
<ChillerDragon> poggers2
Avatar
MilkeeyCat 2024-08-02 08:17
lea rath, 2 said it's gud
Avatar
ws-client BOT 2024-08-02 08:17
<ChillerDragon> pog
Avatar
there is some caveats that I really cba to re go into, you can google or search this channel
Avatar
Avatar
Robyt3
The touch controls design notes. The json format to represent this would look similar to this: { "direct_touch": true, "buttons": [ { "position": { "x": 110, "y": 0, "w": 10, "h": 10 } "shape": "rect", "behavior": { "type": "predefined", "button_id": "swap_action", } }, { "position": { "x": 20, "y": 20, "w": 10, "h": 10 } "shape": "rect", "behavior": { "type": "bind", "label": "Say hello", "command": "say Hello World", "visibility": "always" } }, ... ] }
heinrich5991 2024-08-02 10:46
cool, thanks for sharing!
Avatar
Avatar
Learath2
Governments do technically have CAs trusted by all, they could have forged a certificate. It’s nice to know that they don’t
heinrich5991 2024-08-02 10:48
they'd also be distrusted if they'd do that (at the very least, that'd happen for turkey)
10:50
ChillerDragon: if you multiply with a constant, you can often transform it into a lea or some shifts plus additions
Avatar
@heinrich5991 do you happen to know if an url lacking the host part is still a valid url?
Avatar
heinrich5991 2024-08-02 11:28
dunno
11:29
this seems to say yes
12:44
TRACTOR
12:44
lmao
12:45
🚜
Avatar
@heinrich5991 would you prefer <c="#F00"><b>text</b></c> or <c="#F00" b>text</>?
Avatar
Avatar
Learath2
@heinrich5991 would you prefer <c="#F00"><b>text</b></c> or <c="#F00" b>text</>?
archimede67 2024-08-02 13:24
second one looks horrible and doesn't make sense imo (edited)
Avatar
Yeah, but it's slightly easier to parse πŸ˜„
Avatar
heinrich5991 2024-08-02 13:30
first one
Avatar
heinrich5991 2024-08-02 13:50
please paste text as text. it's more accessible
13:51
https://craftinginterpreters.com/introduction.html#why-learn-this-stuff
## Why Learn This Stuff? Every introduction to every compiler book seems to have this section. I don’t know what it is about programming languages that causes such existential doubt. I don’t think ornithology books worry about justifying their existence. They assume the reader loves birds and start teaching.
Avatar
I'm guessing we also want &lt; and &gt; and &amp; hm, maybe they are right about this being annoying
Avatar
heinrich5991 2024-08-02 14:00
using strict parsing and thought-out stuff can be a little bit more annoying in the short term
14:00
but we'll thank us later, because it'll be a lot less annoying in the long run
Avatar
I was planning to hand roll a parser but maybe I should generate one with bison or sth
Avatar
heinrich5991 2024-08-02 14:01
seems fine to hand-roll a parser here
14:02
what do we need to match on? <, &, everything else
14:02
discard any message that doesn't follow this format
Avatar
Avatar
heinrich5991
discard any message that doesn't follow this format
I was planning to just fall back to non-rich text if parsing fails so atleast the broken string is displayed as plaintext
Avatar
heinrich5991 2024-08-02 14:03
I'd prefer not to
14:03
at least on the network layer
14:03
on the network layer, there IMO should be a flag that tells the client whether this is rich text or not (default off, backcompat with old servers) (edited)
14:04
and the message is just discarded if rich text is enabled and does not parse
Avatar
Here is kinda what I'm thinking in terms of format btw
Avatar
heinrich5991 2024-08-02 14:05
can you give me the original link? it's very small
Avatar
name = {?ascii_alnum?}-; value = {?ascii_alnum?}-; kvp = name, ['="', value, '"']; stag = '<', kvp, {[S, kvp]}, '>'; etag = '<', name, '/>'; text = {{?char?}, [stag, {?char?}, etag]};
14:07
Though this is before I remembered we need to handle escapes, so that'll probably need some thinking on my part πŸ˜„
14:08
Rendered it bigger if anyone else doesn't want to bother
Avatar
what u working on=?
14:09
rich text for tw?
Avatar
Avatar
Ryozuki
rich text for tw?
Yes
14:09
I was going to just leave it to someone else but got the urge to write a parser πŸ˜„
14:12
Actually this doesn't look correct, doesn't allow nesting, this one was the original one I made
Avatar
Avatar
heinrich5991
please paste text as text. it's more accessible
found it on twitter as a image so i didnt know source
Avatar
heinrich5991 2024-08-02 14:15
text = {?char? | ampersand_escape | color_tag}; ampersand_escape = '&amp;' | '&lt;' | '&gt'; color = [hexdigit, hexdigit, hexdigit] | [hexdigit, hexdigit, hexdigit, hexdigit, hexdigit, hexdigit]; color_tag = ['<c=#', color, '>', text, '</c>']; hexdigit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F';
14:15
@Learath2 I'd be much more specific in what to accept
14:17
Avatar
Do we want quotes around the color?
Avatar
heinrich5991 2024-08-02 14:19
dunno. we're not actual xml because a tag can't have a value there (edited)
14:19
so it doesn't really matter I guess?
Avatar
btw you probably want color = hexdigit, hexdigit, hexdigit, [hexdigit, hexdigit, hexdigit] or color = {3 * hexdigit}- | {6 * hexdigit} (edited)
Avatar
heinrich5991 2024-08-02 14:21
true. still learning the syntax
Avatar
heh I had it wrong too with the numerical repetition
14:23
color = 3 * hexdigit | 6 * hexdigit
Avatar
heinrich5991 2024-08-02 14:25
I guess we can't get to xml without it feeling too long again? @Learath2
Avatar
Avatar
heinrich5991
I guess we can't get to xml without it feeling too long again? @Learath2
I think it will feel too long
14:27
and you'll need to hack around an xml parser to get it to parse as strict xml requires a prologue and a root element
14:28
(or a very loose xml parser)
Avatar
Eh, idk, is the effort worth it? We'll pretty much have to implement an xml parser of our own to support this format
Avatar
heinrich5991 2024-08-02 14:47
do we? I've given a pretty simple railroad diagram above, I think
Avatar
Avatar
heinrich5991
do we? I've given a pretty simple railroad diagram above, I think
archimede67 2024-08-02 14:51
it does not support any nested tags other than the color tag itself if I read that correctly
Avatar
Avatar
archimede67
it does not support any nested tags other than the color tag itself if I read that correctly
heinrich5991 2024-08-02 14:52
because we currently don't support any other tags. they'd get added once we add support for them
Avatar
Avatar
archimede67
it does not support any nested tags other than the color tag itself if I read that correctly
It does, all tags will have text in them, and text will have all tags
Avatar
archimede67 2024-08-02 14:52
ah okay i see
Avatar
heinrich5991 2024-08-02 14:52
and what @Learath2 said
Avatar
I guess if we implement it strictly like this it's not too bad
14:53
Yeah I'll give it a go, just a simple recursive descent parser
Avatar
please add documentation for that coloration stuff once it is ready
Avatar
100%
Avatar
GitHub BOT 2024-08-02 16:29
See commit messages.

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+UBSan or valgrind's memcheck](https://github.com/ddnet...
Avatar
Where can i find ddnet database structure? prefferably as sql script. I searched thru ddnet-script and ddnet, looks like there was sv_sql_create_tables option before. I found script for record_race, record_teamrace and record_maps, but server also requires record_points for points stuff
Avatar
heinrich5991 2024-08-02 18:10
the server can create this table on its own
18:12
(I'd suggest to let the server create the DB)
Avatar
That's weird, I decided to create tables myself because it wont do it, thanks, will dig into it
Avatar
heinrich5991 2024-08-02 18:13
try to delete all the tables and check the logs on what goes wrong with the table creation
Avatar
2024-08-02 18:23:30 I console: executing 'mysql.cfg' 2024-08-02 18:23:30 I server: Adding new SqlWriteServer: DB: 'teeworlds' Prefix: 'record' User: 'teeworlds' IP: <{localhost}> Port: 3306 2024-08-02 18:23:30 I server: Adding new SqlReadServer: DB: 'teeworlds' Prefix: 'record' User: 'teeworlds' IP: <{localhost}> Port: 3306 2024-08-02 18:23:30 I mysql: connection established 2024-08-02 18:23:30 I sql: load best time failed: (prepare:stmt:1146): Table 'teeworlds.record_race' doesn't exist 2024-08-02 18:23:30 I sql: [3] load best time failed on all databases
18:26
nothing related to db errors
18:26
besides "doesn't exist"
Avatar
heinrich5991 2024-08-02 18:27
ah
18:27
apparently you need to pass an 8th parameter to the add_sqlserver command
18:28
add_sqlserver rw database prefix user password ip port setup
18:28
pass a 1 to the setup parameter
Avatar
oh wow, yeah that worked perfectly
18:30
thanks a lot
Avatar
heinrich5991 2024-08-02 18:30
(probably disable it afterwards again)
18:30
you're welcome
Avatar
And a little newbie linux question. I have logfile servers/8303.log and I get E server: failed to open 'servers/8303.log' for logging, I even did chmod 777, just in case, but just doesn't work
Avatar
Ρ‚ΡŽΡ‚ΡŽΠ½ 2024-08-02 18:36
download the newest version to your phone for anyone who doesn't find it difficult
Avatar
Avatar
Anime.pdf
And a little newbie linux question. I have logfile servers/8303.log and I get E server: failed to open 'servers/8303.log' for logging, I even did chmod 777, just in case, but just doesn't work
heinrich5991 2024-08-02 18:37
not sure where the logfile goes, probably into your config directory
18:37
you'd need to create a servers folder there
Avatar
Avatar
Anime.pdf
And a little newbie linux question. I have logfile servers/8303.log and I get E server: failed to open 'servers/8303.log' for logging, I even did chmod 777, just in case, but just doesn't work
heinrich5991 2024-08-02 18:37
also, don't do chmod 777
Avatar
that was desperate move, will try the config dir
18:43
if I have $CURRENTDIR in storage.cfg, shouldn't it look for file in relative path too?
Avatar
heinrich5991 2024-08-02 18:44
only for reading files, I think
18:44
it uses the first or last entry for writing files
Avatar
xd, i removed userdir and datadir from storage and it used it for writing, i guess its first-only, because currentdir was last
Avatar
heinrich5991 2024-08-02 18:46
there you go πŸ™‚
18:46
I didn't remember whether it was first or last
Avatar
why https://heinrich5991.de is timeouting me for several years now xd
Avatar
heinrich5991 2024-08-02 19:16
works for me
19:16
can you ping it?
Avatar
Avatar
heinrich5991
works for me
yeah it works for everyone but not for me for quite a long time
19:18
idk why though
19:18
i can access it with vpn but not with my home net ip
Avatar
Avatar
zhn
yeah it works for everyone but not for me for quite a long time
heinrich5991 2024-08-02 19:35
can you give me the output of curl -v https://heinrich5991.de/?
Avatar
* Host heinrich5991.de:443 was resolved. * IPv6: 2a03:4000:2:e5::1 * IPv4: 46.38.237.221 * Trying 46.38.237.221:443... * Trying [2a03:4000:2:e5::1]:443... * Immediate connect fail for 2a03:4000:2:e5::1: Network is unreachable
19:50
well why it avoids ipv4 connection
Avatar
heinrich5991 2024-08-02 19:52
can you try curl -v4 https://heinrich5991.de/? (edited)
Avatar
* Host heinrich5991.de:443 was resolved. * IPv6: (none) * IPv4: 46.38.237.221 * Trying 46.38.237.221:443...
Avatar
* connect to 46.38.237.221 port 443 from 192.168.1.38 port 35832 failed: Connection timed out * Failed to connect to heinrich5991.de port 443 after 133974 ms: Could not connect to server * closing connection #0 curl: (28) Failed to connect to heinrich5991.de port 443 after 133974 ms: Could not connect to server
Avatar
Is there any documentation on CNetObj_?
21:49
i would like to know what flag i have to set for a door to be open/closed in CNetObj_DDNetLaser (edited)
Avatar
heinrich5991 2024-08-02 21:50
I don't think there's docs on that
21:50
you can only read the source coe
21:52
@Learath2 are you still workign on the VPN stuff?
Avatar
found it thx
Avatar
heinrich5991 2024-08-02 22:23
(not on ddnet though)
22:31
technically xd
Avatar
heinrich5991 2024-08-02 22:34
haven't seen those docs yet
22:35
they look wrong though. the type IDs for extended items aren't fixed and change from version to version
22:35
only the UUIDs don't change
22:35
the items also don't get type ID 0, that's only the meta items for the UUIDs
22:35
did you generate these hover texts, or did you manually write them, ChillerDragon? https://chillerdragon.github.io/teeworlds-protocol/ddnet_06/snap_items.html
Avatar
Avatar
heinrich5991
@Learath2 are you still workign on the VPN stuff?
Why? Do you want to give it a try?
Avatar
heinrich5991 2024-08-02 22:53
because a lot of people get banned by our current solution, and I'm wondering whether I need to fix the current system or can wait for yours
Avatar
I had a small prototype but I didn't like how it looked
Avatar
heinrich5991 2024-08-02 22:54
I see
Avatar
Avatar
heinrich5991
because a lot of people get banned by our current solution, and I'm wondering whether I need to fix the current system or can wait for yours
What is on your mind? I'm unsure whether what I'm making will fix the issue that's why I was slowly working on it
Avatar
heinrich5991 2024-08-02 22:56
I'm not sure
Avatar
I'm basically just making a data structure on which I could aggregate many sources of vpn detection. And we can keep track of different providers error rates
Avatar
heinrich5991 2024-08-02 22:57
I'd estimate that we currently lock out > 100 players due to the bad VPN bans, but it only helps us defend against < 10 ban evaders
Avatar
We can probably disable it again until we have a more reliable way. Perhaps we can keep the dnsbl result on ranks as I proposed to help murpi out with evading replaybotters
23:04
Maybe with Robyt3's last change enabling it when needed is a better experience
Avatar
You could also simply keep a whitelist for players/ip ranges that are mistaken
23:27
Or like, the endpoint by *** that is being used could store the whitelist, so no server change is required
Exported 176 message(s)
Timezone: UTC+0