« first day (1614 days earlier)      last day (3342 days later) » 

12:00 AM
All listeners attach to an object and the event queue
 
Well, you can give each type a string name and sort/collate based on that.
That's the simplest approach.
 
@LightnessRacesinOrbit Isn't that bad?
 
@Cinch Define "bad"
 
And I already have two coded in
 
@MichaelMitchell Okay, stuff is getting complicated. I did not find a compiler bug and your lambda function parameters have the wrong type
 
12:00 AM
Who has been teaching you to think in absolutes
 
@MichaelMitchell Well the way the class was structued....
 
there are no more classes
 
I hope I'll find a std:: template that allows me to get the parameter pack type of all parameters of a function
 
Let's give the full background:
 
12:01 AM
you want me to type the story of my life?
 
@Cinch: I suspect the best alternative is to use a const std::type_info (via typeid)
 
ButtonHandler handler = new ButtonHandler();
myButton.addActionListener( handler );

This code has a listener take in an object of type ButtonHandler (which is an inner class you create that handles button events)
 
lol inner class
 
If you create a room I can post what the code for the inner class looks like.
 
lol class as handler
what are you writing in, Java 7?
@jPlatte There is no such thing and can never be one.
 
12:03 AM
@Puppy 8
 
@MichaelMitchell Okay, I think I can implement this stuff if FCreate is not a function
With partial specialization
 
@Cinch But if you stick with the string variety and your message dispatcher supports, even if optionally, message serialisation for network dispatch / file-based storage, then you kill two birds with one stone by giving each message type a string ID
 
It's a shame that functions don't have that
 
sure it's a bit of boilerplate but fuck it
 
12:03 AM
But whatever, let's just check if this works
 
@jPlatte OR is superior in pretty much every case.
 
Maybe afterwards someone has an idea on how to simpliy the usage
 
until typeid(N).name() gets a useful cousin I doubt you can do better to cover both cases
 
I was working on a version of Pong that implements a event queue with event listeners that use an interface to demonstrate clarity through separation of interface and implementation. I was planning to attach to the objects Logic component within each object that can then be attached to scripts.

The problem was how the messages and listeners would interact. I store two std::strings for "type" and "subject." I was just wondering whether I could use dynamic casting/typeid or something to take the type of a structure so that I wouldn't have to make a master message class to encompass all messa
 
@Puppy What do you mean?
 
12:04 AM
@Cinch There's your mistake.
@jPlatte Overload resolution is strictly superior to partial specialization.
 
@Cinch You definitely want a base "message" class that all your message types derive with a common interface. Sounds like you already have a decent solution. I don't quite understand what you're trying to change it to
 
the only case in which it's not superior is when OR is banned by the language, which basically means just specializing Standard functions or types.
 
@LightnessRacesinOrbit The messages themselves can vary based on the information they carry.
 
@Cinch So?
Hang on, "vary" how?
 
@Cinch This is way too over-generic. There's no need to do more than boost::signals2::slot<Signature> for each event type you want to support.
 
12:05 AM
However the unpacking interface would vary or maybe that should be standardized
 
@Puppy I need specialization of function type parameters though, like std::function
 
you can't create new event types at runtime because you need code to fire and handle them.
 
@Puppy I haven't taken a look at Boost so that I could understand the problem better before looking at the solution.
 
To have the parameters of the function type available
 
Well your observers should receive const theactualmessagetype&, not const basemessage&
then it doesn't really matter
 
12:06 AM
why would you need them?
 
It's an exercise to understand how to handle events and generics.
 
@Cinch You seem to be defining the problem in the least useful, most over-general, ridiculously broad way.
 
Well the point was to be able to create a generic messaging system that encapsulates type.
 
there's no purpose in such a thing.
 
It makes adding on new types and handlers easier
 
12:08 AM
we already have a thing for that- it's called "templates" and boost::signals2::slot.
what you want to do is just re-implement templates but at runtime and much worse.
 
@Puppy But then I can extend using Python or Lua.
 
