Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2023-01-16 00:00:00Z and 2023-01-17 00:00:00Z
Avatar
who moved developer channel
08:10
wasn't that far down
Avatar
This isn't developer. Please use #showroom
justatest 7
Avatar
oh no now i have to retrain my muscle memory to enter developer channel without seeing any tower clips
Avatar
Avatar
ReiTW
who moved developer channel
Ye sucks
Avatar
ChillerDragon BOT 2023-01-16 09:44:46Z
ctrl+k is a think isnt it?
09:45
imagine using a mouse
Avatar
Avatar
ChillerDragon
imagine using a mouse
that's a main feature on Windows giga_chad
Avatar
You might consider adding a key other than the spacebar in the new version to open the page of the editor's game layer. -Like Alt.🤨
Avatar
Misskey is an open source, decentralized social media platform that's free forever!
13:41
leaving this for later
Avatar
$ clang --version Debian clang version 11.0.1-2 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin Fixes this error In file included from /home/chiller/Desktop/git/ddnet/src/base/color.h:6: /home/chiller/Desktop/git/ddnet/src/base/vmath.h:141:38: error: constexpr function never produces a constant expression [-Winvalid-constexpr] constexpr inline vector2_base direction(float angle) ^ /home/chiller/Desktop/git/ddnet/src/bas...
Avatar
005720e Add 88 € funding for USA1 by YupHio - def-
Avatar
f2a26aa Fix build with clang on debian 11 - ChillerDragon fe7bee4 Merge #6287 - bors[bot]
Avatar
@Jupstar ✪ since c++ puts the struct,class fields in the order u define them, u think reordering the fields, can achieve better pef?
15:20
perf
Avatar
Yes
Avatar
rust automatically uses the best layout to have less padding and alignment
Avatar
But smith different
15:20
Smth
Avatar
i think we dont put thought in ddnet
15:20
when putting fields
15:20
xd
Avatar
If compiler can reorder it then it can also make it more cache friendly
Avatar
i think biggest to smallest
15:21
is the easy way
Avatar
Avatar
Ryozuki
rust automatically uses the best layout to have less padding and alignment
Less padding alignment is not always best tho
15:21
Sometimes the opposite is true actually
Avatar
well less padding idk
15:22
i think it chooses the best layout
15:22
idk if it has less padding xd
Avatar
When it knows stuff is accessed concurrently it can create so much alignment that no cache flushes are needed
15:23
GPUs always have insane alignments xd
Avatar
The only data layout guarantees made by this representation are those required for soundness. They are: The fields are properly aligned. The fields do not overlap. The alignment of the type is at least the maximum alignment of its fields. Formally, the first guarantee means that the offset of any field is divisible by that field's alignment. The second guarantee means that the fields can be ordered such that the offset plus the size of any field is less than or equal to the offset of the next field in the ordering. The ordering does not have to be the same as the order in which the fields are specified in the declaration of the type. Be aware that the second guarantee does not imply that the fields have distinct addresses: zero-sized types may have the same address as other fields in the same struct. There are no other guarantees of data layout made by this representation.
15:23
these are the only guarantees
15:23
in rust
Avatar
Yes it was a really good idea from rust to design it like this
Avatar
You can use clang-reorder-fields
Avatar
And static linking
Avatar
Avatar
Ryozuki
i think it chooses the best layout
Mh, idk if one can rigorously define an "optimal" layout. A lot of bizarre alignment considerations, cache considerations must be made. The nature of the access is also probably important
Avatar
well i guess
15:25
rust doesnt define it as the most optimal, it just says these are the guarantees
Avatar
But still per architecture it can assume certain stuff
Avatar
aka u must not rely on the order u define them
15:25
unlike c
Avatar
Arch=native for enjoyers
Avatar
You can benchmark to see if it's optimal, but I don't think you can just by knowing the architecture guess the best layout unless you are like the designer of the cpu
15:28
Does rust allow iteration of struct fields btw? I don't remember
Avatar
wdym by that
15:30
like python dict?
15:30
xd
15:30
__dict__
15:30
@Learath2 u can do this at compile time with macros
15:30
ast macros ez
15:31
since macros operato on ast, u can know whats a struct field
Avatar
Avatar
Ryozuki
like python dict?
Yeah, or js ones
Avatar
serde is so powerful and fast cuz that
15:31
proc macros*
Avatar
Avatar
Ryozuki
since macros operato on ast, u can know whats a struct field
So you just generate an iterator that yields them in order?
Avatar
idk what serde does
15:32
but they need to do what u want to serialize fieldss
15:32
iirc
15:32
Hey! So I'm diving around the examples trying to figure out how to implement a macro. The examples and docs are very informative so thank you! But I figured I'd post an issue in cas...
15:32
read this
15:33
written by the magician
15:33
who wrote syn, quote
15:34
i am always amazed by how powerful serde is
15:34
and its perfomant af
15:34
its crazy
15:34
one of rust biggest achievements
15:35
#rustad
Avatar
Avatar
Learath2
Yeah, or js ones
js sux tho
15:36
if u dont use a Map
15:36
the iterator over objects may give u unwanted stuff
15:38
The Map object holds key-value pairs and remembers the original insertion order of the keys. Any value (both objects and primitive values) may be used as either a key or a value.
15:38
An Object has a prototype, so it contains default keys that could collide with your own keys if you're not careful.
15:38
most ppl in js world use object instead of maps
Avatar
rip influxdb crate
Avatar
cuz they dont even know what a map is lmao
Avatar
@Learath2 no, but you can annotate the struct with a macro that can read the struct fields and generate methods based on that
Avatar
Should we just move this channel, including bugs into it's own category? The channel being so far down is extremely odd to me 😄
15:41
so it wasnt u who moved it
15:41
do it
15:41
and put it on top
15:41
top priority
15:41
A rust derive macro to generate HTML forms from structs. - GitHub - edg-l/formy: A rust derive macro to generate HTML forms from structs.
15:41
this reminds me i did this
15:41
a abandoned project
15:41
use formy::Form; #[derive(Form)] struct UserLogin { #[input(pattern = r"[\w]+")] #[label = "Username:"] username: String, #[input(type = "email", name = "real_email", class="py-4", id = "email")] email: String, #[input(type = "password")] #[label = "Password:"] password: String, some_field: String, } let form = UserLogin::to_form();
15:41
i make a html form with this macro
Avatar
0948a1d Fix layout of kick/spec vote list items - Robyt3 029b424 Merge #6288 - bors[bot]
Avatar
Avatar
murpi
Should we just move this channel, including bugs into it's own category? The channel being so far down is extremely odd to me 😄
Sounds good then I can minimize the useless channels xd
Avatar
Jupstar's point is good, I guess. I also like people stumbling upon the developer channel though, I'd guess this would reduce the chance of that happening
Avatar
Avatar
heinrich5991
Jupstar's point is good, I guess. I also like people stumbling upon the developer channel though, I'd guess this would reduce the chance of that happening
ye thats a point i made
16:18
thats why it being 2nd is good
16:18
we need more devs
16:18
and im sure its interesting for ppl to look at
16:18
event if they dont comment
16:18
im pretty sure
16:18
dev channels in games are the most interesting
16:18
source: me
Avatar
Avatar
deen
You can use clang-reorder-fields
im afraid this break some mem_copy between different struct. They do have similar layout, but can it guarentee it reorders similarly?
Avatar
apparently it does nothing automatically 😄 you have to specify the order you want, so not that useful
Avatar
ChillerDragon BOT 2023-01-16 17:27:55Z
does someone know if https://github.com/0xfaulty is on this discord? :)
Software development. 0xfaulty has 29 repositories available. Follow their code on GitHub.
Avatar
@Faulty ^?
17:57
@Jupstar ✪
17:57
GPT-3 as therapy modality expert
17:57
@Learath2 use gpt to get therapy
17:57
tell him to become socrates
17:58
Avatar
the best therapy is to get addicted to smth xd
Avatar
chillerdragon BOT 2023-01-16 18:19:49Z
Sounds good thanks deen :)Ello faulty is that you? (@deen)
@Faulty ^?
Avatar
should the new category be below chat or above chat?
Avatar
well if u ask here: above
18:45
xd
Avatar
Avatar
Ryozuki
@Learath2 use gpt to get therapy
GPT can't fix me
Avatar
Avatar
murpi
should the new category be below chat or above chat?
Definitely below
18:47
Well imo
18:47
Most important chat
Avatar
Only devs may answer
18:55
kek gigachad
Avatar
well in that case idk why bot cmds or reports are in chat category
Avatar
Avatar
Ryozuki
Only devs may answer
i've made pull requests ☝🤓
18:58
but i think the old order all in 1 category was fine
Avatar
Avatar
chillerdragon
Sounds good thanks deen :)Ello faulty is that you? (@deen)
me
Avatar
Avatar
Jupstar ✪
the best therapy is to get addicted to smth xd
soulless
Avatar
anyone knowing how to compile a modded client with 0.6 on it ?
Avatar
what client?
21:33
I can guess which client you are talking about only by checking our mutual friend
Avatar
yes i know, just read the README file
Avatar
cheat clients rarely have instructions on the build process
Avatar
Avatar
nouaa
I can guess which client you are talking about only by checking our mutual friend
Nice (edited)
Avatar
Avatar
nouaa
cheat clients rarely have instructions on the build process
That's why I'm asking here, maybe someone knows how to do it
bluestripe 1
Avatar
did someonen ping me
22:23
why did it disapear
Avatar
Avatar
Ryozuki
did someonen ping me
Scam links ^^
Avatar
Avatar
nouaa
cheat clients rarely have instructions on the build process
too bad
Exported 149 message(s)