« first day (653 days earlier)      last day (4288 days later) » 

3:00 PM
I hope it's not bad news.
 
@rubenvb That probably depends on the backend used.
 
@EtiennedeMartel it's probably something incredibly interesting and relevant to every employee (who are all required to attend)
 
@EtiennedeMartel So, no work today?
 
@R.MartinhoFernandes so... magic?
 
@rubenvb it's irrelevant, because you can't observe that behaviour
 
3:02 PM
@rubenvb What do you mean "magic"?
It's not defined by the language, obviously.
It's as magic as in C++.
 
@SamDeHaan It probably has something to do with the fact that Jurassic Park Builder is doing quite well on the App Store.
 
But there's a lot of temporaries and copies going on (as I cleverly deduce from my initial steps into Haskell)
 
You're not cleverly deducing.
GHC is smarter than you.
 
@rubenvb maybe you should move your skills from gcc to ghc.
 
@R.MartinhoFernandes Probably, still, in: filter (>5) [62,3,25,7,1,9]
 
3:03 PM
There's no point in copying immutable data.
 
so there's some list object constructed, passed as a reference to filter with a function much like a C++ operator()-struct.
 
lol
has there ever been performance critical code written in Haskell? Like some numerical number crunching stuff that benefits from every % of performance?
 
Assuming it's not all constants, that call is likely to be inlined and fused.
 
can you output asm from ghc?
 
3:07 PM
Yes.
 
> /usr/bin/ld: --hash-size=31: unknown option
wtf ghc y u broken :(
 
OK. I'll stop pestering you guys then :)
 
It may be very hard to relate it to source code, though.
 
I'm fairly sure I could have been a lot more productive today
oh well
 
0
Q: Warning for template with g++ -O2 ( or -Os, -O, -O1, ... )

ImmortalPCI get some warning with template and g++ -Os. Why ? How to remove these warning with -Os -Winline ? Code for testing: Event.h #ifndef EVENT_H #define EVENT_H #include <map> #include <stdint.h> /***************************************************************************//*! * @brie...

Oh god why.
I thought only MS translated their compiler diagnostics.
 
3:09 PM
tonight, I really should work on my platform abstraction
 
@R.MartinhoFernandes Well, it's a partial translation.
 
At least MS has error codes visible.
 
I couldn't bash my head against the wall any longer
@JamesKanze (╯°□°)╯︵ ┻━┻ — thecoshman 30 secs ago
 
@EtiennedeMartel Which makes it worse.
@thecoshman Oh god, you're still on that?
 
ha, I don't have to take notes any more, I'll just take pictures of the board.
 
3:12 PM
@R.MartinhoFernandes @sbi ¬_¬
 
My god, who's this @JamesKanze guy?
 
Former SC member, very active on the lists.
 
static struct boolean_s boolean_table[] = {
[...]
{"No", FALSE}, {"NOWay",FALSE},
{"NOT", FALSE}, {"Maybe",__TIME__[7]&1},
};
 
Is he really suggesting that smart pointers are for special cases?
 
I like the maybe implementation :p
 
3:13 PM
posted on July 30, 2012 by Herb Sutter

At the end of the Monday afternoon session, I will be making a special announcement related to Standard C++ on all platforms. Be there to hear the details, and to receive an extra perk that’s being reserved for C&B 2012 attendees only. Note: We sometimes record sessions and make them freely available online via Channel [...]

 
@EtiennedeMartel I've given up, feel free to pick up the beacon of hope
 
What beacon of hope?
You're basically pitting experience against experience.
 
From having read JK's arguments before, his experience is that you don't use dynamic allocation and when you do *this takes care of lifetime itself.
It's a particular way of doing things that's not absurd in the context of the large C++03 codebases he's dealt with.
 
the argument that shared_ptr is useless because of cycles is not working for me. That's why there's a weak_ptr, right?
 
which furthers my point that beginners should be taught to use smart pointers
 
3:16 PM
There's no automatic detection of cycles though.
I can't argue on anyone's behalf tbh.
 
@KeithLayne It's not very useful for breaking cycles.
You can only use it to break statically known cycles.
 
okay
 
I had a discussion about this in this room with Kerrek before.
 
weak becomes shared when the pointer is accessed, right?
 
You can't (and shouldn't) do much with an std::weak_ptr other than turn it into an std::shared_ptr.
 
3:18 PM
Yes. weak_ptr is not a smart pointer in the sense that you can't do anything with it that you can with a smart pointer. To do so you need to call lock() to get a shared_ptr.
 