You can't do everything ever at compile-time mate
Some of us actually run our code
 
no, you really can't.
if you have a Python event handler, you can't magically wire up code to fire it.
 
code is love, code is life
2
 
Say, for example, I'm implementing a game system with different types of buffs.
 
12:09 AM
@Puppy er since when
 
every event that you fire has to have code plumbed in to know when to fire it and what information the handler needs.
 
@Cinch Then there's one event type for, I dunno, buff expired or whatever. There's no need for each individual buff to have it's own type.
 
I don't know what a "buff" is.
 
Let me elaborate.
 
12:10 AM
a status effect would be an interface which is met by all status effects; and the type of the event handlers involved is fixed (relative to that interface).
 
I wanted to create a flexible status effect system which makes extending with deep interactions easier.
 
the type of the event handlers can incorporate a downcast in the parameter. save you a job you're gonna have to do anyway.
 
For example, I use an event to "crack" a frozen person.
The Frozen buff already is here
 
that does not require any new event handler types.
 
12:11 AM
But say I want to implement a new "Fire" to unfreeze the Freeze buff.
 
1 min ago, by Lightness Races in Orbit
I don't know what a "buff" is.
 
That would mean new code.
 
yes.
 
But in C++.
 
not necessarily.
 
12:11 AM
Right well I'm just being completely ignored now. So see you later.
 
@LightnessRacesinOrbit I wanted to be able to create new status effects that can interact with each other in a flexible, organic way.
 
the Frozen buff's "buff removed" event handler doesn't need to give a shit about why it was removed.
 
It's just modules of state.
 
so when the Fire effect is applied, check if the person has the Frozen buff, and if they have it, remove it.
 
You're just chucking out words
 
12:12 AM
@Puppy No but what if different things happen if it's removed in different ways.
 
They have no meaning and no aid in explaining what you're doing!
 
The point is:
 
then that's for Fire and Frozen to give a shit about.
not the event handlers.
 
1) Support new interactions easily without disturbing current code.
 
besides
 
12:13 AM
that's not true at all
the event handlers definitely should do it
 
Can one use a read-only pipe created by CreatePipe twice?
 
Frozen is a specific type that you can simply dynamic_cast to (or lack thereof in a pointlessly dynamic language) and can have specific calls for.
 
if a third party needs to be affected as well you certainly don't want Fire and Frozen taking responsibility for that
 
Fire and Frozen are just bundles of info we use to deduce our path of action.
@Puppy No, this is wrong.
 
@Columbo Define "use". Define "twice".
 
12:14 AM
The base type is Buff.
But the Buff base type can change if I decide to add more buffs.
 
oh no, that's super bad.
 
The point is to make the system extensible.
 
WHAT THE FUCK IS A BUFF
 
@LightnessRacesinOrbit Use: Pass to ReadFile as the first argument. Twice: Two times in a row, with about 100ms time difference
 
the Buff base type should not give a shit about how many derived buffs there are or what else they can do.
 
12:14 AM
@LightnessRacesinOrbit A status effect.
 
if it does then your system is broken.
 
@Puppy Exactly.
 
right.
 
@Columbo Um. Yes?
 
@MichaelMitchell I'm about to write a FCreate implementation that I'm pretty sure will work.. But I have a question, do you want to actually have all the stuff std::bind can do or do you only want to create callables with the same call signature as the function you pass as first argument?
 
12:15 AM
@LightnessRacesinOrbit That's why I wanted to create a system where the size and organization of the message can vary so that different effects can pack its unique information along.
 
so Frozen : Buff, then if you want to do something specific to Frozen, dynamic_cast your Buff to a Frozen and call Frozen-specific methods on it.
problem solved.
 
@LightnessRacesinOrbit That's weird, because this second usage makes my child process crash immediately oO
 
same signature
 
@Columbo Then you did something wrong.
 
@LightnessRacesinOrbit It seems so, indeed.
 
12:15 AM
@Cinch I have no idea what you're saying. Can you abstract away the domain-specific buzzwords and add in some facts that are actually relevant?
 
