00:45 <+bridge> [ddnet] it does crash when someone attempts to join the server. 00:45 <+bridge> [ddnet] after the map download 03:41 <+bridge> [ddnet] https://githubcopilotlitigation.com/ 03:41 <+bridge> [ddnet] xd 04:55 <+bridge> [ddnet] Run Linux DDNet-Server binary from website, join server, change map to the one I sent, server crashes. Nothing fishy in the terminal log except "Segmentation Fault" 04:55 <+bridge> [ddnet] 04:55 <+bridge> [ddnet] That is a 100% way to reproduce the bug. 04:55 <+bridge> [ddnet] 04:55 <+bridge> [ddnet] We also managed to crash the server randomly just by playing a bunch on other maps. 04:55 <+bridge> [ddnet] 04:55 <+bridge> [ddnet] Building from the source fixes the issue, at least on anyone's machine except @deen :santatrollet: 04:57 <+bridge> [ddnet] Don't miss your chance to be rich 04:57 <+bridge> [ddnet] 04:57 <+bridge> [ddnet] โœŒ๏ธ๐Ÿ‘๐Ÿ™DiscJockey is my name and I'm an admin with my own store link and group link https://t.me/+_kTifpKvc-kwNDJk 04:57 <+bridge> [ddnet] 04:57 <+bridge> [ddnet] This is my group link, you can check and prove my legal work there. 04:57 <+bridge> [ddnet] 04:57 <+bridge> [ddnet] ๐Ÿ™UPDATE My Services\: Sell PayPal account verified โ€“ PayPal transfer \*Sell Bank Transfer โ€“ Bank Login \*Sell Clone card - Secure shipping tunnel \*cc Fullz sell and random Information โ€“ 99% valid cards \*Sell Dumps with pin track 1 and 2 101 201 \*Sell Western Union money transfer services \*Sell Gift Cards Itune โ€“ Amazon โ€“ Ebay Clone/Credit Cards \*Sell Booking airfare services โ€“ worldwide \*Sell e-carding services \*SMTP 04:57 <+bridge> [ddnet] 04:57 <+bridge> [ddnet] TRANSFER SERVICE 04:57 <+bridge> [ddnet] 04:57 <+bridge> [ddnet] BTC/USDT/CASHAPP 04:57 <+bridge> [ddnet] 04:57 <+bridge> [ddnet] TN PRAYER PAYMENT 04:57 <+bridge> [ddnet] 04:57 <+bridge> [ddnet] PRAYER TO ARIZONA 04:57 <+bridge> [ddnet] 04:57 <+bridge> [ddnet] What MASS UI DUA has 04:57 <+bridge> [ddnet] 04:57 <+bridge> [ddnet] EDD RELOAD 04:57 <+bridge> [ddnet] 04:57 <+bridge> [ddnet] ALL GOVERNMENT PRAYER PAYMENTS 04:57 <+bridge> [ddnet] 04:57 <+bridge> [ddnet] METHOD IS AVAILABLE!! 04:57 <+bridge> [ddnet] 04:58 <+bridge> [ddnet] FULLZ 04:58 <+bridge> [ddnet] 04:58 <+bridge> [ddnet] PAYPAL 04:58 <+bridge> [ddnet] 04:58 <+bridge> [ddnet] CASH APPLICATION 04:58 <+bridge> [ddnet] 04:58 <+bridge> [ddnet] CASTINGS+PINS 05:22 <+bridge> [ddnet] suggestion, add an icon at the edge of the hud that indicates if your team is locked or not 08:21 <+ChillerDragon> Yea that sounds nice 08:22 <+ChillerDragon> also lock icons can be really obvious to understand :) 08:30 <+bridge> [ddnet] https://www.youtube.com/watch?v=Vhh_GeBPOhs 08:30 <+bridge> [ddnet] good morning 09:52 <+bridge> [ddnet] built in a debian 10 chroot 10:15 <+bridge> [ddnet] Thanks, I can repro the crash 10:18 <+bridge> [ddnet] :feelsbadman: 10:18 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1039831433298063410/unknown.png 10:49 <+ChillerDragon> F 10:50 <+ChillerDragon> wait I can not reproduce how do I get git some? :( 10:51 <+ChillerDragon> Would be hilarious if it worked 11:27 <+bridge> [ddnet] https://github.com/GROSSWEBER/git-some 11:27 <+bridge> [ddnet] This one maybe 11:29 <+bridge> [ddnet] <๐™บ๐šž๐š›๐š˜๐šœ๐š’๐š˜> You about "ui_close_window_after_changing_setting"? 11:34 <+bridge> [ddnet] <๐™บ๐šž๐š›๐š˜๐šœ๐š’๐š˜> It would be really convenient if for example there was some kind of flag from server-side 11:41 <+bridge> [ddnet] Issue transfered to , as @Ryozuki commented maybe finally implementing server custom menu will be solution, but not sure how that will work and probably a lot of new graphics will be needed, to fold/unfold and maybe even drag this menu 11:43 <+bridge> [ddnet] <๐™บ๐šž๐š›๐š˜๐šœ๐š’๐š˜> I already did that xd 11:44 <+bridge> [ddnet] I remember, but that was on 0.7 and ddnet guys are kinda sceptical, i think :justatest: 11:46 <+bridge> [ddnet] <๐™บ๐šž๐š›๐š˜๐šœ๐š’๐š˜> I think you right 11:49 <+bridge> [ddnet] It doesnt need more graphics than what we have currently 11:50 <+bridge> [ddnet] <๐™บ๐šž๐š›๐š˜๐šœ๐š’๐š˜> 2021 06 xd 11:50 <+bridge> [ddnet] <๐™บ๐šž๐š›๐š˜๐šœ๐š’๐š˜> https://cdn.discordapp.com/attachments/293493549758939136/1039854361108561940/bandicam_2021-06-06_23-25-22-789-1.mp4 11:50 <+bridge> [ddnet] That looks good 11:50 <+bridge> [ddnet] I dislike the fade out tho 11:57 <+bridge> [ddnet] <๐™บ๐šž๐š›๐š˜๐šœ๐š’๐š˜> It requires no libraries, has window action flags, and registers an inverse function, interconnected by a tree 11:57 <+bridge> [ddnet] <๐™บ๐šž๐š›๐š˜๐šœ๐š’๐š˜> For example if you kill a menu, all submenus will be closed 11:59 <+bridge> [ddnet] <๐™บ๐šž๐š›๐š˜๐šœ๐š’๐š˜> It no libraries needed, has window action flags, and registers an inverse function, interconnected by a tree 11:59 <+bridge> [ddnet] <๐™บ๐šž๐š›๐š˜๐šœ๐š’๐š˜> For example if you kill a menu, all submenus will be closed 12:00 <+bridge> [ddnet] <๐™บ๐šž๐š›๐š˜๐šœ๐š’๐š˜> No libraries needed 12:00 <+bridge> [ddnet] Yeah sounds good 12:00 <+bridge> [ddnet] <๐™บ๐šž๐š›๐š˜๐šœ๐š’๐š˜> https://cdn.discordapp.com/attachments/293493549758939136/1039857028346163291/unknown-2.png 12:05 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1039858362235490344/output.png 12:28 <+bridge> [ddnet] It's a little sad that other mods are statistically insignificant 12:58 <+bridge> [ddnet] :2982pepecry: 12:59 <+bridge> [ddnet] It'd be great for the health of the game if we had more mod players 13:00 <+bridge> [ddnet] It is really difficult to make a mod idea that stays interesting for players so they keep returning 13:06 <+bridge> [ddnet] So I made a nightly build with symbols and can't reproduce it anymore :/ 13:06 <+bridge> [ddnet] Heisenbug pog 13:06 <+bridge> [ddnet] or it's fixed in nightly maybe 13:08 <+bridge> [ddnet] nope, just happens without symbols, but still fails on nightly without symbols 13:16 <+bridge> [ddnet] Asan is clean too 13:28 <+bridge> [ddnet] Skill Issue 13:35 <+bridge> [ddnet] @deen it crashes exactly when a client is connected 13:35 <+bridge> [ddnet] You can start the server with that map exactly 13:35 <+bridge> [ddnet] And it'll only crash once a player connects 13:41 <+bridge> [ddnet] Well, still doesn't help me with figuring out the reason 13:51 <+bridge> [ddnet] @Moderator I'm playing steam, don't ban me 13:53 <+bridge> [ddnet] @Moderator I'm playing steam, don't ban me 13:54 <+bridge> [ddnet] i had 2 maps on my old pc 13:55 <+bridge> [ddnet] one crashed server 13:55 <+bridge> [ddnet] second every player that connected 13:55 <+bridge> [ddnet] kekw 14:10 <+bridge> [ddnet] `Updating crates.io index` is this gonna happen every time when i clean build or it is downloaded somewhere in home directory? took like 2 mins 14:11 <+bridge> [ddnet] I'm not getting that when building from scratch 14:11 <+bridge> [ddnet] all I get is the expected components in Rust being rebuilt: 14:11 <+bridge> [ddnet] ``` 14:11 <+bridge> [ddnet] Compiling ddnet-engine-shared v0.0.1 (/Users/deen/git/ddnet/src/engine/shared) 14:11 <+bridge> [ddnet] Compiling ddnet-test v0.0.1 (/Users/deen/git/ddnet/src/rust-bridge/test) 14:11 <+bridge> [ddnet] Compiling ddnet-base v0.0.1 (/Users/deen/git/ddnet/src/base) 14:12 <+bridge> [ddnet] Compiling ddnet-engine v0.0.1 (/Users/deen/git/ddnet/src/engine) 14:12 <+bridge> [ddnet] Finished release [optimized] target(s) in 0.67s 14:12 <+bridge> [ddnet] ``` 14:13 <+bridge> [ddnet] yeah ig it is on the home folder, i am not getting it anymore. i just installed rust first time so 14:16 <+bridge> [ddnet] those go into ~/.cargo 14:26 <+bridge> [ddnet] The first index update is quite big 14:30 <+bridge> [ddnet] I think they're working on sparse registries which would make the updates small 14:32 <+bridge> [ddnet] @Ryozuki do you know how I can execute rust-analyzer without setting it up in some IDE? 14:32 <+bridge> [ddnet] Consultations with all those who benefited from the platform that I shared yesterday. Believe it or leave it! 14:32 <+bridge> [ddnet] 14:32 <+bridge> [ddnet] Registration Fee\: $0.00 14:32 <+bridge> [ddnet] 14:32 <+bridge> [ddnet] Daily Win\: $2,000 14:32 <+bridge> [ddnet] 14:32 <+bridge> [ddnet] Weekly Earning\: $20,000 14:32 <+bridge> [ddnet] 14:32 <+bridge> [ddnet] Monthly profit\: $80,000. 14:32 <+bridge> [ddnet] 14:32 <+bridge> [ddnet] unrecycled money 14:32 <+bridge> [ddnet] 14:32 <+bridge> [ddnet] ask me how ๐Ÿ‘‡๐Ÿ‘‡ 14:32 <+bridge> [ddnet] 14:32 <+bridge> [ddnet] http://t.me/Stevecoldham001 14:32 <+bridge> [ddnet] I guess call the binary and give it the path to the dir with cargo toml 14:33 <+bridge> [ddnet] Note that rustup doesnt add it to path 14:33 <+bridge> [ddnet] There is a command to find where its located 14:33 <+bridge> [ddnet] I dont remember 14:34 <+bridge> [ddnet] found it 14:34 <+bridge> [ddnet] `~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rust-analyzer` 14:34 <+bridge> [ddnet] Does cargo rust-analyzer work? 14:39 <+bridge> [ddnet] no 14:39 <+bridge> [ddnet] I don't manage to reproduce the error without an IDE 14:39 <+bridge> [ddnet] I guess I have to set up one 14:42 <+bridge> [ddnet] I use neovim 14:43 <+bridge> [ddnet] @heinrich5991 the logs may not show to stdout 14:43 <+bridge> [ddnet] Maybe they are on a file 14:44 <+bridge> [ddnet] RA_LOG=info 14:45 <+bridge> [ddnet] If rust-analyzer outright crashes, try running rust-analyzer analysis-stats /path/to/project/directory/ on the command line. This command type checks the whole project in batch mode bypassing LSP machinery. 14:45 <+bridge> [ddnet] @heinrich5991 14:49 <+bridge> [ddnet] ah 14:49 <+bridge> [ddnet] it doesn't crash though, it completes 14:49 <+bridge> [ddnet] AFAICT 14:50 <+bridge> [ddnet] I think the program itself doesnt crash 14:50 <+bridge> [ddnet] It reports that it fails to check cuz the build script 14:50 <+bridge> [ddnet] Panics 14:54 <+bridge> [ddnet] "failed to run build scripts Check the server logs for additional information" 14:54 <+bridge> [ddnet] do you know where those are? @Ryozuki 14:56 <+bridge> [ddnet] Doesnt it say where? 14:57 <+bridge> [ddnet] I forgot rn 14:57 <+bridge> [ddnet] Not at a pc currently 15:05 <+bridge> [ddnet] I found it in the output console within vscode 15:10 <+bridge> [ddnet] @Ryozuki does this help with your problem? https://github.com/ddnet/ddnet/pull/6025 15:11 <+bridge> [ddnet] @heinrich5991 where did you find the env var? I did google around a bit for it but couldn't find it 15:12 <+bridge> [ddnet] I googled around and didn't find anything but some other weird hack 15:12 <+bridge> [ddnet] so I just took a look at the environment I get 15:12 <+bridge> [ddnet] Yeah I was thinking that too ๐Ÿ˜„ 15:12 <+bridge> [ddnet] then checked the source code of rust-analyzer for that variable, to see if it's reliable 15:21 <+bridge> [ddnet] trying now 15:32 <+bridge> [ddnet] fixed: https://github.com/ddnet/ddnet/pull/6024 15:34 <+bridge> [ddnet] How does that even happen? Why is FindEntities even returning >0 here? 15:35 <+bridge> [ddnet] Works 15:38 <+bridge> [ddnet] Player just joined, but character isn't initialized properly yet? 15:40 <+bridge> [ddnet] Hm, no laptop with me so I can't check but Players don't really have a position, nor is CGameWorld even aware of them iirc 15:41 <+bridge> [ddnet] I mean if it fixes the issue it fixes the issue. Just wanted to make sure we aren't masking a deeper issue 15:42 <+bridge> [ddnet] Hm, it's really weird indeed 15:42 <+bridge> [ddnet] We dereference the character in FindEntities as well and there it doesn't fail 15:43 <+bridge> [ddnet] the only thing I can imagine is that the entity has ENTTYPE_CHARACTER type, but is still not a CCharacter 15:44 <+bridge> [ddnet] Do we dereference as a CCharacter there? Maybe some undefined behaviour? 15:44 <+bridge> [ddnet] there we use it as CEntity only 15:44 <+bridge> [ddnet] ubsan should catch that though, hm 15:59 <+bridge> [ddnet] UB 16:20 <+bridge> [ddnet] Learning cxx rust 16:20 <+bridge> [ddnet] Hope i can add some rust stuff 16:20 <+bridge> [ddnet] https://cxx.rs/tutorial.html 18:15 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1039951353558077532/RDT_20221109_1815136032607740328601072.jpg 18:16 <+bridge> [ddnet] lmaooo 18:18 <+bridge> [ddnet] I realize it's only a joke. sleep() doesn't guarantee accurate sleep times, this function might easily return `num1 + num2 - 1` 18:19 <+bridge> [ddnet] `sleep(abs(num1) 18:19 <+bridge> [ddnet] sleep(abs(num2)` 18:22 <+bridge> [ddnet] considering how slow python is i could imagine they have code paths like these 18:24 <+bridge> [ddnet] :justatest: 18:43 <+bridge> [ddnet] num1 + num2 :justatest: 18:43 <+bridge> [ddnet] omg so slow 19:20 <+bridge> [ddnet] gg 19:20 <+bridge> [ddnet] Got a new job 19:20 <+bridge> [ddnet] My pay augmented by 8kโ‚ฌ 19:20 <+bridge> [ddnet] 19:21 <+bridge> [ddnet] After 4 interviews 19:23 <+bridge> [ddnet] Rust,erlang,elixir,julia 19:23 <+bridge> [ddnet] Some langs they use 19:24 <+bridge> [ddnet] :monkaS: 19:24 <+bridge> [ddnet] (yearly) 19:24 <+bridge> [ddnet] oh 19:24 <+bridge> [ddnet] thats... 19:24 <+bridge> [ddnet] nice 19:24 <+bridge> [ddnet] \:) 19:24 <+bridge> [ddnet] I mean im above average on spain rn ngl 19:25 <+bridge> [ddnet] where are you working? what are you doing there? what do you make? 19:25 <+bridge> [ddnet] just trying to figure out whether it's something I'd also like to do 19:25 <+bridge> [ddnet] in ukraine average salary is ~320$/mo :kek: 19:25 <+bridge> [ddnet] They focus a lot on distributed systems 19:26 <+bridge> [ddnet] you know erlang and elixir? ๐Ÿ˜ฎ 19:26 <+bridge> [ddnet] And virtual machines like java 19:26 <+bridge> [ddnet] I dont 19:26 <+bridge> [ddnet] ah, I misread 19:26 <+bridge> [ddnet] cool 19:26 <+bridge> [ddnet] Its what they use 19:26 <+bridge> [ddnet] Anyway i can free myself from nodejs stuff now 19:26 <+bridge> [ddnet] Full rust 19:27 <+bridge> [ddnet] cool 19:27 <+bridge> [ddnet] per month or per year? ๐Ÿ˜„ 19:27 <+bridge> [ddnet] Per year ye 19:27 <+bridge> [ddnet] If i got 8k per month i would be super upper class 19:27 <+bridge> [ddnet] :BASED: 19:28 <+bridge> [ddnet] and what are you doing there? 19:28 <+bridge> [ddnet] I dont wanna dox myself xd 19:29 <+bridge> [ddnet] Anyway happy day 19:29 <+bridge> [ddnet] okay ๐Ÿ™‚ 19:29 <+bridge> [ddnet] You are studying still right? 19:30 <+bridge> [ddnet] yes 19:30 <+bridge> [ddnet] Im sure u will get a good job 19:30 <+bridge> [ddnet] Ur rly good 19:30 <+bridge> [ddnet] although I'll probably finish at some point ^^ 19:30 <+bridge> [ddnet] thank you 19:30 <+bridge> [ddnet] One thing is its easy to get comfy on a boring job thats routine 19:31 <+bridge> [ddnet] But well im young so i wanted to change and risk a bit more 19:31 <+bridge> [ddnet] you never finish studying 19:31 <+bridge> [ddnet] yeah 19:31 <+bridge> [ddnet] every day you learn something new 19:31 <+bridge> [ddnet] maybe one will finish university though ๐Ÿ˜‰ 19:31 <+bridge> [ddnet] I think this dev chat makes a bubble 19:32 <+bridge> [ddnet] The level here is above average by a lot 19:32 <+bridge> [ddnet] Rust bubble? ๐Ÿ˜„ 19:32 <+bridge> [ddnet] Nah xd 19:32 <+bridge> [ddnet] Well too 19:32 <+bridge> [ddnet] All hail rust 19:32 <+bridge> [ddnet] :monkalaugh: 19:32 <+bridge> [ddnet] So one might think they dont know much 19:33 <+bridge> [ddnet] Thanks for coming to my ted talk 19:33 <+bridge> [ddnet] Im still amazed that ddnet is what got me most into programming 19:33 <+bridge> [ddnet] And here i am, working on it now 19:33 <+bridge> [ddnet] 19:37 <+bridge> [ddnet] @Ryozuki local company in Barcelona? How are the notice periods in Spain usually? No one wanted to hire me when I had 6 months notice period ๐Ÿ˜„ 19:37 <+bridge> [ddnet] and congrats 19:38 <+bridge> [ddnet] how long is your notice period now? @deen 19:38 <+bridge> [ddnet] 15 day period 19:40 <+bridge> [ddnet] 1 month, but it's a US company so kind of expected to be the legal minimum here 19:41 <+bridge> [ddnet] all chats are a bubble, a non representative group of any larger group 19:42 <+bridge> [ddnet] i guess xd 19:42 <+bridge> [ddnet] for instance, no chat has people with no internet access 19:49 <+bridge> [ddnet] 31% monthly net pay increase 19:49 <+bridge> [ddnet] Not bad 20:11 <+bridge> [ddnet] is noalias tag standard? 20:11 <+bridge> [ddnet] https://en.cppreference.com/w/c/language/restrict 20:11 <+bridge> [ddnet] restrict 20:11 <+bridge> [ddnet] its called 20:12 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1039980862743265310/image.png 20:12 <+bridge> [ddnet] this is what a &mut is in rust more or less iirc 20:13 <+bridge> [ddnet] this can enable some optimizatiosn 20:14 <+bridge> [ddnet] maybe we can use it 20:14 <+bridge> [ddnet] but its hard to use cuz UB 20:15 <+bridge> [ddnet] oh wait 20:15 <+bridge> [ddnet] is this a C only thing? 20:15 <+bridge> [ddnet] not C++? xd 20:15 <+bridge> [ddnet] it works in c++ with gcc and double underscore: `__restrict__` 20:16 <+bridge> [ddnet] so it might be non standard 20:16 <+bridge> [ddnet] in c++ 20:16 <+bridge> [ddnet] > 20:16 <+bridge> [ddnet] > restrict is a c99 keyword. Yes, Rpbert S. Barnes, I know that most compilers support __restrict__. You will note that anything with double underscores is, by definition, implementation specific and thus NOT C++, but a compiler specific version of it. โ€“ 20:17 <+bridge> [ddnet] > KitsuneYMG 20:17 <+bridge> [ddnet] > Jan 6, 2010 at 9:31 20:17 <+bridge> [ddnet] > 20:17 <+bridge> [ddnet] > restrict is a c99 keyword. Yes, Rpbert S. Barnes, I know that most compilers support `__restrict__`. You will note that anything with double underscores is, by definition, implementation specific and thus NOT C++, but a compiler specific version of it. โ€“ 20:17 <+bridge> [ddnet] > KitsuneYMG 20:17 <+bridge> [ddnet] > Jan 6, 2010 at 9:31 20:20 <+bridge> [ddnet] Debugging with an optimized binary and LTO is such pain 20:27 <+bridge> [ddnet] depends 20:27 <+bridge> [ddnet] do we have another UB in our code? 20:30 <+bridge> [ddnet] the answer is probs yes 20:30 <+bridge> [ddnet] its c++ 20:30 <+bridge> [ddnet] ub can exist and be mostly harmless iirc 20:31 <+bridge> [ddnet] enabling lto on a rust project made the runtime go from 70s to 58s 20:31 <+bridge> [ddnet] poggers 20:31 <+bridge> [ddnet] thinlto 60s 20:31 <+bridge> [ddnet] within noise probs 20:41 <+bridge> [ddnet] i once had a compiler bug in gcc with lto 20:41 <+bridge> [ddnet] so not impossible its a compiler bug, better always also test with clang 20:50 <+bridge> [ddnet] why does C++ not have that "restrict" feature? 20:50 <+bridge> [ddnet] Yeah, weird. I wanted to use that too 20:51 <+bridge> [ddnet] two alternatives: 20:51 <+bridge> [ddnet] 1. make FindEntities be a template method so no cast 20:51 <+bridge> [ddnet] 2. Always keep apPlayersInRange as CEntity** 20:51 <+bridge> [ddnet] The second one works 20:51 <+bridge> [ddnet] haven't tried first yet 20:53 <+bridge> [ddnet] zero-length arrays and unions seem like weird hacks to work around this, don't like them 21:01 <+bridge> [ddnet] ``` 21:01 <+bridge> [ddnet] [build] mimalloc: warning: thread 0x7f725bc006c0: unable to allocate aligned OS memory directly, fall back to over-allocation (67108864 bytes, address: 0x7f7257000000, alignment: 67108864, commit: 0) 21:01 <+bridge> [ddnet] [build] mimalloc: warning: thread 0x7f725bc006c0: mi_usable_size: pointer might not point to a valid heap region: 0x7f7254020080 21:01 <+bridge> [ddnet] [build] (this may still be a valid very large allocation (over 64MiB)) 21:01 <+bridge> [ddnet] 21:01 <+bridge> [ddnet] ``` 21:01 <+bridge> [ddnet] wtf is that xD 21:02 <+bridge> [ddnet] is that a new rust feature xD 21:03 <+bridge> [ddnet] where do you get that from? ๐Ÿ˜ฎ 21:03 <+bridge> [ddnet] is ddnet outputting that? 21:03 <+bridge> [ddnet] i started vscode, pressed compile 21:03 <+bridge> [ddnet] yeah 21:04 <+bridge> [ddnet] hm, that sounds like it might be vscode though 21:04 <+bridge> [ddnet] I think mimalloc is microsoft malloc 21:04 <+bridge> [ddnet] yea: https://github.com/microsoft/mimalloc 21:04 <+bridge> [ddnet] ok but weird, bcs its inside the terminal and says [build] 21:06 <+bridge> [ddnet] yep also happens in terminal 21:06 <+bridge> [ddnet] hm 21:07 <+bridge> [ddnet] it's during build or during run? 21:07 <+bridge> [ddnet] build 21:07 <+bridge> [ddnet] maybe clang broken 21:12 <+bridge> [ddnet] 1 google entry for that warning 5 days ago 21:12 <+bridge> [ddnet] ez 21:12 <+bridge> [ddnet] seems to be related to mold 21:13 <+bridge> [ddnet] and linux 6.1 21:13 <+bridge> [ddnet] ๐Ÿ˜„ 21:13 <+bridge> [ddnet] link? 21:13 <+bridge> [ddnet] u should report it 21:14 <+bridge> [ddnet] https://bytemeta.vip/repo/microsoft/mimalloc/issues/640 21:14 <+bridge> [ddnet] well i needed to upgrade to linux 6.1 bcs my nvme doesnt work on linux 6.0 xD 21:14 <+bridge> [ddnet] so quite possible i am just living on the edge too much 21:15 <+bridge> [ddnet] linux 6.1 is the one that contains rust, no? 21:15 <+bridge> [ddnet] or at least infrastructure to support modules in written in rust 21:15 <+bridge> [ddnet] i think so yeah 21:16 <+bridge> [ddnet] i use 6.1 21:16 <+bridge> [ddnet] didnt find problems 21:17 <+bridge> [ddnet] but i use gcc 21:17 <+bridge> [ddnet] and not mold 21:17 <+bridge> [ddnet] wait 21:17 <+bridge> [ddnet] do i use 6.1 21:17 <+bridge> [ddnet] I have this feeling that the issue here is that the character is in static memory 21:17 <+bridge> [ddnet] maybe not 21:17 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1039997246160252928/image.png 21:17 <+bridge> [ddnet] i use 6.0.7 lol 21:17 <+bridge> [ddnet] i guess gentoo hasnt patched it yet 21:18 <+bridge> [ddnet] debian fast af 21:19 <+bridge> [ddnet] well i wonder why gentoo doesnt have 6.1 21:19 <+bridge> [ddnet] Oh, so you figured it out? What is the real issue? 21:19 <+bridge> [ddnet] probs bcs its only release candidate yet 21:19 <+bridge> [ddnet] I didn't spot a strict aliasing issue there 21:19 <+bridge> [ddnet] ah yeah 21:19 <+bridge> [ddnet] It's also probably because the patchset isn't tested yet 21:20 <+bridge> [ddnet] i need to get a guru account 21:20 <+bridge> [ddnet] Ah, nope, vanilla-sources doesn't have 6.1 yet either 21:20 <+bridge> [ddnet] https://wiki.gentoo.org/wiki/Project:GURU/Information_for_Contributors 21:21 <+bridge> [ddnet] who the fuck takes const ref to an int xD 21:21 <+bridge> [ddnet] const bool 21:21 <+bridge> [ddnet] It should work 21:21 <+bridge> [ddnet] ref 21:21 <+bridge> [ddnet] yes 21:29 <+bridge> [ddnet] ryo already knew it 2 years ago 21:30 <+bridge> [ddnet] heinrich already got his answer two years ago 21:30 <+bridge> [ddnet] xd 21:30 <+bridge> [ddnet] but const ref int is 8 bytes, vs 4 bytes if the compiler isnt optimizing this lel 21:30 <+bridge> [ddnet] lmao 21:30 <+bridge> [ddnet] it's gonna take an extra 8 bytes 21:30 <+bridge> [ddnet] the actual int has to be stored somewhere, too 21:31 <+bridge> [ddnet] registers 21:31 <+bridge> [ddnet] not if you have a pointer to it ^^ 21:31 <+bridge> [ddnet] @Not Keks how do u find this 21:32 <+bridge> [ddnet] so a const ref to an int needs like 12 bytes in this case 21:32 <+bridge> [ddnet] i remembered the pr when we talked about it 21:32 <+bridge> [ddnet] so i just searched the pr 21:32 <+bridge> [ddnet] true^^ 22:05 <+bridge> [ddnet] if somebody wants to enlighten me, i am still interested in knowing if atomics have downsides 22:05 <+bridge> [ddnet] 22:05 <+bridge> [ddnet] e.g. variables could live in L1/2/3 cache only 22:05 <+bridge> [ddnet] or simply in registers 22:05 <+bridge> [ddnet] 22:05 <+bridge> [ddnet] But ofc interesting cases are objects with a specific lifetime, e.g. heap objects 22:05 <+bridge> [ddnet] 22:05 <+bridge> [ddnet] And what about stack allocated objects? 22:05 <+bridge> [ddnet] What if a share a stack object with another thread lol 22:05 <+bridge> [ddnet] who is compiler pro here, do we have such ppl 22:14 <+bridge> [ddnet] if you put your atomic into a register, then there cannot be a downside 22:14 <+bridge> [ddnet] i think with LTO FindEntities is inlined and the Entities array being passed to it in a different type is causing the strict aliasing problem. 22:15 <+bridge> [ddnet] I don't quite get your question. what do you mean? do you ask if atomics can live in registers? 22:15 <+bridge> [ddnet] yes, they can 22:15 <+bridge> [ddnet] well if the compiler can assume it so easily 22:15 <+bridge> [ddnet] 22:15 <+bridge> [ddnet] i some situation it probs optimizes them out 22:16 <+bridge> [ddnet] it's the same as for a normal variable 22:16 <+bridge> [ddnet] if it'd put the normal variable into a register, it'd also do it for the atomic 22:16 <+bridge> [ddnet] atomics have overhead right 22:16 <+bridge> [ddnet] not Ordering::Relaxed ones 22:16 <+bridge> [ddnet] not `Ordering::Relaxed` ones 22:16 <+bridge> [ddnet] on all platforms that I know 22:17 <+bridge> [ddnet] i find it curious many people confuse volatile with it being thread safe because the compiler cannot reorder it 22:17 <+bridge> [ddnet] right? 22:17 <+bridge> [ddnet] Hm, I don't really see the aliasing issue there :/ 22:17 <+bridge> [ddnet] Maybe I need to brush up on my aliasing rules 22:17 <+bridge> [ddnet] well with what optimization level? 22:17 <+bridge> [ddnet] `volatile` was the way to go before C had a memory level 22:17 <+bridge> [ddnet] ah i see 22:17 <+bridge> [ddnet] `volatile` was the way to go before C had a memory model 22:18 <+bridge> [ddnet] e.g. o2 might consider this a break of the standard which garantuees visibility of the atomic or smth like this 22:18 <+bridge> [ddnet] at the optimization level where vector iterators don't have overhead over pointers 22:19 <+bridge> [ddnet] new shiny stuff 22:19 <+bridge> [ddnet] https://github.com/features/code-search 22:19 <+bridge> [ddnet] well thats the optmization i use xdd 22:20 <+bridge> [ddnet] its funny 22:20 <+bridge> [ddnet] they show rust code 22:20 <+bridge> [ddnet] in the image 22:20 <+bridge> [ddnet] XD 22:20 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1040012979783082135/image.png 22:20 <+bridge> [ddnet] i could swear i trigged this today already, without applying for the beta 22:20 <+bridge> [ddnet] I wonder if this is just a compiler bug, it smells sane to me 22:22 <+bridge> [ddnet] if i remember correctly, its because relaxed is a weak memory ordering right? but if you use a strong memory ordering on a weakly ordered cpu arch it has a lot of overhead 22:22 <+bridge> [ddnet] they should show inlay hints for parameters so i can use references without ppl complaining that points are more obvious xdd 22:22 <+bridge> [ddnet] i need to reread atomics again 22:23 <+bridge> [ddnet] and strong orderings in strongly ordered cpus are cheap too 22:23 <+bridge> [ddnet] such as x86 22:24 <+bridge> [ddnet] its like with teeworlds strong and weak 22:25 <+bridge> [ddnet] xd 22:25 <+bridge> [ddnet] i think its not really overhead, but simply less optimization oppoturnities 22:25 <+bridge> [ddnet] nono 22:25 <+bridge> [ddnet] i think the weak ordered cpus have to add more instructions 22:25 <+bridge> [ddnet] to achieve the strong ordering 22:25 <+bridge> [ddnet] i forgot the blog post 22:26 <+bridge> [ddnet] i mean they have to flush all memory before the fence 22:26 <+bridge> [ddnet] thats already overhead 22:26 <+bridge> [ddnet] ye 22:26 <+bridge> [ddnet] yeah rip, we need a new multi threaded design 22:27 <+bridge> [ddnet] i kinda dislike "stopping" execution midrun 22:27 <+bridge> [ddnet] well u gotta sync 22:27 <+bridge> [ddnet] somehow 22:27 <+bridge> [ddnet] i wish we'd have amazin AIs that would be like. YO nobos here this is better 22:27 <+bridge> [ddnet] yes 22:27 <+bridge> [ddnet] sync at a specific point 22:28 <+bridge> [ddnet] but not so randomly 22:28 <+bridge> [ddnet] i mean our CPUs are optimized for this now anyway 22:28 <+bridge> [ddnet] but who knows what potentials we are wasting 22:28 <+bridge> [ddnet] well it's not very random anyway, cache coherency is pretty well designed ๐Ÿ˜„ 22:29 <+bridge> [ddnet] and pretty slow xd 22:29 <+bridge> [ddnet] i used coherent memory first for our vulkan backend 22:29 <+bridge> [ddnet] but an explicit flush at a good timepoint so much faster 22:29 <+bridge> [ddnet] the driver, hardware whatever simply isnt clever enough 22:30 <+bridge> [ddnet] The issue is that the ram speed isn't catching up to the cpu. "Memory wall" creates a huge issue 22:30 <+bridge> [ddnet] when 10ghz ram 22:30 <+bridge> [ddnet] but wouldnt that be an argument against these random cache flushes 22:30 <+bridge> [ddnet] shared l2 caches helped a fair bit in delaying the writeback 22:30 <+bridge> [ddnet] u go back to RAM then 22:30 <+bridge> [ddnet] ok sure 22:31 <+bridge> [ddnet] but at the end of the day, data just has to go to the ram for the caches to all sync up 22:31 <+bridge> [ddnet] @Learath2 are l2 shared? wasnt the l3? i read about caches not long ago 22:31 <+bridge> [ddnet] shared cache will make it a bit better 22:31 <+bridge> [ddnet] but i dont know much 22:31 <+bridge> [ddnet] also why is a cache line 64bytes 22:31 <+bridge> [ddnet] Depends on the architecture 22:32 <+bridge> [ddnet] we should do branchless programming 22:32 <+bridge> [ddnet] it can be rly fast 22:32 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1040016100731134032/image.png 22:32 <+bridge> [ddnet] Only really worth it in cases where branch predictor is more likely to fail than succeed, but yes, it's a nice place to get some optimization in 22:32 <+bridge> [ddnet] https://en.algorithmica.org/hpc/pipelining/branchless/ 22:33 <+bridge> [ddnet] > In general, data structures are made branchless by implicitly or explicitly padding them so that their operations take a constant number of iterations. Refer to the article for more complex examples. 22:34 <+bridge> [ddnet] the std string is a nice example 22:34 <+bridge> [ddnet] > rings. Oversimplifying things, an std::string is comprised of a pointer to a null-terminated char array (also known as a โ€œC-stringโ€) allocated somewhere on the heap and one integer containing the string size. 22:34 <+bridge> [ddnet] > 22:34 <+bridge> [ddnet] > A common value for a string is the empty string โ€” which is also its default value. You also need to handle them somehow, and the idiomatic approach is to assign nullptr as the pointer and 0 as the string size, and then check if the pointer is null or if the size is zero at the beginning of every procedure involving strings. 22:34 <+bridge> [ddnet] > 22:34 <+bridge> [ddnet] > However, this requires a separate branch, which is costly (unless the majority of strings are either empty or non-empty). To remove the check and thus also the branch, we can allocate a โ€œzero C-string,โ€ which is just a zero byte allocated somewhere, and then simply point all empty strings there. Now all string operations with empty strings have to read this useless zero byte, but this is still much cheaper than a branch misprediction. 22:35 <+bridge> [ddnet] @Ryozuki Relaxed is the weakest possible memory ordering 22:35 <+bridge> [ddnet] it's basically none at all 22:35 <+bridge> [ddnet] at that point, the CPU only guarantees that it doesn't tear writes 22:35 <+bridge> [ddnet] but I know of no CPU that would tear writes at atomic widths 22:35 <+bridge> [ddnet] @heinrich5991 whats a write tear? 22:35 <+bridge> [ddnet] I seem to have an addiction to debugging, I just can't stop 22:35 <+bridge> [ddnet] weird addiction but ok 22:36 <+bridge> [ddnet] I'd employ you instantly ๐Ÿ˜„ 22:36 <+bridge> [ddnet] but I'm no employer 22:36 <+bridge> [ddnet] Say you are writing a 32 bit value, it shouldn't be possible for half the write 16 bit to be observed 22:36 <+bridge> [ddnet] to be observed means read? 22:37 <+bridge> [ddnet] E.g. the old value was FFFF FFFF. You are writing 0000 0000. 0000 FFFF should never be read 22:37 <+bridge> [ddnet] @Ryozuki use non volatile int64 in jvm and read and write at the same time to one var 22:37 <+bridge> [ddnet] ah 22:37 <+bridge> [ddnet] Write tears can be an issue with some types that can have trap representations and stuff 22:37 <+bridge> [ddnet] so it cant half write 22:37 <+bridge> [ddnet] i dont even know if that still happens 22:37 <+bridge> [ddnet] it shouldnt* 22:37 <+bridge> [ddnet] but that was the first time i actually encountered it xD 22:38 <+bridge> [ddnet] a tear is not completly writing all bytes 22:38 <+bridge> [ddnet] i guess 22:38 <+bridge> [ddnet] yes 22:38 <+bridge> [ddnet] well 22:38 <+bridge> [ddnet] no 22:38 <+bridge> [ddnet] not writing all bytes at the same time 22:38 <+bridge> [ddnet] ah ok 22:38 <+bridge> [ddnet] so that the intermediate value can be observed 22:38 <+bridge> [ddnet] is write tear the term? 22:38 <+bridge> [ddnet] i only see vsync stuff in google 22:38 <+bridge> [ddnet] lel 22:38 <+bridge> [ddnet] xd 22:39 <+bridge> [ddnet] when merge vk pr for more awesome vk prs 22:39 <+bridge> [ddnet] soon mailbox support 22:39 <+bridge> [ddnet] for tearless lower latency gameplay 22:39 <+bridge> [ddnet] and fifo relaxed for tryhards 22:39 <+bridge> [ddnet] I'll spend 30 more minutes on this, if I don't get it I need to find a way to stop myself ๐Ÿ˜› 22:41 <+bridge> [ddnet] yes. e.g.: https://www.programmerall.com/article/29491023681/ 22:45 <+bridge> [ddnet] Ok, deen is definitely right. The compiler seems confident FindEntities doesn't modify apPlayersInRange 22:47 <+bridge> [ddnet] change it to array ref and u'll know 22:47 <+bridge> [ddnet] I'm still wondering if this is standard C++ or the compiler optimizing too much 22:48 <+bridge> [ddnet] but probably it's standard and I have to go through and change dozens of places in DDNet code now ๐Ÿ˜„ 22:48 <+bridge> [ddnet] :monkalaugh: 22:48 <+bridge> [ddnet] I think it's the compiler to be honest. This really looks sane to me :/ 22:48 <+bridge> [ddnet] but if u explicitly take the pointer of the array, what then? 22:49 <+bridge> [ddnet] what do you mean by that? 22:49 <+bridge> [ddnet] &aArray and aArray are the same pointer wise 22:49 <+bridge> [ddnet] but maybe its still aliasing differently 22:50 <+bridge> [ddnet] I think at the point where you use `(CEntity **) apPlayersInRange` the compiler says this is a totally different value than `apPlayersInRange` since they have a different type. And then it reorders the inlined `FindEntities` code to be run afterwards. 22:50 <+bridge> [ddnet] Since `FindEntities` has no side effects anymore then 22:50 <+bridge> [ddnet] Well I can actually check this. Let me just disassemble it ๐Ÿ˜› 22:51 <+bridge> [ddnet] so if you call a function with a parameter that gets written to, don't cast it to another type 22:52 <+bridge> [ddnet] I'd be happier if this was a compiler bug and not another annoying C/C++ thing to keep in mind when coding/reviewing 22:52 <+bridge> [ddnet] but just disabling strict aliasing probably costs too much performance 22:57 <+bridge> [ddnet] Note for self https://www.approxion.com/pointers-c-part-iii-strict-aliasing-rule/ 22:59 <+bridge> [ddnet] changed all alaising and works 22:59 <+bridge> [ddnet] Why does it work? 23:00 <+bridge> [ddnet] ```c++ 23:00 <+bridge> [ddnet] struct measurements_t { 23:00 <+bridge> [ddnet] uint8_t level; 23:00 <+bridge> [ddnet] uint16_t temperature; 23:00 <+bridge> [ddnet] uint32_t force; 23:00 <+bridge> [ddnet] }; 23:00 <+bridge> [ddnet] 23:00 <+bridge> [ddnet] void convert(const uint8_t* data, struct measurements_t* measurements) { 23:00 <+bridge> [ddnet] /* Fill measurements object with raw data. */ 23:00 <+bridge> [ddnet] *measurements = *((struct measurements_t*) &data[0]); 23:00 <+bridge> [ddnet] } 23:00 <+bridge> [ddnet] ``` 23:00 <+bridge> [ddnet] yes 23:00 <+bridge> [ddnet] I think the article is wrong in claiming that this is UB because of the aliasing rule 23:00 <+bridge> [ddnet] > In an attempt to convert data stored in a buffer (maybe read over a network connection) into a high-level structure, a pointer to โ€˜struct measurements_tโ€™ is aliased with a pointer to a โ€˜uint8_tโ€™. Since both types are incompatible (pointer to struct vs. pointer to โ€˜uint8_tโ€™) this code is a violation of the strict aliasing rule. Experienced C developers most likely recognized immediately that this code yields undefined behavior, 23:00 <+bridge> [ddnet] because uint8_t is unsigned char, and char stuff is allowed to alias 23:01 <+bridge> [ddnet] it might still be UB due to other reasons 23:01 <+bridge> [ddnet] like alignment 23:01 <+bridge> [ddnet] i dunno i mean we dont go from CCharacter pointers to CEntity pointers, but from array to pointer 23:01 <+bridge> [ddnet] 23:01 <+bridge> [ddnet] but i dunno why exactly its forbidden 23:02 <+bridge> [ddnet] > https://stackoverflow.com/questions/23848188/strict-aliasing-rule-and-char-pointers 23:02 <+bridge> [ddnet] but lto really gives a shit about u using UB XD 23:02 <+bridge> [ddnet] https://github.com/Jupeyy/ddnet/commit/9da473f73cfbdd0d641c0ff1da77ab1f6134e831 23:02 <+bridge> [ddnet] 23:02 <+bridge> [ddnet] i changed the paramter to array ref to easily find them 23:03 <+bridge> [ddnet] ea sports 23:03 <+bridge> [ddnet] its in the game 23:03 <+bridge> [ddnet] XD 23:07 <+bridge> [ddnet] https://preview.redd.it/8dhwi2o2kyy91.gif?width=640&format=mp4&s=441e95c971f863254588caa71ef42436d3e507bf 23:07 <+bridge> [ddnet] https://www.reddit.com/r/ProgrammerHumor/comments/yqozdo/its_a_good_language_too/ 23:07 <+bridge> [ddnet] @Not Keks 23:07 <+bridge> [ddnet] xd 23:08 <+bridge> [ddnet] the first comment lol 23:08 <+bridge> [ddnet] its actually true 23:08 <+bridge> [ddnet] python is the fusion, very "sn[e]aky" 23:08 <+bridge> [ddnet] Mh the call isn't inlined, nor is it reordered 23:09 <+bridge> [ddnet] does the call do anything at all? 23:09 <+bridge> [ddnet] Maybe it's optimized away because the compiler thinks it does nothing anyway 23:09 <+bridge> [ddnet] It looks like the whole function 23:11 <+bridge> [ddnet] Now you're confusing me ๐Ÿ˜„ 23:12 <+bridge> [ddnet] @Not Keks btw re putting atomics into registers: https://rust.godbolt.org/z/5boWoq4zx 23:12 <+bridge> [ddnet] yeah wow, for 2 lines of code 23:12 <+bridge> [ddnet] well, it's going to be that way in larger examples, too 23:12 <+bridge> [ddnet] what kind of example would you like to see? 23:12 <+bridge> [ddnet] It seems the call is done and the result is correct, but the compiler doesnt use the actual array. Unless I'm completely misreading this 23:13 <+bridge> [ddnet] i want to know when exactly the compiler makes this assumption 23:13 <+bridge> [ddnet] under which assumption does it break it 23:13 <+bridge> [ddnet] relaxed atomics have the same semantics as normal variables 23:13 <+bridge> [ddnet] it breaks under no assumption 23:13 <+bridge> [ddnet] on all cpu architectures that I know of 23:14 <+bridge> [ddnet] on optimization levels that optimize vector iterators to the same level as pointers 23:14 <+bridge> [ddnet] well, that still fits with my strict aliasing theory though 23:14 <+bridge> [ddnet] for the rest of the function the optimizer decided it doesn't need the array because it was zero-initialized anyway and no one accessed it inbetween the read 23:15 <+bridge> [ddnet] so just put a constant 0 there 23:16 <+bridge> [ddnet] @heinrich5991 what is x86-64-v2 23:16 <+bridge> [ddnet] it makes some assumptions about the modernity of the x86-64 cpu 23:16 <+bridge> [ddnet] if you mean the target architecture 23:16 <+bridge> [ddnet] line 25: https://gitlab.archlinux.org/archlinux/rfcs/-/merge_requests/2/diffs 23:17 <+bridge> [ddnet] e.g. if u read the var in a different thread, how would it optimize it then? 23:17 <+bridge> [ddnet] 23:17 <+bridge> [ddnet] relaxed atomics must be visible in finite time to the other thread 23:17 <+bridge> [ddnet] normal variables not 23:17 <+bridge> [ddnet] 23:17 <+bridge> [ddnet] i mean there is a reason volatile is different to relaxed atomics i guess 23:17 <+bridge> [ddnet] i see 23:17 <+bridge> [ddnet] maybe a volatile variable could (in theory) never expose itself to the other thread 23:18 <+bridge> [ddnet] ah, I see 23:20 <+bridge> [ddnet] @Not Keks here's a difference, indeed: https://rust.godbolt.org/z/a8x9P4Tr7 23:21 <+bridge> [ddnet] so basically the compiler has to guarantee that it reloads the atomic at some point 23:21 <+bridge> [ddnet] but not the variable 23:21 <+bridge> [ddnet] bad gateway lol 23:21 <+bridge> [ddnet] works for meโ„ข 23:21 <+bridge> [ddnet] a hard refresh fixed it 23:28 <+bridge> [ddnet] if u find the c++ ref to this show pls 23:28 <+bridge> [ddnet] when it comes to upcasting and downcasting and then even from array to pointer pointer 23:28 <+bridge> [ddnet] it gets hard to search google for this xD 23:33 <+bridge> [ddnet] Okay yeah this is UB 23:33 <+bridge> [ddnet] > This bug (and some linked discussions) indicate that compiler developers donโ€™t necessarily consider int8_t and uint8_t to be character types for aliasing purposes. 23:33 <+bridge> [ddnet] From https://blog.regehr.org/archives/1307 23:34 <+bridge> [ddnet] Also, help: 23:34 <+bridge> [ddnet] > A lot of C code is broken under strict aliasing. Separate compilation is probably what protects us from broader compiler exploitation of the brokenness, but it is a very poor kind of protection. 23:34 <+bridge> [ddnet] Maybe we should disable strict aliasing after all... 23:34 <+bridge> [ddnet] Makes sense that LTO exposes these problems then 23:34 <+bridge> [ddnet] Ok I give up. This is way too confusing ๐Ÿ˜„ 23:36 <+bridge> [ddnet] It should be fine. We are accessing through a type that is the base class of the dynamic type of the object. C++17 6.10p8.7 23:36 <+bridge> [ddnet] We should fix all 23:37 <+bridge> [ddnet] I wouldn't be so sure. We talk about arrays here 23:37 <+bridge> [ddnet] This is a completely different data type 23:37 <+bridge> [ddnet] Should I just open a GCC bug and tell them their compiler is wrong? Probably easiest way to get a standard reference ๐Ÿ˜„ 23:37 <+bridge> [ddnet] Xdd 23:37 <+bridge> [ddnet] Good idea 23:38 <+bridge> [ddnet] I heard they are very mean ๐Ÿ˜› 23:38 <+bridge> [ddnet] Hm, they do have a warning when opening a compiler bug not to do so if it is aliasing related: 23:38 <+bridge> [ddnet] > Before reporting that GCC compiles your code incorrectly, compile it with gcc -Wall -Wextra and see whether this shows anything wrong with your code. Similarly, if compiling with -fno-strict-aliasing -fwrapv makes a difference, your code probably is not correct. 23:38 <+bridge> [ddnet] Use fake account xd 23:38 <+bridge> [ddnet] Let me ask on the C++ irx 23:39 <+bridge> [ddnet] irc* 23:39 <+bridge> [ddnet] They have pedants on call 7/24 23:39 <+bridge> [ddnet] I love the confidence 23:39 <+bridge> [ddnet] Clang compiles it properly, no? Maybe a difference might pique their interest 23:39 <+bridge> [ddnet] I bet they had factor 100 more false bug reports with strict aliasing compared to true bugs 23:40 <+bridge> [ddnet] It probably has less insane optimizations 23:40 <+bridge> [ddnet] yes, with Clang it's fine 23:40 <+bridge> [ddnet] I'd trust GCC. Their binaries are still faster xd 23:40 <+bridge> [ddnet] The performance is everything else never betrayed me 23:41 <+bridge> [ddnet] The performance is everything rule never betrayed me 23:45 <+bridge> [ddnet] yo! someone can tell me a way to access private variables from a class? 23:48 <+bridge> [ddnet] you can access them from methods of the same class. if you want children to have access, make them protected, if you want everyone to have access make public or use a getter/setter method. If you want some specific functions/classes to access them, you can use friends