Issues in the Standard notwithstanding.
 
well, if you want to access it, you get a temporary shared_ptr
though, AFAIK lock is a bit of a poor name, as it is not exclusive is it? others can still tree the shared object as mutable, right?
'access' would be a more apt word IMO
 
> In this bug report, Nick Clifton suggests to use '--hash-size=31' and possibly '--reduce-memory-overhead' when invoking ld.
 
I think I can agree with James. Dynamic allocation shouldn't be the most common, and that doesn't make smart pointers very common.
@thecoshman It's in the sense that it locks the object, preventing its deletion.
 
not really
 
3:21 PM
Gold doesn't seem to support this --hash_size option :|
Not even to ignore it? That's sad.
 
gold probably doesn't need it?
 
with in the context of dynamic objects, smart pointers should be the way to go. Dynamic objects though, is a separate question
@R.MartinhoFernandes but it is not locked to you, is it?
 
@thecoshman But while smart pointers are restricted to use in dynamic allocation, regular pointers are not. That's his point
@thecoshman It's locked. It can't go away.
I think this comment says it all:
@thecoshman Things that are owned by the monster are probably best handled by aggregation, rather than pointers. (Of course, if they're polymorphic, you need dynamic allocation, and in that case, std::unique_ptr may be the way to go.) — James Kanze Jul 23 at 16:17
Note how he's not arguing for owning raw pointers.
 
-1 for making everything about "say you are writing a game with monsters" :)
What I like about smart pointers (when they are appropriate) is that you can easily communicate (and enforce?) semantics.
 