Inside a Matrix class method, I made the line Matrix mProd(dimension) = *this; which gives the error expected a ;. What this line of code is doing is initializing a Matrix object mProd with one parameter (its dimension) and setting it equal to the calling object. I've overridden the copy constructor and assignment operator. I don't know why I'm obtaining the error.
1) it works if the line is declared Matrix mProd = *this; 2) I have the line explicit Matrix(int size = 1); in my header file. Removing the explicit keyword does not eliminate this error.
 
@jPlatte I will not need the functionality of giving the FCreate an arg like 1 or "something"
 
@MichaelMitchell Okay. I'll try the complete bind afterwards though I think. This thing is really fun (and the most mind-fucking C++ I've ever written ^^)
 
12:16 AM
im glad
 
@Puppy that's fucking horrible
 
@LightnessRacesinOrbit For example, I have a spell system that has status effects such as Freeze or Shocked or On Fire or Poisoned.
 
you shouldn't be manually downcasting to anything like that
 
I am excited to learn something new!
 
I want unique interaction between types.
 
12:16 AM
what a terrible idea
 
besides
 
But the data for each can change.
 
what it really boils down to is that if you want a pointlessly over-generalized excessively-dynamic system, write the whole thing in Python and be done with it.
 
Additionally what if I want to change how each type works?
 
13
Q: Is there a risk of inbred children with fake fatherhood?

PhilippI got an event where my wife cheated on me and got pregnant, but I was unable to proof it. So now her son is listed as my legitimate son. We appear as father and son in family trees, relationship screens etc., even though his actual biological father is definitely someone else. When I now marry...

^^ sigh...
 
12:17 AM
yeah a system written in Python will really help your C++ program
 
The point was to be able to create a C++ infrastructure that can support dyanmically-created type messages.
 
1 hour ago, by Lightness Races in Orbit
13
Q: Is there a risk of inbred children with fake fatherhood?

PhilippI got an event where my wife cheated on me and got pregnant, but I was unable to proof it. So now her son is listed as my legitimate son. We appear as father and son in family trees, relationship screens etc., even though his actual biological father is definitely someone else. When I now marry...

nice try
 
Oh, it got deleted. No wonder.
 
i.e. I can specify a new data structure type in a scripting language and then use it with the infrastructure.
 
@LightnessRacesinOrbit fuuuuuuuuuuuuuuuuuuuuuuck
 
12:18 AM
@chris Hah, that's the guy from earlier
 
@LightnessRacesinOrbit hahahaha I first thought this was IRL
 
Additionally, I can strip away the new data type without affecting any interactions that do not require it.
 
@Cinch Right, but this is fundamentally pointless and not useful.
 
@Puppy How so? If I were a game designer, I'd want to have freedom to create my own effects.
 
12:19 AM
1 hour ago, by Lightness Races in Orbit
it took me a good five minutes to figure out that this was about a game
 
@LightnessRacesinOrbit I did see a similar question, and I have no idea which book he's referencing.
 
@chris the book of herp derp gerp
 
@Puppy That way I can design and implement them dynamically as the game grows without hard updates to the base code.
 
@Cinch That does not mandate dynamically-typed messages.
 
@LightnessRacesinOrbit I know baby, I just wanted to also express my surprise :*
It's not like you're talking for everyone else
 
And I'm not reading every post
 
@Puppy No, that means I need either a common interface or a dynamic message system.
The common interface can be limiting if I design it wrong.
 
@LightnessRacesinOrbit Now that's just turning this into a personal challenge
 
@Columbo I didn't claim that I was.
 
@LightnessRacesinOrbit I know
 
12:20 AM
@Columbo Ah, so you didn't know.
 
I'm talking out of my arse
 
Therefore the alternative is to design a system flexible enough to grow organically
 
@Columbo More breaking news at 10
 
@LightnessRacesinOrbit baby, you are such a baby! ~_~ // note: the last music video you posted ...
 
@Cinch Yes, it can be. That's still a better case scenario than over-designing it in the first place, though.
 
