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-07-18 00:00:00Z and 2023-07-19 00:00:00Z
Avatar
@heinrich5991 can u enable cors on master?
09:57
im making my own master server list frontend
09:58
CORS error: No 'Access-Control-Allow-Origin' header is present on the requested resource
Avatar
sure
Avatar
thanks nekospin
Avatar
hmmm
09:59
I think that header is already set?
10:02
i dont see it i think
10:03
is this the correct master url?
10:03
i got it from the client
10:03
ohh
10:03
has it set
10:03
but 2 not xD
10:03
ill use 1
Avatar
I'll check master2 then ^^
Avatar
It's time for the daily rust question you'll find completely unreasonable to even ask: struct Context { handler: Handler, } struct Handler { context: Arc<Context> } impl Handler { fn new(context: Arc<Context>) -> Self { Handler { context } } } let context = Context { handler: Handler::new(..); }; How would you handle something like this?
10:33
In C/C++ I'd leave handler just uninitialized, and initialize it in the next line but that's obviously not a possibility in Rust
Avatar
first ask the question
10:33
do you really need this circular dependency
Avatar
Use c++?
Avatar
Avatar
Teero
Use c++?
not an option its unsafe
Avatar
Avatar
Teero
Use c++?
I'm trying to get myself to use newfangled technology
Avatar
Avatar
Ryozuki
do you really need this circular dependency
I can avoid it but then I need something much weirder
Avatar
Avatar
Learath2
It's time for the daily rust question you'll find completely unreasonable to even ask: struct Context { handler: Handler, } struct Handler { context: Arc<Context> } impl Handler { fn new(context: Arc<Context>) -> Self { Handler { context } } } let context = Context { handler: Handler::new(..); }; How would you handle something like this?
yesterday i told u how to partial init a struct
10:34
altho i recommend thinking another way of doing this
10:35
just pass ctx to the methods
Avatar
Avatar
Learath2
I can avoid it but then I need something much weirder
what does handler do?
10:36
one thing about rust, is u should try to code rust like
Avatar
It's a container mostly, it has a Vec<Box<dyn Module + Send + Sync>> in it, it'll soon also have utility functions modules can use on it
Avatar
do you really need to store context
Avatar
I guess I could have the modules pass their own copy of the context to the utility functions
Avatar
cant u simply pass it to the methods
10:37
when u call them
Avatar
Avatar
Learath2
It's a container mostly, it has a Vec<Box<dyn Module + Send + Sync>> in it, it'll soon also have utility functions modules can use on it
u dont need box here
10:37
vec is already heap
10:37
iirc
10:37
try it
Avatar
Can it store a trait object without a box I wonder
10:38
iirc
Avatar
Avatar
Learath2
It's time for the daily rust question you'll find completely unreasonable to even ask: struct Context { handler: Handler, } struct Handler { context: Arc<Context> } impl Handler { fn new(context: Arc<Context>) -> Self { Handler { context } } } let context = Context { handler: Handler::new(..); }; How would you handle something like this?
this is a memleak right there. you could replace it with a weak pointer maybe
Avatar
Weak is a version of Arc that holds a non-owning reference to the managed allocation. The allocation is accessed by calling upgrade on the Weak pointer, which returns an Option>.
Avatar
Avatar
Learath2
Can it store a trait object without a box I wonder
I don't think Vec can store a trait object without box
10:38
it's of unknown size
Avatar
and Vec needs fixed size
10:38
u can have a struct like this
Avatar
Avatar
heinrich5991
I don't think Vec can store a trait object without box
Yeah compiler confirms this
Avatar
struct A { vec: Vec<A> }
10:39
it doesnt need box
Avatar
A is fixed size
10:39
(3 pointers large)
Avatar
However it can store a reference to a trait object if I add some lifetimes
Avatar
yeah ref is fixed size
Avatar
Avatar
Learath2
It's time for the daily rust question you'll find completely unreasonable to even ask: struct Context { handler: Handler, } struct Handler { context: Arc<Context> } impl Handler { fn new(context: Arc<Context>) -> Self { Handler { context } } } let context = Context { handler: Handler::new(..); }; How would you handle something like this?
this wouldn't work in C++ if you want to be able to tear it down
Avatar
e.g. Vec<&(dyn Module + Send + Sync)>
Avatar
Avatar
heinrich5991
this wouldn't work in C++ if you want to be able to tear it down
Wym tear it down?
Avatar
the destructor would never be calld
10:40
because the object always holds a reference to itself
Avatar
You are thinking newfangled smart pointers
Avatar
I was thinking std::shared_ptr
Avatar
Yeah, I was thinking just struct Handler * and struct Context *
Avatar
Avatar
Learath2
You are thinking newfangled smart pointers
newflangled sounds so bad xdd
Avatar
I don't mind managing my own memory (yeah I know as an imperfect human I'm guaranteed to leak memory)
Avatar
I see. this can't be representted using a Arc because it's a memleak
Avatar
Avatar
heinrich5991
I see. this can't be representted using a Arc because it's a memleak
not with weak?
10:42
Weak is a version of Arc that holds a non-owning reference to the managed allocation. The allocation is accessed by calling upgrade on the Weak pointer, which returns an Option>.
Avatar
yes, with weak, it might work
Avatar
Avatar
heinrich5991
I see. this can't be representted using a Arc because it's a memleak
Hm, I basically have this situation with an extra level of indirection, is this something the compiler is supposed to catch?
10:43
memleaks are safe
10:43
in rust
Avatar
Avatar
Learath2
Hm, I basically have this situation with an extra level of indirection, is this something the compiler is supposed to catch?
the compiler catches it by you not being able to initialize it ^^
10:43
(without extra steps)
Avatar
(i need to read kek)
Avatar
Avatar
heinrich5991
the compiler catches it by you not being able to initialize it ^^
I mean I can have an Option there and it'll create the same dependency
10:44
I'll just need some unwraps, but it'll have the memleak just fine
Avatar
yes. with Option alone, it won't work, but by adding Mutex you could make it work
10:45
no, the rust compiler won't catch that
Avatar
Avatar
heinrich5991
yes. with Option alone, it won't work, but by adding Mutex you could make it work
Why not?
Avatar
Avatar
Learath2
Why not?
because you couldn't modify the Option<> after the creation of the Arc anymore
Avatar
Ah yes, true not mutable
10:47
Yeah, I'll just not have that extra copy of context for convenience I guess, modules can use their own copy of it
Avatar
what are you trying to accomplish in a bigger picture?
10:49
what are Context and Handler?
Avatar
Avatar
heinrich5991
what are you trying to accomplish in a bigger picture?
Still just messing around with ideas on how to structure my discord bot
Avatar
I don't know a good answer to that
10:50
I don't know how to structure something like teeworlds there
10:50
I guess I should read some larger projects to find out
Avatar
Set the clients view to a given teleporter or switch number TRIGGER WARNING The use of the keyword goto may offend some developers

