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 2022-10-28 00:00:00Z and 2022-10-29 00:00:00Z
Avatar
Avatar
deen
Should we periodically clear symbols for old releases? They are taking 12 GB already: https://ddnet.org/downloads/symbols/
I guess the nightly symbols from over weeks ago are not that useful
Avatar
Didnt even know that existed
Avatar
perfection
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
Avatar
A syntax-highlighting pager for git, diff, and grep output - GitHub - dandavison/delta: A syntax-highlighting pager for git, diff, and grep output
06:28
06:28
my neovim getting better
Avatar
@deen how much telemetry data does steam offer? Like does it say which GPUs are used by players of ddnet?
07:10
this is cool AF
Avatar
oh nice, a friend even plays this card game 😄
Avatar
Css only
Avatar
Avatar
Jupstar ✪
oh nice, a friend even plays this card game 😄
duh its pokemon xd
Avatar
i know
07:12
but its defs not the greatest TCG XD
07:12
its very luck based
Avatar
I guess never played it
Avatar
what is yours all moral standpoint to basic telemetry? gpu, cpu, ram integer config variables for string config variables only if they differ from the default, so nothing leaked (some expcetion e.g. gfx_backend)
07:24
and operating system xdd
07:29
If its opt in its ok
07:29
If its opt out not
Avatar
opt in is useless lets face it
Avatar
i mean who searches the option
Avatar
Just a popout on first open
Avatar
and clicks on send crash reports
Avatar
I do for steak
Avatar
thats smth different
07:30
Its opt in
Avatar
its both at the same time xD
Avatar
I dont want a system that silently has telemetry on by def
07:31
And u dont know it
Avatar
we actually already have some kind of telemetry anyway the username is sent to the ddnet http info requests
07:33
for the finishes
07:33
that leaks more personal information than any of my above stuff
07:34
how much data is inside the http headers sent by curl?
Avatar
Probs not much
Avatar
anyway non ideologicly ddnet rn has your username & all ingame chat unencrypted, all input data ever made vs i just want some information that helps for development and contains no private data
Avatar
https://feedback.wildfiregames.com/ they have quite a bit of insight, but mostly linux users play that game. and for some reason most linux users seem to use intel computers apparently xD
08:08
i also dont trust the data too much. GL_VERSION might report the gl version requested by the game not the one supported at max
Avatar
@Jupstar ✪ im sure our windows users are happy to say yes to telemetry
08:13
BASED
Avatar
the problem is really that the word itself triggers ppl
08:14
i understand that u dont want to leak all shit so its sold to google
Avatar
Just state clearly what is gathered
08:14
Being honest is the best here
Avatar
yes
Avatar
Most ppl will say yes, i wanna flex my 4090 gpu to the stats
08:15
BASED
Avatar
lmao
08:15
this is always my motivation when steam hardware survey pops up
08:15
lets make linux great xD
Avatar
man i'd really love to drop all backends other than vk i have some cool ideas that would be easier to develop if i wont need to change all other backends too and test all shit xD
Avatar
@Jupstar ✪ can u just add features exclusive to vulkan?
Avatar
yes but its hard to keep it clean
Avatar
the higher lvl code always has to do ifs like (backend supports this and that) ..
Avatar
Stupid old hardware
08:21
BASED
Avatar
@Ryozuki how much disk space does ur new OS use btw? i am already out of disk space again xD 1.5 TB SSD are simply not enough
08:29
But it has to fetch src when installing so
08:29
I got 2x m2 500gb and a 2tb sss
08:29
Ssd
Avatar
Avatar
Ryozuki
Idk
You might want to delete your distfiles every once in a while
Avatar
Quad::new(50 * 2i32.pow(15), 30 * 2i32.pow(15)) @Patiga i had this in twmap 0.6 but on 0.9 it uses some weird integer with fractional bits
09:19
do you know how to use it? xD im confused
09:20
API documentation for the Rust Quad struct in crate twmap.
API documentation for the Rust Quad struct in crate twmap.
Avatar
Looks like a fixed point number, which is what we use in the actual data anyway
09:24
maybe twmap could reexport the "fixed" crate
09:24
anyway i imported it for the types
09:24
Quad::new(Default::default(), Point::new(50.into(), 30.into()))
09:24
seems to work
09:24
(well didnt test ingame)
Avatar
Do you even need the intos?
09:25
Oh, you probably do
Avatar
Yes because the new doesnt accept Into<I17F15>
09:25
But rather the I17F15 itself
09:26
A pr maybe would be worth
09:26
xd
09:27
If only it was on github
09:28
Quad::new(Default::default(), Point::new(I17F15::from_num(50), I17F15::from_num(30)))
09:28
ok it needs to be this
Avatar
Avatar
Tater
Is quite amazing the ratio of contributors to stars is about 1:2 I wonder if ddnet has the most contributors of any open source game
probably not. minetest? mindustry?
Avatar
ddnet is good in one thing, keeping players playing
10:01
mindustry has only 300 players currently on steam
Avatar
Avatar
Ryozuki
Quad::new(Default::default(), Point::new(I17F15::from_num(50), I17F15::from_num(30)))
Does From<i32> do from_bits? That's a bit of a sad api choice on their part
10:04
Going from an integer to a fixed point I'd expect a 0 fractional part and my integer, but I guess that'd need to be a TryFrom because it may be out of range
Avatar
Avatar
Jupstar ✪
mindustry has only 300 players currently on steam
cuz you can download mindustry for free from itch.io or github
Avatar
bcs the average player does that xD
10:04
ok maybe indeed bcs it cost
10:05
but i'd still assume he made most money mobile?
10:05
mobile players buy stuff and then dont use it xd
Avatar
indeed justatest
Avatar
but now i am interested in their player counts
10:06
the problem with games like mindustry is that they get boring after a while 😄
Avatar
Over a million players on Steam got DDNet (but only 860k started it)
Avatar
oh nice still very impressive
Avatar
I'm trying to load the Hardware survey page, but it just hangs so far
Avatar
Now it loaded but Firefox crashed during screenshot 😄
10:39
Do people have to opt into the Hardware Survey? If so, then it's pretty useless
10:40
Of course people with better hardware will opt in more often
Avatar
On steam yes
10:40
Still steam survey is one of the best data out there
Avatar
@Jupstar ✪ Does it help as a screenshot?
nouis 2
Avatar
Avatar
deen
@Jupstar ✪ Does it help as a screenshot?
yeah good enough thx
Avatar
yeah some interesting stats ~40% laptop users.. thats quite high RAM <4GB 1% VRAM <1GB 4.53% SSE3 100% around 5.4% with GPUs that are really old, ivy bridge, haswell, some old ATI cards etc. (edited)
Avatar
Do we compile with sse3
10:59
?
Avatar
do we have a usecase? i'd assume some libraries we use do it
11:02
on the other hand i think clang does some vectorization with o2 already if i remember correctly but gcc doesnt tho i dunno which instructions this results in
Avatar
depends on the target architecture it's compiling for
Avatar
yeah i mean for x64 ofc
Avatar
Avatar
Jupstar ✪
yeah some interesting stats ~40% laptop users.. thats quite high RAM <4GB 1% VRAM <1GB 4.53% SSE3 100% around 5.4% with GPUs that are really old, ivy bridge, haswell, some old ATI cards etc. (edited)
I can see the benefit of laptops, even as someone who never moves their computer. They are much lower power consumption and nowadays easily fast enough.
Avatar
well depends what u want to do xD
Avatar
I'd probably get a mobile CPU instead of some desktop beast that goes to > 5 GHz
Avatar
i consider laptops as insanly slow, especially the GPUs are really bad
11:04
yes single threaded laptops are quite ok
Avatar
Sure, but DDNet runs fine 😄
Avatar
Avatar
Jupstar ✪
yeah i mean for x64 ofc
it still depends. there are multiple targets for x86-64, depending on the level of support you want
Avatar
Avatar
Jupstar ✪
i consider laptops as insanly slow, especially the GPUs are really bad
I mean even relatively they aren't THAT slow, insanely is a bit of an overreach, no? 😄
Avatar
Avatar
Learath2
I mean even relatively they aren't THAT slow, insanely is a bit of an overreach, no? 😄
depends i guess, if u ok with 720p gaming on mid graphics or not being able to run blender well enough
Avatar
I need my fast cpu
11:06
Laptops are so slow
Avatar
gpu wise yes, I was thinking cpu
Avatar
for me personally a fast GPU is important. its annoying if stuff doesnt run well
11:06
and programs tend to use GPUs more and more
11:06
more workload is shifted to the GPU i mean
Avatar
I compile a lot of rust so i like having a beefy cpu
11:07
BASED
11:08
And noise isnt a problem to me
11:08
My headset cancels noise passively
11:08
And i put music
11:08
greenthing
Avatar
I took a quick look at 4th gen just as an example. The flagship i7 turbos up to 4.4GHz. The flagship i7 mobile turbos up to 4.0GHz. It's just a 400MHz difference. It's even better in 10th gen
11:09
Mobile gpus though yeah, not the best honestly but if you want workstation performance there are beastly laptops too, if you are ok with carrying them around
Avatar
Avatar
deen
I'd probably get a mobile CPU instead of some desktop beast that goes to > 5 GHz
another problem is that laptops are quite expensive for what they can do
Avatar
They rly are
Avatar
for 500 bucks i get 16 core desktop cpu
Avatar
And thry often come with just 500gb
Avatar
I'd probably get a laptop CPU in a desktop case if that is still possible 😄 Used to be easy, but no sockets on laptops for a while now :/
Avatar
oh ok
11:11
u can simply undervolt and downclock
11:11
if its such a problem 😄
Avatar
Avatar
deen
I'd probably get a laptop CPU in a desktop case if that is still possible 😄 Used to be easy, but no sockets on laptops for a while now :/
There is that one chinese guy that solders BGA laptop cpus to adapters and sells them 😄
Avatar
most of the time CPUs run idle anyway 😄
Avatar
Why do u want a slower cpu?
Avatar
so the 5GHz are just nice to have
11:12
my cpu runs under 7W in idle
Avatar
even the idle power consumption of recent desktop CPUs is pretty high
Avatar
my gpu similar
Avatar
German article, but idle CPU power of 20 W is bad
Avatar
I'd probably keep a normal desktop but I can definitely see the value proposition of a laptop, being able to move around is just great/10
Avatar
Avatar
deen
even the idle power consumption of recent desktop CPUs is pretty high
u shouldnt underestimate one thing new GPUs have much more cores, so they can do more with less energy the problem is at around 80% usage.. .then desktop stuff gets inefficient
Avatar
Avatar
deen
German article, but idle CPU power of 20 W is bad
why?
11:14
20 is nothing
11:14
use a train one time and u wasted more energy than 1 year running this idle
Avatar
The train isn't outputting its waste heat into my hot summer apartment though 😄
Avatar
mhh 20W is not lot of heat
Avatar
Avatar
deen
The train isn't outputting its waste heat into my hot summer apartment though 😄
Run the AC 4head
Avatar
the processor is like 3cm big
11:15
its not enough to heat a 1m² of a room
Avatar
Avatar
Jupstar ✪
the processor is like 3cm big
Size of the CPU mattereth not actually, 20W is 20W
Avatar
Avatar
Learath2
Size of the CPU mattereth not actually, 20W is 20W
yes but its still not lot of heat on 1m²
Avatar
It's not just the CPU, mainboard etc have also increased in power consumption in recent years
Avatar
20W on the full room is nothing anyway
Avatar
Avatar
Jupstar ✪
yes but its still not lot of heat on 1m²
Yeah, 20W isn't much heat. Just wanted to say the cpu size isn't a factor
Avatar
Avatar
Learath2
Yeah, 20W isn't much heat. Just wanted to say the cpu size isn't a factor
my point was really more about where the heat is
Avatar
The thing about heat is that it doesn't like staying where it is
Avatar
air is a pretty good isolation (edited)
Avatar
Anyway, I don't like that desktops went from idling at ~25 Watt to 50 Watt in the last 6 years
Avatar
Avatar
Jupstar ✪
air is a pretty good isolation (edited)
Air will not conduct heat well, but it will heat up, the 20W of heat has to go somewhere
Avatar
Avatar
Learath2
Air will not conduct heat well, but it will heat up, the 20W of heat has to go somewhere
yeah but it will not heat the full room
11:21
heat tends to go to the top
11:21
as soon as its dark outside in germany it will cool again xD
Avatar
As far as my understanding of thermodynamics goes, the universe really doesn't like heat gradients, warm air and cold air will exchange heat until equilibrium. Now whether the amount of temperature change due to the heat is negligible or not, that's up to you
Avatar
turn off your light and u save 30Watt
11:23
remove the sunlight and u probs save over 20Watts
Avatar
I use leds, those are like 6W
11:24
Can't remove the sun, it'd be great though
Avatar
remove your body and u probs save over 100watt
boo 1
Avatar
Avatar
Learath2
Can't remove the sun, it'd be great though
close the whatever u have at your window
Avatar
Can't remove body either, humans can't be uploaded to the cloud ye
boo 1
Avatar
Avatar
Learath2
I use leds, those are like 6W
your room light has 6watt?
11:24
then gg
11:24
thats not enough for me 😄
Avatar
Avatar
Jupstar ✪
close the whatever u have at your window
Radiation still heats the windows and my walls
Avatar
anyway
11:26
u also have to take the difference anyway
11:26
a laptop also uses 5watts or smth
Avatar
Avatar
Jupstar ✪
thats not enough for me 😄
Really? These modern 7W bulbs are like equivalent to 60W incandescents
Avatar
so we already at 15W
Avatar
Avatar
Learath2
Really? These modern 7W bulbs are like equivalent to 60W incandescents
yeah dunno i think mine is like 18watts, the transformator also looses some energy
Avatar
protip: run your lightbulb underpowered too, then it lasts much longer
11:28
and is more efficient, less waste heat
Avatar
^^ez
Avatar
Anyway, as I said. I'd probably keep a desktop cpu aswell. Just saying no matter the wattage the size of the cpu, there is heat being output and it'll heat the room
Avatar
anyway, for me as said its not even so much about the CPU, but GPU, and desktop GPUs are like mini computers, with own mainboards etc. so i have to accept they use extra energy
Avatar
Avatar
deen
3 W bulbs can be 60 W incandescent equivalent like that: https://www.youtube.com/watch?v=klaJqofCsu4
I was just about to say have you seen those dubai bulbs 😄
Avatar
i can ensure my room light isnt the most efficient xD
Avatar
I can get 7W =~ 60W ones in europe, they get cool 3W ones
Avatar
I do something similar for a long time. I got SceneSwitch LEDs and rarely run them at their full brightness level, so far none have failed.
Avatar
I haven't had a led lamp fail in 4 years I think even at full power
11:32
I seem to have gotten lucky on the silicone lottery
Avatar
Yeah, only some designs are bad and easily overheat
Avatar
just judge yourself @Learath2 xD
11:33
but my lamp also has different lighting modes
11:35
my gpu uses around 30W in ddnet with 1400fps
11:35
thats not nothing but an old laptop could not do it at 30W
11:37
the good thing here is: the desktop GPUs have much more shader cores than laptop GPUs (except maybe M1 Max) so they dont have to clock so high to archive the same goal
11:37
since my gpu is <20% usage its pretty efficient
Avatar
Yeah, GPUs are not at 5 GHz (yet), but CPUs have been going crazy recently just to get 5% faster FPS than the other side
Avatar
me: just make the maps less gpu heavy lol
11:40
justatest
Avatar
just drop old hardware and force vulkan, set a good limit that suits your needs and be happy
Avatar
Avatar
deen
Yeah, GPUs are not at 5 GHz (yet), but CPUs have been going crazy recently just to get 5% faster FPS than the other side
Honestly, I'm happy as long as I get stable framerates around my refresh rate. It just looks good to me, maybe I just don't have good eyes 😄
11:44
One of the reasons I upgrade my system so slowly. Things just don't look that bad to me with almost any stable fps
Avatar
when i read phoronix and see all the progress for new software technology i actually wonder when the old hardware will be dropped, or will they always fall back to software rendering? 😄
11:44
i mean the maintainance cant be worth it for old stuff
Avatar
didn't intel announced something about saving money?
Avatar
Avatar
Jupstar ✪
i mean the maintainance cant be worth it for old stuff
I guess the fact that old hardware just doesn't change makes it better maintenance cost wise
Avatar
i wish i'd have av1 encoding on my GPU :/
Avatar
Now that'd be sth I'd upgrade for
Avatar
next amd will have it, rtx 4090 also has it
Avatar
get an arc gpu and use it just to decode/encode av1
Avatar
xd
Avatar
Actually, I think arc would be a great fit for you @Jupstar ✪
11:51
It's so extremely opinionated that it refuses to work well with old gfx APIs
Avatar
i fear intels drivers
11:51
i am on the dark side then
Avatar
I heard it's quickly getting better after the release
Avatar
tbh, if i have a good vulkan driver, i have all drivers
11:52
dxvk, zink
11:52
i can even run my window manager under zink already
11:52
minecraft worked good enough
11:52
maybe 80% of native GL driver
Avatar
Run the arc on a server to encode av1 solely
Avatar
i need it for streaming my desktop xd
12:04
h264 struggles with high refresh rates
Avatar
You can just have an extra arc for av1
Avatar
or vaapi is it
Avatar
Avatar
Learath2
You can just have an extra arc for av1
yeah ez money boy
12:05
ddnet gives me so much money per month
12:05
i buy rtx 4090 every day
Avatar
What is a little money in pursuit of more fps? Cmon, just don’t eat
Avatar
good idea actually learath
12:05
vulkan has multi gpu support
12:06
imagine u could render demos in the background
12:06
would be cool
Avatar
It’d be nice if I could render headless from the terminal
Avatar
mhhh yeah
12:07
but would still require a vk instance, just without a surface
Avatar
That’s fine I guess
Avatar
guess i should think about it
Avatar
at some point i have to add framebuffer rendering anyway at least for vulkan
12:09
its simply too annoying to have the ddnet window open all the time
Avatar
Can u have a vk instance without a gpu?
Avatar
well cpu rendering
Avatar
To make a server to render demos
12:09
Ok
12:09
Future service
12:10
Now just need top 10 rank demos auto published
Avatar
that would be cool indeed
12:10
if we'd finally have teehistorian to demo
12:10
it would motivate me
12:16
mhh is it safe to call Localize whenever i want to?
12:17
kinda feels weird to call it inside the backend tho
12:17
maybe i should enumerize the errors and give them text only in the higher level components^^
Avatar
Avatar
Jupstar ✪
maybe i should enumerize the errors and give them text only in the higher level components^^
This probably is the correct way to do this
Avatar
yeah just lot of work 😄
12:19
54 different errors in vulkan backend
12:19
<<
Avatar
rust Result
12:36
Imagine not having sum types smh
Avatar
how does that fix my problem
12:47
i am thinking about a Localizable function that is empty and only there so the translation script can find the string of the backend too
Avatar
Avatar
Jupstar ✪
i am thinking about a Localizable function that is empty and only there so the translation script can find the string of the backend too
@deen u ok with this? then we can also remove all the comments like // Locaize("...")
12:56
matches = re.findall(r"Localize\s*\(\s*\"([^\"]+)\"(?:\s*,\s*\"([^\"]+)\")?\s*\)", fileobj.read()) ui, that's what i call a regex (edited)
Avatar
@Jupstar ✪ man
13:34
i change the file with name Teeworlds and
13:35
i start the game and every thing get Change and i change the file name to Teeworlds again and i didnt get my old game
13:35
still everything new
Avatar
Avatar
iISAF7
@Jupstar ✪ man
it now uses DDnet file
13:37
always close client before you do stuff like this
Avatar
Avatar
Jupstar ✪
always close client before you do stuff like this
i did
Avatar
normally it uses teeworlds directory first, then ddnet if u renamed teeworlds to ddnet it used ddnet
13:39
what did u name it?
Avatar
Avatar
Jupstar ✪
@deen u ok with this? then we can also remove all the comments like // Locaize("...")
What is it good for?
Avatar
Avatar
deen
What is it good for?
i can use strings in backend without needing to localize them there
Avatar
that doesn't work for formatted strings, I think
15:40
I don't know if you need those
Avatar
i dont need them
15:42
its just that i dont want to add a // Localize("...") comment to every string
15:43
and handling all errors by enums just to convert them to strings later is lot of coding and also kinda code dublication
15:43
since they arent really error types, but more like error descriptions
Avatar
@deen how often is the sqlite db download updated on ddnet stats page?
15:50
Using the mysql db is not feasible for me
15:51
Takes way too long on my pc with a good cpu, cant image on a vps
15:51
Oh
15:52
Maybe i should use csv
15:52
And polars
15:52
Did you know the rust csv library is one of the best out there
15:52
Surpasing in speed the c++ ones
Avatar
Avatar
Ryozuki
@deen how often is the sqlite db download updated on ddnet stats page?
every night
15:56
@heinrich5991 do u know if its more worth to use csv or sqlite when perfoming read only queries?
15:57
i wonder if polars is faster than sqlite itself making queries
16:03
Probs csv
16:26
As of Rust 1.65, which is set to release on November 3rd, generic associated types (GATs) will be stable — over six and a half years after the original RFC was opened. This is truly a monumental achievement; however, as with a few of the other monumental features of Rust, like async or const generics, there are limitations in the initial stabilization that we plan to remove in the future.
Avatar
Avatar
Mr.Gh0s7
Is this a good place for the tiles?
I moved them here. It seems like they are getting ignored. Any ideas why?
Avatar
why should they magically work
16:32
is the server using the same slots?
Avatar
I made the neccesary changes to the code
Avatar
the client filters invalid tiles
16:33
maplayers.cpp
Avatar
It's a server side issue currently
Avatar
ah no, we moved it to mapimages.cpp
16:34
IsValidGameTile
Avatar
I added this line (Index >= TILE_SPIKE_FIRST && Index <= TILE_SPIKE_LAST) ||
16:34
in mapitems.cpp (edited)
16:35
and these lines on mapitems.h TILE_SPIKE_RED = TILE_SPIKE_FIRST, TILE_SPIKE_ORANGE, TILE_SPIKE_YELLOW, TILE_SPIKE_GREEN, TILE_SPIKE_LBLUE, TILE_SPIKE_BLUE, TILE_SPIKE_PURPLE, TILE_SPIKE_PINK, TILE_SPIKE_WHITE, TILE_SPIKE_BLACK, TILE_SPIKE_LAST = TILE_SPIKE_BLACK,
Avatar
hey guys quick question: how many requests can i make to https://master1.ddnet.org/ddnet/15/servers.json in what amount of time so i don't get ratelimited/blacklisted
Avatar
Check cloudflare limits
16:37
Cuz its behind that
Avatar
Avatar
Mr.Gh0s7
I added this line (Index >= TILE_SPIKE_FIRST && Index <= TILE_SPIKE_LAST) ||
and ur server acts as ddrace server?
Avatar
just look with a debugger why its not inside i guess
Avatar
the previous tile positions worked (the previous shared image from tile 114), so I thought it may be a blacklist tileissue or smt like that? (edited)
Avatar
if(n == MAP_IMAGE_ENTITY_LAYER_TYPE_GAME && !IsValidGameTile((int)TileIndex)) ValidTile = false;
16:40
if it doesnt meet the condition
16:40
it should work
Avatar
Avatar
Ryozuki
Check cloudflare limits
thanks
Avatar
Avatar
Alexander
hey guys quick question: how many requests can i make to https://master1.ddnet.org/ddnet/15/servers.json in what amount of time so i don't get ratelimited/blacklisted
There is no ratelimit, once per second I wouldn't mind, everything more often seems excessive
16:44
We archive it every 2 seconds our selves
Avatar
That is in the client code I am having problem with the server code. The tee doesn't die on the tile/the tile doesn't get printed on HandleTiles on character.cpp under server/entities Maybe it's considered another layer? (edited)
Avatar
so im safe if i do something like 1 refresh per 5 seconds
Avatar
great, thanks
Avatar
what are you doing with it? @Alexander
Avatar
im showing 3 servers on a website and their player count and if they are online
16:46
here is a preview
Avatar
Avatar
Mr.Gh0s7
That is in the client code I am having problem with the server code. The tee doesn't die on the tile/the tile doesn't get printed on HandleTiles on character.cpp under server/entities Maybe it's considered another layer? (edited)
dunno the ddrace code but in vanilla some tiles are simply filtered in collisions.cpp
Avatar
Avatar
Alexander
im showing 3 servers on a website and their player count and if they are online
why not make it client side?
Avatar
currently it doesn't auto refresh but im planning on doing it every 5 seconds if viable
Avatar
https://aliveclan.de/#home here ^ it just downloads the json
16:48
the server json allows cors
Avatar
i don't understand what you mean by client side
Avatar
and an interval with 5 seconds is ez in js
Avatar
it's already client side?
Avatar
ah ok
Avatar
basically a javascript fetch function fetching servers.json and then filtering for specific servers by finding the ip address
Avatar
Avatar
Ryozuki
@heinrich5991 do u know if its more worth to use csv or sqlite when perfoming read only queries?
I don't know. my guess would be sqlite
Avatar
if it doesnt find the ip address then it's offline
Avatar
yeah i see
16:49
but then you shouldnt mind too much
16:49
the fetch only happens if smone visits your site
Avatar
yes, exactly
16:50
but i dont want them or me while developing to be blacklisted by ddnet
Avatar
i guess its mostly cloudflares decision anyway isnt it
16:50
if they consider it ddos they filter the traffic
Avatar
yeah but you could set your own parameters for ratelimiting in cloudflare so that's why i asked if you guys set any
Avatar
just try it out, jkjk
troll 1
Avatar
there's not much point for us to set rate limits
17:02
cloudflare handles the requests
17:02
we don't get hit by your 10,000 requests per second
Avatar
Avatar
heinrich5991
there's not much point for us to set rate limits
justatest
17:06
conditionally
Avatar
@Alexander 1 req per second is fine
17:09
Probs 10 too
17:09
But no need
Avatar
please no
17:10
1 per 5 seconds is plenty
Avatar
Cloudflare caches it
Avatar
i'd rather do 5 because the client needs time to download the json file and if i overdo it then it would probably break
Avatar
yeah its also not really useful to generate more traffic than needed really
Avatar
even 5 is too much
Avatar
Im just saying that cloudflare wont ban u for 1, 10 or 30 req per second, not that u should
Avatar
ah okay okay
17:11
yeah cloudflare is pretty stronk
Avatar
Avatar
Ryozuki
Im just saying that cloudflare wont ban u for 1, 10 or 30 req per second, not that u should
have you tried?
17:14
preferably not against ddnet.org
Avatar
@heinrich5991 not rly,but i often see ratelimits on most apis at 30 reqs per second
17:18
To identify a general threshold for Cloudflare Rate Limiting, divide 24 hours of uncached website requests by the unique visitors for the same 24 hours. Then, divide by the estimated average minutes of a visit. Finally, multiply by 4 (or larger) to establish an estimated threshold per minute for your website. A value higher than 4 is fine since most attacks are an order of magnitude above typical traffic rates. To identify URL rate limits for specific URLs, use 24 hours of uncached requests and unique visitors for the specific URL. Adjust thresholds based on user reports and your own monitoring.
17:18
Idk xd
17:19
Configure Cloudflare Rate Limiting to protect your website application against denial-of-service attacks, brute-force login attempts, and other abusive behaviors. Overview Analytics Rate Limiting ...
Avatar
but since we all good programmers we dont do it
17:22
now back to normal business any new rust libs @Ryozuki ?
Avatar
Yes, rustyman
17:25
I wonder who made it
Avatar
Avatar
Jupstar ✪
dunno the ddrace code but in vanilla some tiles are simply filtered in collisions.cpp
Thanks that was it. It was in TileExists().
Avatar
when do i get virtual functions to override (edited)
17:27
Use traits
Avatar
but a dyn trait is basically that?
17:29
on asm level
Avatar
@Jupstar ✪ well dyn trait is used for dynamic dispatch
17:50
We use dyn Trait over (data, vtable) for the same reason we use, references over pointers, Rc over (pointer_data, pointer_counter), Box over malloc/free. It's a safe abstraction which can be proven to not cause errors.
17:50
Hello! New to rust, and I've been confused on the following: What are the advantages of manually constructing a (data, vtable)-like structure, rather than using a dyn trait, which itself should be a (data, vtable) representation? I've seen this pattern in: std::task::RawWaker tokio's RawTask Neither of these examples have documented the r...
Avatar
Avatar
Ryozuki
@Jupstar ✪ well dyn trait is used for dynamic dispatch
yeah i am fine with that
17:53
i just need the functionality
Avatar
its just that rust doesnt have OOP as in inheritance
17:53
it favors composition
17:54
with the trait model
17:54
and its something generally good
Avatar
i just hope it doesnt create too much more code
Avatar
the cat and dog classes that plague java
17:54
thats too much code xd
17:54
i dont feel im overly verbose in rust
17:55
@Jupstar ✪ if u code in a "rusty" way it lends itself i would say
17:55
u shouldnt force a java oop style on rust
17:55
u will end up with unidiomatic code
17:55
did u read the rust book yet?
17:55
u rly should
17:56
the rust book is a web btw
17:56
this
Avatar
i dont feel like i want or need this
17:56
i just need a project and then start
Avatar
thats sad
17:56
u rly need this
17:56
i would say
17:56
also its pretty interesting
Avatar
yeah dunno xD
17:57
i hate reading books
Avatar
i also hate reading books
17:57
though this to mee didnt feel like a book
17:57
more like a introduction to the language
17:57
its not a 200 page c++ book
Avatar
anyway, i dont think its worth it, u usually dont get a feeling for the abstractions if u just read
Avatar
i think u do in this case
17:58
but its not just abstractions
17:58
rust introduces new things u are not used to
17:58
lifetimes
17:58
borrowing
Avatar
also sometimes i look how u'd do stuff in rust, when i feel like that could be hard without unsafe rust
Avatar
like what?
Avatar
well we discussed this before, especially thread related stuff
Avatar
not rly
17:59
the thing i like the mosti s rust thread safety
18:00
but i remember u said some weird obscure edge case
18:00
i dont remember much tho xd
Avatar
yeah but every abstraction comes with a restriction
Avatar
yeah these restrictions rule out all unsafe abstractions and probably some valid use cases
18:00
but more and more less valid use cases are ruled out
18:01
as rust improves
Avatar
i can also write a game in javascript
18:01
its not like i cannot imagine it
Avatar
Avatar
Ryozuki
its not a 200 page c++ book
u right, its a 200 page rust book
Avatar
and rust is nice bcs it has a better idea than all the trash langauges like java
18:01
for me its not so much about if its possible or not. More about if its actually more elegant of solution
Avatar
i find rust way more elegant than c++ way often
18:02
this is due to algebraic data types
18:02
rust enums are just godly
18:03
and try to find something as good as serde
18:03
the serde author truly is a genius
Avatar
the thing that scares me about rust is how you need to do like 9000 things just to get something down
Avatar
Where many other languages rely on runtime reflection for serializing data, Serde is instead built on Rust's powerful trait system. A data structure that knows how to serialize and deserialize itself is one that implements Serde's Serialize and Deserialize traits (or uses Serde's derive attribute to automatically generate implementations at compile time). This avoids any overhead of reflection or runtime type information. In fact in many situations the interaction between data structure and data format can be completely optimized away by the Rust compiler, leaving Serde serialization to perform the same speed as a handwritten serializer for the specific selection of data structure and data format.
Avatar
also like, you want to edit someones project? you need to find like 3 dlls and put them in a folder.
Avatar
@Jupstar ✪ there are many cases where serde json serializer is faster than a hand written one xd
Avatar
yes it sounds really great if you want an ez powerful solution
Avatar
its ez and really configurable, and not limited to e.g 1 json serializer implementation
18:06
in fact there are multiple,
18:06
serde_json simd_json
18:06
all serde compatible
Avatar
in this case i'd for example ask what if i want to do this: load only have data, and start processing these data in another thread then continue loading rest
18:06
i had use cases for such situations so i end up in an own impl 😄
18:07
not for json tho
Avatar
i mean u can do that yeah
Avatar
anyway generally making it ez is better anyway
Avatar
serde doesnt handle how u load the data in any way
18:07
i think u rly dont know how serde works xd
Avatar
if smth is perf hit u can still optimize it later
18:07
if ur solution is stable
Avatar
also it allows parsing in a streaming way by passing a reader
Avatar
Avatar
Ryozuki
serde doesnt handle how u load the data in any way
sounds to me like it handles datatype loading itself
18:08
it just handles parsing
18:08
u pass it the data
18:09
use serde::{Deserialize, Serialize}; use serde_json::Result; #[derive(Serialize, Deserialize)] struct Person { name: String, age: u8, phones: Vec<String>, } fn typed_example() -> Result<()> { // Some JSON input data as a &str. Maybe this comes from the user. let data = r#" { "name": "John Doe", "age": 43, "phones": [ "+44 1234567", "+44 2345678" ] }"#; // Parse the string of data into a Person object. This is exactly the // same function as the one that produced serde_json::Value above, but // now we are asking it for a Person as output. let p: Person = serde_json::from_str(data)?; // Do things just like with any other Rust data structure. println!("Please call {} at the number {}", p.name, p.phones[0]); Ok(()) }
Avatar
and whats so genius about it then?
Avatar
that it parses this without any runtime reflection
18:09
and its rly ergonomic
Avatar
mh
18:10
but then its just constexpr
18:10
i meant a different scenario
Avatar
it handles dynamic not known data too
18:11
in serde_json it would be a Value
Avatar
but if u load it from disk?
Avatar
yeah same
18:12
the program works if u load the data from disk
Avatar
so it has some overhead in memory consumption?
18:12
or does it save it as binary?
Avatar
use serde::Deserialize; use std::error::Error; use std::fs::File; use std::io::BufReader; use std::path::Path; #[derive(Deserialize, Debug)] struct User { fingerprint: String, location: String, } fn read_user_from_file<P: AsRef<Path>>(path: P) -> Result<User, Box<dyn Error>> { // Open the file in read-only mode with buffer. let file = File::open(path)?; let reader = BufReader::new(file); // Read the JSON contents of the file as an instance of `User`. let u = serde_json::from_reader(reader)?; // Return the `User`. Ok(u) } fn main() { let u = read_user_from_file("test.json").unwrap(); println!("{:#?}", u); }
18:12
it can do 0 copy parsing
18:13
idk what u on about abotu saving
18:13
i think we are not understanding each other xd
Avatar
yes u say it has zero cost basically?
Avatar
well u can make it this way
18:13
in the case shown its not cuz its using owned strings
18:14
Avatar
9b8ba10 Frontpage video - def- 06ba02c Add NLD (used to be GER1, still sponsored by labixe) - def-
Avatar
well brb eating
Avatar
Avatar
Voxel
also like, you want to edit someones project? you need to find like 3 dlls and put them in a folder.
on what rust project did that happen? hasn't been my experience so far
18:46
I only had that experience with non-rust projects, actually
Avatar
cipy sent me something and when i tried to run it it was like, yelling at me for missing files or smth
18:47
so i had to like, go get the files and place them in some rust folder in my pc
Avatar
weird
Avatar
weird indeed
18:48
i nevern eeded any file
Avatar
probs some c bindings
18:50
but yeah rust compiles staticly which i really like ^^
Avatar
statically by default *
Avatar
i have 100 fps after i do alt tab
21:15
usually i have 5000
Avatar
Avatar
Smetanolub
i have 100 fps after i do alt tab
press "restart" in windows
Avatar
it helps
21:28
but i need to altab and i cant play after it
Avatar
Avatar
Smetanolub
but i need to altab and i cant play after it
no i mean press restart
21:29
in windows
21:29
not restart the client
21:30
Avatar
I UNDERSTAND
21:30
i said yes it helps
21:30
but i cant restart 9999999 times
Avatar
install latest GPU drivers
21:31
and restart
21:31
^^
21:31
do you use vulkan or opengl ? settings -> graphics -> renderer in client
Avatar
yes i do
Avatar
Avatar
Smetanolub
but i cant restart 9999999 times
^ try what you dont use
Avatar
Avatar
Smetanolub
yes i do
its not a boolean question
21:31
which one do you use
Avatar
1.0.0
Avatar
try opengl then
21:32
3.3
Avatar
less fps
Avatar
can't have it all
Avatar
Avatar
Smetanolub
less fps
then install latest drivers
21:33
whats ur GPU, what is your driver?
Avatar
3080ti
Avatar
latest driver from nvidia.com?
Avatar
drivers from 07 2022
Avatar
try the current one
Avatar
How do I change renderer btw
21:35
like not in game
21:35
from game files
Avatar
gfx_backend
21:37
OpenGL Vulkan
Avatar
Thanks
Avatar
on linux GLES
Avatar
is there vulkan 2.0.0?
Avatar
no
Avatar
opengl 3.3.0 doesnt work for me
Avatar
there is vulkan 1.3
Avatar
Avatar
Alexander
opengl 3.3.0 doesnt work for me
probs amd gpu
Avatar
how do i use it ingame
Avatar
yeye
Avatar
the beta drivers are buggy
Avatar
i dont think im using beta
Avatar
Avatar
Smetanolub
how do i use it ingame
there is no vulkan 1.3 implementation
Avatar
but latest
Avatar
but vulkan 1.3 is downward compatible
Avatar
so u basically using vulkan 1.3
Avatar
Avatar
Alexander
but latest
amd calls them optional, but they also call them beta and for some reason they promote them more than their stable drivers on their website xD
21:44
dunno what their reasoning is
Avatar
ah so amd = nouis
Avatar
yes
Avatar
and i download them cause i think that they are better to have
Avatar
yeah its not your fault, i'd do that too 😄
Avatar
when in reality it means more unstable driver
Avatar
and if i wouldnt know its buggy for ddnet, i'd also recommend it
Avatar
there is also another thing that is happening to me that didn't happen before (before i reinstalled windows)
21:46
21:46
there is a gap when showing and hiding the taskbar (edited)
21:47
and I can't find anyone else talking about it on the internet
Avatar
Avatar
Jupstar ✪
amd calls them optional, but they also call them beta and for some reason they promote them more than their stable drivers on their website xD
here nvidia for example doesnt even show it, except you explicity search for beta drivers 😄
Avatar
Avatar
Alexander
Click to see attachment 🖼️
is that also if u dont have a dynamic taskbar?
Avatar
dynamic taskbar?
Avatar
it always goes away
Avatar
it doesn't happen since there is no animation then
21:49
but i don't like seeing the taskbar always
Avatar
weird stuff
Avatar
i know its the drivers since its not happening when im updating it (it disables it for a moment)
Avatar
its just weird that this is caused by the GPU driver, but maybe its some weird interpolation inaccuracy in the rendering
Avatar
It's weird to me that it didn't happen before i reinstalled windows
21:52
But I probably had an older version of the driver (edited)
Avatar
i mean u can simply downgrade 😄
Avatar
I think I would if it was that easy
21:52
I'd have to try a lot of driver versions before I find the one that works
21:53
And the process of installing is long
Avatar
i see
21:53
replace directx.dll with directx.dll from dxvk
21:53
ez
Avatar
Can you explain what would that do
21:54
I feel like you are joking
Avatar
i have no idea if that works with windows but in theory windows probs uses directx to render their window manager dxvk is basically, directx on vulkan
21:54
so all dx calls are translated to vk
21:54
if u have some old game and want more FPS, u can try it out
21:54
they usually easily beat dx9 drivers
Avatar
Okay but would it work for windows
Avatar
i dunno i never tested it
21:55
but in theory nothing speaks against it probs
Avatar
I trust you so im gonna try it xd
Avatar
but i cannot say what exactly needs to be replaced windows uses dxgi for all rendering, quite possible that they hacked in some microsoft exclusive stuff 😄
Avatar
Avatar
Alexander
I trust you so im gonna try it xd
better google first xD
Avatar
I am xd
Avatar
Desktop Window Manager (DWM, previously Desktop Compositing Engine or DCE) is the compositing window manager in Microsoft Windows since Windows Vista that enables the use of hardware acceleration to render the graphical user interface of Windows. It was originally created to enable portions of the new "Windows Aero" user experience, which allowe...
21:57
"DWM uses DirectX to perform the function of compositing and rendering in the GPU, freeing the CPU of the task of managing the rendering from the off-screen buffers to the display. "
21:57
so maybe its actually possible
21:58
but i cannot find any post about someone trying it 😄
Avatar
lets see if i can find the right file
Avatar
i already see your windows not working anymore xD
Avatar
I'M TRUSTING YOU
Avatar
someone has to be the first to test
Avatar
maybe i should do it on a virtual machine though
Avatar
that wont work
22:00
i dont know of any VM that supports vulkan
22:01
maximum as software renderer
Avatar
so just do what im trying to do in vm files
22:01
wait would a virtual machine software do directx
Avatar
u can also try to replace all windows files with wine files xDDDDDDDDDD
22:02
if your windows then still works gg
Avatar
i found directml.dll
22:02
i guess thats not it
Avatar
well you can only replace these
22:02
they should be in windows system32
Avatar
yep found them
Avatar
i hope u have a backkend if u actually doing it
22:03
backup
22:03
*
Avatar
nah im not gonna try it
Avatar
xD
22:03
i could do it since i have dual boot
Avatar
if you said that it's safe then i'd do it no joke
22:04
but since you arent sure
Avatar
i can recover from it:D
Avatar
but is it a guarantee that if it works for you that it would work for me
Avatar
maybe i try at some point just for fun^^
Avatar
do tell how it goes =]
Avatar
ok
Avatar
inb4 it actually makes windows run 50% faster
Avatar
49eefe6 maps2.ddnet.org -> maps.ddnet.org - def-
Exported 663 message(s)