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-11-08 00:00:00Z and 2022-11-09 00:00:00Z
Avatar
Avatar
YupHio
@Robyt3 Perhaps Debian is the issue. My VPS host has several OS options. What OS do the regular DDNet servers run on, or which one is the most stable for running a server?
why would debian be the issue lol
Avatar
Avatar
Robyt3
None that I'm aware of. Maybe it's somehow specific to Debian.
🙂
Avatar
Avatar
ReiTW
why would debian be the issue lol
^
Avatar
did u tst with the addr sanitizer
Avatar
Changing the OS may likely change whatever variable is the root cause, since it is unknown
01:01
Will try that tomorrow @ReiTW ran out of time today
Avatar
let me 2min
Avatar
Avatar
Robyt3
If you can, compile with AddressSanitizer. Also share the map.
same issue tho, debian 11, but once I compile it by myself I can't get anything and everything works fine
01:32
I've compiled the source from branch 16.5
01:36
is it possible that the provided binary in the page might be "corrupted"?
Avatar
Hmm. So you recreated the issue? Can you post the freshly compiled server for me (us) to use? Did you do a compare? Sounds like the one I downloaded may have a local artifact from whoever built it.
Avatar
Avatar
ReiTW
is it possible that the provided binary in the page might be "corrupted"?
Yeah seems like it
Avatar
well u shouldn't trust me & compile it yourself tho
01:41
xD
01:45
Do the published binaries on the DDNet website get built on a standard build machine (like a container), or does someone just build with whatever environment they have locally that day and then publish it? xD (edited)
Avatar
(same for ubuntu 20.04)
Avatar
Avatar
YupHio
Do the published binaries on the DDNet website get built on a standard build machine (like a container), or does someone just build with whatever environment they have locally that day and then publish it? xD (edited)
they're built on deen's machine, I think
Avatar
afabfaf M yayita, R run_birming - ddnet-maps
Avatar
chillerdragon BOT 2022-11-08 05:47:21Z
Poggers (@Patiga)
I released a new version of twmap, twmap-tools, twmap-py and twmap-blender ( @Ryozuki, @gerdoe, @k2d222, ChillerDragon ) twmap: 0.9.0 contained a rather big bug where the Layer::shape function had x and y mixed up. that is fixed, alongside its uses (somehow I managed to use it the correct wrong way multiple times). apart from the fixes there should not be any breaking changes with 0.9.1, but some nice additions from @Ryozuki twmap-tools: twmap-edit wasn't working properly because of the mentioned bug, everything should work again twmap-py: the to_mesh method on tiles layers now works again, it was broken for a while (also the release was necessary to fix the mentioned bug) twmap-blender: the add-on now automatically downloads the twmap python module with pip, if it isn't installed (release: https://gitlab.com/Patiga/twmap-blender/-/releases/v0.3.0)
08:24
a648b13 VéNa, not V-233-Na - murpii f9c7fdc Merge pull request #224 from murpii/patch-1 - def-
Avatar
gavagai691
Yitang Zhang, the mathematician behind the 2013 breakthrough on bounded gaps in primes, posted to the arxiv today a result which (if correct) comes close to proving the nonexistence of Landau--Siegel zeros: https://arxiv.org/abs/2211.02515.To give a sense of the scale of this claim: If correct, Zhang's work is the most significant progress towar...
Avatar
[quakenet] ChillerDragon BOT 2022-11-08 09:36:22Z
How does rust pick the output filename? it says wireshark-dissector here but compilation generates a wiresharkdissector.so does it replace - with for libs or all binaries? https://github.com/ChillerDragon/libtw2/blob/5f07c47f71acb943aaa8aa4a6d693980db6a15d9/wireshark-dissector/Cargo.toml#L2
Some Teeworlds stuff in Rust. Contribute to ChillerDragon/libtw2 development by creating an account on GitHub.
09:37
lib* in front
Avatar
In this case
09:47
Under package
09:47
In name
09:47
Thats the binary name
09:48
Ah
09:48
Yeah i guess it removes -
09:48
Its a library got confused xd
09:49
I think just for libs
Avatar
[quakenet] ChillerDragon BOT 2022-11-08 09:55:42Z
rust trol lang
Avatar
[quakenet] Ryozuki BOT 2022-11-08 10:02:56Z
test
10:03
test2?
10:34
justatest
Avatar
[quakenet] ChillerDragon BOT 2022-11-08 10:34:57Z
@heinrich5991 Why can i not see the input snap object in wireshark? https://zillyhuhn.com/cs/.1667903649.png
Avatar
Avatar
Anime.pdf
Click to see attachment 🖼️
Rewrite it in Rust sue
Avatar
[quakenet] ChillerDragon BOT 2022-11-08 11:00:37Z
This works... but it seems more hacky than what you planned there @heinrich5991 https://zillyhuhn.com/cs/.1667905210.png
Avatar
the correct way to support this is to implement the snapshot_object type
13:47
ChillerDragon: but yours is okay for fixing it if you just want to look at it right now
Avatar
i don't understand why devs needed to delete the console window option in new versions lol
Avatar
Avatar
YupHio
@Robyt3 Perhaps Debian is the issue. My VPS host has several OS options. What OS do the regular DDNet servers run on, or which one is the most stable for running a server?
Debian
👌 1
Avatar
[quakenet] ChillerDragon BOT 2022-11-08 15:08:16Z
@heinrich5991 nah i dont need a hotfix i just wanted too see how hard it is to contribute to the dissector. Apparently too hard for me :(
15:08
Because if i check it looks implemented to me
Avatar
I did a fresh build on my Debian VPS, and the server crashing issue is now fixed 🙂 Seems there is an artifact/bug in the Linux DDNet-Server binary published on the DDNet website. Thanks @deen and @ReiTW
Avatar
[quakenet] ChillerDragon BOT 2022-11-08 15:21:52Z
I knew it! website download includes additional malware! deen the bitcoin miner confirmed!!!!!!!!!!!!
15:22
^ okay in case someone does not get it this is a joke xd
Avatar
deen reverse shell everyone
15:26
giga_chad
Avatar
what's the library to explore tw map in python by Patiga?
15:32
or is there any similar library, preferrably in python?
Avatar
The twmap
15:34
Its just a python binding for the rust lib
15:34
So it should be fast too
Avatar
ah i found it on pypi.org 😉
15:34
Python bindings for the crate twmap
Avatar
Python bindings for the crate twmap
15:34
Ye cd
15:34
Xd
Avatar
delete your message impostor !!
Avatar
Rly good lib
15:35
I used the rust side
15:35
For my map gen
Avatar
hmm, default python pip is using twmap 0.2.0, looks kinda old
15:36
anaconda does use 0.4.1 whihc seems to date from yesterday 🙂
Avatar
glad you found it that easily!
15:37
please use 0.4.1, its much better imo
Avatar
any idea why distrib python uses outdated version?
Avatar
I'm not sure, I don't know how the version selection works
Avatar
me neither 😄
Avatar
which python version are you on?
Avatar
distrib is 3.6.9
15:39
conda is 3.7.6
Avatar
iirc python 3.6 is end of life, my publish process doesn't support that version directly anymore
Avatar
yeah, im waiting my phd defense to update to ubuntu 22 my machine
15:40
don't wanna take no risk at that point 😄
15:40
and im running out of space /dev/mapper/xubuntu--vg-root 144G 132G 5,4G 97% /
15:40
how big is ddnet-maps?
15:40
will it fill my disk ?
Avatar
well if you want you can also just built it yourself, that should be realtively easy for you :)
15:40
(if you have rust installed)
Avatar
Avatar
Chairn
how big is ddnet-maps?
about 2.3 GB
Avatar
i think ill try to do some stuff in the train
Avatar
yeah, but never compiled rust yet
Avatar
oh god I hope your rust is new-ish, so far I didn't focus on keeping the minimum-supported-rust-version down
15:43
but if you already have it, compiling the project is really just cargo build --release
Avatar
rustc 1.61.0
15:43
no idea how new this is
15:43
or how old
Avatar
I'd guess updating wouldn't hurt if that is in your power
Avatar
nah, fine for now
Avatar
Avatar
Patiga
about 2.3 GB
Receiving objects: 100% (32608/32608), 918.89 MiB so 920MB packed
Avatar
@Chairn just do rustup update
16:32
@Jupstar ✪
16:42
nouveum sucks performance wise
16:42
i dunno why it should change with rust ^^ the intel simply missing for the architectures
16:44
"The newly created Linux driver for Nvidia GPUs will be using Rust for its shader compiler." also its just the shader compiler
Avatar
[quakenet] ChillerDragon BOT 2022-11-08 17:38:56Z
yikes sounds complicated but thanks for the useful links @heinrich5991
Avatar
Avatar
Chairn
rustc 1.61.0
that appears to be the exact minimum rust version for twmap-py o.o
Avatar
@Patiga twmap doesn't have tile enumeration? didn't find any
18:58
our new build system requires an internet connection. Is it only for the very first time or at every rebuild (haven't tried yet)?
Avatar
yes, it doesn't have that as of yet
18:59
have you tried getting the python bindings to work on your machine? :)
Avatar
@Chairn how are the build times now btw?
19:01
ur pc was pretty slow
19:02
make 16.5 vs current master pls
Avatar
Avatar
Patiga
have you tried getting the python bindings to work on your machine? :)
yes it does work wonderfully 🙂
19:59
import twmap from glob import glob import numpy as np TILE_FREEZE = 9 for mapname in glob('ddnet-maps/types/race/maps/*.map'): Map = twmap.Map(mapname) game = Map.game_layer().tiles[:,:,0] try: front = Map.front_layer().tiles[:,:,0] except AttributeError: front = np.zeros((1,1)) if (game == TILE_FREEZE).any() or (front == TILE_FREEZE).any(): print(f'{mapname} has freeze')
Avatar
Avatar
Jupstar ✪
@Chairn how are the build times now btw?
hmm, not yet, will try later, probably tomorrow
Avatar
nice, glad it works for you
Avatar
Avatar
Ryozuki
@Chairn just do rustup update
cmd? rustup doesn't exist on my system
20:13
i manage rust with rustup
Avatar
build times are almost doubled from what i can see
Avatar
build times with what?
20:19
ah
Avatar
ddnet with my potato machine
Avatar
the rust changes 😦
Avatar
runnning 16.5 rn
Avatar
but after all downloaded?
20:19
that obv wont count xd
Avatar
yea
Avatar
$ cmake -G Ninja -DDEV=ON .. $ time ninja # 16.5 real 3m2,989s user 10m1,479s sys 0m31,780s # master build with rust real 3m45,214s user 12m3,471s sys 0m37,628s
20:20
okay, not really doubled
20:21
i think potato pc is tired because i remember it builds in around 2 minutes usually
Avatar
An extra 40s. Not that bad
Avatar
+25%
Avatar
Finished dev [unoptimized + debuginfo] target(s) in 54.34s
Avatar
it's okayish I gues
Avatar
Though I can see it getting worse as we use more dependencies in rust modules
Avatar
but, do we need to build it ? I thought it was just extra tool written in rust
Avatar
no, it's compiled into the client and server
20:22
check out the new fancy console command rust_version
20:23
:p
20:23
:p
Avatar
hm, it doesn't replace :p anymore
20:23
😛
20:23
it does
20:23
:p
20:23
😛
20:23
only with capital P
20:23
discord, you broke my workflow https://xkcd.com/1172/
Avatar
it also uses more disk space: ## master build with rust 284K ./src 40M ./data 90M ./CMakeFiles 238M ./debug 434M . ## 16.5 284K ./src 40M ./data 89M ./CMakeFiles 167M .
Avatar
why the tripple style documentation style tho?
Avatar
yes, that is to be expected
Avatar
@Ryozuki what about our documentation tool
Avatar
Triple style documentation style?
Avatar
/// Color, in HSLA format. Corresponds to the C++ type `ColorHSLA`. /// /// The color is represented by hue, saturation, lightness and alpha values /// between `0.0` and `1.0`. /// /// See also <https://en.wikipedia.org/wiki/HSL_and_HSV>. /// /// # Examples /// /// --- /// use ddnet_base::ColorHSLA; /// /// let white = ColorHSLA { h: 0.0, s: 0.0, l: 1.0, a: 1.0 }; /// let black = ColorHSLA { h: 0.0, s: 0.0, l: 0.0, a: 1.0 }; /// let red = ColorHSLA { h: 0.0, s: 1.0, l: 0.5, a: 1.0 }; /// let transparent = ColorHSLA { h: 0.0, s: 0.0, l: 0.0, a: 0.0 }; /// /// // #ffa500 /// let ddnet_logo_color = ColorHSLA { h: 0.10784314, s: 1.0, l: 0.5, a: 1.0 }; /// --- (edited)
Avatar
that's how you do documentation in rust
20:25
with the three slashes
Avatar
can we change it to doxygen?
20:25
bcs it looks really bad
Avatar
I don't know, but I wouldn't
20:26
rustdoc is really well integrated into rust
Avatar
Hm, it is a little annoying that we need 2 sets of docs with no proper link between them
Avatar
well same ppl probs made rust syntax what do i expect
20:30
whats better, rust analyser or rust language server?
Avatar
rust docs are markdown
20:31
with extensions
Avatar
does rust language server include rust analyzer?
20:32
use rust analyzer
Avatar
Avatar
Ryozuki
rust docs are markdown
well it still looks shit xD
Avatar
it looks good to me
20:32
and the rendered docs even better
20:32
docs.rs is a blessing
Avatar
Avatar
Ryozuki
use rust analyzer
is it better?
Avatar
rls is deprecated
20:32
rust analyzer is the oficial now
Avatar
rls is actually removed from the newest release
Avatar
what tool to format code?
Avatar
cargo fmt
Avatar
cargo fmt
Avatar
cargo check to check for errors without compiling
Avatar
how should my ide have support for both?
Avatar
cargo clippy for more checks
Avatar
clang format and cargo
Avatar
vscode?
20:34
it uses t he rust-analyzer formatter
20:34
which is cargo fmt
20:34
so just format
20:34
LSP also are used to format code
20:34
the rust LSP calls rustfmt
20:35
there is also a tool to check unsafe code
20:35
miri
20:35
but thats more advanced
Avatar
its not formatting xd
Avatar
do note that
20:36
rust-analyzer fails to initialize
20:36
on current master
20:36
cuz heinrich panics on a missing env
20:37
on a build script
Avatar
only if i set formatter to rust
20:37
but then i obv dont have clang-format
20:37
just set formatter to rust for rust files
Avatar
how is that option called
Avatar
Avatar
Ryozuki
cuz heinrich panics on a missing env
can you set the env var I posted in the PR?
Avatar
its bad
Avatar
ok manually changing setting works
Avatar
that u ggotta set a env var
20:40
default should work
20:40
bad dev exp
Avatar
I explained why there's a tradeoff
20:42
can you maybe make your IDE or rust analyzer set a env var by default?
20:42
or can I detect that I'm being compiled by rust-analyzer?
Avatar
"Enable all cargo features" do you think its worth it?
Avatar
that's about the project, I think
20:45
since we don't have any, it shouldn't make a difference
Avatar
Avatar
Jupstar ✪
"Enable all cargo features" do you think its worth it?
no
20:45
set default
20:45
settings
20:45
well
20:46
i disable inlay hints
20:46
cuz they are annoying
Avatar
i want best defaults, not maintainers default xd
Avatar
my defaults is
20:48
clippy instead of check
20:48
and disable inlay hints
20:48
and there is smth about a lru cache
20:48
i increased it
20:48
cuz i have lot of ram
Avatar
seems like it only supports clippy anyway
Avatar
its clippy or check
20:48
clippy has way more checks
20:48
but might be a little slower
20:48
on the ms levels tho
Avatar
clippy has some lints enabled by default that I don't agree with
Avatar
and i agree with
20:50
the lints
20:50
strongly
20:50
like a cult
20:50
mindlessly
Avatar
how can you say that, without even having seen the ones I complain about?
Avatar
cuz i like to tease you
20:51
xd
Avatar
kk ^^
Avatar
but now im curious
20:52
looking at lints u can learn lot of stuff tho
20:52
there was some about await stuff
Avatar
e.g. this one didn't seem to make the code clearer in the cases where I saw it fire
20:52
A collection of lints to catch common mistakes and improve your Rust code.
20:53
they call as a coercion
20:53
I think that's no coercion
Avatar
@Ryozuki any plugin to have parameter names displayed like this?
Avatar
those are inlay hints
20:53
for parameters
Avatar
idea does these by default for rust
20:53
(if you install the rust plugin)
Avatar
dont switch to idea
20:54
let me find the settings
Avatar
xD
20:54
i need to enable in vscode btw
20:56
20:56
@Jupstar ✪ just search inlay hints lol
Avatar
i dont even have rust-analyzer settings lol
Avatar
install it?
20:57
Avatar
well i thought its integrated into the rust tool
20:57
but vscode has a plugin
20:57
it uses the tool
20:57
like clangd extension
Avatar
i use vscodium, so its maybe not equally suggested
20:57
Avatar
its that
20:58
try it
20:58
which one u had then?
20:58
xd
Avatar
so the other plugin uninstall?
20:58
20:59
it had more downloads, so i thought its the used one xd
Avatar
Avatar
Jupstar ✪
Click to see attachment 🖼️
this one is deprecated
20:59
on vscode it says deprecated
20:59
i guess on vscodium it doesnt for some reason
20:59
uninstall it
Avatar
ok
21:06
[ERROR rust_analyzer::lsp_utils] failed to run build scripts error: failed to run custom build command for `ddnet-test v0.0.1 (/home/jupeyy/Schreibtisch/Teeworlds/DDNet/ddnet_jupeyy/src/rust-bridge/test)` Caused by: process didn't exit successfully: `/home/jupeyy/Schreibtisch/Teeworlds/DDNet/ddnet_jupeyy/target/debug/build/ddnet-test-3232940390239a5f/build-script-build` (exit status: 101) --- stdout cargo:rerun-if-env-changed=DDNET_TEST_LIBRARIES cargo:rerun-if-env-changed=DDNET_TEST_NO_LINK --- stderr thread 'main' panicked at 'environment variable DDNET_TEST_LIBRARIES required but not found: NotPresent', src/rust-bridge/test/build.rs:27:14 stack backtrace: 0: rust_begin_unwind at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:584:5 1: core::panicking::panic_fmt at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:142:14 2: core::result::unwrap_failed at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/result.rs:1785:5 3: core::result::Result<T,E>::expect at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/result.rs:1035:23 4: build_script_build::main at ./build.rs:26:25 5: core::ops::function::FnOnce::call_once at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/ops/function.rs:248:5 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. [ERROR project_model::workspace] cyclic deps: ddnet_engine_shared(CrateId(17)) -> ddnet_engine(CrateId(16)), alternative path: ddnet_engine(CrateId(16)) -> ddnet_engine_shared(CrateId(17))
21:06
what am i doing wrong ryozoozki
21:06
it doesnt integrate with cmake?
Avatar
@Jupstar ✪ i told u
21:07
this is heinrich fault
21:07
here is the fix
21:07
I don't know why we panicked before, but maybe we shouldn't? In the rust-analyzer context, looks like CARGO_FEATURE_LINK_TEST_LIBRARIES is set but DDNET_TEST_LIBRARIES isn't. Maybe the...
Avatar
bro do i look like i understand what u talking about xD
Avatar
@Jupstar ✪ heinrich decided to panic on the build.rs script
21:07
which rust-analyzer runs
21:08
to check code correctly
21:08
a build.rs script is made to link C stuff and more
21:08
or compile
21:08
C
Avatar
i c
21:08
then we need it heinrich
21:08
we riot
21:08
PeepoRiot
21:09
he wants us to set the env var ourselves
21:09
but this is a bad dev experience
Avatar
when i open IDE it must directly give me full tripple A game.. good defaults are important
Avatar
it should work by default
Avatar
I talked about the tradeoff
21:18
you seem to ignore it in your comments
21:18
you also don't respond to my questions
Avatar
Avatar
heinrich5991
or can I detect that I'm being compiled by rust-analyzer?
starting here ^
Avatar
i havent tried yet
22:04
im in no code mood
22:04
happens at night
22:04
tomorrow maybe
22:04
i dont think u can detect its rust-analyzer
Avatar
Avatar
Ryozuki
happens at night
wtf do you mean no code mood happens at night
22:28
It's the only time it doesn't happen! (edited)
Avatar
probably a side effect of coding also being your day job 😄
Avatar
Avatar
YupHio
I did a fresh build on my Debian VPS, and the server crashing issue is now fixed 🙂 Seems there is an artifact/bug in the Linux DDNet-Server binary published on the DDNet website. Thanks @deen and @ReiTW
How did you trigger the crash? Just on server start?
22:51
and what does the crash look like on terminal?
Avatar
Avatar
deen
How did you trigger the crash? Just on server start?
it does crash when someone attempts to join the server.
23:45
after the map download
Exported 337 message(s)