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-02-03 00:00:00Z and 2023-02-04 00:00:00Z
Avatar
Avatar
newlesstee
how to create the c++ void CGameContext::CreatePlayerSpawn(vec2 Pos, int64_t Mask) without sound ? (edited)
If sendsound isn't called in that function then it is client side
👍 1
Avatar
Avatar
chillerdragon
Yea sadly not ._. Getting the tuning right can be a bit annoying. Fokko managed pretty well in F-DDrace (@Jupstar ✪)
❤️
06:54
For some reason I see a rise in new devs coding own little mods. So cool :)
Avatar
Avatar
newlesstee
how to create the c++ void CGameContext::CreatePlayerSpawn(vec2 Pos, int64_t Mask) without sound ? (edited)
cant, client creates sound when it receives this thing
👍 1
Avatar
Why maximal speed in ddnet 75 block in second?
Avatar
ay
Avatar
That's 270km/h . Faster than most racing games
Avatar
Avatar
fokkonaut
For some reason I see a rise in new devs coding own little mods. So cool :)
What, but they aren‘t played that much are they?
Avatar
I'm not sure, but its cool anyways
07:59
Its growth in the community
Avatar
I played teeware, it‘s really fun.
Avatar
Yea, its cool
Avatar
Please give me a link to download teewars 1.0
Avatar
is it safe to cast a int x[32] to unsigned char * ?
Avatar
yes
14:27
everything is safe to cast to unsigned char *
Avatar
hmm i see
14:27
and will the sizeof(x) work
14:27
for that unsigned char*?
14:27
func(const unsigned char*pBuf, size_t BufLen)
14:28
func((unsigned char *)x, sizeof(x))
14:28
?
14:28
xd
14:28
my c++ is now rusty
14:28
hehe pun intended
Avatar
If x is the original data type. It works
14:30
The cast happens in place and not for the original variable
Avatar
x is a int[32]
14:31
a array with a known size
14:31
array decay sux
14:31
std::array best
14:31
its like c++ loves to lose info
Avatar
Then it will give u the size of the full array
14:32
Same for std array
Avatar
meh my problem is that the print looks like overruns
14:32
but in another place it doesnt happen xd
Avatar
In bytes
14:32
Std::size for element count
Avatar
std::size fixed it
14:33
sizeof is evil
Avatar
size of is still important tho
14:35
Working with binary data etc
14:35
im just rly rusty
Avatar
i even use it in rust
14:35
xd
14:35
its so hard to use modern c++ in ddnet code
14:35
cuz old code
14:36
bjorne is wrong
14:36
The NSA recently published a Cybersecurity Information Sheet about the importance of memory safety, where they recommended moving from memory-unsafe programming languages (like C and C++) to memory-safe ones (like Rust). Dr. Bjarne Stroustrup, the original creator of C++, has made some waves with his response. To be honest, I was disappointed. A...
14:36
good read
Avatar
modern c++ core features, or modern c++ standard library?
Avatar
both i guess xd
14:36
probs library
Avatar
bcs i really think the core features are cool, like variadic templates would be awesome in rust
Avatar
cuz idk the features
Avatar
its compile time safe too
Avatar
Avatar
Jupstar ✪
bcs i really think the core features are cool, like variadic templates would be awesome in rust
variadic is the infinite params right
Avatar
(type safe)
Avatar
i think thats haard
Avatar
Avatar
Ryozuki
variadic is the infinite params right
yes but at compile time
Avatar
there is a rfc somewhere with comments
Avatar
not like var args
Avatar
u can probs emulate it with a macro tho
Avatar
yeah macros are basically infinite power
Avatar
Rémy Rakic is helping us enable the adoption of memory safe software through work to improve Rust compile times. We asked him to provide his perspective on the work in this blog post. Thank you for your partnership and contributions, Rémy! Josh Aas, Head of ISRG's Prossimo project Introduction Over the past few months I've been working as par...
Avatar
but also lot of work, esp procedual ones
Avatar
Avatar
Ryozuki
x is a int[32]
int[32] parameter or int[32] something else?
14:38
int[32] parameter is actually int*
Avatar
its from a struct
14:38
i get from a pRawMsg
Avatar
then sizeof should work
Avatar
template <size_t a> void my_func((& myarray)[a]){}
14:39
then u have the array as param
Avatar
@heinrich5991 well im using that size and multiplying it by 2 + 1 to print its hex value
14:39
with std::size it worked
14:39
xd
14:39
im working on smth that will probs not be accepted
14:39
but its fun
14:39
been long i didnt do ddnet
Avatar
yeah std::array is maybe more intuitive generally spoken
Avatar
Avatar
Jupstar ✪
template <size_t a> void my_func((& myarray)[a]){}
is there a type missing?
Avatar
.size()
Avatar
for the array
Avatar
yeah
14:41
comes before (&
14:41
int (& array)[a]
Avatar
Avatar
Ryozuki
been long i didnt do ddnet
what were u workin on again?
14:42
fix skin master register xddd
Avatar
im tryna make a secure channel
Avatar
Avatar
Jupstar ✪
fix skin master register xddd
i doont like that rust code
14:42
im not touching it
Avatar
xDDDD
14:43
bcs of the includes?
Avatar
its a cumulative thing
Avatar
why doesn't rust-analyzer manages them btw?
Avatar
includes, style, old versions, warp
14:43
it makes me itchy
Avatar
feels wrong to me
Avatar
rustfmt manages it
14:43
i think vscode keeps the style used
14:44
14:44
i hecking love c++
Avatar
i'd have thought rustfmt is part of rust-analyzer? at least for the vscode extension?
Avatar
Avatar
Jupstar ✪
i'd have thought rustfmt is part of rust-analyzer? at least for the vscode extension?
no
Avatar
smth formats my code
Avatar
Avatar
Jupstar ✪
smth formats my code
^
Avatar
rust-analyzer is like running cargo c
14:45
if u right click format in vscode
14:45
it calls rustfmt
Avatar
i told vscode to use rust-analyze but i guess its doing it internally
Avatar
yes
14:46
1. it needs auto remove of unused imports 2. there is no include all missing includes
Avatar
rust-analyzer is a LSP not a foormatter
Avatar
any ideas?
Avatar
cargo fix
Avatar
i find the vscode extension too bad it only runs on save
14:46
didnt find an option to always work
14:47
clangd is better default
Avatar
hmm i save 5 times per second so
Avatar
yes but it runs on save and is relatively slow
Avatar
clangd is incredibly fast
14:47
i will give u that
14:47
but i think its a much simpler work xd
Avatar
i'd prefer it makes smaller analyze steps
Avatar
btw if u made rust-analyzer use cargo clippy
14:48
its a bit slower
14:48
cuz more checks
14:48
@Jupstar ✪ wanna have fun in ur code?=
14:48
#![warn( clippy::all, clippy::restriction, clippy::pedantic, clippy::nursery, clippy::cargo, )]
14:48
add this
14:49
on ur lib
14:49
at top
Avatar
🦀 New (cursed) Rust proc macro! This one expands to whatever use statements you need to make the rest of the code compile. 🪄 😄
Likes
1251
Retweets
180
Avatar
oh u found her
14:49
the wizard xd
Avatar
yeah its really funny
Avatar
How it works? Simple: It reads the compiler errors that happen in the future, parses the suggestions for missing imports, then travels back in time to include those in its expansion before the errors even happened. ⏪ ✨
>
(Without any unsafe code at all!)
14:50
epic
14:51
2023-02-03 15:51:14 I crypto: received client '0' public key '2500bbdb2033f8352aa56fd024746148a54b620a30a578cc6fdfedf355194900' 2023-02-03 15:51:14 I crypto: established a secure channel with client=0
14:51
good shit
14:51
30 mins to find i was using pMsg instead of Msg somewhere
Avatar
i'd really love to know which of my rust deps use a c compiler
Avatar
Avatar
Jupstar ✪
i'd really love to know which of my rust deps use a c compiler
they will have a build.rs
Avatar
yeah, heinrich said, replace gcc with a dummy
14:55
probs the easiest xD
Avatar
@Jupstar ✪ btw do u knoow how to forward declare a define?
14:56
or if its possible
Avatar
a define as like c macro?
Avatar
i want to "re export" a define from a include from a library, but not expose the include
14:57
yeah im talking about c++
Avatar
i mean like #define
14:57
since i didnt know i just defined it too the value i know from the lib
Avatar
i mean u can always #undef any define
Avatar
and use static_assert oon the cpp file xd
14:58
but it kind of didnt work
14:58
when i tried
14:58
the value is not updated
14:58
i think cuz cpp files are last or smth
14:59
#define CRYPTO_SESSION_BYTES crypto_kx_SESSIONKEYBYTES i want to do this define in a header, but not include the whole library
14:59
xd
Avatar
Avatar
Ryozuki
#define CRYPTO_SESSION_BYTES crypto_kx_SESSIONKEYBYTES i want to do this define in a header, but not include the whole library
then just do it
15:11
defines are not source code
Avatar
dooing that will include the library header
15:12
into my header
15:12
which i avoid xd
Avatar
why
Avatar
so that all library functionality is contained within that cpp file
Avatar
you can just copy that line into your header file
Avatar
i did copy the value
15:12
and then added a static_assert on the cpp file
15:12
to maake sure its the saame
15:12
but feels haacky
15:12
check the link i sent xd
Avatar
which commit
15:13
the define
15:13
the assert
Avatar
ah i see
15:16
i mean if the value never changes i guess this is good enough
15:17
except including the header any other hack might be more messy
Avatar
now i need to find a nice way to wrap a msg into another that encrypts it
15:18
or smth like that
15:21
time to check python xd
Avatar
"do you want to install the configuration file from the package maintainers" grub config sweating hard xDD
15:22
but i pressed yes. lets see what breaks
15:25
what u dooin
Avatar
just did a apt upgrade
15:25
but i dont remember wtf i changed in the grub config
Avatar
ok i need too do it decoupled
15:29
and u can even do in place encryption and decryption
15:29
this might be possible
15:29
hacker time
Avatar
Avatar
Jupstar ✪
but i dont remember wtf i changed in the grub config
Isn't there a way to diff configs in whatever distro you use?
Avatar
Avatar
Learath2
Isn't there a way to diff configs in whatever distro you use?
yes but i was too lazy, now its too late xD
16:57
too much effort
Avatar
Avatar
Jupstar ✪
"do you want to install the configuration file from the package maintainers" grub config sweating hard xDD
u can diff normally before that
Avatar
my head is spinning from looking at packers and unpackers
16:58
and the sixup code mixed there
Avatar
fix it by removing sixup
16:59
improvement feature
Avatar
i need to mutate the data of packets marked for encryption by adding a nonce, and then the encryption, which changes the size by adding a MAC at the start
16:59
and then too decrypt the same
17:00
i wonder if this would ever work xd
17:01
im 2 lazy too finish this
17:01
back to playing ff
Avatar
@Ryozuki cors still doesnt work 🙃
17:19
how do u do the calls
Avatar
this time its ur fault
17:21
curl woorks
17:21
u should learn coors
17:22
` < access-control-allow-origin: * < access-control-allow-headers: Authorization < access-control-expose-headers: Link < cache-control: max-age=31536000, public
17:22
curl returns this
17:22
@MilkeeyCat
17:22
are u using fetch()
17:22
oor another library
Avatar
fetch
Avatar
add mode: 'cors', // no-cors, *cors, same-origin
17:22
to ur fetch
17:23
my keyboard is rly on its end
17:23
it repeats so many keys
17:23
@Learath2 @Jupstar ✪ any good mechanical keyboard u know?
17:23
i dont mind up to 200€
Avatar
it responds with 200 but gives this
Avatar
send me the url of the request
17:25
soo i can test
Avatar
it works with curl
Avatar
Avatar
Ryozuki
@Learath2 @Jupstar ✪ any good mechanical keyboard u know?
depends for gaming: Corsair K70 with cherry mx speed best keyboard i used so far for general purose my logitec was better tho: it was more silent and less often missclicks the mx speed switches are insanely responsive, even at light touching
Avatar
i game and program
17:27
xd
17:27
ill check the corsair
17:28
@Jupstar ✪ holy
17:28
thats one expensive keyboard
Avatar
Avatar
Ryozuki
thats one expensive keyboard
160€
Avatar
i bought mine (without RGB) for 130€ i think
Avatar
Corsair K70 RGB MK. 2 Low Profile Rapidfire Mechanische Gaming Tastatur (Cherry MX Speed: Schnell und Hochpräzise, Dynamischer RGB LED Hintergrundbeleuchtung, QWERTZ DE Layout) schwarz. HID Keyboard Report Rate: 1000Hz.
17:30
buy from germany xd
Avatar
nonono
17:31
i dont want a german keyboard
Avatar
xdd
Avatar
El teclado Corsair K95RGB platinum presenta interruptores mecánicos Cherry Mx Speed incorporados en una estructura de aluminio ligero. El almacenamiento de 8 MB con reproducción de iluminación y macros de hardware permite un acceso de perfil independiente del software externo. Utilice el sistema ...
17:32
what about this
17:32
mx speed
Avatar
yeah maybe its the newer generation i dunno
17:32
it supports usb and bluetooth
17:32
perfect cuz my mac doesnt have usbs
Avatar
xDD
17:35
https://www.amazon.de/gp/product/B01E5LSCS6/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1 this was the one i bought, for 116€ according to my buying history
Corsair K70 Rapidfire Red LED Mechanische Gaming Tastatur (Cherry MX Speed: Schnell und Hochpräzise, Rote LED Hintergrundbeleuchtung, QWERTZY DE Layout) schwarz
Avatar
but i guess this would be even better since its newer? 😄
17:35
it looks pretty good to me, not cheap
17:35
logitech is good but always feels like the cheapest crap
17:36
xd
Avatar
if you have * in access-control-allow-origin it means it will respond any origin
17:37
right?
Avatar
should
Avatar
@MilkeeyCat ah maybe its cuz ur localhost
17:39
sometimes its weird and localhost is not accepted
Avatar
fair enough
17:39
Chrome does not support localhost for CORS requests (a bug opened in 2010, marked WontFix in 2014).
17:39
@MilkeeyCat did u try with firefox
17:40
or use this
17:40
when developing
17:40
when u deploy it to a domain it should work^tm
Avatar
but it should work with any other origins
17:41
riight?
Avatar
when u use fetch i think the browser ultimately sets the oorigin
17:41
but idk
Avatar
just open any website
17:42
open dev tools and paste this fetch("https://ddstats.org/ddnet-693575f.json?sql=SELECT+*%2C+SUM%28Points%29+FROM%0D%0A%28SELECT+race.Timestamp%2C+maps.Points+FROM+race+INNER+JOIN+maps+ON+maps.Map+%3D+race.Map+WHERE+race.Name+%3D+%22Lumpy+%E2%97%90%CF%89%E2%97%91%22+GROUP+BY+race.Map%29%0D%0AGROUP+BY+strftime%28%22%25Y%22%2C+Timestamp%29")
Avatar
for firefox there is also an extension to force allow it
Avatar
cors unblocker
Avatar
Avatar
Ryozuki
@Learath2 @Jupstar ✪ any good mechanical keyboard u know?
I’ve been very happy with my leopold fc660m
17:59
If it wasn’t insanely expensive I know a keyboard you’d love. UHK 60 v2
18:00
Completely open source, including the hardware, you can even modify the firmware as you wish
Avatar
It didnt work in browser because server didnt send Access-Control-Allow-Origin header :0 im stoopid
Avatar
Avatar
Learath2
Completely open source, including the hardware, you can even modify the firmware as you wish
omg
18:07
maybe my next
Avatar
Avatar
MilkeeyCat
It didnt work in browser because server didnt send Access-Control-Allow-Origin header :0 im stoopid
But if so, it wont work on website even if i host it thonk
Avatar
the fuck
Avatar
straightop BOT 2023-02-03 20:14:53Z
@Ryozuki: hey uhm could you unban me on the official ddnet discord, meek banned me cause he had a arguement with me in the dms
Avatar
not even I managed to get banned yet and people want me to shut up (edited)
Avatar
straightsux BOT 2023-02-03 20:19:00Z
thats your own problem (@default)
not even I managed to get banned yetz
20:19
i got banned for nothing
20:19
am I talking to the IRC guys using this channel?
Avatar
im not admin in discord
Avatar
straightsux BOT 2023-02-03 20:27:36Z
you are a dev tho (@Ryozuki)
im not admin in discord
Avatar
doesn't change anything. he got no permission on the discord. all he can do is say a good word about you.
Avatar
straightsux BOT 2023-02-03 20:28:58Z
oh bruh (@default)
doesn&#x27;t change anything. he got no permission on the discord. all he can do is say a good word about you.
Avatar
How would I make it so that a player(specifc) cannot be hooked by another?
20:30
I don't know how to do it in Character core(it can be made in character entity?)
Avatar
check for it in the place where hooking another character happens, I guess
22:56
probably somewhere in gamecore.cpp
Exported 314 message(s)