00:59 < bridge> nim + zig = nig, call it nig :justatest: 01:37 < bridge> when did all the demo buttons become icons with no text and no tool tips? 01:37 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260379355453063198/image.png?ex=668f1b3f&is=668dc9bf&hm=42ba9324912b42e631897ed6299be8f201876b78ec0d3c5743c87379fc8aee94& 01:37 < bridge> this is much worse 01:38 < bridge> git blame is your friend 01:38 < bridge> I suggest using `tig blame` 01:38 < bridge> it has nicer UI 01:41 < bridge> https://github.com/ddnet/ddnet/pull/7311 01:44 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260381115647266816/273316435-87a44d15-d242-4cc4-988c-0cdb024cb3a5.png?ex=668f1ce2&is=668dcb62&hm=4c83e3f55fce6d637a54d256f28875f845ee83b69d43428c1a03650b9333ea9b& 01:44 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260381116066566184/273316422-4b41328f-7d51-48d8-9a51-c79cc12beb0a.png?ex=668f1ce2&is=668dcb62&hm=bed13a08e58b67013b7cb4cd7aa3bcc3e2ee6520870bba2ed7d5b7c45914c79e& 01:45 < bridge> Is it only me who prefers the full text much more than the labels? 01:46 < bridge> There's plenty of space I don't see any reason to obfuscate what the buttons do 01:47 < bridge> I usually just use the github web ui blame or vscode extension 01:48 < bridge> What is DDNET\_IP supposed to be? The ip of the main ddnet server that can bypass all servers firewalls? Maybe it can use a comment so nobody has to guess 01:50 < bridge> yes @ main ddnet server 01:50 < bridge> I find the web UI to be too slow 01:51 < bridge> Idk what features tig blame has but browsing files from the console is not very comfortable for me 01:52 < bridge> if I am doing a lot of digging I just open vscode 01:54 < bridge> interesting 01:57 < bridge> Ah nice thanks 01:58 < bridge> I basically never used git blame anymore these days. 01:59 < bridge> My editor has blame hints so I see it when I look at the code. But if I am actively searching for a commit I always use `git log -S` 01:59 < bridge> chiller 02:00 < bridge> what was that one site u had 02:00 < bridge> that was a bootleg discord 02:00 < bridge> git log -SRender 02:00 < bridge> https://chat.zillyhuhn.com 02:01 < ws-client> Uwu 02:57 < bridge> hm ill take a look 02:57 < bridge> thank u 03:20 < bridge> Can anyone help me?, I'm trying to make a websocket connection with python at this link "wss://chat.modd.io/socket.io/?EIO=4&transport=websocket" but it gives me an error, can anyone help me? 03:55 < bridge> https://dontasktoask.com/ 03:56 < bridge> give error & code 04:16 < bridge> I didn't understand -_- 04:18 < bridge> @toku.kunavara: give error & code 04:19 < bridge> a 04:19 < bridge> ok 04:20 < bridge> ```py 04:20 < bridge> import websocket 04:20 < bridge> import ssl 04:20 < bridge> 04:20 < bridge> def on_message(ws, message): 04:20 < bridge> print(f"Mensagem recebida: {message}") 04:20 < bridge> 04:20 < bridge> def on_error(ws, error): 04:20 < bridge> print(f"Erro: {error}") 04:20 < bridge> 04:20 < bridge> def on_close(ws): 04:20 < bridge> print("Conexão WebSocket fechada") 04:20 < bridge> 04:20 < bridge> def on_open(ws): 04:20 < bridge> print("Conexão WebSocket aberta") 04:20 < bridge> 04:20 < bridge> if __name__ == "__main__": 04:20 < bridge> websocket.enableTrace(True) 04:20 < bridge> ws = websocket.WebSocketApp("wss://chat.modd.io/socket.io/?EIO=4&transport=websocket", 04:20 < bridge> on_message=on_message, 04:20 < bridge> on_error=on_error, 04:20 < bridge> on_close=on_close) 04:20 < bridge> ws.on_open = on_open 04:20 < bridge> ws.run_forever(sslopt={"cert_reqs": ssl.CERT_NONE}) 04:20 < bridge> ``` 04:20 < bridge> @toku.kunavara: don‘t announce you have an error and wait for a response. Give enough details so someone can solve your error. 04:20 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260420318170976287/aaaa.txt?ex=668f4165&is=668defe5&hm=e8240a9d8bfc1c5fe90bcf55a9203172d69e42b3ab8c27306f3e363249cde152& 04:21 < bridge> Don’t ask „can anyone help me?“ Just ask your question. People might help if they want to. 04:22 < bridge> Where is that code coming from? Did you follow some tutorial or make it up? 04:24 < bridge> What is chat.modd.io 04:29 < bridge> I made the code, I was looking for ways to get chat messages from a game, it's a browser game, its name is braains.io. If I use an extension to connect to this link it works, but if I try to do it with websocket it doesn't work 04:31 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260423113989161041/image.png?ex=668f43ff&is=668df27f&hm=dd5136e89a667b316ce079cd51a9e219bd4c630ddee145f57986a3d409e8201c& 04:31 < bridge> the name of the extension is simple web socket client 04:32 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260423343962587146/image.png?ex=668f4436&is=668df2b6&hm=ccff6b28948d17141b4a5e41f508fc4d0e89d41db0652d51eb022036882412b2& 04:32 < bridge> but if I try to connect using python it won't work 04:32 < bridge> using websocket 04:34 < bridge> I'm sorry if you don't understand, I'm Brazilian and I'm using Google Translate to talk :,(, I've been trying to solve this problem for 3 days and I can't 05:47 < bridge> what data structure is ddnet network updates sent as (like whatever is sent each tick)? How big is it in bytes 05:48 < bridge> for a project i'm working on i'm currently sending data over network as dictionaries containing info for each field of an entity i send. I feel it'll be pretty bandwidth heavy so i'm wondering what better practices there are 06:44 < bridge> it's sorta complicated. They are sent as snapshot diffs where only the things that changes from the previous tick are sent, plus every once in a while a full snapshot is sent. (Atleast from what I understand) 06:44 < bridge> it's sorta complicated. They are sent as snapshot diffs where only the things that changed from the previous tick are sent, plus every once in a while a full snapshot is sent. (Atleast from what I understand) 06:45 < bridge> there is no fixed size but there is a limit 06:45 < bridge> there is no fixed size but there is a size limit 06:47 < bridge> basically the same idea as video encoding where you have I-Frames and P-Frames 06:47 < bridge> but not B-Frames 06:51 < bridge> ah okay 06:51 < bridge> @totar do you know how often a full snapshot is sent? 06:52 < bridge> not off the top of my head 06:58 < bridge> almost never apart from the first 06:58 < bridge> iirc the client has a CRC check, if it thinks it can not reconstruct a full snapshot it just request one from the server 06:59 < bridge> unless there are some heavy packet drops or interference, this would ideally never happen 06:59 < bridge> ah okay 06:59 < bridge> not even if a single packet is dropped? 06:59 < bridge> yes actually he's right 06:59 < bridge> are multiple previous deltas sent every tick 06:59 < bridge> it uses the last acknlowledges snapshot to create the diff 06:59 < bridge> no, client holds several at a time 06:59 < bridge> it uses the last acknlowledged snapshot to create the diff 07:00 < bridge> my game is in 10 tps so significantly less than tw, but it will definitely send more than 5x the data than a ddnet server would send 07:00 < bridge> each packet has a parent packet id, the client will delta decode based on the correct one 07:00 < bridge> but if one tick is dropped from server, doesn't the client need to ask for the full snapshot again 07:00 < bridge> the client tells the server which snapshots it has 07:00 < bridge> there is a acknoledgement system 07:01 < bridge> client tells server that it has a snapshot in full (either received as-is or decoded) 07:01 < bridge> server will only delta encode packets based on the client's acknoledged ones 07:01 < bridge> so server also holds multiple snapshots just in case clients acknoledges a older one 07:02 < bridge> ah okay 07:02 < bridge> do you know how many snapshots the client stores? 07:02 < bridge> a tad complicated 😮‍💨 07:02 < bridge> not on top of my head (for teeworlds) 07:03 < bridge> just as an example what are some things that would be in a full snapshot that are not in a delta that saves a lot of data? 07:03 < bridge> i know how it works, i don't think i know any detail. only because i coded a similar one for our game 07:04 < bridge> in teeworlds at least, delta only works because everything is integer 07:04 < bridge> there is a 7-bit variable length integer packing 07:04 < bridge> a value takes 1 to 5 bytes depend on how large the number is 07:05 < bridge> so if a player position is 1500 last tick and 1501 this tick, the delta packet encodes a 1 which is 1 byte 07:05 < bridge> so basically, for teeworlds at least, everything is sent in the delta 07:05 < bridge> literally, everything 07:06 < bridge> ah okay i see 07:06 < bridge> afaik the things it can delta are the creation of entities and their positition/properties updating. So in theory the server only sends info when an entity is created and when it moves 07:06 < bridge> cuz they are all integers, delta is just the difference between the value, the save in size if inhereted from encoding 07:06 < bridge> do they tho? 07:06 < bridge> pretty sure? 07:06 < bridge> let me see 07:06 < bridge> ig that means a lot of server calculation between the client's last snapshot and the current state on the server then 07:07 < bridge> i thought teeworlds just send everything 07:07 < bridge> wdym 07:07 < bridge> cuz skipping snap just means it disappeared 07:07 < bridge> if it sent everything why bother with delta 07:07 < bridge> it sent everything in delta encoding, but it doesn't skip entities 07:07 < bridge> if it doesn't change it sends a bunch of zero 07:07 < bridge> no I think it actually doesn't send zeros 07:08 < bridge> but in order to not send zeros, you need extra informatio for appearing and disappearing, i don't remember teeworlds has a system for that 07:08 < bridge> but in order to not send zeros, you need extra information for appearing and disappearing, i don't remember teeworlds has a system for that 07:08 < bridge> I think it has that 07:08 < bridge> unless I'm stupid 07:09 < bridge> maybe i remembered it wrong 07:09 < bridge> heinrich definitely know 07:09 < bridge> either way a bunch of zero if not that bad 07:09 < bridge> cuz teeworlds also has huffman 07:09 < bridge> maybe i will just send new position every tick since i'm calculating in floats xd 07:09 < bridge> a zero is 1 bit 07:09 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260462988503154709/image.png?ex=668f6922&is=668e17a2&hm=b2b56be677b4bc256be8023e4c7a7e4eb427e016a8b1edc765ad94020e471d0f& 07:10 < bridge> I believe CSnapshotBuilder::NewItem handles adding items 07:10 < bridge> and deletion just happens? 07:10 < bridge> new item is for creating a snapshot, this part seems to be the part where it prepare the base snapshot 07:11 < bridge> ah wait 07:11 < bridge> I copied the wrong thing 07:11 < bridge> it check whether a snap exists, if it doesn't it is deleted. so for a snap to stay there have to be one 07:11 < bridge> even if it didn't change 07:11 < bridge> no actually 07:12 < bridge> I think I was right 07:12 < bridge> new item is for entities 07:12 < bridge> i don't think snapitem works like entities 07:12 < bridge> how are different actions labeled in the bits sent over network? (differentiating between movement data and aim data for example) 07:13 < bridge> just pure order. 07:13 < bridge> ah ok 07:13 < bridge> I mean entity like the general meaning 07:13 < bridge> I guess it's called a snapitem 07:14 < bridge> anyway, you need to send extra data if you want to skip a snap id just to indicate it didn't change 07:14 < bridge> or at least a special case for handling not changing 07:14 < bridge> either way is not more worth it than just packing the diff 07:15 < bridge> you just don't include the snapitem id in your snapshot data to indicate it didn't change? 07:15 < bridge> no 07:15 < bridge> not including a snapid means it disappeared 07:15 < bridge> snapshot is a collection of individual deltas 07:15 < bridge> I thought there was delete message 07:15 < bridge> i don't remember there being one 07:16 < bridge> but i am too lazy to check 07:17 < bridge> morning 07:17 < bridge> norming 07:18 < bridge> found this variable that does nothing 07:18 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260465144421416971/image.png?ex=668f6b24&is=668e19a4&hm=311688c3a11d8563e816505cf033784d60bb477db21e1466502a2cd92865a32a& 07:18 < bridge> :kek: 07:19 < bridge> probably a too scared to touch situation 07:19 < bridge> maybe it's required to keep struct size 07:19 < bridge> better not touch it 07:19 < bridge> can't believe i'm reading teeworlds' code again 07:20 < bridge> well you're in the teeworlds code channel 07:21 < bridge> ok maybe you're right 07:21 < bridge> i was about to say i think you are right cuz i did see they packed deleted keys 07:22 < bridge> oh lol 07:22 < bridge> but i don't see the skipping part yes 07:22 < bridge> but i don't see the skipping part yet 07:22 < bridge> yeah 07:22 < bridge> where do deleted keys get packed 07:23 < bridge> this is.. mmm 07:23 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260466378633248830/image.png?ex=668f6c4a&is=668e1aca&hm=a92e586f42481fca3bd5d2a2d48f55c015c11943a53283960c41d141242984ae& 07:23 < bridge> https://github.com/teeworlds/teeworlds/blob/a1911c8f7d8458fb4076ef8e7651e8ef5e91ab3e/src/engine/shared/snapshot.cpp#L215 07:24 < bridge> ah true 07:24 < bridge> honestly 07:24 < bridge> if teeworlds really didn't skip but still has a deletion system 07:24 < bridge> ok yeah I think it does send deletion messages then? 07:24 < bridge> we might just... 07:25 < bridge> cut the bandwidth more without breaking anything 07:25 < bridge> assuming it really didn't skip anything 07:25 < bridge> I think it does skip 07:25 < bridge> because the deleted items will just not be in the "pTo" snapshot 07:25 < bridge> so they don't get iterated over 07:26 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260467120588718090/image.png?ex=668f6cfb&is=668e1b7b&hm=527b2fcd8c5c8410d3804d8445280f4379d01a8c5501f488369c43f710227d06& 07:26 < bridge> anything that was deleted won't be in the "pTo" 07:26 < bridge> + it already sent the client all the stuff which was deleted so the client is expected to delete those things first 07:26 < bridge> i mean well obvious, but what about non-deleted stuff that also skipped due to "not changed" 07:27 < bridge> i mean well obviously, but what about non-deleted stuff that also skipped due to "not changed" 07:27 < bridge> wdym 07:27 < bridge> ah 07:27 < bridge> like didn't move? 07:27 < bridge> yeah idk 07:27 < bridge> yet, aren't we talking about skipping snaps for "not changed" 07:27 < bridge> my entire argument is that teeworlds doesn't skip anything so it didn't need a deletion manager 07:27 < bridge> I think here this ``if`` will be false if they are "not changed" 07:27 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260467491977695332/image.png?ex=668f6d54&is=668e1bd4&hm=236553025c9816e33d776d4f222adeba5d902c9ea36b1aebbfc7660c37da4925& 07:27 < bridge> ah 07:28 < bridge> ye, problem solved 07:28 < bridge> you are right 07:29 < bridge> and.... louis is gone 07:30 < bridge> lol 07:30 < bridge> tbh it's not a super complicated system, but the teeworlds code is certainly not the most elegant way to write it 07:31 < bridge> i can garrentee you our networking packer is jankier than teeworlds' 07:31 < bridge> I can't figure out why this is nessecary 07:31 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260468450929672252/image.png?ex=668f6e39&is=668e1cb9&hm=b04d932a664a5d29080762166e30dbb325a845e4a1375da588aa36f10b039719& 07:31 < bridge> "it helps the cache" 07:32 < bridge> I mean the O(n^n) part 07:32 < bridge> hm 07:32 < bridge> 😹 07:32 < bridge> the gamedev is back! 07:33 < bridge> why is there an item hasing system in the first place 07:33 < bridge> why is there an item hashing system in the first place 07:33 < bridge> ye, idk 07:33 < bridge> bro. firefox's find is broken 07:33 < bridge> so how much money do you think this optimization saves in terms of server costs 07:33 < bridge> press . key 07:33 < bridge> it opens vscode in browser 07:34 < bridge> true 07:34 < bridge> firefox literally modified the page when i tried to select and search 07:34 < bridge> it's basically required 07:34 < bridge> it fixed itself again, didn't manage to grab a screenshot 07:34 < bridge> lol 07:35 < bridge> search on github is annoying 07:35 < bridge> I have that same issue with firefox 07:35 < bridge> I know what you mean 07:35 < bridge> ye, what tater said. it is actually quite essential just to make sure it is playable everywhere, not just server costs 07:35 < bridge> sometimes it opens firefox search, other times it opens github search 07:35 < bridge> there are other ways than snapshot / delta encoding tho 07:36 < bridge> you can use the lazy method 07:36 < bridge> if you are sending json. a basic gzip is all you need. 07:36 < bridge> for 10tps 07:36 < bridge> it's not too bad 07:36 < bridge> yeah im sending a dictionary that gets serialized into json 07:36 < bridge> are you doing snapshot prediction/interpolation and stuff which really really requires a snapshot? 07:37 < bridge> every tick is only position information for other players (usually) and for enemies it's position info every time the enemy starts a new move, and the move name (a short string, i could use a local int-to-move-string map though) 07:38 < bridge> are you doing it in browser 07:38 < bridge> nah 07:38 < bridge> do you have a reliable/unreliable channel thing? 07:38 < bridge> like udp/reliable udp 07:38 < bridge> also chat messages ig. not sure how much of an effect it has 07:38 < bridge> or just udp and tcp 07:38 < bridge> yeah i'm using godot, each tick sends both reliable (if there is data to send) and unreliable data 07:38 < bridge> godot oh 07:39 < bridge> wait, why are you sending json with godot lol 07:39 < bridge> godot has binary packers iirc? 07:40 < bridge> for location really, just push it via a unreliable and forget them. 07:40 < bridge> does it? xd 07:40 < bridge> let me check 07:40 < bridge> also you can bitpack values if you really just want locations 07:40 < bridge> maybe i'm on the newbie side of the internet but lots of the stuff i read just recommended using rpc and serializing to json 07:41 < bridge> godot tutorial on networking are all pretty basic 07:41 < bridge> yes, in terms of players i think the data can be pretty easily optimized if need be 07:42 < bridge> the only place i'm worried abt bandwidth is in main lobbies and whatnot, like for example there are hundreds of players on one server 07:42 < bridge> the only place i'm worried abt bandwidth is in main lobbies and whatnot, like for example there are hundreds of players on one world 07:42 < bridge> do you see everyone on screen at once 07:43 < bridge> https://docs.godotengine.org/en/stable/classes/class_packedbytearray.html 07:43 < bridge> in the worst case scenario probably 07:43 < bridge> but then since gameplay precision doesn't matter as much in a lobby updates could just be sent at a lower rate 07:43 < bridge> you can just `encode_s16` then `decode_s16` on the other size 07:43 < bridge> you can just `encode_s16` then `decode_s16` on the other side 07:43 < bridge> choose you own byte length 07:43 < bridge> it is pretty handy 07:43 < bridge> ah okay 07:43 < bridge> yes then that's pretty nice 07:44 < bridge> godot will send PackedByteArray no problem, it handles that for you 07:44 < bridge> how is it possible that we can have an O(n^n) algorithm in the code 07:44 < bridge> for now i use json'd dictionaries to find out what i need to send and what i dont but after that i guess packing is best idea 07:44 < bridge> how is it possible that we can have an O(n^n) algorithm in the code and it doesn't destroy the game 07:45 < bridge> it must be worst case scenario? 07:45 < bridge> given how the comment says O(n)...O(n^n) 07:45 < bridge> O(n^n) is really really bad tho 07:45 < bridge> if you see 100 players in a densed area. we can assume several things: 07:45 < bridge> 1. camera would be pretty zoomed out and does not require a lot of precision. 07:45 < bridge> 2. players will have close proximity to each other 07:45 < bridge> I think it meant to say O(n*n) 07:45 < bridge> then it is a perfect oppertunity to do delta encoding between players actually 07:46 < bridge> for example, you can divide player locations by 10, int them, then encode(p1_pos), encode(p2_pos - p1_pos) and so on 07:46 < bridge> you can save a lot of bandwidth doing that 07:47 < bridge> oh, i just assumed it meant that really. i didn't realize what n^n actually means. so i was quite confused about what you were talking about oof 07:48 < bridge> :justatest: 07:48 < bridge> O(n^n) just doesn't exist in my brain i guess 07:49 < bridge> oh you do need a 7bit packing algorithm to make that work tho 07:49 < bridge> n=16 would be 18,446,744,000,000,000,000 iterations lol 07:49 < bridge> so definitely not that 07:50 < bridge> what does this even mean // O(1) .. O(n) 07:50 < bridge> best/worst case? 07:50 < bridge> ok I'm finding who wrote these 07:51 < bridge> 07:51 < bridge> good luck on the quest lol 07:51 < bridge> he's finding them irl 07:52 < bridge> don't forget to share photos kek 07:53 < bridge> ok they were there forever 07:53 < bridge> 14 years old 07:54 < bridge> thanks magnus 07:54 < bridge> do not doubt magnus 07:54 < bridge> you're right 07:56 < bridge> there's so many comments like "// TODO: this is bad, change it later" and now it can't be changed without breaking protocol or physics 07:58 < bridge> https://github.com/Tjoosten/Funny-code-comments/blob/master/Temporary-my-ass.md 07:59 < bridge> lol 08:01 < bridge> This one is literally me against this comment https://github.com/ddnet/ddnet/blob/fa9f7b46cdf5a45be5985217f1a67c5e1553c52c/src/game/collision.cpp#L329 08:01 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260475969865650237/image.png?ex=668f7539&is=668e23b9&hm=cad5890a622c950c5d92cd40dcf9b152f16b2eeb7d616d750b931f5bb991cf18& 08:01 < bridge> This one is literally me against this comment 08:01 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260475969865650237/image.png?ex=668f7539&is=668e23b9&hm=cad5890a622c950c5d92cd40dcf9b152f16b2eeb7d616d750b931f5bb991cf18& 08:01 < bridge> I spent like 4 days trying to optimize it 08:02 < bridge> but preserve the original functionality 08:03 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260476535219949619/image.png?ex=668f75c0&is=668e2440&hm=bf58b7c9cb0a37bea917d9fce64ec7c50ce72e918a664516a94e5c8461d53b0f& 08:03 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260476535442374677/image.png?ex=668f75c0&is=668e2440&hm=2eba2fe53cd00c0303659b20b0fa59237bab3e35a09b623ecf75bf572ffaf401& 09:33 < bridge> unchanged items in the snap are not sent 09:34 < bridge> @totar is correct. you delete items by including their ID in the deleted items section of a elta 09:34 < bridge> :owo: i knew you would know 09:35 < bridge> imma name one of my character elta, sounds cool 09:36 < bridge> Im yoinking this name 09:36 < bridge> yoinkaway 09:47 < bridge> https://news.ycombinator.com/item?id=40918052 09:50 < bridge> N guaranteed low? 09:50 < bridge> It's mislabeled 09:51 < bridge> That explains it 10:01 < bridge> same as mozilla firefox btw 10:03 < bridge> I guess that usage might be less defensible. but e.g. https://addons.mozilla.org/ has special permissions, so that even ad blockers don't work there 10:55 < bridge> same 12:11 < bridge> <0xdeen> @learath2 looking better now 12:11 < bridge> <0xdeen> https://cdn.discordapp.com/attachments/293493549758939136/1260538987395678269/message.txt?ex=668fafea&is=668e5e6a&hm=4f215008dcc8edc84ec46333665f38cec9999d81646738d46841e62eceb878ea& 12:12 < bridge> <0xdeen> CAntibot::Update is still at 22%, but at least not 50 12:14 < bridge> <0xdeen> One thing that stands out is that every str_copy calls str_utf8_fix_truncation, which is kind of useless for this kind of string 12:14 < bridge> <0xdeen> I'll replace it with a mem_copy 13:13 < bridge> I want to reorganize some internals for the unique game servers and came to a general problem I wanted to ask for help here. How do I publish a directory with subdirectories and files on the internet such that others can sync it? I basically want rsync but accessible to the public. My first instinct would have been to use HTTP but I don't know any tools that can sync a folder hierarchy from HTTP and I don't know if it's even possible because HTTP d 13:28 < bridge> <0xdeen> Put it in a git repo and put it on github: https://github.com/ddnet/ddnet-maps 13:28 < bridge> <0xdeen> You can also create your own git server 13:29 < bridge> <0xdeen> You can also run rsync as a daemon to allow anyone to sync from it using rsync 13:29 < bridge> <0xdeen> https://wiki.archlinux.org/title/rsync#As_a_daemon 13:30 < bridge> <0xdeen> But with github you'll probably reach 100x as many people as with an rsync:// server 13:31 < bridge> <0xdeen> Alternatively SFTP, but you'll have to be careful that the user you generate doesn't have permissions to do anything bad: https://wiki.archlinux.org/title/SCP_and_SFTP 13:32 < bridge> <0xdeen> FTP is really out of date, I would not have used that for anything 15 years ago 😄 13:33 < bridge> <0xdeen> For HTTP there is also WebDAV, but I don't have experience with using that 13:37 < bridge> rclone seems to be able to sync from http directory listings: https://rclone.org/http/ 13:42 < bridge> I need to programmatically update files and sync files that's why I think it would be a misuse of git 13:42 < bridge> Rclone seems perfect 13:42 < bridge> For a much smaller project almost a decade back, I used unison to sync files. It can work over plain tcp too 13:43 < bridge> But I guess it's more appropriate when you need to be able to modify stuff on both sides 13:43 < bridge> Yeah for me it's only one-way 13:43 < bridge> What is the issue with git? 13:44 < bridge> You can make commits programatically just fine 13:44 < bridge> I think git pull man page specifically mentions you should not call it from a script 13:45 < bridge> I dohbt that 13:45 < bridge> I'm sure you would get it to work though it's just not what git was made for 13:45 < bridge> I don't see such a notice 13:45 < bridge> I don't see such a notice in the man page 13:45 < bridge> I doubt that 13:45 < bridge> I've been automatically pulling changes for 10 years or so from git repositories 13:45 < bridge> it seems to work fine 13:46 < bridge> <0xdeen> ddnet-maps has been on git/github for 10 years too 13:47 < bridge> (a downside of git is that you get all the history, too) 13:48 < bridge> Which you can get around by cloning shallow, no? 13:50 < bridge> yes, but that in addition to pulls is bad for performance, according to github 13:50 < bridge> they asked the cargo team to not do shallow clones as that was hard on the github infra 13:51 < bridge> yea it's not in the man page, that was wrong 13:51 < bridge> Hm, that's interesting. So the shallowing isn't something trivial 13:52 < bridge> I would assume pulls in a shallow repo would just pull in deltas like normal, apply them, then prune 13:52 < bridge> i think git is the right move tbh 13:52 < bridge> not different from automating e.g. cmake calls 13:53 < bridge> Or if you really don't need the versioning capabilities of git at all. I guess ftps or rsync are what I would go for 13:53 < bridge> i'd still use git bcs nowadays the likelihood of a system having git is prob higher than rsync 😁 + just standard 13:54 < bridge> Rclone parsing a listing meant for endusers just sounds more jank than those to me 😄 13:54 < bridge> If I use git is there anything I should be aware of? My first attempt would be just to do 13:54 < bridge> ``` 13:54 < bridge> # on main server 13:54 < bridge> git commit -m "Added map $blabliblub" 13:54 < bridge> # on locale in a systemd timer 13:54 < bridge> git pull 13:54 < bridge> ``` 13:54 < bridge> If I use git is there anything I should be aware of? My first attempt would be just to do 13:54 < bridge> ``` 13:54 < bridge> # on main server 13:54 < bridge> git commit -m "Added map $mapname" 13:54 < bridge> # on locale in a systemd timer 13:55 < bridge> git pull 13:55 < bridge> ``` 13:55 < bridge> push but ya 13:55 < bridge> how do you want to pull? via ssh? that should work out of the box 13:56 < bridge> I think http because automated pulls won't have an ssh key 13:57 < bridge> I might add a `git reset --hard` there. We still get a couple pull issues on ddnet because of that 13:57 < bridge> why? 13:57 < bridge> then you should also start an https server (if you haven't already) 13:57 < bridge> maybe just fetch and then reset --hard to avoid conflicts and just overwrite stuff 13:58 < bridge> Idk, never diagnosed it further. Somehow sometimes local servers will end up with changes 13:58 < bridge> but there should be no conflicts because nobody writes there 13:58 < bridge> then it should just work™ 13:59 < bridge> spooky 13:59 < bridge> probably because of admin actions ^^ 14:03 < bridge> Which would make sense but it happened on `bans-global.cfg`, it should never be manually edited 😄 14:03 < bridge> hmmmmm 14:06 < bridge> i think im gonna try out hyprland 14:06 < bridge> friends are saying it works with fractional scaling 14:07 < bridge> I've been using 1.5x on normal xorg on my laptop for a bit now, and I haven't had many issues 14:08 < bridge> too many variables 14:08 < bridge> with how wayland works that behavior now depends entirely on the compositor 14:08 < bridge> no more xrandr to fall back on 14:09 < bridge> and it "works" on gnome too it just looks like shit and unnecessarily scales some stuff 14:12 < bridge> @learath2 https://github.com/CocoaPods/CocoaPods/issues/4989#issuecomment-193772935 14:12 < bridge> > Apparently, most of the initial clones are *shallow*, meaning that not the whole history is fetched, but just the top commit. But then subsequent fetches don't use the `--depth=1` option. Ironically, this practice can be much more expensive than full fetches/clones, especially over the long term. It is usually preferable to pay the price of a full clone once, then incrementally fetch into the repository, because then Git is better able to ne 14:13 < bridge> not very specific I guess 14:15 < bridge> <0xdeen> So you are the one deleting my manual changes! 14:15 < bridge> :feelsbadman: 14:15 < bridge> why not upstream 14:16 < bridge> <0xdeen> Ah, bans-global.cfg. I think this happens because we can run two `git pull`s at the same time 14:16 < bridge> <0xdeen> I'd add a lock, but then there is danger of the lock file staying around after a server crash 14:17 < bridge> Mh it should never get half a commit, no? 14:17 < bridge> <0xdeen> I'm not sure, but that's the only thing I can imagine causing these problems 14:17 < bridge> Put the lock file in /tmp or somewhere that is guaranteed to be empty after a crash (not sure if /tmp applies) 14:18 < bridge> it does 14:18 < bridge> /var/tmp is persistent 14:18 < bridge> I'd *guess* debian clears out /tmp on reboot. I only *know* that macos does 14:19 < bridge> My /tmp is on a tmpfs 14:19 < bridge> I think some distros have /tmp actually in memory and not on disk but I'm not sure 14:19 < bridge> Is that common? 14:19 < bridge> ye 14:19 < bridge> debian changed to /tmp on tmpfs so recently that our servers definitely don't have it yet 14:19 < bridge> I'd still *guess* that debian clears out /tmp on reboot 14:24 < bridge> seems pointless otherwise 14:24 < bridge> they have to have some mechanism 14:26 < bridge> yes, but it's not entirely clear that it has to happen on reboots 14:27 < bridge> I'd still *guess* it does 14:27 < bridge> but e.g. cleaning it up every 7 days would also work. I think that also happens 14:34 < bridge> Ah, so if you fetch `--depth=1` too it behaves as I expected. I didn't know pull wasn't smart like that 15:17 < bridge> https://github.blog/2015-09-22-counting-objects/ this is a nice readup 15:17 < bridge> https://github.blog/2015-09-22-counting-objects/ this is a nice read 16:05 < bridge> i spent 30 mins trying to solve sqlx error because couldn't read `.env` file but i named it `.env ` :pepeW: 16:06 < bridge> and there was nothing in the logs about missing `.env` files? 16:07 < bridge> it was telling me that it couldn't find `.env` file but i was looking at it from neovim and i didn't the the space xd 16:07 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260598302764695603/image.png?ex=668fe728&is=668e95a8&hm=dfb9bea15f8c0b9a9f64139bd6f642299fc320329e67a84fd3478b95f32b68da& 16:11 < bridge> hello fellow devs 16:11 < bridge> hi 16:11 < bridge> today i made a MLIR IR with a single function big enough it makes the mlir optimizer run forever and get OOM 16:12 < bridge> (i have 64gb ram) 16:12 < bridge> u sure u didnt make infinite loop 16:12 < bridge> on the server at work with 128gb ram it ooms too 16:12 < bridge> @mpft did u read what i said 16:12 < bridge> im not running the program 16:12 < bridge> Haha I like your funny words magic man 16:12 < bridge> u sure mlir didnt make infinite loop 16:13 < bridge> im optimizing it (to be more pedantic, im getting the canonicalized format of it) 16:13 < bridge> no, its just that the single region is so big it takes forever 16:13 < bridge> since the optimizer runs passes through regions 16:13 < bridge> im sure if i divided the func into smaller ones it would work 16:13 < bridge> https://mlir.llvm.org/docs/Canonicalization/ 16:14 < bridge> https://sunfishcode.github.io/blog/2018/10/22/Canonicalization.html 16:14 < bridge> @milkeeycat this is important topic in compiler dev, u should make a canonicalization pass to make optimizations easier 16:14 < bridge> its easier to recognize patterns 16:15 < bridge> ``` 16:15 < bridge> A lot of code constructs can be written in multiple ways. For example: 16:15 < bridge> 16:15 < bridge> x + 4 16:15 < bridge> 4 + x 16:15 < bridge> (x + 2) + 2 16:15 < bridge> 16:15 < bridge> Canonicalization means picking one of these forms to be the canonical form, and then going through the program and rewriting all constructs which are equivalent to the canonical form into the canonical form. 16:15 < bridge> 16:15 < bridge> In the case of add, it’s common to pick the form that has a constant on the right side, so we’d rewrite all these constructs to x + 4. 16:15 < bridge> ``` 16:15 < bridge> its this in a nutshell 16:15 < bridge> ``` 16:15 < bridge> having a canonicalization pass is a way of factoring out the parts in a compiler that know all the different forms x + 4 could take, so that most optimization passes don’t have to worry about this. They don’t have to look for 4 + x, because they can assume that looking for x + 4 covers that. Handy! 16:15 < bridge> ``` 16:38 < bridge> 🤓 16:39 < bridge> 🤓 16:39 < bridge> i rly wasnt gonna say anything but i cant take u srsly with the anime pfp 17:00 < bridge> @patiga is twmap able to append maps? 17:01 < bridge> what do you need precisely? the whole append operation or only part of it? 17:01 < bridge> the whole, i think 17:14 < bridge> what's your use case? 😮 17:14 < bridge> appending :justatest: 17:15 < bridge> surely not on its own. it's probably a way to achieve something ^^ 17:15 < bridge> I'm just kidding 17:37 < bridge> xd 17:44 < bridge> classical CamelCase connoisseur pfp 17:47 < bridge> i love camel 17:48 < bridge> case depends on the case 17:49 < bridge> case ECAMELSTATE::ATTACKING: 17:49 < bridge> run(); 17:49 < bridge> break; 17:58 < bridge> no, mostly because I didn't need that operation so far 17:59 < bridge> are you using the python bindings or the rust library? 18:14 < bridge> https://blog.josefsson.org/2024/07/10/towards-idempotent-rebuilds/ 18:14 < bridge> I didn't know that reproducible-builds.org doesn't actually track actual debian packages 18:14 < bridge> but only their rebuilds 19:49 < bridge> chillerdragon: I found the password from your chat!!!! 19:53 < bridge> leak pls 19:54 < bridge> `cWOiCHDL}?sx&v6!w4%(` one of the characters is wrong :santatrollet: 19:54 < bridge> the 0 is wrong 20:33 < bridge> Is there any guide or documentation on how to construct snapshots? 21:22 < bridge> many thanks to nRx 21:49 < bridge> Are there functions to create snaps from entity data on the clientside? 21:49 < bridge> i don't want to do this manually please save me 22:05 < bridge> OMAGAAAD pvp features 22:09 < bridge> gerdeo :santatrollet: 22:22 < bridge> i'm so confused - where do these come from: 22:22 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1260692757777879060/image.png?ex=66903f1f&is=668eed9f&hm=1fdeae35f631dd406a4d3e22e227046767656183868cd7001bfd123fd2cc7f52& 22:41 < bridge> discord or steam overlay maybe ? 22:44 < bridge> https://docs.rs/edict/1.0.0-rc4/edict/index.html 22:44 < bridge> opinions? 23:32 < bridge> Hello, sorry for maybe offtopic here: is `https://info.ddnet.org/icons/ddnet.png` the correct comm icon URL? I see it in info (`https://info.ddnet.org/info`) but since yesterday I'm getting `ERROR 404` for all comm icons (so the client does not look as expected). 23:32 < bridge> Is it a known issue? I tried different proxies and VPNs with the same result, yet I can't believe that such an issue can stay for that long. 23:47 < bridge> hmmm. that seems to be incorrect, indeed 23:47 < bridge> <0xdeen> ah, forgot to update that 23:47 < bridge> <0xdeen> we moved it to a different server 23:47 < bridge> <0xdeen> one moment 23:50 < bridge> <0xdeen> fixed