« first day (1359 days earlier)      last day (3571 days later) » 

4:00 AM
iunno
depends
but typically yeah
adding extra parentheses would make it either const decltype(something)& or decltype(something)& depending on the const-ness of this.
auto has weirder type deduction rules if anything..
 
why would auto have different rules from decltype
 
I do not know.
but it does
 
what the hell, c++
 
I'm making it seem way worse than it actually is
 
as far as this->something goes, unless you've overloaded ->, it's an lvalue no matter what?
 
4:07 AM
if I have some random function template<class T> void f(T x) {}, will calling it by T x; f(std::move(x)) invoke the move constructor, assuming T has one?
 
wait actually this is a pointer so this-> uses builtin pointer deference no matter what
 
f(x) will do it too.
@zounds It depends on what something is.
Is something a function? If so, what does it return? etc.
 
@Rapptz how?
@Rapptz what if I use x later? then moving is illegal
 
oh wait no
you're taking it by value
misread
 
does f(std::move(x)) still invoke a move?
 
user3010322
4:09 AM
Yes.
 
yeah
 
user3010322
IF T has a move constructor.
 
of course
 
user3010322
The only time moves happen implicitly is with return values from functions
 
user3010322
4:09 AM
Which are temporaries in that function (i.e., local scope stuff)
 
is this a terrible idea: using private inheritance and static_cast to provide different interfaces to a single object?
 
user3010322
... Wat.
 
well i just realized its undefined behavior anyways so the answer is probably yes
 
> Wilson, who is currently excelling on a Master’s degree in computers and has set up his own business programming artificial intelligence systems, was doing his degree at Northumbria University when he came to the attention of police.
lol Master's degree in computers
truly the peak of journalism
 
my idea was that with normal inheritance you pass derived objects to base pointers or references and then it uses virtuals to call different functions with a single name
 
4:17 AM
@Rapptz when it comes to technology, journalists literally can't even
 
The curiously recurring template pattern (CRTP) is a C++ idiom in which a class X derives from a class template instantiation using X itself as template argument. The name of this idiom was coined by Jim Coplien, who had observed it in some of the earliest C++ template code as well as in code examples that Timothy Budd created in his multiparadigm language, Leda. General form // The Curiously Recurring Template Pattern (CRTP) template class Base { // methods within Base can use template to access members of Derived }; class Derived : public Base { // ... }; Some use cases for...
 
i don't think crtp fits what i want here
 
@StackedCrooked Cool. I didn't know about C++ stable partition or rotate.
 
user3010322
@Chimera And you never would if jerks like his previous Senior Engineer stay in their positions much longer.
 
is there any way to have a uninitialized non-POD local variable?
 
user3010322
4:21 AM
std::raw_storage or whatever
 
user3010322
There's also like std::temporary_buffer and std::temporary_iterator and stuff
 
user3010322
I just made my own uninitialized<T> class.
 
sounds like a lot of work for an idea that's really really simple
 
@Rapptz Interestingly recurring template pattern
 
@nightcracker You have to maintain aligned storage and then use placement new.
 
user3010322
 
this is probably UB, right?
 
ergh
I'll work around it
 
Sounds just like boost::optional.
 
yeah pretty much
I don't know why you'd want to leave it uninitialized though.
 
user3010322
boost::optional without the boolean, but really the only time you'd need to throw out the boolean is when you're direly strictly in need of one item coming after another in a sequence that you have to access via pointers.
 
4:26 AM
oh, the opposite question of what I asked earlier
 
user3010322
So you should just use boost::optional
 
boost::optional does not use booleans
 
T f() { T x; return std::move(x); } T x(f()); will this use move constructor?
 
unless you meant something else
don't do return std::move(x);
 
user3010322
return x will do.
 
user3010322
4:28 AM
In some cases, returning std::move(x) will invoke the move constructor twice.
 
user3010322
Which is pretty babies.
 
that's the vexing parse
 
T f() { T x; return x; } T x(std::move(f())); ?
 
no
 
user3010322
4:28 AM
No.
 
or without std::move alltogether?
 
yeah
 
user3010322
T f() { T x; return x; } T x(f());
 
I'm confused though
when should I use std::move?
 
why
when you want to request an lvalue to be moved
 
user3010322
4:29 AM
When you are explicitly moving a variable that is not a local temporary and/or is not being used in a return statement while being a local temporary.
 
@ThePhD In some cases, returning std::move(x) will invoke the move constructor once.
Hmm. Only two interrupts, but I have four buttons.
 
So did TrueCrypt truly die?
 
user3010322
 
user3010322
@Borgleader ^ Well, it's sort of shading properly now.
 
user3010322
But it's not applying gourard interpolation to the normals of mesh triangle vertices.
 
