08:02 <+bridge> [ddnet] <Дядя Женя> Well, you just literally guessed the exact problem. Wanna become programmer? 08:07 <+bridge> [ddnet] huh fun 😄 08:53 <+bridge> [ddnet] @Learath2 I made it onto the global leaderboard \o/ 09:58 <+bridge> [ddnet] https://adventofcode.com/2020/leaderboard 10:26 <+bridge> [ddnet] @heinrich5991 congrats! 10:32 <+bridge> [ddnet] awesome :D 11:00 <+bridge> [ddnet] Wow perseverance! Congrats 13:13 <+ChillerDragon> heinrich pro 13:13 <+ChillerDragon> i wonder why there is not a single add in the leaderboard 13:14 <+ChillerDragon> wouldnt it be fun for a company to pay a team to get in the leader board under the name company.com/jobs xd 13:14 <+bridge> [ddnet] ad? 13:14 <+ChillerDragon> ye ad not add 13:14 <+bridge> [ddnet] there is a ad on the right side 13:14 <+bridge> [ddnet] but its not intrusive 13:14 <+ChillerDragon> no i dont mean like from aoc it self 13:14 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/792002352504373268/unknown.png 13:14 <+ChillerDragon> but from users climbing the board to self ad 13:15 <+bridge> [ddnet] ah 13:15 <+ChillerDragon> or companys representing them self there 13:15 <+bridge> [ddnet] i guess u would get banned 13:15 <+ChillerDragon> oh rude 13:24 <+bridge> [ddnet] it’s cheaper for companies to buy ads than waste working hours on it 13:25 <+bridge> [ddnet] How i turn off the xmas skins? 13:27 <+bridge> [ddnet] @Trafalgar Law only possible server-side 13:27 <+bridge> [ddnet] or choose a skin that has no christmas version 13:28 <+bridge> [ddnet] Well, you could locally copy your skin myskin.png into santa_myskin.png 13:28 <+bridge> [ddnet] then you don't see it, but others still will 13:33 <+bridge> [ddnet] Since everyone is complaining, I'll disable events on DDNet servers :/ 13:35 <+bridge> [ddnet] Oh wait, it's actually client-side. So just `events 0` in console should work 13:41 <+bridge> [ddnet] @deen not everyone, ofc u will only hear ppl who come here and complain 13:41 <+bridge> [ddnet] i think russia doesnt celebrate xmas btw 13:41 <+bridge> [ddnet] they celebrate later in january 14:00 <+ChillerDragon> toggle event based on timezone lul 14:25 <+ChillerDragon> can we get ddnet to write logfiles relative to ~/.teeworlds/dumps to avoid confusion when switching from vanilla to ddnet or vice versa? 15:35 <+bridge> [ddnet] Can we get vanilla to not randomly interpret paths relative to /dumps instead? 15:36 <+bridge> [ddnet] And there were people from the companies playing AoC. A guy from spotify and github were up there for the first week but I guess none ended up in the final leaderboard 15:53 <+ChillerDragon> did they use spotify and github as their username tho? Or just their private name 15:54 <+ChillerDragon> yea its probably a weird idea to use one dood to represent a big company xd 15:54 <+ChillerDragon> we should try next year to get ddnet.tw in the leaderboard ;D 15:54 <+bridge> [ddnet] They had a tag next to their names 15:54 <+ChillerDragon> ah 15:55 <+bridge> [ddnet] They had a couple ppl playing but dont forget these ppl have full time jobs at their respective companies 15:55 <+bridge> [ddnet] Full time competitive coders are a different breed 15:56 <+bridge> [ddnet] Twilio also had one of theirs up there 16:04 <+ChillerDragon> so me expecting to see a company there wasnt too absurd i guess 16:05 <+ChillerDragon> heinrich is a different kind of breed than twilio github and spotify o.O hehe 16:20 <+ChillerDragon> https://www.youtube.com/watch?v=uqHjc7hlqd0 I can rly recommend this video if you want to get into bash scripting :) it is by far the most informative i found in the last years and keep returning to it to look things up 16:20 <+ChillerDragon> pattern match listing variables is so strong and i have never seen similar in other languages 16:25 <+bridge> [ddnet] ChillerDragon can u show an example 16:28 <+ChillerDragon> see i have this list of vars prefixed with acc_ https://github.com/DDNetPP/server/blob/23ef67af0cb5b727bcd2545618a912408f906204/lib/fddr-parse-accounts.sh#L37-L79 and ``${!acc_@}`` expands to all of them. Then i iterate over them to print them all https://github.com/DDNetPP/server/blob/23ef67af0cb5b727bcd2545618a912408f906204/lib/fddr-parse-accounts.sh#L306-L312 16:28 <+ChillerDragon> you can also iterate over them and get the value 16:29 <+ChillerDragon> or you can also get the value of the variable with the name held in in a variable xd 16:36 <+ChillerDragon> @rqza als ob du daily uploads bis 2021 machst o.O dezember yt money iz da :D 16:37 <+ChillerDragon> @onbgy unmute me in #fng readonly soks 16:49 <+bridge> [ddnet] 😄 Hab meine Videos nicht monetarisiert, aber ja 🎄😇 18:03 <+bridge> [ddnet] Todays AOC is breaking diffie hellman, huh 19:45 <+bridge> [ddnet] @jao it's cheaper use texnonik instead 2 workers ... 21:33 <+bridge> [ddnet] I googled an algorithm for the discrete logarithm problem. Anybody did the maths themselves? 21:41 <+bridge> [ddnet] How can newbies see all srvs? 21:41 <+bridge> [ddnet] A friend can just see novice srv 21:42 <+bridge> [ddnet] clear the search bar at the bottom 21:50 <+bridge> [ddnet] That default exclude filter is very counterintuitive 21:53 <+bridge> [ddnet] @timakro no need for math today. brute force worked in reasonable time 22:07 <+bridge> [ddnet] @heinrich5991 How? Both "loop numbers" aka exponents are in the millions. I only saw the 10-thousands ticking up every second or so. The babystep-giantstep algorithm solved it in no time 22:08 <+bridge> [ddnet] I guess ~15 minutes bruteforce would be ok 22:09 <+bridge> [ddnet] my bruteforce is 10s 22:09 <+bridge> [ddnet] in unoptimized python 22:09 <+bridge> [ddnet] Send code :D 22:10 <+bridge> [ddnet] ```py 22:10 <+bridge> [ddnet] for i in count(1): 22:10 <+bridge> [ddnet] dexp += 1 22:10 <+bridge> [ddnet] dnum = (dnum * 7) % mod 22:10 <+bridge> [ddnet] if dnum == door: 22:10 <+bridge> [ddnet] break 22:10 <+bridge> [ddnet] ``` 22:10 <+bridge> [ddnet] I bet this would have overflowed for me 22:10 <+bridge> [ddnet] overflowed? 22:10 <+bridge> [ddnet] Wait I read that wrong 22:11 <+bridge> [ddnet] Theres another loop around that trying different `i` i suppose 22:11 <+bridge> [ddnet] no 22:11 <+bridge> [ddnet] just one loop 22:11 <+bridge> [ddnet] What 22:11 <+bridge> [ddnet] ignore the i there, it seems like I changed my idea of how this is supposed midway through 22:12 <+bridge> [ddnet] imagine it's a `while True:` instead 22:12 <+bridge> [ddnet] Oh 22:12 <+bridge> [ddnet] It was so easy 22:12 <+bridge> [ddnet] ```py 22:12 <+bridge> [ddnet] dexp = 0 22:12 <+bridge> [ddnet] dnum = 1 22:12 <+bridge> [ddnet] while True: 22:12 <+bridge> [ddnet] dexp += 1 22:12 <+bridge> [ddnet] dnum = (dnum * 7) % mod 22:12 <+bridge> [ddnet] if dnum == door: 22:12 <+bridge> [ddnet] break 22:12 <+bridge> [ddnet] ``` 22:12 <+bridge> [ddnet] maybe like this 22:13 <+bridge> [ddnet] what did you do? ^^ 22:13 <+bridge> [ddnet] I'm genuinely am confused what problem the "babystep-giantstep" algorithm solves then 22:13 <+bridge> [ddnet] If not this 22:14 <+bridge> [ddnet] my algorithm runs in O(n) 22:14 <+bridge> [ddnet] Right, that one in O(sqrt(n)) 22:14 <+bridge> [ddnet] babystep giantstep runs in O(√n) 22:14 <+bridge> [ddnet] where n is 20 million smth 22:14 <+bridge> [ddnet] ye 22:15 <+bridge> [ddnet] I wrote a function to calc the modular exponent first which had your loop inside and then called that function in a loop haha 22:16 <+bridge> [ddnet] Didn't realize you could do it simply like that ^^ 22:16 <+bridge> [ddnet] ah, that's O(n²) ^^ 22:17 <+bridge> [ddnet] python has modular exponentiation and inverses built-in btw 22:17 <+bridge> [ddnet] Well, that was a brainfart. But now I've got a super overkill solution https://github.com/timakro/rust-unsorted/blob/main/aoc25/src/main.rs 22:17 <+bridge> [ddnet] nice 🙂 22:17 <+bridge> [ddnet] Wdym built-in? 22:17 <+bridge> [ddnet] `pow(base, exponent, mod)` 22:17 <+bridge> [ddnet] uh 22:18 <+bridge> [ddnet] `pow(base, -1, mod)` for modular inverses 22:18 <+bridge> [ddnet] `pow(number, -1, mod)` for modular inverses 22:18 <+bridge> [ddnet] What python module is that? 22:19 <+bridge> [ddnet] without imports 22:19 <+bridge> [ddnet] just the standard pow function 22:19 <+bridge> [ddnet] Omg! 22:19 <+bridge> [ddnet] (if you use `from math import *` you get a different pow function!) 22:19 <+bridge> [ddnet] Good that there is `math.pow` without that functionality to distract from the fact that there is a better pow function built-in 😄 22:20 <+bridge> [ddnet] 😄 23:31 <+ChillerDragon> anyone good with bash completion here? Or do you know a tool that has bash completion for files in a directory? 23:33 <+ChillerDragon> nvm got it