00:00 <+bridge> [ddnet] they used chinese for beat hints so it is one syllable per beat. 00:01 <+bridge> [ddnet] hm, I don't play many rhythm games, I only played osu for a while 00:01 <+bridge> [ddnet] oh and a bit of muse dash 00:02 <+bridge> [ddnet] rhythm docter is a one key rhythm game which is new 09:20 < ***> Buffer Playback... 09:20 <+bridge> [03:47:40] [ddnet] Is anyone here knowing about threads? 09:20 <+bridge> [03:48:19] [ddnet] currently, i am waiting on all threads to be done on my server before it returns 0 and terminates, because otherwise these threads would finish when i re-started the server 09:20 <+bridge> [03:48:33] [ddnet] ```while (m_Jobs.size()) 09:20 <+bridge> [03:48:33] [ddnet] { 09:20 <+bridge> [03:48:34] [ddnet] // wait for all threads to be done 09:20 <+bridge> [03:48:35] [ddnet] if (m_Jobs.front()->Status() == CJob::STATE_DONE) 09:20 <+bridge> [03:48:37] [ddnet] m_Jobs.pop_front(); 09:20 <+bridge> [03:48:38] [ddnet] } 09:20 <+bridge> [03:48:39] [ddnet] 09:20 <+bridge> [03:48:41] [ddnet] return 0;``` 09:20 <+bridge> [03:48:42] [ddnet] is this bad? 09:20 <+bridge> [03:49:03] [ddnet] because it works as expected xd 09:20 <+bridge> [09:04:51] [ddnet] Eh, spinning like this isn't a good idea as you are hogging the cpu, a more proper solution would be to wait on a condition variable and have the threads atomically decrement a counter as they quit 09:20 <+bridge> [09:06:53] [ddnet] It is possible that the OS would just keep pre-empting your worker threads so your main thread can spin, causing large hangs at the end randomly 09:20 <+bridge> [09:08:41] [ddnet] Though, I've taken a look at our jobs code and this doesn't look needed. The destructor properly waits for the worker threads to close 09:20 < ***> Playback Complete. 10:46 <+bridge> [ddnet] I figured out why I could only log into pol server slowly (~1 minute delay). Protip: Don't block all TCP traffic in iptables, since it also blocks traffic from localhost, and gpg's key manager tries to connect to the local key server via tcp. If there is no local key server it fails graciously, but if it doesn't respond at all it just gets stuck indefinitely until systemd decides that it took too long and starts the user session without it aft 10:47 <+bridge> [ddnet] That's a behaviour change in Debian 11, worked fine in Debian 10 10:56 <+bridge> [ddnet] :monkaS: 10:57 <+bridge> [ddnet] macFUSE is now closed source and no one can fork it since apple doesn't give out kernel extension signing certificates willy nilly anymore 11:01 <+bridge> [ddnet] why u use mac 11:02 <+bridge> [ddnet] they arent even the "privacy" company ppl said they are 11:02 <+bridge> [ddnet] less now 11:02 <+bridge> [ddnet] with the scanning stuff with the excuse of pedos 11:03 <+bridge> [ddnet] Because otherwise I have to buy a new laptop, which will cost me money 11:03 <+bridge> [ddnet] u cant install linux? 11:04 <+bridge> [ddnet] here for dummies 11:04 <+bridge> [ddnet] :monkalaugh: 11:04 <+bridge> [ddnet] > What's more, Linux breathes life into old Macs that are no longer eligible for macOS updates. Rather than letting your old MacBook Pro turn into an expensive paperweight, install the latest version of Linux and keep it going for years to come. 11:04 <+bridge> [ddnet] lol 11:04 <+bridge> [ddnet] didnt know old macbook pros dont get updates 11:04 <+bridge> [ddnet] even more reason 11:04 <+bridge> [ddnet] The support for macbooks were quite shit last I tried 11:05 <+bridge> [ddnet] i would try it 11:05 <+bridge> [ddnet] make sure u havce 11:05 <+bridge> [ddnet] backup mac installs or smth 11:05 <+bridge> [ddnet] idk how it works there 11:05 <+bridge> [ddnet] there is no way they have good drivers for the amazing touchpad on the macbook 11:05 <+bridge> [ddnet] backup mac install usb* 11:06 <+bridge> [ddnet] imagine using touchpad 11:06 <+bridge> [ddnet] i cant use it 11:06 <+bridge> [ddnet] and my sister has a rly good macbook 11:06 <+bridge> [ddnet] it sucks 11:06 <+bridge> [ddnet] just use mouse 11:06 <+bridge> [ddnet] ok, ur the coolest and the 1337est bro 11:06 <+bridge> [ddnet] how is saying touchpad sucks leet 11:06 <+bridge> [ddnet] Who wants to carry around a mouse? 😄 11:07 <+bridge> [ddnet] i would xd 11:07 <+bridge> [ddnet] just get some wireless 11:07 <+bridge> [ddnet] The touchpad works perfectly for me, I don't play games on the thing. I'll pass on carrying around a mouse 11:07 <+bridge> [ddnet] well i doubt touchpad works that bad that u cant pause the movie while in ur sofa 11:07 <+bridge> [ddnet] but for other uses i would use mouse 11:08 <+bridge> [ddnet] gestures make the touchpad very useful, you lose all those with the open source drivers 11:08 <+bridge> [ddnet] I'd definitely carry a mouse if I was stuck with open source touchpad drivers 11:08 <+bridge> [ddnet] https://bill.harding.blog/2020/04/26/linux-touchpad-like-a-macbook-pro-may-2020-update/ 11:09 <+bridge> [ddnet] there is a guy on it apparently 11:14 <+bridge> [ddnet] They seem to be making progress too, maybe in a year or so we'll finally have good touchpad support on linux 11:15 <+bridge> [ddnet] well, it doesnt on shutdown 11:16 <+bridge> [ddnet] Are you sure? add a dbg msg to the deconstructor of the jobpool, it should be waiting there 11:27 <+bridge> [ddnet] Well, I have threads for sending curl posts to discord webhooks, and as it seems when the server closes not all messages are sent, then, on restart of the server the rest gets sent from before 11:27 <+bridge> [ddnet] Maybe i should just NOT send all left the game messages on shutdown xd 11:38 <+bridge> [ddnet] @fokkonaut Ah you want to finish all inserted jobs? I guess our shutdown just ensures no partial jobs 11:39 <+bridge> [ddnet] ye probs 11:40 <+bridge> [ddnet] i think just not sending all messages on shutdown will be the way to go 11:40 <+bridge> [ddnet] I'd add a `m_Shutdown` check to Add so you can ensure no new jobs, and the previous solution I mentioned, a condition variable waiting on an atomic counter to be 0 11:41 <+bridge> [ddnet] i've never worked with atomic vars 11:41 <+bridge> [ddnet] What do they do? 11:42 <+bridge> [ddnet] They are like normal variables but they ensure modifications to them are in one step, so no other thread can see a partial update of the variable. They are thus safe to read and write from multiple locations 11:42 <+bridge> [ddnet] oh, nice 11:42 <+bridge> [ddnet] But: the shutdown check isnt required i think, it should not add any jobs after shutdown get executed anyways 11:42 <+bridge> [ddnet] So when a job gets queued I'd increment the counter and when it's done or aborted I'd decrement it 11:43 <+bridge> [ddnet] wouldn't that be pretty much like my list? 11:43 <+bridge> [ddnet] Yes, but the atomic is safe to wait on with a condition variable 11:44 <+bridge> [ddnet] Well I guess in this specific circumstance you could wait on the vectors size with a condition variable provided you are accessing it within a lock 11:45 <+bridge> [ddnet] Where did you find this vector anyway? We use a linked list from what I remember 11:45 <+bridge> [ddnet] I made up this vector because i didnt find any list or smth to put the CJob that needs to be passed to Add 11:46 <+bridge> [ddnet] sorry, its a list, not vector 11:47 <+bridge> [ddnet] wait 11:47 <+bridge> [ddnet] do i not need to put the new CJob anywhere? 11:47 <+bridge> [ddnet] will it get freeed in the job pool? 11:48 <+bridge> [ddnet] It will if you put it in a shared_ptr 11:48 <+bridge> [ddnet] But if you don't keep a pointer to it you can't check it's state, so not sure how useful that is 11:49 <+bridge> [ddnet] Well, I saw that the client does it like I do for the demo tasks 11:49 <+bridge> [ddnet] Anyway, the job pool already keeps a linked list of jobs, you can add a shutdown function to it 11:50 <+bridge> [ddnet] Only then? 11:50 <+bridge> [ddnet] Yep, otherwise it'll leak 11:50 <+bridge> [ddnet] Why is that 11:51 <+bridge> [ddnet] Wait let me check the code and make sure 11:51 <+bridge> [ddnet] xD 11:51 <+bridge> [ddnet] Ah, we do force you to use a shared_ptr 11:51 <+bridge> [ddnet] So it'll get freed no matter what 11:51 <+bridge> [ddnet] not really 11:51 <+bridge> [ddnet] ah wait 11:51 <+bridge> [ddnet] probably ddnet 11:51 <+bridge> [ddnet] im on 0.7 base 11:53 <+bridge> [ddnet] I just did new CJob() 11:56 <+bridge> [ddnet] isnt the job pool single threaded 11:56 <+bridge> [ddnet] or is it a threadpool 11:57 <+bridge> [ddnet] else just add a job that signals the main threads condition var 11:59 <+bridge> [ddnet] it's a threadpool on both ddnet and vanilla 11:59 <+bridge> [ddnet] ok 12:01 <+bridge> [ddnet] would probs still work 12:01 <+bridge> [ddnet] I think you can just wait on FirstJob to be null using a condvar and add checks to signal the condvar when it does become null 12:01 <+bridge> [ddnet] bcs then all threads are busy 12:01 <+bridge> [ddnet] and the destructors waits for the threads to be empty 12:02 <+bridge> [ddnet] Hm, the destructor doesn't wait for tha tthough 12:02 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/881841339753439242/unknown.png 12:02 <+bridge> [ddnet] ``` 12:02 <+bridge> [ddnet] m_Shutdown = true; 12:02 <+bridge> [ddnet] for(int i = 0; i < m_NumThreads; i++) 12:02 <+bridge> [ddnet] sphore_signal(&m_Semaphore); 12:02 <+bridge> [ddnet] for(int i = 0; i < m_NumThreads; i++) 12:02 <+bridge> [ddnet] { 12:02 <+bridge> [ddnet] if(m_apThreads[i]) 12:02 <+bridge> [ddnet] thread_wait(m_apThreads[i]); 12:02 <+bridge> [ddnet] } 12:02 <+bridge> [ddnet] lock_destroy(m_Lock); 12:02 <+bridge> [ddnet] sphore_destroy(&m_Semaphore); 12:02 <+bridge> [ddnet] ``` 12:02 <+bridge> [ddnet] lol 12:02 <+bridge> [ddnet] :monkalaugh: 12:03 <+bridge> [ddnet] That doesn't wait for all threads to be empty 12:03 <+bridge> [ddnet] The shutdown signal will make the threads process one last job and they will all quit 12:03 <+bridge> [ddnet] but the main thread sleeps 12:03 <+bridge> [ddnet] until the last job is done 12:03 <+bridge> [ddnet] until then all jobs are in the queue 12:03 <+bridge> [ddnet] Where do you see that happen? 12:03 <+bridge> [ddnet] i add a job that signals a cond var in the main thread 12:03 <+bridge> [ddnet] just add that new job 12:04 <+bridge> [ddnet] There is no guarantee for that to be executed after all other jobs are done though 12:04 <+bridge> [ddnet] its at the end of the list 12:04 <+bridge> [ddnet] so its added in the end 12:04 <+bridge> [ddnet] A free worker can immediately take that job and signal the condvar while a long curl is running 12:04 <+bridge> [ddnet] i dont see how it waits for all jobs 12:04 <+bridge> [ddnet] once the shutdown signal is true it just processes 1 at most 12:04 <+bridge> [ddnet] as learath says 12:04 <+bridge> [ddnet] but the curl job is blocking the thread 12:04 <+bridge> [ddnet] each worker thread 12:05 <+bridge> [ddnet] @Jupstar ✪ it's blocking a thread, not all worker threads 12:05 <+bridge> [ddnet] ``` 12:05 <+bridge> [ddnet] for(int i = 0; i < m_NumThreads; i++) 12:05 <+bridge> [ddnet] { 12:05 <+bridge> [ddnet] if(m_apThreads[i]) 12:05 <+bridge> [ddnet] thread_wait(m_apThreads[i]); 12:05 <+bridge> [ddnet] } 12:05 <+bridge> [ddnet] ``` 12:05 <+bridge> [ddnet] what does this mean then 12:05 <+bridge> [ddnet] it waits until all workers quit 12:05 <+bridge> [ddnet] yes 12:05 <+bridge> [ddnet] and since our job is the last 12:05 <+bridge> [ddnet] all other jobs are in currently handled or are finished 12:05 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/881842167805534238/unknown.png 12:06 <+bridge> [ddnet] yeah its safe 12:06 <+bridge> [ddnet] there is no break in it 12:06 <+bridge> [ddnet] But you can't guarantee order of execution. What if your "last" job gets immediately picked up by a worker and finishes before all other running jobs? 12:07 <+bridge> [ddnet] so its either running or no job is found 12:07 <+bridge> [ddnet] but the job list is a list 12:07 <+bridge> [ddnet] ``` 12:07 <+bridge> [ddnet] lock_wait(m_Lock); 12:07 <+bridge> [ddnet] 12:07 <+bridge> [ddnet] // add job to queue 12:07 <+bridge> [ddnet] if(m_pLastJob) 12:07 <+bridge> [ddnet] m_pLastJob->m_pNext = pJob; 12:07 <+bridge> [ddnet] m_pLastJob = std::move(pJob); 12:07 <+bridge> [ddnet] if(!m_pFirstJob) 12:07 <+bridge> [ddnet] m_pFirstJob = m_pLastJob; 12:07 <+bridge> [ddnet] 12:07 <+bridge> [ddnet] lock_unlock(m_Lock); 12:07 <+bridge> [ddnet] sphore_signal(&m_Semaphore); 12:07 <+bridge> [ddnet] ``` 12:07 <+bridge> [ddnet] its a queue 12:07 <+bridge> [ddnet] our last job will always be the last 12:07 <+bridge> [ddnet] the others are then currently processed or already finished 12:07 <+bridge> [ddnet] they are not skipped 12:08 <+bridge> [ddnet] All the threads will be waiting in `sphore_wait` you add a long curl job, and a very short condvar trigger job. I don't get how you guarantee the short condvar job doesn't finish before the long curl job 12:08 <+bridge> [ddnet] it can 12:08 <+bridge> [ddnet] but the curl job is still in work then 12:08 <+bridge> [ddnet] it cant be skipped 12:08 <+bridge> [ddnet] and how does this work then 12:08 <+bridge> [ddnet] so we wait for the curl job anyway 12:09 <+bridge> [ddnet] (for the thread that handles the job currently) 12:10 <+bridge> [ddnet] Hm, it could work actually 12:10 <+bridge> [ddnet] i doubt u already added the job 😄 12:10 <+bridge> [ddnet] that signals the main thread 12:11 <+bridge> [ddnet] And how can it then get executed when the server starts again? 12:11 <+bridge> [ddnet] why is that 12:11 <+bridge> [ddnet] Ah, I see your point, you mean if the last job ever gets executed that means the previous jobs are all already taken by a worker thread 12:11 <+bridge> [ddnet] maybe the discord thing works like that 12:12 <+bridge> [ddnet] yes 😄 12:12 <+bridge> [ddnet] Mh? I just start threads to send a curl post to discord, nothing more 12:12 <+bridge> [ddnet] yeah i dunno why it can send that when the server is restarted, maybe some weird caching somewhere 12:13 <+bridge> [ddnet] Yea thats what Im saying 12:13 <+bridge> [ddnet] have u checked if your server is actually dead 12:13 <+bridge> [ddnet] Of course it is actually dead 12:13 <+bridge> [ddnet] it also happens locally so yeah 12:13 <+bridge> [ddnet] well anyway, the above is a solution to be safe it happens before your server closes 12:14 <+bridge> [ddnet] why it can send it when nobody knows about the original job anyway is some weirdness outside of ddnet 12:14 <+bridge> [ddnet] or your server* 12:14 <+bridge> [ddnet] xD 12:15 <+bridge> [ddnet] Which above do you mean? 12:16 <+bridge> [ddnet] add a new job class that takes a cond var(and the mutex for it) 12:16 <+bridge> [ddnet] signal that cond var 12:16 <+bridge> [ddnet] the main thread should add the job inside the mutex and wait on the cond var after it was added to the job list 12:17 <+bridge> [ddnet] add a new job class that takes a cond var(and the mutex for it) 12:17 <+bridge> [ddnet] signal that cond var (on the job) 12:17 <+bridge> [ddnet] the main thread should add the job inside the mutex and wait on the cond var after it was added to the job list 12:17 <+bridge> [ddnet] xd 12:20 <+bridge> [ddnet] ``` 12:20 <+bridge> [ddnet] job run: 12:20 <+bridge> [ddnet] m_pMutex->lock(); 12:20 <+bridge> [ddnet] m_pCond->signal(); 12:20 <+bridge> [ddnet] m_pMutex-unlock(); 12:20 <+bridge> [ddnet] 12:20 <+bridge> [ddnet] main thread: 12:20 <+bridge> [ddnet] std::mutex M; 12:20 <+bridge> [ddnet] std::cond_variable C; 12:20 <+bridge> [ddnet] std::unique_lock Lock(&M); 12:20 <+bridge> [ddnet] Pool()->AddJob(make_shared(new CWaitingJob(&M, &C))); 12:20 <+bridge> [ddnet] C.wait(&Lock); 12:20 <+bridge> [ddnet] ``` 12:20 <+bridge> [ddnet] smth like this 12:22 <+bridge> [ddnet] Ive never worked with threads that deepfly, I dont know about any of these tbh 12:23 <+bridge> [ddnet] deepfly wtf xd 12:23 <+bridge> [ddnet] deeply 12:23 <+bridge> [ddnet] well there u have the impl, i just dunno if any of those takes a reference or pointer 12:23 <+bridge> [ddnet] but the compiler will tell u xd 12:23 <+bridge> [ddnet] xd 12:23 <+bridge> [ddnet] deepfly ez 12:23 <+bridge> [ddnet] xd 12:26 <+bridge> [ddnet] @Learath2 btw, is the jobpool impl even safe? 12:26 <+bridge> [ddnet] e.g. when we have 32 threads but add 128 jobs in one go, it will still sleep on the semaphore? 12:27 <+bridge> [ddnet] Hm, heinrich made it a long while ago, it atleast passed my rudimentary review the first time 12:27 <+bridge> [ddnet] sphore_wait should fall through as its a general counting semaphore 12:27 <+bridge> [ddnet] ah yeah makes sense 12:28 <+bridge> [ddnet] Adding 128 jobs will increment it all the way to 128, and each thread passing thru wait should decrement it once 12:28 <+bridge> [ddnet] yeah true 12:30 <+bridge> [ddnet] c++ only adds them in c++20 and calls them counting_semaphore 12:31 <+bridge> [ddnet] we have to upgrade to c++20 no choice xdd 12:33 <+bridge> [ddnet] man cppreference is insane actually 12:33 <+bridge> [ddnet] anything u search 12:33 <+bridge> [ddnet] it has an example 12:34 <+bridge> [ddnet] there is some hard work here 12:34 <+bridge> [ddnet] btw it uses mediawiki, the wikipedia wiki software 12:34 <+bridge> [ddnet] just noticed it xd 12:35 <+bridge> [ddnet] ez, when we add ddnetreference.tw 12:35 <+bridge> [ddnet] https://wiki.ddnet.tw/docs/ 12:35 <+bridge> [ddnet] check this out 12:35 <+bridge> [ddnet] ah btw 12:35 <+bridge> [ddnet] can we also swap our "documentation" to doxygen? 12:35 <+bridge> [ddnet] @see functioname 12:36 <+bridge> [ddnet] e.g. in system.h is a random one 12:36 <+bridge> [ddnet] we already use it in some parts 12:36 <+bridge> [ddnet] i dunno who invented it xD 12:36 <+bridge> [ddnet] heinrich i think xd 12:36 <+bridge> [ddnet] is there also a generator for it? xd 12:36 <+bridge> [ddnet] wdym 12:36 <+bridge> [ddnet] https://github.com/ddnet/ddnet/blob/master/Doxyfile 12:36 <+bridge> [ddnet] i added this 12:36 <+bridge> [ddnet] long time ago 12:37 <+bridge> [ddnet] beautiful 12:37 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/881850006418640906/unknown.png 12:37 <+bridge> [ddnet] ``` 12:37 <+bridge> [ddnet] /* 12:37 <+bridge> [ddnet] Function: time_get_impl 12:37 <+bridge> [ddnet] Fetches a sample from a high resolution timer. 12:37 <+bridge> [ddnet] 12:37 <+bridge> [ddnet] Returns: 12:37 <+bridge> [ddnet] Current value of the timer. 12:37 <+bridge> [ddnet] 12:37 <+bridge> [ddnet] Remarks: 12:37 <+bridge> [ddnet] To know how fast the timer is ticking, see . 12:37 <+bridge> [ddnet] */ 12:37 <+bridge> [ddnet] ``` 12:37 <+bridge> [ddnet] is there smth that converts these stuff to doc? 12:37 <+bridge> [ddnet] ah u can prob make it 12:37 <+bridge> [ddnet] the fact we name the function is already weird xD 12:37 <+bridge> [ddnet] 12:37 <+bridge> [ddnet] look this 12:37 <+bridge> [ddnet] i documented this stuff 12:38 <+bridge> [ddnet] i vote for doxygen, its ez for java nobos like me 12:38 <+bridge> [ddnet] it uses doxygen style 12:38 <+bridge> [ddnet] yeah 12:38 <+bridge> [ddnet] nice 12:39 <+bridge> [ddnet] noice 12:39 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/881850677968646174/unknown.png 12:40 <+bridge> [ddnet] ye looks nice 12:40 <+bridge> [ddnet] nice cursor icon btw 12:42 <+bridge> [ddnet] im gonna update the docs 12:44 <+bridge> [ddnet] done 12:44 <+bridge> [ddnet] yay 1.9.1 doxygen 12:44 <+bridge> [ddnet] more modern 12:44 <+bridge> [ddnet] 12:44 <+bridge> [ddnet] omaigat 12:44 <+bridge> [ddnet] wait i use a modern theme 12:44 <+bridge> [ddnet] instead of 2000' 12:45 <+bridge> [ddnet] is there dark design? 12:45 <+bridge> [ddnet] ye 12:45 <+bridge> [ddnet] nice 12:45 <+bridge> [ddnet] dont add white design toggle to troll chillerdragon xd 12:47 <+bridge> [ddnet] https://wiki.ddnet.tw/docs/index.html 12:47 <+bridge> [ddnet] omg 12:47 <+bridge> [ddnet] it looks so cool 12:47 <+bridge> [ddnet] @Jupstar ✪ check it out 12:47 <+bridge> [ddnet] wow 12:47 <+bridge> [ddnet] looks better than out wiki xD 12:48 <+bridge> [ddnet] Yeah, looks nice 12:48 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/881852793110036510/unknown.png 12:49 <+bridge> [ddnet] where did you toggle the design 12:50 <+bridge> [ddnet] ah isee on firefox it works 12:50 <+bridge> [ddnet] so it automatically detects it 😄 12:50 <+bridge> [ddnet] it detects 12:50 <+bridge> [ddnet] ok it will update daily 12:50 <+bridge> [ddnet] that often? 😄 12:50 <+bridge> [ddnet] well its cheap 12:50 <+bridge> [ddnet] ok 12:52 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/881850677968646174/unknown.png 12:52 <+bridge> [ddnet] still most confusing btw 12:52 <+bridge> [ddnet] the cut itself is vertically 12:52 <+bridge> [ddnet] the split happens horizontal xD 12:52 <+bridge> [ddnet] xd 12:59 <+bridge> [ddnet] i will try to do it later 13:00 <+bridge> [ddnet] no hurry, nobody was missing it the last decade 😄 13:06 <+bridge> [ddnet] :monkalaugh: 13:41 <+bridge> [ddnet] Q: what was the sense of adding magic field to datafile format header? 13:44 <+bridge> [ddnet] can you give the example code 13:58 <+bridge> [ddnet] https://teel.ink/FEyD1y 13:59 <+bridge> [ddnet] recursion 14:00 <+bridge> [ddnet] https://teel.ink/Wvl9MA 14:00 <+bridge> [ddnet] kekw 14:00 <+bridge> [ddnet] in binary map file 14:00 <+bridge> [ddnet] there should be DATA/ATAD substring 14:00 <+bridge> [ddnet] in header 14:01 <+bridge> [ddnet] the question: why xd 14:04 <+bridge> [ddnet] `char m_aID[4];` this? 14:04 <+bridge> [ddnet] maybe for ez parsing, i think other data formats make it too 14:05 <+bridge> [ddnet] e.g. not caring about the file extension 14:06 <+bridge> [ddnet] aaaah 14:06 <+bridge> [ddnet] makes sense then 16:02 <+bridge> [ddnet] because binary files usually have some magic bytes in the header 16:02 <+bridge> [ddnet] to know what binary format it is 16:02 <+bridge> [ddnet] eg png etc 16:02 <+bridge> [ddnet] file extensions are a lie 16:03 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/881901893004177418/unknown.png 16:04 <+bridge> [ddnet] jpg is FF D8 FF 16:24 <+bridge> [ddnet] https://wiki.ddnet.tw/docs/classCVoting.html 16:24 <+bridge> [ddnet] now the images are svg and interactive 16:24 <+bridge> [ddnet] if they are big 16:24 <+bridge> [ddnet] xd 16:24 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/881907233099767808/unknown.png 16:31 <+bridge> [ddnet] oh doxyfile has clang assisted parsing 16:34 <+bridge> [ddnet] https://clang.llvm.org/docs/UsersManual.html#cmdoption-wdocumentation 16:36 <+bridge> [ddnet] that was fast 16:44 <+bridge> [ddnet] when trying to use doxygen with clang i get crazy errors 16:44 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/881912187029954610/unknown.png 16:44 <+bridge> [ddnet] maybe i should tell cmake to use clang or smth 16:45 <+bridge> [ddnet] i wanna learn coding too 16:45 <+bridge> [ddnet] looks fun 16:46 <+bridge> [ddnet] @Ryozuki looks like you're using C mode somehow, try to set C++ and a modern standard somehow 16:46 <+bridge> [ddnet] oh 16:46 <+bridge> [ddnet] i got it 16:46 <+bridge> [ddnet] at least I expect some compiler flags to fix it 16:46 <+bridge> [ddnet] i was passing the dir to compile_commands.json 16:46 <+bridge> [ddnet] the file * 16:46 <+bridge> [ddnet] instead of the dir 16:47 <+bridge> [ddnet] well it gives some errors yet 16:47 <+bridge> [ddnet] doxygen theorically read compile_commands.json generated from cmake 16:47 <+bridge> [ddnet] so it knows the flags 16:47 <+bridge> [ddnet] looks like its working now, it just doesnt find the generated files like protocol.h xd 16:50 <+bridge> [ddnet] https://wiki.ddnet.tw/docs/classCCharacter.html 16:50 <+bridge> [ddnet] i wonder whats different 16:50 <+bridge> [ddnet] it says with clang templates stuff works better 16:51 <+bridge> [ddnet] ah i guess it didnt find generated files cuz i didnt build the project 16:52 <+bridge> [ddnet] im dumb 16:55 <+bridge> [ddnet] it takes way longer now, ill update it weekly 16:55 <+bridge> [ddnet] xd 16:59 <+bridge> [ddnet] What is `IVideo::Current()`? 16:59 <+bridge> [ddnet] I meant in the future 😄 17:00 <+bridge> [ddnet] lol 17:00 <+bridge> [ddnet] it says whether there is a video recorder object I think for demo -> video recording 17:00 <+bridge> [ddnet] https://media.discordapp.net/attachments/524847485487939585/865261452577996800/image0.gif 17:31 <+bridge> [ddnet] is the CComponent::OnRelease method called when the console closes? 17:31 <+bridge> [ddnet] or what is it 17:31 <+bridge> [ddnet] xd 17:32 <+bridge> [ddnet] oh maybe 17:32 <+bridge> [ddnet] its when u release from a input 17:32 <+bridge> [ddnet] e.g text input 17:32 <+bridge> [ddnet] imagine if we had docs for this 17:32 <+bridge> [ddnet] wonder who is making em 17:49 <+bridge> [ddnet] @Jupstar ✪ do u mean the x and y are deltas? 17:50 <+bridge> [ddnet] or the coordinates are relative to the game window 17:50 <+bridge> [ddnet] i guess that 17:50 <+bridge> [ddnet] Deltas 17:50 <+bridge> [ddnet] ah 17:52 <+bridge> [ddnet] deltas since last tick i guess 17:53 <+bridge> [ddnet] does this convince u 17:53 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/881929645749071922/unknown.png 17:53 <+bridge> [ddnet] @Jupstar ✪ 18:00 <+bridge> [ddnet] i guess since the last call is more precise 18:01 <+bridge> [ddnet] now i have to rebase #4095 xd 18:01 <+bridge> [ddnet] if we ever going to update sdl anyway, doesn't look like this i wanted xD 18:01 <+bridge> [ddnet] https://github.com/ddnet/ddnet/pull/4095 18:14 <+bridge> [ddnet] @Learath2 do you still have problems with #4114? 18:14 <+bridge> [ddnet] https://github.com/ddnet/ddnet/pull/4114 18:14 <+bridge> [ddnet] Nope, I'll give it a merge tonight 18:16 <+bridge> [ddnet] Alright 18:16 <+bridge> [ddnet] thanks a lot 20:47 <+bridge> [ddnet] @TsFreddie https://www.wsj.com/articles/china-sets-new-rules-for-youth-no-more-videogames-during-the-school-week-11630325781?mod=hp_lead_pos2 20:47 <+bridge> [ddnet] is this true 20:47 <+bridge> [ddnet] ppl under 18 20:47 <+bridge> [ddnet] insane 20:47 <+bridge> [ddnet] xd 20:47 <+bridge> [ddnet] dude im getting spammed with this 20:47 <+bridge> [ddnet] doesnt tencent hold lot of power in china? 20:47 <+bridge> [ddnet] arent they against this 20:47 <+bridge> [ddnet] xd 20:48 <+bridge> [ddnet] genshin impact seems to already applied the changes 20:48 <+bridge> [ddnet] lmao 20:49 <+bridge> [ddnet] i don't really care tbh. kids still gonna grab their parents id to register like they always do anyway 20:51 <+bridge> [ddnet] ah ok 20:51 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/881974459727224862/unknown.png 20:51 <+bridge> [ddnet] > Or LITERALLY ANY FUCKING ID you can find on the search engine when you type in "national ID china". I have used this trick as a foreigner for like, 10 years now. Works 100% of the time. 20:51 <+bridge> [ddnet] lmao 20:52 <+bridge> [ddnet] u can do this 20:52 <+bridge> [ddnet] hmm 20:52 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/881974750241521685/unknown.png 20:52 <+bridge> [ddnet] doesnt look rly secure xd 20:53 <+bridge> [ddnet] i honestly don't think it works any more 20:53 <+bridge> [ddnet] id verification are a gov service that you have to connect now 20:53 <+bridge> [ddnet] so it checks more than just the numbers 20:54 <+bridge> [ddnet] id verification are a gov service that service providers have to connect now 20:54 <+bridge> [ddnet] you have to provide id's holders name to match 20:55 <+bridge> [ddnet] it was an id, not a encryption 20:55 <+bridge> [ddnet] i mean the algo is public 20:56 <+bridge> [ddnet] of course it is 20:56 <+bridge> [ddnet] you can just tell 20:56 <+bridge> [ddnet] most of in person service requires you to have the nfc id card and they need to take your picture when you use it 20:57 <+bridge> [ddnet] for online verification, you need to provide both name and a valid id. if you just try to come up with one, you won't be able to provide holder's name. 20:58 <+bridge> [ddnet] for anything involves payments, an extra verification step is required where you upload a selfie where you hold your id against your face. 20:59 <+bridge> [ddnet] so it's near impossible to cheat it now. 20:59 <+bridge> [ddnet] ``` 20:59 <+bridge> [ddnet] /Users/runner/work/ddnet/ddnet/src/game/client/components/players.cpp:548:69: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses] 20:59 <+bridge> [ddnet] if((g_Config.m_ClShowDirection || g_Config.m_ClShowLocalDirection) && ClientID >= 0 || DemoPlayer()->IsPlaying()) 20:59 <+bridge> [ddnet] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ ~~ 20:59 <+bridge> [ddnet] /Users/runner/work/ddnet/ddnet/src/game/client/components/players.cpp:548:69: note: place parentheses around the '&&' expression to silence this warning 20:59 <+bridge> [ddnet] if((g_Config.m_ClShowDirection || g_Config.m_ClShowLocalDirection) && ClientID >= 0 || DemoPlayer()->IsPlaying()) 21:00 <+bridge> [ddnet] ^ 21:00 <+bridge> [ddnet] ( ) 21:00 <+bridge> [ddnet] /Users/runner/work/ddnet/ddnet/src/game/client/components/players.cpp:551:59: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses] 21:00 <+bridge> [ddnet] if((Local && g_Config.m_ClShowLocalDirection) || !Local && g_Config.m_ClShowDirection) 21:00 <+bridge> [ddnet] ~~ ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 21:00 <+bridge> [ddnet] /Users/runner/work/ddnet/ddnet/src/game/client/components/players.cpp:551:59: note: place parentheses around the '&&' expression to silence this warning 21:00 <+bridge> [ddnet] if((Local && g_Config.m_ClShowLocalDirection) || !Local && g_Config.m_ClShowDirection) 21:00 <+bridge> [ddnet] ``` 21:00 <+bridge> [ddnet] How can I fix this 21:07 <+bridge> [ddnet] add some parentheses 21:20 <+bridge> [ddnet] Yeah nevermind I fixed it 21:21 <+bridge> [ddnet] what about the color of the console? It seems to me that you need to make a choice, turn on / off the color, make it enabled by default 22:11 <+bridge> [ddnet] just force on, dont need a setting for everything