12:21 AM
@chmod711telkitty huh
 
@Puppy The point was to learn generics though.
 
(God I'm already spelling ass incorrectly, I don't want to turn into a Brit!!)
 
it's better to refactor later when you know in more detail what your needs are than to over-generalize now.
 
And messaging.
 
@Cinch Then crack open boost::signals2.
also, they're templates, not generics.
 
12:21 AM
@Puppy But the message itself is polymorphic based on function.
Different interactions? Package different data.
 
not required unless you've fucked up pretty hard somewhere else.
 
@Puppy Why is this a bad idea, though?
 
because
 
There is LRiO-duality: I both hate and love this guy
 
firstly, if you have a few grams of sense, you will design a buff system that can meet something like 95% of all possible use cases first time.
 
12:23 AM
You people really have an obsession with talking about me. It's unhealthy. Get help.
 
secondly, if it's polymorphic and overly-dynamic, you will find it much harder to use and debug, because it won't have appropriate constraints.
 
@Puppy The point is to create an extensible system like a plugin.4
 
@LightnessRacesinOrbit It's okay babe
 
But for gameplay.
 
thirdly, you will cock it up anyway because it will turn out that you don't need polymorphic data but you need to trigger the event at a different time or whatever.
 
12:23 AM
Liro you are unusual get with that
 
@Puppy Let's try an example.
 
@Cinch That does not require dynamic message types.
 
Let
@Puppy Let's compare two different buffs: Static and Curse.
 
sure.
 
@Puppy Static goes from 0 to 100 and builds up according to other events. Curse works the same way but interacts with different attacks and amplifies damage.
 
12:25 AM
okeydokey.
 
Static will also affect skills that will look for a Static buff on the character and use its data, same for Curse, but is more general.
@Puppy They have similar capabilities but different systems.
 
Why not just get more money, keep all the bank accounts open. Not sure the effect of closing the accounts might have on a credit score, but that is my first thought is a minor ding on credit. But it might not be a credit score this affect, I believe the banks keep a different score for your banking customer worthiness. You might notice in the future that a bank decides to turn away your business because you have a history of dropping accounts. Depends on the bank, some are predatory and only want your money if they think they can bilk you into the future. — Knuckle-Dragger 5 hours ago
> Why not just get more money
> Why not just get more money
 
no, they can both use a completely identical system.
 
And then if I try to do something like Burn that might decay or ramp over time, that is an entirely different structure.
@Puppy Then I have to design two classes for different effects.
 
no, it really isn't.
@Cinch Yes, each effect with custom logic needs a place where that custom logic can go.
 
12:26 AM
What if I want a Soul-Link buff that will bind two different characters' health?
 
what about it?
 
What if I want a new Gameplay style that uses a completely new system?
i.e. Rage.
 
then you'll have to write a new system, unsurprisingly.
 
What if I want to turn multiple subsystem game systems on and off and have them work in tandem and separately?
 
then you'll need some if statements.
 
12:27 AM
What if I want to be able to have a character possess another one and take control?
That means I need to create a new lock-out system for the disable.
 
@CaptainGiraffe Who is "Liro"?
 
then you'll need some more if statements.
 
tell me what is a fucking buff for fuck's sake
 
surprise: new systems require new code.
 
The answer is more and more if but also more classes
The more systems I create, the more complexity and the code becomes bloatware.
This is bad.
 
12:28 AM
you're right and I suspect you're being trolled
not sure why you're still playing along
 
what's bad is the design of the game which is spreading like a cowpat.
 
@Puppy No. I have the view that it can be done better.
 
@Puppy yes, that's what happens when you implement the suggestions you've been making
the entire purpose of his questions is to do it better
 
@LightnessRacesinOrbit That is the eternal question. I intended it as a symbolic link to your nick.
 
well, you're pretty much wrong.
 
12:29 AM
@CaptainGiraffe ko
 
Now, instead of recompiling for each new class and new C++ code, let's script the data structures and the systems.
 
there's nothing you've mentioned that requires custom event handling arguments.
 
