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 2019-05-24 00:00:00Z and 2019-05-25 00:00:00Z
Avatar
e383b4d M Momentum, M run_2Rockets - ddnet-maps
Avatar
@heinrich5991 here?
Avatar
[quakenet] heinrich5991 BOT 2019-05-24 08:42:50Z
kinda
08:43
fun, irc showed the notification before discord did
Avatar
quick question, do you know what AuthInit is in teehistorian files? I don't see any of them, I thought they were supposed to be in all
Avatar
[quakenet] heinrich5991 BOT 2019-05-24 08:44:41Z
AuthInit is only done when the map changes and someone was still logged in
08:44
it's probably quite rare
Avatar
doesn't seem to be what i thought
08:45
do we save keyslots and their names somewhere?
08:45
also do we record the keyslots on rcon commands?
Avatar
you're probably looking for AuthLogin
08:45
that's the login events
08:46
AuthInitial is also interesting if you want to correlate rcon commands with key slots
Avatar
Meh, so I have to keep state to figure this out
Avatar
yes
08:47
you should generally expect to need to keep state if you want to make sense of teehistorian files
08:47
they're append-only and try to save the least data possible
Avatar
what does authlogin have in it btw?
08:48
cid, level and authname?
08:48
yep seems to be it
08:49
let's see if I know enough rust to code this 😛
Avatar
you can also write it in whatever you want by using the output of teehistorian_dump
Avatar
that sounds horribly inefficient
Avatar
yes
Avatar
I'd rather hack teehistorian_dump at that point 😛
08:50
if you get a tool of sensible code quality, you could PR it to the libtw2 repo
Avatar
well I'll PR it anyways, you can help me get it up to quality later
Avatar
such a weird language...
Avatar
it's not just another language with no new concepts ^^
Avatar
they should make a nice to use version of c++ instead of all these new languages that are so confusing
Avatar
I think rust is the safe to use version of c++, and probably a good attemtp at being nice at the same time
Avatar
I don't think I like all these Somes and expects
Avatar
those are actually a good thing to learn IMO
09:06
Option types generally make your code more robust against error cases IMO
Avatar
sure, but I don't think that's something that needed improving
Avatar
I think it is something
09:06
you see how people are complaining about hitting NPE in java in their code? that's the solution to that
09:07
(null pointer exception)
09:07
because it moves the error to the location where the wrong assumption happens
Avatar
I mean you shouldn't dereference a null pointer
Avatar
not the location where the null pointer is used
Avatar
it's not rocket science to add a null check, we've been doing it for quite some time now
Avatar
yes. but if you have a wrong assumption, it can blow up in a completely unrelated part of the program
09:08
not so for option types
Avatar
It's a fairly easy thing to figure out where the null comes from if you have coded for more then a week
09:08
a simple backtrace gives you where it comes from
Avatar
not in my experience
09:09
you don't know where the null initially came from
09:09
you see where the null pointer was dereferenced
09:09
but not why the variable was null to begin with
Avatar
at that point, you do a bt
Avatar
then you see a backtrace of the place where the null pointer was dereferenced
Avatar
if you were calling the function with a null it's obv
Avatar
e.g. you see it came from a member variable
Avatar
if you were dereferencing a null that came from this function, it's quite easy to see where it is becoming null
09:10
it's obviously somewhere you are modifying it and don't have a null check
Avatar
now you don't know why. did the function I call earlier return the null errornously? was it becasue I passed null to a function errnously? etc.
09:10
this doesn't happen with option types
Avatar
In my experience I've never had a hard to debug null pointer issue tbh
09:11
it's one of those problems that are extremely obvious
09:11
for me atleast
Avatar
I feel like you're misunderstanding what I'm saying. of course it's easy to find where the null pointer was dereferenced
09:12
but it's not so easy to see how the null pointer propagated through the program to that point, if it's not in the call stack anymore because it went through several variables or functions no longer in the call stack
Avatar
I guess I've never had an issue in finding where a null originated from
Avatar
anyway. even from a theoretical point of view. if you were designing a new system, you'd probably not say: oh, let's add a sentinel value to every pointer type
09:13
even C and java have nonnull annotations because of that
09:14
(or popular C compilers do)
Avatar
but it's not so easy to see how the null pointer propagated through the program to that point, if it's not in the call stack anymore because it went through several variables or functions no longer in the call stack
rr can help you with that btw.
Avatar
I've never felt the need to use such an annotation, I guess it depends very much on how you think while coding
Avatar
@deen rr sounds cool
Avatar
yup
09:24
unfortunately, I never looked into it so far :/
Avatar
At work I played around with UndoDB recently, works similarly, but unfortunately not free/open source
Avatar
I never thought there'd be a closed source debugger
09:50
sounds like a very hard to sell product, as developers most likely won't be used to it at all
Avatar
And now you know why we had an UndoDB workshop 😉
09:52
rr can't deal with shared memory well and we use quite a bit of that, so it's the only choice
09:53
and it's really easy to use, just record and then you can step backwards in a regular gdb interface
Avatar
@deen is a time-travel debugger that useful that you'd use a debugger you aren't familiar with?
09:54
oh is it also gdb-ish?
Avatar
undodb is just a thin layer on top of gdb
Avatar
that makes more sense 😛
Avatar
so all gdb commands work plus everything with an r prefix to d o it in reverse
Avatar
[quakenet] heinrich5991 BOT 2019-05-24 09:54:59Z
rdelete production database
Avatar
is time-travel debugging something you use often?
09:55
recording is super slow, only one thread at a time
Avatar
that'd be a very hard product to pitch to management 😛
Avatar
and requires huge amounts of memory to store
09:56
The thing is we have a few cases of really hard to reproduce problems
09:56
so you can run them in a loop for days on end while recording
09:56
and when you finally have them you can use the recording to figure out what happened previously
09:56
or a customer has a problem that only they can reproduce on their machines, but we can't on ours
09:57
because of the data set or whatever, so they can enable the live recorder, reproduce it, and send us the recording
Avatar
but if it's very slow and takes a lot of memory is it feasible for a customer to run it?
Avatar
[quakenet] heinrich5991 BOT 2019-05-24 09:57:54Z
but then you have the customer's data. that sounds like something the customer might actively want to avoid
Avatar
only some
09:58
the customers often have productive systems and test systems, so they could run it on a test system
09:58
@heinrich5991 sure, they have to be aware of that. they also give us exports for reproducing problems
09:59
and we have to be careful with customer data of course
Avatar
oh you can embed the recorder into your product aswell?
Avatar
I think of reverse debugging as a last-resort solution for the problems hardest to debug, not something you use daily
10:01
yes
10:01
The alternative for us would be to add more tracing, release a new version, tell customers to use that and then send us the traces. Takes some time
Avatar
yep, actually sounds like a decent last resort to debugging hard to reproduce problems
Avatar
2911bf9 Remove Greeen and just god, add Testers - 12pm
Avatar
@heinrich5991 does the teehistorian header include max players?
Avatar
I wonder if they actually tried hard to make the syntax unfamiliar to people
13:25
it's like I'm trying to decode moon runes
Avatar
xd
Avatar
like just try to have a guess at what pub identity: &'a [u8], could mean
Avatar
wow
Avatar
I think it's a reference to an array of 8 bit unsigned integers
13:31
lifetimes are such a foreign concept
Avatar
okay how does this even make sense 1302 ConsoleCommand { cid: 0, flag_mask: 128, cmd: b"pause", args: [] }
14:29
pause should have the flag_mask 132 not 128......................
Avatar
what's flag_mask?
Avatar
the commands flags
14:30
when you register it in console
14:31
It's CFGFLAG_CHAT|CFGFLAG_SERVER for pause
14:31
which is 132, but the CFGFLAG_SERVER seems to be gone in the teehistorian file
Avatar
oh
Avatar
okay, the flagmask is set to only CFGFLAG_CHAT while executing chat commands
14:34
that makes more sense
Avatar
ye xd
Avatar
@Learath2 is it possible to create a background job to only do one action?
Avatar
How then? xd
Avatar
take a look at CJob
Avatar
k thx
Avatar
@heinrich5991 on a scale of very horrible to horrible, how horrible is this? https://paste.pr0.tips/FO
Avatar
man its beautiful
Avatar
It's currently parsing all of the teehistorian files I have
18:29
it should finish in a decade or so 😛
18:30
exporting this all to json then parsing the json to render graphs don't seem like the best idea performance-wise, but idk what else to export it as 🙂
Avatar
[quakenet] deen BOT 2019-05-24 18:40:51Z
msgpack, protobuf?
18:41
but I had no problems working with json files around 1 GB, there are performant libs around
Avatar
[quakenet] Davide BOT 2019-05-24 18:41:49Z
Hey @deen @heinrich5991, how much time
Avatar
[quakenet] deen BOT 2019-05-24 18:41:53Z
hi Davide
18:41
time?
Avatar
[quakenet] Davide BOT 2019-05-24 18:42:16Z
How much time i don't join here
18:42
I mean that
Avatar
[quakenet] deen BOT 2019-05-24 18:42:22Z
no idea
Avatar
[quakenet] Davide BOT 2019-05-24 18:42:44Z
It was not a question, but an exclamation
18:43
Don't care, anyway there are one way to give strong to all @deen ?
18:44
Example via map config
Avatar
@deen will see how performant js itself is with that much data 🙂
Avatar
[quakenet] deen BOT 2019-05-24 18:48:28Z
no
Avatar
Davide: nope
Avatar
[quakenet] Davide BOT 2019-05-24 18:48:37Z
Wtf
18:48
So, how kog do that?
Avatar
[quakenet] deen BOT 2019-05-24 18:48:53Z
they changed the source code
18:49
we had that change in ddnet too at some point, but the physics change makes some game play worse, for example hammerfly
Avatar
[quakenet] Davide BOT 2019-05-24 18:49:11Z
Ok so there isn't way with config, only with code
Avatar
I love how when we patched it everyone was angry and when kog patches it it's a revolution 😛
Avatar
[quakenet] deen BOT 2019-05-24 18:49:24Z
so it was reverted quickly
18:49
kog doesn't have hammerfly and other tee interactions like in ddrace, right?
Avatar
what dd the patch?
18:49
they*
Avatar
@deen well you can still hammerfly with another tee
Avatar
[quakenet] deen BOT 2019-05-24 18:50:17Z
Learath2: yes, but it was worse than before
Avatar
not really part of maps though
18:50
@deen I meant in kog
Avatar
[quakenet] deen BOT 2019-05-24 18:50:28Z
and now it would also invalidate all previous ranks
Avatar
[quakenet] Davide BOT 2019-05-24 18:50:37Z
@Deen can use hammerfly but there aren't map require that, i think
Avatar
[quakenet] deen BOT 2019-05-24 18:51:00Z
Davide: you can ask qshar to make the source code public
Avatar
[quakenet] Davide BOT 2019-05-24 18:51:11Z
I think he don't do it
Avatar
[quakenet] Davide BOT 2019-05-24 18:51:46Z
Thanks @deen
Avatar
[quakenet] deen BOT 2019-05-24 18:51:50Z
We only had it for 10 hours :D
Avatar
[quakenet] Davide BOT 2019-05-24 18:52:24Z
Why don't make a map-config for doing that? So you can choose what map can have it or not
18:52
So the mappers can use or not that config
Avatar
[quakenet] deen BOT 2019-05-24 18:53:17Z
because then players have to get used to two different kinds of physics
18:53
instead we have /spec
Avatar
[quakenet] Davide BOT 2019-05-24 18:53:37Z
That isn't a problem if you're good
18:53
I know @deen
Avatar
[quakenet] Davide BOT 2019-05-24 19:32:41Z
@deen little problem, the code you've linked me is very old, and the current code is very different
Avatar
Oh man how strange is that
19:32
19:34
sometimes the name is wrong like that
19:34
its so weird
19:35
and sometimes
19:35
Avatar
i'm lost xd
Avatar
you can see how you got there in vs
Avatar
tell me
20:17
please 😄
Avatar
call stack
Avatar
ah i need to install something
Avatar
omg who did that
20:34
Avatar
[quakenet] Davide BOT 2019-05-24 20:51:48Z
@deen Solved
20:51
Thanks
Avatar
@Learath2 i improved a bit the performance of the replay thing by putting the slicing operation in a separate thread, more than that i can't do xd
Exported 196 message(s)