« first day (548 days earlier)      last day (4401 days later) » 

8:00 PM
I thought nothing was even depricated in C++
 
Or just use int.
 
@alan2here Where did you read that?
 
I like how C# is less afraid to throw out old stuff.
 
Like what? What did C# throw out?
 
@alan2here enum classes != enums
 
8:00 PM
enum classes != enums?
 
AFAIK, nothing.
C++ did throw out things.
 
Xeo
Okay, next thing: Default template arguments are only allowed on classes xD
 
@Xeo Not on C++11!
 
Xeo
Yeah, but in MSVC11
 
Oh, you mean VC doesn't allow them?
Ok.
 
Xeo
8:01 PM
[21:59:41] <zygoloid> Xeo: i think clang is pedantically correct. {} is not an expression, so isn't a constant expression, so can't be used as a non-type template parameter's default argument. hence the template can never be instantiated, so we can reject it at definition time. :)
[22:00:33] <zygoloid> hmm, maybe we should actually not reject this until instantiation time. explicitly specifying the second argument might be valid.
 
{} is not an expression?
I've written return {} countless times before.
 
Xeo
jump-statement:
break ;
continue ;
return expressionopt;
return braced-init-list ;
goto identifier ;
return braced-init-list ; being the important one here
 
@RMartinhoFernandes Iv'e had to refer to how to update documents to fix old code where things changed in C# and XNA.
 
8:03 PM
@RMartinhoFernandes between the verstions
 
@alan2here You mean XNA changed things.
C#, the language, didn't.
@Xeo That's really annoying. And seems silly.
Fsck.
 
Speaking of which, was it Microsoft's original intention to have things like the Mono project crop up to support .NET across multiple platforms?
 
Xeo
Well, initializer lists aren't an expression is what I've been told countless times, especially for the lambda return type deduction thingy
 
Because if it wasn't, .NET seems really pointless.
 
Arrghh, I don't want to give up on this syntax.
 
Xeo
8:05 PM
hrhr
Use 0, should work, no?
or a dummy value
 
@RMartinhoFernandes Possibly it was XNA not C#. I suppose I think of them together. I'd be suprised though if C# hadn't depricated stuff away completly. I don't think it's so C++ in it's thinking of this sort of thing.
@Collin Thanks for the link
 
@alan2here Nope, C# never removed anything.
But C++ did.
 
@alan2here These guys can probably find you a better reference, but that at least shows the difference
 
@RMartinhoFernandes :¬O
 
Xeo
Or changed the meaning
 
8:07 PM
I think the reason is that you can't deduce T in std::initializer_list<T> from {}.
 
And I mean, really, really remove, not just mark as deprecated.
 
@Xeo Has C++ ever removed anything?
 
export, for one.
 
Xeo
@alan2here auto as a storage specifier
 
@alan2here The auto keyword's use as a storage specifier.
@Xeo >:|
 
Xeo
8:07 PM
@RMartinhoFernandes though the keyword is still reserved
 
@Xeo thanks
 
@Xeo For modules!
 
Xeo
Let's hope
 
I'd like to see loads more stuff get depricated.
 
@Xeo Yes, it should work. At the time we brainstormed this thing, we discarded that approach because writing = 1 could be misleading.
 
8:08 PM
Reading that link made me cringe all over, so much of it, in so many little ways, reminded me of when I used to code is C++.
 
Xeo
@RMartinhoFernandes Then use a dummy value. = enabler::init or something.
 
When they fix things that were always a bit of a bodge I think they should aim to eventually remove the old way of doing it.
 
Yeah, that I was considering.
But {} is soooo pretty.
 
Xeo
well, nothing you can do about that
 
Xeo
8:10 PM
except submit a DR to the committee and hope that {} becomes an expression, though I think this would break a few things
 
Make something like this: struct value_initialize { template <typename R> operator R() const { return R{}; }}, giving return value_initialize();.
 
#define _ ::wheels::enabler::val
Mwhahahahaha.
 
Xeo
lawl
@GManNickG The discussion is about non-type template parameters
I don't think conversion works there.
 
It works if constexpr, no?
 
Xeo
Oh, right. Yeah.
Too little coding in C++ lately..
 
