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-07-24 00:00:00Z and 2019-07-25 00:00:00Z
00:12
but very expensive
00:16
or maybe not
Avatar
@coffee, now that I updated to master we can work on it :)
04:49
My server is running 24/7 now, will probably make some improvements/ changes next week
Avatar
I talked to coffee (creator of both mods) and he said it is okay to use zoom on the mods, also: eye emotes work there so the eye wheel is also supported. I have updated both mods to ddnet master so they have all the new stuff
Avatar
5c280a3 Fix blockZ and infectionZ - fokkonaut 898e6ca Merge #1851 - bors[bot]
Avatar
[quakenet] Learath2 BOT 2019-07-24 13:08:23Z
C++ classes are really quite lacking for reliable software
13:08
s/$/ development/
13:09
A failure in the constructor is very hard to communicate up the stack
13:09
Exceptions/decoupling error handling from error detection, is also quite an unwise pattern
13:11
OOP in general is quite unwieldy...
Avatar
[quakenet] deen BOT 2019-07-24 14:06:32Z
having 50 manual error checks is also unwieldy compared to a single catch
Avatar
[quakenet] Learath2 BOT 2019-07-24 14:18:25Z
50 manual error checks that know the context of the error and are easy to spot if missing
14:19
exceptions can travel all the way up the stack if you forget to handle some and it's not so easy to know from a glance what exceptions can arise from calling a function
Avatar
what exactly does %current% do as entities background? Does it allow to see the quads layers that are placed before the game group or all other quad layers too?
Avatar
It uses the current map as your entities background
14:22
Same rules as for any other map too
14:22
Nothing in front of game is displayed
14:23
Thats why i told you before, it doesnt work for your servers with Movable objects. You would need to play both; one layer behind and one in front of game
Avatar
@qshar you can set whatever bg you want
14:25
With this
Avatar
@n000b sorry that was absolutely not helpful
Avatar
ye, thats sad. Is it hard to implement such option to display all quad layers with entities?
14:26
bg means behind the game layer - so it doesn't fit
14:26
shouldn't be hard
Avatar
this is very simple
Avatar
Can I ask anyone to create such pull request? Or advice me where to take a look (I found something in background.cpp, bit still not sure)
Avatar
[quakenet] Learath2 BOT 2019-07-24 14:36:35Z
C++ ppl: "exceptions should only be used in exceptional situations" Also C++ ppl: "Only way to fail in a constructor is an exception"
14:36
@qshar: What are you trying? Maybe I can give you a pointer
Avatar
I'm trying to make quads layers visible when you play with entities. It should help many pros to play maps with moving objects using entities
14:44
In my mod there is a map configuration that says that the map is using this modification, so it can be used to enable this by default. Or in the background entities setting can be set to something like %quads% to see all quads layers of this map
Avatar
@Ryozuki nice duplicate
Avatar
is it already there?
16:06
xd
16:06
i didnt see it
Avatar
Before this was set in RenderDDRaceEffects(), but that function is only called if m_pClient->m_Snap.m_pLocalCharacter exists, which isn't the case in spectator/pause.
Avatar
dont worry i remove it
Avatar
my fix is better, because the timer itself has nothing to do with the DDRaceEffects, calling that agin would make no sense
Avatar
why u open a issue if u fix it urself tho?
16:07
its useless
Avatar
i opened the issue, the though mh i could try to fix it
16:07
then fixed it
16:07
not useless
Avatar
I just read a piece about how to check errors in a std::ifstream properly, much more convoluted then I imagined
16:40
Did you know that errno is only set if badbit is set? Not if failbit is set
Avatar
Introducing the first preview release of Fedora CoreOS, a new Fedora edition built for running containerized workloads securely and at scale.
Avatar
@Learath2 @heinrich5991 @ChillerDragon So i´ve just tried the new power brick nothing changed... 😦 So my raspi is dead, actually this piece of sh.. never worked...
Avatar
Hmm, it's pretty rare that a raspi is DOA
19:53
@moris unlucky 😦
Avatar
[quakenet] deen BOT 2019-07-24 20:03:29Z
cruzomat: Might want to try another cable
Avatar
@Learath2 the solution to that is: don't do nontrivial work in constructors
Avatar
@heinrich5991 then you can have an object in invalid state
Avatar
can you give an example?
Avatar
e.g. I have a socket class, if it can't acquire a socket from the OS, it's left in a broken state
Avatar
then you can add a private constructor that just takes the fd and a static member function that creates a socket
Avatar
I don't like compensating for the shortcomings of languages
Avatar
Just throw an exception from the constructor: https://isocpp.org/wiki/faq/exceptions#ctors-can-throw
Avatar
I already do have a static optional<T> create()
Avatar
only destructors are bad, see the next question in the FAQ
Avatar
I don't like the exception pattern to begin with, but yes, it's the only proper solution in C++
Avatar
with static member functions and trivial constructors, you basically mirror what rust does
Avatar
I think the constructor should be private tbh
20:13
in that case atleast
20:13
The thing we are trying to avoid is that state where an object is constructed but isn't yet valid
Avatar
But yeah, I also get pissed when exceptions are thrown all the time in regular usage
20:14
Because when I notice some exception that's not traced properly, I use gdb and "catch throw"
Avatar
that works? ^^
Avatar
yes, very cool
20:15
then I get a backtrace for every exception
Avatar
I don't really like decoupling the errors from their context
Avatar
So you want to handle potential failure in every possible location separately?
Avatar
@deen I mean it's how I've been going about it for quite some time now, a lot of programs do that
Avatar
Yes, and sometimes it makes sense. But if some kind of error has the same handling all the time, why repeat yourself?
20:17
then people used the "goto failure" pattern and that's what exceptions give you but more generalized and safer
20:17
And what if you forget to handle an error one time?
Avatar
Well is it really safer?
Avatar
In our case we have a component with lots of code by dozens of developers
20:18
and by having a catch(std::exception) around the central calling place we can make sure that no exceptions will leave
Avatar
goto's can't get out of the functions bounds
20:19
Besides if exceptions even travel up a couple frames it becomes really not obvious how to handle them
20:19
As you lose context
20:20
They are indeed very useful when throwing things together, a very easy to work with pattern, but when you want to make sure things happen a certain way, I think it's harder to read
Avatar
at least catch and log them is good for us already
Avatar
Well tbh, what do I know, you work on software that needs to be much more reliable then what I write
Avatar
Nah, that's not a good argument in my favour 😄
20:21
Using exceptions for error handling makes your code simpler, cleaner, and less likely to miss errors. But what’s wrong with “good old errno and if-statements”? The basic answer is: Using those, your error handling and your normal code are closely intertwined. That way, your code gets messy and it becomes hard to ensure that you have dealt with all errors
https://isocpp.org/wiki/faq/exceptions#why-exceptions
Avatar
Was reading around today, find if anyone else thought along my line and found this http://250bpm.com/blog:4
Avatar
i remember that post
Avatar
Well I guess it depends a lot on how well versed you are in a language, I find it's clearer with the if(!foo()){ handle_error(); } but that might just be bias on my part
20:24
rather the pattern then the language, to be more precise
Avatar
I guess that also applies to any readability argument, experience factors in heavily and thus the argument is quite subjective
Exported 98 message(s)