user3010322
4:39 AM
And I can't seem to get it to behave correctly.... but, whatever. It's "working".
 
user3010322
 
user3010322
2 minutes to render a super low-res teapot with flat shading... :l
 
user3010322
I should quit while I'm still vastly behind.
 
the shading looks really good though
raytracing?
 
user3010322
Yeah
 
user3010322
4:53 AM
But it's still Flat tracing.
 
user3010322
Hencewhy you can easily see the polygons.
 
user3010322
I can get better fidelity with basic phong and a pixel shader.
 
5:09 AM
well at least the shadow looks nice
 
user3010322
5:22 AM
... What... shadow... >_>
 
the teapot handle
rather the handle of the lid of the teapot
the knob
 
5:40 AM
@thephd I thought the whole point of raytracing was to render the curves directly instead of having to use a faceted shape and illusions?
 
user3010322
Doesn't change the fact that geometry is described in triangles.
 
@ThePhD control points of bezier curves?
 
user3010322
@AaronKyleKilleen No, it's just triangles. Triangle meshes.
 
user3010322
5:45 AM
The teapot is still made out of triangles. ._.
 
user3010322
If the geometry is described in triangles, it has to be rendered as triangles.
 
user3010322
Or post-processed into not-triangles.
 
I don't see why you couldn't define the control points for a bezier curve and calculate the intersections with that instead of triangles?
a patch I mean
 
@ThePhD have you seen this paper? this was used in my graphics class: graphics.pixar.com/library/Geri/paper.pdf
 
user3010322
5:53 AM
:l
 
user3010322
I didn't think it was possible for you to be this dumb. But you are.
 
I'm not talking about that particular mesh, I'm saying in general
 
@ThePhD What?
 
@Rapptz that's floating point
 
5:59 AM
this is what I'm talking about
 
@Rapptz in particular, doing a full precision floating point calculation with all IEEE754 quirks only to cast it to an int is terribly slow and complicated compared to 5 lines to compute the highest bit set
 
 
2 hours later…
8:25 AM
lounge?
 
8:38 AM
std::string* p = new std::string("Destruct me");
p->std::~string();
mother of jesus
 
@Jefffrey The memory is still alive, you only destructed.
@ThePhD Welcome to the wonderful word of raytracing :)
 
5
Q: How to explicitly call a namespace-qualified destructor?

Marc van LeeuwenI am surprised that the following simple code won't compile (with gcc, version 4.8.1) #include <string> void test() { std::string* p = new std::string("Destruct me"); p->std::~string(); } It says: error: scope ‘std’ before ‘~’ is not a class-name. Yet reading the standard, I would say the ...

 
416
Q: What is move semantics?

dicroceI just finished listening to the Software Engineering radio podcast interview with Scott Meyers regarding C++0x. Most of the new features made sense to me, and I am actually excited about C++0x now, with the exception of one. I still don't get move semantics... What is it exactly?

@Jefffrey Oh, you were merely complaining about syntax?
 
yeah
 
8:54 AM
@Jefffrey What are the use cases of ~T outside of std containers?
 
RAII?
I don't think I understand the question. "What are destructor useful for outside of std containers?" is the question?
 
@Jefffrey non-std containers, of course!
 
This issue will never come up in practice. The pseudo-destructor calls are there mainly for templated code for cases such as t.~T() to allow generic code to be nicer for scalar types such as int because they don't have a destructor. Also note that this isn't exactly a pseudo-destructor call, rather it is an explicit destructor call and the way to call those is through p->namespace::object~namespace::object() as you've noticed. It's undefined behaviour for the destructor to be called twice though. — Rapptz 4 mins ago
weird question btw
Should I just answer :v
@Jefffrey Not a bug.
Read §12.4/13.
 
I'm already on it.
 
Shit I'm tired.
It's 5 AM :(
 
lol
 
@Jefffrey No, the question is "When would I want to explicitly invoke the destructor via o.~T() or p->~T() syntax."
 
I see.
@FredOverflow placement new.
 
@Rapptz And what are the use cases of that outside of std containers?
 
writing your own stuff
 
9:07 AM
@FredOverflow Oh, as far as I'm concerned never. Probably with some weird placement new stuff.
 
optional, variant, etc
 
@Rapptz optional is inside std now, isn't it? ;)
 
nope
 
it's not a container
(with the definition being meets the Container concept set by the standard)
 
> After reviewing national body comments to N3690, this library component was voted out from C++14 working paper into a separate Technical Specification. It is not a part of the draft C++14 as of n3797.
 
9:08 AM
interesting
I didn't know C++ hat std::experimental.
 
it's the new tr1 namespace :p
@Jefffrey Looking back, it's a mistake on my interpretation. I guess the namespace is not technically type-name.
 