8:12 PM
Oh, that's what happens when I think I know what I'm doing.
 
Xeo
So, robot, want me to answer that question of yours?
 
Oh, I should ping @Luc on this. I suppose he'll want to know about this.
@Xeo Sure, go ahead.
I won't hate you for shattering my dreams.
 
Hello everybody!
 
8:14 PM
@RMartinhoFernandes Go on.
 
@LucDanton EnableIf<foo> = {} doesn't work.
 
Xeo
@LucDanton The biggest mystery revealed: {} is not an expression!
 
Oh yeah, it doesn't work in other contexts like foo + {}.
Good find, thanks.
 
So, what alternatives are you considering?
 
You kids and your standards.
 
8:17 PM
Dudes, speech recognition on windows 8 is amazing
 
What is windows 8 ^^ ?
 
I didn't even have to train it
The one after windows seven
 
Xeo
@KianMayne I heard the start button is amazing too. :P
 
@KianMayne Dictate some simple Perl script and make a video of it. We'll see then.
 
Good joke :L
@RMartinhoFernandes I've been dictating this whole time
 
Xeo
8:18 PM
I'll stick with Win7, no need for an OS that thinks it can fit all devices
 
@KianMayne Code?
 
I mainly installed it because my windows seven broke
 
Is there a big difference between mobile w8 and w8 ?
 
@RMartinhoFernandes I wish
 
Btw, when you say "amazing", do you mean "amazing compared to speech recognition in Vista or 7", or just "amazing because I never tried something like this before"?
 
8:20 PM
Yes one is on a mobile and one is a fully fledged operating system
@RMartinhoFernandes Compared with XP, Vista, and seven
 
@RMartinhoFernandes I can not for the life of me figure out the kind of person it takes to decide that was a good use case for a live demo
 
@KianMayne: This is not the first time Microsoft has a good speech recognition system : the Kinnect has it for some time now. And it works incredibly well.
 
I'm pretty impressed
 
Sorry guys, but "can't dictate code" => "sucks".
 
8:24 PM
@RMartinhoFernandes: Are you seriously considering that one can efficiently "write" code with a speech recognition system or did I miss the sarcasm here ?
 
@ereOn I am practically disabled without tactile feedback, so yes, sarcasm.
 
Ell
:L
 
@RMartinhoFernandes Oh sorry. Doing stuff right now, will considerate later.
 
Xeo
Wow, I just read that you can do template<template<class = int> class X> void f(){ X<> x; }
 
this surpriseth me not
 
8:38 PM
@Xeo Hmm, doesn't sound very useful though.
 
Xeo
Sure doesn't, but still.
 
I suppose that accepts any template, even if it doesn't default anything or defaults to something else.
 
when I go to bed tonight
I'mma sleep on my front like a baus
 
I guess.
Thanks. It's always nice to know that.
Hmm, I didn't know the US had all kinds of fake brand foodstuffs: forbes.com/sites/larryolmsted/2012/04/14/…
 
I figured this was of importance for everyone
 
