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-02-07 00:00:00Z and 2019-02-08 00:00:00Z
Avatar
DDraceNetwork, a cooperative racing mod of Teeworlds - ChillerDragon/ddnet
Avatar
ChillerDragon 2019-02-07 07:18:56Z
Ur commit messages xd
07:20
07:20
Indendation looks weird
Avatar
[quakenet] <heinrich5991> Learath2: pState seems to be uninitialized but accessed in str_tokenize_nd
07:20
[quakenet] <heinrich5991> I mean *pState
07:21
[quakenet] <heinrich5991> ah nvm
07:24
[quakenet] <heinrich5991> Learath2: char **rest and const char *str seem redundant
07:25
[quakenet] <Learath2> heinrich5991: ? str points to the string we are tokenizing, rest points to beginning of the next token
07:26
[quakenet] <Learath2> I guess you could offload keeping track of that to the user
07:26
[quakenet] <Learath2> but not sure how that'd be usability wise
07:26
[quakenet] <heinrich5991> also, str_in_list allocates, we usually don't do that :P
07:28
[quakenet] <Learath2> Could let the user pass in a scratch buffer but is that really common?
Avatar
ChillerDragon 2019-02-07 07:29:51Z
b[bufsz ? 0 : -1] = '\0';
07:29
What is this?
07:30
Negative index?
Avatar
[quakenet] <heinrich5991> it's a pointer into the buffer
Avatar
Are there any playercounts charts by mod?
Avatar
[quakenet] <heinrich5991> so it's pointer to one before that
Avatar
ChillerDragon 2019-02-07 07:31:00Z
lol
07:31
And what Pointer is it?
07:31
Sounds like a random memory address to me
Avatar
@ChillerDragon buf moves right as you write into it
07:32
if you run out of space e.g. bufsz == 0 then you null terminate one before
Avatar
thanks
Avatar
if you still have space you null terminate after
Avatar
ChillerDragon 2019-02-07 07:32:35Z
That’s weird imo
Avatar
It's weird to null terminate buffers? :P\
Avatar
ChillerDragon 2019-02-07 07:32:49Z
So it is written into the b Array?
Avatar
yeah the token is written into b
Avatar
ChillerDragon 2019-02-07 07:33:12Z
At index -1?
07:33
Which gets shifted to 0 while writing ?
Avatar
b is a pointer, you move the pointer right
07:33
accessing -1 means one before the pointer
Avatar
ChillerDragon 2019-02-07 07:33:42Z
So writing to 0 writes the second position?
Avatar
it's *(b - 1)
07:34
@heinrich5991 how would you do in_list?
Avatar
ChillerDragon 2019-02-07 07:34:31Z
If (b[0] == '\0')
07:34
What would that give then?
Avatar
@ChillerDragon when? if you ran out of buffer space then that's unspecified, it's one past the array
07:35
if you didn't run out of buffer space it's true
Avatar
ChillerDragon 2019-02-07 07:35:44Z
Hmkay
07:35
Still weird but thanks
07:36
And how did u ensure threadsafety?
Avatar
not accessing globals
Avatar
Nothing thread local or static
Avatar
thread locals aren't thread-unsafe
Avatar
ChillerDragon 2019-02-07 07:36:52Z
Ah because I used the config variables in there I see
Avatar
No it's because you used strtok
Avatar
ChillerDragon 2019-02-07 07:37:09Z
Oh
Avatar
strtok has a static variable to store it's state
07:37
(so it knows how to continue tokenizing when you pass NULL)
Avatar
ChillerDragon 2019-02-07 07:38:21Z
K
07:38
Btw thanks for writing this functions
Avatar
Anyways, I don't think I like the way it turned out πŸ˜›
07:39
the allocation in str_in_list annoys me particularly
16:20
b54716b Forgot this was in alphabetic order - Learath2
16:26
Avatar
ChillerDragon 2019-02-07 16:27:18Z
:c
16:27
what happend to mystery?
Avatar
inactive
Avatar
ChillerDragon 2019-02-07 16:31:11Z
:c
16:31
16:31
pro o.O
16:31
how did u get that xd
Avatar
hi , how can i broadcast to all server ports in same time ?
Avatar
@TacTic we use fifo for it
Avatar
@TacTic fifo + cssh
Avatar
@ChillerDragon it's part of github education pack, pretty cool stuff in it
Avatar
cssh if u got more than 1 physical sv
16:50
oh
16:50
i should get the education pac
16:50
i got a .edu mail xD
Avatar
It has a metric fuck ton of things in it, including free digitalocean credit πŸ˜„
16:56
ez
Avatar
yay
17:22
free 50$ on digitalocean
Avatar
@Ryozuki my mail (etu.univ-grenoble-alpes.fr) is automatically detected
Avatar
ok? idc
17:30
mine was detected too
17:30
i just didnt use it on github
Avatar
ChillerDragon 2019-02-07 17:41:13Z
pack cost something and do you learn github there or actual interesting stuff?
17:41
i had some github educational challanges thingy in a web dev bootcamp with offical github employees lol and it was pure trash
Avatar
ahaha grenobles @Deleted User πŸ˜„
Avatar
@archimede67 yey
19:39
uga > all
Avatar
lol
Exported 90 message(s)