« first day (1134 days earlier)      last day (3820 days later) » 

3:00 AM
If you have types, you can just use is_base_of vOv
 
@ScottW yeah, that surprised me a little
 
user3010322
But since dynamic_cast fails with a compile-time error when presented with two completely unrelated plans, Step 1 fails miserably. =/
 
std::is_base_of even works with MI.
which I thought was neat
 
user3010322
@Rapptz y it no in type_id :c
 
herm
 
3:02 AM
it
 
user3010322
crab
 
I'm trying to transport 2 templates so I can do a dynamic_cast to check if one is derived from the other.
 
.com
 
@StackedCrooked ikr
 
@ThePhD I don't get it this.
 
user3010322
3:02 AM
:c
 
that's literally std::is_base_of btw
 
user3010322
Yes, I realize that now ._.
 
Allow me to interrupt your conversation because I'm the most important, apparently.
 
also it's <Derived, Base> not <Base, Derived>
It has bit me in the butt a few times.
 
@Rapptz lol your butt
 
3:04 AM
I SAID WHAT WHAT IN THE BUTT
 
user3010322
struct any_storage {
	virtual void* data( ) = 0;
	virtual any_storage* copy( ) = 0;
	virtual ~any_storage( );
};
 
@Rapptz I just treat it as ln: just give up and don't bother memorising the order, or thinking you can remember it this one time.
 
user3010322
I want to make one of those virtuals take a goddman template. D:<
 
@ThePhD Impossibru.
 
@Rapptz Think of it as DB as in database. (Which doesn't make sense.)
 
user3010322
3:04 AM
There HAS to be a way to transport a type up through a virtual function?!
 
Structs can have virtuals?
 
@ThePhD No, there doesn't.
 
user3010322
Arrrrrrrrrgh
 
@Radnyx structs are just classes with default public instead of private
 
@Radnyx Structs are classes are structs.
 
user3010322
3:05 AM
FFFFFFFFFFFFf
 
Oh wait, I forgot you could inherit.
Nevermind.
 
@Radnyx Structs can inherit classes which inherit structs that have virtuals.
 
user3010322
SEE PLUS PLUS, WHHHY
 
wait, wait
wat's this
my Internets is going at a whole 350kb/s!
 
@DeadMG In the bait?
 
user3010322
3:06 AM
@R.MartinhoFernandes Slow down there, mate.
 
@ThePhD Because they didn't want to enforce implementations to build RTTI trees.
 
user3010322
C++ is a dirty whore that still expects me to love it even after it gives me shitty runtime fun D:<
 
Still beautiful to my eyes.
 
compile time is where the fun is at anyway
 
3:07 AM
@ScottW Don't be ashamed dear
 
user3010322
There's fun to be had at both ends, damnit!
 
honestly, if you're compiling with Clang or GCC you can get away with this.
but if you're on MSVC then no
 
user3010322
How would you get away with it
 
user3010322
in GCC?
 
got Super Mario 3D World
time to play video games
see ya
 
user3010322
3:08 AM
@Rapptz You sellout.
 
@ThePhD It packs the info into the type_infos (ABI and shit)
 
the Itanium ABI requires dynamic_cast<T>(obj) to be implemented as basically dynamic_cast(typeinfo(T), typeinfo(obj))
 
@ThePhD it looks fun, sue me
 
user3010322
But let me guess, MSVC can't do it because...
 
user3010322
...... ... Shrug.
 
3:09 AM
it's MSVC
 
well, they probably can do it, but they don't specify their ABI.
so there's no way to actually know if MSVC is capable of it.
 
@DeadMG Kinda hard to implement it without that info anyway.
 
What's up with the "no-questions" tag?
 
user3010322
It's probably there.
 
@R.MartinhoFernandes I concur- it's the most obvious implementation of dynamic_cast.
 
3:10 AM
@Radnyx it's up!
 
user3010322
Just hidden behind layers of proprietary crap.
 
and AFAIK, it's basically completely required for exceptions.
 
@Radnyx You just asked a question. I hope you are ready to face the consequences.
15
 
user3010322
Well.
 
Oh dear.
 
user3010322
3:11 AM
This throws a wrench in my fun.
 
oh, yeah.
 
user3010322
I'm gonna... I'm gonna go be depressed somewhere.
 
technically, you could try throwing the object as an exception.
as long as you're happy returning by value.
 
holy shit, I'm in-fucking-sane.
5
 
user3010322
3:11 AM
=l
 
user3010322
I'm not that desperate.
 
IT'S GOING TO BE FUN
 
Now I want to implement that.
 
@R.MartinhoFernandes Me too!
 
user3010322
Rubs face.
 
user3010322
3:12 AM
So, you create a virtual function that throws the type,
 
user3010322
and then you put the T to catch that type?
 
then catch(Base& obj) { return &obj; } catch(...) { return nullptr; }.
 
user3010322
And then a catch (...) to catch everything else and return false?
 
oh man
I'm so glad I came up with this plan.
 
user3010322
Doing it.
 
3:13 AM
exceptions are fucking awesome.
 
user3010322
I will regret nothing.
 
So I was thinking.
 
@DeadMG Careful, dangling ref.
 
@StackedCrooked lol
 
@R.MartinhoFernandes Ohyeah.
could you throw a pointer instead?
 
3:14 AM
Hmm, yeah.
 
does the Standard require that if you throw Derived*, you can catch Base*?
 
yeah.
I want it known that I came up with this strategy.
 
Oh yeah, about the standard.
 
@Radnyx Another question?
Watch your step...
 
user3010322
3:15 AM
@DeadMG "DeadMG is fucking crazy" will be the function's documentation.
 
How'd you guess?
 
;)
 
