00:00 < bridge> More Like 7000 more Lines of Text/Code (every month), 03:48 <+ws-client> omg @jxsl13 you already did huffman in golang -.- i just spent 3 days on that shit xd 03:48 <+ws-client> i know you said you wanted to do it at some point but i thought you never started 04:01 < bridge> does the client know the server version? 04:35 <+ws-client> dont think so @totar 04:35 <+ws-client> but not sure 04:36 < bridge> I was thinking the same but I didn't look very hard 04:36 <+ws-client> i mean there is /info :D 04:38 <+ws-client> @jxsl13 @Learath2 how do go variable naming? if i have a struct `node` how do i call the instance variable? 04:38 <+ws-client> Seems like some people like single letter variable names those make me nervous. Is that really the good golang style? 04:40 <+ws-client> I can't call the struct `Node` because it should be private. I can't shorten it without being weird `nod` `nd` or using a single letter which seems wrong `n`. I can't prefix the struct with `snode` because nobody seems to do that ._. 04:40 < bridge> wdym /info? 04:41 < bridge> oh the server command lol 04:41 <+ws-client> ye you can scrape that from the chat message 04:41 <+ws-client> even commit hash :D 04:42 < bridge> I don't have any immedate use for it, I was just wondering if the server is already sending it 04:42 < bridge> I don't have any immediate use for it, I was just wondering if the server is already sending it 04:42 < bridge> I just thought it is weird that the server uses client version to check for client capabilities but the client uses server cap flags to check for server capabilities. I figure they could both just use version? 04:43 <+ws-client> ouuu or should i call my struct `huffmanNode` ? but that is also discouraged if the package is already called huffman 04:44 <+ws-client> @totar allows for custom servers implementing partial capabilities 04:44 < bridge> could call it huffTreeNode of HTreeNode or HNode 04:44 <+ws-client> oh right 04:44 <+ws-client> i could call it treeNode 04:45 <+ws-client> not too nice i like node -.- 04:45 < bridge> but the client doesn't get this privilege 😅 04:45 <+ws-client> then add that feature @totar 04:46 < bridge> I'm not really interested in disrupting network protocol that much for something I don't need anyway lol 04:47 <+ws-client> disruptive technology is the future 04:47 <+ws-client> like 0.7 04:48 < bridge> yes but ddnet protocol is like blockchain, you can never delete it later 04:48 <+ws-client> so ddnet-pg is like bitcoin gold? 04:48 < bridge> lol 04:53 <+ws-client> the standard library should be the gold standard of ones language style guides right? 04:53 <+ws-client> So single letter instance variables it is ... :c 05:11 <+ws-client> they didn't even bother to call stringReader reader or something :D 05:11 <+ws-client> https://github.com/golang/go/blob/45967bb18e04fa6dc62c2786c87ce120443c64f6/src/fmt/scan.go#L86-L93 06:29 < bridge> morning peeps 06:34 < bridge> morning golang enjoyers and others 08:08 < bridge> var node node ? 08:09 < bridge> ```go 08:09 < bridge> node := node{ 08:09 < bridge> // .... 08:09 < bridge> } 08:09 < bridge> ``` 08:14 < bridge> https://github.com/jxsl13/twapi/blob/master/compression/huffman.go 09:42 < bridge> Damn golang looks horrible 10:19 < bridge> the server capabilities is so that custom servers can customize the client instead of opting into lots of ddrace features by version number 10:20 < bridge> what can we do against reimplementing every simple library into every programming language? 10:21 < bridge> so much wasted time, the computer already knows how to huffman-decode 12 ways, why can't we easily reuse that… 10:22 < bridge> ya think? i find golang to be pretty good in terms of readability 10:30 < bridge> golang in particular seems to have a "write it again yourself from scratch" sentiment, kinda like c 10:31 < bridge> I see so many projects that implement tons of basic stuff in their repo instead of using library's idk why 10:33 < bridge> Yeah but some of them are used for stuff that the server has no reason to customize and should just be version based. 10:33 < bridge> I think go doesn't interoperate well with C ABIs, perhaps that's why 10:33 < bridge> can you give an example? 10:33 < bridge> SERVERCAPFLAG_SYNCWEAPONINPUT 10:34 < bridge> this is just a flag that says the server fixed a bug 10:35 < bridge> yea, I suppose that could be a version 10:36 < bridge> also SERVERCAPFLAG_PINGEX ? 10:37 < bridge> someone wants to remove ping? 10:37 < bridge> actually I have no idea what this does 10:39 < bridge> yea, that, too 10:39 < bridge> ok I guess it just changes the ping protocol 10:40 < bridge> it says that the server supports the better ping protocol 10:40 < bridge> yeah I see that now 10:40 < bridge> I thought it was doing the reverse initially 10:47 < bridge> @learath2 did you know go wastes cpu cycles on storing args/return values on the stack? oO https://dr-knz.net/go-calling-convention-x86-64.html 10:48 < bridge> lol 10:48 < bridge> have you seen this? 10:48 < bridge> https://www.dolthub.com/blog/2023-10-20-golang-pitfalls-3/ 10:48 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1248196873345437746/image.png?ex=6662c96c&is=666177ec&hm=ad324df6862d727dabd77782ee852c634e7f6930d1bdb905bdcddb0d32fa3635& 10:52 < bridge> Yep, it all has to go through cgo which is slow 10:52 < bridge> is there a way to fix that? 10:53 < bridge> what would I need to do to create a go-native library? 10:53 < bridge> I want to write it in a language that's not go 10:53 < bridge> Yes, gccgo doesn't have the same issue 10:53 < bridge> and it should compile using the standard go command, not cgo 10:54 < bridge> Ah you want the library to be go native but not in go. Hm, I think you have not much of a choice there 10:55 < bridge> how is the go standard library implemented? it needs to have some sort of (I'm missing the word here, backdoor?) so that it can implement syscalls, call winapi, etc.. 10:56 < bridge> chatgpt does not know the missing word here 10:57 < bridge> @learath2 does go have the ability to link libraries in binary format? does it have a way of writing functions in assembly? 10:57 < bridge> @learath2 does go have the ability to link go-native libraries in binary format? does it have a way of writing functions in assembly? 11:14 < bridge> iirc go does raw syscalls on linux 11:14 < bridge> or maybe they changed that 11:15 < bridge> but how does it do them? compiler support? 11:16 < bridge> or can you somehow express syscalls in go, e.g. via assembly? 11:16 < bridge> Uhm, you can link in assembly, they generate syscall stubs which they call into 11:16 < bridge> a-ha! 11:16 < bridge> Uhm, you can link to assembly, they generate syscall stubs which they call into 11:17 < bridge> so I can compile my non-go library (using go calling convention) to assembly and then link to it using go? 11:17 < bridge> https://tip.golang.org/src/cmd/compile/abi-internal 11:18 < bridge> This document describes Go’s internal application binary interface (ABI), known as ABIInternal. Go’s ABI defines the layout of data in memory and the conventions for calling between Go functions. This ABI is unstable and will change between Go versions. If you’re writing assembly code, please instead refer to Go’s assembly documentation, which describes Go’s stable ABI, known as ABI0. 11:18 < bridge> https://tip.golang.org/doc/asm 11:21 < bridge> Oh actually, they don't do this entirely in asm anymore. They ported the argument preparation and return retreival to go. So there is only one part remaining and that's the very call itself. With `RawSyscall` 11:21 < bridge> You'll have abi issues as ryozuki pointed out 11:22 < bridge> But yes, you can sort of make it work if your library is ABI0 compatible 11:23 < bridge> why only sort of make it work? 11:23 < bridge> ah, because it's abi0 intead of abiinternal? fair enough 11:24 < bridge> Calls between them work fine but there is some overhead iirc. (much much less than cgo) 11:34 < bridge> this actually looks pretty cool. perhaps we should make a abi0-go-asm backend for llvm ^^ 11:34 < bridge> so that go can finally use libraries written in other languages without a lot of overhead 11:36 < bridge> Tbh, I don’t know how the calls to such libraries would look like from go. You need to mark your function abi0 on the assembly so go calls it with that convention. You’d have to generate a trampoline on the go side still even if empty 11:37 < bridge> why do I need a trampoline? 11:37 < bridge> I wonder if there is some deep dark part of the library that has a way to cast an unsafe uintptr to a function pointer to an abi0 function 11:38 < bridge> have to go (haha) now, but I'm interested in getting back to this. write your comments, I'll read them 11:38 < bridge> Say you load your new library into memory. Put it into executable memory, how do you call into it? Get a pointer to the symbol, and cast it to a function pointer. Go will assume it’s ABIInternal when calling it, there is no way to mark that function pointer ABI0 afaik 11:39 < bridge> Atleast not one I know, but I’m fairly new with go anyway so idk 11:55 < bridge> https://words.filippo.io/rustgo/ someone gave something like this a try 11:56 < bridge> I swear discord are the worst in app dev 11:57 < bridge> Since the last update I have to click a bit above 11:58 < bridge> ah nice, I had something like this in mind 12:01 < bridge> They took the trampoline approach though, not getting llvm to spit out abi0 compatible symbols 😄 13:11 < bridge> https://ir.amd.com/news-events/press-releases/detail/1201/amd-accelerates-pace-of-data-center-ai-innovation-and 13:41 < bridge> https://news.ycombinator.com/item?id=40594533 15:52 < bridge> https://cdn.discordapp.com/attachments/976556089611018322/1248272972708446268/2024-06-06-155056_1916x1076_scrot.png?ex=6663104c&is=6661becc&hm=47e486f35513ce297f7886c5b651ae79e26d37e157020cc9556f19f0b3e9e491& 15:52 < bridge> 15:52 < bridge> 🙂 16:20 < bridge> Заходи сюда срочно !!! Мы тебя ждём !! discord.gg/gametrash 16:28 < bridge> @blaiszephyr 16:28 < bridge> spacex did a masterclass at the end aswell 16:29 < bridge> I DIDNT SEEE 16:29 < bridge> FUUUUUU 16:29 < bridge> almost perfect, mostly, it was damn amazing 16:29 < bridge> lmaoo rip watch replay 16:29 < bridge> they lost a wing but it soft landed aswell 16:31 < bridge> Eh wtf that works? How do I know which is type and which is variable then 16:31 < bridge> https://jcdav.is/2015/10/06/SIGSEGV-as-control-flow/ 16:31 < bridge> func nodder(node node) {} 16:40 < bridge> *nods* 16:41 < bridge> you know by semantics 16:41 < bridge> where a variable is expected, tue variable is used 16:41 < bridge> the 16:41 < bridge> and vice versa 16:43 < bridge> Coming from C the Symantics im used to are swapped so it’s confusing 16:44 < bridge> But ye is it good style to name variables the same as structs? 16:53 < bridge> @blaiszephyr https://youtu.be/rXRVtt8M9oY?t=1184 17:04 < bridge> Hostnames can't have spaces, but my printer announces it's name with spaces, does anyone know how one is supposed to encode spaces when tyring to resolve it using mdns? 17:10 < bridge> I called my node variable n 17:10 < bridge> so, it doesn't matter how you call it 17:10 < bridge> figured it out, these things get a different hostname if they advertise a name with spaces and shit 18:10 < bridge> https://davidlattimore.github.io/posts/2024/06/05/speeding-up-rustc-by-being-lazy.html 19:32 < bridge> I often use one letter names to annoy people that care about variable naming too much 19:33 < bridge> i use them all the time 19:33 < bridge> as long as they're only rly used in like narrow scope 19:33 < bridge> i thought everyone did that 19:46 < bridge> huffman is a fuckup in itself, good variable names will not help anyway, gotta comment your code for yourself and the rest of the world or do it like I did, iterate until the implementation works and be happy. 19:46 < bridge> that's usually the go to tradeoff 21:10 < bridge> does this make sense 21:10 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1248353372944466080/Screenshot_20240606-211003.png?ex=66635b2d&is=666209ad&hm=6226bddc4c68881edad3bf43e689e4db036372c12e137c8879c88cb35f8e0d55& 21:14 < bridge> Well having a chat never hurts. Why did you expose the head hunter like this? 😄 21:18 < bridge> xd 21:18 < bridge> ok ill delete 21:18 < bridge> but 600k seems unreal 21:23 < bridge> If anyone is paying that much it's those companies he mentioned 😄 21:24 < bridge> But yeah sounds a little insane to me too 21:39 < bridge> 600k crazy 21:39 < bridge> euro? 21:44 < bridge> at least not pounds 🙏 23:39 < zombietoad> hello is anyone still on irc 23:39 < zombietoad> @deen @heinrich5991 23:40 < zombietoad> i got banned from ddnet servers for EVA 23:40 < zombietoad> i think it is not a fair ban 23:40 < zombietoad> i am requesting unban 23:40 < zombietoad> is @Lereath2 here 23:40 < zombietoad> @learath2 * 23:41 < zombietoad> @snailx3 23:41 < zombietoad> @skeith 23:41 < zombietoad> is anyone here 23:41 < zombietoad> @Q 23:42 < bridge> did u try to ping qshar 23:42 * zombietoad slaps ChillerDragon around a bit with a large fishbot 23:42 < zombietoad> idk 23:42 < zombietoad> theres someone on irc named @Q 23:42 < zombietoad> also KOG SUCKS 23:43 < zombietoad> @learath2 @snailx3 @gdin @skeith @robyt 23:43 < zombietoad> @murpi @deen 23:44 < zombietoad> @melon 23:44 < zombietoad> HELPPPPPPPPPPPPPPPPPPPPP 23:44 < zombietoad> i need to play dummy drag race network 23:45 < bridge> Your help request has been received, your ban is now permanent. Thank you for contacting ddnet customer service 23:45 < zombietoad> NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO 23:46 < zombietoad> i want permanent unban 23:46 < zombietoad> not ban pls 23:47 < zombietoad> @learath2 is bully i want new judge 23:47 < zombietoad> @deen pls wake up 23:47 < zombietoad> the admins online are not nice 23:47 * zombietoad slaps deen around a bit with a large fishbot 23:47 * zombietoad slaps deen around a bit with a large fishbot 23:48 * zombietoad slaps deen around a bit with a large fishbot 23:48 < zombietoad> gdin was nice admin where did he go 23:48 < bridge> Your request for a new judge has been received. It will be processed in 10 to 12 months 23:48 < zombietoad> toxic ddnet leadership has pushed out the good staff :( 23:49 < bridge> This is the first time i've seen Learath having fun trolling someone. Respect zombie toad 23:49 < bridge> That must be personal xD 23:49 < bridge> No more nice people around, you should probably just permanently leave this very toxic community 23:49 < bridge> i think your chances of success would be way higher had you pinged someone one time and left it there. also just depends on what you did for the ban in the first place 23:50 < bridge> even if you didn't ping the right guy there are lots of eyes on the general chat so someone would have seen it anyway lol 23:50 < bridge> i have personally seen deen humor tickets 23:50 < bridge> like 23:50 < bridge> just chill 23:51 < zombietoad> every second without ddrace is pain 23:51 < zombietoad> i cannot take it 23:51 < bridge> :( 23:52 < bridge> good thing we have lan servers 23:52 < bridge> no points on lan servers 23:52 < bridge> Your request for an addiction counselor has been received. An addiction counselor will contact you within 2 to 4 weeks. We apologize for the delay 23:54 < zombietoad> @lagar help 23:54 < zombietoad> @Lagar 23:54 < bridge> it's over dude 23:54 < zombietoad> ur turkish friend learath is hate me 23:54 < bridge> u think lagar can trump lerato 23:54 < zombietoad> pls tell him im nice 23:55 < zombietoad> they both turk 23:55 < zombietoad> they have bond 23:55 < bridge> i respect the effort 23:56 < zombietoad> @learath2 i bet you dont even play ddnet anymore 23:56 < zombietoad> you just keep admin so you can troll me 23:57 < bridge> Exactly, why else would I stay around? 23:59 < zombietoad> can you be nice for 1 time and unban me pls