8:43 PM
One of the most difficult problems with speech recognition is for it to figure out what speech is content, and what's intended as directions for it. On something like a Kinect (or most cell phones), that's much easier to handle, simply because it's all directions -- there's virtually nothing it converts from speech to text, and passes through to something that's expecting plain text input (e.g., from a keyboard).
The few places that does happen (a person's name for voice dialing) it's a well defined spot where you fill in the blank, so recognizing that shift is still pretty easy.
 
I wonder if
I can get away with doing 100k raycasts a frame
 
Try it.
 
@DeadMG Depends on the frame rate you want. (yes, I know: thank you Captain Obvious!)
 
heh
 
I think my laptop is charging again.
 
8:50 PM
I think more likely I will
 
Yes, it's definitely charging; it's coming straight towards me.
 
@DeadMG What does that even mean?
 
I mean, logically
 
@Maxpm Hit it. With a stick.
 
@RMartinhoFernandes Temporal coherency = you do the same problem repeatedly with only slightly changing parameters, for example
 
8:51 PM
 
Oh, I thought it was just some made up technobabble.
 
no
 
As long as we're being dumb with Internet memes.
Oooh, like spline reticulation?
 
well I'm thinking either A) lazy evaluate or B) temporal coherency exploit
I wonder if it's possible to do both?
 
@DeadMG I'm not sure lazy evaluation would help. Would it?
 
8:53 PM
I like lazy.
 
yes
 
Lazy is cool.
 
How so?
 
I can lazy evaluate every raycast as I need it
 
Right, but you're going to need all of them, won't you? So it's the same as precalculating them all every frame.
 
8:53 PM
If I make a programming language one day, it's going to be lazy. That way, anyone will think it's automatically awesome.
 
no
I only need the ones I need A* JPS to search through
which is admittedly, quite possibly many, but hardly all of them
 
Xeo
0
A: Is substitution failure an error with dependent non-type template parameters?

XeoFirst and foremost, thanks to @Richard Smith on the #llvm IRC Channel on oftc for the explanation. Unfortunately, this is not legal C++ and as such Clang is correct: {} is not an expression but a braced-init-list and as such will never be a constant expression as is needed in the initializer of a...

 
Oh.
 
you know
 
Xeo
There we go, finally came around to hit "Post answer"
 
8:54 PM
it suddenly occurs to me that JPS means that I'm gonna need much less
instead of needing to hit up 26 neighbours per node, I'mma only need to hit up like 6 or 9 or something
that's a big improvement
need to draw up some JPS rules for 3D space..
 
Are you writing a raytracer ?
 
no
3D pathfinding
but I have a big-ass map so getting both a decent pathfind time and decent path resolution is going to be tricky
 
@Xeo You had to add a gratuitous standard quote, heh?
 
Xeo
@RMartinhoFernandes Of course.
I actually wanted one that explicitly states "braced-init-list != expression", but that was only said in notes or examples
 
Ell
@DeadMG bruteforce is obviously the only viable option
 
8:58 PM
@RMartinhoFernandes Skip buying Gratuitous Space Battles! The next indie gaming sensation is already here, from the legendary Xeo himself. It's Gratuitous Standard Quotes!
4
 
@RMartinhoFernandes Required in order to get a ludicrously high amount of votes.
 
@DeadMG Damn you, I was conjecturing that same joke.
 
iWin
 
@DeadMG Damn, I already have that game.
 
then star me, biznatches
 
8:59 PM
Sounds awfully close to "snatches".
 
wtf's a snatch?
 
Oh dear.
 
Ell
@DeadMG clunge
 
8:59 PM
Check UD.
 
Ell
sorry i had to
 
@DeadMG The C word.
 
Xeo
@EtiennedeMartel 3 Upvotes - "ludicrously high amounts of votes" ... yeah. Only if the question was interesting to a WIDEr audience that could actually understand what it's about.
 
@Xeo Be patient. It's going to be linked around someday, and people will upvote it without even reading it.
 
@Xeo Your Shift key is broken.
 
9:01 PM
Better than having a broken Shit key.
 
Xeo
@RMartinhoFernandes I dunno why I did that, but reading "wider" I just had to make a reference there.
 
Woa. My mind was blown by the cleverness of that pun.
 
mine wsnt#
 
9:03 PM
@RMartinhoFernandes Unlike your TVTropes linking
 
Yeah, that was pretty obvious.
Like a cow. On fire. In a bedroom.
 
And now you guys have put a TVTropes link in the starboard. You're mean.
 
"Oops, I did it again", said Britney Spears.
 
Xeo
I get a feeling I could start a link wars here, but that would probably self-destruct the room when everyone in here clicks them.
 
Okay, okay, I'll stop.
 
9:09 PM
@Xeo Wouldn't this be more appropriate?
 
Xeo
@RMartinhoFernandes The links are the Big Red Button™
 
9:23 PM
You kids and your tropes.
 
Seriously, you're 16.
 
@RMartinhoFernandes You're just jealous that your age isn't 2^4.
 
Ell
woohoo
 
@RMartinhoFernandes you always do this to me, you bastard!
 
9:37 PM
@Maxpm My age is a prime number.
@TonyTheLion Really, I don't even try to hide it!
 
yea, that's become obvious
:P
 
10:07 PM
hi guys,(~Base() is non-virtual)
Base* ptr=new Derived();
ptr is base pointer so why 'delete ptr;' it deletes also other members that belong to Derived object ?
 
what else would you delete?
it delete's the derived object and then it's base, in that order
but your Base object should have a virtual dtor, else you'll have a leak
 
but the base destructor in this case is nonvirtual
 
@AlexDan If the destructor is not virtual delete ptr has undefined behaviour.
 
Not just a leak or anything else, but pure UB.
 
@AlexDan that's why I"m saying it should be virtual
 
10:09 PM
but it still delete Derived members
 
doesn't matter
still UB
 
@AlexDan Do you not know what undefined behaviour is?
 
oh yea, and go read a C++ book
 
it's irrelevant what your trivial test case produces
Undefined Behaviour is something you can never, ever do
 
UNDEFINED means that behavior is NOT defined, so ANYTHING can happen
in letters of fire it should be written
 
10:10 PM
ah I see. thanks
So anything that cannot be explained is UB
 
no
the Standard explicitly defines what is UB and what is not
 
meh, I can't be bothered answering that
 
I already answered it so why bother?
 
@TonyTheLion Yeah, go back to reading tropes.
 
I'm not clicking that, not today anyways
I should go to bed
I have to work tomo, again
 
@RMartinhoFernandes Is a non-virtual dtor really UB, or is the memory leak the UB?
 
@Maxpm Non-virtual dtor
 
Huh. That's a little odd.
What's the implementation advantage?
 
It can assume you won't ever do it.
 
10:23 PM
the optimizer can rule it out in terms of type aliasing, for example
in addition, they don't have to perform any checks as to what destructor to call or how much memory to free
 
Hey, won't (delete obj, obj = NULL) result in a no-op?
 
if the memory leak was UB they'd still have to perform a virtual call to get the right destructor
@RMartinhoFernandes One of delete's many failings is that it does not set the original pointer to null
 
@DeadMG Sure but will that be parsed as ((delete obj), obj = NULL) or (delete (obj, obj = NULL))?
That's my question.
 
oh
 
The latter is nasty.
 
10:25 PM
you phrased it in a rather odd way
 
I admit to that.
 
I've never seen a comma used like that.
 
but as far as I am aware, comma operator is the lowest precedence possible
 
a, b, c = d
sorry
a ? b : c = d
that's a nice un
also
 
my feet, they are teh colds
 
10:30 PM
@DeadMG Wear some Winsocks.
 
I have no clean socks
 
@Maxpm They go nicely with Fried Socks
 
Holy Moly, a ? b : c = d; will compile ?
 
@ScarletAmaranth Yep.
 
10:32 PM
@ScarletAmaranth yes, depending on types of a,b,c and d
 
I saw that in a "C++ tricks" question on SO a while back.
 
You meant: can the result of the ternary operator be a left-value? - Yes
 
That's some serious arcane magic :)
 
@ScarletAmaranth Nope. Just syntax. Seriously arcane, yes
 
I'd shoot anyone who wrote that in a real codebase
 
10:34 PM
@DeadMG Depends on where, and who writes it.
 
not really
 
Dijkstra said it well ... every programmer should be aware of the size of his skull and hence one avoids using clever tricks like that :)
 