ln -s LRiO Liro
 
@LightnessRacesinOrbit "Player X deals 10% more damage for the next 10 seconds" that's an example of a buff
 
Each subsystem is self-contained with new interfaces that can support new interactions.
 
12:29 AM
@milleniumbug thank you
 
I.e. say I have a "Cure Poison" spell.
 
@milleniumbug what does it stand for? seems odd
 
@Cinch Which my system already supports.
 
Instead of making it cure new poisons and change it as I go along, i just make "Cure Poison" cure events with a "Poison" trait.
 
I have a whole directory, but lets not go there
 
12:30 AM
don't need that.
 
Now I can implement 100 different types of poison that can be unique.
 
@CaptainGiraffe heh
 
@LightnessRacesinOrbit Not quite sure - it's a gaming slang
 
a folder of my photos? :P
@milleniumbug odd
 
just add a Poison interface, and then when Cure is triggered, go through all the buffs on the character and call their Cure method.
 
12:31 AM
They can opt-in and opt-out of cross-system interaction.
@Puppy Yes, but what if the nature of the poison changes and requires refactoring the poison interface?
 
oh no, you'll have to refactor?
 
refactoring is, well, a fact of programming, you can't avoid it at all.
2
 
@LightnessRacesinOrbit The point is, instead of making a grand interface, let's poll for type and information. If it exists, we use it. If not, our code is still fine because it's not required to use it.
 
12:31 AM
what the hell
 
@Cinch That should be a quality of the poison anyway. Like every n seconds, the poison goes down by 1.
 
stop being so irresponsibly wrong when pretending you are an authority!
 
@Cinch The problem is that you're trying to write code without writing code.
 
@Cinch dynamic_cast can already poll for type information.
 
GOT MY STARS BACK
 
12:32 AM
right.
 
@DonLarynx Yes, but what if I want to code poison that interacts with other types of poison to create a new type of poison that's more deadly, like chemical reactions?
 
every time you want to make a change or add a new feature, you have to refactor or write new code and that's an unavoidable fact.
 
@milleniumbug No, he's trying to minimise the cost in having to write code that comes with extending or scaling his system with new variants. Completely reasonable.
 
@Cinch Then do it
 
@JerryCoffin Not really though
 
12:33 AM
@DonLarynx that means a new class.
 
@Cinch Then go through the Buff set and dynamic_cast them to the other types or interfaces you're looking for.
@Cinch Oh noes, you actually had to write code?!
 
@Cinch How many classes do you think Windows has?
hint: it's not 10
(or a small number)
 
@DonLarynx Less classes = better to me.
Less code = less to make mistakes on.
 
I'm going to come back when Puppy's finished lecturing people on how to be shitty programmers.
 
@Cinch Be more concerned about finishing, and then simplify.
 
12:33 AM
less classes != less code.
 
@Puppy You're right.
 
more individual classes typically means less code, as the interfaces are stricter and more tightly focused.
 
@Puppy I just want to move the code so that it makes changing existing systems easier.
I want a flexible system that can evolve as needed.
 
you cannot write code that automagically refactors itself and trying to do so will just make your life much worse.
 
@Cinch It's hard work. You're going to have to write everything out, and then you can simplify.
 
12:34 AM
the more flexible the system is, the harder it is to pin down it's behaviour and actually understand what it does or make changes to it.
 
@Puppy No, I want editing the system to be easy, so I can write something like this:
 
@Puppy which explains how you are so limber
 
systems should be as narrow as possible, not as flexible as possible.
it makes working with them much easier.
 
Poison. PH level, acid level, burn level, pointer to last person targeted.
 
@MichaelMitchell I made it compile!! :D
 
12:35 AM
YEY!
 
Although it doesn't seem to work?!
 
When the PH level and acid level equalize, destroy poison.
 
@Jefffrey don't bother he's on a vendetta and won't listen to reason
 
Oh wait
 
12:35 AM
If burn, refresh last person targeted.
 
long ago realised that
 
I can implement a whole new PH system using only type tags and keywords and scripting.
 