ghc -pgml ld.ld appears to be a workaround (well it's ld.bfd but same idea).
 
Xeo
3:26 PM
I kinda don't understand how he seems to use no resources in his application that need to be handled
@Feeds That thing is basically a big tease. :(
 
@Xeo He's not arguing against RAII either.
 
I think he's just thinking pointers in this discussion
 
I think you're all reading too much into his argument.
 
Xeo
@R.MartinhoFernandes Well, with custom deleters, isn't unique_ptr the easiest way to handle them?
 
@Xeo As a member in a custom struct? Maybe.
But how many of those will you ever write?
 
3:28 PM
I guess there is a huge class of programs that don't have to handle stuff like that at all, and even though RAII is fundamental to you, it's not very newbish.
 
Well, that was a short speech.
 
He must've had an early tee time.
 
Because unique_ptr<void, void(*)(HANDLE)> is not a good thing to use all over holding a Windows HANDLE (hope I got that right).
 
Xeo
We need class lambdas. std::unique_ptr<T, <>(T*){ /*...*/ }> ... <> is the inline-class-introducer.
 
There are anonymous classes but they can't be template arguments :|
 
3:30 PM
wow.
 
@Tocs Well, if you mean local types, they can. But if you mean class definition (local or not), yeah they can't.
 
@Xeo we need a lot of stuff but in a language with less clunky syntax.
 
@EtiennedeMartel Clearly Jurassic Park Builder was only doing good enough in the App Store for a small chunk of his golf time.
 
Xeo
If you meant unnamed classes as "anonymous"
 
3:32 PM
boost.spirit, anyone? Where is sehe when I need him?
 
Hmm strange, a while ago I tried to use a macro to generate a class to use sfinae to call a method if the passed type had a method or not. I tried passing this to a template and it threw a fit.
 
"method"
 
method as in a member function
How do you plan on differentiating between them?
 
I know, I was going to say maybe you should have tried it in C++ instead of Java :)
 
Xeo
I'm so awesome, I get attributed to answers I didn't even write!
Xeo, thanks a lot for this great answer. I'll examine it. Also note the comment from @Xeo. I think it would be good for others to have that pointed out in the answer. — Johan Lundberg 1 min ago
 
3:34 PM
@Xeo You're a thief, that's all.
 
@SamDeHaan Well, we're going to La Ronde, Montreal's largest amusement park, this friday to celebrate.
 
Hello?
What’s up.
 
Tits and shit.
 
Tits: kinky. Shit: I don’t like poop sex.
 
That usually happens to me in here, I answer a question, and somebody goes, "thanks, <insert name of somebody with more rep here>"
 
3:35 PM
Well would you rather I would have said "Hmm strange a while ago I tried to use a macro to generate a class to use sfinae to call a member function if passed type had a method or not. I tried passing this to a template and it threw a fit."
 
Yes.
There's still one 'method' in there though.
 
Xeo
@KeithLayne 'cept Kerrek has double the rep of me
 
Man, this is ridiculous. GHC is broken due to an option to make it faster to link with ld. But I'm using Gold which runs circles around ld.
 
LINKERS SUCK
 
@Xeo call it a win then.
 
3:37 PM
Also, dynamic libraries can suck my dick.
Static libraries are much better. Never had any problems with them.
Dynamic libraries are a hell.
 
@Tocs is a macro easier than using a template there? Templates are my macro of choice.
 
Well you can't pass a function name as a template argument
Let me dig up the problem...
 
@KeithLayne You can't do that as a template.
:(
 
@Tocs you can pass a function pointer, though.
 
3:39 PM
@R.MartinhoFernandes :P
I didn’t use compelling evidence, I used compiling evidence.
 
(I think).
 
@ecatmur If you already have a function pointer, you don't need the trait he was generating.
 
1 sec typing the example...
 
I hope I don't ever see this message....
 
Xeo
lol
 
3:41 PM
Oh no, not the 3rd core.
 
Xeo
"please contact support" would've been better
 
No space after the first full stop, and a space before the second one.
Clearly made by an idiot.
 
you know, no native speakers I know use the term "full stop." Only you furriners.
 
@RadekSlupik Makes it look more like it could really be made by Microsoft
 
Also, what has Visual Studio got to do with checking if cores are melting?
 
Xeo
3:42 PM
@KeithLayne Wasn't it a military term for morsing?
 
@KeithLayne I use “full stop”, period.
 
Xeo
oh, wait, that was "stop"
 
This shit will not fly. ideone.com/82Qap
 
Also, why the fuck is “core” written with a capital letter?
 
@RadekSlupik obviously it's an intel CPU ;)
 
3:43 PM
@Xeo I don't know. I figured it was an artifact of learning english elsewhere.
 
Intel ftw.
 
@RadekSlupik It's probably fake.
 
Full derp.
 
Xeo
'PHP ftw' with ftw = for the wat.
 
3:45 PM
Reflector had this one:
 
lol how ironic.
 
@Tocs I think you might actually want the semicolon in your macro on that one.
 
error: passing 'const DataPacket' as 'this' argument of 'int DataPacket::GetID()' discards qualifiers
 
My pic is hosted on a site called “overclock.net”.
 
What does this mean?
 
3:45 PM
@RadekSlupik Can't you get that thing in a smaller size?
 
Xeo
@Drise mark it const
 
@Drise qualifiers: cv.
 
@R.MartinhoFernandes Would be better if it wasn't fucking Reflector.
 
@Drise It means that your code is wrong, you are wrong, and you should feel wrong.
@R.MartinhoFernandes Probably, if I’d google hard enough.
 
@Xeo Mark what? It's already const...
 
3:46 PM
@EtiennedeMartel It hadn't turned evil by the time I first saw it.
 
@Keith, the semicolon messes with it being a template argument. But it wouldn't work either way, you have to put the class decl before the template function I believe which kinda messed with the intent of the whole thing
 
Xeo
@Drise the function
 
@Drise The object that you're calling GetID on is const, but the member function is not marked const.
 
@EtiennedeMartel Btw, what alternatives have sprung up since Red Gate went dark side?
 
@LucDanton Ok.
 
3:47 PM
@LucDanton or volatile! Why does everyone forget volatile?
2
 
@Tocs I wasn't sure if you could put the type definition versus the type name as a template param.
 
Xeo
@ecatmur because it's nigh-useless
 
@ecatmur The error message is explicit enough :)
 
@Keith As far as I can tell it's not possible, and therefore lame.
 
@Tocs basically, rely on the smart people in here to solve your problems. I'm just here to nitpick over the word 'method' :)
 
3:48 PM
@Tocs Can't define member function templates for a local type. (Also you can't have local templates, it's related.)
 
@R.MartinhoFernandes I use ILSpy. Works well.
 
@LucDanton Hmm that too... So much is wrong with it. But at the time it seemed like a good idea.
 
@EtiennedeMartel I shall try that next time I give another try to <top secret project I've been trying to write again and again but failed every single time>. When I was writing a DSL in boo Reflector came really handy to inspect the generated code as C#, instead of IL.
 
@LucDanton Still getting the error.
error: passing 'const DataPacket' as 'this' argument of 'const int& DataPacket::GetID()' discards qualifiers
 
GetID() const
 
Xeo
3:54 PM
@Drise you marked the return type const, not the function
 
Oh... ok.
I've never done const stuff before. Trying to do something new.
 
Xeo
now read up on const correctness
 
@Drise the good thing is that you'll never forget what that compiler error means now :)
 
@KeithLayne Of course.
 
Xeo
0
Q: why to declare a virtual destructor C++?

philippeI inherited some code here I'm trying to understand, and the header file is: class RemoteNotify : public virtual ServiceObject, public virtual RemoteMsg{ RemoveNotify(); virtual ~RemoveNotify(); /* more code down here */ } I would like to know why someone would declare a virt...

close votes
 
3:56 PM
@Xeo Done.
 
@R.MartinhoFernandes Mmmh, I don't think it's just the generated assembly that's a bit tough to understand with GHC. The disassembly is interesting in its own way.
 
hello everyone :)
 