the cost over writing if(a) b = d; else c = d; is nothing
 
I don't mind using ternaries but making a ternary eval an lvalue is ... silly at best :)
 
yeah. but `#define bc (a? b:c)` let's you write `bc = d;` transparently
:_)
 
10:36 PM
@DeadMG What if d is something like ScreenManagerFactory.getInstance().createScreenManager().getCurrentScreen();Som‌​ething = AbstractSomethingProxyFactory.getInstance().getProxy().getConcreteSomething();sc‌​reen.Draw(something)?
 
Ye, we all do love preprocessor don't we :)
 
@ScarletAmaranth So... you'd never write: return isnull? Nil : *this;?
 
@RMartinhoFernandes Then that's your own dumb fault for writing so stupid
 
@ScarletAmaranth You got it
@RMartinhoFernandes Then you're fucked anyway. Still sneaking in silly unicode codepoints
 
@sehe Interesting point :)
 
10:38 PM
@sehe Seems to be the same issue with chat that regularly boned the handshakes with @Kerrek's Secret Sex Change.
 
@ScarletAmaranth Not really valid, more RL example would involve a static method, so *this is really out-of-place in such an example
 
Hmm, bad choice of words.
 
@RMartinhoFernandes Entirely accidental, I promise :)
 
Yet I've spent many a day trying to make things as clear as possible.
 
