Guild icon
Teeworlds
IRC / bridge
One-way IRC channel bridge. If you want to be able to send messages to IRC, contact @Dune or @heinrich5991. https://www.teeworlds.com/?page=docs&wiki=rules/irc_rules
Between 2020-03-11 00:00:00Z and 2020-03-12 00:00:00Z
Avatar
I looked at it ... added a black layer behind it to have a better contrast, also added a grid to see tile boundaries.
Avatar
zooming in also helped
Avatar
[quakenet] Learath2 BOT 2020-03-11 13:15:08Z
Would you mind if I reimplement allocators in a more C++11 way, or preferably use std::allocator like allocators?
13:16
not C++14/17 mind you, the new allocator_traits stuff is just insane
Avatar
that's C++03 compatible?
Avatar
[quakenet] Learath2 BOT 2020-03-11 13:44:23Z
Eh, we still target C++03 don't we? :/
13:44
should ask Oy when he's around I guess :)
Avatar
[quakenet] Learath2 BOT 2020-03-11 13:44:57Z
The current way we do allocators is good for arrays and stuff, but when implementing a map, I need to rebind the allocator to another type
13:45
Someone give matricks a call, maybe he'd implement a quick hash table for me :P
Avatar
we probably should have a discussion on containers in general. what should be reimplemented etc
Avatar
[quakenet] Learath2 BOT 2020-03-11 13:46:49Z
I think it'd be nice if we'd just use stl containers at this point, the performance isn't too bad for us and we don't even use a custom allocator anymore
Avatar
agree, as long as it doesn't introduce thick ass template abstraction levels
13:49
Sometimes the C++ compiler prints something and I feel like I'm trying to talk to Lassie. What is it, Lassie. Is something wrong, Lassie. Is Timmy okay. What the heck are you trying to communicate to me you fucking dog I don't speak Endless Barking
Retweets
790
Likes
3031
13:51
(this is a missing include)
Avatar
why are you still targeting C++03 btw?
Avatar
that's a controversial topic and there are many arguments for and against
Avatar
guess it's too much work for now
Avatar
Someone give GOD matricks a call,, you missed the prefix.
13:55
xD
Avatar
@Assa that's not why, adding a compiler flag takes a second
Avatar
thick ass template abstraction
13:56
c++11 would be nice, but yeah, c++ error messages are just utter garbage
Avatar
@jxsl13 he missed the suffix too: GOD matricks, guardian of the holy grail
Avatar
[quakenet] rand BOT 2020-03-11 14:10:10Z
Thou shalt not take the name of the Lord thy God in vain
Avatar
kinda Doom and Wolfenstein need to be somehow verwurstet(google translate says: sausaged) in that title..
Avatar
[quakenet] Learath2 BOT 2020-03-11 15:18:16Z
Dune: do you have a good idea how I could pass the hash function for the key?
Avatar
@ChillerDragon or @fokkonaut mind adding the logging patch that I did in that one issue to ddrace?
15:41
for joining and leaving players
Avatar
ChillerDragon 2020-03-11 16:36:17Z
As soon as it’s in vanilla I guess
Avatar
in 5 years then or never
Avatar
[quakenet] Dune BOT 2020-03-11 16:48:10Z
git build failing?
16:49
g++.exe: error: `pkg-config: No such file or directory
16:49
huh, windows broke
16:49
A retro multiplayer shooter. Contribute to teeworlds/teeworlds development by creating an account on GitHub.
16:55
hey Oy
Avatar
[quakenet] Oy BOT 2020-03-11 16:55:21Z
hey
Avatar
[quakenet] Dune BOT 2020-03-11 16:55:25Z
Learath2 and I were chatting about when to use STL containers earlier today
16:55
do you have some guidance on that? the baselib redefines some but we use STL at other places
16:55
I think Learath2 is implementing a hashmap of some sort
Avatar
[quakenet] Oy BOT 2020-03-11 16:59:01Z
don't think we use stl containers
16:59
doubt there's aneed for that
Avatar
[quakenet] Dune BOT 2020-03-11 16:59:22Z
for a hashmap?
17:01
grep -rin "include <" src | grep -v ".h>" | grep "<.*>"
17:01
gives <new> and <algorithm>
Avatar
@oy can you merge the command usage pr
Avatar
[quakenet] Oy BOT 2020-03-11 17:11:25Z
done when it's done
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 17:37:36Z
Side note: Since we're okay with changing the network even in vanilla, can we finally get rid of the nethash? If introduced today, I don't believe you'd merge the nethash, yet we keep it in the code. :( It doesn't offer protection either, it's just unneeded complexity…
17:38
why do we have this mentality that things that are in the code should stay, even when there are arguments in favor of removing them.
17:39
flow being the most recent example. we would never merge a half-finished, compiled-out by default feature into teeworlds
17:39
yet we're not removing it either. it can always be ressurected, even if it's gone from the current codebase
Avatar
[quakenet] Oy BOT 2020-03-11 17:45:48Z
of course nethash offers protection
17:46
there's an issue about making flow work, so removing the current state is nonsense
Avatar
[quakenet] Dune BOT 2020-03-11 17:46:10Z
it gives a warning when you change something, right?
Avatar
[quakenet] Oy BOT 2020-03-11 17:46:18Z
just a warning
Avatar
[quakenet] Dune BOT 2020-03-11 17:46:48Z
CFlow is effectively unused since 0.5. Only Add and Update are called. Neither Get nor DbgRender are used, making these calculations effectively useless. The related config var is commented out //M...
Avatar
[quakenet] Oy BOT 2020-03-11 17:47:16Z
yeah
Avatar
[quakenet] Dune BOT 2020-03-11 17:47:24Z
I think #2437 is more like a question and would advocate for removal
17:47
we should actually make use of it and not have it sitting around in an incomplete state. [...] or it should just be removed,
Avatar
[quakenet] Oy BOT 2020-03-11 17:48:12Z
yeah, should be made working
17:48
question is how the effects should be
Avatar
[quakenet] Dune BOT 2020-03-11 17:48:49Z
ah, okay, that was unclear for me
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 17:48:51Z
and while it isn't working, it could be removed? we don't even know whether the code in question does something useful
17:49
I mean it's not entirely improbable that it sits there for another ten years
Avatar
[quakenet] Oy BOT 2020-03-11 17:55:30Z
so? has been there for many years
17:55
it's a starting point to work on it
17:55
no problem with keeping it in
Avatar
[quakenet] Dune BOT 2020-03-11 17:58:00Z
I think both viewpoints make a lot of sense
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 18:03:55Z
Oy: one could make the argument that logging of whispers and logging of a warning when nethash changes are similar
18:04
it doesn't change anything technical, but it changes something socially
18:04
currently, one accidentally looks at whispers even if you don't intend to
18:04
currently, one accidentally changes some network stuff but didn't intend to
18:05
with the change, one doesn't look at the whispers accidentally anymore
18:05
with the change, it's harder to notice that you accidentally changed the network code
18:05
re >But hiding that log meesage doesn't change anything - just gives you false-privacy.
Avatar
[quakenet] rand BOT 2020-03-11 18:06:36Z
one can advocate not to log any chat message in vanilla, people that want to log will do anyway
18:08
following KISS mantra, dead code should be removed
Avatar
[quakenet] Dune BOT 2020-03-11 18:08:56Z
but using heinrich5991's words, I guess it does change something "socially" by pushing people to make it work :p
18:09
(though keep dead code is a bit extreme imo)
Avatar
[quakenet] rand BOT 2020-03-11 18:09:22Z
following client modding, CFlow could be seen as a still not used powerful feature provide by official
Avatar
[quakenet] Oy BOT 2020-03-11 18:12:58Z
well the conversation looks like the issue author will log whispers if the message will be removed from official source or not
18:13
and people should be aware of that
18:13
that would be the false-privacy
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 18:13:41Z
but you don't make people aware by keeping it in the source code
18:13
if you want to make people aware, you put a message next to the whisper dialog
Avatar
[quakenet] rand BOT 2020-03-11 18:14:09Z
(about CFlow, imo, better removing to re-introduce later if useful)
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 18:14:24Z
keeping it in the source code with this reasoning is dishonest imo
18:14
(the whisper log)
18:15
(and seems to be one more example of "we keep it as it is". we probably wouldn't have blocked the whisper PR on it not logging the whisper messages in the server log)
Avatar
[quakenet] Dune BOT 2020-03-11 18:15:46Z
if you want to make people aware, you put a message next to the whisper dialog
18:15
yeah, agreee, that is better
18:16
no chat privacy without p2p or central authentification :/
Avatar
[quakenet] rand BOT 2020-03-11 18:16:47Z
(about whisper, nothing is private from server-side, teeworlds is not a chat application, peolpe should be aware of it)
Avatar
[quakenet] Oy BOT 2020-03-11 18:16:48Z
yeah, such a message would be good
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 18:16:59Z
and removing it from the source would still be good with such a message
18:17
so I as an honest server admin don't accidentally keep logs
Avatar
[quakenet] Oy BOT 2020-03-11 18:17:42Z
i personally don't care if the whisper log message is in or not, was just pointing out people could log it anyway
18:17
and people shouldn't get false-safety
Avatar
[quakenet] Dune BOT 2020-03-11 18:17:57Z
I believe it would be immensely better if it's not logged by default
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 18:18:03Z
okay. it sounded like you were against removing the log by default
Avatar
[quakenet] Dune BOT 2020-03-11 18:18:09Z
A bit how cheating is possible in teeworlds, but it's better if we don't ship an aimbot as a console option
Avatar
[quakenet] rand BOT 2020-03-11 18:18:19Z
(and so a server admin do not have to care about chat message and privacy issues (what about ip?))
Avatar
[quakenet] Dune BOT 2020-03-11 18:18:33Z
eh ips :/
Avatar
why do we have this mentality that things that are in the code should stay, even when there are arguments in favor of removing them. people try to argue "it was always there", which is actually not an argument but an excuse not to do anything.
Avatar
[quakenet] Dune BOT 2020-03-11 18:18:57Z
ip is personal information according to heinrich5991 iirc
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 18:19:37Z
one step after another. it seems we almost agreed to do something to the whisper thing
Avatar
off, have not read yet, as this is too active
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 18:19:56Z
if you try to fix everything at once, nothing happens
Avatar
[quakenet] Dune BOT 2020-03-11 18:20:51Z
if I whisper someone my credit card # on an AAA game, and some staff uses it for their purpose, I'd be legitimately upset, even though it's not a chat program per se
Avatar
[quakenet] Oy BOT 2020-03-11 18:20:52Z
if the server chat log messages gets removed it shouldn't be as plain text in the network log anymore
Avatar
[quakenet] Dune BOT 2020-03-11 18:21:01Z
teeworlds doesn't have this privacy and it's probably not intuitive for the end user, and should be made clear
Avatar
[quakenet] rand BOT 2020-03-11 18:21:02Z
if tackling whisper, why not remove every chat messages ? (not too far from whisper)
Avatar
rip econ mods that connect chat applications to server chat.
Avatar
[quakenet] Dune BOT 2020-03-11 18:26:03Z
why do you use econ to mod @jxsl13 ? sounds overcomplicated
Avatar
look at my git repo
18:26
that's why I stmbled upon the broken whisper logging
Avatar
[quakenet] Dune BOT 2020-03-11 18:26:40Z
just answer
Avatar
yes, I do
18:26
vpn detection
18:27
discord moderation tools that use econ
Avatar
[quakenet] Oy BOT 2020-03-11 18:27:01Z
you should be able to mod the server via econ - don't need a tw client, or server is full
Avatar
[quakenet] Dune BOT 2020-03-11 18:27:37Z
Oy: "mod" here was meant as modification not moderation
Avatar
mod = modify or mod = moderate
Avatar
[quakenet] Dune BOT 2020-03-11 18:27:48Z
at least my "mod"
Avatar
[quakenet] rand BOT 2020-03-11 18:27:51Z
jxsl13: fair point
Avatar
[quakenet] Dune BOT 2020-03-11 18:28:11Z
when you said "rip econ mods" you meant moderators?
Avatar
I meant modifications
18:28
and implicitly the moderation would be impossible as well
18:28
without joining the server
18:28
with a tw client
18:29
I got like votes shown in discord and chaz + team chat
Avatar
[quakenet] Dune BOT 2020-03-11 18:29:18Z
fair enough
Avatar
[quakenet] Oy BOT 2020-03-11 18:29:28Z
Dune: ah ok
Avatar
if people write "@mods"
18:29
the moderators in the discord server get pinged
18:30
might take a look at the chat (got logs of last 24h)
18:30
and if there is no chat that indicates anything, they can join the game and help there if needed
18:30
could also chat via server messages if needed, if it's only some question asked
18:30
and no actual funvoting or other offenses
Avatar
[quakenet] Learath2 BOT 2020-03-11 18:49:16Z
It's not exactly trivial to implement a good hashmap and it's even more difficult with the way we use allocators in the tl right now. I don't really see any benefit to maintaining our own tl now that we don't even use a fancy allocator anymore
18:51
I highly doubt base/tl/array.h is better then std::vector, at the very least it has a much worse way of resizing itself (+1 element each time)
Avatar
wasn't array resizing by 50% each time Oo.
Avatar
lol, in add it says size +1
Avatar
oh wow...
Avatar
well, both used or one implemented but not added, but the other one documented
Avatar
[quakenet] Learath2 BOT 2020-03-11 18:57:46Z
nonono, redix is right, it is 50%
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 18:57:53Z
size vs capacity
Avatar
std vector grows by 100%?
Avatar
[quakenet] Learath2 BOT 2020-03-11 18:59:29Z
that's an implementation detail and yeah it is most commonly 100%
19:00
vector is a really simple one, but I'm working on a hashmap, which is most commonly implemented with a rb tree for stl and usually uses open addressing, both are much more efficient then what we have in the codebase and what I would implement
Avatar
has anyone ever done some benchmarks of stl vector vs tw vector? i guess the main reason for reimplementing it was that the stl vector pulls quite a lot of code into the binary... i doubt that it has a serious performance benefit
Avatar
I bet for the tw use case the tw one is better
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:03:32Z
I highly doubt both drawbacks, not like we can avoid linking to libstdc++ nor is the naive implementation of an array in tw anything too well optimized for the usecase
Avatar
I wonder why the tw array is used rather rarely, I think most uses are in the client, nothing or nearly nothing on the server side.
Avatar
because in tw world dynamic memory allocation is a thing from hell 😄
19:08
satan begone. well perrormance-wise it is.
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:08:11Z
I don't even remember what I was coding the hashmap anymore...
Avatar
but I think the server code is currently not the part that gets inefficient ober time.
19:08
ober
19:08
over
19:08
you wanted some privacy for whisper messages?
19:09
maybe the eeitor preview for images ;D
19:09
editor
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:09:35Z
Dynamic memory surely isn't very efficient but it's not the end of the world...
Avatar
well you should not use dynamic allocations in performance critical code, yeah... but avoiding it like tw does is a bit too much i think
Avatar
matricks rule was: "no allocation in the main loop" IIRC
Avatar
well, if there is only one loop, yeah :D
Avatar
we only have one main loop in client and server
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:11:19Z
Okay since we have to stay in 2003, can you review my hashmap heinrich5991?
Avatar
Wolfenstein, same priciples :D..
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 19:11:38Z
gimme
Avatar
the server has only one loop?
Avatar
only one main loop?
Avatar
I mean are there multiple threads anywhere
19:12
well, main loop is kinda implicitly only one?
Avatar
ah. they're not used except for busy waiting and doing a host lookup every hour
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:12:57Z
The server does spawn threads to lookup for the maasters iirc
19:13
but full server logic seems to be in like thread.
Avatar
no, only one thread
19:13
the main thread
19:13
thread x)
Avatar
@redix @jxsl13 if I did benchmarks, would that change your mind based on the result?
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:18:43Z
heinrich5991: sadly redix and jxsl13 aren't the ones we need to convince :P
Avatar
I'm fully behind using c++17
19:19
behind you*
Avatar
[quakenet] Dune BOT 2020-03-11 19:20:04Z
no thanks
Avatar
And I'm highly in favour of refactoring Cvarint
19:20
c++11 would be enough actually :D
Avatar
i honestly don't care about the vector/array thing too much. the tw implementation does not really limit us right now it was more of a general thing. i would be interested in some benchmarks though 😄
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:20:49Z
C++14 is as far as I'm willing to go, after 17 things start to get weird, very weird
19:21
the only thing about c++17 I like are structured bindings, that's about it
Avatar
[quakenet] Dune BOT 2020-03-11 19:21:31Z
c++ brings a load of good things and also a load of bullshit. in the absence of strict coding guidelines, c++03 seems like a fair compromise to me
19:21
with great power comes great responsibility :p
19:21
c++11*
Avatar
c++ should slowly be approached imo.
19:22
11
Avatar
sadly I agree with dune
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 19:22:18Z
you can't write thread-safe code in pre-c++11
Avatar
but using some stl (e.g. hashmap) and c++11 might be good
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 19:22:26Z
we have code that "works"
Avatar
atomics, shared pointers, ...
Avatar
well, every step forward are 10 shots of bullets in each of your legs :D
19:25
next step would be when the whole headers crap gets removed and replaced by some modular system.
Avatar
+
Avatar
in another 10-15 years.
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:27:00Z
Dune: we can regulate the amount of template mess we accept, we've been up to C++14 on ddnet for a year now, not that much bs made it in
Avatar
c++ modules seems like a far future better move to rust then 😄
Avatar
[quakenet] Dune BOT 2020-03-11 19:27:53Z
Learath2, I'm sure it can be done, but it's very delicate, brings controversy, and I guess rejecting PRs for code style is not really in the spirit of the repo
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:28:17Z
well oy didn't like my goto :P
Avatar
goto bad, use for loops with breaks >:D
19:30
to emulate goto
Avatar
I prefer not having goto in the code
Avatar
or while loops
Avatar
I also removed all the remaining switch-case fallthroughs
Avatar
fallthrough bad :D
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:31:35Z
gotos are the best way to handle errors and escape from nested loops
Avatar
is there no feature in c++ to break outer loops?
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:32:11Z
The prejudice against it has to end, that one stupid blogpost about goto just made everyone into militants
Avatar
that's code racism :D
Avatar
escape from nested loops is ok, because the language can't handle it
19:33
errors can already be handled with return and RAII semantics, no need for it in C++ (edited)
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:33:35Z
nesting things into more functions is not a good solution
Avatar
can rust break outer loops?
Avatar
hm, newschool languages doing stuff right.
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:34:42Z
That switch case there is beautiful and clear, now I'll need to replace it with an ugly if-else chain or an ugly failure flag
Avatar
golang has a great keyword called "defer"
19:35
why is there no sich thing in c++ :(
19:35
such
Avatar
[quakenet] Learath2 BOT 2020-03-11 19:35:16Z
I'd love a break n; in C++ to break out of n blocks in general
Avatar
go handles is with those assem ly style labels.
19:35
it
19:35
break label.
Avatar
same for rust and java
Avatar
hm, nice.
19:38
defer is like encapsulating a function call in some object and calling it within the destructor of that object.
Avatar
@heinrich5991 do you recommend any rust books other than the one on the website?
Avatar
no, I learned it using a much older version of the book
19:50
and writing code in a language you want to learn is absolutely viable
19:50
*vital
19:54
@jxsl13 what do you want to achieve in rust?
Avatar
currently nothing, I'd love to take a look at the concepts used there, but have no actual project ideas yet
Avatar
you should have something to program though, otherwise language learning can be hard
Avatar
I know, especially wirh the learning curve in rust
19:56
steep
Avatar
@heinrich5991 isn't c++03 thread-safe with proper libraries, eg boost?
Avatar
@Dune no
20:02
there's even a paper about this
20:03
"Threads cannot be implemented in a library – Hans-J. Boehm"
20:04
the problem is that the language needs a memory model
20:05
and c++03 doesn't have that. you can't have thread-safety in c++11
Avatar
[quakenet] Learath2 BOT 2020-03-11 20:08:18Z
heinrich5991: when does c++ become thread-safe? c++14?
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 20:08:33Z
c++11
Avatar
[quakenet] Learath2 BOT 2020-03-11 20:09:00Z
but you said "you can't have thread-safety in c++11"
Avatar
the last sentence had a typo
20:09
meant c++03
Avatar
[quakenet] Learath2 BOT 2020-03-11 20:09:35Z
I see, is there any good reading on this? I'm interested in why a memory-model is required
Avatar
[quakenet] heinrich5991 BOT 2020-03-11 20:11:51Z
Learath2: you could read the paper I quoted :P
Avatar
@heinrich5991 does rust have somethinf like go channels?
Avatar
rust has async-await, you'd usually use this
21:02
but there are also channels in the standard library if you prefer:
21:02
Avatar
I recently learned golang and its quite enjoyanle, im using it for web backends. I might learn rust next
21:03
Enjoyable*
21:04
golang is plenty fun
Avatar
Yea it is very C like but super convenient
21:04
U can bind functions to structs
Avatar
I got a makro for if err != nil { return nil, err }
21:04
makro key
Avatar
And the interface{} and reflection are super powerul
21:05
I also like the annotation system
Avatar
I like the forced conventions
Avatar
exporting stuff
Avatar
it's only like C in its features
Avatar
I also love u import modules by their git repo
Avatar
you have a garbage collector
Avatar
[10:05 PM] Ryozuki: I also love u import modules by their git repo
google themselves just got bit by that btw
21:06
because they changed hosting providers
Avatar
Well bad for them
21:06
😅
Avatar
the gc gets improved quite well 😮
21:10
dependency management is great
21:10
defer = ❤️
21:10
python-like workflow
Avatar
I dislike both python's and go's dependency workflow
21:11
they're "better than C", but that's the best that can be said about them
21:11
there are languages with working dependency management
Avatar
go get
21:11
Bam
21:11
Done
Avatar
not centralized and the forced package naming conventions are a drawback
Avatar
U are using modern go modules right?
Avatar
that's about it?
21:12
since 1.11 you are not forced to work in the gopath ._.
Avatar
apparently something changed. can't comment about it then
21:12
according to @Ryozuki
Avatar
Yeah in 1.11 they introduced go mod tooo
21:12
Tool
Avatar
I have learnt it recently, so I can't comment on how the behaviour was pre 1.11
21:13
pythons dependency management is a paint
21:13
pain
Avatar
all I do is execute go mod init, iirc
21:14
with a name
21:14
in some project folder
21:15
and start programming in that folder
21:16
if anyone wanted to use that, the do import "github.com/jxsl13/twapi", then execute go get -d and can use that
21:16
they
Avatar
[quakenet] Learath2 BOT 2020-03-11 21:38:01Z
The more I implement the more I find in the stl implementations, gcc and clang both have caching for the hash function :/
Avatar
rabbit hole :0?
Exported 324 message(s)