00:23 <+bridge> [ddnet] Considering that entities also removes a bit of CPU work.. Preparing envelopes, draw calls, iterating through layers. This is still way too less. Either the gl driver sucks with something specific, like nameplates or tee rendering. Or we actually have to assume it hits some weird bottleneck 00:23 <+bridge> [ddnet] (@deen) 03:08 <+bridge> [ddnet] ктo успeл, тот и съeл) 03:08 <+bridge> [ddnet] https://disorde.gift/AVBrDhAbECvcW 06:15 <+bridge> [ddnet] look what's on HN today: https://www.naturaldocs.org/getting_started/documenting_your_code/ 06:15 <+bridge> [ddnet] instantly reminded me of system.h comments. was that tool once used for teeworlds? 07:59 <+bridge> [ddnet] never heard of it 07:59 <+bridge> [ddnet] but this looks like it existed since 2003 so its possible someone used it 08:00 <+bridge> [ddnet] @Discord Mod 08:00 <+bridge> [ddnet] holy shit they never stop 08:00 <+bridge> [ddnet] discord should get their ass working on this 10:33 <+ChillerDragon> This doc tool is some AI trained on Magnuses code ;D 10:33 <+ChillerDragon> Sorry for repost but does one know if its possible in the client to figure out who hit who. Like nade hits from other clients 10:40 <+bridge> [ddnet] https://blog.rust-lang.org/2022/01/20/cve-2022-21658.html 10:40 <+bridge> [ddnet] TOCTOU races are such a PITA to avoid 10:43 <+bridge> [ddnet] yeah xd 10:44 <+bridge> [ddnet] @Learath2 u cant event prevent it on macos 10:44 <+bridge> [ddnet] cuz no api xd 10:44 <+bridge> [ddnet] macOS before version 10.10 (Yosemite) 10:44 <+bridge> [ddnet] well before that version 10:44 <+bridge> [ddnet] idk if thats ancient or not 10:44 <+bridge> [ddnet] Idk how they fixed it but, TOCTOU is very annoying to fix most of the times 10:45 <+bridge> [ddnet] I guess they use something like openat? 10:45 <+bridge> [ddnet] > Instead of telling the system not to follow symlinks, the standard library first checked whether the thing it was about to delete was a symlink, and otherwise it would proceed to recursively delete the directory. 10:45 <+bridge> [ddnet] by not following symlinks 10:45 <+bridge> [ddnet] it will just delete the symlink 10:45 <+bridge> [ddnet] its explained there 10:46 <+bridge> [ddnet] > To prevent such attacks, std::fs::remove_dir_all already includes protection to avoid recursively deleting symlinks, as described in its documentation: 10:46 <+bridge> [ddnet] > 10:46 <+bridge> [ddnet] > This function does not follow symbolic links and it will simply remove the symbolic link itself. 10:47 <+bridge> [ddnet] That's not the issue. They already had that but it's not enough 10:47 <+bridge> [ddnet] > This function currently corresponds to openat, fdopendir, unlinkat and lstat functions on Unix (except for macOS before version 10.10 and REDOX) and the CreateFileW, GetFileInformationByHandleEx, SetFileInformationByHandle, and NtOpenFile functions on Windows. Note that, this may change in the future. 10:47 <+bridge> [ddnet] Ah, yep, openat 10:47 <+bridge> [ddnet] https://doc.rust-lang.org/std/fs/fn.remove_dir_all.html 10:47 <+bridge> [ddnet] xd 10:48 <+bridge> [ddnet] @Learath2 man im trying to figure out how to render sprites 10:48 <+bridge> [ddnet] 30 mins and still dont know xdd 10:48 <+bridge> [ddnet] this quad container stuff is driving me insane 10:48 <+bridge> [ddnet] xd 10:48 <+bridge> [ddnet] im implementing #submissions with the image from voxel 10:48 <+bridge> [ddnet] That makes 2 of us. I wanted to render some tees. I looked around for an hour, than I just got bored 10:49 <+bridge> [ddnet] i got everything setup even the custom assets for it 10:49 <+bridge> [ddnet] i just need to render the stuff in the hud 10:49 <+bridge> [ddnet] xd 10:49 <+bridge> [ddnet] Try to ignore the details. Don't we have a gfx api or rendertools api call to render a sprite? 10:49 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/934021896889049168/unknown.png 10:49 <+bridge> [ddnet] my first thought for the case of preventing privilege exploitation of that function would be to block access to editing the folder/symlink/whatever before checking it and then release it afterwards, but as someone who is not a low level programmer i dont know how practical/effective/possible that is of a strategy 10:50 <+bridge> [ddnet] This would be the naive approach, it comes with a couple drawbacks but it would indeed work 10:51 <+bridge> [ddnet] If you allow locking files you'll inevitably have badly behaving programs that fail to drop their locks, happens on windows all the time 10:53 <+bridge> [ddnet] lol yeah i'm familiar with that 10:53 <+bridge> [ddnet] in the sm64 TASing scene the emulator we used to use for TASing wouldn't close its access to the movie files after opening them, so while you'd be able to edit them you couldn't delete them without closing the emulator lol 11:02 <+bridge> [ddnet] @Learath2 omg 11:02 <+bridge> [ddnet] i got it to render 11:02 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/934025142315659264/unknown.png 11:02 <+bridge> [ddnet] my biggest achievement 11:02 <+bridge> [ddnet] xddd 11:02 <+bridge> [ddnet] > Graphics()->RenderQuadContainerAsSprite(m_HudQuadContainerIndex, 0, 40.0, 40.0); 11:02 <+bridge> [ddnet] the key 11:03 <+bridge> [ddnet] :Celebrate: 11:17 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/934028808019914822/unknown.png 11:18 <+bridge> [ddnet] Looks good 11:21 <+bridge> [ddnet] @deen\: ok one last round\:I just disabled rendering in all places 11:21 <+bridge> [ddnet] CGraphics\_Threaded\:\:Render\*That shoots my FPS from around 700-800 up to 3500So i guess that would then be a CPU benchmark xDSince your CPU should be stronger than mine you should probs have around 4k-7kAtleast worth a try to see if the GPU is the problem here I guess xd 11:22 <+bridge> [ddnet] Generally the map renders at around 2k FPS, when i join it on my local server without any other player 11:41 <+bridge> [ddnet] [Edit](https://discord.com/channels/252358080522747904/293493549758939136/934030023457919006): @deen\: ok one last round\:I just disabled rendering in all places 11:41 <+bridge> [ddnet] CGraphics\_Threaded\:\:Render\* (except RenderText) 11:41 <+bridge> [ddnet] That shoots my FPS from around 700-800 up to 3500So i guess that would then be a CPU benchmark xDSince your CPU should be stronger than mine you should probs have around 4k-7kAtleast worth a try to see if the GPU is the problem here I guess xd 11:43 <+bridge> [ddnet] ur msg is repeated btw 11:43 <+bridge> [ddnet] xd 11:43 <+bridge> [ddnet] and looks like some newlines arent there 11:43 <+bridge> [ddnet] dont you want to take the chance and just add a new HUD thats called for ddnet onlyI guess the hearts and shields aren't useful 11:43 <+bridge> [ddnet] The freeze timer could just get smth like ninja thing from 0.7 11:43 <+bridge> [ddnet] (@Ryozuki) 11:44 <+bridge> [ddnet] the hud i added is only called for ddnet but i didnt remove the hearts 11:44 <+bridge> [ddnet] yeah the bridge sucks xD 11:44 <+bridge> [ddnet] (@Ryozuki) 11:44 <+bridge> [ddnet] since the image i got shows no freeze seconds 11:44 <+bridge> [ddnet] god this bridge is aswful 11:44 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/934035738868187166/unknown.png 11:44 <+bridge> [ddnet] ur quote repeats the image 11:44 <+bridge> [ddnet] and fills all the space 11:44 <+bridge> [ddnet] lmao 11:44 <+bridge> [ddnet] come back to discord pls :D 11:45 <+bridge> [ddnet] starting wednessday i dont really have time anyway xd 11:46 <+bridge> [ddnet] xd 11:46 <+bridge> [ddnet] job? 11:46 <+bridge> [ddnet] yeah xd 11:46 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/934036342961233960/unknown.png 11:46 <+bridge> [ddnet] im in solo 11:47 <+bridge> [ddnet] it works!!!! 11:47 <+bridge> [ddnet] xd 11:47 <+bridge> [ddnet] who draw that btw? 11:47 <+bridge> [ddnet] voxel 11:47 <+bridge> [ddnet] its on discord 11:47 <+bridge> [ddnet] xd 11:47 <+bridge> [ddnet] ravie's enemy xd 11:47 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/934036524981452900/unknown.png 11:47 <+bridge> [ddnet] i added it to ur assets thing too 11:47 <+bridge> [ddnet] looks really goo 11:47 <+bridge> [ddnet] btw ur assets stuff could be made extendable way more easiily 11:47 <+bridge> [ddnet] good 11:48 <+bridge> [ddnet] so clean 11:48 <+bridge> [ddnet] xd 11:48 <+bridge> [ddnet] i already improved it alot by using templates 11:48 <+bridge> [ddnet] it has like 4 empty new structs and stuff 11:48 <+bridge> [ddnet] deen forced me xD 11:48 <+bridge> [ddnet] i found it funny 11:48 <+bridge> [ddnet] i hate UI work bro 11:48 <+bridge> [ddnet] oh dawg bro 11:48 <+bridge> [ddnet] i just hate tw's ui concept 11:48 <+bridge> [ddnet] we dont have a "focus, unfocus" event and stuff like that 11:48 <+bridge> [ddnet] xd 11:48 <+bridge> [ddnet] would make so much stuff so much easier xD 11:49 <+bridge> [ddnet] its cuz its immediate mode 11:49 <+bridge> [ddnet] yeah 11:54 <+bridge> [ddnet] thtas a nice feature! unstead of shield / heart 11:55 <+bridge> [ddnet] thats a nice feature! unstead of shield / heart 12:01 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/934040101061812294/unknown.png 12:02 <+bridge> [ddnet] (spectating another) 12:06 <+bridge> [ddnet] if these new UI items are going to replace hearts/shields on ddrace mode servers, I feel they could benefit from being shown a bit bigger, more like the size of the hearts/shields (they're currently a little bit smaller). maybe that's just me though 12:07 <+bridge> [ddnet] yeah 12:12 <+bridge> [ddnet] What about vertical placement near left edge? Like vertical toolbar. 12:12 <+bridge> [ddnet] Or just go with hearts removal, so everything moves up 12:30 <+bridge> [ddnet] Making it swap depending on gamemode would be nice 12:32 <+bridge> [ddnet] off for gamemodes like fng, hearts / shields for vanilla, displayed power ups for ddrace like above 12:42 <+bridge> [ddnet] @Ryozuki @heinrich5991 a GAMEINFO flag would probably be the best, so the client knows when to use DDraceHUD 12:42 <+bridge> [ddnet] I suggest `GAMEINFOFLAG2_DDRACEHUD` 12:43 <+bridge> [ddnet] We would probably need a bar or something for freeze then, because shields are currently used to determine the rest time of beint frozen 12:49 <+bridge> [ddnet] and of course ddrace hud should only work if server sends a ddnetcharacter 12:51 <+bridge> [ddnet] well, i think doesnt matter actually, just the gameinfoflag 12:53 <+bridge> [ddnet] Hetzner is increasing server costs due to rising energy costs in germany 12:53 <+bridge> [ddnet] Can u ppl pls just allow nuclear reactors again? 12:53 <+bridge> [ddnet] tell to the smart ppl that decided to shutdown nuclear reactors for coal mines 12:53 <+bridge> [ddnet] xdd 12:55 <+bridge> [ddnet] Wtf? No, we can build some next to your house if you like them that much 12:55 <+bridge> [ddnet] I'm completely okay with that. You can build them in my garage aswell 12:55 <+bridge> [ddnet] same 12:56 <+bridge> [ddnet] ok 12:56 <+bridge> [ddnet] learath biggest trol 12:56 <+bridge> [ddnet] Do you think reactors just randomly leak radiation? 12:56 <+bridge> [ddnet] no 12:56 <+bridge> [ddnet] Modern reactor designs dont even melt down during catastrophic failure 12:56 <+bridge> [ddnet] then lets place some around your house 12:57 <+bridge> [ddnet] As I said I'm completely okay with that. I was not kidding 12:58 <+bridge> [ddnet] It's an absolutely insane proposition when we have a lot of land far away from the middle of the city, but if you think I wouldn't be okay living next to one you are very mistaken 12:59 <+bridge> [ddnet] Oh, I have an idea, how about you live next to a coal or LNG power plant 12:59 <+bridge> [ddnet] the coal mines kill way more ppl in average 12:59 <+bridge> [ddnet] even hydro energy 12:59 <+bridge> [ddnet] There are entire towns in turkey with people that are born with cancer due to living next to coal power plants 13:00 <+bridge> [ddnet] BORN with cancer, not getting cancer 13:00 <+bridge> [ddnet] https://www.youtube.com/watch?v=EhAemz1v7dQ 13:00 <+bridge> [ddnet] good video 13:01 <+bridge> [ddnet] Don't come at me with "live next to a reactor than" when living next to other baseload alternatives are literally incompatible with human life 13:01 <+bridge> [ddnet] i thought they use water energy for their servers 13:01 <+bridge> [ddnet] (@Learath2) 13:02 <+bridge> [ddnet] why should it increase 13:02 <+bridge> [ddnet] also green energy is the cheapest still 13:03 <+bridge> [ddnet] They probably can't get all their energy needs from renewables. Most companies that say they use 100% green energy actually use non green energy but at peak contribute back to the grid green energy to make up for it 13:04 <+bridge> [ddnet] we just need better batteries 13:04 <+bridge> [ddnet] The LNG and natural gas crisis is hitting all the countries, it's getting sooo expensive with gasprom limiting output and island nations snatching up all the LNG 13:04 <+bridge> [ddnet] that dont rely on lithium 13:04 <+bridge> [ddnet] but natrium 13:04 <+bridge> [ddnet] If you can make better batteries fine by me. But we can literally make nuclear reactors right now 13:05 <+bridge> [ddnet] thats true 13:05 <+bridge> [ddnet] but i thought especially water pump reactors or whatever they use dont have so much disadvantages 13:05 <+bridge> [ddnet] I see molten salt batteries, solid state lithium chemistries and oxygen based battery ideas since like I was at the start of highschool 13:05 <+bridge> [ddnet] but ofc require quite alot of space 13:05 <+bridge> [ddnet] they are expensive 13:06 <+bridge> [ddnet] not like you just build them 13:06 <+bridge> [ddnet] they need 10 years to be built 13:06 <+bridge> [ddnet] and they aren't very modular 13:06 <+bridge> [ddnet] water pump reactors probs require a dam built, these break and killed already more people than nuclear reactors 13:06 <+bridge> [ddnet] solarpanels can go anywhere 13:06 <+bridge> [ddnet] They just don't ever get there. Idk whether it's neolibs not seeing value in it or the tech not being there but these batteries are just not being made :/ 13:07 <+bridge> [ddnet] bro its germany 13:07 <+bridge> [ddnet] (@Ryozuki) 13:07 <+bridge> [ddnet] land of engeneering 13:07 <+bridge> [ddnet] have some trust 13:07 <+bridge> [ddnet] yet ur ppl dont trust ur engineering to make nuclear reactors 13:07 <+bridge> [ddnet] when a nuclear reactor explodes, then the land is wasted for hunderets of years 13:07 <+bridge> [ddnet] if water floods stuff, its gone for maybe 1-2 years 13:08 <+bridge> [ddnet] Non-hybrid geothermal and tidal generation look very promising as renewable baseloads, but they are both so far away from being economically viable 13:08 <+bridge> [ddnet] yet more floods happened and more ppl died 13:08 <+bridge> [ddnet] anyway, in europe nuclear reactors are very expensive and take an insane amount of time to built 13:08 <+bridge> [ddnet] so it's unlikely it will happen now anyway 13:09 <+bridge> [ddnet] i hope they complete the research on fusion reactors (not fission) 13:09 <+bridge> [ddnet] it would be epic 13:09 <+bridge> [ddnet] also i think its good that germany tries something the rest of the world doesnt want to 13:09 <+bridge> [ddnet] Long time to build is because of lack of political will 13:09 <+bridge> [ddnet] then we'll see if it works or not 13:09 <+bridge> [ddnet] what is it 13:09 <+bridge> [ddnet] Look at china making insane engineering projects happen in mere months 13:09 <+bridge> [ddnet] coal mines? 13:09 <+bridge> [ddnet] in germany every siungle person can delay it by years 13:09 <+bridge> [ddnet] (@Learath2) 13:09 <+bridge> [ddnet] by protesting 13:09 <+bridge> [ddnet] @Learath2 china actually is building the largest wind turbines 13:09 <+bridge> [ddnet] because its more efficient if they are giant 13:10 <+bridge> [ddnet] well trying to solve the energy problem without nuclear energy and coal 13:10 <+bridge> [ddnet] (@Ryozuki) 13:10 <+bridge> [ddnet] China might be an authoritarian hellhole but after seeing them no one can tell me we cant make huge engineering feats 13:10 <+bridge> [ddnet] https://www.cnbc.com/2021/08/23/chinese-firm-announces-giant-264-meter-tall-offshore-wind-turbine.html 13:10 <+bridge> [ddnet] if it works, germany takes the lead again, if it wont work, we doomed xDDD 13:11 <+bridge> [ddnet] Is germany basing their entire baseload around hydro energy? 13:11 <+bridge> [ddnet] Would be ideal, since the hearts are useless in FNG but the shields are still used 13:11 <+bridge> [ddnet] mostly wind in the northsea probs in future 13:11 <+bridge> [ddnet] and alot on land 13:11 <+bridge> [ddnet] in south solar is fine too 13:11 <+bridge> [ddnet] I thought you still operated massive natural gas plants 13:11 <+bridge> [ddnet] since solar is so fucking cheap 13:12 <+bridge> [ddnet] gas will probs stay as a side step 13:12 <+bridge> [ddnet] What were the shields used for in fng btw? 13:12 <+bridge> [ddnet] freeze timer 13:12 <+bridge> [ddnet] Hm, maybe when we add a bar fng can use that too 13:12 <+bridge> [ddnet] The stars popping out of you shows it, but the shields help a bit as well 13:14 <+bridge> [ddnet] btw @Ryozuki and @Learath2 i think we already discussed the problem with uranium, we'd need other reactor types anyway 13:15 <+bridge> [ddnet] the current one will just suck the rest uranium in a few years and then rip 13:15 <+bridge> [ddnet] With gameinfoflags, servers would be able to tell the client to either show hearts and shields or the ddrace hud. Default Hearts and shields 13:16 <+bridge> [ddnet] I see 13:17 <+bridge> [ddnet] Asteroid minimg 13:17 <+bridge> [ddnet] :monkalaugh: 13:18 <+bridge> [ddnet] xD 13:18 <+bridge> [ddnet] just shoot the nuclear waste into space 13:18 <+bridge> [ddnet] Oh god no 13:19 <+bridge> [ddnet] One launch failure and we pepper earth with nuclear waste 13:19 <+bridge> [ddnet] its just funny 13:19 <+bridge> [ddnet] i think some ppl think, its easy as that 13:19 <+bridge> [ddnet] just take it and send to space xD 13:19 <+bridge> [ddnet] https://www.whereisroadster.com/ 13:20 <+bridge> [ddnet] I'm honestly completely okay with burying it underground in a lead+reinforced concrete structure 13:20 <+bridge> [ddnet] just get on board with the nuclear waste and steal the car 13:20 <+bridge> [ddnet] (@Avolicious) 13:20 <+bridge> [ddnet] Driving around in space, sounds funny 🙂 13:21 <+bridge> [ddnet] i bet the future humans will spent around 2 times the energy they got from nuclear power plants to eleminate the nuclear waste somehow again xD 13:21 <+bridge> [ddnet] (@Learath2) 13:22 <+bridge> [ddnet] The earth is massive, why would they ever dig up our small nuclear waste graveyard? 13:22 <+bridge> [ddnet] bcs nothing remains untouched 13:22 <+bridge> [ddnet] the earth changes 13:22 <+bridge> [ddnet] in 1000 years it might become a problem 13:22 <+bridge> [ddnet] So they will need that small useless hole we dug in bumfuck nowhere finland? 13:23 <+bridge> [ddnet] In 20 years we gone from nothing to everyone having internet etc 13:23 <+bridge> [ddnet] In 1000 thinks will change a lot 13:23 <+bridge> [ddnet] Years 13:23 <+bridge> [ddnet] internet 13:23 <+bridge> [ddnet] wow 13:23 <+bridge> [ddnet] Its actually p big ngl 13:24 <+bridge> [ddnet] Even in 1k years, why would they ever want to dig up the waste :D 13:24 <+bridge> [ddnet] I understand that the world changes but why would you ever unearth sealed nuclear waste? 13:24 <+bridge> [ddnet] bcs it gets into water for example? 13:25 <+bridge> [ddnet] why do you thing that all nuclear waste is sealed so well? 13:25 <+bridge> [ddnet] most is just in some random mine 13:25 <+bridge> [ddnet] bcs they had no better idea 13:25 <+bridge> [ddnet] I gueeesss it's perceivable that it could maaybe start leaking but these structures we engineer with expected lifetimes far above the 1k years we are talking about here 13:26 <+bridge> [ddnet] well we talk about 1 million years anyway 13:26 <+bridge> [ddnet] until then earthquakles probs destroyed most of these caves 13:26 <+bridge> [ddnet] I'm not talking about the idiocies of the past. If we are going to throw it like that I'm also against it 13:26 <+bridge> [ddnet] We know a lot more nowadays, and we can engineer structures resistant to all kinds of situations 13:27 <+bridge> [ddnet] i think its more likely we use fusion power in 20-30 years than better nuclear energy, but lets wait and see xD 13:27 <+bridge> [ddnet] ok both is nuclear energy 13:27 <+bridge> [ddnet] but you know what i mean 13:29 <+bridge> [ddnet] 20-30 years is on the lower end from what I've read, but hopefully we'll have fusion by then. It'd be great 13:30 <+bridge> [ddnet] that will defs change the world alot 13:30 <+bridge> [ddnet] the next step for society xd 13:31 <+bridge> [ddnet] intel 100 ghz using 1 terrawatt/h 13:31 <+bridge> [ddnet] I doubt our processing power is limited by power consumption at this point :D 13:32 <+bridge> [ddnet] yeah but we just create supra conductors locally xd 13:33 <+bridge> [ddnet] the cooling probs expensive xD 13:38 <+bridge> [ddnet] dumb 13:38 <+bridge> [ddnet] sorry, but imo u have a very wrong picture of this 13:38 <+bridge> [ddnet] https://www.intel.com/content/www/us/en/support/articles/000057816/processors/processor-utilities-and-programs.html 13:38 <+bridge> [ddnet] Because? 13:39 <+bridge> [ddnet] Because that ruins the planet even more, and it will leak through, just because it takes your, or a few human lifetimes doesnt mean the problem is solved 13:39 <+bridge> [ddnet] anyways, the world is fucked 13:40 <+bridge> [ddnet] so i would not be surprised about this staying non-solved 13:40 <+bridge> [ddnet] There are some theories about producing real green energy, without side effects, but those cost a lot and people are afraid to invest before getting the results 13:40 <+bridge> [ddnet] Omg, please stop writing about energy. 13:40 <+bridge> [ddnet] 13:40 <+bridge> [ddnet] Hetzner now wrote me an email that they have to raise the current rate because energy 13:40 <+bridge> [ddnet] 13:40 <+bridge> [ddnet] > The current dramatic rise in energy prices in Germany is leading to a significant increase in costs. Energy costs play a particularly important role for servers. 13:41 <+bridge> [ddnet] > 13:41 <+bridge> [ddnet] > Since the calculation of these servers does not allow any leeway to absorb this coverage gap, we are unfortunately forced to make a price adjustment. Depending on the server, the prices will only be raised as far as necessary. 13:41 <+bridge> [ddnet] > 13:41 <+bridge> [ddnet] > - Hetzner 21.01.2022 13:41 <+bridge> [ddnet] 13:41 <+bridge> [ddnet] Thanks @Learath2 & Jupstar 😄 13:41 <+bridge> [ddnet] 13:41 <+bridge> [ddnet] coincidence, i doubt it 13:41 <+bridge> [ddnet] It will leak through? It WILL. Are you god or do you have some numbers? As far as I'm aware modern nuclear waste containment structures are engineered rated for multiple thousands of years 13:41 <+bridge> [ddnet] and what happens in multiple thousands of years? 13:41 <+bridge> [ddnet] Omg, please stop writing about energy. 13:41 <+bridge> [ddnet] 13:41 <+bridge> [ddnet] Hetzner now wrote me an email that they have to raise the current rate because energy gets more expensive in germany now 13:41 <+bridge> [ddnet] 13:41 <+bridge> [ddnet] > The current dramatic rise in energy prices in Germany is leading to a significant increase in costs. Energy costs play a particularly important role for servers. 13:41 <+bridge> [ddnet] > 13:41 <+bridge> [ddnet] > Since the calculation of these servers does not allow any leeway to absorb this coverage gap, we are unfortunately forced to make a price adjustment. Depending on the server, the prices will only be raised as far as necessary. 13:41 <+bridge> [ddnet] > 13:41 <+bridge> [ddnet] > - Hetzner 21.01.2022 13:41 <+bridge> [ddnet] 13:41 <+bridge> [ddnet] Thanks @Learath2 & Jupstar 😄 13:41 <+bridge> [ddnet] 13:41 <+bridge> [ddnet] coincidence, i doubt it 13:41 <+bridge> [ddnet] the whole world is one radioactive sphere 13:41 <+bridge> [ddnet] @Avolicious\: that was the begin of our talk too \:D 13:41 <+bridge> [ddnet] scroll to the top bro 13:41 <+bridge> [ddnet] great 👍 13:41 <+bridge> [ddnet] xd 13:42 <+bridge> [ddnet] learath also got an email 13:42 <+bridge> [ddnet] Fuck, why do you get emails faster than me 😦 13:42 <+bridge> [ddnet] Omg, please stop writing about Hetzner 13:42 <+bridge> [ddnet] Received it after your talk 13:42 <+bridge> [ddnet] (sarcastic) 13:42 <+bridge> [ddnet] It starts eroding a bit? Just because they are rated to stay completely intact for multiple thousands of years doesnt mean it instantly dumps it's contents afterwards 13:43 <+bridge> [ddnet] what about nuclear fusion? why do you want nuclear fission so bad? 13:44 <+bridge> [ddnet] it solves all problems 13:44 <+bridge> [ddnet] Because fusion is like atleast 5 decades away? 13:44 <+bridge> [ddnet] Aha, and why do you want fission so bad if we can also use other methods in this timespan? 13:45 <+bridge> [ddnet] Germany at least will not re-activate any nuclear power plants 13:45 <+bridge> [ddnet] and thats very good 13:45 <+bridge> [ddnet] xdd 13:45 <+bridge> [ddnet] it will reactivate the coal mines 13:45 <+bridge> [ddnet] Chinas record breaking fusion experiment still was at a whopping -60% efficiency 13:45 <+bridge> [ddnet] lmao this is an endless debate 13:46 <+bridge> [ddnet] Just because something isnt as efficient as other methods doesnt mean they are bad 13:46 <+bridge> [ddnet] Other methods such as pumping millions of tons of co2 in the air? 13:46 <+bridge> [ddnet] i kinda doubt hetzner pays so much more energy tbh 13:46 <+bridge> [ddnet] Nah, coal mines ofc are also not good 13:46 <+bridge> [ddnet] and germany will also break the coal mining 13:46 <+bridge> [ddnet] but i hope they use the money to built 100% green energy 13:46 <+bridge> [ddnet] I said -60% you put in 100 energy to start the fusion, the fusion generates 40 energy 13:46 <+bridge> [ddnet] And you know what @Learath2, these debates were happening 30 years ago already. It's sad that the most people dont care. 13:46 <+bridge> [ddnet] btw we also have another problem 13:46 <+bridge> [ddnet] Ah, you mean it that way 13:47 <+bridge> [ddnet] It's a literal net loss of energy and this is like the PEAK fusion generator humanity ever made 13:47 <+bridge> [ddnet] independent of what energy we will use, just building all the power plants will also generate alot of CO2, bcs we dont shutdown what we have now 13:47 <+bridge> [ddnet] i think like 60% of our budget goes to that 13:47 <+bridge> [ddnet] i think its senseless to discuss this here btw^^ 13:47 <+bridge> [ddnet] humanity and the earth are fucked, no matter what 13:48 <+bridge> [ddnet] and i am happy i dont live a few generations further 13:48 <+bridge> [ddnet] they will have to deal with many problems that we are just pushing backl 13:48 <+bridge> [ddnet] they will have to deal with many problems that we are just pushing back 13:48 <+bridge> [ddnet] i doubt humans will die out bcs of this, but there will be useless wars again xD 13:48 <+bridge> [ddnet] thats not what im saying 13:49 <+bridge> [ddnet] probably, look at russia and ukraine 13:49 <+bridge> [ddnet] anyway fokko, dont be so pessimistic, we should just try and see 13:49 <+bridge> [ddnet] Yea, but if nobody tries, lol.. 13:49 <+bridge> [ddnet] if we then fuck up we've to accept it anyway 13:49 <+bridge> [ddnet] yeah bcs we always debating that's true \:D 13:49 <+bridge> [ddnet] And thats a false pov imo, i dont want to accept things where i did not put 1 cent into 13:49 <+bridge> [ddnet] its sad 13:49 <+bridge> [ddnet] that's also why i'm not against germanys way, if it works, china will follow 13:50 <+bridge> [ddnet] thanks 13:50 <+bridge> [ddnet] bcs doesnt want to loose against anybody 13:50 <+bridge> [ddnet] china ^ 13:50 <+bridge> [ddnet] yea, china is a fucked part of the world anyways 13:50 <+bridge> [ddnet] i mean its working 13:50 <+bridge> [ddnet] but its fucked 13:51 <+bridge> [ddnet] they defs dont like to accept that a democratic land did better than them 13:51 <+bridge> [ddnet] xD 13:51 <+bridge> [ddnet] btw jupeyy why u not on disocrd anymore? 13:51 <+bridge> [ddnet] Imo nuclear reactors push away the problem the longest. Please gimme a call when you find a solution that pushes it away more or entirely removes the problem within this decade 13:52 <+bridge> [ddnet] votez lfi 13:52 <+bridge> [ddnet] thats probably not possible, but as you say, "push away the problem the longest", this is not my mentality 13:52 <+bridge> [ddnet] bcs chillerdragon invited me here, and in discord i get so many tags about GL drivers not working xD 13:52 <+bridge> [ddnet] (@fokkonaut) 13:52 <+bridge> [ddnet] I'll go make some food, need a break from all the nuclear haters 13:52 <+bridge> [ddnet] Mdr 13:52 <+bridge> [ddnet] i dont like that at all 13:52 <+bridge> [ddnet] XD 13:52 <+bridge> [ddnet] xddddddd 13:52 <+bridge> [ddnet] pushing away problems is just stupid imo 13:53 <+bridge> [ddnet] @iParano stop laughing come gores 13:54 <+bridge> [ddnet] im at work u dummkopf ❤️ 13:54 <+bridge> [ddnet] u dummkopf 13:54 <+bridge> [ddnet] :D 13:56 <+bridge> [ddnet] New photos? :kek: 13:57 <+bridge> [ddnet] Not making anything interesting, just a grilled cheese 13:57 <+bridge> [ddnet] grilled on your reactor? :P 13:57 <+bridge> [ddnet] :justatest: 13:58 <+bridge> [ddnet] iparano xDDDDDDDD 13:58 <+bridge> [ddnet] 😄 13:58 <+bridge> [ddnet] stalker 13:58 <+bridge> [ddnet] nononono 13:58 <+bridge> [ddnet] yeyeye 13:58 <+bridge> [ddnet] im on your side actually ) 13:58 <+bridge> [ddnet] ❤️ 13:59 <+bridge> [ddnet] troll 14:00 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/934069970881638460/unknown.png 14:00 <+bridge> [ddnet] bigger icons and no health 14:01 <+bridge> [ddnet] i like it 14:01 <+bridge> [ddnet] very very nice 14:02 <+bridge> [ddnet] Ye 14:05 <+bridge> [ddnet] @Ryozuki Shields can spawn only when frozen 14:06 <+bridge> [ddnet] ? 14:06 <+bridge> [ddnet] thats cool, but i feel like shields should still be displayed 14:06 <+bridge> [ddnet] why 14:07 <+bridge> [ddnet] to see precisely when you unfreez 14:07 <+bridge> [ddnet] to see precisely when you unfreeze 14:07 <+bridge> [ddnet] shields are not precise 14:07 <+bridge> [ddnet] i want to add a loading bar kinda type 14:07 <+bridge> [ddnet] who uses shield to know when unfreeze? 14:07 <+bridge> [ddnet] They are not xdd 14:07 <+bridge> [ddnet] without shield icons you dont see if you hit freeze if 14:07 <+bridge> [ddnet] but i need the graphics 14:07 <+bridge> [ddnet] like 14:07 <+bridge> [ddnet] if youre getting hooked from above, to unfreeze under freeze 14:07 <+bridge> [ddnet] @bencie btw with stars around u you can know too when unfreeze 14:07 <+bridge> [ddnet] then i actualyl look at shield icons 14:08 <+bridge> [ddnet] actually stars are more accurate 14:08 <+bridge> [ddnet] u will see 64 stars if ur frozen 64 seconds 14:08 <+bridge> [ddnet] it looks funn 14:08 <+bridge> [ddnet] funny 14:08 <+bridge> [ddnet] really? xd 14:08 <+bridge> [ddnet] i never look at stars, but now that you mentioned it thats actually really useful 14:08 <+bridge> [ddnet] i never noticed :dDD 14:08 <+bridge> [ddnet] i never noticed :DDD 14:08 <+bridge> [ddnet] lmao 14:09 <+bridge> [ddnet] yeah lol 14:09 <+bridge> [ddnet] a freeze bar coulda ctually look really cool 14:10 <+bridge> [ddnet] yes + 14:10 <+bridge> [ddnet] . 14:11 <+bridge> [ddnet] gotta remember this 14:19 <+bridge> [ddnet] Do we need every symbol shown? 14:19 <+bridge> [ddnet] It would be clean with only used/active symbols 14:20 <+bridge> [ddnet] i like that theyre all shown 14:20 <+bridge> [ddnet] me too 14:20 <+bridge> [ddnet] but i want to add the freeze timer 14:20 <+bridge> [ddnet] its the thing missing 14:20 <+bridge> [ddnet] Could be an option to only show active powerups 14:20 <+bridge> [ddnet] more settings = bad 14:21 <+bridge> [ddnet] we should try to avoid them 14:21 <+bridge> [ddnet] right @heinrich5991 14:21 <+bridge> [ddnet] :monkaS: 14:22 <+bridge> [ddnet] How did you implement it? Via gameinfo flag? 14:22 <+bridge> [ddnet] @fokkonaut no i just added a return to the health render 14:22 <+bridge> [ddnet] I would have removed lower left points, totally unused, instead of shields 14:22 <+bridge> [ddnet] but im adding the flag rn 14:22 <+bridge> [ddnet] Ah 14:22 <+bridge> [ddnet] I would have removed lower right points, totally unused, instead of shields 14:22 <+bridge> [ddnet] @Ryozuki maybe add a flag for both: Hearts and shields and one for the ddrace hud; if both are active, render the ddrace hud below the hearts and shields 14:23 <+bridge> [ddnet] and defaultly only send the ddracehud on ddnet 14:23 <+bridge> [ddnet] anyway thats for later 14:23 <+bridge> [ddnet] i can say in my mod definitely both would be usefull at the same time 14:47 <+bridge> [ddnet] @Learath2 I heard™ that focusing on nuclear for 2050 is too late anyway, it's mainly a future investment 14:47 <+bridge> [ddnet] i.e. building new nuclear reactors now 14:48 <+bridge> [ddnet] You are assuming the usual european speeds of building stuff 14:48 <+bridge> [ddnet] it has to be built in europe 😉 14:48 <+bridge> [ddnet] If we had actual political will we could do them much faster 14:48 <+bridge> [ddnet] but you mean you could accelerate it a bit without sacrificing other stuff 14:48 <+bridge> [ddnet] projects that span longer than a political term is not a thing politicians care much to speed 14:49 <+bridge> [ddnet] imo 14:49 <+bridge> [ddnet] You could accelerate a lot if the government gets involved in the process and the people don't get in the way because they agree 14:49 <+bridge> [ddnet] i wonder if my wording makes sense xd 14:51 <+bridge> [ddnet] China could do it in 5 years back in 2015, as far as I'm aware they only got better at it since then 14:52 <+bridge> [ddnet] They also get it made for very cheap because state monopoly 14:52 <+bridge> [ddnet] :monkaS: 14:52 <+bridge> [ddnet] the kurzgesagt video claims that it's also lack of knowledge on how to build these things 14:53 <+bridge> [ddnet] so unless you let china build them in your country, it might be hard to do so 14:53 <+bridge> [ddnet] knowledge about nuclear reaction stuff is still kept hidden or smth? 14:53 <+bridge> [ddnet] cold war stuff 14:53 <+bridge> [ddnet] ? 14:53 <+bridge> [ddnet] xd 14:54 <+bridge> [ddnet] I'm not particularly against china building them, but the only reason we are so bad at this is because we ignored them after the chernobyl disaster 14:54 <+bridge> [ddnet] Events like this really make me question how much good democracy does in extremely niche fields like this 14:55 <+bridge> [ddnet] What does the average person know about the risk profile of a nuclear reactor? 14:55 <+bridge> [ddnet] the reason why we're bad at building nuclear reactors isn't really relevant in the discussion of whether they'd help 14:55 <+bridge> [ddnet] Or the risk profile of a covid vaccine, in another niche field 14:56 <+bridge> [ddnet] @Learath2 in spain, most politicians are "allied" by energy companies, so it wouldnt be a surprise in germany is kinda the same, and these energy companies probably run coal and dont want nuclear 14:56 <+bridge> [ddnet] s / by / to 14:56 <+bridge> [ddnet] True, so you are saying we just don't have the technology anymore? It is possible that we fell too far behind to make them anymore 14:57 <+bridge> [ddnet] the energy companies in germany got a lot of money because the state forced them to close the nuclear plants IIRC 14:58 <+bridge> [ddnet] In that case we can pay china. Their state monopoly is much more efficient than any private company anyway and they are always happy to knock off a couple million for political leeway 15:34 <+bridge> [ddnet] unrelated to nuclear energy or not, pushing problems away the furthest sounds like a good strategy to me 15:36 <+bridge> [ddnet] thats what oy would say xd 15:36 <+bridge> [ddnet] solving problems sounds good 15:36 <+bridge> [ddnet] solving the problem is even better, but lacking that option, this sounds good 15:36 <+bridge> [ddnet] mh ok 15:36 <+bridge> [ddnet] accepted 15:37 <+bridge> [ddnet] since this is such a complicated problem 15:37 <+bridge> [ddnet] but someone also has to test new things out, else we'll never know what the best way could potentially be 15:37 <+bridge> [ddnet] but we dont lack that option xD 15:38 <+bridge> [ddnet] well we just dont really know 15:38 <+bridge> [ddnet] but yeah we have options 15:38 <+bridge> [ddnet] carbon capture will also be important some day 15:38 <+bridge> [ddnet] we also need to suck the CO2 out again 15:40 <+bridge> [ddnet] Oh, so do you have the battery technology that'll make baseload renewables a possibility? 15:41 <+bridge> [ddnet] Fwiw if either batteries get feasible or tidal energy generation makes a massive technological leap, I'd ofc prefer those aswell. I propose nuclear because 2 decades passed and we still don't have a response to replace baseload coal/gas/nuclear 15:42 <+bridge> [ddnet] batteries are expensive, but investing more money usually also improved it in the long term goal 15:42 <+bridge> [ddnet] I heard™ that carbon capture is worse in every way than just not emitting the carbon 15:42 <+bridge> [ddnet] especially ones that don't need lithium 15:42 <+bridge> [ddnet] yeah the first goal is not emitting it ofc 15:42 <+bridge> [ddnet] (@heinrich5991) 15:42 <+bridge> [ddnet] @fokkonaut what is that option? 15:43 <+bridge> [ddnet] but trees are sadly pretty uneffective 15:43 <+bridge> [ddnet] nature generally isn't built to work so fast 15:43 <+bridge> [ddnet] so we just throw even more energy to it xdd 15:44 <+bridge> [ddnet] Lithium and Cobalt mining is absolutely devastating for nature too, they are also horrible socioeconomically 15:44 <+bridge> [ddnet] apparentyl `std::filesystem` is also affected by this, but it's allowed by the c++ standard (?!) 15:45 <+bridge> [ddnet] go is also affected, python not 15:45 <+bridge> [ddnet] That'd be so C++, just avoiding the issue by leaving it UB 15:46 <+bridge> [ddnet] I guess technically for C++ it depends on the vendor of the stdlib/compiler 15:46 <+bridge> [ddnet] https://old.reddit.com/r/cpp/comments/s8ok0h/possible_toctou_vulnerabilities_in/hti8jyt/ 15:46 <+bridge> [ddnet] https://en.wikipedia.org/wiki/Sodium-ion_battery 15:46 <+bridge> [ddnet] 15:46 <+bridge> [ddnet] since they are more heavy than lithium, they could especially be good for stationary stuff \:D 15:48 <+bridge> [ddnet] Hm, does this not make std::fs pretty much useless? It's quite silly that they've made this decision 15:55 <+bridge> [ddnet] when will someone invent a new type of operating system that focuses on security and speed 15:55 <+bridge> [ddnet] i want to see my no ring, direct memory access OS 15:55 <+bridge> [ddnet] actually the way thinking about kernels could be rethought too 15:56 <+bridge> [ddnet] ok there will still be some kind of core kernel, but everything is more direct 15:56 <+bridge> [ddnet] Direct memory access, no rings?? You are looking for TempleOS 15:56 <+bridge> [ddnet] since no userspace 15:56 <+bridge> [ddnet] in a secure manner ofc \:D 15:57 <+bridge> [ddnet] Have you looked at micro-kernel architectures? I quite like them 15:57 <+bridge> [ddnet] yeah but they are slow 15:58 <+bridge> [ddnet] Well in your ringless architecture there wouldn't be context switches, so you can have very performant micro-kernels 😄 15:58 <+bridge> [ddnet] yeah exactly 15:59 <+bridge> [ddnet] that's why it might work in this case 15:59 <+bridge> [ddnet] maybe i should have said, current ones are usually slow 15:59 <+bridge> [ddnet] isnt windows also micro kernel? 15:59 <+bridge> [ddnet] Btw, "slow" also depends on the application. Nintendo's game consoles have been running micro kernel architectures since the nintendo ds 16:01 <+bridge> [ddnet] Apparently what the NT kernel does is called a "hybrid kernel" 16:07 <+bridge> [ddnet] test 16:07 <+bridge> [ddnet] true, i just think this is a big chance for rust 16:07 <+bridge> [ddnet] bcs this is what rust can do while not trading for performance 16:07 <+bridge> [ddnet] microsoft developed smth like this in c# as something experimental i think 16:07 <+bridge> [ddnet] let me find it 16:07 <+bridge> [ddnet] https://en.wikipedia.org/wiki/Singularity_(operating_system) 16:07 <+bridge> [ddnet] but i doubt it could beat a well written one in rust 16:07 <+bridge> [ddnet] i think the bridge died 16:07 <+bridge> [ddnet] lmao 16:08 <+bridge> [ddnet] C# kernel? How? I thought C# wasn't even compiled, what does it run on? 16:08 <+bridge> [ddnet] nah its not a c# kernel in that sense 16:08 <+bridge> [ddnet] its really just an abstraction, so fuse everything into one big mess 16:09 <+bridge> [ddnet] i also dunno if they aimed to be performaned, but i think they wanted to eleminate the way of seperting userspace from kernel 16:11 <+bridge> [ddnet] It could be quite interesting especially in applications where extreme performance is wanted like servers 16:13 <+bridge> [ddnet] I do wonder how much benefit can be had nowadays though. In the past things like in-kernel webservers were tested and they were indeed very efficient, but with modern syscalls and things like futexes, I wonder how much performance we can get from avoiding the remaining context switches 16:13 <+bridge> [ddnet] i think just for research this might already be interesting, rethinking stuff sometimes also helps develop better stuff generally, e.g. other kernels could profit (maybe) 16:14 <+bridge> [ddnet] yeah sure linux is already insanly fast 16:14 <+bridge> [ddnet] 16:14 <+bridge> [ddnet] maybe completly new processors would profit from it 16:14 <+bridge> [ddnet] I was just about to say that ^^ 16:29 <+bridge> [ddnet] for this thing here it would be really cool if it would be possible/not too much work to only show the icons needed for map? 16:29 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/934107431225675876/unknown.png 16:29 <+bridge> [ddnet] or do i misunderstand the feature a bit? XD 17:30 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/4626 17:30 <+bridge> [ddnet] vote for proper namespaced enums!!! 17:30 <+bridge> [ddnet] imagine being in 2022 17:31 <+bridge> [ddnet] using the enum type on the function signature would make life easier for new and old coders 17:31 <+bridge> [ddnet] does enum class allow values outside the specified ones? 17:32 <+bridge> [ddnet] do u mean that if a func takes a EMyEnum it accept e.g the magic value 4? 17:33 <+bridge> [ddnet] no, if it allows EMyEnum::FLAG1 | EMyEnum::FLAG2 17:33 <+bridge> [ddnet] declares a scoped enumeration type whose underlying type is int (the keywords class and struct are exactly equivalent) 17:33 <+bridge> [ddnet] whether they're still essentially ints 17:33 <+bridge> [ddnet] the underlying type is int 17:33 <+bridge> [ddnet] so i guess yes 17:33 <+bridge> [ddnet] but idk 17:33 <+bridge> [ddnet] "I guess" is bad in C++ 17:33 <+bridge> [ddnet] might be UB ^^ 17:33 <+bridge> [ddnet] ye xd 17:34 <+bridge> [ddnet] ``` 17:34 <+bridge> [ddnet] You need to write your own overloaded operator| (and presumably operator& etc.). 17:34 <+bridge> [ddnet] 17:34 <+bridge> [ddnet] Flags operator|(Flags lhs, Flags rhs) 17:34 <+bridge> [ddnet] { 17:34 <+bridge> [ddnet] return static_cast(static_cast(lhs) | static_cast(rhs)); 17:34 <+bridge> [ddnet] } 17:34 <+bridge> [ddnet] ``` 17:34 <+bridge> [ddnet] @heinrich5991 found it 17:34 <+bridge> [ddnet] i think 17:34 <+bridge> [ddnet] https://stackoverflow.com/questions/32578638/how-to-use-c11-enum-class-for-flags 17:35 <+bridge> [ddnet] > Conversion of an integer to an enumeration type (scoped or not) is well-defined as long as the value is within the range of enumeration values (and UB otherwise; [expr.static.cast]/p10). For enums with fixed underlying types (this includes all scoped enums; [dcl.enum]/p5), the range of enumeration values is the same as the range of values of the underlying type ([dcl.enum]/p8). The rules are trickier if the underlying type is not fixed - 17:36 <+bridge> [ddnet] i found this blog post https://walbourn.github.io/modern-c++-bitmask-types/ 17:36 <+bridge> [ddnet] i love how c++ looks so ugly 17:38 <+bridge> [ddnet] ```cpp 17:38 <+bridge> [ddnet] enum FLAGS_FOR_MYFUNCTION 17:38 <+bridge> [ddnet] { 17:38 <+bridge> [ddnet] FLAGS_NONE = 0x0, 17:38 <+bridge> [ddnet] FLAGS_DO_A_THING = 0x1, 17:38 <+bridge> [ddnet] FLAGS_DISABLE_A_THING = 0x2, 17:38 <+bridge> [ddnet] FLAGS_OPTIONAL_FEATURE = 0x4 17:38 <+bridge> [ddnet] }; 17:38 <+bridge> [ddnet] 17:38 <+bridge> [ddnet] constexpr inline T operator~ (T a) { return static_cast( ~static_cast::type>(a) ); } 17:38 <+bridge> [ddnet] constexpr inline T operator| (T a, T b) { return static_cast( static_cast::type>(a) | static_cast::type>(b) ); } 17:38 <+bridge> [ddnet] constexpr inline T operator& (T a, T b) { return static_cast( static_cast::type>(a) & static_cast::type>(b) ); } 17:38 <+bridge> [ddnet] constexpr inline T operator^ (T a, T b) { return static_cast( static_cast::type>(a) ^ static_cast::type>(b) ); } 17:38 <+bridge> [ddnet] constexpr inline T& operator|= (T& a, T b) { return reinterpret_cast( reinterpret_cast::type&>(a) |= static_cast::type>(b) ); } 17:38 <+bridge> [ddnet] constexpr inline T& operator&= (T& a, T b) { return reinterpret_cast( reinterpret_cast::type&>(a) &= static_cast::type>(b) ); } 17:38 <+bridge> [ddnet] constexpr inline T& operator^= (T& a, T b) { return reinterpret_cast( reinterpret_cast::type&>(a) ^= static_cast::type>(b) ); } 17:38 <+bridge> [ddnet] 17:38 <+bridge> [ddnet] HRESULT MyFunction(FLAGS_FOR_MYFUNCTION flags); 17:38 <+bridge> [ddnet] ``` 17:38 <+bridge> [ddnet] the modern way 17:38 <+bridge> [ddnet] :monkalaugh: 19:49 <+bridge> [ddnet] What about this approach? 19:49 <+bridge> [ddnet] 19:49 <+bridge> [ddnet] #define COLORS {red, green , blue} 19:49 <+bridge> [ddnet] enum Color COLORS; 19:49 <+bridge> [ddnet] static std::set color_set() { 19:49 <+bridge> [ddnet] return COLORS; 19:49 <+bridge> [ddnet] } 19:49 <+bridge> [ddnet] #undef COLORS 19:49 <+bridge> [ddnet] 19:49 <+bridge> [ddnet] From 19:49 <+bridge> [ddnet] https://justshowmethecode.com/code-example/c%2B%2B/a9ft4/how-to-elegantly-put-all-enums-into-a-stdset 19:50 <+bridge> [ddnet] This check enum VS int. 19:50 <+bridge> [ddnet] But one hot encoding style still too be decided. 22:07 <+bridge> [ddnet] Monthly reminder to buy some more Bitcoin … 22:09 <+bridge> [ddnet] don't do it 22:09 <+bridge> [ddnet] especially not by advice from random people on the internet 22:11 <+bridge> [ddnet] @heinrich5991 why would you call chillerdragon random? wtf 22:12 <+bridge> [ddnet] I don't know chillerdragon well enough to take investment advice from him 22:12 <+bridge> [ddnet] buy eth so mine goes up in value 22:14 <+bridge> [ddnet] i hope no one listened to you last month 22:14 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/934194171424686080/unknown.png 22:16 <+bridge> [ddnet] BUY THE DIP ♿ ♿ 22:18 <+bridge> [ddnet] hey it's not investment advice but I did make almost 3k euros just buying random dips 😄 22:21 <+bridge> [ddnet] the trick is to actually not hold on to it 😄 22:29 <+bridge> [ddnet] (remember to pay taxes if you hold bitcoin or similar for less than a year, in DE. can't speak for other countries) 22:43 <+ChillerDragon> (I am not a registerd financial advisor) 22:43 <+ChillerDragon> lul 22:44 <+ChillerDragon> why would you hold bitcoin less than a year? diamond hands 22:45 <+ChillerDragon> @ZombieToad grep irc logs and plot my advises on a btc chart 22:45 <+bridge> [ddnet] when would you sell though? 22:45 <+ChillerDragon> when im 60 and want to buy a house 22:46 <+bridge> [ddnet] then your advice can't really be evaluated until then 22:46 <+ChillerDragon> Im just letting ya guys now that btc is still a thing had a 3 months down trend and 10% drop today so its nice opportunity to take the dip in case anyone of yo forgot that btc is still a thing 22:48 <+bridge> [ddnet] I'll buy a massive amount of bitcoin and if it goes down I'll sue you for my losses 22:48 <+ChillerDragon> yikes 22:48 <+bridge> [ddnet] thanks for the official financial advice chiller :3 22:49 <+ChillerDragon> fak 23:03 <+ChillerDragon> btw i take the grep logs and plot on btc graph back i just did it :D 23:26 <+bridge> [ddnet] ~2000 fps 23:54 <+bridge> [ddnet] this kind of code isn't complicated, nor is it ugly imho, but it's still the kind of code you would write as a library writer. But if you needed to use bitmasks, then you should use something like `namespace Flag { enum { values.. } }` (such you still need to write `Flag::value`), otherwise you should always just prefer to use `static_cast`, or some equivalent. Like I use 23:54 <+bridge> [ddnet] 23:54 <+bridge> [ddnet] ``` 23:54 <+bridge> [ddnet] template constexpr auto Idx(EnumType const & v) { 23:54 <+bridge> [ddnet] return static_cast::type>(v); 23:54 <+bridge> [ddnet] } 23:54 <+bridge> [ddnet] 23:54 <+bridge> [ddnet] template 23:54 <+bridge> [ddnet] constexpr typename std::underlying_type::type & Idx(EnumType & v) { 23:54 <+bridge> [ddnet] return reinterpret_cast::type &>(v); 23:54 <+bridge> [ddnet] } 23:54 <+bridge> [ddnet] ``` 23:54 <+bridge> [ddnet] this kind of code isn't complicated, nor is it ugly imho, but it's still the kind of code you would write as a library writer. But if you needed to use bitmasks, then you should use something like `namespace Flag { enum { values.. } }` (such you still need to write `Flag::value`), otherwise you should always just prefer to use `static_cast`, or some equivalent. Like I use 23:54 <+bridge> [ddnet] 23:54 <+bridge> [ddnet] ```c++ 23:54 <+bridge> [ddnet] template constexpr auto Idx(EnumType const & v) { 23:54 <+bridge> [ddnet] return static_cast::type>(v); 23:54 <+bridge> [ddnet] } 23:54 <+bridge> [ddnet] 23:54 <+bridge> [ddnet] template 23:54 <+bridge> [ddnet] constexpr typename std::underlying_type::type & Idx(EnumType & v) { 23:54 <+bridge> [ddnet] return reinterpret_cast::type &>(v); 23:54 <+bridge> [ddnet] } 23:54 <+bridge> [ddnet] ``` 23:57 <+bridge> [ddnet] this kind of code isn't complicated, nor is it ugly imho, but it's still the kind of code you would write as a library writer. But if you needed to use bitmasks, then you should use something like 23:57 <+bridge> [ddnet] ``` 23:57 <+bridge> [ddnet] namespace FeatureFlag { 23:57 <+bridge> [ddnet] enum Flags : uint32_t { 23:57 <+bridge> [ddnet] debugAllocator = 0x1, 23:57 <+bridge> [ddnet] debugLogging = 0x2, 23:57 <+bridge> [ddnet] }; 23:57 <+bridge> [ddnet] }; 23:57 <+bridge> [ddnet] ``` 23:57 <+bridge> [ddnet] So that you can do `FeatureFlag::debugAllocator`, otherwise if you don't rely on bitmasks you should prefer to use `static_cast`, or some equivalent. Like I use 23:57 <+bridge> [ddnet] 23:57 <+bridge> [ddnet] ```c++ 23:57 <+bridge> [ddnet] template constexpr auto Idx(EnumType const & v) { 23:57 <+bridge> [ddnet] return static_cast::type>(v); 23:57 <+bridge> [ddnet] } 23:57 <+bridge> [ddnet] 23:57 <+bridge> [ddnet] template 23:57 <+bridge> [ddnet] constexpr typename std::underlying_type::type & Idx(EnumType & v) { 23:57 <+bridge> [ddnet] return reinterpret_cast::type &>(v); 23:57 <+bridge> [ddnet] } 23:57 <+bridge> [ddnet] ```