more like
 
10:39 PM
Today I had to hack some #defines and comment out code that I didn't understand. I felt dirty.
 
that whole Null Object Pattern thing is utter bullshit
and I can't understand why anyone, ever, goes for it
 
@RMartinhoFernandes So, what causes it? It it vimperator or something like that?
 
@Maxpm and then everyone was wondering why it wasn't compiling
 
@DeadMG Patterns in general are pretty dumb.
 
10:40 PM
The Null object pattern to me is just a case of the flyweight, really. Anyways, it does only make sense in polymorphic, or non(cheap)movable types anyway
 
oh yeah
 
@Maxpm That's the point
 
I don't even know what "The null object pattern" is really :)
Viva la google
 
@ScarletAmaranth Close your eyes. Think of something soft. A summer breeze. Forget you ever heard about Null Object. Patterns were just a dream. You will never lose your innocence.
 
10:42 PM
@ScarletAmaranth It was to get some Linux code to compile on OS X. It had to do with the C file API: Linux used things like dd_loc, while OS X used things like __dd_loc.
 
@RMartinhoFernandes Fuck. The link guy ruined Scarlet's life. Couldn't you just have linked him/her to TVTropes some more? Kill someone's youthful innocence with pattern doctrine
 
@ScarletAmaranth It's a fancy name for null references.
 
Oh, @Scarlet is one of the intervenients in this conversation.
For a second there I thought it was a Gone with the Wind reference.
Better not ask.
 
So it's a result of someone trying to hack something together to make it just barely work
 
10:48 PM
@ScarletAmaranth No one objected. By democratic process this has been agreed to then.
 
@sehe Yeah i figured as much ;)
 
@sehe I think there are enough TVTropes links on the starboard as is.
> What's the point of having a democracy, if everybody's going to vote wrong? — Dick Solomon
 
For the record. I do use Null Objects. Though I could also say that I'm using it as State pattern, Policy, Plugin, or in combination with Flyweights. And only in C# (consciously).
As a matter of fact, I use it only when the 'null' state has certain well defined behaviour, so it isn't really logically the absense of something, it is more the 'default' of something.
I bet the Lounge<C++> crowd wouldn't be quite as allergic to a 'Default' value (or a Default instance for non-copyables/non-movables or shared immutable LOBs)
 
So in other words, you use it when it makes sense, not when some random pattern suggests :)
 
Pretty accurate. I use patterns all the time, but I make it my business to not name them correctly :)
 
10:56 PM
So call it "reasonable defaults."
 
I reckon this applies to many concepts that just happened to be assigned names.
 
Absolutely.
 
I'll simply call all of my code the Reasonable Code Pattern
 
And the only correct one, along with your only correct style ;)
 
@ScarletAmaranth The Named Concepts Pattern? Absolutely
 
10:57 PM
Mine has the Awesome Code Pattern all over.
 
Yeah, but that pattern is only supported well in Haskell
I should go to bed, methinks
 
Mine has "I have no clue what I'm doing" pattern more often than not
 
Hey, no bragging.
 
lol
 
True dat, that's the part when i cite dijkstra to comfort myself
4 hours of sweet sleep ... already looking forward to waking up, nite
 
Xeo
11:49 PM
That is not a good argument - we are not talking about template arguments here (noone tries eg. f<int,{}>), but default arguments, which have a syntax of a parameter-declaration, which can, in principle, have {} on the rhs (and if enabler{} is a constant expression, or x, given enabler x{}, there shouldn't be a problem with constant). However, 8.3.6/3 says there should be an expression in case of template parameter declaration. — jpalecek 1 hour ago
Is it me being wrong or him missing that a default argument is still an argument?
Also, nice improvement to the comment quoting, I guess?
 
@Xeo He's wrong. Given template <typename T = t> void f(), f() is identical to f<t>().
 

« first day (548 days earlier)      last day (4401 days later) »