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-12 00:00:00Z and 2022-07-13 00:00:00Z
Avatar
update to 16.2.2 failed: and ddnet gives this : "Can't continue to execute code, because object libcurl.dll not found. Reinstalling the program could resolve it"
01:04
took the dll from https://ddnet.tw/downloads/DDNet-16.2.2-win64.zip and works without issue so update for some reason couldn't download that dll
Avatar
can there be a ddnet.tw/releases/novice page for example
04:21
to see all the novice releases sorted by time of release
Avatar
Avatar
louis
can there be a ddnet.tw/releases/novice page for example
Avatar
that only goes down a handful of recent releases i believe
Avatar
oh that makes sense
Avatar
can someone clarify 0.7 and 0.6 please
04:40
what version are we on now
04:41
i mean the first instinct would be to say 0.7>0.6 but i heard that its the other way around and that 0.7 is referred to teeworlds 0.7 (edited)
Avatar
0.7 is the Teeworlds client 0.6 is the DDNet client
04:48
at least i think
06:51
hi there crisis my old friend
Avatar
@Ryozuki "0.7 is the Teeworlds client 0.6 is the DDNet client" is that correct?
Avatar
ddnet uses the 0.6 protocol yeah
Avatar
protocol?
Avatar
the way client and server comunicate
06:56
when tw updated to 0.7 they decided to break it so its not compatible
Avatar
sixup too
Avatar
and ddnet stayed
06:56
at 0.6
Avatar
ah client
Avatar
is that like a general protocol or is it only in the scope of teeworlds/ddnet ?
Avatar
@bluesky tw, they released 0.7 with the main idea to fix some vulnerabilities about the netcode
06:57
that's how they broke 0.6 compat
Avatar
okay so if i got that right, the client versionnumber isnt the same as the 0.6 or 0.7 protocols (edited)
06:58
two different things but still used together?
Avatar
wdym "still used together"
Avatar
i mean like they both are version numbers but for 2 different things
06:59
16.2.1 uses 0.6
06:59
?
Avatar
DDNet in general uses 0.6, only server side supports both versions to allow 0.7 players to join DDNet servers
06:59
Only teeworlds switched on 0.7, not DDNet
Avatar
Avatar
ReiTW
@bluesky tw, they released 0.7 with the main idea to fix some vulnerabilities about the netcode
okay okay
Avatar
HUBBLE vs JWST: Here's the difference. Welcome to a new era of astronomy.
Likes
120839
Retweets
23578
Avatar
Avatar
ReiTW
DDNet in general uses 0.6, only server side supports both versions to allow 0.7 players to join DDNet servers
because if someone uses tw, they will probably use 0.7.5
07:01
okay now i got that whole seventosix thing too
07:01
thanks ^__^
Avatar
Avatar
bluesky
because if someone uses tw, they will probably use 0.7.5
yes but they can still play on DDNet thanks to sixup, until DDNet decides to stop that compat
Avatar
Avatar
ReiTW
yes but they can still play on DDNet thanks to sixup, until DDNet decides to stop that compat
Awesome that this support is implemented, yet its still a pain to play ddrace with the tw client*xddd (edited)
Avatar
that's why, use ddnet
Avatar
@heinrich5991 https://docs.rs/libbpf-rs/latest/libbpf_rs/struct.Map.html#method.update this is an example of function I have to use
Represents a created map.
07:16
the value of a map can be for example in C: struct stats_p { unsigned long pass; unsigned long drop; }; and I kinda need to know how to pass that in those functions
07:17
ne is OS dependant right? if yours is big endian or little
Avatar
it's CPU dependent
07:23
so then you can just cast your type to &[u8]
07:23
your C struct is also CPU dependent
Avatar
Avatar
heinrich5991
so then you can just cast your type to &[u8]
lol is thta even psosible?
Avatar
only using unsafe, but that's the way to go here
Avatar
like let stats = Stats::default(); let stats_slice = stats as &[u8]; ?
07:26
cuz for me casting is that
07:27
nvm I won't even wait for ur answer i'll just test
Avatar
no, not like that
07:31
use std::slice; use std::mem; unsafe fn as_bytes<T>(t: &T) -> &[u8] { slice::from_raw_parts(t as *const T as *const u8, mem::size_of_val(&t)) }
07:31
typed from memory, might have errors
07:34
@ReiTW does that make sense?
Avatar
trying to understand, this is black magic for now
07:35
maybe this documentation helps?
Avatar
ah well the 1st line is very clear yea
Avatar
the function only has one line 😅
Avatar
I meant that Forms a slice from a pointer and a length.
Avatar
ah
Avatar
size_of_val returns Returns the size of the pointed-to value in bytes.
07:38
but from_raw_parts says this
07:38
The len argument is the number of elements, not the number of bytes.
Avatar
yes that's what i'm looking at
07:38
I was wondering why
Avatar
but the elements are bytes ^^
07:39
so it's the number of elements = bytes, so in this particular case it's the number of bytes
Avatar
"data must point to len consecutive properly initialized values of type T."
Avatar
(the T of slice::from_raw_parts is u8) (edited)
07:41
(you can see that by observing that we pass a *const u8 and use the result as &[u8])
07:41
@ReiTW ask more questions 😛
Avatar
I will surely, just trying to use my brain
Avatar
i mean, this is just casting like you would do in C but you gotta preserve the length info
07:42
since slices are a pointer and length
07:42
iirc
Avatar
yes
07:43
but I'd argue "casting like in C" is appropriate here, because you talk to other programs running on your CPU(?)
Avatar
just figured out why you used size_of_val
07:46
This is usually the same as size_of::<T>(). However, when T has no statically-known size, e.g., a slice [T] or a trait object, then size_of_val can be used to get the dynamically-known size.
07:46
otherwise u would have needed T: Sized right?
Avatar
T: Sized is implied, if you don't want that, you need T: ?Sized, I think
07:48
ah look
07:48
and I introduced a bug there
07:48
I'll use mem::size_of instead
Avatar
whats the bug?
Avatar
find it 😛
07:49
use std::mem; use std::slice; unsafe fn as_bytes<T>(t: &T) -> &[u8] { slice::from_raw_parts(t as *const T as *const u8, mem::size_of::<T>()) }
07:49
this is the fixed version
Avatar
does it have to do with mem::size_of_val(&t)
07:49
since t is already &T?
07:49
probs not
Avatar
yes, that's the problem
07:50
yay im not that bad xD
Avatar
I took the size of &T, not T
Avatar
do u know if miri catches that?
07:53
yeah it was a bug
Avatar
you must use #[repr(C)] on structs you use this on
Avatar
@heinrich5991 how do you call it then, tried like struct Stats { pass: u64, drop: u64, } use std::slice; use std::mem; unsafe fn as_bytes<T>(t: &T) -> &[u8] { slice::from_raw_parts(t as *const T as *const u8, mem::size_of::<T>()) } fn main() { let stats = Stats { pass: 5, drop: 5 }; let stats_slice: &[u8] = unsafe { as_bytes::<Stats>(&stats) }; for element in stats_slice.iter() { println!("{element}"); } } but doesn't seem to print anything
Avatar
this prints 5 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 for me @ReiTW
Avatar
how did you execute it?
Avatar
ok nvm it works, my console is just buggy, thanks windows terminal
Avatar
(you should add #[repr(C)] to your Stats struct)
08:14
so that its layout is defined
Avatar
ok ok, well now i'll read everything again & try to understand each thing
Avatar
as_bytes(&stats)
08:15
works too iirc
Avatar
yes, it does
Avatar
rust has strong type inference
Avatar
that would also work in C++, even
Avatar
let stats_slice: &[u8] = unsafe { as_bytes::<Stats>(&stats) }; let stats_slice = unsafe { as_bytes(&stats) };
08:16
u can also remove the type from stats_slice :p
08:17
@ReiTW r u on vscode with rust-analyzer?
08:17
btw, if you run cargo clippy, it sometimes gives nice suggestions
08:17
its like a cargo check with more checks
Avatar
(these type annotations also don't hurt anyone, obviously)
08:18
or let stats_slice = unsafe { as_bytes(&stats) };
Avatar
look ma, one line
08:21
can u use drop inside the struct?
Avatar
Avatar
Ryozuki
@ReiTW r u on vscode with rust-analyzer?
rn using vim, but mainly cargo & rust-analyzer
Avatar
thats actually a keyword
08:21
oh yeah
Avatar
but I feel like autocompletion sux
Avatar
vim or neovim?
Avatar
vim with no modules
08:22
was just for a fast test
Avatar
no modules?
08:22
does vim has lsp support
Avatar
yea standard vim with nothing configured (edited)
Avatar
how do u get autocompletion then
Avatar
I don't, I used vim just to test heinrich's code fast
Avatar
but on vscode I feel like autocompletion is buggy or idk
Avatar
don't tell ryozuki how I code 😅
Avatar
how? xD
Avatar
Avatar
heinrich5991
don't tell ryozuki how I code 😅
without autocompletion?
Avatar
standard vim with nothing configured 😄
Avatar
lmao a legend
08:24
here is my probs not updated neovim config
08:24
neovim config. GitHub Gist: instantly share code, notes, and snippets.
Avatar
Avatar
ReiTW
but on vscode I feel like autocompletion is buggy or idk
it works rly well for me
Avatar
for large unknown rust codebases, I usually use intellij with rust plugin
✅ 1
Avatar
are u sure u use rust-analyzer and not RLS
08:25
you gotta wait till it indexes ur project btw
Avatar
Avatar
Ryozuki
it works rly well for me
well too but when it comes to autocompletion for modules idk, sometimes I really can't find functions with autocompletion, have to manually type them
08:26
yes I use the right one, the other one is deprecated
Avatar
hmm idk it kinda works for me
08:27
what it doesnt auto import are macros for me
Avatar
Avatar
heinrich5991
standard vim with nothing configured 😄
i have moved closer to that too, since all plugins failed occasionally and figuring out why was too annoying.
Avatar
When building rust-mozjs with debug symbols enabled, the underlying C++ library links against the debug Windows runtime (msvcrtd.lib) rather than the regular one (msvcrt.lib). Unfortunately, rustc ...
Avatar
long time ago when advent of code was there i started learning nasm
10:00
but then forgot
10:00
so now ill take it again
10:00
i found this new resource tho https://cs.lmu.edu/~ray/notes/nasmtutorial/
10:00
looks p nice
Avatar
wow windows defender really hates 16.2.2
Avatar
Avatar
heinrich5991
standard vim with nothing configured 😄
nice i will try that out. i like software without configuring. dwm works for me without configuring as well. zsh with few. maybe bash with 0. its also because i set up my pc regularly and dont have a backup / dotfile backup system
Avatar
im using vim with colemak so i use these keys for movement, no colemak plugin or nnoremap 😅
11:21
Avatar
argh
11:33
don't do that I guess 😄
Avatar
lol, those commits message
Avatar
can I somehow link libstdc++ statically into my static library? do you know, @Learath2?
Avatar
No idea, sorry
Avatar
The James Webb Telescope’s Profound Data Challenges
>
3000x farther from Earth than Hubble—with a 25x greater download deluge
13:49
Any scientific data the JWST collects during its lifetime will need to be stored on board, because the spacecraft doesn’t maintain round-the-clock contact with Earth. The on-board storage is enough to collect data for about 24 hours before it runs out of room.
13:49
PepeA
Avatar
Kinda impressive lmao
15:11
But #off-topic too i guesspepeH
Avatar
Avatar
Ryozuki
also its a pic of the universe 16 billion years ago
given the universe is 13.8 billions years old, that's impossible. Maybe you meant 16 billion light years away?
Avatar
Ah well
16:08
Idk how old
16:08
But apparently rly old xd
Avatar
16 billion light years still impossible
Avatar
it is possible
Avatar
the age is debated between 13.2 and 13.8 i believe
16:09
billion
16:09
Almost the beggining
Avatar
how is 16bil possible if universe is less than 16 bil years old
Avatar
Yes i said it wrongly
Avatar
The universe (Latin: universus) is all of space and time[a] and their contents,[10] including planets, stars, galaxies, and all other forms of matter and energy. The Big Bang theory is the prevailing cosmological description of the development of the universe. According to this theory, space and time emerged together 13.787±0.020 billion years ago
Avatar
i meant to chairn
Avatar
it expands faster than light speed
Avatar
He meant distance
16:10
Not time
16:10
Light years away-
Avatar
and the universe has been expanding ever since. While the spatial size of the entire universe is unknown,[3] it is possible to measure the size of the observable universe, which is approximately 93 billion light-years in diameter at the present day.
Avatar
is it alr expanding faster than light
16:10
i thought it didnt accelerate to that yet
Avatar
The universe can expand faster than speed of light iirc
16:11
At some point some galaxies will be unreachable
Avatar
Avatar
louis
i thought it didnt accelerate to that yet
it's not acceleration, more like space dilatation
16:11
which can be faster than light speed
Avatar
ye the stretching or whatnot
16:11
but i mean that value itself accelerates
16:11
or increases sry
16:12
watch this vid
16:12
its rly interesting
16:12
troll
Avatar
U should
16:12
Its awesome
Avatar
that ends with heat death right
16:12
i watched some of it
Avatar
didnt have time to do whole tho
16:12
oh
Avatar
This goes way farther
16:12
To the future
16:12
will probably get theoretical then
Avatar
Watch it
Avatar
interesting
Avatar
Also its movie like
16:13
Melodysheep is a top tier filmmakeer (edited)
Avatar
im on long bus ride so i will watch
Avatar
Watch it with sound
16:16
Sound is a must
Avatar
who watches video without sound ?
16:16
what kind of barbaric civilisation are you from 😄 ?
Avatar
I watch reddit vids without sound
16:19
Xd
Avatar
but how do you understand what's going on? You read lips? How about off voice ?
16:23
ok, i understand why no sound is important on that video
Avatar
Reddit is just memes with text
16:23
Idk
Avatar
shitty voice (probably some scientist with out of context stuff), shitty epic music
Avatar
on your future timelapse
Avatar
Ur opinion sucks xd
Avatar
i bet it doesn't even present all the possibilities
Avatar
the voice is fine imo but idk why the narrator keeps changing
Avatar
He actually gets actual scientists and divulgators to talk
Avatar
But its more like a visual movie
Avatar
is there any way to add arguments for f1 exec to be used in the script?
Avatar
no, you can only exec filename
Avatar
cool video, sad that we will never find out if many of our theories about the universe were true or not
Avatar
how much of that stuff is just made up? xd
17:29
It's not possible to predict asteroid impacts far into the future
Avatar
its not possible to predict the weather for 2 weeks, but we can still predict global tendencies. Same here (edited)
Avatar

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 (especially base/) or added coverage to integration test
  • [ ] 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-addres...
Avatar
those aren't predictions, just hypothesis
Avatar
[quakenet] Michle11 BOT 2022-07-12 17:50:55Z
Hey guys
17:51
Do you have girlfriends?
Avatar
ui many probs already in the age to have wifes^^
Avatar
b642aad Update ddnet-libs (no changes) - def-
Avatar
@deen I think you forgot that I reported the shift + left click in map editor issue long ago
19:23
I especially pinged you, so I can get a reaction out of you
19:23
😄
Avatar
sorry, didn't catch that
Avatar
c++ try { ReadDiscord(); // may throw Ping } catch(CPing& Ping) { HandlePing(Ping); } (edited)
Avatar
ew exceptions in c++
21:32
just do it like rust (edited)
21:32
return a Result<T>
21:33
A simple Rust like Result type for Python 3. Fully type annotated. - GitHub - rustedpy/result: A simple Rust like Result type for Python 3. Fully type annotated.
21:33
funny
Avatar
sorry, i don't speak Rust
Avatar
ryo when will we get a ddnet rust client
Avatar
never, ddnet rely on too many undefined behaviors 😄 (edited)
Avatar
ddnet code is rustproof poggers
troll 2
Avatar
Just a minor thing: Given by how the Assets (HUD) look, I'd assume the freeze bar is copied horizontally (at least the edges). Would it be possible to change the loading bar rendering in a way, that an asset of the full bar is being rendered, so asymmetrical designs would be possible?
Avatar
wasnt this already requested 3 days ago
Exported 288 message(s)