sounds to me perfectly achievable by simply deriving from an existing status effect interface.
 
Ooooh, it does work!
 
@Cinch Write in Python
 
12:36 AM
@Cinch You could do, but it will be unreadable and unmaintainable and you'll be lucky if it ever works as it should do.
 
@Puppy But does the interface for Poison allow for interaction with Spiritual Faith?
 
I just never touched the lambda and that does stuff I didn't expect
 
Crazy, wacky things you can't perceive.
 
@Cinch Yes, it does. All virtual interfaces support dynamic_cast you know.
 
@Cinch I think the amount of characters you have typed in the last 15 minutes exceeds the number of characters that your code would have taken up.
 
12:37 AM
lol
 
@Puppy But if the base class is not flexible enough that means we have to redo.
 
I can't wait for my brain to melt
 
ugh dynamic_cast
IGNORE THIS GUY!!!!!!! ffs
 
@Cinch The same holds true of any dynamic interface you create in Python.
 
why are you spending all your time engaging with this nonsense and ignoring everybody else
 
12:38 AM
@Puppy So I moved to the next level and started parameterizing type and type-specific data.
 
and like I said, you'll never get anywhere if you're afraid of refactoring since like 90% of development work is just refactoring existing code.
 
@MichaelMitchell Do you actually want the lambda returned from FCreate to only return true or false, depending on whether the call succeeded?
 
@Puppy only if you suck deeply. honestly, if 90% of your work is refactoring your previous work, you're a fucking idiot.
 
@Cinch That is not the "next" level. That is the "Nobody knows what the fuck is going on" level.
 
12:38 AM
@Puppy 10% is design to prevent refactoring.
 
design does not prevent refactoring.
 