Xeo
hm, 51 edits left for copy editor.. meh
 
@LucDanton The hard thing is relating it to source code, especially with optimizations.
 
@R.MartinhoFernandes The <compact> and <evacuate> stuff leave me nonplussed. With a name like evacuate I thought this would be about something like exception handling but oh well. My real problem anyway is that I'm not sure where all of this starts and goes.
 
4:02 PM
I had ghc dump c code once. Never again. It made my eyeballs bleed.
 
Thanks guys. That fixed it.
 
@LucDanton the answer to all questions not about Haskell is "use Haskell." The answer to all questions about Haskell is "use magic." At least, that's how I look at the world.
3
 
Along with me being stupid and trying to return a copy of std::ostream instead of return it by reference.
 
@KeithLayne wtf
 
@LucDanton there is no requirement that anything I say makes any sense.
 
4:05 PM
@Keith you sound like one of my professors... All Haskell all the time.
 
Sure, sure, but could you not ping me with it?
 
room topic changed to Lounge<C++>: There is no requirement that anything we say here makes any sense. [c++] [c++11] [c++-faq] [fun]
 
@LucDanton apologies, sir.
@Tocs I don't know that much Haskell, I just like it. I need a lot more time with it.
 
I need a lot more time. Just that.
 
I'm not sure how I missed it the first time around but there's a hs_main. Mystery solved.
 
4:08 PM
Live at a higher altitude, time will pass slightly slower.
 
Oh, and a real_main after that.
 
No, I'm pretty sure they weren't there, and they appeared later by magic.
 
@Tocs Slightly won't work. I need a lot more.
 
@R.MartinhoFernandes :(
 
Give me week-long amounts of free time per day and I'll be happy.
 
4:09 PM
@R.MartinhoFernandes I barely sleep too. I wasted a lot of years doing stuff that's not interesting.
 
Xeo
@LucDanton What about a really_real_main?
 
@Xeo No I think it's the last one. But it does jump a lot to itself, too.
 
maybe that "I like to use goto a lot" guy wrote ghc?
 
Well, keep in mind it's a disassembly.
 
He's inspecting generated code.
Jumps are expected.
 
4:11 PM
STOP MAKING FUN OF ME!!!!!!!!!
 
Xeo
@KeithLayne Stop giving us reasons to do so.
Btw, you missed an '!'
 
@KeithLayne After a while it gets to you. And you're older than me. Just saying.
 
I was actually referring to the C code it generates.
@Xeo It's the only reason I'm here :)
 
Xeo
@KeithLayne Tough luck, then. :P
 
@R.MartinhoFernandes All those years in the Army I barely slept and had no time to myself. Meh.
 
4:13 PM
> ghc: panic! (the 'impossible' happened)
When attempting to generate C code.
 
did you pass the --use-magic flag? Should clear it right up.
 
@LucDanton Btw, are you trying this for some nefarious purpose, or just out of curiosity?
 
he wants to have more things to make fun of me for. Luc is all about crushing my will to live.
 
@R.MartinhoFernandes Curious as to what that filter snippet would generate.
 
not sure if that qualifies as 'nefarious' or not.
@R.MartinhoFernandes Oh wait, are you calling me an old man? I will invoke my old man strength and beat your ass.
Clint Eastwood style. Booyah.
 
4:17 PM
I'm pretty weak physically, so you probably wouldn't need to invoke any kind of extra strength to beat me.
 
Rock, paper, scissors then. To the death.
 
Oh, I'm known amongst my circle of friends as unbeatable at RPS.
You're screwed.
 
crap.
 
The only person I know that can consistently win against me at RPS is my 8-year old cousin.
 
your cousin doesn't think about it, and therefore is not handicapped against you.
 
