04:36 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048080212430176357/image.png 07:52 <+bridge> [ddnet] Part of challenge or fail? 09:17 <+ChillerDragon> jopstar send skil to write performant code xd 09:17 <+ChillerDragon> I create and write to 18 text files for todays aoc 09:18 <+ChillerDragon> ``0m0.057s`` oof 09:26 <+bridge> [ddnet] Is that slow? 09:26 <+bridge> [ddnet] Cannot judge on the complexity of the tasks 09:28 <+ChillerDragon> wait for the other gamers to share their runtime 10:09 <+bridge> [ddnet] Oops 😄 10:40 <+ChillerDragon> ? 10:45 <+bridge> [ddnet] Irc nobo 10:59 <+ChillerDragon> :c 11:02 <+bridge> [ddnet] It's the bug Heinrich found 11:02 <+bridge> [ddnet] Which was on ddnet website apparently 11:12 <+bridge> [ddnet] the joy of compiling llvm 11:12 <+bridge> [ddnet] keeps me warm at winter 11:13 <+bridge> [ddnet] 😛 11:15 <+bridge> [ddnet] 85C under heavy sustained load 11:15 <+bridge> [ddnet] aka compiling 11:15 <+bridge> [ddnet] i think its normal, i read about 90C or smth 11:16 <+bridge> [ddnet] compiling is even more resource intensive than gaming so its hard to find real compiling temps 11:16 <+bridge> [ddnet] Depends on the cpu I guess 11:16 <+bridge> [ddnet] 5800x 11:16 <+bridge> [ddnet] i think the tpm is 100w? 11:16 <+bridge> [ddnet] its a hot cpu i heard 11:16 <+bridge> [ddnet] Maybe compare against synthetic benchmarks? 11:17 <+bridge> [ddnet] Prime95 should be more taxing than compiling even 11:17 <+bridge> [ddnet] while gaming e.g on dota i get 65-72 11:17 <+bridge> [ddnet] iirc 11:17 <+bridge> [ddnet] maybe i put too little thermal paste 11:18 <+bridge> [ddnet] As long as it covers the top of the cpu you do want as little as possible 11:19 <+bridge> [ddnet] yeah 11:19 <+bridge> [ddnet] i put a pea 11:20 <+bridge> [ddnet] maybe the pea was too small tho 11:21 <+bridge> [ddnet] Well you can check if you have extra paste. See if it covered the entire thing 😄 11:21 <+bridge> [ddnet] i do 11:21 <+bridge> [ddnet] xd 11:22 <+bridge> [ddnet] max mhz is 4850 11:22 <+bridge> [ddnet] rn all cores are running at 4600 11:22 <+bridge> [ddnet] maybe its throttling 11:23 <+bridge> [ddnet] ok ill check this out 11:25 <+bridge> [ddnet] Seems amd says <90 is k 11:27 <+bridge> [ddnet] If not it would shut down 11:28 <+bridge> [ddnet] Nowadays CPUs throttle/reduce boost instead of just shutting down instantly 11:44 <+bridge> [ddnet] damn im jelly 11:44 <+bridge> [ddnet] having to compile template heavy shit all the time on a 2.9GHz 6 core 12:02 <+bridge> [ddnet] im back 12:03 <+bridge> [ddnet] idk if i should let it settle a bit 12:04 <+bridge> [ddnet] rn idling at 31C 12:04 <+bridge> [ddnet] well 31-40 12:06 <+bridge> [ddnet] i had some system fans set to a fixed speed on the mobo 12:06 <+bridge> [ddnet] but now i adjusted them to follow cpu temp xD 12:06 <+bridge> [ddnet] i can definitly hear my nasa pc 12:08 <+bridge> [ddnet] seems like its stable at 81-82 compiling llvm 12:08 <+bridge> [ddnet] i guess its an improvement 12:08 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048193973740634153/image.png 12:09 <+bridge> [ddnet] single core boost is 4.8ghz and when all is at full load it kinda reached 4.7ghz sometimes 12:10 <+bridge> [ddnet] fun test 12:10 <+bridge> [ddnet] ``` 12:10 <+bridge> [ddnet] ❯ openssl speed 12:10 <+bridge> [ddnet] Doing mdc2 for 3s on 16 size blocks: 5174992 mdc2's in 3.00s 12:10 <+bridge> [ddnet] Doing mdc2 for 3s on 64 size blocks: 1428405 mdc2's in 3.00s 12:10 <+bridge> [ddnet] Doing mdc2 for 3s on 256 size blocks: 364764 mdc2's in 3.00s 12:10 <+bridge> [ddnet] Doing mdc2 for 3s on 1024 size blocks: 91642 mdc2's in 3.00s 12:10 <+bridge> [ddnet] Doing mdc2 for 3s on 8192 size blocks: 11401 mdc2's in 3.00s 12:10 <+bridge> [ddnet] Doing mdc2 for 3s on 16384 size blocks: 5667 mdc2's in 3.00s 12:10 <+bridge> [ddnet] Doing md4 for 3s on 16 size blocks: 25496375 md4's in 3.00s 12:10 <+bridge> [ddnet] Doing md4 for 3s on 64 size blocks: 18429772 md4's in 3.00s 12:10 <+bridge> [ddnet] Doing md4 for 3s on 256 size blocks: 9538163 md4's in 3.00s 12:10 <+bridge> [ddnet] Doing md4 for 3s on 1024 size blocks: 3318838 md4's in 3.00s 12:10 <+bridge> [ddnet] Doing md4 for 3s on 8192 size blocks: 468306 md4's in 3.00s 12:10 <+bridge> [ddnet] Doing md4 for 3s on 16384 size blocks: 236379 md4's in 3.00s 12:10 <+bridge> [ddnet] Doing md5 for 3s on 16 size blocks: 36114377 md5's in 3.00s 12:10 <+bridge> [ddnet] Doing md5 for 3s on 64 size blocks: 20944396 md5's in 3.00s 12:10 <+bridge> [ddnet] Doing md5 for 3s on 256 size blocks: 8995503 md5's in 3.00s 12:10 <+bridge> [ddnet] Doing md5 for 3s on 1024 size blocks: 2755487 md5's in 3.00s 12:10 <+bridge> [ddnet] Doing md5 for 3s on 8192 size blocks: 368630 md5's in 3.00s 12:10 <+bridge> [ddnet] Doing md5 for 3s on 16384 size blocks: 185251 md5's in 3.00s 12:10 <+bridge> [ddnet] Doing hmac(md5) for 3s on 16 size blocks: 15471998 hmac(md5)'s in 3.00s 12:10 <+bridge> [ddnet] ``` 13:48 <+bridge> [ddnet] AoC day 2 felt like Sqlite: 13:48 <+bridge> [ddnet] ``` 13:48 <+bridge> [ddnet] create table t(a int, b int); 13:49 <+bridge> [ddnet] .import --csv '|tr " ABCXYZ" ",123123" < day02.in' t 13:49 <+bridge> [ddnet] select sum(b+(4+b-a)%3*3) from t; # Part 1 13:49 <+bridge> [ddnet] select sum((a+b)%3+1+(b-1)*3) from t; # Part 2 13:49 <+bridge> [ddnet] ``` 13:50 <+bridge> [ddnet] No fucking way :feelsbadman: 13:51 <+bridge> [ddnet] Really fiddly to get the calculation right though 14:02 <+bridge> [ddnet] wtf 14:02 <+ChillerDragon> wot 14:02 <+ChillerDragon> hacker 14:02 <+bridge> [ddnet] rewrite linux kernel in 10lines now 14:03 <+bridge> [ddnet] Lol, nice idea 14:04 <+ChillerDragon> okay cool sqlite can import csv didn't know that.. but wtf is this tr and < day02.in thing? looks like shell to me 14:05 <+ChillerDragon> also since when can you calculate rock paper scissor using maffs? xd 14:07 <+bridge> [ddnet] I'm using this years advent of code to dive a bit into haskell 14:07 <+bridge> [ddnet] the first day I built a monstrosity 14:08 <+bridge> [ddnet] but someone showed me how to do stuff better and today I actually feel like I can share the solution 😅 14:08 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048224153867653140/2.hs 14:09 <+bridge> [ddnet] spoilers! 14:09 <+bridge> [ddnet] I just woke up 14:09 <+bridge> [ddnet] :p 14:09 <+bridge> [ddnet] Hm, I was thinking of skipping this year but maybe I’ll just do them all in python to have some practice 14:09 <+bridge> [ddnet] true, but deen already posted a solution here :p 14:09 <+bridge> [ddnet] Late night? 😛 14:09 <+bridge> [ddnet] and I think its fair since I mean we literally say that we are posting solutions ^^ 14:10 <+bridge> [ddnet] Did you hardcod all combinations? Wtf? 14:10 <+bridge> [ddnet] btw I'm open for suggestion on how I can improve my haskell coding 14:10 <+bridge> [ddnet] Did you hardcode all combinations? Wtf? 14:11 <+bridge> [ddnet] I failed the second part of day 2 like 3 times because I didn't change my code correctly xd 14:11 <+bridge> [ddnet] I failed first part for 3 times cuz im fucking dumb 14:11 <+bridge> [ddnet] :feelsbadman: 14:12 <+bridge> [ddnet] The thing is 14:12 <+bridge> [ddnet] I have to convert the data first to json or an array to work with it in javascript 14:12 <+bridge> [ddnet] Cant you read a file 14:12 <+bridge> [ddnet] Line by line 14:13 <+bridge> [ddnet] I can but I'm trying to keep my code as simple as possible 14:13 <+bridge> [ddnet] :monkalaugh: 14:13 <+bridge> [ddnet] And its really easy to convert using a few regex queries 14:15 <+bridge> [ddnet] I created struct that accepts char in constructor and contains assigned value, also it has function to correctly compare with other values:justatest: 14:16 <+bridge> [ddnet] <- Mahdiyar> ``` 14:16 <+bridge> [ddnet] <- Mahdiyar> [string "src/tools.lua"]:393: bad argument #1 to 'TableFlatten' (unexpected nil 14:16 <+bridge> [ddnet] <- Mahdiyar> bam.exe: script error (-t for more detail) 14:16 <+bridge> [ddnet] <- Mahdiyar> 14:16 <+bridge> [ddnet] <- Mahdiyar> ``` 14:16 <+bridge> [ddnet] <- Mahdiyar> what is error? 14:16 <+bridge> [ddnet] https://github.com/ddnet/ddnet/issues/1 14:21 <+bridge> [ddnet] ah, done 🙂 14:21 <+bridge> [ddnet] was there a better method than hardcoding the combinations? 14:21 <+bridge> [ddnet] for my fans 14:21 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048227525047881898/main.cpp 14:22 <+bridge> [ddnet] oh why it sent like txt 14:22 <+bridge> [ddnet] oh why it sent like text 14:22 <+bridge> [ddnet] i sent file 14:22 <+bridge> [ddnet] ```py 14:22 <+bridge> [ddnet] import sys 14:22 <+bridge> [ddnet] from collections import Counter 14:22 <+bridge> [ddnet] input = ["".join(x.split()) for x in open(sys.argv[1] if len(sys.argv) > 1 else "input")] 14:22 <+bridge> [ddnet] c = Counter(input) 14:22 <+bridge> [ddnet] print(c["AX"] * 4 + c["AY"] * 8 + c["AZ"] * 3 + c["BX"] * 1 + c["BY"] * 5 + c["BZ"] * 9 + c["CX"] * 7 + c["CY"] * 2 + c["CZ"] * 6) 14:22 <+bridge> [ddnet] # G:13682 L:11386 14:22 <+bridge> [ddnet] print(c["AX"] * 3 + c["AY"] * 4 + c["AZ"] * 8 + c["BX"] * 1 + c["BY"] * 5 + c["BZ"] * 9 + c["CX"] * 2 + c["CY"] * 6 + c["CZ"] * 7) 14:22 <+bridge> [ddnet] # G:12881 L:13600 14:22 <+bridge> [ddnet] ``` 14:22 <+bridge> [ddnet] 🥹 14:23 <+bridge> [ddnet] hope someone does the next challenge in asm x86 14:24 <+bridge> [ddnet] in smalltalk with all oop principles would be cool 14:24 <+bridge> [ddnet] AoC buisness edition 14:25 <+bridge> [ddnet] AoC business edition 14:28 <+bridge> [ddnet] I will probably do something else for the challenge next time 14:28 <+bridge> [ddnet] Maybe try using nodejs since it has access to filesystem and try getting the lines in an array 14:29 <+bridge> [ddnet] That way my code would work even if the input gets changed 14:30 <+bridge> [ddnet] rust split_terminator is god 14:30 <+bridge> [ddnet] split_terminator? 14:30 <+bridge> [ddnet] https://doc.rust-lang.org/std/primitive.str.html#method.split_terminator 14:30 <+bridge> [ddnet] > Equivalent to split, except that the trailing substring is skipped if empty. 14:31 <+bridge> [ddnet] let v: Vec<&str> = "A.B.".split_terminator('.').collect(); 14:31 <+bridge> [ddnet] assert_eq!(v, ["A", "B"]); 14:31 <+bridge> [ddnet] btw u can collect a tuple into a hashmap seamlessly 14:31 <+bridge> [ddnet] @ReiTW in case u didnt know 14:32 <+bridge> [ddnet] `let guide: HashMap<&str, &str> = inp.split_terminator('\n').map(|x| x.split_once(' ').unwrap()).collect();` 14:32 <+bridge> [ddnet] I used split(" ") 14:32 <+bridge> [ddnet] smth like 14:32 <+bridge> [ddnet] Sounds to me like 14:32 <+bridge> [ddnet] ```js 14:32 <+bridge> [ddnet] "A.B".split(".") // ["A","B"] 14:32 <+bridge> [ddnet] ``` 14:32 <+bridge> [ddnet] in js 14:32 <+bridge> [ddnet] ``` 14:32 <+bridge> [ddnet] &str.split(" ").collect::(); 14:32 <+bridge> [ddnet] ``` 14:32 <+bridge> [ddnet] @Alexander_ my input is not "A.B" tho 14:32 <+bridge> [ddnet] to get a vector 14:32 <+bridge> [ddnet] its "A.B." 14:33 <+bridge> [ddnet] Oh 14:33 <+bridge> [ddnet] I didn't see that one 14:33 <+bridge> [ddnet] "A.B.".split(".") 14:33 <+bridge> [ddnet] 14:33 <+bridge> [ddnet] Array(3) [ "A", "B", "" ] 14:33 <+bridge> [ddnet] Yeyeye 14:33 <+bridge> [ddnet] ``` 14:33 <+bridge> [ddnet] "A.B.".split(".") 14:33 <+bridge> [ddnet] 14:33 <+bridge> [ddnet] Array(3) [ "A", "B", "" ] 14:33 <+bridge> [ddnet] ``` 14:33 <+bridge> [ddnet] Then I'd just use a filter or something to filter out the empty strings in an array 14:34 <+bridge> [ddnet] why collecting to a string tho 14:34 <+bridge> [ddnet] But for you it's better to use that other function which does it automatically 14:34 <+bridge> [ddnet] well i just started the second 14:34 <+bridge> [ddnet] well day 2 part 1 14:35 <+bridge> [ddnet] oh well 14:35 <+bridge> [ddnet] i see a hashmap doesnt make sense here xd 14:35 <+bridge> [ddnet] i should finish the exercise before commenting kek 14:36 <+bridge> [ddnet] well exactly: 14:36 <+bridge> [ddnet] 14:36 <+bridge> [ddnet] ```rust 14:36 <+bridge> [ddnet] let result = line.split(" ").collect::>(); 14:36 <+bridge> [ddnet] 14:36 <+bridge> [ddnet] let opponent = match *result.get(0).unwrap() { 14:36 <+bridge> [ddnet] "A" => Shape::Rock, 14:36 <+bridge> [ddnet] "B" => Shape::Paper, 14:36 <+bridge> [ddnet] "C" => Shape::Scissors, 14:36 <+bridge> [ddnet] _ => panic!("Invalid shape !"), 14:36 <+bridge> [ddnet] }; 14:36 <+bridge> [ddnet] ``` 14:36 <+bridge> [ddnet] I did that 14:36 <+bridge> [ddnet] Y'all making your code readable and shit what the fuck 14:36 <+bridge> [ddnet] what I was always doing is parse the input file, then do what they asked 14:37 <+bridge> [ddnet] My code looked like a shit ton of if statements 14:37 <+bridge> [ddnet] Not my proudest moment tbh 14:47 <+bridge> [ddnet] Yes, I'm piping in tr to translate A -> 1, B ->2 etc 14:48 <+bridge> [ddnet] It felt right to use modulo 3 calculations since you have 3 values, each of which can beat the other. So I tried out a few calculations by hand and saw that it fit 14:49 <+bridge> [ddnet] Ah, good idea too 14:51 <+bridge> [ddnet] I started with that first too and thought "there must be a better way" 14:51 <+bridge> [ddnet] The thing is 14:51 <+bridge> [ddnet] I was using the browser console 14:51 <+bridge> [ddnet] I was too lazy to set up a proper environment 14:52 <+bridge> [ddnet] My thought was: "Oh well no one is gonna see my code so why would I write it properly" 14:52 <+bridge> [ddnet] huge mistake 14:54 <+bridge> [ddnet] That reminds me of a cool project: https://bellard.org/tcc/tccboot_readme.html 15:05 <+bridge> [ddnet] @ReiTW @Alexander_ https://gist.github.com/edg-l/e135c755a61da828666bfde7e87edcd1 15:05 <+bridge> [ddnet] my rusty part 1 15:05 <+bridge> [ddnet] xd 15:06 <+bridge> [ddnet] Hold on a sec im gonna learn brainfuck 15:06 <+bridge> [ddnet] Turn this into a code gold 15:06 <+bridge> [ddnet] Turn this into a code golf 15:07 <+bridge> [ddnet] Jokes aside, your code looks beautiful and readable 15:07 <+bridge> [ddnet] tyty 15:10 <+bridge> [ddnet] ty @Ryozuki 15:11 <+bridge> [ddnet] im considering adding support for gamemodes to ddnet, currently the code expects it to be ddrace in a few places 15:11 <+bridge> [ddnet] would this pr be accepted or nah? 15:11 <+bridge> [ddnet] ho lol tf 15:11 <+bridge> [ddnet] pr it & u'll get ur answer ig 15:11 <+bridge> [ddnet] true, but it's probably a bunch of work 15:11 <+bridge> [ddnet] better ask before i start 15:12 <+bridge> [ddnet] i also thought about using the module but i didnt want to use my brain too much 15:12 <+bridge> [ddnet] so i just hardcoded the match xd 15:13 <+bridge> [ddnet] i also thought about using the modulo but i didnt want to use my brain too much 15:13 <+bridge> [ddnet] a cool thing i like to do is, since most ppl go for golfing or ugly, i try to go for clean and beauty 15:13 <+bridge> [ddnet] kek 15:14 <+bridge> [ddnet] its just so fun to use rust abstractions 15:15 <+bridge> [ddnet] exactly what I'm going to do in the next one 15:25 <+bridge> [ddnet] part 2 15:25 <+bridge> [ddnet] just one from function to my abstractions kek 15:55 <+bridge> [ddnet] gist url starting with dd 15:55 <+bridge> [ddnet] 15:55 <+bridge> [ddnet] cant be luck 15:57 <+bridge> [ddnet] This sounds like https://github.com/teeframe/ddnet-skeleton 16:14 <+bridge> [ddnet] omg it already exists 16:17 <+bridge> [ddnet] teeframe website is down tho 16:21 <+bridge> [ddnet] `[N*N || N <- [1,2,3,4,5]].` 16:21 <+bridge> [ddnet] and ppl complain about rust syntax smh 16:22 <+bridge> [ddnet] "Just learn the syntax" 16:28 <+bridge> [ddnet] ```erlang 16:28 <+bridge> [ddnet] 7> Color = 16#F09A29. 16:28 <+bridge> [ddnet] 15768105 16:28 <+bridge> [ddnet] 8> Pixel = <>. 16:28 <+bridge> [ddnet] <<240,154,41>> 16:28 <+bridge> [ddnet] 9>``` 16:28 <+bridge> [ddnet] ok thats cool 16:29 <+bridge> [ddnet] > Put the binary values of #F09A29 on 24 bits of space (Red on 8 bits, Green on 8 bits and Blue also on 8 bits) in the variable Pixel. 16:29 <+bridge> [ddnet] i dont think i seen first class support for this in other langs 16:30 <+bridge> [ddnet] (this is erlang) 16:31 <+bridge> [ddnet] ```erlang 16:31 <+bridge> [ddnet] 10> Pixels = <<213,45,132,64,76,32,76,0,0,234,32,15>>. 16:31 <+bridge> [ddnet] <<213,45,132,64,76,32,76,0,0,234,32,15>> 16:31 <+bridge> [ddnet] 11> <> = Pixels. 16:31 <+bridge> [ddnet] <<213,45,132,64,76,32,76,0,0,234,32,15>> 16:32 <+bridge> [ddnet] 12> <> = <>. 16:32 <+bridge> [ddnet] <<213,45,132>> 16:32 <+bridge> [ddnet] ``` 16:32 <+bridge> [ddnet] pog 16:39 <+bridge> [ddnet] ```erlang 16:39 <+bridge> [ddnet] < [ddnet] AckNumber:32, 16:39 <+bridge> [ddnet] DataOffset:4, _Reserved:4, Flags:8, WindowSize:16, 16:39 <+bridge> [ddnet] CheckSum: 16, UrgentPointer:16, 16:39 <+bridge> [ddnet] Payload/binary>> = SomeBinary.``` 16:39 <+bridge> [ddnet] :o this is how u would parse a tcp segment 16:39 <+bridge> [ddnet] crazy 16:58 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048266852238884965/unknown.png 16:58 <+bridge> [ddnet] lol 17:04 <+bridge> [ddnet] looks kinda dangerous xd 17:09 <+bridge> [ddnet] hey @deen , do you mind if I share your AOC repo with some people outside of ddnet (friends/uni) ? Your codes are insane 17:12 <+ChillerDragon> jopstar wat about da shield icons they rdy? https://github.com/ddnet/ddnet-data-svg/pull/32 17:17 <+bridge> [ddnet] i still think they should be removed from game.png 17:17 <+bridge> [ddnet] to another file 17:17 <+bridge> [ddnet] it will break all current game.pngs out there 17:18 <+bridge> [ddnet] also i dislike that the shields are randomly placed on the file 17:29 <+bridge> [ddnet] this looks relatively readable to me. is it a list comprehension like `[n*n for n in [1,2,3,4,5]]` in python? 17:29 <+bridge> [ddnet] yeah 17:31 <+bridge> [ddnet] the rough syntax is 17:31 <+bridge> [ddnet] `NewList = [Expression || GeneratorExp1, GeneratorExp2, ..., GeneratorExpN, Condition1, Condition2, ... ConditionM].` 17:32 <+bridge> [ddnet] ```erlang 17:32 <+bridge> [ddnet] [X || X <- [1,2,3,4,5,6,7,8,9,10], X rem 2 =:= 0]. 17:32 <+bridge> [ddnet] [2,4,6,8,10]``` 17:34 <+bridge> [ddnet] =:= is for true equality lol 17:35 <+bridge> [ddnet] what does the other equality do? ^^ 17:35 <+bridge> [ddnet] does haskell have a problem like JS's `===`? 17:37 <+bridge> [ddnet] ```erlang 17:37 <+bridge> [ddnet] 6> 5 =:= 5. 17:37 <+bridge> [ddnet] true 17:37 <+bridge> [ddnet] 7> 1 =:= 0. 17:37 <+bridge> [ddnet] false 17:37 <+bridge> [ddnet] 8> 1 =/= 0. 17:37 <+bridge> [ddnet] true 17:37 <+bridge> [ddnet] 9> 5 =:= 5.0. 17:37 <+bridge> [ddnet] false 17:37 <+bridge> [ddnet] 10> 5 == 5.0. 17:37 <+bridge> [ddnet] true 17:37 <+bridge> [ddnet] 11> 5 /= 5.0. 17:37 <+bridge> [ddnet] false 17:38 <+bridge> [ddnet] ``` 17:38 <+bridge> [ddnet] uff / for a not 17:38 <+bridge> [ddnet] thats hard 17:38 <+bridge> [ddnet] for my brain 17:38 <+bridge> [ddnet] ryozuki, how many language do you know? 17:38 <+bridge> [ddnet] s 17:39 <+bridge> [ddnet] define knowing 17:39 <+bridge> [ddnet] thats always a hard question to answer 17:39 <+bridge> [ddnet] i would even say i dont know c++ 17:40 <+bridge> [ddnet] im not confident in it lol 17:40 <+bridge> [ddnet] u know how to open files 17:40 <+bridge> [ddnet] do basic math 17:40 <+bridge> [ddnet] start a thread 17:40 <+bridge> [ddnet] and know what makes the language unique (does it use pointers, managed memory etc.) 17:40 <+bridge> [ddnet] yeah but u could write much stuff in c++ still 17:40 <+bridge> [ddnet] rust,c++,java,c#,python,js/ts,latex 17:41 <+bridge> [ddnet] i tried lua but i dont know how to open a file on top of my head rn 17:41 <+bridge> [ddnet] i just know its all tables 17:41 <+bridge> [ddnet] xd 17:41 <+bridge> [ddnet] erlang is the first function lang im learning 17:41 <+bridge> [ddnet] well rust takes a lot of bits from functional programming 17:42 <+bridge> [ddnet] from what im learning, pattern matching is the most important thing in functional languages rn? 17:42 <+bridge> [ddnet] xd 17:42 <+bridge> [ddnet] or maybe its a erlang thing 17:42 <+bridge> [ddnet] also that functions are values 17:42 <+bridge> [ddnet] and atoms 17:42 <+bridge> [ddnet] what are atoms? 17:42 <+bridge> [ddnet] an atom is a variable whose value is its name itself iirc 17:43 <+bridge> [ddnet] > Atoms are literals, constants with their own name for value. What you see is what you get and don't expect more. The atom cat means "cat" and that's it. You can't play with it, you can't change it, you can't smash it to pieces; it's cat. Deal with it. 17:43 <+bridge> [ddnet] all lowercase names in erlang are atoms 17:43 <+bridge> [ddnet] ```erlang 17:43 <+bridge> [ddnet] 3> RestaurantMenu = [{steak, 5.99}, {beer, 3.99}, {poutine, 3.50}, {kitten, 20.99}, {water, 0.00}]. 17:43 <+bridge> [ddnet] [{steak,5.99}, 17:43 <+bridge> [ddnet] {beer,3.99}, 17:43 <+bridge> [ddnet] {poutine,3.5}, 17:43 <+bridge> [ddnet] {kitten,20.99}, 17:43 <+bridge> [ddnet] {water,0.0}] 17:43 <+bridge> [ddnet] 4> [{Item, Price*1.07} || {Item, Price} <- RestaurantMenu, Price >= 3, Price =< 10]. 17:44 <+bridge> [ddnet] [{steak,6.409300000000001},{beer,4.2693},{poutine,3.745}] 17:44 <+bridge> [ddnet] ``` 17:44 <+bridge> [ddnet] @heinrich5991 im surprised u never seen atoms :o 17:44 <+bridge> [ddnet] i also never seen that xd 17:44 <+bridge> [ddnet] I didn't know they were called atoms. seen them in lisps before, I think 17:44 <+bridge> [ddnet] called :cat there 17:44 <+bridge> [ddnet] but in erlang they are supposedly useful cuz erlang is all about message passing between processes, and atoms take 4-8 bytes no matter how long its name is 17:44 <+bridge> [ddnet] to tag messages 17:45 <+bridge> [ddnet] its usages seem to be where other languages would use built-in struct members or enumerations? 17:46 <+bridge> [ddnet] > An atom is a literal, a constant with name. 17:46 <+bridge> [ddnet] the oficial erlang definition 17:46 <+bridge> [ddnet] xD 17:46 <+bridge> [ddnet] idk 17:46 <+bridge> [ddnet] https://www.erlang.org/doc/reference_manual/data_types.html#atom 17:46 <+bridge> [ddnet] i only know racket 17:46 <+bridge> [ddnet] a modern dialect of lisp 17:46 <+bridge> [ddnet] @Not Keks u know actually most telecom companies use erlang 17:47 <+bridge> [ddnet] "modern" xd 17:47 <+bridge> [ddnet] it apparently powers 40% of the internet 17:47 <+bridge> [ddnet] or so i read 17:47 <+bridge> [ddnet] crazy 17:47 <+bridge> [ddnet] i thought they use java in germany, that'd explain why it sucks 17:47 <+bridge> [ddnet] erlang/OTP otp literally means open telecom platform 17:48 <+bridge> [ddnet] eh i think erlang makes lot of sense 17:48 <+bridge> [ddnet] for this 17:48 <+bridge> [ddnet] note that erlang can control processes that use other languages 17:48 <+bridge> [ddnet] such as java 17:49 <+bridge> [ddnet] or so i read 17:49 <+bridge> [ddnet] hoinestly i never used or seen any real erlang code in my life 17:50 <+bridge> [ddnet] me neither tbh 17:51 <+bridge> [ddnet] @Not Keks apparently 17:51 <+bridge> [ddnet] whatsapp uses erlang 17:51 <+bridge> [ddnet] man 17:51 <+bridge> [ddnet] did discord change font 17:51 <+bridge> [ddnet] or did i accedentially changed it 17:51 <+bridge> [ddnet] yes and it's awful 17:51 <+bridge> [ddnet] my name looks like trash xD 17:51 <+bridge> [ddnet] look at the letters W and S 17:51 <+bridge> [ddnet] https://www.youtube.com/watch?v=FJQyv26tFZ8 17:51 <+bridge> [ddnet] by a engineer from fb whatsapp 17:52 <+bridge> [ddnet] they did 17:52 <+bridge> [ddnet] the R also looks weird 17:52 <+bridge> [ddnet] kinda if its not full height xD 17:52 <+bridge> [ddnet] WR 17:52 <+bridge> [ddnet] WRACS 17:52 <+bridge> [ddnet] > T-Mobile uses Erlang in its SMS and authentication systems. 17:52 <+bridge> [ddnet] > 17:52 <+bridge> [ddnet] > • Motorola is using Erlang in call processing products in the public-safety industry. 17:52 <+bridge> [ddnet] > 17:52 <+bridge> [ddnet] > • Ericsson uses Erlang in its support nodes, used in GPRS and 3G mobile networks worldwide. 17:52 <+bridge> [ddnet] basically telecom 17:53 <+bridge> [ddnet] which has a shitload of users 17:53 <+bridge> [ddnet] but its not "hype" 17:53 <+bridge> [ddnet] mh crazy 17:53 <+bridge> [ddnet] the silent hero 17:54 <+bridge> [ddnet] https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/erlang.html 17:54 <+bridge> [ddnet] slower than java 17:54 <+bridge> [ddnet] trash 17:54 <+bridge> [ddnet] erlang is slow 17:54 <+bridge> [ddnet] they dont hide it 17:54 <+bridge> [ddnet] xD 17:54 <+bridge> [ddnet] the point of erlang is, scalability and 100% uptime 17:55 <+bridge> [ddnet] u can even replace nodes in place 17:55 <+bridge> [ddnet] but its a bit shitty cuz 17:55 <+bridge> [ddnet] it has lot of history baggage i guess 17:55 <+bridge> [ddnet] the syntax comes from prolog 17:56 <+bridge> [ddnet] and its known to be ugly af 17:56 <+bridge> [ddnet] even erlang ppl themselves say it 17:57 <+bridge> [ddnet] https://benchmarksgame-team.pages.debian.net/benchmarksgame/download/fastest.svg 17:57 <+bridge> [ddnet] 17:57 <+bridge> [ddnet] c, c++, rust 17:57 <+bridge> [ddnet] 17:57 <+bridge> [ddnet] then long time nothing 17:57 <+bridge> [ddnet] 17:57 <+bridge> [ddnet] then c# 17:57 <+bridge> [ddnet] 17:57 <+bridge> [ddnet] to me its clear. i need to learn rust, since i already know c++ 17:57 <+bridge> [ddnet] 17:57 <+bridge> [ddnet] rest is trash xd 17:59 <+ChillerDragon> jopstar: "name a language in which you can open files, do basic math, start a thread, and know if it uses pointers, managed memory etc" ryo: "latext" 18:01 <+bridge> [ddnet] xd 18:01 <+ChillerDragon> legends say ryo ranked global #1 with latex only in 2014 18:02 <+ChillerDragon> in aoc 18:02 <+bridge> [ddnet] u can do it in latex 18:02 <+bridge> [ddnet] its turing complete 18:02 <+bridge> [ddnet] well idk about threads 18:03 <+ChillerDragon> then u can also list css there 18:03 <+ChillerDragon> xd 18:03 <+bridge> [ddnet] yeah forget threads 18:03 <+bridge> [ddnet] is css turing complete? 18:03 <+ChillerDragon> https://stackoverflow.com/a/5239256 18:04 <+ChillerDragon> probably as turing complete as latex 18:04 <+bridge> [ddnet] wtf XDD 18:05 <+bridge> [ddnet] ```erlang 18:05 <+bridge> [ddnet] same(X,X) -> 18:05 <+bridge> [ddnet] true; 18:05 <+bridge> [ddnet] same(_,_) -> 18:05 <+bridge> [ddnet] false.``` 18:05 <+bridge> [ddnet] ```erlang 18:05 <+bridge> [ddnet] same(X,X) -> 18:05 <+bridge> [ddnet] true; 18:05 <+bridge> [ddnet] same(_,_) -> 18:05 <+bridge> [ddnet] false. 18:05 <+bridge> [ddnet] ``` 18:05 <+bridge> [ddnet] damn functional langs 18:05 <+bridge> [ddnet] this is 1 function 18:05 <+bridge> [ddnet] it returns if 2 values are equal 18:06 <+bridge> [ddnet] since variables can only be bound 1 time and cant change 18:06 <+bridge> [ddnet] X is bound to the first value, and then on the second argument it checks if the pattern matches 18:06 <+bridge> [ddnet] aka its the same 18:06 <+bridge> [ddnet] weird stuff 18:07 <+bridge> [ddnet] ryo when pr code snippet syntax coloring to weechat 18:07 <+bridge> [ddnet] https://zillyhuhn.com/cs/.1670000707.png 18:07 <+bridge> [ddnet] this looks plaintext 18:07 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048284389727014932/image.png 18:07 <+bridge> [ddnet] kek 18:13 <+ChillerDragon> bruv sloppy tw designers cloud2 full of edges 18:14 <+ChillerDragon> https://zillyhuhn.com/cs/.1670001119.png 18:14 <+ChillerDragon> https://zillyhuhn.com/cs/.1670001132.png 18:14 <+ChillerDragon> https://zillyhuhn.com/cs/.1670001149.png 18:15 <+bridge> [ddnet] Of course not, go ahead 😄 18:16 <+bridge> [ddnet] smells like prolog 18:16 <+bridge> [ddnet] yeah 18:16 <+bridge> [ddnet] erlang syntax is based on prolog 18:17 <+bridge> [ddnet] Then it will be a good fit for many of these puzzles 18:17 <+bridge> [ddnet] erlang was first implemented in prolog too 18:17 <+bridge> [ddnet] well i hear many times erlang is bad for string manipulation 18:17 <+bridge> [ddnet] prolog too 18:17 <+bridge> [ddnet] it's the worst. many times in prolog I ran out of memory or out of time with simple string manipulations 18:17 <+bridge> [ddnet] even worse than haskell and that's hard 18:18 <+bridge> [ddnet] xd 18:18 <+bridge> [ddnet] apparently erlang was designed by a telecom company, and they never used strings 18:18 <+bridge> [ddnet] or so i read 18:20 <+bridge> [ddnet] Ericson 18:20 <+bridge> [ddnet] Ericson language = Erlang I guess? 18:26 <+bridge> [ddnet] probs xD 18:33 <+bridge> [ddnet] WhatsApp is the use case I always remember when I hear of Erlang: http://highscalability.com/blog/2014/3/31/how-whatsapp-grew-to-nearly-500-million-users-11000-cores-an.html 18:33 <+bridge> [ddnet] > 40 million users per engineer 18:33 <+bridge> [ddnet] > 19B messages in & 40B out per day 18:33 <+bridge> [ddnet] > > 11,000 cores run the Erlang system 18:33 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048290929515167754/image.png 18:33 <+bridge> [ddnet] lol 18:34 <+bridge> [ddnet] > As such, statically typed languages are to be seen as safer than their dynamic counterparts. While this might be true when comparing with many dynamic languages, Erlang begs to differ and certainly has a track record to prove it. The best example is the often reported nine nines (99.9999999%) of availability offered on the Ericsson AXD 301 ATM switches, consisting of over 1 million lines of Erlang code. Please note that this is not an ind 18:36 <+bridge> [ddnet] why are they even over 1 million lines of code xD 18:37 <+bridge> [ddnet] > 18:37 <+bridge> [ddnet] > 18:37 <+bridge> [ddnet] > In-memory Mnesia database using about 2TB of RAM sharded across 16 partitions to store about 18 billion records. 18:37 <+bridge> [ddnet] lol 18:38 <+bridge> [ddnet] mnesia is a db that comes with erlang itself 18:38 <+bridge> [ddnet] https://www.erlang.org/doc/man/mnesia.html 18:40 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048292537208668190/image.png 18:40 <+bridge> [ddnet] this is the switch xD 18:41 <+bridge> [ddnet] > 18:41 <+bridge> [ddnet] > Supports IP, MPLS, ATM, Frame Relay, circuit emulation and voice services 18:41 <+bridge> [ddnet] > The system scales from 10 Gbit/s, in one sub-rack, up to 160 Gbit/s. 18:41 <+bridge> [ddnet] https://www.carritech.com/telecommunications-products/core-network/ericsson-axd-series/ericsson-axd-301/ 18:41 <+bridge> [ddnet] "request a quote" 18:41 <+bridge> [ddnet] i wonder how much it costs 19:27 <+bridge> [ddnet] Well, that was more paper-based result calculating than actual code.. 19:27 <+bridge> [ddnet] Also im quite impressed with your one-line shell solution for day1, @deen :o 19:27 <+bridge> [ddnet] ```bash 19:27 <+bridge> [ddnet] #!/bin/bash 19:27 <+bridge> [ddnet] # Advent of Code 02 19:27 <+bridge> [ddnet] x1=$(sed 's/A X/4/g;s/A Y/8/g;s/A Z/3/g;s/B X/1/g;s/B Y/5/g;s/B Z/9/g;s/C X/7/g;s/C Y/2/g;s/C Z/6/g' "$1" | paste -s -d+ | bc) 19:28 <+bridge> [ddnet] x2=$(sed 's/A X/3/g;s/A Y/4/g;s/A Z/8/g;s/B X/1/g;s/B Y/5/g;s/B Z/9/g;s/C X/2/g;s/C Y/6/g;s/C Z/7/g' "$1" | paste -s -d+ | bc) 19:28 <+bridge> [ddnet] echo "$x1 $x2" 19:28 <+bridge> [ddnet] ``` 19:29 <+bridge> [ddnet] Yes, but too many lines to do the final calculation on paper 😄 19:29 <+bridge> [ddnet] Wadafuk:justatest: 19:32 <+bridge> [ddnet] bash is cursed 19:32 <+bridge> [ddnet] well thats more sed 19:33 <+bridge> [ddnet] Its just like rust, just need to learn the syntax :greenthing: 19:34 <+bridge> [ddnet] https://xkcd.com/1313/ 20:07 <+ChillerDragon> oh cool @Index sed can take multiple patterns i should add that to my toolbox 20:10 <+bridge> [ddnet] wrong ping lmao 20:10 <+ChillerDragon> wotefek 20:10 <+bridge> [ddnet] u pinged a Nana ナナ#6814 20:11 <+ChillerDragon> da hek 20:14 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048316272041021490/image.png 20:14 <+bridge> [ddnet] Stop using irc 20:22 <+bridge> [ddnet] chillerdragon: now do entities and we have enough high res stuff xd 20:32 <+ChillerDragon> ewww entities 20:32 <+ChillerDragon> but yea generic unhook would be nice 20:34 <+ChillerDragon> whats that xd @Ryozuki is that AI generated? 20:35 <+bridge> [ddnet] y 20:35 <+ChillerDragon> good stuff 20:53 <+bridge> [ddnet] i need to leaarn more erlang, maybe it can be useful to do some server side stuff 20:53 <+bridge> [ddnet] how compile only server? 20:53 <+bridge> [ddnet] 20:53 <+bridge> [ddnet] ```cmake -DDOWNLOAD_GTEST=OFF -DCLIENT=OFF ..``` 20:53 <+bridge> [ddnet] not work 20:53 <+bridge> [ddnet] \ 20:53 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048326074917994507/image.png 20:58 <+bridge> [ddnet] `cmake DDNet-Server` should work just fine 21:01 <+bridge> [ddnet] what version r u using 21:01 <+bridge> [ddnet] can i skip GTEST with -DDOWNLOAD_GTEST=OFF ? 21:01 <+bridge> [ddnet] pnglite is not in ddnet anymore 21:02 <+bridge> [ddnet] so its outdated whatever u use 21:02 <+bridge> [ddnet] im building ddnet-pvp 21:02 <+bridge> [ddnet] https://github.com/TeeworldsCN/ddnet-pvp 21:02 <+bridge> [ddnet] yes 21:03 <+bridge> [ddnet] thx :brownbear: 21:03 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048328514702692372/image.png 21:06 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048329320197791864/image.png 21:06 <+bridge> [ddnet] ./DDNet-Server 21:07 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048329499596554328/image.png 21:07 <+bridge> [ddnet] https://tenor.com/view/scam2022-scam-gif-24329035 21:07 <+bridge> [ddnet] :trollet: 21:07 <+bridge> [ddnet] it would have just been easier tbh 21:08 <+bridge> [ddnet] you have been asking for things for weeks 21:10 <+bridge> [ddnet] me?) 21:11 <+bridge> [ddnet] hmm, perhaps it isn't u 21:12 <+bridge> [ddnet] someone was there asking about cmake for days/weeks lol 21:14 <+bridge> [ddnet] it was @- Mahdiyar, nvm 🙂 21:46 <+bridge> [ddnet] hmm, maybe it isn't u 23:18 <+bridge> [ddnet] https://twitter.com/JusticeRage/status/1598649735362945026 23:18 <+bridge> [ddnet] https://twitter.com/gf_256/status/1598104835848798208 23:19 <+bridge> [ddnet] openai rly good 23:36 <+bridge> [ddnet] lol this is poggers 23:36 <+bridge> [ddnet] @deen do you happen to know a way to update a set of rows with their `ROW_NUMBER()`s in a query? 23:37 <+bridge> [ddnet] update ... where row_number() == ? 23:37 <+bridge> [ddnet] haven't tried though 23:38 <+bridge> [ddnet] I want to set a column to the row_number 23:38 <+bridge> [ddnet] Basically, I want to persist an `ORDER BY` 23:39 <+bridge> [ddnet] So I have a `Pos` column on the row. After ordering how I want, now I need to set the `Pos` column 23:39 <+bridge> [ddnet] Why does my question possibly violate their policy? 😄 23:39 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048367954020012192/Screenshot_2022-12-02_at_23.39.44.png 23:40 <+bridge> [ddnet] Pos = ROW_NUMBER() doesn't work? 23:41 <+bridge> [ddnet] https://twitter.com/carnage4life/status/1598332648723976193 23:41 <+bridge> [ddnet] I'm not quite sure how to put the select + order by and the update together :/ 23:41 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048368412012847255/image.png 23:42 <+bridge> [ddnet] I think OpenAI would pass most interviews' soft questions 23:43 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048368950288859166/Screenshot_2022-12-02_at_23.43.50.png 23:44 <+bridge> [ddnet] nice question :o 23:44 <+bridge> [ddnet] it was actually a follow-up to another question I had for it 23:44 <+bridge> [ddnet] but the concurrency model is totally flawed 23:44 <+bridge> [ddnet] rust allows actually using mutexes in a completly safe way 23:44 <+bridge> [ddnet] Oh well, fooled me since I don't know it 😄 23:44 <+bridge> [ddnet] not just message passing 23:45 <+bridge> [ddnet] and mutexes are usually faster? as far as i know 23:45 <+bridge> [ddnet] so yeah, a rust dev would call this a bit bs tbh 23:45 <+bridge> [ddnet] really? 23:45 <+bridge> [ddnet] yeah 23:46 <+bridge> [ddnet] message passing is a way to do things but in rust you can use mutexes 23:46 <+bridge> [ddnet] and read write locks 23:46 <+bridge> [ddnet] in a completly safe way 23:46 <+bridge> [ddnet] if u dont use unsafew 23:46 <+bridge> [ddnet] because of the Send + Sync traits 23:46 <+bridge> [ddnet] https://doc.rust-lang.org/nomicon/send-and-sync.html 23:47 <+bridge> [ddnet] I seem to need something like a join but with update 23:47 <+bridge> [ddnet] for what? 23:48 <+bridge> [ddnet] I should always add Bible style to the answers, more fun 23:48 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/1048369994850902076/Screenshot_2022-12-02_at_23.47.51.png 23:48 <+bridge> [ddnet] lol 23:50 <+bridge> [ddnet] non-iostreams are suicide 23:51 <+bridge> [ddnet] strtok 23:51 <+bridge> [ddnet] rust better 23:52 <+bridge> [ddnet] split + iterators ftw 23:52 <+bridge> [ddnet] 🦐 23:52 <+bridge> [ddnet] yeah 23:52 <+bridge> [ddnet] i don't like the c way either 23:52 <+bridge> [ddnet] c++ dopesnt even handle utf8 well by def 23:52 <+bridge> [ddnet] u just have to use wide implementations 23:52 <+bridge> [ddnet] wstring and prepending literals with L"" 23:52 <+bridge> [ddnet] u can still have bad utf9 23:52 <+bridge> [ddnet] utf8 23:52 <+bridge> [ddnet] yeah 23:52 <+bridge> [ddnet] in rust its just UB to have bad utf8 23:53 <+bridge> [ddnet] so if u dont use unsafe u dont have bad utf8 23:56 <+bridge> [ddnet] neat 23:57 <+bridge> [ddnet] good good 23:57 <+bridge> [ddnet] :BASED: