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-01-12 00:00:00Z and 2020-01-13 00:00:00Z
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:01:55Z
Oy: I'd like to introduce c++11 dependence with some patch, so we can get some thread safety into teeworlds. is that okay?
00:02
it would get us e.g. std::shared_ptr and atomic variables
Avatar
[quakenet] Dune BOT 2020-01-12 00:02:24Z
huuh :(
00:02
it would get us a lot of bad practices too
00:02
that's a controversial one :p
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:03:07Z
currently the code around threads is bad
Avatar
[quakenet] Dune BOT 2020-01-12 00:04:20Z
I don't deny that, but a lot of cpp11 additions are undesirable in a project with the philosophy of Teeworlds. Once you accept cpp11, it's harder to say no to people for using auto, abusing lambdas etc.
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:04:45Z
e.g. the m_Shutdown variable in CJobPool is (according to the standard) undefined behavior
Avatar
[quakenet] Dune BOT 2020-01-12 00:04:56Z
is there no way around that in c++03?
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:05:25Z
c++03 doesn't have a threading model
00:05
it pretends threading does not exist
Avatar
pls add threadsafty..
Avatar
[quakenet] Dune BOT 2020-01-12 00:05:31Z
Teeworlds benefit(ed) from a simple, easy code base
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:05:39Z
no, there is no way around it in c++03
Avatar
[quakenet] Dune BOT 2020-01-12 00:05:55Z
so you can't thread properly in C?
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:06:05Z
C11 also brings thread support
Avatar
[quakenet] Dune BOT 2020-01-12 00:06:15Z
ah I see :)
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:06:42Z
but it is less widely supported than C++11 IIRC (e.g. msvc++)
Avatar
[quakenet] Dune BOT 2020-01-12 00:06:58Z
C11 is not supported by msvc?
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:07:10Z
at least not until very recently. let me check
Avatar
@heinrich5991 i found another way now, but still thanks!
Avatar
[quakenet] Dune BOT 2020-01-12 00:07:33Z
we don't have extern C code anymore in Teeworlds right
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:07:44Z
we have some
Avatar
btw, discords working again
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:08:05Z
some of our own code, and our dependencies
Avatar
[quakenet] Dune BOT 2020-01-12 00:08:19Z
grep "extern C" returned no result
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:08:45Z
grep "extern "C""
Avatar
[quakenet] Dune BOT 2020-01-12 00:09:02Z
ah, mi bad :)
00:10
so no, not supported
Avatar
[quakenet] Dune BOT 2020-01-12 00:10:45Z
ugh :(
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:10:59Z
(but that's different from C++11, which is supported)
00:11
C++11 can work together with C90/C99 with no problems
Avatar
[quakenet] Dune BOT 2020-01-12 00:11:24Z
yeah I know
Avatar
access to sockets should be threadsafe, I'd guess
00:11
printing to console maybe as well ._.?
Avatar
no, printing to console is not
Avatar
I don't see Teeworlds having performance issue with those things anyway
Avatar
I'm running db access in separate threads and the main thread, which is tries to aquire mutexes and if it fails, the main thread's not blocked, if it succeeds it simply processes message queues :o, so threads make sense, if one would like to access e.g. current worldinformation, train his bot detection, etc in a different thread
Avatar
[quakenet] Oy BOT 2020-01-12 00:16:24Z
would rather stick to c++03, if it's not really necessary
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:16:33Z
hm ok
00:20
the problem with the current CJob interface is that you must guarantee that your CJob struct does not move (or is deallocated) until the job finishes
00:21
that means that if you cannot have a CJob in a structure which is freed before program termination
00:21
-if
Avatar
that means I need to know the exact amount of requests I want to make a the same time at compile time
Avatar
[quakenet] Oy BOT 2020-01-12 00:32:55Z
that's not a problem for teeworlds currently right?
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:33:36Z
I checked all the usages of CJob, they look safe
00:34
the favorites name lookup could benefit from parallelism, which isn't really possible right now
Avatar
why favorites in particular?
Avatar
[quakenet] heinrich5991 BOT 2020-01-12 00:35:08Z
the three things that use engine jobs right now are: 1) master server name lookup 2) favorite name lookup 3) sound loading
00:35
master server name lookup and sound loading use one CJob per task
00:35
favorite name lookup uses one CJob for all favorites
Avatar
right now the jobpool is only using one thread anyway 😄
Avatar
[quakenet] day BOT 2020-01-12 09:29:28Z
Dune: no, i only own one xbox360 controller
Avatar
do you consider practices like 'auto' undesirable?
13:52
std::vector<std::pair<int, CCharacter*>>::iterator it vs auto it
Avatar
in some cases, they're fine imo. iterators especially, because of nested templates like that
Avatar
exactly, i think iterators are the most common use case
Avatar
don't need it for iterators I think because you have for loop sugar in c++11?
Avatar
I don't see it being used very often for some reason I don't know
Avatar
for(auto it : vector)
Avatar
for(const int &i : v)
13:55
no need for an explicit iterator there
Avatar
uh, i didn't know that, that's nice
13:56
std::for_each() for the java people i guess <.<
Avatar
for (String item : someList) { System.out.println(item); }
13:57
java had it before c++
Avatar
i know, c++ has it since c++11
Avatar
yes, but we don't use c++11
13:58
dunno what you mean with std::for_each() for the java people
Avatar
I usually only need C++ features like map (or hashmap), iterators, shared pointers and (unfortunately) vectors
Avatar
why unfortunately vectors?
Avatar
those sound better than c++'s hash map support
Avatar
vectors are like a standard container
Avatar
Maybe lets dump c++ and recode teeworlds on lolcode
Avatar
you can often optimize by using another container
Avatar
I'd say vectors are still the most needed container
Avatar
and the least flawed, saved for the string :p
Avatar
instead of using an array for all the Entities, you could use a quadtree and optimize all collision loops, but I always wondered if teeworlds would benefit
14:04
this would require some benchmarks, too
14:05
to be more on topic: I think a greater benefit would be better string rendering xD
Avatar
for the c++17 people for(auto&[key value]: map)
Avatar
where is the masterserver requests located? retrieving server list etc?
16:40
are
Avatar
@jxsl13 the requests are located in src/engine/client/serverbrowser.cpp, the response parsing is done in src/engine/client/client.cpp
Avatar
does someone remember when I complained about the Dynamic Camera, that it feels like laging when I spin around with it? seems like Fullscreen is the reason for it, window mode fixed my problem but still dont know why it's so "laggy" with fullscreen (edited)
Avatar
@ShootXen disable vsync
Avatar
it's already
Avatar
enable then
Avatar
can't game itself runs like 30fps for me then
Avatar
[quakenet] Oy BOT 2020-01-12 17:24:45Z
a script that fixes style issues would be nice
Avatar
it's not that easy, unfortunately
17:33
I tried writing a script that detects style issues, and even that was quite hard
Avatar
C++ is notoriously hard to parse :/
Avatar
I did it with libclang
17:45
C++ is undecidable to parse
Avatar
[quakenet] Oy BOT 2020-01-12 17:46:23Z
yeah, lots of cases you have to consider
17:48
could do it step by step
17:50
this extracts all identifiers from the teeworlds source code
17:50
I think Learath2 wrote something to parse its output
Avatar
clang-format does a good job... but it forces spaces after and before most operators, which basically means reformatting the entire codebase =\
Avatar
I thought it was about identifiers 😮
Avatar
Just detection would be fine imo
Avatar
oh didn't read that... that's another thing 😄
Avatar
[quakenet] Oy BOT 2020-01-12 17:53:53Z
cool that would help with BE or AE
Exported 114 message(s)