hey
 
Erhm.
 
you've got to admit
I am a fucking genius.
 
3:15 AM
 
I'll just format it so that it won't be a question, ehhgh.
 
Taste the comic sans rainbow.
Ah, wrong one :\
Underscores, y u no underline.
 
Someone should make a Comic Sans Mono.
Maybe the Cat would use it for a year thinking it's Courier New.
 
user3010322
Heh.
 
@R.MartinhoFernandes heheh
 
3:16 AM
I wonder if I can remake the orange color I used to have.
 
I see people using std::really_awesome_thing a lot. And I've searched everything so I can "update" my standard library. But, eh, no luck.
 
lol
 
@Radnyx Your std:: implementation is provided by your compiler, I think.
 
@DavidKron No way.
 
3:17 AM
I'm using the latest G++ version.
MinGW, really.
 
@R.MartinhoFernandes Funny thing is that it actually...looks preatty good
 
@DavidKron It does.
On the subject of fonts, I've been using this one in my IDE, and I like it.
http://www.marksimonson.com/fonts/view/anonymous-pro
 
IT WORKS
at least with G++ it seems.
 
So, I'm assuming that in order for me to get said std::gnarly_implementation, I'd have to use something paired with a different compiler. ( <- pretend there's a question mark )
 
@DeadMG I see no non-portable behaviour.
 
3:20 AM
I agree.
except for the part where IDK if throwing Derived* means you can catch Base*.
 
Well, with MSVC you never know, so I'd still test it.
@DeadMG Yes.
 
I don't think that should be limited to Derived& and Base&.
 
but you never know with Standard.
 
user3010322
@DeadMG ....
 
user3010322
3:20 AM
...... Facepalm.
 
You'd figure it'd be based off some sort of standard.
 
user3010322
I can't believe it actually works.
 
@Radnyx This one has everything you need nuwen.net/mingw.html
Can't get much better than that atm.
 
user3010322
@DeadMG Hey, I'm gonna post a StackOverflow Question about it
 
user3010322
I want you to post your answer
 
user3010322
3:21 AM
and I'm going to upvote the shit out of you
 
I actually have g++ setup with vstudio that i sometimes use
 
user3010322
and make @LightnessRacesinOrbit have a conniption.
 
lol
 
user3010322
Also, in MSVC, doesn't SEH exceptions have no overhead?
 
user3010322
So this could technically be a really cheap way out.
 
3:22 AM
The overhead of exceptions is the type testing and shit.
In this case, what you want to do is type testing. It's not overhead, it's the task.
 
user3010322
@R.MartinhoFernandes There's some extra overhead for the ones GCC uses most often (lngjmp and that other older one, dwarf something).
 
Oh gosh what confusion.
 
user3010322
They never explained why, it's just on the tin of every mingw-build ever.
 
There's the zero-cost model and the old model. No one uses the old model.
Right?
 
user3010322
SEH is the zero-cost model, not fully implemented for GCC.
 
3:24 AM
@ThePhD No, that's x64. x86 SEH exceptions are basically SJLJ, AFAIK.
 
user3010322
MSVC has been using it since forever, because they invented it IIRC.
 
@ThePhD Bullshit.
 
x64 exceptions are zero-cost DWARF-style table-driven exceptions.
 
user3010322
Shrug. Hey, just repeating what's on the tin on mingw-build and shit.
 
well, trust me, I just spent about the last week reading about the implementations of exceptions.
 
user3010322
3:25 AM
I trust you.
 
I hate UB bugs, especially when I don't know where it is from :'(
 
user3010322
Congratulations, DeadMG, you've earned a title:
 
user3010322
Exceptional Exception Earl DeadMG
 
The problem of dwarf exceptions is not the cost. It's that they can't cross into SEH boundaries
 
user3010322
3:28 AM
Join the ranks of Tuple Template Templar Robot, Overload Overlord Xeo, and Prominent Pi Prince Mysticial.
 
SEH was planned for GCC 4.8. Dunno if they did it.
 
user3010322
@R.MartinhoFernandes I dunno if they made it.
 
Technically, the button does work.
 
lol
 
Should I squeeze things a bit so it is in the same position as other screens?
 
3:29 AM
@ThePhD This isn't my first exception hack.
I believe I also invented (dunno if anyone else did) exception vomiting.
 
@DeadMG lolwut
 
@DeadMG Now i dont wanna know
 
I invented inceptions.
No reference implementation.
 
well it's not impossible that we did it independently.
 
user3010322
:3c
 
3:31 AM
but I'm pretty sure that the first time I saw it was when I wrote it.
 
@Pawnguy7 is that yours?
 
Throws upwards?
 
@DavidKron Yep.
 
@DeadMG Oh, it's the same thing?
Dec 8 '11 at 18:46, by R. Martinho Fernandes
void go_on_a_plane() {
    throw some_inception();
    do_stuff();
}

void do_stuff() {
    std::cout << "blah\n";
    sleep();
}

void sleep() {
    try {
        std::cout << "I never sleep on planes. I don't wanna get incepted.\n";
    } catch (some_inception&) {
        std::cout << "I was incepted!\n";
    }
}

int main() {
    do_stuff();
    go_on_a_plane();
}
 
Cool, i guess thats called input tough
 
3:31 AM
@R.MartinhoFernandes Oh, I don't know.
@R.MartinhoFernandes I definitely don't get that, but it's not (as far as I can tell) what I meant by exception vomiting.
 
The movie
 
@DeadMG If it helps, with proper inception support, it'd print "blah\nI never sleep on planes. I don't wanna get incepted.\nblah\nI was incepted!\n".
 
yeah, but I still don't get how "I was incepted!" is ever printed.
oh, unless you were describing some hypothetical rather than what would actually happen if I compiled that program.
 
Because the inceptions are thrown into the future of the call stack, not the past.
@DeadMG Yes, hence "with proper inception support".
 
ah right.
whereas exception vomiting really does work
 
3:36 AM
Minor detail.
 
lol
 
so
the real question is: mail boost::any devs with implementation of better any_cast?
 
Actually, I think I can implement inceptions as a library.
 
@R.MartinhoFernandes In the future such as, from the operative system and into the program?
@DeadMG So ugly, why bother
 
implementation detail.
it makes for a better interface, though.
 
3:38 AM
Here is your any -> void* blah;
 
er no.
 
@DavidKron Into the program. The function with the exception handler is called before the one that throws the exception. The function with the inception handler is called after the one that throws the inception. Don't ask me for use cases.
 
the code I showed is still quite type-safe.
 
Use cases of inceptions: gratuitous Jack Donaghy references.
 
3:39 AM
not really.
 
Have no idea if its really safe tough, dont dare to try
 
it's just pages and pages of asserts, and basically the same as mine but full of fugly function pointers.
 
Its basically your implementation but without storing the derived function as a virtual in some base class :S
..Wow its actually very like...
 
well, that's realistically how it's going to be used in most cases.
also, you mean "Your implementation but hideously obfuscated".
 
Yeah its not so much your implementation as it is your way of thinking with bloat and bad expertise
 
3:42 AM
What?
Replacing a virtual table with a manually nurtured function pointer is not a big difference.
 
it's hideously obfuscating.
I'd only do so if I had a hard requirement that my code had to compile without RTTI.
anyway, I posted a feature request, and the reactions should be amusing.
 
Exceptions enabled still leave some RTTI in, though.
 
@DeadMG I thought that was a requirement, then why dont you just use the built in rtti functions :s?
 
@R.MartinhoFernandes Which is why it's doubly pointless here.
@DavidKron They don't offer this particular functionality directly.
dynamic_cast can only accept a concrete T, not a std::type_info.
 
3:47 AM
@DavidKron Which clearly DOES NOT HANDLE cases where at least one type is not known at compile-time.
@Radnyx Well, .
 
Yeah because its a compile time function supporting only static types durr
 
Since you don't need help, I'll be glad to clean up.
@DavidKron Which mine is clearly not.
 
@Jefffrey of course
FEAR THE SANS.
 
@Pawnguy7 looks neat.
 
Your right, fuck im to tired for this.
 
3:50 AM
The code, not the font.
 
Allow me to reiterate.
 
Did you see my old one?
 
@Pawnguy7 old what?
 
@Jefffrey haha. The code seems to be fairly decent in this part, yes
@Jefffrey font/coloring
This draw function is quite magic.
Different size levels just works.
 
user3010322
@DeadMG I actually like @DavidKron's implementation, albeit it's a bit hard to follow at times.
 
user3010322
3:51 AM
I had to read it a good few times before I actually understood how it works.
 
@Pawnguy7 lolmagic.
 
user3010322
THe function pointers make it really explicit, so it's not the worst thing in the world.
 
@ThePhD The same as mine, essentially, just replacing virtual functions with his own vtable implementation.
 
@DeadMG OMG, this means we can MIX dynamic and static typing !!!! Convert type_info´s to template arguments!
 
@DavidKron No, it most assuredly does not.
 
3:52 AM
@Jefffrey indeed. Next barrier will be the AI
 
Yes ofc it does!!
 
user3010322
What it DOES allow me to do, though, is FINALLY beef up my Type class so hardcore that I get what I've been waiting my whole life for: Type t = typeof<T>(); t.IsDerivedOf( x );
 
user3010322
Fucking. Finally.
 
you know
 
I do know.
 
3:53 AM
I hate to put it this way, but it just goes to show that when you need a problem solved, find DeadMG when he's bored.
 
Just probably not what you are talking about.
@DeadMG are you currently bored?
 
user3010322
Lol
 
I am a little, yes.
I'm waiting for The Scene to post Haven 4x11 on torrent sites, and they're fucking late.
in the meantime I'm downloading Jericho again.
 
sorry my cat did that
 
the fact I am putting debug lines in affect the results of the output - not just adding the debugging output, but affecting the output in some bizarrd way
 
3:55 AM
If we can get a mechanism to go from type_info´s to some middleexceptionbloat thats really close to something we can use for dynamically resolving templates
 
user3010322
@User17 That's a shame.
 
@DavidKron No, it's a billion miles away.
 
@DeadMG as it happens, I need this AI for this game I am making... :D
 
lol
 
makes it harder to debug :/
 
3:55 AM
yeah but I'm not really interested in that :P
 
user3010322
@DavidKron You'd have to have the template switch on the type, and then run that middleexceptionbloat for every single type you want.
 
user3010322
That's asinine.
 
@ThePhD No, tuples!!!!
 
user3010322
=l
 
user3010322
Well, if you say so.
 
3:56 AM
@DeadMG Neither am I. Perfect team.
 
You just have to index the type, store them all in a tuple
 
user3010322
I finally have the one thing I need to give a big FUCK YOU to C++'s lame type_info
 
Well, I am, I just have no idea where to begin.
 
THen go tuple, type at index blabl
 
I should probably make a commit.
 
3:56 AM
And there you go!
 
I am sitting on like 10 files.
 
@ThePhD I never previously considered it lame, but I am now considering that it may be possible to portably create something stronger.
 
user3010322
@DeadMG Already on it. :D
 
lol
 
user3010322
Here I come, Type. <3
 
user3010322
3:58 AM
Cat was wrong about his starred message: C++'s exceptions have saved us all!
 
Getting type from an index in a tuple is even a compile time mechanism!
 
user3010322
type isn't a keyword or a std:: type, is it?
 
no.
 
user3010322
std::type.
 
user3010322
Come and get some, world.
 
3:59 AM
type is usually used for the result of metacomputations.
 
user3010322
Oh.
 
There is a fine line between orthogonal feature sets and hateful global state in graphics APIs.
 
like std::remove_reference<T>::type.
 
user3010322
Well then, we need another name
 

« first day (1134 days earlier)      last day (3820 days later) »