@MichaelMitchell But the return value of the called function is discarded :(
 
since it is a callback system, it should only be getting void functions anyways
 
@Puppy bad design creates refactoring.
 
yeah
thats ok
 
12:38 AM
and have you never heard of API stability?
 
nope.
 
Okay, but then other functions should not be allowed
 
perfectly good designs need refactoring too.
 
not nearly as much, they don't
 
12:39 AM
I'll rewrite a bit stuff
 
I have a question about humor
 
this 90% figure is totally ludicrous
 
lol ok
 
but nobody's listening
@Jefffrey heh
 
@Puppy ...this means the design broke.
 
12:39 AM
@Cinch well, requirements can change. you can't predict every future need. but nowhere near 90%
 
@Cinch No, it doesn't. It just means that the requirements evolved, which is a completely different thing.
 
So many of my friends like fart jokes and laugh at themselves farting
 
however yes it does usually mean that the design broke
 
Am I weird if I don't?
 
I wanted a completely flexible system for creation of unique interactions in unique ways.
 
12:40 AM
probably because you used a long sequence of dynamic_cast attempts and if statements
because you were listening to Puppy only
 
you want the impossible.
 
@LightnessRacesinOrbit Yeah, I wanted to avoid this.
I realized I would've done this and I didn't do it.
 
nobody has ever created any system that does not require refactoring.
 
@Jefffrey No. They are not funny.
 
and everybody who tried regretted it deeply.
 
12:40 AM
@Jefffrey It's usually a sign of reduced intelligence, IME.
 
@Puppy ...
 
if you don't want to refactor all your code, then you haven't learned enough since you wrote it.
 
Some of these are actually people I usually consider smart
 
@Cinch honestly, please. STAHP. i know he sounds authoritative but he's leading you so far astray :(
 
12:41 AM
@LightnessRacesinOrbit ikr he says refactoring is a GOOD sign.
2
 
@Jefffrey well it's all relative I suppose
 
lol
 
@Jefffrey It's not that I find farting funny, it's just that I'm not sure if I consider any other reaction to be appropriate. Farting is just awkward.
 
refactoring means that you know enough to know what you did before is bad.
 
It is possible to, y'know, not fart.
 
12:41 AM
It's a sign of growth but that means you were bad before.
 
There's been a lot of words these past few hours but did you know
rum
 
@LightnessRacesinOrbit yes I fart out of my nose silently over 5 minutes instead.
 
or, what's often more likely, the requirements simply changed instead.
 
do you people ever sleep... it's after midnight there
 
12:42 AM
@Mgetz It's 2:42 PM here.
 
@Puppy Never looked at it that way
 
@Puppy which is another thing you try to avoid by doing a proper capture in the first place
 
Also sure you can avoid refactoring if the deadline is passed twice and you're overbudget you don't have time for refactoring shit
 
@LightnessRacesinOrbit This is what I was trying to do by making a generic system.
 
refactoring costs time and therefore money. any company refactoring 90% of the time would be bust in a heartbeat what the hell's wrong with you
 
12:43 AM
@Cinch 6:43pm here
 
But seriously
 
@Cinch yeah, I got it.
 
@CatPlusPlus How did the meeting go?
 
but it's past midnight in europe
 
12:43 AM
refactoring is a fact of programming, it happens all the time, and the best way to handle it is to strictly limit all your interfaces as much as you can so that when you have to refactor, it's easier to put the pieces back together.
 
that's somewhat true
certainly a lot more true than the other bullcrap you've been spewing the last half hour or so
 
@Puppy Dude, refactoring is caused when your interface was too limiting or performance.
 
@LightnessRacesinOrbit I never refactor, I merely alter to suit new requirements
 
inb4 requirements changed!!!!!111 sidfuhgasd
 
it may look very very similar
but it's not the same
 
12:44 AM
It's also called when it's been beat by the ugly stick.
 
@Mgetz I don't see the distinction.
 
@LightnessRacesinOrbit WE HAVE A WINNER
 
thanks for the star, Cat
 
And by the way the system that covers everything and never needs to be refactored would be the #1 standard... forever.
 
I starred nothin
 
12:44 AM
the distinction is one the business will allow you to do
 
the other is just scoped in to dev
 
Oh and completely unrelated.
 
I recently started getting through to management such that they allow me to put substantial refactoring stories on the backlog. Just when I was getting good at absorbing them into in-team work. heh
 
12:45 AM
Fuck programming IT projects clients and everything else too
 
I still need to learn about unit tests.
 
We do have a couple of components that need some refactoring internally. Nothing extreme. Just they've unexpectedly grown beyond initial sane capacity and could be a lot easier to maintain. We'll probably do that sort of thing 2%, 3% of the time at most.
 
Back to generic messaging, I was wondering whether an interface would be good to determine message type.
 
The initial architecture design and requirements captures were done with sufficient intelligence that no requirements change within the scope of the business case could fundamentally break the whole codebase and require 90% refactoring time
 
@MichaelMitchell It works, I'm done, but I can't get Coliru to work :d
 
12:47 AM
That's a little thing called "being a software developer"
 
But then I realized that interfaces can again be outgrown and so I should try to dynamically cast for speed and flexibility.
But dynamic cast can be bad.
 
I wish I wasnt
 
try pasting it on this
then clicking share
or is that not your issue?
 
That's exactly what I did ^^
 
12:47 AM
@CatPlusPlus then quit
 
And do what
 
@Cinch Interfaces being too limiting or not being expressed in the way you need now happens all the time and there's nothing anybody can do to stop it.
 
Let me try a different browser
 
@jPlatte WFM. What's wrong?
 
12:48 AM
NoScript only blocks google analytics there, so it should be fine, but I'll try anyway
 
the only thing people achieved by making their interfaces overly-generic is making them hard to debug and hard to refactor.
 
@Puppy lol that entirely vacuous statement
 
I looked at void* initially and I found it was terrible and unsafe and just NO.
 
@Puppy "When you do something too much, you suffer consequences." Well, yes, that's the definition of "too much" you nincompoop!
 
@LightnessRacesinOrbit Nothing happens when I press one of the buttons on Coliru
 
12:48 AM
hmm
 
And then I looked at dynamic_casting. Looks fair and interesting but idk what happens if it can go wrong.
can I do this?
 
pastebin?
 
besides I generally found that extending in Python or Lua was simply not worth the effort and it's a lot better to just use C++.
 
Okay, works in Chromium
BEHOLD
 
dynamic_cast<Event*> whatever_event == this_type?
 
12:49 AM
hooray
 
Everyone loves extending in cplusplus
 
sound of my brain melting
 
@jPlatte norepro
 
I think I need more rum
 
12:49 AM
@MichaelMitchell Just look at main() and admire the ease of use *-*
 
lol
I am
 
Okay I remember where I was now.
I was looking at the message class and about to create an inheritance/polymorphic hierarchy of classes for new message types.
 
Creating good abstraction is so hard.
 
And then I realize I should just parameterize type and then package the data.
 
@Puppy You can't change the C++ code after you release and ship to a customer, bub.
 
12:50 AM
So I decided on using std::string for type tags and Boost.Any to package type.
Is this good or bad?
 
@jPlatte why is there no need for the && with Args?
 
Okay. So then I was going to receive the message and then...
Idk I feel checking a string would be slower than dynamic_cast.
 
@MichaelMitchell return [=](Args&&... args) {
 
@MichaelMitchell I didn't remove it where I think it makes sense
 
12:51 AM
@MichaelMitchell But there's no use at all in having it in the template params
 
It did cause problems elsewhere, so I removed it after thinking about it
 
what is the deal with the ->*
 
It's 2am
I need to work
 
its that a single operator
or -> and *
 
12:52 AM
Fuckin shit
 
How do I check if a pointer points to a class of type T?
 
@Cinch Define "slower". It's a pros vs cons thing. Yes, comparing two strings is probably slower than a single dynamic_cast. But you have every other single factor to weigh up too.
 
Dynamically?
 
I assume it is the arrow operator and the dereference operator
 
dynamic_cast
 
12:52 AM
@MichaelMitchell It's a single operator en.cppreference.com/w/cpp/language/operator_member_access
 
dynamic barf
 
@MichaelMitchell No, it's not.
 
I wonder, is it possible to specify a data structure at runtime?
 
:D
 
12:53 AM
too much mind blow for one day
 
@MichaelMitchell I wrote about that before
 
What's ->*?
 
I saw, but I looked it up and found nothing
@Jefffrey witchcraft
 
>:(
 
I could create a linked list of binary data and then mask it based on type?
 
12:53 AM
@Jefffrey pointer-to-member through pointer to object
 
I posted a link to the reference about a minute ago
 
That's not an operator
 
It is
 
@Jefffrey Yes, it is.
 
lol flagging idiots
 
(the last operator in the list)
 
Man its so cool how you can search the chat transcript
 
lol flashing fucking gif idiots get it off my screen
 
12:54 AM
aren't you the one usually bitching about GIFs in chat
 
I honestly thought flagging it would make it go away, I was wrong, and sad, very, very sad
 
anyways I gotta go to C++ class now.
Cheers
 
@Pris more or less
 
And morons validating it :allears:
 
12:55 AM
snack overflow chat
 
@LightnessRacesinOrbit bye
 
in nutshell
 
@CatPlusPlus yes, call everybody who calls you out on your shit "idiots" and "morons". endearing.
 
Shut up lrio
laff
 
"shut up" also endearing
gg
 
12:56 AM
no re?
 
hmm?
Cat are you coming to Unconference this year?
 
how come
hello I said how come
 
@jPlatte what does -pedantic option do?
 
turns on Loungers
 
12:58 AM
I came for the flags :O
 
did you enjoy
 
please expand?
 
@MichaelMitchell read the documentation?
 
@MichaelMitchell (I didn't add that, but) it enables warning about non-standard features
 
12:59 AM
there is no need to duplicate it here. someone spent a lot of time preparing it
 
@jPlatte I'm still not sure what is does.
 
I've read it 3 times.
 
@LightnessRacesinOrbit it helps to know what it does in this case.
 

« first day (1614 days earlier)      last day (3342 days later) »