yes, that's what I thought
 
> Please don't write more awesome vim stuff, or I will not be able to do anything else than watch/read all of it.
lol
 
> The invocation of a destructor is subject to the usual rules for member functions
I'd may go ahead and say ADL should work too
considering p being passed as first argument
 
I didn't imply otherwise.
 
9:13 AM
probably a stretch though
 
9:33 AM
Bored.
Entertain me!
 
figures he's reinventing variant lol
off to bed I go
 
@Jefffrey It should... if you could invoke a destructor unqualified.
 
9:52 AM
hi
 
@Markberg Where's the sugar?
 
@FredOverflow do u drink!!!
2
 
@Puppy Well, p->~string is unqualified, no?
 
how can i upgrade my opengl to version 2.1
 
@Jefffrey No, it's clearly a qualified lookup on p.
an unqualified lookup would be ~string();.
 
9:54 AM
Step 1: say hi. Step 2: talk about drinks. Step 3: ask question.
I like this guy.
 
@Jefffrey i love u too :D
 
@Markberg GLEW
> [11-21-06] GLEW 1.3.5 adds OpenGL 2.1 and NVIDIA G80 extensions
 
@Puppy qualified lookup on an object? wat
 
all lookups on objects are qualified.
 
because ADL
 
9:58 AM
t.f(); is just as qualified as x::f().
 
I see what you mean.
It took me too much to get it.
 
It is Sunday morning
you're allowed to have your mind turned off
 
no mind should ever be turned off
 
@FredOverflow i download it but i can not find setup.exe for windows
8
 
Ell
@markberg you have to update your video card driver
What gpu do you have?
 
10:02 AM
feeding the help vampire
 
i have ati 5470 on dell 5010
 
i want to use genymotion software it's says you need to upgrade your opengl
to version 2.1
 
Ell
Your gpu doesn't support it
You need to buy a better one
 
@Ell thanks
 
10:04 AM
what, a 5470?
 
ati 5470
radeon
 
that is a DX11 card, it should support at least OGL 4.0
he probably simply doesn't have the correct drivers.
at which point he should go suck blood from someone else
 
i install windows 8 on my laptop
and it automatically have my driver
it's 5000 series
version that windows 8 automatically installed it
 
@Markberg You come to a programming chat room and ask about updating OpenGL. I thought you wanted to program OpenGL.
 
Ell
Wut I just googled and saw 2.0 o.o I Prolly looked at mobile version or something
Wait he is on a laptop
 
10:10 AM
@Ell so the result is that my laptop support opengl 2.1
right
 
Ell
I don't know you'll have to google the specs of your card
But all you have to do is update your driver
Got it?
 
i tried to update my driver in device manager and say you graphic card does not need to update!!
 
10 mins ago, by Puppy
feeding the help vampire
 
10:39 AM
there security system might be a pain in that arse, but amazon are pleasant to call up for help :D
@R.MartinhoFernandes battery pack ordered :D
 
10:54 AM
hmm
can't get the damn textareas to size correctly
 
user1804599
11:13 AM
 
puppy not very css at all
could be worse, right?
 
good god! what have you done!
 
bootstrap
sides, from some perspective, web design is not a skill I sell myself as having
 
web butchery how ever
 
Ell
Just need some example programmes now
and syntax highlighting
 
user1804599
11:24 AM
@Puppy Add margin between input and output.
 
and for it to be on coliru :P
 
user1804599
Then it looks good.
 
@rightfold Actually not sure how.
 
user1804599
<br> :P
 
lol
@Ell I'd also like error highlighting.
but right now I'm less concerned about that
@thecoshman It is on coliru. It's just a js frontend.
 
Ell
11:29 AM
@Puppy margin-botton or margin-top
I guess :3
 
user1804599
 
11:42 AM
I don't really see how that can work.
C++ is unparsable without the context and <iostream> lives on coliru server, not client.
although Wide could sure have simple syntax highlighting and stuff
 
Ell
you can still highlight c++ without context
 
mmm.... chocolate spread on toast, with marshmallows melted on top
 
12:02 PM
Morning everybody.
 