Wat it do

Allows users to find teleporters and switchers by the index. If one wonders how to open a door or where a teleporter leads the user can lookup the id using entities and then run the console command goto_switch [id]. Which will set the clients view port to the first occurrence it finds of that switcher in the map. If the command ...
Avatar
Avatar
heinrich5991
what are Context and Handler?
Context is a set of global stuff like the SqlitePool, the discord api client, a http client, bots current state, it's current user_id Handler is a handler to initialize and dispatch events to Modules Modules will call back into the Handler for registering what should be dispatched to them
Avatar
dont store context in handler
10:52
its super simple
Avatar
Avatar
Ryozuki
dont store context in handler
Yes, this is what I have concluded aswell a couple lines ago, I was just elaborating because @heinrich5991 asked more specifically
Avatar
on the handler dispatch function just pass context by ref or smth
10:53
make the module trait accept ctx as arg
Avatar
(Funny though that the easiest way to do this is to go back to passing the context around for a subset of functions)
Avatar
well because saving pointers is always harder than just using them on the spot isnt it (edited)
Avatar
Avatar
Ryozuki
on the handler dispatch function just pass context by ref or smth
Modules get a copy of the context when they get initialized and they keep it, no problem on that part
Avatar
why u want handler to store ctx then
10:54
doesnt sound like handler should need it
Avatar
Avatar
Learath2
Modules get a copy of the context when they get initialized and they keep it, no problem on that part
no memleak there?
Avatar
Avatar
Ryozuki
doesnt sound like handler should need it
The issue was Modules using utility functions in Handler, it needs a copy of the context, I'll just think of something else
Avatar
@Learath2 traits can have implemented functions btw
10:56
automatically*
10:56
just define the method with the body
Avatar
Avatar
heinrich5991
no memleak there?
Yes memleak I guess, hadn't really thought about it, but the Context and Modules live for the entire duration of the program so it's not too too bad 😄
10:56
I guess I could make the copies I keep in the modules weak fixing that?
Avatar
Add CMapBasedEnvelopePointAccess::SetPointsRange function so the start point and number of points that should be considered when using this envelope point storage can be configured. In the editor, this range always includes all points, as each envelope directly stores only its own points, so animations were rendered correctly there. However, all points are stored in one array when loading them from the map file (i.e. when rendering the map ingame), so the start point and number of points sp...
Avatar
ChillerDragon BOT 2023-07-18 11:02:53Z
wat u hackin on lerato?
Avatar
I'm just messing around with Rust, trying to learn the Rust way of doing things
Avatar
ChillerDragon BOT 2023-07-18 11:03:29Z
rust for the sake of rust?
Avatar
ChillerDragon BOT 2023-07-18 11:03:33Z
no actual outcome?
11:03
a
Avatar
Well the outcome will be a new discord bot that can finally replace the 3 bots we have 😄
Avatar
ChillerDragon BOT 2023-07-18 11:03:55Z
how many ddnet discord bots are there?
11:03
:D
11:04
i see
Avatar
If I like what I make that is
Avatar
ChillerDragon BOT 2023-07-18 11:04:13Z
11:04
reminds me of this
Avatar
@heinrich5991 how does one usually use Weak? Am I supposed to be upgrading it before use so I can make sure it doesn't get dropped while I'm using it?
Avatar
ChillerDragon BOT 2023-07-18 11:06:13Z
why ever your discord bot needs a lexer xd
Avatar
It was originally going to have chat commands, then I remembered discord now has slash commands, I'll see if those are good enough to replace the chat commands
Avatar
Avatar
Learath2
@heinrich5991 how does one usually use Weak? Am I supposed to be upgrading it before use so I can make sure it doesn't get dropped while I'm using it?
ye
11:07
upgrade returns an option its none if context was dropped
11:07
simply dont save the returned arc
11:07
use it there and thats it
👍 1
Avatar
Avatar
Learath2
@heinrich5991 how does one usually use Weak? Am I supposed to be upgrading it before use so I can make sure it doesn't get dropped while I'm using it?
yes, can't access the weak without upgrading it anyway
11:13
oh, @Ryozuki has already answered
11:13
I'm always reading top-to-bottom ^^
Avatar
Avatar
Learath2
It was originally going to have chat commands, then I remembered discord now has slash commands, I'll see if those are good enough to replace the chat commands
they good
11:21
even have slots for arguments with types and autofill and enums
Avatar
6ee3928 Fix ingame animations not using correct envelope points anymore - Robyt3 ff9bda9 Merge pull request #6888 from Robyt3/Client-Animation-Fix - def-
Avatar
ChillerDragon BOT 2023-07-18 12:19:56Z
lerato sos
12:20
i am being bullied for using goto
12:20
make ddnet goto again
Avatar
ws-client BOT 2023-07-18 12:23:05Z
<Jupstar> trollosdragos
Avatar
RenderPlayer(&m_pClient->m_aClients[ClientID].m_RenderPrev, &m_pClient->m_aClients[ClientID].m_RenderCur, &m_aRenderInfo[ClientID], ClientID);
12:33
guys how it works
12:33
what is render info
12:33
i wanna render my player in a local position in the world
Avatar
ws-client BOT 2023-07-18 12:34:51Z
<Jupstar> after clicking on render infos and analysing the struct, what do you think is render info?
Avatar
ChillerDragon BOT 2023-07-18 12:40:31Z
dood asking client questions
12:40
... wonder if he is making hax
12:40
axaxaxax
Avatar
ws-client BOT 2023-07-18 12:41:16Z
<Jupstar> i'd be surprised if not xd
12:41
alert
Avatar
ws-client BOT 2023-07-18 12:41:38Z
<Jupstar> ryo's checklist is probably already 70% satisfied
Avatar
Avatar
ws-client
<Jupstar> after clicking on render infos and analysing the struct, what do you think is render info?
is a cock
Avatar
ChillerDragon BOT 2023-07-18 12:42:41Z
ok that good :)
12:42
im trying to do a useless thing
Avatar
ChillerDragon BOT 2023-07-18 12:43:04Z
cocks are not useless
Avatar
hilarious
Avatar
where you could do I forget what and did like a screenshot of your location
12:43
i wanna do that
Avatar
ChillerDragon BOT 2023-07-18 12:43:49Z
?xd
12:43
my useless things
Avatar
ChillerDragon BOT 2023-07-18 12:44:01Z
oh yikes
12:44
im 15
Avatar
u are my man
12:44
m_pClient->m_Players.RenderPlayer(&m_pClient->m_aClients[m_pClient->m_aLocalIDs[0]].m_RenderPrev, &m_pClient->m_aClients[m_pClient->m_aLocalIDs[0]].m_RenderCur, m_pClient->m_aClients[m_pClient->m_aLocalIDs[0]].m_RenderInfo, m_pClient->m_aLocalIDs[0]); i can't ddo that because renderplayer is private, but ghost use that idk how
Avatar
ChillerDragon BOT 2023-07-18 12:44:54Z
make it public
Avatar
this client makes me feel like i don't know how to code
Avatar
Avatar
ChillerDragon
make it public
not rly good
Avatar
ChillerDragon BOT 2023-07-18 12:45:53Z
i know that feeling
12:46
but its not only when working with ddnet client
Avatar
ChillerDragon BOT 2023-07-18 12:49:20Z
sas
12:50
oh sos
12:50
i did
12:50
xd
Avatar
ws-client BOT 2023-07-18 12:50:18Z
<Jupstar> friend class
Avatar
class CPlayers : public CComponent { friend class CGhost; this gay
Avatar
Avatar
ws-client
<Jupstar> friend class
yes, but, from where are u writing?
Avatar
ws-client BOT 2023-07-18 12:51:05Z
<Jupstar> just make it public if u need it lmao
Avatar
no i don't like
12:51
ENCAPSULATION
Avatar
ws-client BOT 2023-07-18 12:52:07Z
<Jupstar> then write a getter that does the same
Avatar
ChillerDragon BOT 2023-07-18 12:54:34Z
jopsti is writing from https://chat.zillyhuhn.com/
Avatar
no prob i did that
Avatar
ChillerDragon BOT 2023-07-18 12:54:42Z
the chattest platform of them all
Avatar
ws-client BOT 2023-07-18 12:54:51Z
<Jupstar> chaddest
Avatar
ChillerDragon BOT 2023-07-18 12:54:57Z
new unicorn about to surpass tiktok marketshare
Avatar
Avatar
ChillerDragon
the chattest platform of them all
why and login with what (edited)
Avatar
ws-client BOT 2023-07-18 12:55:12Z
<Jupstar> name and pw
Avatar
ChillerDragon BOT 2023-07-18 12:55:27Z
your english is quite chaotic if i may say
Avatar
yes but which xd
Avatar
ChillerDragon BOT 2023-07-18 12:55:35Z
its invite only
12:55
high society secret gaming club
Avatar
ws-client BOT 2023-07-18 12:55:45Z
<Jupstar> its only for VIPs
Avatar
Avatar
ChillerDragon
your english is quite chaotic if i may say
im italian, my mind is chaotic
Avatar
Avatar
ws-client
<Jupstar> its only for VIPs
ohh
12:55
oke
Avatar
ws-client BOT 2023-07-18 12:55:58Z
<Jupstar> rich golf club members only
Avatar
ChillerDragon BOT 2023-07-18 12:56:00Z
xd
Avatar
m_pClient->m_Players.RenderPlayer(&m_pClient->m_aClients[m_pClient->m_aLocalIDs[0]].m_RenderPrev, &m_pClient->m_aClients[m_pClient->m_aLocalIDs[0]].m_RenderCur, &m_pClient->m_aClients[m_pClient->m_aLocalIDs[0]].m_RenderInfo, &m_pClient->m_aLocalIDs[0]); where can i found renderinfo of my tee
Avatar
ChillerDragon BOT 2023-07-18 12:58:41Z
12:58
jopsti face reveal
bluekitty 2
12:59
the code you sent is the renderinfo of your tee
Avatar
cannot convert 'CTeeRenderInfo' to 'const CTeeRenderInfo*'
Avatar
remove the & add an & (edited)
Avatar
same error
13:03
No viable conversion from 'CTeeRenderInfo' to 'const CTeeRenderInfo *'clang(typecheck_nonviable_condition) players.h(22, 25): Passing argument to parameter 'pRenderInfo' here
Avatar
the other way around
13:04
exactly. your parameter has to be a const pointer (edited)
13:04
so you make a const CTeeRenderInfo and then pass it in as &myrenderinfo
13:05
or what are you trying to do?
Avatar
yes i edited with that but nothing
13:05
let me try close and open again the project
Avatar
what exactly are you trying to do?
Avatar
const CTeeRenderInfo *pInfo = &m_pClient->m_aClients[m_pClient->m_aLocalIDs[0]].m_RenderInfo; m_pClient->m_Players.RenderPlayer(&m_pClient->m_aClients[m_pClient->m_aLocalIDs[0]].m_RenderPrev, &m_pClient->m_aClients[m_pClient->m_aLocalIDs[0]].m_RenderCur, &pInfo, &m_pClient->m_aLocalIDs[0]);
Avatar
you already have a pointer there so no need to put another & when you call the function
13:07
yes im gay i edited without check
13:07
but u know how edit the position
Avatar
the position is stored in m_RenderPrev and m_RenderCur, the client interpolates between those two so it looks smooth the the eye (edited)
Avatar
@kio [REDACTED] (edited)
13:13
I probably shouldve dm'ed him that 😅
Avatar
ws-client BOT 2023-07-18 13:15:16Z
<Jupstar> really awesome that every person to ever ask a question in this channel is a cheater xD
13:15
<Jupstar> healthy development xD
Avatar
but it seems like a recent development, no?
Avatar
ChillerDragon BOT 2023-07-18 13:16:00Z
woah he really is a known hax dev? i was half trolling
Avatar
ws-client BOT 2023-07-18 13:16:08Z
<Jupstar> i dunno what was the last contributor to ddnet that you helped? xd
Avatar
he was a bot dev?
13:16
smh
Avatar
we're talking about development often here, I think ^^
Avatar
ChillerDragon BOT 2023-07-18 13:17:14Z
we need a #bot-dev channel
Avatar
and all ppl who chat there get banned
13:17
kek
Avatar
ChillerDragon BOT 2023-07-18 13:17:52Z
axaxax
Avatar
honeypot
Avatar
ChillerDragon BOT 2023-07-18 13:18:02Z
lerato add to your new bot
13:18
then we also need a #crypto channel for the spammers hrhrhr
Avatar
Does anyone know what UI()->MouseDeltaY() actually returns? I would expect it to return the change of the y coordinate in whatever unit all other stuff is. So that UI()->MouseDeltaY() / View.y would give the percentage the mouse moved in the View. It seems to work fine for x, but not for y coordinates
Avatar
Jupstar: see, a non-bot-dev
Avatar
Avatar
heinrich5991
Jupstar: see, a non-bot-dev
I could be working on my bot right now think_bot
Avatar
ws-client BOT 2023-07-18 13:38:27Z
<Jupstar> @heinrich5991 paid actor xd
Avatar
ChillerDragon BOT 2023-07-18 13:43:26Z
xd
Avatar
Avatar
marmare_314
Does anyone know what UI()->MouseDeltaY() actually returns? I would expect it to return the change of the y coordinate in whatever unit all other stuff is. So that UI()->MouseDeltaY() / View.y would give the percentage the mouse moved in the View. It seems to work fine for x, but not for y coordinates
Y might be flipped
13:50
How far off is it?
Avatar
marmare's bot client where the ui is actually usable and theres no actual bot in it
Avatar
Avatar
Jupstar ✪
How far off is it?
It seems to be off by some constant factor
13:55
Whats also confusing me is that panning in the editor uses UI()->MouseDeltaY() / Graphics()->WindowWidth(). So I tried multiplying it with Graphics()->WindowWidth() / Graphics()->WindowHeight() but its still off
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 (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-ad...
Avatar
ws-client BOT 2023-07-18 13:56:31Z
<Jupstar> mhh devide by width sounds wrong here, but dunno what panning is
Avatar
panning is just changing the position of the viewport (ie ctrl + left click)
Avatar
ws-client BOT 2023-07-18 14:04:37Z
<Jupstar> @marmare_314 where in the code even are you? i don't find any code like that in editor.cpp
Avatar
ws-client BOT 2023-07-18 14:07:08Z
<Jupstar> i think the mousewscale is not directly comparable to the window width
Avatar
ws-client BOT 2023-07-18 14:08:49Z
<Jupstar > yeah its basically the scale between window width and the virtual world width
14:09
<Jupstar > its just a factor
14:09
<Jupstar > smth like 1.75x
14:10
<Jupstar > i think we always respect the aspect ratio in the world view, so this should™ be ok to do even for height
Avatar
Yeah seems to work just fine, I just cannot figure out how to do the same for the envelope editor
Avatar
ws-client BOT 2023-07-18 14:17:24Z
<Jupstar > i guess u have to use getScreenPoints or smth like that
14:17
<Jupstar > it will give u the virtual view similar to what the world is doing
14:17
<Jupstar > its some function in graphics
Avatar
Compile the client without notification support instead of throwing a compile error. Shows a warning in the cmake step if it does not find libnotify. !image

Checklist

  • [x] Tested the change ingame
  • [x] Provided screenshots if it is a visual change
  • [x] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to inte...
Avatar
Avatar
ws-client
<Jupstar > i guess u have to use getScreenPoints or smth like that
Couldnt find it, but maybe i can figure out what MapScreenToWorld does
Avatar
@deen would be cool for ddnet to provide emails for services
14:29
like wiki
Avatar
ws-client BOT 2023-07-18 14:33:15Z
<Jupstar > @marmare_314 GetScreen
Avatar
@heinrich5991 do u know why u128 has a align of 16 on m1?
14:33
@Jupstar ✪
14:33
xd
Avatar
ws-client BOT 2023-07-18 14:33:58Z
<Jupstar > what alignment do u expect else?
Avatar
8
Avatar
ws-client BOT 2023-07-18 14:34:42Z
<Jupstar > long long double also has 16 i think
Avatar
it should be 8 cuz registers no?
Avatar
Avatar
Ryozuki
@heinrich5991 do u know why u128 has a align of 16 on m1?
I think x86 also wants 16-byte alignment for 16-byte simd vectors
Avatar
Avatar
Ryozuki
it should be 8 cuz registers no?
it's kinda unrelated to registers. it's related to guarantees of load/store operations and how the compiler wants to model these
14:36
interesting
14:37
While fixing various bindgen bugs related to long double, int128, (rust-lang/rust-bindgen#1370, etc). I realized that the following Rust program, in my x86_64 Linux machine: #[repr(C)] struct Foo {...
14:37
xd
Avatar
b07ecc5 new email address - def- b221b35 Merge pull request #6890 from def-/pr-email - heinrich5991
Avatar
ws-client BOT 2023-07-18 14:44:56Z
<Jupstar > @Ryozuki good that u use u128.. future proof alien software. that's what i want to see. the ppl in 20000000000000 years will still use it
14:45
xd
Avatar
ws-client BOT 2023-07-18 14:45:45Z
<Jupstar > my game uses femtoseconds
Avatar
ws-client BOT 2023-07-18 14:59:06Z
<Jupstar > @Ryozuki why does as_nanos from Duration return u128 and from_nanos takes u64. You as llvm champ must tell me
Avatar
pub const fn as_nanos(&self) -> u128 { self.secs as u128 * NANOS_PER_SEC as u128 + self.nanos.0 as u128 }
15:01
lol
15:01
idk
Avatar
ws-client BOT 2023-07-18 15:02:12Z
<Jupstar > hipsters
Avatar
you can represent any amount of u64 nanos in a Duration, but a Duration can have more nanos than fit into a u64
15:02
this way, you get infallible conversions, I guess
Avatar
ws-client BOT 2023-07-18 15:03:09Z
<Jupstar > and if both are u128
15:03
<Jupstar > do you mean while using Add?
Avatar
2**127 nanoseconds don't fit into a duration
15:05
I think the max is 2**64-1 seconds + 10*9-1 nanoseconds, I believe
Avatar
ws-client BOT 2023-07-18 15:05:37Z
<Jupstar > mh ok
15:07
<Jupstar > and they choose to use seconds at all for performance concerns, or floating point inaccuracies?
Avatar
I wouldn't use floating point for anything fundamental like that tbh
Avatar
ws-client BOT 2023-07-18 15:09:39Z
<Jupstar > but they offser as_secs_f32
15:10
<Jupstar > dividing 2 f32 nanoseconds would not work accurately
15:10
<Jupstar > so they choose seconds + nanoseconds, instead of nanoseconds only
15:10
<Jupstar > that was my question
Avatar
they starting offering the f32 stuff very late IIRC
15:11
I guess they chose seconds because that's also a repr in certain operating systems
15:12
using u64 seconds plus u32 nanoseconds
Avatar
is github slow
15:42
rn
15:42
microsoft so unreliable
15:42
has 100% uptime
Avatar
they should hire u
Avatar
semi announcement: i wanna host an aditional service on ddstats.org (which currently hosts the datasette instance), i will move the datasette instance to https://db.ddstats.org/ the service will basically be a really pretty master server viewer, with skin rendering, teams, statistics, and even a stream of events based on diffing requests (e.g, a list of who joined what server or left, on the sidebar? or some ideas like that)
16:11
anyway @murpi if u can change the link on #welcome to https://db.ddstats.org/
16:11
for now both point to datasette but ill soon change it
16:12
ill also include a link to https://db.ddstats.org/ inside ddstats.org when i have the web tho
16:16
@Voxel also i found a use for the logo i requested long ago xd
16:35
when ddstats emoji
16:35
wiki
Avatar
epic
16:36
better colors than official logo
Avatar
chillerdragon BOT 2023-07-18 16:40:45Z
No
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
daft punk
Avatar
Yes
Avatar
chillerdragon BOT 2023-07-18 16:41:53Z
Sounds cool! (@Ryozuki)
semi announcement: i wanna host an aditional service on ddstats.org (which currently hosts the datasette instance), i will move the datasette instance to https://db.ddstats.org/ the service will basically be a really pretty master server viewer, with skin rendering, teams, statistics, and even a stream of events based on diffing requests (e.g, a list of who joined what server or left, on the sidebar? or some ideas like that)
Avatar
ooo that sounds so good
16:43
here is the logo with the svgs too
16:43
if someone wants to mess around
Avatar
who made them
Avatar
made by voxel obviously
16:43
@Voxel
Avatar
i am so cool
Avatar
should be an ingame skin too
16:44
YEP
16:44
tm
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
the firefox svg renderer has artifacts lmao
Avatar
yeah
16:44
broken af
Avatar
future discord or smth https://discord.gg/2Bwz2rn3YJ
Invite to join a server
Guild icon
general
Avatar
lmao
16:52
ddnet 2.0 by Ryozuki
Avatar
why this not work SELECT * FROM race WHERE Time LIKE '%.00'
Avatar
Avatar
Voxel
Click to see attachment 🖼️
real
Avatar
Avatar
heinrich5991
I think x86 also wants 16-byte alignment for 16-byte simd vectors
it does for faster loading but it also supports misaligned but you need to use loadu instruction. load instruction on misaligned will trigger an exception (segfault iirc)
Avatar
@Robyt3 i have a question
17:35
when we return invalid texture if loadtexture fails
17:35
doesnt that mean we always create a bug?
17:36
i mean isnt that completely broken even in vanilla already
17:36
or am i stupid rn
17:36
do we have some check to prevent it from being unloaded
Avatar
mhh i see
17:37
so false alarm :/
17:37
why do u mean call invalidate before initilizing it?
Avatar
You mean in #6836?
Avatar
When starting with dbg_stress 1 the invalid texture was never actually getting loaded, which was causing the client to crash when using the Vulkan backend and starting with dbg_stress 1. Additional...
Avatar
yes
Avatar
I can never be sure enough whether the constructor is actually called already justatest
Avatar
mhh
17:40
i really dont understand why 2 times at one day the killmsg thing happened
17:40
its so random
Avatar
Did the other one have an assert log with more information?
Avatar
he didnt send me that
17:43
did we add any kind of memcpy or mem_zero lately
17:43
in the game client
17:43
that might overflow or smth xd
Avatar
fb8d2a1 Add goto_switch and goto_tele - ChillerDragon 3991d19 Merge pull request #6887 from ChillerDragon/pr_goto_switch_tele - Robyt3
Avatar
Reports were from before bezier support was merged, right?
17:44
Because that would have added a lot
Avatar
u changed smth in text.cpp
17:44
maybe the killmsg isnt created bcs of text container fails
17:44
but also unrealistic
17:45
from the recent commits i have no real idea
17:45
36d8dd587cbfd8594755661985785065caee5704
17:45
but why should it break the client xD
17:45
thats the only direct commit related to killmsgs
17:46
even if this commit causes it somehow, the bug was there before
Avatar
Would it help if we add more debug information on this assertion?
Avatar
we only check if m_Body.IsValid() theoretically that could fail maybe
Avatar
Like the current value of m_vTextureIndices[TextureID.Id()]
Avatar
i'm not sure, i'd guess the index store in that array is simply the next valid index
17:50
the best would be if texturehandles would be a shared ptr and track their usage
17:50
then we'd see as soon as they are in use while being destroyed
17:51
that's not a trivial change tho
Avatar
Only ~200 lines justatest
Avatar
and rn it might be possible if 2 components reference the same texture
17:51
while only 1 destroys it
17:51
and the other doesnt use it in good faith xD
17:52
the shared ptr would think it's still in use
Avatar
Avatar
Ryozuki
anyway @murpi if u can change the link on #welcome to https://db.ddstats.org/
ok
17:52
Nice logo @Voxel
Avatar
that's also why i wanted to remove the shared ptr in the text containers. but since it works quite nice we can keep it xd
Avatar
ChillerDragon BOT 2023-07-18 17:57:24Z
@Davide im bugged again this time real good also on ger10 not only @fokkonaut server :c
17:57
here pcap of chillerbot-zx connecting to foxonaut
Avatar
it fails at the feet textures only
Avatar
ChillerDragon BOT 2023-07-18 17:58:00Z
dont get confused by the chilerbot specific messages xd
Avatar
both crashlogs
17:58
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
Avatar
ChillerDragon BOT 2023-07-18 18:00:35Z
@Davide and here me connecting to ger10 using vanilla ddnet https://zillyhuhn.com/tmp/ger10_anon.pcap
18:00
18:00
epic
18:01
im still in connecting
18:01
but the one chat message of misterx swapping came through haha
18:01
i spam reloaded both tw.fokkonaut.de and ger10.ddnet.org in my firefox browser
18:03
o/ belkka
Avatar
what a weird place
Avatar
ChillerDragon BOT 2023-07-18 18:04:52Z
xd
18:05
bro accidentally opend irc
18:06
rip davide afk :c non susterism for me then maybe that explains why the server is not full today hehe all filtered
18:07
btw jopsti i can not recommend 4090 dat bitsh heated ma room to 30 degree i have phisical pain
18:08
chiller monologue moment
Avatar
why should it heat your room to 30°
18:09
wtf have u been doing with it
Avatar
ChillerDragon BOT 2023-07-18 18:09:19Z
connecting to ger10
18:09
rendering tw menu in 4k
18:09
xd
Avatar
thats 2% usage for a 4090
Avatar
ChillerDragon BOT 2023-07-18 18:09:36Z
it had 29 degree when i turned the pc on earlier
Avatar
maybe open your window lmao
Avatar
ChillerDragon BOT 2023-07-18 18:09:52Z
i use linux
18:09
idiot
Avatar
under 80% usage GPUs are very power efficient generally
18:10
bcs they clock really low
Avatar
ChillerDragon BOT 2023-07-18 18:10:15Z
tell that to my fan
18:10
he going places
18:10
airplane mode
Avatar
bro 4090 fan never even goes on
18:10
fakenews
18:10
@Ryozuki can confirm
18:10
4090 has completely overkill passive coolers xD
Avatar
my sister has 4090
18:10
i ran cyberpunk on rtx ultra
18:10
fans idle
Avatar
ChillerDragon BOT 2023-07-18 18:10:57Z
ye its external fans of da case
Avatar
ChillerDragon BOT 2023-07-18 18:11:01Z
lmao
Avatar
trollerdragores
Avatar
ChillerDragon BOT 2023-07-18 18:11:09Z
maybe jopsti is rite
Avatar
ur troll
Avatar
spitting some fake news
Avatar
ChillerDragon BOT 2023-07-18 18:11:14Z
and i really should bios
Avatar
my bios has system fan controls
Avatar
ChillerDragon BOT 2023-07-18 18:11:25Z
maybe my cpu is needing it
Avatar
most probs
18:11
such a powefull cpu gets hot
Avatar
ChillerDragon BOT 2023-07-18 18:11:49Z
spinnin cycles computing gnome
18:11
axaxax
18:13
ryo why ur sister got 4090 lol
Avatar
@Smetanolub Yo bro, can I ask you: Do you use custom skins, do you use skins.tw or smth? Would really help 🙂 Thanks for your coorperation
Avatar
ChillerDragon BOT 2023-07-18 18:14:13Z
teeworlds-skins.cdn.facebook.com
Avatar
@Jupstar ✪ We are loading skins from a thread, right?
Avatar
not that i am aware of
18:16
graphics is not thread safe at all
Avatar
ChillerDragon BOT 2023-07-18 18:16:23Z
graphics_threaded.cpp
Avatar
so if we loading skins, then only the file itself
Avatar
chillerdragon: yeah biggest troll. it should be backend_threaded
Avatar
ChillerDragon BOT 2023-07-18 18:16:46Z
hrhr
Avatar
bcs thats the only threaded part about it
Avatar
ChillerDragon BOT 2023-07-18 18:16:52Z
all marketing
Avatar
This uses m_vSpriteHelper state variable so it's not thread-safe
Avatar
It looks like sprites are just copied from the complete texture buffer, so the feet texture being invalid shouldn't have an effect on the other textures
18:19
Is it possible to get a list of all skin names in the database for fuzz-testing?
Avatar
Avatar
Robyt3
Is it possible to get a list of all skin names in the database for fuzz-testing?
if u know some js
18:20
else i can also quickly write it
Avatar
Avatar
ChillerDragon
i spam reloaded both tw.fokkonaut.de and ger10.ddnet.org in my firefox browser
Your IP is still the same?
Avatar
Avatar
Jupstar ✪
Click to see attachment 🖼️
@Robyt3
Avatar
ChillerDragon BOT 2023-07-18 18:24:37Z
idk wat my ip was last time xd
18:25
@
18:25
omg
18:25
xd
18:26
@Chairn commenting every ddnet github action in existance hehe
18:26
only one?
Avatar
ChillerDragon BOT 2023-07-18 18:26:29Z
yes u
18:26
you top commenter
Avatar
where ?
Avatar
ChillerDragon BOT 2023-07-18 18:26:48Z
more active than me in tw youtube section
Avatar
i don't deal with your opinion, only with facts...
Avatar
ChillerDragon BOT 2023-07-18 18:27:23Z
i spammed out issues and prs in the last days and you commented all like a fulltime githubber
Avatar
i commented 2
Avatar
ChillerDragon BOT 2023-07-18 18:28:18Z
bro being defensive about it xd
Avatar
one was a typo from you, i had to correct it
18:28
we have some standards here
Avatar
ChillerDragon BOT 2023-07-18 18:29:19Z
also i wouldnt call #2170 stupid :c looks pretty functional to me
Avatar
chillerbot BOT 2023-07-18 18:29:20Z
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
Avatar
ChillerDragon BOT 2023-07-18 18:29:30Z
thanks chillerbot
18:29
omg github changed links fuk
18:29
chilerbot depended on issue links wiht pr ids redirecting to prs
18:29
they stopped doing that omahgwd
Avatar
The bot kept the # in the URL
18:30
It works without
Avatar
ChillerDragon BOT 2023-07-18 18:30:37Z
i just realized
18:30
i think that is even a known issue and i was too lazy to fix last time xd
18:30
quality bot
18:30
This adds 2 new chat commands: /showtotele and /showtotelecp based on their rcon counterpart totele and totelecp. The commands pause the player and move his view to the output of the given tele num...
Avatar
ChillerDragon BOT 2023-07-18 18:38:38Z
@Davide i sent heinrich my ip again bro u need to get some messenger ur such a discord maximalist xd
18:39
go send me your rsa public key and ill send you my ip encrypted in this chat xd
Avatar
Avatar
ChillerDragon
@Davide i sent heinrich my ip again bro u need to get some messenger ur such a discord maximalist xd
😂 🤣
Avatar
ChillerDragon BOT 2023-07-18 18:43:00Z
or slide in my gmail dms chillerdragon@gmail.com
Avatar
time to send furries
Avatar
Chiller you should start using carrier pigeons to send your ip to Davide, it'd be so cool
Avatar
Avatar
Ryozuki
time to send furries
i didnt know you were a furry
Avatar
im not
Avatar
ChillerDragon BOT 2023-07-18 19:10:48Z
davide probably has a literal wall of fire surrounding his house that would kill all pigeons
19:11
only letting through amazon traffic
19:11
true propriatary enjoyer discord ooser
19:13
wot belkka how do you know about the #teeworlds-ctf irc channel o.O
Avatar
@deen how is deen-jr doin
19:25
maybe its Miss Twinbop
Avatar
gotta get a famous name like: Aoe
Avatar
Argent MoonBer 2023-07-18 19:26:30Z
tem gente dando lag em srvr Br
Avatar
tem gente offtopic le brazil
Avatar
Argent MoonBer 2023-07-18 19:27:10Z
oq é offtopic?
Avatar
#off-topic for brazil
Avatar
Argent MoonBer 2023-07-18 19:27:24Z
a
Avatar
ChillerDragon BOT 2023-07-18 19:29:48Z
xd
Avatar
@Jupstar ✪ I haven't found anything yet with this, went through all skins once. You can try with this patch, just start server, connect, dbg_dummies 31 or 63 and reload: https://github.com/Robyt3/ddnet/tree/Debug-Server-Dummies-Skins-KillMsg
DDraceNetwork, a cooperative racing mod of Teeworlds - GitHub - Robyt3/ddnet at Debug-Server-Dummies-Skins-KillMsg
Avatar
maybe its a bug in dummy code or dummy network code
19:34
there so many possibilities
Avatar
Can these warnings be fixed for skins in the DB? libpng: warning for file "downloadedskins/Bat.15596.tmp": iCCP: known incorrect sRGB profile
Avatar
yeah
19:37
i think we simply have to resave them
Avatar
Avatar
Robyt3
Can these warnings be fixed for skins in the DB? libpng: warning for file "downloadedskins/Bat.15596.tmp": iCCP: known incorrect sRGB profile
@Ravie release date should not reset anymore, so we can fix such issues @Robyt3 do you have a list of all warnings?
19:37
then the crew can do it at once
Avatar
its not hurry, just when u have fun to clean up some database stuff
Avatar
Maybe they can write a script to detect this though
Avatar
well new skins will be resaved by the @SkinDB bot
19:40
so i guess this wont happen anymore
19:46
I have 2066 files in the downloadedskins folder and more than 80% of those files are .tmp files
Avatar
i guess some downloads were cancelled then
19:47
did u set breakpoints?
19:47
Sometimes client crashes I guess
Avatar
its stupid that we download the skins like rn anyway xd
19:49
we should add a sha256 to the skins in the skins.json in the db download that and load the skins from downloaded skins first
19:49
using the hash
19:49
if the db hash matches
Avatar
wtf is this file
19:50
0 bytes size
Avatar
is that from skins.tw?
Avatar
date says is from almost exactly two months ago
19:50
it's the only weird file after I deleted the .tmp files
Avatar
i also have .tmp and they are actually finished downloads
19:52
so i guess the client doesnt clean it up correctly when closing or somewhere
Avatar
I just added a space after my skin name and somehow this immediately started a download for bluekitty .7612.tmp
19:57
There shouldn't be a skin with a space at the end, so I assume we trim spaces somewhere but not for the filename
Avatar
@Jupstar ✪ eh you want us to resave and reupload all those? xd
Avatar
well or remove them if they are ugly xD
Avatar
nah there are some old and good ones
20:08
it's just about saving them again without some extra png chunks
20:09
I think photoshop is one program that adds some CHRM chunks or whatever
Avatar
If you set the skin bluekitty (with a space at the end) then this should make a request to https://api.skins.tw/api/resolve/skins/bluekitty%20.png, as confirmed by adding debug logs for this variable: https://github.com/ddnet/ddnet/blob/3991d199667d133a220758b3e0def3e75911a1b2/src/engine/shared/http.cpp#L232 However, this actually seems to make a request to https://api.skins.tw/api/resolve/skins/bluekitty.png (without the space), as the download is successful, hence `downloadedsk...
Avatar
chillerdragon BOT 2023-07-18 20:52:34Z
Which lunatic puts a space at the end of a skin name
Avatar
i put space after my name in your chatroom chillerdragon xD
Avatar
chillerdragon BOT 2023-07-18 20:53:17Z
You indeed are crazy sir
Avatar
10/10 hack
Avatar
chillerdragon BOT 2023-07-18 20:53:34Z
Abgespaced we say in Germany
Avatar
I wanted to trigger a skin change so it would send it to the server, so I added and removed a space
Avatar
Defs unintuitive behavior. What ever causes it
Avatar
Avatar
Robyt3
wtf is this file
Its a clan
Exported 597 message(s)