Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2023-04-04 00:00:00Z and 2023-04-05 00:00:00Z
Avatar
it's the same
Avatar
As far as I'm aware there's none
00:00
First one seems uglier to me
Avatar
there is no difference
00:00
it's just preference
00:02
stroustrup thinks the former makes more sense in cpp because TEXT is a pointer to a char (edited)
Avatar
char *text is more used, but thats the same (edited)
Avatar
For readability and cleanliness inside the code.

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [x] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [x] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memche...
Avatar
potentially silly question but pred is in ms right 👉 👈
Avatar
how to warn at runtime
Avatar
Avatar
Ewan
maybe lacks context but lmk what you think
kinda almost there
Avatar
can you use CScrollRegion in a horizontal orientation?? i would hope so but i'm not finding a flag or member to do so & a red flag i see is that there's only m_ScrollbarWidth in CScrollRegionParams, no height (edited)
Avatar
You probably cant since I don't remember any horizontal scroll regions in the code and we usually only implement whats used
06:16
That puts a wrench in things
Avatar
You'll have to take a detour and implement ScrollRegionH
Avatar
i went through & added conditionals to all x/y/w/h accesses & based it off a new flag from CScrollRegionParams
06:43
should suffice
06:43
if not i'll just rethink the UI
06:43
2 components doin the same thing is dumb
Avatar
I would probably have gone for some compile time variation just to avoid the branching
Avatar
caching can minimize the branching to init time
06:46
but that'll only happen after a refactor
06:47
which will only happen if this works
Avatar
got it working. i had some stupid and entirely foreseeable OOO issues
07:49
i had 2 instances along the lines of this m_ContentH <= m_ClipRect.h that i changed to this m_ContentSize <= m_Horizontal ? m_ClipRect.w : m_ClipRect.h that evaluated as this (m_ContentSize <= m_Horizontal) ? m_ClipRect.w : m_ClipRect.h when it should have been like this m_ContentSize <= (m_Horizontal ? m_ClipRect.w : m_ClipRect.h)
07:51
but i was blazing through on the first pass so i don't really blame myself
07:51
this particular combination of operators is not something that gets me often
07:54
but yeah when i refactor i'll probably just do like this float *m_ClipRectSize = m_Horizontal ? &m_ClipRect.w : &m_ClipRect.h, *m_ClipRectPos = m_Horizontal ? &m_ClipRect.x : &m_ClipRect.y; ... // whatever m_ContentSize <= *m_ClipRectSize // instead of // m_ContentH <= m_ClipRect.h
07:55
so it's just as fast being a pointer deref instead of member access
07:55
or if it isn't, it's not as expensive as checking each time
Avatar
doesn't make too much sense to optimize this kind of code, the compiler will rewrite it for you anyway if it isn't too complex
Avatar
there are dozens of these little m_Horizontal ? checks
07:57
and they are not necessarily slow but it's better to optimize anyway if it ends up making the resulting code cleaner. which it will if done this way
07:57
sooner or later it'll all be yanked anyway and replaced with a 2 axis scroll area, so i won't lose sleep over it (edited)
Avatar
code clarity is always a good argument though 🙂
Avatar
yea i mean doing it like that from the start would have saved me 20 mins
07:58
the rare objectively better approach
Avatar
Avatar
Ewan
but yeah when i refactor i'll probably just do like this float *m_ClipRectSize = m_Horizontal ? &m_ClipRect.w : &m_ClipRect.h, *m_ClipRectPos = m_Horizontal ? &m_ClipRect.x : &m_ClipRect.y; ... // whatever m_ContentSize <= *m_ClipRectSize // instead of // m_ContentH <= m_ClipRect.h
still a bit weird to store a pointer to float, I would have just copied the float float is 4 bytes and a pointer is 4 or 8 bytes, so your pointer indirection is actually an additional cost
Avatar
it's across multiple functions whose timelines aren't entirely clear
08:00
so they are prone to changing under my feet
08:00
pointer is best
Avatar
I highly doubt the compiler is smart enough to know this is ui code and getting rid of all these branches by splitting it in two is the best. But it's fine, we can worry about performance later
👍 1
Avatar
well yeah and this isn't ending up in ddnet upstream
08:01
and if it is, it's in a very long time
08:01
my fork of a fork of a fork of ddnet
08:01
xd
Avatar
If it's not for upstream then you have even less reason to care 😄
Avatar
fork maintainer would probably like it if i took it seriously
08:02
so i do
08:02
and i'd be happy to patch for ddnet but when i asked in here nobody was interested (edited)
08:02
so whatever
Avatar
Ui performance doesn't matter anyway
08:37
Not like u have to react quickly. Responsiveness should be given tho ofc
Avatar
what do u answer if ur offered senior level rust positions
09:07
but u dont think ur senior
09:07
im just 22 soon 23 lol
Avatar
Just say yes
09:17
What do u have to loose
Avatar
if someone knows, can i make rifle-sg shots and doors to full transparent?
Avatar
U can remove the textures
Avatar
Avatar
Jupstar ✪
U can remove the textures
where?
09:22
i couldn't find :(
Avatar
SG is in game.png i think. Laser is particles.png
Avatar
Avatar
Jupstar ✪
SG is in game.png i think. Laser is particles.png
all u called i've already made empty
09:26
pepePHONE
Avatar
Mh then laser maybe not fully transparent xd
Avatar
Avatar
Jupstar ✪
Mh then laser maybe not fully transparent xd
Ncry
Avatar
Blame whoever thought that color values do not contain an alpha channel is a good idea xd
Avatar
Avatar
Jupstar ✪
Blame whoever thought that color values do not contain an alpha channel is a good idea xd
yeah, weird
09:29
Sticker
09:32
LOL
09:33
deleted assets in roaming to check if smth gonna change, open the game it automatically create a folder and my previous Deleted xDDD (edited)
Avatar
Yes but empty
09:34
It's just so the buttons in-game work
Avatar
yeah but i mean it is just deleted all stuff i had before even from recycle bin
09:35
xDDD
Avatar
Avatar
Ryozuki
but u dont think ur senior
i got offered a senior cpp position last week and turned it down for the same reason
09:37
i just said something like "As much as I would love to humor it, I'm not there yet"
Avatar
Avatar
Jupstar ✪
What do u have to loose
if you're looking for work then you have time and effort to lose
Avatar
Mh, depends on what u think a senior dev has to do i guess
Avatar
igot a job already tho
10:09
so its less that im looking more that they come to me
10:09
PES2_BasedGe
Avatar
Ah thought same job xd
Avatar
Avatar
Ryozuki
but u dont think ur senior
Boss thinks ur senior, ur senior. That's how capitalism works
Avatar
its not my boss tho its another company
12:34
im definitly not considered a junior
12:34
i seen some juniors in the company
12:34
some didnt even know what a trait is
12:48
And here I think I'm not qualified to be an intern even
Avatar
@Learath2 there are juniors and then "juniors"
13:19
and then me
13:19
someone that knows more than some seniors
13:20
but well seniors are seniors cuz they are better at knowing how much x will take or how hard or idk
13:20
im probably a med or idk
13:20
a normal dev
Avatar
I'd say a senior is someone who doesn't need to ask every 5 minutes
Avatar
well idk if thats a metric
13:21
i barely ask
13:21
if i ask is because i dont know smth thats specific of the software
Avatar
Then u a senior.. at least if u make progress with whatever u do
13:22
U can be a rust senior without being a senior in the field u are working on
Avatar
i guess thats it
13:23
well i would say i lack the skill to manage people like others, altho i have no problem saying do x and i do y to someone
13:23
actually i do that
13:23
its more a exp based thing
Avatar
Well that's not directly the job of a senior
Avatar
That's a manager
Avatar
project manager
13:23
but it feels weird to call urself a senior
Avatar
Why
Avatar
im a rust developer thats it
13:24
dont u always feel like ur less
13:24
or not deserving
13:24
i guess i have too high standards
13:24
a senior for me is someone like deen
13:24
learath would be my C senior
13:24
if i have a c question i ask him
13:25
kek
Avatar
I feel like the best I can do is stuff i like, because I'm motivated for them. Skill is not an excuse then. So I feel less if I don't make progress in this field
Avatar
yeah thats obs
13:25
obv
13:25
if u do smth u like u do it the best
13:25
im sure my php code would be bad
13:26
cuz i wouldnt be motivated for shit
Avatar
Avatar
Learath2
And here I think I'm not qualified to be an intern even
u r qualified dont joke urself
13:27
the job market is not prepared for nerds like us
Avatar
Anyway. To me a senior is not equal to an expert. Learath probably knows more about c then most c senior
Avatar
they require us to go through the stupid ladder
Avatar
Avatar
Jupstar ✪
Anyway. To me a senior is not equal to an expert. Learath probably knows more about c then most c senior
i guess thats a better view
13:27
for me senior always meant expert
13:27
but its prob not true xd
13:32
@Jupstar ✪ a good way to boost ur ego is to go to linkedin and see boomers posting screenshots of js code snippets saying "look this neat js feature totally you didnt know!"
13:32
BASEDDEPT
Avatar
@Ryozuki a senior is someone who can write code that chatgpt can't write 😎
Avatar
Avatar
Ryozuki
@Jupstar ✪ a good way to boost ur ego is to go to linkedin and see boomers posting screenshots of js code snippets saying "look this neat js feature totally you didnt know!"
Most ppl haven't created something revolutionary anyway. In fact as sad as it is. Most coders write lot of code and not so much high quality code. That's not bad, because that means progress for society. But the really hard stuff is probably often connected to math or physics
13:39
@Ryozuki would u say u have to think a lot and hard about what u code?
13:40
Or is it mixed? When I look at what I wrote during the years. The hardest stuff always was either related to a good multi threaded design, or math related
Avatar
Avatar
Jupstar ✪
@Ryozuki would u say u have to think a lot and hard about what u code?
lately yes, because im doing something i didnt before
13:40
writing llvm
13:40
its rly fun tho
13:41
well it makes sense
13:41
threading is one of the hardest if not hardest things in computing
13:41
and saying otherwise is a lie
13:41
hardware is racy
Avatar
Yep especially if it's a design that doesn't target a single algorithm
Avatar
Avatar
Ryozuki
lately yes, because im doing something i didnt before
The question will be if u will be much faster once you learned out. Or if what u learn in itself requires you to rethink everything.. so basically never ending learning.. that's usually where u have to be innovative and that costs time to think and trial and error ^^
Avatar
i think learning is always good
Avatar
Avatar
Ryozuki
and saying otherwise is a lie
Otherwise
Avatar
and if the learning leads u to rethink
13:45
its good
Avatar
Avatar
Learath2
Otherwise
Liar
13:46
i mean threading involves all the complexity of hardware, but multiplied by X
Avatar
It's actually extremely annoying to reason about any order of execution in modern architectures. So I do kinda agree that it's very hard
Avatar
because u do X things in paralel
13:46
@Learath2 whats another thing u thought?
13:46
thats as hard or more
13:47
tldr: why otherwise
Avatar
Use no globals anywhere xd
Avatar
use rust xd
Avatar
Avatar
Ryozuki
tldr: why otherwise
I just said it as a meme 😄
Avatar
ah lmao
13:47
xd
Avatar
Ryozuki 10 iq
Avatar
If I had to find anything as annoying it'd probably be proper benchmarking
Avatar
oh true
Avatar
It's actually deceptively hard to set up good benchmarks
Avatar
is counting cycles a valid deterministic way of benchmarking?
13:48
i always wanted to have a realiable benchmark that can run in CI
Avatar
What is my algorithm has many cycles but good effective speed
13:48
If
13:48
idk
13:49
my question is
13:49
is there a solution to have good benchmarks on machines with lot of noise
Avatar
Eg Because of multi threading xd
Avatar
Even at a higher level, you need to know what data sizes to bench with, what collection sizes to bench with, you need to know if there are any platform quirks ruining your performance
Avatar
Avatar
Learath2
Even at a higher level, you need to know what data sizes to bench with, what collection sizes to bench with, you need to know if there are any platform quirks ruining your performance
the solution tbh is live production telemetry
Avatar
Avatar
Ryozuki
is there a solution to have good benchmarks on machines with lot of noise
Just to it enoughmanytimes that the noise averages out I guess
13:50
do it*
Avatar
Avatar
Learath2
Even at a higher level, you need to know what data sizes to bench with, what collection sizes to bench with, you need to know if there are any platform quirks ruining your performance
So benchmarking for scalability.. yes that's very hard
Avatar
for example
13:50
in my app i had a query that took 1 s
13:50
i knew cuz telemetry
13:50
so i fixed it
13:50
down to half
13:50
idk xd
Avatar
Avatar
Ryozuki
the solution tbh is live production telemetry
Yes. Almost always better than synthetic benchmarks
Avatar
But a query is something specific. What if u run 10000 queries at once. What's the bottleneck then? ^^
Avatar
When ddnet telemetry?
Avatar
rust has a rly good crate
13:51
actually i could do that
13:51
im motivated
Avatar
Avatar
Ryozuki
actually i could do that
Heinrich would literally shoot you for privacy reasons
Avatar
the server just needs to offer a single http endpoint with prometheus formatted data
13:52
the telemtry isnt smth personal
13:52
more like
Avatar
Maybe opt in telemetry?
Avatar
Rust also static links. I could imagine that makes benchmarking easier if u want to inject it at compile time
Avatar
average duration of X thing
13:53
m$$ rly stained the name of telemtry
13:53
@Learath2 oh i meant server side only
Avatar
Oh that's boring
Avatar
The problem with telemetry is the name itself
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
u think this telemtry is privacy related? xd
Avatar
If I hear it I think they steal private. Information
Avatar
We should make one of those profilers new engines have so we can track how much time we spend on what
Avatar
The client version is also a kind of telemetry we collect
Avatar
Avatar
Learath2
We should make one of those profilers new engines have so we can track how much time we spend on what
thats the telemtry i thought of
13:54
but yeah
13:54
it would be cool to have gpu telemtry
13:54
detailed
Avatar
Xd
Avatar
legit for optimizing better
13:55
e.g draw call info
13:55
idk im talking bs
Avatar
Imagine we'd know what config are used how often and what hardware, what drivers
13:56
And break backward compability lmao
13:57
@Learath2 btw what do you use for benchmarking if that's a topic u investigated your thoughts in already?
Avatar
I only tried a couple libraries but havent used any in anything serious
13:59
I think Celero was the one I enjoyed the most
14:01
I was more talking about methodology than implementations though
Avatar
Yeah but they depend heavily on your software requirement anyway
Avatar
Googles attempt at is probably the best but it is as always rather heavy
Avatar
What about human intuition?
Avatar
I mean none of those help with the methodology, you still need to design the testcases. For which human intuition is indeed still the best we have
Avatar
with rust i use criterion
Avatar
If you can learn intuition, then maybe an ai can beat benchmarking software some day xd
Avatar
we need property testing in ddnet
Avatar
But it does occasionally fail you, so you need to make sure you explore all variables
Avatar
its cool
14:07
Usage documentation for the proptest and proptest-derive crates
14:07
Proptest is a property testing framework (i.e., the QuickCheck family) inspired by the Hypothesis framework for Python. It allows to test that certain properties of your code hold for arbitrary inputs, and if a failure is found, automatically finds the minimal test case to reproduce the problem. Unlike QuickCheck, generation and shrinking is defined on a per-value basis instead of per-type, which makes it more flexible and simplifies composition.
Avatar
Modern cpus have some extremely unintuitive behaviours
Avatar
Javascript too xdd
14:08
man
Avatar
I think Ryozuki posted a very interesting one here once. Something with an array with a weird amount of elements performing better than a power of 8
Avatar
wasm needs to take off
Avatar
Avatar
Learath2
I think Ryozuki posted a very interesting one here once. Something with an array with a weird amount of elements performing better than a power of 8
i know
14:11
14:11
There is no vectorization or anything, and the two loops produce the same assembly except for the step size. This effect is due only to the memory system, in particular to a feature called cache associativity, which is a peculiar artifact of how CPU caches are implemented in hardware.
14:11
why do i have such good memory
14:12
amazed of myself
14:13
that website itself is golden
14:13
rly good resource
Avatar
lol I remember that
14:14
u sent it here once
14:14
im the messager /(idk the word kek) (edited)
Avatar
Yep, so you really need to dig into your brain for anything you can think of. Almost everyone would use the nice even 256 there and might not even notice it is 10 times worse than 257
Avatar
Xd
Avatar
Avatar
Learath2
Yep, so you really need to dig into your brain for anything you can think of. Almost everyone would use the nice even 256 there and might not even notice it is 10 times worse than 257
well this is why most SO answers say "profile before doing anything"
14:15
because its hard to determine
Avatar
It's really easy to miss that even in a benchmark you might think is rather well designed. Say I tested incrments of 32, 64, 128, 256. I'd totally have missed it
Avatar
That's where I'd say intuition is better.. just because this single loop is slower that doesn't mean your software must suck, if it overall has a good concept
14:17
If u want to optimize for a single hardware maybe
14:17
But usually only Learath do that in c
Avatar
I mean, depends on the goal of your software. If you need the absolute minimum latency e.g. this might not be an acceptable loss
Avatar
Yeah
Avatar
Avatar
Jupstar ✪
But usually only Learath do that in c
I optimize for an imaginary abstract machine in my head that isn't too hard to optimize for
Avatar
inb4: nasa using 257 stride instead of 256 in the moon software
Avatar
I mean I somehow actually like optimizations like these. But often u probably target a general purpose hardware
Avatar
Avatar
Ryozuki
inb4: nasa using 257 stride instead of 256 in the moon software
They use javascript xd
Avatar
BCS fast enough xdd
Avatar
I target an old 16 bit cpu in my brain where ordered execution is still a thing
Avatar
Isn't x86 strongly ordered?
14:20
i think risc is weakly
Avatar
But only the memory model. Dunno what Lea means
Avatar
lea is an instruction
14:20
iirc
Avatar
Eeeh. I don't honestly even know anymore. It's guaranteed that it'll appear as such. But cpu pipelines do reorder your instructions as they see fit
Avatar
load effective address
14:21
i just figured learath name meaning
14:21
he was a assembly instruction all along
14:21
and one of the most used
Avatar
Only the first 3 letters
Avatar
It's a common girl name
Avatar
That implies he wants girls in his life desperately
Avatar
Avatar
Jupstar ✪
It's a common girl name
Was I a catfish all along?
Avatar
ryozuki sounds girl too
14:22
but i cant change it
14:22
i just choose a japanese sounding name long ago
14:22
and stuck
14:22
it was cuz ryuzaki
14:22
from death note
Avatar
Yours sounds more weeb than girl so that'll throw people off
Avatar
Avatar
Ryozuki
from death note
Oh I always wondered if it's that xd
Avatar
hmm Misutero Gosuto (edited)
14:50
or Gosuto-san idk I like the Mister though xD
Avatar
Is that also anime? Xd
Avatar
no xD
Avatar
Avatar
Mr.Gh0s7
or Gosuto-san idk I like the Mister though xD
It'd be misutā (ミスター) not misutero
Avatar
oh thanks I was wondering xD
Avatar
ミスターゴースト
Avatar
today i had to download a goverment app to get a pin to do my taxes soon
15:13
cyberpunk 2077
15:13
probs can do without app but its way more complicated
15:13
its this
Avatar
I find newer interfaces to these legacy processes are indeed much easier
Avatar
the gov doesnt even put a HD logo of spain there
15:14
lmao
Avatar
Hd
15:14
Svg
Avatar
Italy does the same. I keep thinking it's some scam
Avatar
Sad
Avatar
now my chinese phone has a spanish gov app
15:15
what else
Avatar
Install anti virus
Avatar
it has one
15:16
from the china phone
15:16
kek
15:16
it shows a ad after u install a app
Avatar
Lmao
Avatar
i wanted to install a custom rom but im 2 lazy
15:16
i dont use the phone much besides reading memes
15:17
MIUI
Avatar
I want to install lineageos on my old phone but it's not maintained so I need to build my own 😭
15:17
I honestly can't stand miui
Avatar
MIUI (pronunciation: Me You I) is a mobile UI (User Interface) developed and maintained by Xiaomi exclusively for its smartphones. MIUI is based on Android Open Source Project and serves as the basis for other operating systems created by Xiaomi: MIUI for POCO, MIUI for Pad, MIUI for Watch, and MIUI for TV (PatchWall). There are different versi...
15:17
it has this
15:18
one day ill get a more open phone
Avatar
I use HavocOs
Avatar
I have that
Avatar
but i dont want to spend $$$ on a phone
Avatar
Huawei gang
Avatar
i dont use much
Avatar
or should I say, wawei
Avatar
Avatar
Ryozuki
one day ill get a more open phone
This is one thing there will never be good open alternatives in 😭
Avatar
is pixel good?
Avatar
Oh if that is open enough for you yeah, it's decent
15:19
I thought you meant something like a linux phone
Avatar
Avatar
Learath2
I thought you meant something like a linux phone
i know its hard that
15:21
but yeah for me google is more open than china
15:21
for now
15:21
google atleast publishes the source code for the ROM iirc
15:21
huawei violates GPL
15:21
they dont publish it
Avatar
Yeah. It's good enough for me too. You usually like extremes of freedom, so I just assumed 😛
15:22
Xiaomi Mobile Phone Kernel OpenSource. Contribute to MiCode/Xiaomi_Kernel_OpenSource development by creating an account on GitHub.
15:22
check all the issues
Avatar
Avatar
Learath2
Yeah. It's good enough for me too. You usually like extremes of freedom, so I just assumed 😛
is pixel 7 good
15:22
587€ is already enough
15:23
i dont like paying 900 for a phone
Avatar
I haven't used a pixel in years. Idk if this generation is good or not, you'll have to research
Avatar
my requirements arent high anyway xd
Avatar
Yeah, I think this will be my last flagship phone. I'll downgrade next time I need to get a new phone
15:25
The prices are just insane now :/
Avatar
Avatar
Ryozuki
587€ is already enough
True. Phones sucks BCS no good os to write rust
Avatar
Avatar
default
or should I say, wawei
we don't say it "wawei"
Avatar
but that's how you spell it
Avatar
the "hoo" is silent
Avatar
no, you have to spell it, they even do it
15:38
hwaaway
Avatar
yes, not waway, the h is pronounced, you can hear it
Avatar
yea but I meant the "hoo"
15:40
can't you read
Avatar
well u can kinda hear it too
Avatar
germans pronounce it "hooawei" (edited)
15:41
while it gets pronounced more like wawei
15:42
and if you don't believe me, listen to German google translate (edited)
15:42
it is accurate
Avatar
I already know
Avatar
df48c44 Bring every Font Icon unicode into a namespace - VoxelDoesCode 90861d9 Get rid of unused warning - def- 89eb7e6 Merge #6494 - bors[bot]
Avatar
The client ID referenced by dragger beams and plasmas must also be swapped when two clients are swapped, as those entities should refer to the same character entity as before the swap. For dragger beams, swapping previously caused the active beams to switch target to another character. For plasmas, swapping previously caused already shot plasmas to not have an effect on their original target character. Closes #5865.

Checklist

  • [X] Tested the change ingame
  • [ ] Provided sc...
Avatar
this has probably been talked about before but wouldn't it be cool if cl_nameplates_strong 1 would work so if you spectate someone you can see who they have strong/weak on. It's like that with the weapons hud etc aswell jaothinking
20:33
would also be super easy
20:33
and free view spec still showed who you have strong/weak on
20:51
ddnet 16.9 won't open
20:51
16.8 is ok
Avatar
aa08cfa Fix swapping with dragger beams and plasmas - Robyt3 e47f54d Merge #6495 - bors[bot]
Avatar
Avatar
noby
Click to see attachment 🖼️
use windows u noob
Avatar
Avatar
ReiTW
use windows u noob
#developer rule #1: don't mention windows as usable operating system
23:17
💀
Exported 400 message(s)