all spring season anime have ended :(
there's almost nothing left to watch
 
argh
stupid codemirror nukes my existing styling for the textarea
 
12:21 PM
@rightfold or you could use margin: 10px;
 
Is this a HTML, C++ and Javascript Lounge?
 
no, it's a whatever we want to discuss lounge
 
whatever-we-want-to-discuss lounge......
Why is this so "cheap"?
 
user1804599
The only cheap software is free software.
 
it is cheap, just not for individual consumers or small businesses.
 
user1804599
12:34 PM
lol $13,299.00 for a crappy editor
 
Yah
But I sort of "bought" it...... "bought" -> *
 
yeah, we all do that.
 
@Jamie because nobody actually pays that
they get an EA or use Dreamspark
 
on the contrary
DevDiv is multi-billion a year in revenue for MS, if I recall.
 
12:36 PM
we all know how to obtain free copies of non-free software.
 
We'd better hide this chat.
 
user1804599
@Jamie wat
 
what, from Microsoft?
 
@rightfold Nothing
@Puppy Maybe......
 
user1804599
As if Microsoft even cares the slightest.
 
12:37 PM
I seriously doubt they give a shit if I obtained VS.
hell, they give Express away for free.
 
@rightfold they really only care if you're corporate, or selling counterfit keys
 
Ultimate = 2 New Styles + Express
 
they don't make a penny selling their compiler to consumers, never have done and never will do.
they make money selling it to businesses for commercial use.
 
@Puppy selling "it" -> "Windows"?
 
user1804599
> their compiler
 
12:38 PM
yes, we were discussing one piece of software but I randomly meant a totally different piece of software.
 
user1804599
Install Gentoo and Emacs.
 
you got me, bro
 
DevC++ and VB6
 
@rightfold eh... I'll take arch, gentoo is a bit too annoying
 
and by that what I mean is
you seem to be just attempting to meaninglessly bitch about Microsoft
 
12:40 PM
Microsoft = $$$
 
there we go.
 
Who fuck off?
 
@Mgetz counterfeit*
 
user1804599
@Jamie You are really dumb.
 
@rightfold Agreed.
 
user1804599
12:41 PM
We already have @StackedCrooked. No need for more dumb people. Please go away.
 
YES
I've invalidated puppy's flag
WE ARE EVEN
 
user1804599
 
My conscience is fucking clean.
(I've validated a flag against puppy once, for those of you who don't remember)
 
did I just see a game of Lounge chat Capture-The-Flag?
5
 
@Jamie Kindly stop flagging random messages, thanks.
 
12:45 PM
 
1 = Random?
 
user1804599
No, 4 is random.
 
So I guess I am not flaggin random messages, thanks.
 
10 mins ago, by Jamie
Ultimate = 2 New Styles + Express
:laffo:
 
huh
 
12:47 PM
huh?
 
user1804599
huh!
 
What did I flagged?
 
VS Ultimate with MSDN: $4,249, £3,589
guess Microsoft haven't heard about the exchange rate change in like, the last three decades.
if it was ever that low
 
@Puppy why you drama again :(?
Someone should write a chrome extension to invalidate flags automatically
 
Pay in $ instead of £.
 
12:49 PM
@BenjaminGruenbaum I didn't realize that telling trolls to fuck off was drama as opposed to SOP.
 
user1804599
Pay in kind.
 
@Puppy it's drama when some idiot flags them
 
user1804599
@BenjaminGruenbaum Some flags are appropriate.
 
eh, that's the idiot's drama, not my drama.
 
user1804599
For example, anti-troll flags.
 
user1804599
12:50 PM
Or flagging beheadings posted by idiots like Telkitty.
 
@rightfold flag for mods
 
user1804599
Didn’t know that was possible.
 
it is indeed.
what's amusing is that the moronic chat flag system is poking me about validating/invalidating the flag on my own message.
 
Validate it.
 
@Puppy lol
 
12:53 PM
@Puppy Despite having been informed of this scores of times?
 
@Jamie You like math and programming, eh? Solve this:
char you[9] =
    { (char)('A' + 5)
    , (char)('Z' - 5)
    , (char)('B' + 1)
    , (char)('J' + 1)
    , ' '
    , (char)('T' + 5)
    , (char)('M' + 2)
    , (char)('W' - 2)
    , '\n' };
 
@LightnessRacesinOrbit If by that, you mean, the vast majority of the time it's only either you or the target who raises a single word in opposition, then yes.
 
@Puppy That's hardly true.
See, I speak for all two billion actually decent people in the world, so you may consider that a vote of two billion against, what, three?
@Jefffrey Very mature.
 
I see, @Jefffrey.
fuck me
 
My mum says I'm mature.
 
12:56 PM
why all those casts?
 
Because I'm working in PHP lately.
 
explains your current level of maturity
 
And mysql, let's not forget that one.
 
user1804599
@Jefffrey But PHP has no (char)!
 
& neither does MySQL
 
12:58 PM
Well, ('X' + 1) returns an int, so...
 
@LightnessRacesinOrbit Then they can get their decent asses in here and register to vote.
 
@LightnessRacesinOrbit So the joke wouldn't work without casts.
 
@Jefffrey Except it obviously would...?
 

« first day (1359 days earlier)      last day (3571 days later) »