00:31 < bridge> hell no how much fps would i have on that crap 00:31 < bridge> seconds per frame* 01:02 < bridge> Now that I have a little more experience with programming I thought about giving rust another shot xDD. It went pretty well, I found fasterthanli again started to read his day 1 2022 AoC and well... this is what I ended up thinking. 01:02 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1175949264560599090/CodersVsProgrammers.png?ex=656d1718&is=655aa218&hm=7d10a8a80d95d015bed7d7933d120bde474378429de16dd29d11717d738eed3c& 01:07 < bridge> I don't know how to make rust feel like I am programming :/. Maybe it's skill issue but rust feels like it's for coders 01:07 < bridge> (I myself make the distiction from programmers like this: 01:07 < bridge> Programmer is someone who thinks and then researches and tries to make code work to his desires (engineer of a sort). Coder is someone who researches and then writes code but doesn't necessarily understands what and why it's working but is happy :happy: ). 01:08 < bridge> Well I guess I'll stick with learning OpenGL and C. That seems to work for me :) 01:54 < bridge> https://youtu.be/xaMkMmHGjpI?si=WOtuMPw8NFBH3_M_ 05:02 < bridge> <_voxeldoesart> whoever made this meme does not know how this meme format works 05:02 < bridge> <_voxeldoesart> rust == c? 05:29 < bridge> join baby ❤️ 05:29 < bridge> 05:29 < bridge> https://discord.gg/sexygood 05:29 < bridge> 05:29 < bridge> @everyone 08:27 < bridge> i dont understand this take 08:27 < bridge> it just seems like u dont understand rust and pass it as rust coders not knowing what they do? weird take 08:52 < bridge> Coding is the writing part. Programming is researching and then coding it up 08:55 < bridge> yeah, in C you can be a coder easily, and do it wrong outright in some places, e.g memory safetiness, in Rust, to be a coder you need to pass some programming skills, which the compiler aids you, mainly understanding why some code wont work, because it is not memory safe 08:56 < bridge> it puts the mental burden on you at the start, rather than at the end when ur program breaks and u need to debug and understand why 08:56 < bridge> which is why u are giving up early 09:40 < bridge> i'd say if you never really programmed before c is not the worst language to start with. for the simple reason that it's easy to shoot yourself, which makes you understand what higher abstractions do for you 11:19 < bridge> just use assembly like me 11:19 < bridge> :NekoEvil: 11:19 < bridge> but rust errors teach you a lot on why you cant do stuff 11:20 < bridge> well i guess coming from C it makes these errors have way more sense 11:20 < bridge> oh i need to update gentoo guru ddnet 11:21 < bridge> looks like ill be the first distro 11:21 < bridge> again 11:21 < bridge> :BASEDDEPT: 11:42 < bridge> yeah, i'd say learning rust is indeed very useful too, bcs it's still pretty low level, even if it has many high level concepts. e.g. the borrow checker makes it defs clearer what references are than e.g. Java (IMO) 12:10 < bridge> $rax : 0xfffffffffffffff7 12:10 < bridge> my mmap call returns this void* xD 12:20 < bridge> oh i was using rcx instead of r10 12:21 < bridge> <アリヂン> People say that GC is a minor tradeoff for automatic memory management, and you might think the same until you realize your C\# app does not clean memory until your swap is 7.9/8 and ram 15/16gb 12:23 < bridge> <アリヂン> GC is cool but people have to stop relying on it so much, personally C\# was one of my first languages and when i decided to dig deeper and started learning C++ and rust i just couldn't wrap my head around it, i got too used to automatic cleanup 12:29 < bridge> That's not how I ever thought about the words, but that is exactly how rust makes me a feel. When I write code in Rust or any other newfangled language I feel more like a stenographer than a programmer 12:32 < bridge> Memory being managed for you automagically (whether statically or through runtime gc) is easy to get addicted to, which is why I'm a firm advocate of C first. Learn your C then you can go learn whatever other new language with cool space age features you like 12:43 < bridge> @learath2 do u know if linux syscalls (not using libc) require the stack pointer aligned to 16 too? 12:43 < bridge> Not sure 12:44 < bridge> i think if you dont know how to do manual memory management you dont really know programming or computers 12:45 < bridge> but well my bar is set to high 12:45 < bridge> xd 12:48 < bridge> > The Linux Kernel does not require stack alignment. i.e. syscalls don't. 12:48 < bridge> > 12:48 < bridge> > However, shared libraries do, since they follow the stupid AMD ABI. 12:48 < bridge> @learath2 why does the abi require the stack aligned to 16, isnt it more natural if it is aligned to 8? then u dont need to align the stack between calls if u dont modify the stack 12:49 < bridge> call pushes the 8 byte return addr to the stack 12:49 < bridge> so the requirement of 16 is stupid 12:49 < bridge> u will alwyas need to align 12:49 < bridge> i guess it was done because u always push rbp to setup the stack frame?= 12:49 < bridge> xd 12:49 < bridge> but im sure the 16byte thing is before the 64bit era 12:50 < bridge> @chairn maybe u know more about this 12:50 < bridge> > But my take on this is to just follow the ABI alignment requirement to avoid future problems. I have this hunch that the alignment requirement is actually meant for syscalls that make use of SSE instructions. I don't see any other practical reasons for enforcing aligned stack other than SSE. The alignment is not actually for the function's code, but for use by the SSE save and restore inside the red zone of one particular syscall. 128 bytes is en 12:50 < bridge> https://board.flatassembler.net/topic.php?t=19874 12:51 < bridge> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 12:52 < bridge> > H. Peter Anvin 2012-05-17 00:12:57 UTC 12:52 < bridge> > 12:52 < bridge> > In the Linux kernel, we do not use SSE or floating-point of any kind (except in very particular highly controlled places); furthermore, stack space is at an extreme premium. As such, it makes absolutely no sense to align the stack to 16 bytes in x86-64. 12:52 < bridge> > 12:52 < bridge> > gcc, however, refuses to allow setting the stack alignment to 8 bytes: 12:52 < bridge> > 12:52 < bridge> > : anacreon 105 ; gcc -mpreferred-stack-boundary=3 -mincoming-stack-boundary=3 -O2 -mno-sse -c /tmp/foo.c 12:52 < bridge> > /tmp/foo.c:1:0: error: -mpreferred-stack-boundary=3 is not between 4 and 12 12:52 < bridge> > /tmp/foo.c:1:0: error: -mincoming-stack-boundary=3 is not between 4 and 12 12:52 < bridge> > 12:52 < bridge> > This is particularly ironic since we have found out that, in fact, ALL kernel stacks are actually 16-byte misaligned on x86-64 as the entry code pushes a total of 88 bytes onto the stack. As such, gcc trying to keep a 16-byte alignment actually makes the code do worse, not better. 12:52 < bridge> interesting loophole xd 12:55 < bridge> Hm interesting. Let me have a think on why the abi requires 16 12:55 < bridge> its most probs for SSE code 12:57 < bridge> ```x86asm 12:57 < bridge> %ifndef INCLUDE_ALLOC 12:57 < bridge> %define INCLUDE_ALLOC 12:57 < bridge> 12:57 < bridge> %include "lib/syscalls.asm" 12:57 < bridge> 12:57 < bridge> %define PROT_READ 0x1 12:57 < bridge> %define PROT_WRITE 0x2 12:57 < bridge> %define MAP_PRIVATE 0x02 12:57 < bridge> %define MAP_ANONYMOUS 0x20 12:57 < bridge> 12:57 < bridge> section .bss 12:57 < bridge> 12:57 < bridge> section .text 12:57 < bridge> 12:57 < bridge> ; void* alloc(size_t bytes) 12:57 < bridge> ; returns a ptr to the allocated bytes on rax 12:57 < bridge> alloc: 12:57 < bridge> mov rsi, rdi ; rdi has the bytes 12:57 < bridge> xor rdi, rdi ; addr 0 12:57 < bridge> mov rdx, PROT_READ|PROT_WRITE 12:57 < bridge> mov r10, MAP_PRIVATE|MAP_ANONYMOUS 12:57 < bridge> mov r8, -1 12:57 < bridge> xor r9, r9 12:57 < bridge> call mmap 12:57 < bridge> ret 12:57 < bridge> 12:57 < bridge> %endif 12:57 < bridge> 12:57 < bridge> ``` 12:58 < bridge> i switched to mmap 12:58 < bridge> xd 12:58 < bridge> now i just need to do a small optimization 12:58 < bridge> to allocate in bigger batches 12:59 < bridge> Hm, I guess it's common enough that there is an sse array at the start and 8 bytes of waste isn't that important to get common code for restoring rsp 13:01 < bridge> anyway just making this stuff i learnt a lot 13:01 < bridge> stack frames and such 13:03 < bridge> When will you code an arena allocator in asm? 😄 13:16 < bridge> xd 13:17 < bridge> @learath2 thats what i was thinking of doing 13:17 < bridge> a bump allocator 13:40 < bridge> Doped 13:40 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1176139975864090704/image.png?ex=656dc8b5&is=655b53b5&hm=9dc00832a4ad55a66bd34bccae4d95bbee770dd78695aa0ba43be46ebd6d2a9b& 13:40 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1176139976430333962/image.png?ex=656dc8b6&is=655b53b6&hm=98ae599109273378bf05bcc7a2aa5beeefb3657eb565c2468aaa6a91eb5fb85a& 13:40 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1176139977021726790/image.png?ex=656dc8b6&is=655b53b6&hm=a45829d3de34d5eba3e1cf8d7f8aff330736b3d9fe0792f7288fbf9be77b0ff8& 13:57 < bridge> It was I. 13:59 < bridge> hmm is Chiller here? 14:00 < bridge> :monkalaugh: I wanna paste a code snippet of rust and then of C 14:28 < bridge> hi after update i have so many micro lag how its fix fps is stable 14:28 < bridge> ping too 14:30 < bridge> `shutdown /r /p` (in cmd) 14:30 < bridge> Else test old version of it's really the client 14:30 < bridge> <アリヂン> Hmm, I also had this issue after the update, but seems like it resolved itself after i switched backend to vulkan (it switched to opengl on its own for some reason) 14:35 < bridge> it helped a little but the lags did not disappear 14:39 < bridge> Test https://ddnet.org/downloads/DDNet-17.4-win64.zip 14:39 < bridge> UPS 14:39 < bridge> https://ddnet.org/downloads/DDNet-17.3-win64.zip 14:39 < bridge> Test 14:39 < bridge> This is the previous version 14:40 < bridge> @jupeyy_keks did u change smth? 14:40 < bridge> why so many ppl complain 14:41 < bridge> :justatest: 14:41 < bridge> i 14:41 < bridge> I tried the lags did not pass 14:50 < bridge> As you can see i didn't change anything. It's Windows always annoying^^ 14:50 < bridge> That's sad but then it's either Internet lags or you changed something in your system 14:56 < bridge> most likely it's the internet because it's been crashing lately 15:22 < bridge> <.krain.> if any dev want a feature to develop: 15:22 < bridge> <.krain.> It would be very nice in practice mod, that spikes execute /r instead of kill 15:28 < bridge> <.krain.> ``` 15:28 < bridge> <.krain.> [Client] Don't disable practice mode on death [furo321] 15:28 < bridge> <.krain.> ``` 15:28 < bridge> <.krain.> is it what I just said? x) 15:37 < bridge> Not exactly, it won't automatically do `/r` for you. But if you die by a spike (and haven't touched the start line) you will still be in practice. Then once you died, you could run `/lasttp` to get back to your previous spot you used `/tp` to. 15:42 < bridge> But isn't that not only overcomplicating it + not even solving the issue either? Will be far from as smooth as just running /r. 15:42 < bridge> Or is there some sort of complication code wise that wouldn't let that happen? 15:43 < bridge> <.krain.> So we can die, then /r ? :o 15:43 < bridge> <.krain.> oh yeh we can't cauz we hit ground on spawn 16:23 < bridge> How can I configure a workflow to create an arm build? 16:23 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1176181142987218974/image.png?ex=656def0c&is=655b7a0c&hm=1dbd0c7cf2fa3b92de8cd588ffb4b2783054db50bc673c4f29ecee13f8194123& 16:40 < bridge> if u mean a macos silicon u cant 16:40 < bridge> actually i think they dont have arm either 16:40 < bridge> https://github.com/marketplace/actions/arm-runner 16:50 < bridge> It's ubuntu minimal arm 17:28 < bridge> openai drama goes hard lmfao 17:30 < bridge> ^ 17:30 < bridge> 17:30 < bridge> i'd say that prediction was quite good xd 17:31 < bridge> they might have not predicted the CEO gets fired. 17:31 < bridge> But they probably wanted more to say about OpenAI 18:26 < bridge> u can cross compile 18:26 < bridge> 18:26 < bridge> u could see how the mingw cross compile is done 18:27 < bridge> it will work similar, u just need to install the correct packages 18:27 < bridge> at least if you meant with "create", that u want artifacts 18:27 < bridge> if u meant to actually run ARM on github, i guess that's not possible 18:28 < bridge> Sure I want the artifacts 18:28 < bridge> https://github.com/ddnet/ddnet/blob/375dd7da8b4bb6bc530d5726874bd0c8de8e7fa4/cmake/toolchains/mingw64.toolchain 18:29 < bridge> https://github.com/ddnet/ddnet/blob/375dd7da8b4bb6bc530d5726874bd0c8de8e7fa4/cmake/toolchains/mingw64.toolchain 18:29 < bridge> lol 18:29 < bridge> https://github.com/ddnet/ddnet#cross-compiling-on-linux-to-windows-x86x86_64 18:30 < bridge> but i bet u find lots of resources online how to cross compile to arm 😉 18:32 < bridge> I want the build to be compiled by the workflow :Paimon_DeadInside: 18:32 < bridge> yes 18:32 < bridge> https://github.com/ddnet/ddnet/blob/375dd7da8b4bb6bc530d5726874bd0c8de8e7fa4/.github/workflows/build.yml 18:33 < bridge> here is the workflow build file 18:33 < bridge> u gotta compile all skills i mentioned xdd 18:37 < bridge> After configuring so many servers I have no skills now 18:37 < bridge> :dead_pb: 18:38 < bridge> ask chatgpt 18:43 < bridge> here. no guarantee that this does smth useful: 18:43 < bridge> ```yml 18:43 < bridge> name: Cross-Compile for ARM 18:43 < bridge> 18:43 < bridge> on: 18:43 < bridge> push: 18:43 < bridge> branches: 18:43 < bridge> - main 18:43 < bridge> pull_request: 18:43 < bridge> branches: 18:43 < bridge> - main 18:43 < bridge> 18:43 < bridge> jobs: 18:43 < bridge> build: 18:44 < bridge> runs-on: ubuntu-latest 18:44 < bridge> 18:44 < bridge> steps: 18:44 < bridge> - name: Checkout Repository 18:44 < bridge> uses: actions/checkout@v2 18:44 < bridge> 18:44 < bridge> - name: Install ARM Cross Compiler 18:44 < bridge> run: | 18:44 < bridge> sudo apt-get update 18:44 < bridge> sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf 18:44 < bridge> 18:44 < bridge> - name: Create Build Directory 18:44 < bridge> run: mkdir build && cd build 18:44 < bridge> 18:44 < bridge> - name: Run CMake 18:44 < bridge> run: | 18:44 < bridge> cd build 18:44 < bridge> ```cmake 18:44 < bridge> # Set the system name to cross compile for 18:44 < bridge> set(CMAKE_SYSTEM_NAME Linux) 18:44 < bridge> set(CMAKE_SYSTEM_PROCESSOR arm) 18:44 < bridge> 18:44 < bridge> # Specify the cross compiler 18:44 < bridge> set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc) 18:44 < bridge> 18:44 < bridge> I will try 19:01 < bridge> <_voxeldoesart> thats not really learning, is it 19:04 < bridge> did someone ask about learning? 19:23 < bridge> ```x86asm 19:23 < bridge> next_pow_2: 19:23 < bridge> dec eax 19:23 < bridge> bsr rcx, rax 19:23 < bridge> inc ecx 19:23 < bridge> mov eax, 1 19:23 < bridge> shl rax, cl 19:23 < bridge> ret 19:23 < bridge> ``` 19:23 < bridge> i found this 19:23 < bridge> looks op 20:20 < bridge> ChillerDragon: muzzle → muscle 21:10 < bridge> ``` 21:10 < bridge> $ cargo clean 21:10 < bridge> Removed 90180 files, 48.7GiB total 21:10 < bridge> ``` 21:10 < bridge> :twinbop: 21:11 < bridge> that's almost the size of my first ssd 😂 21:12 < bridge> since when does it display stats? 😮 21:13 < bridge> good question 21:16 < bridge> lol 21:17 < bridge> Chiller English be like 21:17 < bridge> https://youtu.be/wtRvTHUO6Z4?si=fwuVUbzpGKl40Gh9 21:45 < bridge> What are the chances of this getting merged this week? I would like to take a look at it before.\_. 21:47 < bridge> then say that on the PR 21:50 < bridge> Ok I did the review on ma phone :D 22:01 < bridge> <_voxeldoesart> i mean, the person did "I have no skills now" 22:01 < bridge> <_voxeldoesart> using ai doesnt really *give* you skill, does it? 22:13 < bridge> 22:14 < bridge> if you can use LLMs to help you, then that's a skill right there 🙂 22:15 < bridge> IMO it's not a skill to setup some boring CIs 22:15 < bridge> i've done that many times 22:15 < bridge> i still forget their shitty syntax xD 22:16 < bridge> I said skills with irony, the truth is I'm busy with web development and other things 22:17 < bridge> <_voxeldoesart> sometimes i think about using ai to assist me with things but then i remember that its better to just. do it. instead of having to rely on a machine to do the work for you 22:17 < bridge> <_voxeldoesart> because most of the time the language models dont even do what you ask for 22:17 < bridge> <_voxeldoesart> bard and gpt suck 22:18 < bridge> so you also convert all english source to binary by hand? 😄 22:18 < bridge> u just hate AI 22:18 < bridge> they do it to like 80% depending on the complexity 22:18 < bridge> and they only give a limited response length 22:18 < bridge> that's also a problem 22:19 < bridge> <_voxeldoesart> https://lingojam.com/EnglishtoBinary 22:21 < bridge> got a problem with long as hell render while starting client 22:21 < bridge> Possible somehow to fix? 22:21 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1176271184057339965/image.png?ex=656e42e8&is=655bcde8&hm=db7738b51878b3ef4eca7d6e139f8a08b337da17cfd5bb4d7a7919a0c7583e2f& 22:24 < bridge> can you please be more precise? 22:24 < bridge> is that a release build? 22:25 < bridge> shadow play for example might already make the startup much slower 22:25 < bridge> debug 22:25 < bridge> OpenGL? 22:25 < bridge> yea 22:26 < bridge> what even is long as hell 22:26 < bridge> <1s should be ok for the first render call i guess 22:26 < bridge> if the opengl driver setups stuff on fly 22:26 < bridge> i 22:26 < bridge> cracking hate 22:26 < bridge> openGL 22:27 < bridge> ty jupey 22:27 < bridge> i just switch the render 22:27 < bridge> i blame windows tho xd 22:27 < bridge> opengl works awesome on linux 22:27 < bridge> my record is 150gb 22:28 < bridge> Was anyone able to confirm that #7508 fixes the weird lags yet? 22:28 < bridge> https://github.com/ddnet/ddnet/pull/7508 22:30 < bridge> i asked multiple times in #bugs 22:30 < bridge> but sadly they hard ignore 22:30 < bridge> if they have problems, they ur best friends. else they full ego 22:30 < bridge> 😂 22:30 < bridge> It's possible that the compatibility flags make windows chose a worse option for the game 22:31 < bridge> It's quite a lot of compatiblity in Windows though: https://learn.microsoft.com/en-us/windows/win32/w8cookbook/windows-8-and-windows-server-8-compatibility-cookbook-portal 22:31 < bridge> it kinda must be 22:31 < bridge> bcs it makes 0% sense that the opengl windows software driver is used 22:31 < bridge> You can download as PDF though, only 227 pages ::monkaS: 22:31 < bridge> u cannot control that programatically 22:31 < bridge> You can download as PDF though, only 227 pages :monkaS: 22:32 < bridge> What is this? https://apps.microsoft.com/detail/opencl%E2%84%A2-and-opengl%C2%AE-compatibility-pack/9NQPSL29BFFF?hl=en-US&gl=US 22:33 < bridge> If a DirectX 12 driver is installed, supported apps will run with hardware acceleration for better performance. This package supports apps that use OpenCL version 1.2 and earlier and OpenGL version 3.3 and earlier. 22:33 < bridge> ogl on dx12 22:34 < bridge> not interesting for their potato problems 22:34 < bridge> What if they accidentally installed it? 22:34 < bridge> Would it make things worse? 22:34 < bridge> nah 22:34 < bridge> i dont think they installed that 22:35 < bridge> they all had old PCs 22:35 < bridge> it's probably bcs the drivers of their GPUs are flagged as win7 compability mode 22:35 < bridge> Which OS did they have btw? 22:35 < bridge> win10 22:36 < bridge> yeah, could be something like this 22:36 < bridge> right now it doesn't matter I guess, but at some point we might need the compatibility flags with new OS 22:37 < bridge> Are their drivers already end-of-life? 22:37 < bridge> you want to say drop OGL <2 22:37 < bridge> i am in 22:37 < bridge> 1000% xD 22:42 < bridge> does vanilla master servers use a different port to check open ports? 22:42 < bridge> 22:42 < bridge> aka: 22:42 < bridge> "ERROR: the master server reports that clients can not connect to this server." 22:42 < bridge> i read it as this: 22:42 < bridge> the master server can contact my servers 22:42 < bridge> yes 22:42 < bridge> this is so annoying 22:43 < bridge> it's a port forward check ^^ 22:43 < bridge> yeah but i can't cleanly block IPs that way 22:43 < bridge> you need to use a different port, otherwise the port forward check doesn't work 22:43 < bridge> yes 22:43 < bridge> but it could be a static port 22:45 < bridge> well let's hope the servers where the master servers don't report me for port scanning 😂 22:45 < bridge> this is so annoying xD 23:32 < bridge> sorry no idea. But i had the same question for a lab work with RISC-V assembly where the stack is advanced by 16 for each function... 23:36 < bridge> because then you can easily put 16-byte aligned stuff onto the stack, and since you're likely gonna push rbp, it doesn't matter as much, I guess 23:37 < bridge> u push if u want a stack frame 23:37 < bridge> but yeah i guess 23:37 < bridge> well u always need a stack frame for the abi i think 23:38 < bridge> I think windows always requires you to push rbp as well 23:53 < bridge> u dont need to specifically push rbp tho 23:53 < bridge> but pushing aligns the pointer 23:54 < bridge> with -fno-frame-pointer it doesnt push 23:54 < bridge> i read this today 23:54 < bridge> it uses relative to rsp somehow 23:54 < bridge> -fomit frame pointer sry 23:54 < bridge> well if i got this correctly ofc 23:58 < bridge> This is an example of what I mean. 23:58 < bridge> Rust itertools has this which probably from my understading (correct me if I am wrong :)) is this https://en.wikipedia.org/wiki/Sorting_network. 23:58 < bridge> In C you gotta implement/make it yourself 23:58 < bridge> btw I am talking about day1 part2 of the 2022 AoC 23:59 < bridge> so I feel like you learn a lot more about engeering in general but you also have to re-implement the wheel (since rust prob has it already).