02:24 < bridge> help guys, I'm starting the game, everything is lagging, the laptop is new, I don't know what to do 03:06 < bridge> @var4ik_va1l #general 03:35 < bridge> answer is 4902 03:35 < bridge> thank me later 05:42 < ws-client> assembly is clearly for maffs genius 05:43 < ws-client> i debugged 10 minutes because i assumed 14 - 8 is 8 06:06 < bridge> lmao 07:53 < bridge> :justatest: 08:25 < bridge> first time had to use lifetimes in rust, i feel so smart rn xd 09:31 < bridge> @learath2 they are not read only anymore! πŸŽ‰ 09:31 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1268833586908495974/image.png?ex=66addcdc&is=66ac8b5c&hm=ffaeeace245b7effb9d75efc083042fc86be100e5b947bcbd3c306c39e838a8c& 09:43 < bridge> maybe it's time to write some tests :justatest: 09:51 < ws-client> is it weird that i somehow desire all features in the tw protocol that browsers and http have? 09:51 < ws-client> I really wish a client would send its supported compression alorithms to the server and the server only uses those. 09:52 < ws-client> So if a client does not support huffman the server just does not send huffman compressed payloads 09:53 < ws-client> Implementing huffman is the worst 09:54 < bridge> write only no read 09:55 < bridge> hm? 10:03 < ws-client> woah gcc is doing some dances when i try to multiply something xd 10:03 < ws-client> @milkeeycat how did you implement multiply in your language? 10:04 < ws-client> apparently `mul` is slow ... 10:05 < bridge> chillerdragon: https://github.com/MilkeeyCat/meraki/blob/8f76c9d853d47f3e2dc2f69049c909d694ea9ac4/src/archs/amd64.rs#L132 `imul` xd 10:06 < ws-client> that just works like i assume it works? 10:06 < ws-client> `imul rax, 2` 10:06 < ws-client> multiplies what is in rax by 2 and stores the result in rax? 10:07 < bridge> > 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. 10:07 < bridge> https://www.felixcloutier.com/x86/imul 10:07 < bridge> 10:07 < bridge> it should work like that, yea xd 10:15 < ws-client> So weird that there is `mul` and `imul` 10:15 < bridge> for signed and unsigned multiplications 10:15 < bridge> for signed and unsigned multiplication 10:15 < ws-client> I can just add with `add` but somehow i need fakin imul 10:16 < ws-client> so imul is signed? 10:16 < ws-client> seems nice i dont think i will ever use anything other than `imul` then 10:16 < bridge> yep 10:16 < ws-client> new instruction unlocked 10:16 < bridge> i use `imul` even for unsigned numbers 10:16 < ws-client> <:poggers2:1008007455936094328> 10:17 < bridge> lea rath, 2 said it's gud 10:17 < ws-client> pog 12:44 < bridge> there is some caveats that I really cba to re go into, you can google or search this channel 12:46 < bridge> cool, thanks for sharing! 12:48 < bridge> they'd also be distrusted if they'd do that (at the very least, that'd happen for turkey) 12:50 < bridge> ChillerDragon: if you multiply with a constant, you can often transform it into a `lea` or some shifts plus additions 13:27 < bridge> @heinrich5991 do you happen to know if an url lacking the host part is still a valid url? 13:28 < bridge> dunno 13:29 < bridge> https://commons.wikimedia.org/wiki/File:URI_syntax_diagram.svg 13:29 < bridge> this seems to say yes 14:44 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1268912232084017172/GT10XWibwAEgChu.png?ex=66ae261b&is=66acd49b&hm=47a73a4caeb2a806107d5aa429b6384472ab7591e8b6731a04eea0ef2f4090d2& 14:44 < bridge> TRACTOR 14:44 < bridge> lmao 14:45 < bridge> 🚜 15:22 < bridge> @heinrich5991 would you prefer `text` or `text`? 15:24 < bridge> second looks horrible and doesn't make sense 15:24 < bridge> second one looks horrible and doesn't make sense 15:24 < bridge> second one looks horrible and doesn't make sense imo 15:24 < bridge> Yeah, but it's slightly easier to parse πŸ˜„ 15:30 < bridge> first one 15:49 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1268928630411493436/GT7VdwEWUAAheSv.png?ex=66ae3561&is=66ace3e1&hm=6d3b4a0637a661f49aa4182e380d2edbac31937619682a511a242599a4efeb00& 15:50 < bridge> please paste text as text. it's more accessible 15:51 < bridge> https://craftinginterpreters.com/introduction.html#why-learn-this-stuff 15:51 < bridge> > ## Why Learn This Stuff? 15:51 < bridge> > 15:51 < bridge> > 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. 15:56 < bridge> I'm guessing we also want `<` and `>` and `&` hm, maybe they are right about this being annoying 16:00 < bridge> using strict parsing and thought-out stuff can be a little bit more annoying in the short term 16:00 < bridge> but we'll thank us later, because it'll be a lot less annoying in the long run 16:01 < bridge> I was planning to hand roll a parser but maybe I should generate one with bison or sth 16:01 < bridge> seems fine to hand-roll a parser here 16:02 < bridge> what do we need to match on? `<`, `&`, everything else 16:02 < bridge> discard any message that doesn't follow this format 16:02 < bridge> I was planning to just fall back to non-rich text if parsing fails so atleast the broken string is displayed as plaintext 16:03 < bridge> I'd prefer not to 16:03 < bridge> at least on the network layer 16:03 < bridge> on the network layer, there IMO should be a flag that tells the client whether this is rich text or not 16:04 < bridge> and the message is just discarded if rich text is enabled and does not parse 16:04 < bridge> 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) 16:04 < bridge> Here is kinda what I'm thinking in terms of format btw 16:04 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1268932518640619562/image.png?ex=66ae3900&is=66ace780&hm=6260cecbe68a845c5dc614d47e82c465bb24b0755362128bf39bc786cc82b472& 16:05 < bridge> can you give me the original link? it's very small 16:05 < bridge> ```ebnf 16:05 < bridge> name = {?ascii_alnum?}-; 16:05 < bridge> value = {?ascii_alnum?}-; 16:05 < bridge> kvp = name, ['="', value, '"']; 16:05 < bridge> stag = '<', kvp, {[S, kvp]}, '>'; 16:05 < bridge> etag = '<', name, '/>'; 16:05 < bridge> 16:06 < bridge> text = {{?char?}, [stag, {?char?}, etag]}; 16:06 < bridge> ``` 16:06 < bridge> Rendered it on here https://matthijsgroen.github.io/ebnf2railroad/ 16:07 < bridge> Though this is before I remembered we need to handle escapes, so that'll probably need some thinking on my part πŸ˜„ 16:08 < bridge> Rendered it bigger if anyone else doesn't want to bother 16:08 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1268933501198139456/text.png?ex=66ae39ea&is=66ace86a&hm=a0be961c71fd7a535d6d1a56f56411171f79e3cb2b36a4218482ea07222af19b& 16:09 < bridge> what u working on=? 16:09 < bridge> rich text for tw? 16:09 < bridge> Yes 16:09 < bridge> I was going to just leave it to someone else but got the urge to write a parser πŸ˜„ 16:12 < bridge> Actually this doesn't look correct, doesn't allow nesting, this one was the original one I made 16:14 < bridge> found it on twitter as a image so i didnt know source 16:15 < bridge> ```ebnf 16:15 < bridge> text = {?char? | ampersand_escape | color_tag}; 16:15 < bridge> 16:15 < bridge> ampersand_escape = '&' | '<' | '>'; 16:15 < bridge> color = [hexdigit, hexdigit, hexdigit] | [hexdigit, hexdigit, hexdigit, hexdigit, hexdigit, hexdigit]; 16:15 < bridge> color_tag = ['', text, '']; 16:15 < bridge> hexdigit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F'; 16:15 < bridge> ``` 16:15 < bridge> @learath2 I'd be much more specific in what to accept 16:17 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1268935803707326464/image.png?ex=66ae3c0f&is=66acea8f&hm=90209bd1b52b396c2b1fa25eeb7178d7d4869b483084c303a0fb50697f710929& 16:17 < bridge> Do we want quotes around the color? 16:19 < bridge> dunno. we're not actual xml because the a tag can't have a value 16:19 < bridge> so it doesn't really matter I guess? 16:19 < bridge> dunno. we're not actual xml because a tag can't have a value there 16:20 < bridge> btw you probably want `color = hexdigit, hexdigit, hexdigit, [hexdigit, hexdigit, hexdigit]` or `color = {3 * hexdigit} | {6 * hexdigit}` 16:21 < bridge> true. still learning the syntax 16:22 < bridge> btw you probably want `color = hexdigit, hexdigit, hexdigit, [hexdigit, hexdigit, hexdigit]` or `color = {3 * hexdigit}- | {6 * hexdigit}` 16:22 < bridge> heh I had it wrong too with the numerical repetition 16:23 < bridge> `color = 3 * hexdigit | 6 * hexdigit` 16:24 < bridge> https://mitxela.com/projects/lightcomm 16:25 < bridge> I guess we can't get to xml without it feeling too long again? @learath2 16:27 < bridge> I think it will feel too long 16:27 < bridge> 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 16:28 < bridge> (or a very loose xml parser) 16:46 < bridge> Eh, idk, is the effort worth it? We'll pretty much have to implement an xml parser of our own to support this format 16:47 < bridge> do we? I've given a pretty simple railroad diagram above, I think 16:51 < bridge> it does not support any nested tags other than the color tag itself if I read that correctly 16:52 < bridge> because we currently don't support any other tags. they'd get added once we add support for them 16:52 < bridge> It does, all tags will have `text` in them, and `text` will have all tags 16:52 < bridge> ah okay i see 16:52 < bridge> and what @learath2 said 16:53 < bridge> I guess if we implement it strictly like this it's not too bad 16:53 < bridge> Yeah I'll give it a go, just a simple recursive descent parser 18:06 < bridge> please add documentation for that coloration stuff once it is ready 18:24 < bridge> 100% 20:10 < bridge> 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 20:10 < bridge> the server can create this table on its own 20:11 < bridge> https://github.com/ddnet/ddnet/blob/c532aba4e5a78d5a6fa7d58bbacc7b1a9f1ab1f2/src/engine/server/databases/connection.cpp 20:12 < bridge> (I'd suggest to let the server create the DB) 20:12 < bridge> That's weird, I decided to create tables myself because it wont do it, thanks, will dig into it 20:13 < bridge> try to delete all the tables and check the logs on what goes wrong with the table creation 20:25 < bridge> ```log 20:25 < bridge> 2024-08-02 18:23:30 I console: executing 'mysql.cfg' 20:25 < bridge> 2024-08-02 18:23:30 I server: Adding new SqlWriteServer: DB: 'teeworlds' Prefix: 'record' User: 'teeworlds' IP: <{localhost}> Port: 3306 20:25 < bridge> 2024-08-02 18:23:30 I server: Adding new SqlReadServer: DB: 'teeworlds' Prefix: 'record' User: 'teeworlds' IP: <{localhost}> Port: 3306 20:25 < bridge> 2024-08-02 18:23:30 I mysql: connection established 20:25 < bridge> 2024-08-02 18:23:30 I sql: load best time failed: (prepare:stmt:1146): Table 'teeworlds.record_race' doesn't exist 20:25 < bridge> 2024-08-02 18:23:30 I sql: [3] load best time failed on all databases 20:25 < bridge> ``` 20:26 < bridge> nothing related to db errors 20:26 < bridge> besides "doesn't exist" 20:27 < bridge> ah 20:27 < bridge> apparently you need to pass an 8th parameter to the `add_sqlserver` command 20:28 < bridge> `add_sqlserver rw database prefix user password ip port setup` 20:28 < bridge> pass a `1` to the `setup` parameter 20:29 < bridge> oh wow, yeah that worked perfectly 20:30 < bridge> thanks a lot 20:30 < bridge> (probably disable it afterwards again) 20:30 < bridge> you're welcome 20:36 < bridge> 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 20:36 < bridge> download the newest version to your phone for anyone who doesn't find it difficult 20:37 < bridge> not sure where the logfile goes, probably into your config directory 20:37 < bridge> you'd need to create a `servers` folder there 20:37 < bridge> also, don't do `chmod 777` 20:38 < bridge> that was desperate move, will try the config dir 20:43 < bridge> if I have `$CURRENTDIR` in `storage.cfg`, shouldn't it look for file in relative path too? 20:44 < bridge> only for reading files, I think 20:44 < bridge> it uses the first or last entry for writing files 20:46 < bridge> xd, i removed userdir and datadir from storage and it used it for writing, i guess its first-only, because currentdir was last 20:46 < bridge> there you go πŸ™‚ 20:46 < bridge> I didn't remember whether it was first or last 21:14 < bridge> why https://heinrich5991.de is timeouting me for several years now xd 21:16 < bridge> works for me 21:16 < bridge> can you ping it? 21:17 < bridge> yep 21:18 < bridge> yeah it works for everyone but not for me for quite a long time 21:18 < bridge> idk why though 21:18 < bridge> i can access it with vpn but not with my home net ip 21:35 < bridge> can you give me the output of `curl -v https://heinrich5991.de/`? 21:50 < bridge> ```* Host heinrich5991.de:443 was resolved. 21:50 < bridge> * IPv6: 2a03:4000:2:e5::1 21:50 < bridge> * IPv4: 46.38.237.221 21:50 < bridge> * Trying 46.38.237.221:443... 21:50 < bridge> * Trying [2a03:4000:2:e5::1]:443... 21:50 < bridge> * Immediate connect fail for 2a03:4000:2:e5::1: Network is unreachable``` 21:50 < bridge> 46.38.237.221:443 is not a DDraceNetwork or Community server. 21:50 < bridge> well why it avoids ipv4 connection 21:52 < bridge> can you try `curl -4 https://heinrich5991.de/`? 21:52 < bridge> can you try `curl -v4 https://heinrich5991.de/`? 22:00 < bridge> ```* Host heinrich5991.de:443 was resolved. 22:00 < bridge> * IPv6: (none) 22:01 < bridge> * IPv4: 46.38.237.221 22:01 < bridge> * Trying 46.38.237.221:443...``` 22:01 < bridge> 46.38.237.221:443 is not a DDraceNetwork or Community server. 22:38 < bridge> ```* connect to 46.38.237.221 port 443 from 192.168.1.38 port 35832 failed: Connection timed out 22:38 < bridge> * Failed to connect to heinrich5991.de port 443 after 133974 ms: Could not connect to server 22:38 < bridge> * closing connection #0 22:38 < bridge> curl: (28) Failed to connect to heinrich5991.de port 443 after 133974 ms: Could not connect to server``` 23:48 < bridge> Is there any documentation on CNetObj_? 23:49 < bridge> i would like to know what flag i have to set for a door to be open/closed in CNetObj_DDNetLaser 23:49 < bridge> i would like to know what flag i have to set for a door to be open/closed in `CNetObj_DDNetLaser` 23:50 < bridge> I don't think there's docs on that 23:51 < bridge> you can only read the source coe 23:52 < bridge> @learath2 are you still workign on the VPN stuff? 23:53 < bridge> found it thx 23:56 < bridge> chiller has some unfinished docs https://chillerdragon.github.io/teeworlds-protocol/06.html