02:33 <+bridge> [ddnet] I cant tag you chillerbot 02:36 <+bridge> [ddnet] i think u just have to say ChillerDragon 03:33 <+bridge> [ddnet] just like in teeworlds ChillerDragon 06:39 <+bridge> [ddnet] ChillerDragon: stop irc 09:53 <+ChillerDragon> henlo @cagent 09:53 <+ChillerDragon> can we chat somewhere non here? 11:48 <+bridge> [ddnet] https://discord.gg/4BQbcq6M 12:01 <+bridge> [ddnet] lol 13:20 <+bridge> [ddnet] Question, where can i see the source of the ddnet discord bot? I just wanted to implement them on our server 13:22 <+bridge> [ddnet] nvm, i just found it 13:23 <+bridge> [ddnet] $about 13:23 <+bridge> [ddnet] the commits link to the repository 13:25 <+bridge> [ddnet] thank you! 13:26 <+bridge> [ddnet] $invite 13:26 <+bridge> [ddnet] 13:26 <+bridge> [ddnet] u can invite him btw 13:26 <+bridge> [ddnet] it* 14:57 <+ChillerDragon> oh lol ddnet code base has Config() now but its a trap xd 14:57 <+bridge> [ddnet] it's a trap? 14:57 <+ChillerDragon> im so used to 0.7 base so i just used Config() in ddnet code and its a crash 14:57 <+ChillerDragon> ye 14:57 <+ChillerDragon> its nullptr 14:57 <+ChillerDragon> dangerous 14:57 <+bridge> [ddnet] fix pls 14:57 <+ChillerDragon> u 14:58 <+bridge> [ddnet] no 14:58 <+ChillerDragon> i probably forgot to set something up 14:58 <+ChillerDragon> its in my own component 14:58 <+ChillerDragon> yea lets see if i feel motivated to dig in there 14:58 <+ChillerDragon> who did that thing again forgot the name 14:58 <+bridge> [ddnet] Kaffeine? 14:58 <+ChillerDragon> yea sounds aboutright 14:58 <+ChillerDragon> ur brain is so good 14:59 <+ChillerDragon> remember and shit 14:59 <+ChillerDragon> guess ima use g_Config for now^^ 14:59 <+ChillerDragon> also @cagnet troll 14:59 <+ChillerDragon> omg typo 15:00 <+ChillerDragon> @cagent come search me ingame tw chat is best im online all day tho mostly afk 17:12 <+bridge> [ddnet] How do I find out my DDNet version? 17:13 <+ChillerDragon> local console 17:13 <+ChillerDragon> top right 17:13 <+ChillerDragon> oh remote console also works 17:13 <+ChillerDragon> @NeXus 17:14 <+bridge> [ddnet] Ah got it ty 18:17 <+bridge> [ddnet] how many players does a server see in a day? 18:17 <+bridge> [ddnet] I still want to try my "one port per player" idea at some point 18:18 <+bridge> [ddnet] Sure, that's a nice idea, I also thought about that yesterday in the shower 😄 18:19 <+bridge> [ddnet] What was the idea behind that? 18:19 <+bridge> [ddnet] first the idea would be that the kernel can drop packets much faster than we can 18:19 <+bridge> [ddnet] so if they don't attack the main port, the kernel can drop the packets. so they'll send garbage to the main port 18:20 <+bridge> [ddnet] then we limit the amount of traffic we accept on the main port 18:20 <+bridge> [ddnet] So we drop with iptables? 18:20 <+bridge> [ddnet] resulting in no one being able to connect and no one being dropped 18:20 <+bridge> [ddnet] hopefully* 18:20 <+bridge> [ddnet] the amount of traffic on the main port? yes, iptables 18:20 <+bridge> [ddnet] On GER2: `grep "player is ready" servers/*.log* | sed -e "s/.*addr=<{\(.*\):[0-9]*\}>.*/\1/" | sort | uniq | wc -l` 18:20 <+bridge> [ddnet] 9175 18:21 <+bridge> [ddnet] hm, that's a significant fraction of the /16 space we have 😦 18:21 <+bridge> [ddnet] needs to be more dynamic than once per day apparently 18:21 <+bridge> [ddnet] We don’t need it to be unique, do we? 18:22 <+bridge> [ddnet] not necessarily, but reduces thinking needed 18:23 <+bridge> [ddnet] Also I’m not very familiar with how the kernel handles traffic on different ports 18:23 <+bridge> [ddnet] I have a worrying feeling that the massive load on the main port might affect the others anyway 18:24 <+bridge> [ddnet] even if we tell the kernel to drop udp packets on the main port? 18:24 <+bridge> [ddnet] Also another performance concern I’d have is the 64 new sockets we need to care about. Though I hear epoll has fairly decent behaviour 18:24 <+bridge> [ddnet] yes, 64 new sockets, epoll might be fine 18:24 <+bridge> [ddnet] web servers handle more than 64 sockets, I think 18:25 <+bridge> [ddnet] nftables is quite close to the userspace almost on the edge of the network stack. I’m just not sure what the performance characteristics of the layers below are 18:26 <+bridge> [ddnet] That one cloudflare blog where they were trying to drop as fast as possible, they got a huuge increase going from dropping in nftables to dropping on the NIC with a BPF filter 18:27 <+bridge> [ddnet] I mean we can manage a BPF filter as well 😉 18:27 <+bridge> [ddnet] if we get access to state that lets us track how much we already saw this second 18:27 <+bridge> [ddnet] There is significant work being done in the kernel is what I mean, but yeah I think it might be worth a test 18:27 <+bridge> [ddnet] My master thesis is about ebpf 18:27 <+bridge> [ddnet] @TsFreddie to the rescue 18:28 <+bridge> [ddnet] And I still have no idea how bpf filters work 18:28 <+bridge> [ddnet] Nooooooo 18:28 <+bridge> [ddnet] @heinrich5991 I guess this will be a breaking network change tho 18:28 <+bridge> [ddnet] I can probably write ebpf programs. And I know there's a bpf syscall but that's all I know tbh 18:28 <+bridge> [ddnet] not breaking 18:29 <+bridge> [ddnet] "not breaking" 18:29 <+bridge> [ddnet] only breaking for those on the old protocol during DoS 18:29 <+bridge> [ddnet] More backwards compat code on the server? ;P 18:29 <+bridge> [ddnet] ye 18:30 <+bridge> [ddnet] Which protocol is the "old protocol" 18:30 <+bridge> [ddnet] So I guess we establish a traditional tw connection on the main port, the client sends something like STARTTLS or FTP PASV. We give them a port to contact us on and we kill the connection? 18:30 <+bridge> [ddnet] yes 18:31 <+bridge> [ddnet] I’d be concerned about an attack trying to occupy all ports on the server 18:31 <+bridge> [ddnet] hm? 18:31 <+bridge> [ddnet] we allow 64 players per server 18:32 <+bridge> [ddnet] Yes, but if people try to connect, we can’t reserve them a slot. As that gives the old (connecting) attack 18:32 <+bridge> [ddnet] apparently we need to verify their IP address before giving them another port 18:33 <+bridge> [ddnet] I guess the handshake we have rn is enough for that? 18:33 <+bridge> [ddnet] yes 18:33 <+bridge> [ddnet] but the handshake in its current form is brittle and should be changed at the next opportunity 18:33 <+bridge> [ddnet] one lost packet and you're stuck forever 18:33 <+bridge> [ddnet] (the third packet specifically) 18:34 <+bridge> [ddnet] The only concern that remains is a non spoofed attack that just keeps asking for a new port, but I guess we can mitigate that with a hashmap of ip:clientport to serverport and never give a new one and limit ports per ip 18:35 <+bridge> [ddnet] Sounds like a solid idea to me, lmk if you ever decide to implement it 😄 18:35 <+bridge> [ddnet] last time you weren't that sold on the idea, but I also haven't implemented it since last time 😛 18:35 <+bridge> [ddnet] so "some day, maybe" 18:36 <+bridge> [ddnet] I don’t remember my concern back then 18:36 <+bridge> [ddnet] But I was fairly convinced it wouldn’t work so I wonder what my argument was ;P 18:37 <+bridge> [ddnet] who would ddos ddnet anyway 18:37 <+bridge> [ddnet] doesn't really matter, it happens 18:37 <+bridge> [ddnet] is it always SP | Someone 18:37 <+bridge> [ddnet] please don't discuss specific DoSers, that's basically what they're after 😉 18:38 <+bridge> [ddnet] he donates ddnet btw 18:38 <+bridge> [ddnet] Yeah, he's not an attacker, just a troll 18:38 <+bridge> [ddnet] is he even in this disc? 18:38 <+bridge> [ddnet] no 18:38 <+bridge> [ddnet] but 18:38 <+bridge> [ddnet] who knows :troll: 18:39 <+bridge> [ddnet] Just looked up some xdpfilter 18:40 <+bridge> [ddnet] Feel like magic 18:40 <+bridge> [ddnet] Xdp is the pinnacle of filtering 18:40 <+bridge> [ddnet] Filtering packets at the lowest possible level 18:42 <+bridge> [ddnet] NICs with offloaded xdp are genius 18:48 <+bridge> [ddnet] https://github.com/zoidbergwill/awesome-ebpf 19:02 <+bridge> [ddnet] my supervisor wants me to process data with ebpf on nvme controller. 19:02 <+bridge> [ddnet] 19:04 <+bridge> [ddnet] Why I can just download map so fucking slowly on my srv? 19:04 <+bridge> [ddnet] Needs like 20 sec 19:04 <+bridge> [ddnet] ddnet? vanilla? 0.6? 0.7? 19:04 <+bridge> [ddnet] ddnet 19:04 <+bridge> [ddnet] client is 0.6 or 0.7? 19:04 <+bridge> [ddnet] 0.6 19:04 <+bridge> [ddnet] ddnet or vanilla 0.6? 😄 19:05 <+bridge> [ddnet] Its not just me, there is something on my srv i guess 19:05 <+bridge> [ddnet] If it's ddnet client your map is just massive 19:05 <+bridge> [ddnet] the udp fast download can only do so much, ddnet servers use http downloads to get around that 19:06 <+bridge> [ddnet] probs a custom server 19:06 <+bridge> [ddnet] (custom map) 19:06 <+bridge> [ddnet] I think @deen did add a couple maps that are played a lot to the map server 19:07 <+bridge> [ddnet] Anyway, if the map is on maps.ddnet.tw people should get http downloads 19:07 <+bridge> [ddnet] http download is really unstable in china btw. Many players got stuck at connecting. 19:07 <+bridge> [ddnet] Yeah needs a CDN for china 😛 19:08 <+bridge> [ddnet] Oof 19:08 <+bridge> [ddnet] @Marius u can try 19:08 <+bridge> [ddnet] sv_fast_download 1 19:08 <+bridge> [ddnet] sv_high_bandwidth 1 19:08 <+bridge> [ddnet] Is there a way to fallback to udp download a bit faster. 19:08 <+bridge> [ddnet] but if the http download times out it should fall back to udp automatically 19:09 <+bridge> [ddnet] But it takes awhile to timeout http 19:09 <+bridge> [ddnet] Already both on @Jupstar ✪ 19:09 <+bridge> [ddnet] I'm sure there is a http timeout config somewhere, but that might create issues with ddnet-info.json 19:09 <+bridge> [ddnet] mhh with SDL 2.0.14 i cannot minize the client anymore... very annoying 19:09 <+bridge> [ddnet] why must this lib always be buggy <.< 19:09 <+bridge> [ddnet] @Marius what is your m_SvMapWindow 19:10 <+bridge> [ddnet] sv_map_window * 19:10 <+bridge> [ddnet] Like can we fallback to udp download a bit earlier and if the http went through just drop the downloaded udp data. 19:10 <+bridge> [ddnet] 15 19:10 <+bridge> [ddnet] @TsFreddie smells like a great way to have race conditions 😛 19:10 <+bridge> [ddnet] ye 19:11 <+bridge> [ddnet] @Marius you can go up to 100, but raise it slowly, too high and more people will have to fall back to slower download 19:11 <+bridge> [ddnet] But we do have a tutorial for straight up turning the setting off in our chat so it's not really a big deal. 19:13 <+bridge> [ddnet] I wonder if we can get a mirror of the map db in china 19:13 <+bridge> [ddnet] Actually. If http timeout are we still trying http on next connection 19:13 <+bridge> [ddnet] Can we fallback to udp until they restart the game. 19:13 <+bridge> [ddnet] @TsFreddie yes because I think the saner assumption is that we broke the server or it's overwhelmed for a sec and it'll be back 19:14 <+bridge> [ddnet] Would be great for china, not sure how good it'd be for everyone else though 19:14 <+bridge> [ddnet] How is it failing? Does the download even start? 19:14 <+bridge> [ddnet] I don't think so 19:14 <+bridge> [ddnet] Most ppl just say they are stuck at connecting 19:15 <+bridge> [ddnet] next time it happens try to get us a console/log pls 19:15 <+bridge> [ddnet] Sure 19:16 <+bridge> [ddnet] I got pretty good connection to ddnet.tw at home so might be difficult to come by myself 19:17 <+bridge> [ddnet] Wait. I might turned http download off ages ago maybe that why I think I have pretty good connection 19:17 <+bridge> [ddnet] I'll check tomorrow I guess 19:19 <+bridge> [ddnet] maybe we can get a server in china to host the maps, tho we'd need to host BIND to send people from china a different ip 19:19 <+bridge> [ddnet] Are ddnet.tw CDNed 19:20 <+bridge> [ddnet] Is* 19:20 <+bridge> [ddnet] nope 19:20 <+bridge> [ddnet] I think even a South Korea mirror might be worth it 19:22 <+bridge> [ddnet] Mainland bandwidth is so limited and probably it'd be better off covering the east instead of only china I guess? 19:23 <+bridge> [ddnet] The location we could discuss, I'd guess the larger issue is actually setting up BIND and stuff 😛 19:23 <+bridge> [ddnet] We don't host dns now 19:23 <+bridge> [ddnet] 19:23 <+bridge> [ddnet] right 19:23 <+bridge> [ddnet] Can server hint which map mirror client should use 19:24 <+bridge> [ddnet] Like why would one want to use a Asian mirror when connecting to GER. 19:25 <+bridge> [ddnet] :doge: 19:26 <+bridge> [ddnet] Actually, why do we even need it to be automatic? 19:26 <+bridge> [ddnet] Also probably enables mods for hosting their own http map database 19:26 <+bridge> [ddnet] You could host a mirror in china and just tell people to change their `cl_map_download_url` 19:26 <+bridge> [ddnet] 19:28 <+bridge> [ddnet] I mean I could just tell them to turn off http download. it is not that slow on chn servers and they don't seems to venture out for other servers (yet) 19:28 <+bridge> [ddnet] I think the issue is I can't tell everyone to change 19:28 <+bridge> [ddnet] Huh, the udp downloads are soo slow 19:29 <+bridge> [ddnet] I guess you got used to it there 19:29 <+bridge> [ddnet] Ye 19:30 <+bridge> [ddnet] Funny story, I ordered ziploc bags and they shipped them in a larger ziploc bag 19:30 <+bridge> [ddnet] If it is at least semi automatic, I don't need to paste the solution every time someone have the same problem. Plus there are lots of players who just don't care about joining a community 19:30 <+bridge> [ddnet] I’ll look into BIND for you 19:31 <+bridge> [ddnet] Maybe it’s not as PITA as I remember ;P 19:31 <+bridge> [ddnet] Maybe look into letting the server decide the URL as well. Maybe it is easier idk 19:33 <+bridge> [ddnet] There are security implications of that which I’m not really sure I want to think about right now 😉 19:33 <+bridge> [ddnet] 19:33 <+bridge> [ddnet] Right. 19:34 <+bridge> [ddnet] Triggering AV for starter I guess 19:35 <+bridge> [ddnet] I'll see if we have cheaper way to host files in the meantime 19:36 <+bridge> [ddnet] @Learath2 I think GET requests should mostly be fine 19:37 <+bridge> [ddnet] hmmmmm 19:37 <+bridge> [ddnet] you don't only get a GET request but also if they match a certain SHA256 19:37 <+bridge> [ddnet] that might be less fine 19:57 <+bridge> [ddnet] jump_amount How many jumps you have 2 (default) 19:57 <+bridge> [ddnet] for tune zone 20:09 <+bridge> [ddnet] someone that codes please 20:09 <+bridge> [ddnet] explain me how the fuck lambdas work 20:09 <+bridge> [ddnet] Task.Run(() => CarregarDataAtual()); 20:09 <+bridge> [ddnet] ```Task.Run(() => CarregarDataAtual());``` 20:09 <+bridge> [ddnet] which language is that? it looks like it tells the language to run CarregarDataAtual() at some later point in time 20:09 <+bridge> [ddnet] c# 20:10 <+bridge> [ddnet] CarregarDataAtual is LoadActualDate() 20:10 <+bridge> [ddnet] CarregarDataAtual() is LoadActualDate() 20:10 <+bridge> [ddnet] CarregarDataAtual() is LoadActualDate() (english translation) 20:10 <+bridge> [ddnet] https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.run?view=net-5.0#System_Threading_Tasks_Task_Run_System_Action_ 20:10 <+bridge> [ddnet] Queues the specified work to run on the thread pool and returns a Task object that represents that work. 20:10 <+bridge> [ddnet] Ik task.run does that, but the lambda 20:10 <+bridge> [ddnet] i.e. it tells C# to run the function CarregarDataAtual() at some later time 20:11 <+bridge> [ddnet] I dont underrstand the lambda ;_; 20:11 <+bridge> [ddnet] I dont understand the lambda ;_; 20:11 <+bridge> [ddnet] the lambda is the function that is called at a later time 20:11 <+bridge> [ddnet] e.g. if you have a function 20:11 <+bridge> [ddnet] ```c# 20:12 <+bridge> [ddnet] public static int Return7() { 20:12 <+bridge> [ddnet] return 7; 20:12 <+bridge> [ddnet] } 20:12 <+bridge> [ddnet] ``` 20:12 <+bridge> [ddnet] e.g. if you have a function 20:12 <+bridge> [ddnet] ```c 20:12 <+bridge> [ddnet] public static int Return7() { 20:12 <+bridge> [ddnet] return 7; 20:12 <+bridge> [ddnet] } 20:12 <+bridge> [ddnet] ``` 20:12 <+bridge> [ddnet] that's the same as a lambda `() => 7` 20:13 <+bridge> [ddnet] a lambda is a shorter way to define a function 20:33 <+bridge> [ddnet] Are u catalan? 20:34 <+bridge> [ddnet] :poggers: 20:36 <+bridge> [ddnet] Catalunya no existe ql 20:36 <+bridge> [ddnet] Ql weon 20:37 <+bridge> [ddnet] @Ryozuki im brazillian 20:37 <+bridge> [ddnet] Ah ok 20:37 <+bridge> [ddnet] Ot looked so similar 20:37 <+bridge> [ddnet] oh @heinrich5991 thansk 20:37 <+bridge> [ddnet] In catalan it would be CarregarDataActual() 20:37 <+bridge> [ddnet] oh 20:38 <+bridge> [ddnet] its spanish,franchise and italian native 20:38 <+bridge> [ddnet] that's why 20:38 <+bridge> [ddnet] portuguese ± spanish 20:39 <+bridge> [ddnet] It has similarities but it's not the same 20:39 <+bridge> [ddnet] As in other languages 20:39 <+bridge> [ddnet] Linguistics time 20:39 <+bridge> [ddnet] yeah its similar 20:39 <+bridge> [ddnet] 🇫🇷🇮🇹🇪🇸 20:40 <+bridge> [ddnet] Ew 20:40 <+bridge> [ddnet] If i had nitroll 20:40 <+bridge> [ddnet] Someone put the catalan one 20:40 <+bridge> [ddnet] :trollet: 20:40 <+bridge> [ddnet] 20:40 <+bridge> [ddnet] ```Func square = x => x * x; 20:40 <+bridge> [ddnet] Console.WriteLine(square(5)); 20:40 <+bridge> [ddnet] // Output: 20:40 <+bridge> [ddnet] // 25``` 20:40 <+bridge> [ddnet] yes 🙂 20:40 <+bridge> [ddnet] Lambdas are fun 20:41 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803348773190500352/unknown.png 20:41 <+bridge> [ddnet] o 20:41 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803348902605750302/Screenshot_20210125-154128_Discord.jpg 20:41 <+bridge> [ddnet] It doesn't exist 20:41 <+bridge> [ddnet] Its called flag_spain on some servers 20:42 <+bridge> [ddnet] I think its in fng sv 20:42 <+bridge> [ddnet] oh god 20:42 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803349034688446494/unknown.png 20:42 <+bridge> [ddnet] :flag_spain: 20:42 <+bridge> [ddnet] :justatest: 20:42 <+bridge> [ddnet] my brain slow 20:42 <+bridge> [ddnet] @heinrich5991 i like that rust has FnOnce for functions meant to be called 1 time only 20:42 <+bridge> [ddnet] :bluekitty: 20:44 <+bridge> [ddnet] Its not rly the catalan flag tho, its the catalan flag for independence 20:48 <+bridge> [ddnet] there is no catalan flag because it doesnt exist 21:00 <+bridge> [ddnet] :kek: :kek: :kek: 21:13 <+bridge> [ddnet] my code is a mess but im lazy to fix it 21:17 <+ChillerDragon> relatable 21:17 <+ChillerDragon> did u try using shell instead of C# ? 21:19 <+ChillerDragon> yo @Technoo look at this code then u feel like ur code is clean af https://raw.githubusercontent.com/chidraqul/chidraqul/master/chidraqul.cs 21:19 <+bridge> [ddnet] //weed :3 21:21 <+bridge> [ddnet] OH GOD 21:21 <+ChillerDragon> xd 21:21 <+ChillerDragon> did it help? 21:21 <+bridge> [ddnet] what the actual f is that 21:21 <+ChillerDragon> my game in C# 21:21 <+bridge> [ddnet] its a console game? 21:21 <+ChillerDragon> ye 21:22 <+bridge> [ddnet] nice 21:22 <+ChillerDragon> i used multiple string variables instead of an char array 21:22 <+ChillerDragon> cuz i did not know that arrays are a thing 21:22 <+bridge> [ddnet] yeah I was going to say that 21:23 <+Ryozuki> ChillerDragon i guess u didnt know about arrays back then? 21:23 <+Ryozuki> what is that code even 21:23 <+ChillerDragon> xd 21:23 <+Ryozuki> i guess its just troll 21:23 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803359382414950430/unknown.png 21:23 <+bridge> [ddnet] best part 21:23 <+ChillerDragon> xd 21:23 <+ChillerDragon> where it all comes together 21:23 <+Ryozuki> is it generated by some script 21:23 <+Ryozuki> how can u maintain this 21:23 <+bridge> [ddnet] lemme try compiling it 21:23 <+ChillerDragon> its handwritten 21:24 <+ChillerDragon> Ryozuki: i did not know better back then 21:24 <+Ryozuki> u have a lot of time in ur hands 21:24 <+ChillerDragon> not enough time to learn to code tho 21:24 <+bridge> [ddnet] nvm rider will take long to make another null project 21:24 <+ChillerDragon> so i just started with what i knew 21:24 <+Ryozuki> ChillerDragon well u waste ur time doing this stuff 21:24 <+Ryozuki> no wonderu dont have time to learn actual code 21:24 <+Ryozuki> xd 21:24 <+ChillerDragon> xd 21:24 <+ChillerDragon> i had big fun 21:24 <+Ryozuki> to me it looks like hell 21:24 <+Ryozuki> how is this fun xd 21:24 <+ChillerDragon> i was watching this 5 min yt video 21:24 <+ChillerDragon> he explained what a srting is 21:25 <+ChillerDragon> and a if statement 21:25 <+ChillerDragon> and how to hello world 21:25 <+ChillerDragon> and i was like nice ima build a game with this 21:25 <+Ryozuki> u should save this 21:25 <+Ryozuki> its art 21:25 <+ChillerDragon> its saved 21:25 <+ChillerDragon> i tried to rewrite in rust 21:25 <+ChillerDragon> 3 times 21:25 <+ChillerDragon> and gave up 21:25 <+ChillerDragon> cuz rust so hard 21:25 <+Ryozuki> lmao 21:26 <+Ryozuki> i think its hard cuz its hard to know what this code does 21:26 <+bridge> [ddnet] debugging async scripts is annoying 21:26 <+ChillerDragon> even assembly is easier https://raw.githubusercontent.com/chidraqul/chidraqul10/master/chidraqul10.asm 21:26 <+bridge> [ddnet] debugging async code is annoying 21:26 <+Ryozuki> i would learn more asm but im 2 lazy to learn the register names 21:27 <+ChillerDragon> use comments 21:27 <+Ryozuki> nice table u got there tho 21:27 <+ChillerDragon> :D 21:27 <+Ryozuki> ; +-----------------------------------+ 21:27 <+ChillerDragon> ye also needed em register names 21:27 <+Ryozuki> ; | 8-bit | 16-bit | 32-bit | 64-bit | 21:27 <+Ryozuki> ; +--------+--------+--------+--------+ 21:27 <+Ryozuki> ; | al | ax | eax | rax | 21:27 <+Ryozuki> ; | bl | bx | ebx | rbx | 21:27 <+Ryozuki> ; | cl | cx | ecx | rcx | 21:27 <+Ryozuki> ; | dl | dx | edx | rdx | 21:27 <+Ryozuki> ; | sil | si | esi | rsi | 21:27 <+Ryozuki> ; | dil | di | edi | rdi | 21:27 <+Ryozuki> ; | bpl | bi | ebp | rbp | 21:27 <+Ryozuki> ; | spl | sp | esp | rsp | 21:27 <+Ryozuki> ; | r8b | r8w | r8d | r8 | 21:27 <+Ryozuki> ; | r9b | r9w | r9d | r9 | 21:27 <+Ryozuki> ; | r10b | r10w | r10d | r10 | 21:27 <+Ryozuki> ; | r11b | r11w | r11d | r11 | 21:27 <+Ryozuki> ; | r12b | r12w | r12d | r12 | 21:27 <+Ryozuki> ; | r13b | r13w | r13d | r13 | 21:27 <+Ryozuki> ; | r14b | r14w | r14d | r14 | 21:27 <+Ryozuki> ; | r15b | r15w | r15d | r15 | 21:27 <+Ryozuki> ; +--------+--------+--------+--------+ 21:27 <+Ryozuki> epic 21:27 <+Ryozuki> discord didnt send it all 21:27 <+Ryozuki> lmao 21:27 <+Ryozuki> oh its doing it now 21:27 <+ChillerDragon> rip 21:28 <+Ryozuki> looks scuffed 21:28 <+Ryozuki> monospace terminal ftw 21:28 <+bridge> [ddnet] i fear assembly 21:28 <+ChillerDragon> im sure it looks fine in the only usuable discord client 21:28 <+ChillerDragon> cordless 21:28 <+ChillerDragon> i think it was also handwritten table Ryozuki xd 21:28 <+Ryozuki> ChillerDragon is the assembly game the same as the cs game? 21:28 <+ChillerDragon> i cant remember a single thing tho 21:29 <+Ryozuki> the assembly looks clean af 21:29 <+ChillerDragon> yea same functionality 21:29 <+ChillerDragon> feature complete 21:29 <+Ryozuki> nice 21:29 <+ChillerDragon> no joke :D the cs game is far more complex 21:29 <+ChillerDragon> the asm is not even working prototype 21:29 <+bridge> [ddnet] guys I think im dumb 21:29 <+Ryozuki> ah 21:29 <+Ryozuki> u troll 21:29 <+ChillerDragon> hehe 21:29 <+bridge> [ddnet] im loading 2k results from a mysql database and getting the last with Linq 21:29 <+bridge> [ddnet] is this good 21:29 <+ChillerDragon> yea i think the asm only had keypresses 21:29 <+Ryozuki> why load 2k then 21:30 <+ChillerDragon> 2k? 21:30 <+Ryozuki> just load the last 21:30 <+ChillerDragon> wat 21:30 <+bridge> [ddnet] yeah 21:30 <+bridge> [ddnet] im dumb 21:30 <+bridge> [ddnet] almost 2k** 21:30 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803361258325278720/unknown.png 21:30 <+bridge> [ddnet] 1644 21:31 <+bridge> [ddnet] that's still a lot 21:31 <+Ryozuki> idk what u doing, but if u only need 1 result, u filter, order and limit 21:32 <+bridge> [ddnet] ```SELECT * 21:32 <+bridge> [ddnet] FROM table_name 21:32 <+bridge> [ddnet] ORDER BY id DESC 21:32 <+bridge> [ddnet] LIMIT 1``` 21:35 <+bridge> [ddnet] k done I guess 21:36 <+bridge> [ddnet] any C++ language expert here? 21:36 <+bridge> [ddnet] why does `std::atomic_int i = 0;` not compile? 21:36 <+bridge> [ddnet] "use of deleted function 'std::atomic::atomic(const std::atomic&)" 21:37 <+bridge> [ddnet] it seems to call the constructor implicitly, but why? 21:38 <+bridge> [ddnet] wish I was 21:41 <+bridge> [ddnet] std::atomic_int i = 0; As u notice function doesn't much 21:41 <+bridge> [ddnet] did u call it 21:41 <+bridge> [ddnet] @heinrich5991 It's not a member 21:42 <+bridge> [ddnet] atomic_int is not part of the function std 21:42 <+bridge> [ddnet] atomic_int is a type, not a function. it should exist: https://en.cppreference.com/w/cpp/atomic/atomic 21:43 <+bridge> [ddnet] ah i see 21:43 <+bridge> [ddnet] i think it's the compiler version 21:43 <+ChillerDragon> poor heinrich when u his level u can only answer but never get answered :D 21:44 <+bridge> [ddnet] xD wait hein 21:44 <+bridge> [ddnet] @heinrich5991 I found something 21:45 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803364839849197598/unknown.png 21:45 <+bridge> [ddnet] you don't need to hurry, I'm still interested in the answer tomorrow 😉 21:45 <+bridge> [ddnet] u call the functio nafter 21:45 <+bridge> [ddnet] u can't set value before 21:45 <+bridge> [ddnet] do it after 21:45 <+bridge> [ddnet] @heinrich5991 Was this helpful? 21:46 <+bridge> [ddnet] it's not helping me with my problem, but that is probably because I haven't told you the full situation 21:46 <+bridge> [ddnet] nope u did nt 21:47 <+bridge> [ddnet] I don't have a problem getting something past the compiler, `std::atomic_int i = {0};` or `std::atomic_int i{0};` both seem to work 21:47 <+bridge> [ddnet] yes 21:47 <+bridge> [ddnet] I'm more specifically interested in why `std::atomic_int i = 0;` fails to compile 21:47 <+bridge> [ddnet] works fine for me 21:47 <+bridge> [ddnet] it seems like the most natural way to write this, and the `=` operator is overloaded for `int` 21:47 <+bridge> [ddnet] @Jupstar ✪ compiler version? 21:47 <+bridge> [ddnet] clang 12 21:48 <+bridge> [ddnet] std++20 21:48 <+bridge> [ddnet] i think it's value needs to be measured or must be stored using {} because it's a retarded function 21:48 <+bridge> [ddnet] 🤡 21:48 <+bridge> [ddnet] no gnu extensions 21:48 <+bridge> [ddnet] @heinrich5991 /usr/include/c++/6/atomic:620:17: note: after user-defined conversion: constexpr std::atomic::atomic(std::atomic::__integral_type) 21:48 <+bridge> [ddnet] constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 21:48 <+bridge> [ddnet] Found your issue 21:48 <+bridge> [ddnet] apparently C++17 and higher accept this? 21:48 <+bridge> [ddnet] possibly 21:49 <+bridge> [ddnet] main.cpp:5:23: error: use of deleted function ‘std::atomic::atomic(const std::atomic&)’ 21:49 <+bridge> [ddnet] std::atomic_int foo = 0; 21:49 <+bridge> [ddnet] Well 21:49 <+bridge> [ddnet] i can't really give u a explanation here but it seems it's bein a bitch 21:49 <+bridge> [ddnet] ^^ 21:50 <+bridge> [ddnet] example of shit coding language xD 21:50 <+bridge> [ddnet] I am learning python anyway 21:50 <+bridge> [ddnet] only got basic knowlegde of c++ now 21:50 <+bridge> [ddnet] i dont see how it violates the std tho 21:50 <+bridge> [ddnet] since c++11 it allows non atomic types in = operator 21:51 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803366465209368606/unknown.png 21:51 <+bridge> [ddnet] segfaults 21:51 <+bridge> [ddnet] undefined behavior 21:51 <+bridge> [ddnet] so much annoying stuff 😄 21:52 <+bridge> [ddnet] true 21:52 <+bridge> [ddnet] debugging 21:52 <+bridge> [ddnet] sucks 21:53 <+bridge> [ddnet] Well heinrich u can work further now 21:53 <+bridge> [ddnet] @heinrich5991 does std::atomic_int i = int(0); work? 21:54 <+bridge> [ddnet] nope 21:54 <+bridge> [ddnet] ok very strange 21:54 <+bridge> [ddnet] it still tries to convert to `atomic_int` first 21:54 <+bridge> [ddnet] @Jupstar ✪ yes it does 21:54 <+bridge> [ddnet] it seems that deleted constructors still take part in overload resolution in <=C++14 21:54 <+bridge> [ddnet] hm 21:54 <+bridge> [ddnet] Show us the code 21:55 <+bridge> [ddnet] u do have the libs includes right 21:55 <+bridge> [ddnet] ```c++ 21:55 <+bridge> [ddnet] #include 21:55 <+bridge> [ddnet] std::atomic_int i = int(0); 21:55 <+bridge> [ddnet] int main() { 21:55 <+bridge> [ddnet] return 0; 21:55 <+bridge> [ddnet] } 21:55 <+bridge> [ddnet] ``` 21:56 <+bridge> [ddnet] ah as global var? 21:56 <+bridge> [ddnet] ``` 21:56 <+bridge> [ddnet] a.cpp:2:26: error: use of deleted function ‘std::atomic::atomic(const std::atomic&)’ 21:56 <+bridge> [ddnet] 2 | std::atomic_int i = int(0); 21:56 <+bridge> [ddnet] | ^ 21:56 <+bridge> [ddnet] In file included from a.cpp:1: 21:56 <+bridge> [ddnet] /usr/include/c++/10.2.0/atomic:759:7: note: declared here 21:56 <+bridge> [ddnet] 759 | atomic(const atomic&) = delete; 21:56 <+bridge> [ddnet] | ^~~~~~ 21:56 <+bridge> [ddnet] /usr/include/c++/10.2.0/atomic:763:17: note: after user-defined conversion: ‘constexpr std::atomic::atomic(std::atomic::__integral_type)’ 21:56 <+bridge> [ddnet] 763 | constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 21:56 <+bridge> [ddnet] | ^~~~~~ 21:56 <+bridge> [ddnet] ``` 21:56 <+bridge> [ddnet] gues it prefers some constexpr bcs of global constructors 21:56 <+bridge> [ddnet] also fails as a local var 21:57 <+bridge> [ddnet] oh ok 21:57 <+bridge> [ddnet] is that gcc? 21:57 <+bridge> [ddnet] yes 21:57 <+bridge> [ddnet] oh yeah breaks with c++11, even with clang 21:58 <+bridge> [ddnet] both g++ 10.2.0 and clang++ 11.0.1 fail this 21:58 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803368118638215258/unknown.png 21:58 <+bridge> [ddnet] @heinrich5991 Fixed 21:58 <+bridge> [ddnet] Remove int 21:58 <+bridge> [ddnet] ```#include 21:58 <+bridge> [ddnet] std::atomic_int i = int(0); 21:59 <+bridge> [ddnet] int main() { 21:59 <+bridge> [ddnet] return 0; 21:59 <+bridge> [ddnet] }``` 21:59 <+bridge> [ddnet] 21:59 <+bridge> [ddnet] ```#include // std::cout 21:59 <+bridge> [ddnet] #include // std::atomic, std::memory_order_relaxed 21:59 <+bridge> [ddnet] #include // std::thread 21:59 <+bridge> [ddnet] 21:59 <+bridge> [ddnet] std::atomic_int i = {0}; 21:59 <+bridge> [ddnet] 21:59 <+bridge> [ddnet] int main() { 21:59 <+bridge> [ddnet] std::cout << "yo Number: " << i; 21:59 <+bridge> [ddnet] return 0; 21:59 <+bridge> [ddnet] }``` 21:59 <+bridge> [ddnet] (yes, that code works) 21:59 <+bridge> [ddnet] Well 21:59 <+bridge> [ddnet] What did you expect 21:59 <+bridge> [ddnet] well u can also use the constructor directly 22:00 <+bridge> [ddnet] true 22:00 <+bridge> [ddnet] the question is why is it implictly converted 22:00 <+bridge> [ddnet] std::atomic_int i = {0}; it's already an int 22:00 <+bridge> [ddnet] so u are trying to int a int 22:00 <+bridge> [ddnet] well, I didn't expect any fix because I already said that I got it to work 😉 22:00 <+bridge> [ddnet] 🤡 22:00 <+bridge> [ddnet] I was wondering why it doesn't work with the statement above 22:00 <+bridge> [ddnet] ah 22:00 <+bridge> [ddnet] and the int thing was added because @Jupstar ✪ suggested trying it 22:00 <+bridge> [ddnet] Did i help you? 22:00 <+bridge> [ddnet] Did WE help you? 22:01 <+bridge> [ddnet] xD Well Can't give myself all the credit 22:01 <+bridge> [ddnet] you helped a little bit in that we discovered that it works with C++17 and up 22:02 <+bridge> [ddnet] but my original question is still unsolved (it's not about getting the code to work) 22:02 <+bridge> [ddnet] sorry 😦 22:02 <+bridge> [ddnet] ah np atleat it's workin 22:03 <+bridge> [ddnet] I watched an entire talk on this but I forgot the reason :/// 22:03 <+bridge> [ddnet] wait let me find it 22:03 <+bridge> [ddnet] Simply Fixes 22:04 <+bridge> [ddnet] okay, here a question where I'm interested in getting the code to compile 22:04 <+bridge> [ddnet] : 22:04 <+bridge> [ddnet] xD 22:04 <+bridge> [ddnet] u can't compile : 22:04 <+bridge> [ddnet] ```c++ 22:04 <+bridge> [ddnet] #include 22:04 <+bridge> [ddnet] void abc(int *ptr) { 22:04 <+bridge> [ddnet] delete ptr; 22:04 <+bridge> [ddnet] } 22:04 <+bridge> [ddnet] int main() { 22:04 <+bridge> [ddnet] std::unique_ptr p = std::unique_ptr(new int()); 22:04 <+bridge> [ddnet] return 0; 22:05 <+bridge> [ddnet] } 22:05 <+bridge> [ddnet] ``` 22:05 <+bridge> [ddnet] oh that u can 22:05 <+bridge> [ddnet] xD 22:05 <+bridge> [ddnet] I would paste the error, but it's literally 99 lines 22:05 <+bridge> [ddnet] /usr/include/c++/6/tuple:147:13: error: field ‘std::_Head_base<1ul, void(int*), false>::_M_head_impl’ invalidly declared function type 22:05 <+bridge> [ddnet] https://wiki.sei.cmu.edu/confluence/display/cplusplus/DCL53-CPP.+Do+not+write+syntactically+ambiguous+declarations?focusedCommentId=246939673 22:05 <+bridge> [ddnet] /usr/include/c++/6/bits/unique_ptr.h:171:14: error: no matching function for call to ‘std::tuple::tuple()’ 22:05 <+bridge> [ddnet] tho i'd have thought int(0) would have worked then 22:06 <+bridge> [ddnet] @Jupstar ✪ I don't think this is a problem with most vexing parse 22:06 <+bridge> [ddnet] @heinrich5991 It's because = is copy construction, atomic variables are not CopyConstructable 22:07 <+bridge> [ddnet] @Learath2 ah, is = in initialization special? 22:07 <+bridge> [ddnet] Yes 22:07 <+bridge> [ddnet] In C++ atleast 22:07 <+bridge> [ddnet] ah 22:07 <+bridge> [ddnet] ohh, i thought that was obv, but its not entirly deleted 22:07 <+bridge> [ddnet] but there's also a constructor that takes `int` 22:07 <+bridge> [ddnet] it allows int as type 22:07 <+bridge> [ddnet] Alright, ill find you tomorrow 22:07 <+bridge> [ddnet] i think its bcs 0 is a constructor call 22:08 <+bridge> [ddnet] bcs of the link above 22:08 <+bridge> [ddnet] = implies copy construction, I don't think it's allowed to "fall back" to another constructor 22:08 <+bridge> [ddnet] hm ok 22:08 <+bridge> [ddnet] got an idea about my other question? ^^ 22:09 <+bridge> [ddnet] https://en.cppreference.com/w/cpp/atomic/atomic/operator%3D 22:09 <+bridge> [ddnet] 22:09 <+bridge> [ddnet] why does should it not imply it 22:09 <+bridge> [ddnet] Looks a bit like a xy question 22:09 <+bridge> [ddnet] https://en.cppreference.com/w/cpp/atomic/atomic/operator%3D 22:09 <+bridge> [ddnet] 22:09 <+bridge> [ddnet] why should it not imply it 22:09 <+bridge> [ddnet] I want a function called when the unique_ptr goes out of scope 22:09 <+bridge> [ddnet] @Jupstar ✪ operator= is not used in initializations 22:10 <+bridge> [ddnet] so I don't have to manually manage that object I got from a library 22:10 <+bridge> [ddnet] that seemed like a perfect job for `std::unique_ptr`'s deleter 22:10 <+bridge> [ddnet] I watched another talk on this, let me dig it out 😄 22:10 <+bridge> [ddnet] @heinrich5991 Did u try #include 22:10 <+bridge> [ddnet] I watched a lot of cppcon the last month or so 22:11 <+bridge> [ddnet] tuple in cpp is strange sometimes 22:11 <+bridge> [ddnet] `#include ` does not help 22:11 <+bridge> [ddnet] (and I'd have been surprised if the headers do not work on their own) 22:11 <+bridge> [ddnet] (and I'd have been surprised if the headers did not work on their own) 22:12 <+bridge> [ddnet] @Learath2 how did you watch all the C++ talks? ^^ 22:12 <+bridge> [ddnet] I lose motivation when studying math, so instead of wasting the time completely watching stupid shit I watch cppcon or gdc talks 22:13 <+bridge> [ddnet] @heinrich5991 can you atleast paste the error somewhere so I can take a look? 22:13 <+bridge> [ddnet] don't have a compiler at hand 22:13 <+bridge> [ddnet] i remember doign smth like this wrapping sdl in smart pointers 22:13 <+bridge> [ddnet] std::unique_ptr _window_; 22:13 <+bridge> [ddnet] `std::unique_ptr _window_;` 22:14 <+bridge> [ddnet] an extra & required? 22:14 <+bridge> [ddnet] @Learath2 i accept that, but why does it not use the conversion constructor with int 22:14 <+bridge> [ddnet] isntead casts it to atomic first 22:14 <+bridge> [ddnet] in c++20 it does not 22:14 <+bridge> [ddnet] is it bcs of the noexcept? 22:14 <+bridge> [ddnet] no not the noexcept 22:14 <+bridge> [ddnet] I'll take a look one sec 22:15 <+bridge> [ddnet] Something about copy construction was relaxed in C++17 that I'm having trouble remembering 22:15 <+bridge> [ddnet] https://www.ideone.com/mNY1zm 22:16 <+bridge> [ddnet] oh god 22:16 <+bridge> [ddnet] https://paste.mozilla.org/GdODQ1Hd 22:16 <+bridge> [ddnet] cpp errors are so hard to figure out 22:16 <+bridge> [ddnet] clang++ error is a bit saner 22:17 <+bridge> [ddnet] idk even what im doing xd 22:17 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803372928334299146/unknown.png 22:17 <+bridge> [ddnet] Well I don't think your Deleter fits "DefaultConstructible" 22:17 <+bridge> [ddnet] Or "MoveConstructible" 22:17 <+bridge> [ddnet] @heinrich5991 Can u try std::unique_ptr::type> p(a); 22:17 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803373113978257408/unknown.png 22:18 <+bridge> [ddnet] Anyway you need a struct with a overload on () there 22:18 <+bridge> [ddnet] my vim shows saner errors 22:18 <+bridge> [ddnet] @heinrich5991 Can u try std::unique_ptr [ddnet] ouch 22:18 <+bridge> [ddnet] `Deleter must be FunctionObject or lvalue reference to a FunctionObject or lvalue reference to function, callable with an argument of type unique_ptr::pointer` 22:18 <+bridge> [ddnet] I made it compile 22:18 <+bridge> [ddnet] yeah 22:18 <+bridge> [ddnet] sdl_window is a struct 22:18 <+bridge> [ddnet] it's missing the deleter argument on unique_ptr 22:18 <+bridge> [ddnet] 😄 22:18 <+bridge> [ddnet] show code 22:18 <+bridge> [ddnet] xD 22:18 <+bridge> [ddnet] gj yho 22:19 <+bridge> [ddnet] plus a couple of & apparently 22:19 <+bridge> [ddnet] ```c++ 22:19 <+bridge> [ddnet] std::unique_ptr p = std::unique_ptr(new int(), abc); 22:19 <+bridge> [ddnet] ``` 22:19 <+bridge> [ddnet] @heinrich5991 Go code teeworlds mmo 22:19 <+bridge> [ddnet] ```c++ 22:19 <+bridge> [ddnet] std::unique_ptr p = std::unique_ptr(new int(), &abc); 22:19 <+bridge> [ddnet] ``` 22:19 <+bridge> [ddnet] 🤡 22:19 <+bridge> [ddnet] I maintain that that is still wrong 22:19 <+bridge> [ddnet] why though? 22:20 <+bridge> [ddnet] ah so my sdl code showed that 22:20 <+bridge> [ddnet] i just didnt know u needed abc after int too 22:20 <+bridge> [ddnet] xD 22:20 <+bridge> [ddnet] this is all dark magick to me 22:21 <+bridge> [ddnet] ah 22:21 <+bridge> [ddnet] ofc u need it 22:21 <+bridge> [ddnet] decltype(&abc) is not a FunctionObject, it's not an lvalue reference to one, I don't think it's an lvalue reference to a function 22:21 <+bridge> [ddnet] im blind 22:21 <+bridge> [ddnet] https://en.cppreference.com/w/cpp/memory/unique_ptr claims that Deleter must be a FunctionObject, and https://en.cppreference.com/w/cpp/named_req/FunctionObject says that All pointers to functions satisfy this requirement. 22:21 <+bridge> [ddnet] imagine having to import to print 22:21 <+bridge> [ddnet] thanks rust exists 22:22 <+bridge> [ddnet] why not have an IDE that imports it automatically 22:22 <+bridge> [ddnet] because that's probably NP hard for C++ or something 22:22 <+bridge> [ddnet] or even halting problem hard or so 22:23 <+bridge> [ddnet] :poggers: 22:23 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803374450489294908/unknown.png 22:23 <+bridge> [ddnet] next upo 22:23 <+bridge> [ddnet] what are u even doin xD 22:23 <+bridge> [ddnet] porting SDL to c++? 22:23 <+bridge> [ddnet] hackign the mainframe 22:24 <+bridge> [ddnet] throwing out mysqlcppconn 22:24 <+bridge> [ddnet] @Jupstar ✪ i just posting sdl cuz what heinrich wanted to do reminded me of this 22:24 <+bridge> [ddnet] which i once used 22:24 <+bridge> [ddnet] oh 22:24 <+bridge> [ddnet] @heinrich5991 abc and &abc are lvalue references to functions, decltype(&abc) doesn't feel like it to me, but I guess if the compiler likes it who am I to judge 22:24 <+bridge> [ddnet] another forgotten project 22:24 <+bridge> [ddnet] if the compiler likes it then its gods word 22:24 <+bridge> [ddnet] :pepeH: 22:25 <+bridge> [ddnet] "throwing out mysqlcppconn" 22:25 <+bridge> [ddnet] out of ddnet? 22:25 <+bridge> [ddnet] yes 22:25 <+bridge> [ddnet] u are making ur own mysql driver? 22:25 <+bridge> [ddnet] or at least trying 22:25 <+bridge> [ddnet] no 22:25 <+bridge> [ddnet] using the C API 22:25 <+bridge> [ddnet] ah 22:26 <+bridge> [ddnet] instead of that mysqlcppconn that nobody but us uses 22:26 <+bridge> [ddnet] xd 22:26 <+bridge> [ddnet] is the c lib small 22:26 <+bridge> [ddnet] it's smaller than the C plus the C++ lib 22:26 <+bridge> [ddnet] the C++ lib uses the C lib 22:29 <+bridge> [ddnet] AH I remember what was bothering me 22:29 <+bridge> [ddnet] Your Deleter is not default constructible, so you are not using the constructor I think you are using 22:29 <+bridge> [ddnet] Storing a pointer to the function on each instance of your unique pointer wasting space 22:30 <+bridge> [ddnet] Though since you are probably only using it once it doesn't matter here 22:30 <+bridge> [ddnet] the function type is unique, no? 22:30 <+bridge> [ddnet] I thought each function had its own type, that only decays to the function pointer 22:30 <+bridge> [ddnet] or is that lambdas? 22:31 <+bridge> [ddnet] anyway, I'm considering moving to a default-constructible class 22:31 <+bridge> [ddnet] will that not waste space? it'd depend on which class is laid out first, no? 22:31 <+bridge> [ddnet] each class has a minimum size of 1? 22:31 <+bridge> [ddnet] I think I saw some weird hackery that ensures that the first item of a tuple can consume no space, but does std::unique_ptr store the allocator as the first element of the tuple? 22:32 <+bridge> [ddnet] Any idea why vanilla is running smoother for me than ddnet? On intel igpu as well as nvidia gpu and on linux as well as windows 22:32 <+bridge> [ddnet] u have opengl 3.3? 22:32 <+bridge> [ddnet] Didn't make a difference 22:32 <+bridge> [ddnet] did you restart? 22:32 <+bridge> [ddnet] cl_refresh_rate 0 22:32 <+bridge> [ddnet] Yep :D 22:32 <+bridge> [ddnet] should make a huge difference 22:32 <+bridge> [ddnet] gfx_refresh_rate 0 22:32 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803376884301824010/unknown.png 22:33 <+bridge> [ddnet] i think this is for integrated gpus 22:33 <+bridge> [ddnet] maybe makes something 22:33 <+bridge> [ddnet] @timakro why always random shutdown (trashmap) 22:34 <+bridge> [ddnet] When? 22:34 <+bridge> [ddnet] all the time when i use it 22:34 <+bridge> [ddnet] im playing and random shutdown 22:35 <+bridge> [ddnet] Would be helpful if you could tell me the time so I could check the logs 22:35 <+bridge> [ddnet] 23.01 feuerfaust ace server 22:36 <+bridge> [ddnet] 1 time shutdown and 1 time connection problems and the server was down 22:36 <+bridge> [ddnet] @heinrich5991 https://ideone.com/tuP0po 22:36 <+bridge> [ddnet] here is what I meant 22:36 <+bridge> [ddnet] nice 🙂 22:36 <+bridge> [ddnet] I'm using p3 rn, so all is good 22:37 <+bridge> [ddnet] I thought functions had unique types though, but maybe that's just rust 22:37 <+bridge> [ddnet] Sorry, I can't really put it in standardese as it's iirc a consequence of a couple things at once 22:37 <+bridge> [ddnet] oh 22:37 <+bridge> [ddnet] it looks like that sdl thing too 22:37 <+bridge> [ddnet] funny 22:37 <+bridge> [ddnet] I know if you don't want to waste space you want to use a default-constructible class there 22:37 <+bridge> [ddnet] :monkalaugh: 22:38 <+bridge> [ddnet] if functions had unique types, they could be default-constructible 22:38 <+bridge> [ddnet] as their type already specifies which function it is 22:38 <+bridge> [ddnet] functions are not constructible at all to begin with iirc 22:38 <+bridge> [ddnet] ah 22:39 <+bridge> [ddnet] where is Patiga? 22:39 <+bridge> [ddnet] @Patiga 22:39 <+bridge> [ddnet] wth 22:39 <+bridge> [ddnet] i couldn't ping him rn 22:40 <+bridge> [ddnet] ok, nvm 22:40 <+bridge> [ddnet] sorry for disturbing, but are there any auto-generated documentation for twmap? 22:40 <+bridge> [ddnet] sorry for disturbing, but are there any auto-generated documentations for twmap? 22:42 <+bridge> [ddnet] @gerdoe if he publishes it yes 22:42 <+bridge> [ddnet] on docs.rs 22:42 <+bridge> [ddnet] you can always generate it on your own with cargo doc 22:42 <+bridge> [ddnet] i told him but he said its not rdy 22:43 <+bridge> [ddnet] okey, i guess going through the source will be better xd 22:43 <+bridge> [ddnet] just do cargo doc 22:44 <+bridge> [ddnet] if u have it as a dep cargo doc builds that doc too iirc 22:44 <+bridge> [ddnet] yes 22:44 <+bridge> [ddnet] thanks guys 😄 22:44 <+bridge> [ddnet] btw 22:44 <+bridge> [ddnet] if u use vim 22:44 <+bridge> [ddnet] i recommend to install rusty-man 22:44 <+bridge> [ddnet] and use this 22:45 <+bridge> [ddnet] ```vim 22:45 <+bridge> [ddnet] " Uses rusty-man and nvim emulated terminal to show docs 22:45 <+bridge> [ddnet] command! -nargs=* Rm belowright split | resize 15 | te rusty-man 22:45 <+bridge> [ddnet] ``` 22:45 <+bridge> [ddnet] :monkalaugh: 22:46 <+bridge> [ddnet] (u need to cargo doc first tho) 22:46 <+bridge> [ddnet] im done with vim xd, i don't know how to use it properly 22:46 <+bridge> [ddnet] my vim workflow with rust :poggers: 22:47 <+bridge> [ddnet] Btw about this, there is EBO so classes with no data members can be (and are by gcc, clang and msvc) optimized to 0 size 22:47 <+bridge> [ddnet] :greenthing: 22:47 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803380500927348766/unknown.png 22:47 <+bridge> [ddnet] nothing changed since your last twitch stream 22:48 <+bridge> [ddnet] ah now that i placed the license i could actually publish o.o 22:48 <+bridge> [ddnet] :pepeH: 22:48 <+bridge> [ddnet] though there will def be some breaking changes soon 22:48 <+bridge> [ddnet] ill switch to ayu theme for vim soon 22:48 <+bridge> [ddnet] if there is just swap 0.x to 0.y 22:49 <+bridge> [ddnet] u can even release prerelease versions 22:49 <+bridge> [ddnet] just notice us where are they :D 22:49 <+bridge> [ddnet] 0.1.0-alpha.0 22:50 <+bridge> [ddnet] actually my hover is more than enough 22:50 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803381268775436298/unknown.png 22:50 <+bridge> [ddnet] any update oni this or more info? 22:52 <+bridge> [ddnet] tsFreddie's textrender refactor/improving was also in ddnet codebase, yep? 22:52 <+bridge> [ddnet] @Cøke You found a bug that's there since the upgrade to Python 3 on Dec 27 2019 22:52 <+bridge> [ddnet] no 22:53 <+bridge> [ddnet] Funny that this problem persisted for over a year and nobody told me 22:53 <+bridge> [ddnet] ddnet has a different text renderer 22:53 <+bridge> [ddnet] so 22:53 <+bridge> [ddnet] so it should be even better with GL 3.3 22:53 <+bridge> [ddnet] gl 3.3 makes a rather large difference, it not making any gives me concern 22:54 <+bridge> [ddnet] maybe it's failing to initialize a gl 3.3 context at all? 22:54 <+bridge> [ddnet] but even with old GL it should be around as fast as vanilla 22:54 <+bridge> [ddnet] definitely 22:55 <+bridge> [ddnet] I'd suggest trying with clean settings just to make sure 22:56 <+bridge> [ddnet] @timakro and that means? 22:56 <+bridge> [ddnet] @Cøke It's fixed now 22:57 <+bridge> [ddnet] 👍 22:59 <+bridge> [ddnet] i also wrote a different packing algorithm a month ago, but im not sure if it packs worse or around as good as our current impl 22:59 <+bridge> [ddnet] https://github.com/Jupeyy/ddnet/tree/pr_simpler_text_algo 22:59 <+bridge> [ddnet] so i didnt pr it 23:00 <+bridge> [ddnet] Is there a fps graph? 23:00 <+bridge> [ddnet] strg shift d in debug mode 23:00 <+bridge> [ddnet] strg shift g in debug mode 23:00 <+bridge> [ddnet] *g 23:12 <+bridge> [ddnet] @gerdoe @Ryozuki the crate is now on crates.io https://crates.io/crates/twmap 23:13 <+bridge> [ddnet] nice u used teeworlds and ddnet keyword 23:13 <+bridge> [ddnet] :poggers: 23:13 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803387103416287292/unknown.png 23:13 <+bridge> [ddnet] https://docs.rs/twmap/0.1.0/twmap/ 23:14 <+bridge> [ddnet] @Patiga /// to document in rust btw 23:14 <+bridge> [ddnet] it would be cool if u added documentation = "https://docs.rs/twmap" and repository = "repo" 23:15 <+bridge> [ddnet] so crates.rs links to it 23:16 <+bridge> [ddnet] also, if uwant a module level doc u use //! 23:16 <+bridge> [ddnet] at the top 23:16 <+bridge> [ddnet] the documentation link already exists for me 23:16 <+bridge> [ddnet] so if u add the readme content with //! on ur file it will show up in the docs 23:16 <+bridge> [ddnet] 23:17 <+bridge> [ddnet] oh it appeared now 23:17 <+bridge> [ddnet] no repo tho 23:17 <+bridge> [ddnet] yea, gonna add 👍 23:17 <+bridge> [ddnet] :poggers: 23:17 <+bridge> [ddnet] add #![deny(missing_docs)] 23:17 <+bridge> [ddnet] if u want to 100% document ur crate 23:18 <+bridge> [ddnet] `#![forbid(unsafe_code)] ` is nice too 23:19 <+bridge> [ddnet] oh they updated the dark theme on github 23:20 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803388729913770024/unknown.png 23:20 <+bridge> [ddnet] more contrast 23:21 <+bridge> [ddnet] my crate uses unsafe ^^ 23:21 <+bridge> [ddnet] @Patiga also i recommend running cargo clippy 23:21 <+bridge> [ddnet] it may help improve code 23:21 <+bridge> [ddnet] :monkalaugh: 23:21 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803389156276568064/unknown.png 23:21 <+bridge> [ddnet] does twmap use libtw2? 23:22 <+bridge> [ddnet] clippy :poggers: 23:22 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803389325907722272/unknown.png 23:23 <+bridge> [ddnet] hm, I find the + 1 clearer 23:23 <+bridge> [ddnet] @heinrich5991 oh the thing u always tell me about 23:23 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803389513089941524/unknown.png 23:25 <+bridge> [ddnet] i never heard about this macro 23:25 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803390023198179338/unknown.png 23:25 <+bridge> [ddnet] cool to know 23:25 <+bridge> [ddnet] it's kinda new 23:25 <+bridge> [ddnet] it used to be in a crate 23:25 <+bridge> [ddnet] 👀 23:25 <+bridge> [ddnet] 1.42.0 23:26 <+bridge> [ddnet] we at 1.49 23:26 <+bridge> [ddnet] how old is 42? 23:26 <+bridge> [ddnet] not old enough for debian 23:26 <+bridge> [ddnet] xd 23:26 <+bridge> [ddnet] debian stable has 1.41.1 23:26 <+bridge> [ddnet] well debian soon releases new 23:27 <+bridge> [ddnet] also i always use rustup 23:27 <+bridge> [ddnet] instead of pkg manager 23:27 <+bridge> [ddnet] idk if its a thing other ppl do 23:27 <+bridge> [ddnet] I think it's good if code compiles without you adding some language-specific stuff 23:28 <+bridge> [ddnet] @heinrich5991 can u add the matches dep for older rust versions and use native macro on new? 23:28 <+bridge> [ddnet] you could, yes 23:28 <+bridge> [ddnet] but that's annoying 23:28 <+bridge> [ddnet] ye 23:28 <+bridge> [ddnet] https://crates.io/crates/matches 23:28 <+bridge> [ddnet] here, zero dependencies 23:31 <+bridge> [ddnet] 👀 23:31 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803391640315494440/unknown.png 23:33 <+bridge> [ddnet] @Patiga possible bug 23:33 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803392092105605160/unknown.png 23:33 <+bridge> [ddnet] or maybe not 23:33 <+bridge> [ddnet] xd 23:33 <+bridge> [ddnet] ye 23:34 <+bridge> [ddnet] ye to not or to yes 23:34 <+bridge> [ddnet] hmm 23:34 <+bridge> [ddnet] it doesn't look like a bug 23:34 <+bridge> [ddnet] because there is a filter before the map 23:34 <+bridge> [ddnet] i wouldnt use a print on a library crate btw 23:34 <+bridge> [ddnet] add the log crate and use log 23:34 <+bridge> [ddnet] thats a binary 23:34 <+bridge> [ddnet] oh 23:34 <+bridge> [ddnet] true 23:35 <+bridge> [ddnet] :monkaS: sry 23:36 <+bridge> [ddnet] nothing feels better than a happy clippy :monkalaugh: 23:36 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803392877736099910/unknown.png 23:38 <+bridge> [ddnet] In posix shell I want to filter out the lines which begin with a specific string but that string is variable. The problem with `| grep "^$str"` is that there could be special characters in `$str` which would be interpreted as a regex. Any shell pro here can help me? 23:40 <+bridge> [ddnet] why "clippy" 23:40 <+bridge> [ddnet] is it random? 23:40 <+bridge> [ddnet] clippy like the ms office assistant 23:40 <+bridge> [ddnet] ah i see 23:40 <+bridge> [ddnet] u mean the name? 23:40 <+bridge> [ddnet] ah ye 23:40 <+bridge> [ddnet] https://en.wikipedia.org/wiki/Clippy 23:40 <+bridge> [ddnet] classic 23:42 <+bridge> [ddnet] He gave me nightmares 23:44 <+bridge> [ddnet] The microsoft dog was cool 23:44 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/803394898589253653/rover.jfif 23:46 <+bridge> [ddnet] rover