4:20 PM
Nah, he cheats and uses things like "fire", and "pistol", and other sillies. I like the bastard so I'm cool with it if he's having fun.
 
My personal favorite is "dynamite".
 
have you seen that online RPS that learns patterns to beat you?
 
No.
I saw a prisoner's dilemma one.
 
Is there a way to shut up "unused parameter" warnings?
 
@Drise remove the name
 
4:24 PM
-Wno-unused-parameter?
 
@Drise (void)var;
 
@Drise int main(int, char**) or such
 
void some_function(sometype /*somename*/){/*....*/}
 
works for template parameters too, right?
 
Template parameters don't generate such warnings.
 
4:28 PM
right, but what I mean is that you can have unnamed template params, right?
 
@Flexo Why does that site look like there's no CSS?
 
it's flash and JS
I think there was a better game online somewhere
 
4:31 PM
the only way to win is to be better than a human's pseudo random number generator, or out learn the learning machine
 
@Flexo man, I am on 9-9-9. that guy is really good
 
@Flexo Hah, this game is super simple, you just have to try to lose :)
 
I'm wondering how hard it is to compile Qt(+KDE) to work on an Android phone and experiment with that.
 
Confucius say: to win you must learn to think like a loser.
2
 
4:35 PM
@rubenvb Can I make a guess? I'll say hard.
 
lol.
It doesn't even use X does it?
Maybe I should first try getting X to work.
Which'd probably be dead slow.
 
Are you masochistic?
 
@rubenvb hmmm...what does it use then I wonder?
 
@rubenvb I think there's a version of Qt that uses directfb or similar to draw
 
@rubenvb There is a Qt Android project and a Qt iOS project.
 
4:40 PM
@Nils but I don't want Android. I want a Linux kernel and Qt.
5
Q: Android Graphics Internals

naaskingI haven't found a clear explanation on how the Android graphics system works, specifically, does it use a display server, is it based on DirectFB or X11, etc. From what I've managed to piece together, Android depends on the Linux frame buffer. I haven't found much on what sort of display server ...

See? No fb nor X11 :(
 
this guy wrote "MFKnapsack" on the board.
 
@rubenvb ??
The point of Qt is it runs everywhere!
@rubenvb A Linux Kernel with OpenGL ES. Stop whining :)
 
Well, yeah, but I'd like plain X on top of Linux on my phone. Chances are slim if I sidestep the Android compositing.
Ideally I'd get Wayland or something.
@Nils Who the hell flagged that?
 
hum?
 
@rubenvb Good to get the authoritative answer.
 
4:44 PM
@rubenvb Mayb I ask why?
X11 is from 500 BC or something, nobody wants that today
 
X11 is from the future!
 
@Nils Every BSD, Linux and Mac Matlab runs on X11.
 
@rubenvb there's X servers on Play
 
@ecatmur I don't want Android nor Dalvik.
I want plain bare Qt.
 
@rubenvb You want matlab on android ?
 
4:45 PM
aaargghh!
 
getting under all that stuff is probably hard.
 
nvm. Go back to coding, you weirdos.
And I'll go figure out the meaning of the unit bivector i in geometric algebra.
 
@rubenvb you said "on an Android phone". The assumption is you want to stay running Android.
Otherwise it probably won't be a phone any more.
 
@ecatmur Sure it'd be a phone. There's Linux Phone apps too. Heck, look at Meego.
 
@rubenvb yes that is what you get
a plain qt
 
4:46 PM
or moblin or whatever it's called.
 
also works on win and mac w/o the stone age server
 
@Nils But not Linux!!
Decently.
 
ur strange
You get OpenGL acceleration, which usually does NOT work on Linux.
 
Let me put it differently: everyone on mainstream desktop/server linux, uses X11, which also provides a software OpenGL, through Mesa.
 
what's that firefox OS gonna run on?
 
4:48 PM
Good question.
 
did OpenGL ever work w/o proprietary Nvidia drivers on Linux?!
@bamboon Richard Stallmans love
 
@Nils uh, yes. OpenGL 1.1 always worked. nouveau now supports most of 2.0 I think, and all of Radeon supports 3.0.
 
That's 4 years old.
And you say X11 is old.
 
OpenGL 1.1 is ancient.
 
4:55 PM
Doesn't sw mesa give 2.0 or 2.1 anyways?
 
Dude, I'm so sleepy. And coffee doesn't work for me. Help warranted.
 
Software OpenGL is not worth a damn.
 
True, but lacking a driver it's better than nothing.
 

« first day (653 days earlier)      last day (4288 days later) »