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-07-06 00:00:00Z and 2022-07-07 00:00:00Z
Avatar
[quakenet] PickleRick BOT 2022-07-06 00:05:35Z
where can i find tutorials for brutal servers
Avatar
what kind of tutorials are you looking for?
00:16
play-throughs are on youtube, many mechanics are explained on the wiki :)
Avatar
Sorah on Discord: could we have some filter system for maps in the editor ? like date or filesize ( and display that stuff ) I remember some admin saying he already made it but never added it =P
Avatar
for Pi-Apps, we use the ddnet info page https://info2.ddnet.tw/info to obtain the current release of ddnet for our updater. it is expected that the version on the info page corresponds to a github tag (as instructed by one of the contributors). However, there is not 16.2 tag on the github. Please correctly mark this tag on github so that users can build this.
Avatar

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--u...
Avatar
Updated new translations + changed ones to sound/look better.

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's me...
Avatar
Basically title. For instance, on Tutorial you start with only your main jump but as soon as you're falling, you loose it without understanding why (for newcomers at least). So i guess we can have a different color for it or a different visual?
Avatar
1e3058c Update brazilian_portuguese.txt - rffontenelle f7e4bcc Update spanish.txt - n0Ketchp b93b96d Merge #5566 #5567 - bors[bot]
Avatar
CC https://github.com/ddnet/ddnet/pull/5545#discussion_r913644432. SCREAMING_SNAKE_CASE mirrors preprocessor constants (making them easier to upgrade?), gs_CamelCaseWithPrefix makes it easier to distinguish from preprocessor macros (but makes it unclear that we're talking about constants).
Avatar
The default asset for the entity overlay shows the guns, the comfort counterpart does not. The guns are from the 'front' layer, walls from the 'game' layer. I didn't know the weapons were there until I saw other people picking up weapons there. !image
09:46
that looks completely unrelated to my pr, but looks frightening
10:09
OpenSSL Security Advisory [5 July 2022] =======================================
>
Heap memory corruption with RSA private key operation (CVE-2022-2274) =====================================================================
>
Severity: High
>
The OpenSSL 3.0.4 release introduced a serious bug in the RSA implementation for X86_64 CPUs supporting the AVX512IFMA instructions. This issue makes the RSA implementation with 2048 bit private keys incorrect on such machines and memory corruption will happen during the computation. As a consequence of the memory corruption an attacker may be able to trigger a remote code execution on the machine performing the computation.
10:09
monkalaugh
Avatar
Hm heap memory corruption
10:40
And it's in the optimized codepath. I wonder if rust could have stopped this one
Avatar
looks more like they misused (or compiler did) some assembly instruction
Avatar
sounded like handrolled assembly, haven't investigated
10:47
if that were the case, rust would not have helped
Avatar
Handrolled assembly generated by perl
11:07
Work of art
Avatar
``` ================================================================= ==6847==ERROR: AddressSanitizer: heap-use-after-free on address 0x61c000075f34 at pc 0x000000878477 bp 0x7fffde9cb950 sp 0x7fffde9cb118 READ of size 20 at 0x61c000075f34 thread T0 #0 0x878476 in __asan_memcpy (/home/runner/work/ddnet/ddnet/san/DDNet+0x878476) #1 0x1464875 in CItems::OnRender() /home/runner/work/ddnet/ddnet/src/game/client/components/items.cpp:430:26 #2 0x1abc936 in CGameClient::OnRender() ...
Avatar
nice rant, but does he have any valid argument against c++?
Avatar
Recreates SnapEntities internally

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/d...
Avatar
Avatar
c0d3d3v
I will try to bisect it tomorrow, if no one else found the problem
Turns out, it's always been that way O.o 😦
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
obv scratch > c++
Avatar
@ReiTW how is rust going
Avatar
Avatar
Ryozuki
@ReiTW how is rust going
fine, still have hard time to work with it, but just need more practice, ig i'll go on codingames to practice more
14:36
the syntax sometimes can be very difficult to read when you're beginning
14:39
recently did a bencode parser in nom
14:39
PepeA
14:40
bencode is the stuff .torrent files are encoded as
Avatar
Still have hard time understanding the usage of lifetimes
Avatar
what part of lifetimes do you struggle with?
14:50
when taking reference parameters? when passing them?
Avatar
well lifetimes are hard to understand itself
14:51
like when learning pointers
14:51
the best way is to practice
14:51
atleast for me
14:52
i still struggle to wrap my head around https://doc.rust-lang.org/nomicon/hrtb.html sometimes
The Dark Arts of Advanced and Unsafe Rust Programming
Avatar
Weirdest part about lifetimes for me was probably 'static meaning two different things in two contexts
14:57
As a trait bound it implies that the type does not contain any non static references, but as a reference lifetime it implies a reference lives for the entire duration of the program
14:57
Subtle but annoying difference 😛
14:58
I guess coercion and elision aren't exactly trivial either
Avatar
oh yeah
14:59
where was the doc i had
14:59
it mentioned that
14:59
here
14:59
rly good document
Avatar
my_bool defined in src/engine/server/databases/mysql.cpp conflicts with typedef from mysql. mysql is 5.7. ``` /usr/local/libexec/ccache/c++ -DCONF_INFORM_UPDATE -DCONF_MYSQL -DCONF_OPENSSL -DCONF_UPNP -DCONF_VIDEORECORDER -DGAME_RELEASE_VERSION="16.2" -DGLEW_STATIC -D_FORTIFY_SOURCE=2 -I/work/usr/ports/games/DDNet/work/.build/src -I/work/usr/ports/games/DDNet/work/DDNet-16.2/src -isystem /usr/local/include -isystem /usr/local/include/miniupnpc -isystem /usr/local/include/mysql -O2 -pi...
Avatar
another interesting thing is phantom
15:03
Zero-sized type used to mark things that “act like” they own a T.
15:03
Avatar

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--u...
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
"c++ sux because bad programmers use it" "lego sux because ameture builders use it"
Avatar
Command 'sv_show_others' cannot be executed from a map.

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memche...
Avatar
Avatar
Voxel
"c++ sux because bad programmers use it" "lego sux because ameture builders use it"
It is a valid argument imo, I see poor c++ libs every other day with many bugs, mem leaks, etc. rust on the other hand attracts a lot of talented programmers because it is a bit niche and sexy, and has a high barrier to entry compared to c++ and it makes it harder to write bad code, and I tend to trust more an unknown lib because of that
Avatar
and yet you use javascript everywhere xd, with infinite bugs and infinite memory usage
Avatar
but that's no question of choice XD
Avatar
from my personal experience the best u can do is keep your code modular and easy logic errors will always haunt you and they often cost lot of time to find
Avatar
Avatar
k2d222
It is a valid argument imo, I see poor c++ libs every other day with many bugs, mem leaks, etc. rust on the other hand attracts a lot of talented programmers because it is a bit niche and sexy, and has a high barrier to entry compared to c++ and it makes it harder to write bad code, and I tend to trust more an unknown lib because of that
you lost me at rust LOL
Avatar
rust does prevent certain stuff, but also adds complexity, since you are in a forced system. You could say every memory bug in c++ is just a logic bug in the end. So a language that prevents logic errors would be OP
15:47
also rusts goal is to be secure, a bug there simply results in a panic
15:47
that doesnt mean your plain will continue flying if the pilot crashes
Avatar
Not rly rust enforces you to handle results (provided u dont use unwrap) this handling the path of an error
15:51
Thus*
Avatar
Avatar
k2d222
It is a valid argument imo, I see poor c++ libs every other day with many bugs, mem leaks, etc. rust on the other hand attracts a lot of talented programmers because it is a bit niche and sexy, and has a high barrier to entry compared to c++ and it makes it harder to write bad code, and I tend to trust more an unknown lib because of that
High barrier of entry compared to C++?? C/C++ are walking pitfalls with shitty stdlibs that don't compare to rusts. The high barrier of entry is just an illusion for us that knew programming before rust existed
Avatar
Avatar
Jupstar ✪
rust does prevent certain stuff, but also adds complexity, since you are in a forced system. You could say every memory bug in c++ is just a logic bug in the end. So a language that prevents logic errors would be OP
*adds a complexity you would otherwise offload to later, when you get a bug prevented by that added complexity
Avatar
Avatar
Learath2
High barrier of entry compared to C++?? C/C++ are walking pitfalls with shitty stdlibs that don't compare to rusts. The high barrier of entry is just an illusion for us that knew programming before rust existed
ye. barrier to entry to "get started with coding", not be efficient at. that's the point
Avatar
Maybe you can get to code toys in C++ quicker. But try linking with a library :P The lack of a package manager makes it hell for newbies
Avatar
Maybe you can get to code toys in C++ quicker.
15:57
i think this is what he means
15:57
rust essentially prevents that
Avatar
Avatar
Learath2
Maybe you can get to code toys in C++ quicker. But try linking with a library :P The lack of a package manager makes it hell for newbies
good point lol
Avatar
Don't get me wrong. I love my C but I also know it's very painful to make substantial programs in it
Avatar
well i mean within the scope of c++ not about the tooling
15:58
prototypes in rust will always be safer than those in c++
Avatar
Avatar
Jupstar ✪
that doesnt mean your plain will continue flying if the pilot crashes
in rust, most c++ memory errors will simply not compile. those are not runtime errors, so our pilot will never face that issue
Avatar
@Learath2 rust high barrier of entry is that of "it wont even let you compile your program"
Avatar
I guess that's fair. C++ will happily let you leak all over the place and use UB
Avatar
>[2022-07-06 17:49:00][whisper]: ← ad: bug from new command [2022-07-06 17:49:05][whisper]: ← ad: idk how new it is tho [2022-07-06 17:49:09][chat]: 俗投: happy birthday [2022-07-06 17:49:19][chat]: murpo: the checkpoints command? [2022-07-06 17:49:22][chat]: ad: yeah [2022-07-06 17:49:26][chat]: Happy DDNet birthday to ad for finishing their first map 7 years ago! [2022-07-06 17:49:27][chat]: murpo: whats wrong with it [2022-07-06 17:49:31][chat]: Happy DDNet birthday to ad for ...
Avatar
??????
Avatar
Avatar
Patiga
in rust, most c++ memory errors will simply not compile. those are not runtime errors, so our pilot will never face that issue
thats not my point, you have to redesign your app to archive this
Avatar
what does redesign mean
Avatar
Hm, wym redesign? Apart from having to handle all errors you'll code pretty much the same way
Avatar
you may even find branches u havent handled
16:04
rust enums are pretty dope
Avatar
A C++ program doesn't look fundamentally different from a Rust program, atleast in the program structure department
16:05
One thing that might lead to cancer is async callbacks, now that might force you to redesign a bit :P
16:06
I found them much easier to work with in C/C++ where I don't have to spend an hour trying to convince the compiler it's safe
Avatar
i never seen c++ async code yet
16:06
@Learath2 you know there is a cult that goes around saying async itself is the devil
16:06
in all languages
16:06
i seen that a lot in hackernews
16:06
xD
Avatar
Even without async, just using threads the callbacks are still annoying to get right
Avatar
what u talking about xD c++ can look the same yes
16:07
now open ddnet source code
Avatar
Avatar
Ryozuki
@Learath2 you know there is a cult that goes around saying async itself is the devil
I've actually had a hunch this might be the case. How is a fair threadpool supposed to know how to thread my program better than me?
Avatar
Avatar
Learath2
I found them much easier to work with in C/C++ where I don't have to spend an hour trying to convince the compiler it's safe
u should get to the point whee you write the code already in a way the compiler things its safe
Avatar
Avatar
Jupstar ✪
now open ddnet source code
? ddnet code rewritten in rust you wouldn't really need to redesign it to get it to work, you just need to clarify some ownership semantics and handle errors we let slip
16:10
Albeit a redesign wouldn't be too bad if we are doing that already, it is still a bit of a mess ngl :D
Avatar
a multithreaded ECS world
Avatar
0bfb854 Rename TILE_CHECKPOINT_XXX to TILE_TIME_CHECKPOINT_XXX - C0D3D3V 6869530 Rename IsTCheckpoint to IsTeleCheckpoint and IsXCheckpoint to IsFTimeCheckpoint. And reduce code duplication - C0D3D3V a961151 Show also +0.00 split, and checkpoints close to start (<1sec) - C0D3D3V 498c2db Renamed some time checkpoint related variables. - C0D3D3V ae80287 Update checkpoint diff display to use time format with hours:minutes:centisecs - C0D3D3V e6f1ef9 send correct time diff on finish - C0D3D3V a591fea Merge #5550 - bors[bot]
Avatar
mhh i'd say u make it easier than it's actually is, but i'd love to see a rewrite (edited)
Avatar
rewrites require lot of effort
16:12
and in ddnet u would need to reproduce the bugs safely
Avatar
Ew forgot we aren't allowed to change anything anyway
Avatar
if we were to rewrite the entirety of ddnet would it be possible to actually make some ground changes that wouldnt be possible in the current state of ddnet?
16:15
specially if we can ignore the tw protocol
Avatar
Since we add to every map time checkpoints, and sometimes change little things or add chill areas, it would be nice that players could still use there old ghosts. Requested by teini94 on Discord
Avatar
and build a new one
16:15
im sure we can do better than 2007
16:15
or 2012
16:16
first priority = moddable friendly
16:16
and thinking with forward compatiblity
16:16
thats what i would prioritize
Avatar
Avatar
Voxel
if we were to rewrite the entirety of ddnet would it be possible to actually make some ground changes that wouldnt be possible in the current state of ddnet?
Mh, everything is pretty much already possible without a rewrite, just need to drop vanilla compatibility
Avatar
Avatar
Learath2
Mh, everything is pretty much already possible without a rewrite, just need to drop vanilla compatibility
we are also bound by our own back com
16:16
comp
16:16
e.g we cant make a new map format
Avatar
A rewrite would just make it more pleasent to work with
Avatar
*without monkey patching code
Avatar
Avatar
Ryozuki
e.g we cant make a new map format
Sure we can. We can send new map to new clients and old map to old clients
16:17
thats the stuff i dislike
16:17
and all code is cluttered with
Avatar
i talked about this but itd be nice in the rewrite for entity arrangements to look different
Avatar
u mean the pngs?
Avatar
a good idea would be to use json files
Avatar
time cps take up too much space
Avatar
describing the tiles in pngs
16:18
so we can rearrange
16:18
any time
16:18
mc does this kinda
Avatar
Avatar
Ryozuki
describing the tiles in pngs
Mmh, this is a recipe for json files mismatching pngs
Avatar
but gives more flexibility
Avatar
``` there is no seriouz way to add ghosts, I use some clever exploit to create more ghosts. u could enable keep the best"like 0-100-endless ghosts per map"(I think there is only like 23? currently) (may also allow to add some (which u can mark to not delete with (ESC - Ghosts)"super ghosts" which are maybe not top20 but did super crazy stuff) and more important keep the Last Ghost (if u did something epic or interesting to compare) ( u could let ghost be stopped , and repeated like demos ...
Avatar
If I were to do something like that I'd probably have my own format that pairs a png with a json file just to make sure they never get split up
16:19
Like a zip with a special header probably
Avatar
Requested by teini94 on Discord so its harder to fake , epic server laggs or world records or something
16:22
Requested by teini94 on discord
  • Add a size option for the font (so that you can read player position ... better)
  • Add position option for that display (left bottom, middle, right)
I see a problem for the second request, because we do not have free space left, only a little in the middle bottom, but also not at the top.
16:23
Requested by cheeser0613 on discord (and a lot of other also did smaller requests)
Avatar
46e6397 Remove sv_show_others from Tutorial map - def- 9fd7562 Merge #5575 - bors[bot]
16:32
Requested by Brokecdx- on discord Example: https://cdn.discordapp.com/attachments/991211122634014750/993645215682408459/jukkibad.demo_1.mp4 I already know this display from a client of one of the devs (the person addressed can link to the reference implementation). I do not know if there was already a discussion about such a display. Maybe we can start one again, to see if we think this is useful. But I see already one problem. Team can have up to 64 members... how would you display al...
Avatar
Avatar
GitHub
Click to see attachment 🖼️
I was coding this and 3 people here called it useless and told me that I was wasting my time so I stopped working on it
Avatar
is it possible to interpolate inputs between ticks
17:43
so inputs arent bound to 50hz
Avatar
not really
17:49
like theoretically
Avatar
Avatar
louis
like theoretically
if u dont care about physics change yes
Avatar
i mean ye it will break things like dj in freeze and a lot more
Avatar
it breaks the whole physics
17:57
real life physics does not rely on ticks
17:57
but on time
Avatar
Interpolate in how many steps. This is just a computer
Avatar
@c0d3d3v if you want me to submit my implementation of the freeze hud as a PR I can but I held off because kog servers don't send freezetick so it just uses ninja skin to determine if someone is frozen. But I guess it could just use freezetick on ddnet servers
Avatar
thats not what i meant
17:58
i mean like
17:58
idk if interpolate is correct word
17:59
u dont increase ticks, just get inputs on a higher frequency (for example 500hz)
17:59
if a jump is done halfway between ticks, it will calculate the next position as so
17:59
instead of having it start on the next tick
Avatar
physics are at 50hz but client smoothes it out iirc
17:59
intra tick stuff
Avatar
mh its not that ez, how do you apply half gravity etc
18:00
it simply doesnt work on how the physics was build
Avatar
gravity /= 2 troll
Avatar
yeah but there is friction which is a multiplier
18:00
so at that point it would break the physics completly
Avatar
Theoretically I guess you could send the server how many ms before the next tick you made the input and the server could do some magic, but it'd definitely break a lot of things 😄
Avatar
Avatar
Tater
@c0d3d3v if you want me to submit my implementation of the freeze hud as a PR I can but I held off because kog servers don't send freezetick so it just uses ninja skin to determine if someone is frozen. But I guess it could just use freezetick on ddnet servers
I first of all wanted to open an issue so we can have a little discussion if it is useful. xD that KoG does not send freeze information, but only ninja weapon is also a problem that should be mentioned.
Avatar
Yeah ninja weapon is an issue but its very rare on gores maps
18:11
Also I realize my implementation has like 6 configs because I was not concerned about minimizing them so that would need to be simplified (edited)
18:15
Sry i would comment on the github post but I'm not at pc (edited)
Avatar
i give you an example: u need to understand this: first velocity is calculated, then the position is changed lets start with vel 0 in both cases v = (0 + gravity) * friction p = p + v now lets form it to half of it v = (0 + gravity / 2) * friction p = p + v if you want a similar result generally in a multiplication you need to take the x-root of friction in this case the second root, bcs you apply it twice (sqrt(friction) * sqrt(friction)) = friction However, as much as you can make it "better" u added the velocity to the position and would need to take the position into account to actually fix it for a const like gravity what happens in real world(simplified) is: v(t) = gravity * t + v0, where v0 is the start velocity or depending on the old velocity v(t) = v(last_t) + gravity * (t - last_t) so basically the ellapsed time and on position side you do basically the same pos(t) = gravity / 2 * t^2 + v0 * t + pos0 or pos(t) = pos(last_t) + vel(t) * (t - last_t) Something like that might work for more ticks. Only did that in my head so might not be accurate. Just to make clear that teeworlds physics wasn't build with these timing factors in mind
Avatar
gravity is not even constant around earth
18:25
:p
18:25
the constant is another thing
18:25
i forgot the name
Avatar
gravitational constant G
Avatar
The gravitational constant (also known as the universal gravitational constant, the Newtonian constant of gravitation, or the Cavendish gravitational constant), denoted by the capital letter G, is an empirical physical constant involved in the calculation of gravitational effects in Sir Isaac Newton's law of universal gravitation and in Albert E...
Avatar
Avatar
Jupstar ✪
i give you an example: u need to understand this: first velocity is calculated, then the position is changed lets start with vel 0 in both cases v = (0 + gravity) * friction p = p + v now lets form it to half of it v = (0 + gravity / 2) * friction p = p + v if you want a similar result generally in a multiplication you need to take the x-root of friction in this case the second root, bcs you apply it twice (sqrt(friction) * sqrt(friction)) = friction However, as much as you can make it "better" u added the velocity to the position and would need to take the position into account to actually fix it for a const like gravity what happens in real world(simplified) is: v(t) = gravity * t + v0, where v0 is the start velocity or depending on the old velocity v(t) = v(last_t) + gravity * (t - last_t) so basically the ellapsed time and on position side you do basically the same pos(t) = gravity / 2 * t^2 + v0 * t + pos0 or pos(t) = pos(last_t) + vel(t) * (t - last_t) Something like that might work for more ticks. Only did that in my head so might not be accurate. Just to make clear that teeworlds physics wasn't build with these timing factors in mind
yeah changing tw physics in any way will break one thing or the other unfortunately
18:27
but maybe u could hard code a lot of edge cases or smth, but doubt it would ever work
Avatar
gravity is a lie anyway
18:27
we just constantly bend space time
18:27
ez
Avatar
Avatar
c0d3d3v
tangles between 0 and 1
Just to correct myself. The tangling of the velocity is only server side. @Learath2 But the Character is very second tick updated. xD I was lost, that is not because of the velocity. It is m_Tick that is updated every tick. I did a little debug code to figure that out, if someone wants to test it https://github.com/C0D3D3V/ddnet/tree/what_changes_in_netobj_character Looks like this: [2022-07-06 20:57:51][client]: CNetObj_Character changed [2022-07-06 20:57:51][client]: 0 35500 35502 [2022-07-06 20:57:51][client]: CNetObj_Character changed [2022-07-06 20:57:51][client]: 0 35502 35504 [2022-07-06 20:57:51][client]: CNetObj_Character changed [2022-07-06 20:57:51][client]: 0 35504 35506 [2022-07-06 20:57:52][client]: CNetObj_Character changed [2022-07-06 20:57:52][client]: 0 35506 35508 [2022-07-06 20:57:52][client]: CNetObj_Character changed [2022-07-06 20:57:52][client]: 0 35508 35510 [2022-07-06 20:57:52][client]: CNetObj_Character changed [2022-07-06 20:57:52][client]: 0 35510 35512 (edited)
DDraceNetwork, a cooperative racing mod of Teeworlds - GitHub - C0D3D3V/ddnet at what_changes_in_netobj_character
19:05
I do not even think we would need that update. But I guess that was made to prevent package loss.
Avatar
I don't see what this has to do with package loss
19:07
can you explain?
Avatar
I thought they got fixed in https://github.com/ddnet/ddnet/pull/5210 after rebase. But what actually happend is that @def- changed that you have to set loglevel to 4 to see them... before they were just there. (But maybe I also have to do that on old ddnet version have not checked yet) ``` [2022-07-06 21:09:20][client]: prediction error [2022-07-06 21:09:20][client]: 1 694 698 (694 696) [2022-07-06 21:09:20][client]: 3 1 439 (1 375) [2022-07-06 21:09:20][client]: 11 69...
Avatar
meh
19:18
why is rust so bloated
Avatar
$ touch a.rs $ rustc a.rs --crate-type staticlib -C opt-level=z $ ls -lh liba.a -rw-r--r-- 1 19M Jul 6 21:26 liba.a
Avatar
static lib?
Avatar
Avatar
heinrich5991
I don't see what this has to do with package loss
I thought maybe the character gets resend with new tick to prevent that a player did not get an old character snap... But I guess that is unnecessary because the client would request a resend anyway because of missing delta
20:06
maybe we could try not to send characters if nothing changes
20:07
except tick
20:08
or better keep the old tick, to keep the snap in the snapshot
20:08
so we could introduce a snapshot tick.... for characters (edited)
Avatar
@Ryozuki yes, static lib
20:56
perhaps it's intrinsic in the static library format that I can't get it smaller?
Avatar
did u strip it?
21:00
codegen-units = 1 may help too
21:00
basically the link i sent
Avatar
Avatar
Ryozuki
did u strip it?
I don't think so, but nothing is going to reduce an empty library from 20 MB to something sane
21:01
🦀 How to minimize Rust binary size 📦. Contribute to johnthagen/min-sized-rust development by creating an account on GitHub.
21:01
if u check this part
21:01
build using build-std
21:01
Avatar
after stripping, it's 'only' 10 MB
Avatar
whats the comparision with say c++?
Avatar
1.1 KB
Avatar
try doing what i sent u
21:02
it should remove unused parts of the std
Avatar
I mean an empty library is an unfair comparison, I don't expect rust to go down to 1.1 KB
Avatar
Avatar
heinrich5991
I mean an empty library is an unfair comparison, I don't expect rust to go down to 1.1 KB
Why not?
Avatar
or at least it's not important
Avatar
Nothing is nothing, no matter the language 😛
Avatar
but I was trying to generate a minimal example where the rust library is still that big
21:04
and that's where I ended up
21:04
I'll try the build-std thing
21:05
its definitly possible
Avatar
ah, is the problem that I can't dynamically link rust and hence can't dynamically link the standard library (which would unfortunately not be present anyway), but libc++ is present on distributions?
21:06
what would that look like on windows?
Avatar
How big is libc anyway? I doubt it's 10M
Avatar
But yes probably that is the issue, and the only way to go smaller is probably some sort of LTO
Avatar
i thought u were statically linking the libstdc++
21:07
for a fair comp
Avatar
I'm going for a 'how much size will ddnet gain' comparison
21:08
@Learath2 20 MB, for that matter 😄
21:09
/usr/lib/libstdc++.so.6.0.30
Avatar
Hm, having to have libstd in every module of rust we add sounds like a significantly bad deal, we'd have to go for a non modular approach for that to be remotely acceptable
Avatar
u can dynamically link rust tho i think
21:09
its just not the norm
Avatar
Like one big rust blob interacting with the one big C++ blob
Avatar
I get 2.5 MiB for the stripped build-std build
Avatar
Is that still an empty lib?
Avatar
yes
Avatar
What part of std is even being pulled in, that's so weird
Avatar
perhaps the formatting stuff
Avatar
did u remove
21:13
the panic
21:13
to abort
21:13
Even if panic = "abort" is specified in Cargo.toml, rustc will still include panic strings and formatting code in final binary by default. An unstable panic_immediate_abort feature has been merged into the nightly rustc compiler to address this.
Avatar
I can try that; removing the formatting code is probably a no-go for ddnet though
Avatar
As long as we have a single copy of a 3ish MB libstd that sounds fine to me aswell, no need to make the panics ugly
Avatar
and codegen-units = 1 ?
21:15
i mean 3mb is fine to me
21:15
we shouldnt sacrifice too much for it
21:15
otherwise jsut not use rust
21:15
xD
Avatar
3M is definitely acceptable, even up to 5M, but if we can't split libstd and link to that dynamically then we can't have rust "modules" we'll need to settle for a blob
Avatar
ah, I accidentally produced a 14 KiB .so
Avatar
080f49a Add 28 € donation by 123dd - def-
Avatar
okay, with crate-type = ["cdylib"] and build-std, I get < 32 KiB .sos
Avatar
Hello, Is this channel only for server and client? I have idea/question about site
Avatar
for everything dev related
Avatar
this channel is about all development
Avatar
web included
👍 1
Avatar
afaik client accepts any skin size, recently I found out uhd skins are added separately to db. wasn't simpler just update tee.js (the skin assembler) to make correct previews for uhd?
Avatar
it'd be good to update tee.js if it doesn't work with higher definition skins
22:05
but they're also separate because of resource usage in the client IIRC
this 1
Exported 289 message(s)