« first day (506 days earlier)      last day (4425 days later) » 

Xeo
12:02 AM
@Shalmezad Burninate it.
 
@Xeo Tempting as it may be, I'm getting better with SDL, and I've already made great progress with my current game. =P
 
Xeo
You will learn to hate it. Fuck C APIs
 
Yeah, SDL sucks.
 
Then what would you recommend? I'm avoiding DirectX/Windows API like the plague until next month.
 
Xeo
SFML is atleast C++, object oriented with clear ownership semantics and good examples to get you going.
Took me what, an hour? to convert my SDL code to use SFML
 
12:10 AM
Never heard of SFML. Is it cross-platform?
 
Xeo
I'd recommend getting the 2.0 snapshot or compiling it yourself, however, as 1.6 doesn't work with VS2010
 
Using code::blocks and GCC. From the looks of it, I should be fine with either
 
12:24 AM
And to think, only 15 minutes ago, I was happy with SDL...
 
12:43 AM
SFML sucks too
 
Less than SDL, at least.
 
Well yeah. SDL seems to be still being worked on though - SFML seems dead.
 
There's some activity in SDL repo, but no stable releases on sight. And the design is crap.
Unrelated: embarking with raw materials rather than premade stuff is neat.
 
Yeah. I've only really used SDL for opening GL windows though
 
It's bad even at that.
 
12:51 AM
Hehe yeah.
 
@CatPlusPlus Packaging raw material for steel is a lot cheaper than packaging steel picks.
> William Shakespeare and Miguel de Cervantes died on the same date, 23 April 1616, but not on the same day.
 
Yeah.
I've started with that and didn't die.
That's something.
And that's even too much stone and wood for bootstrapping.
 
Xeo
1:21 AM
@RMartinhoFernandes What?
Ah, different calendars
@Pubby Wait, isn't it the other way around?
 
@Xeo ?
 
Xeo
Last activity, 8 days ago
 
@Xeo Oh, maybe so. It just seems to be on version 1.6 forever.
 
Xeo
True
What makes it worse is that 1.6 is broken with MSVC10
Atleast the repo works
 
I think the new SDL is proprietary or something. At least it has multiple window support
 
Xeo
1:32 AM
Anyways, I'm off, g'night
 
@Pubby Nope, zlib licence. 1.2 is LGPL and they were selling commercial licences AFAIR.
 
I'm trying to used remove_copy_if on a list container consisting of custom objects. Is there a simple way I can provide two arguments to the predicate? Currently I've got it working using a global but that feels messy
 
@Radu c++0x? use a lambda; c++03, use a function object with a constructor param for the second value
 
ah, and then I can just call it with comparison_functor(foo, bar) in the predicate?
 
@Radu ? you'd pass the predicate to the algorithm?
Perhaps show a snippet on ideone.com
 
1:44 AM
my current implementation: ideone.com/xM8m6. This is an assignment by the way. It says in the spec to use a global variable is fine, but I'm not happy with it lol
remove_copy_if calls are at 113
 
struct UserSeparation
{
    UserSeparation(int userId) : _userId(userId) {}


    bool operator()(const RatingInformation& ri) const
    {
        return ri.userId!=_userId;
    }

  private:
    const _userId;
};

    // somewhere:
    std::remove_copy_if(ratings.begin(), ratings.end(), user1.begin(), UserSeparation(userId1));
    std::remove_copy_if(ratings.begin(), ratings.end(), user2.begin(), UserSeparation(userId2);
@Radu ^^ this is what the function object approach would look like
@Radu This is what the approach with c++0x support would look like: ideone.com/lzhBr
That's using a lambda expression [captured](parameters) { body }
 
ahh, I understand what you meant now. So when the object is constructed, I keep what I'm going to be comparing against in a private variable, and the other one gets compared when the call is actually made
lamda format looks much cleaner but I'm not sure if the compilers that will be used for evaluation will be up to that standard
 
@Radu Indeed. In fact, it is a predicate with 'state'. It is state that isn't altered during the algorithm, so it is still 'pure' (deterministic) predicate :)
@Radu Which compilers?
 
whatever is available at my school. I'm not entirely certain but I'd rather play it on the safe side
 
Also, no compiler supports the full c++11 spec yet, so you'd be compiling with a flag like --std=c++0x for lambda support. I think, MSVC2010 has it enabled by default, GNU gcc requires --std=c++0x and Clang only has lambdas in unstable/trunk -> don't rely on clang
@Radu Ok, just roll the functor object. In real life, the emitted code is probably the same. Doing the 'tedious' route will show that you understood the concept.
 
1:54 AM
I've already foregone lambdas for another case of operator overloading (on the sort function) so it's okay
 
I don't think any compiler even supports the C++03 spec ;)
 
@sehe, is this the functor approach a form of closure? I'm familiar with the javascript approach to the concept and this is eerily familiar
 
@Radu In a way, it is. Only, you explcitely code the closed-over variables
@Radu: just to tease you, here is the equivalent (to ideone.com/lzhBr) program but written to use Boost Phoenix:
#include <boost/phoenix.hpp>
// other includes
using boost::phoenix::placeholders::arg1;

int main(int argc, const char *argv[])
{
    std::list<int> l { 1,2,3,4,5,6,7,8 };

    std::remove_copy_if(l.begin(), l.end(), std::ostream_iterator<int>(std::cout, ", "), arg1 > 5);
}
Boost Phoenix uses expression templates to implicitely define lambdas on the spot. This works with c++03, but requires a recent Boost library :)
@Radu You may guess which version I like best! (hint arg1 > 5 is way more succinct than [](int arg1) { return arg1 > 5 }...)
 
heh, 0 syntactic sugar vs.. a lot? yeah, choice is obvious
 
@RMartinhoFernandes > However, Shakespeare and Cervantes died on different days: Shakespeare on April 23, 1616 of the Julian calendar that was used in England and Cervantes April 23, 1616 of the Gregorian calendar that was used in Spain.
@Xeo: ^^ Since the Gregorian calendar was ten days ahead of the Julian, Cervantes actually died ten days earlier than Shakespeare, whose date of death according to the Gregorian calendar was May 3, 1616
k everyone, off to bed :)
@ScottW sup?
@ScottW Your shift :)
 
2:14 AM
@sehe, Thanks for the help! Good night
 
cheers
 
3:11 AM
What's that one question with the funny terminology? Did it get deleted?
 
3:27 AM
Evening folks.
 
user868935
evening
 
user868935
Anyone know how to create a directory folder in win32 application when the program first executes?
 
user868935
I can do it for a console app, but not for a windows app
 
Shouldn't they be the same?
 
user868935
doesnt seem to work, but I will recheck
 
3:57 AM
Stupid question, static int foo = bar() will call bar once, right?
(inside a function definition)
 
user868935
@Pubby does bar() return an int value?
 
Yeah
 
user868935
should work then
 
4:11 AM
Today I almost used goto. I feel dirty.
 
user868935
@Maxpm yesssss... lol
 
> SFML doesn't use exceptions. Everything that may fail returns a boolean, and prints a message in standard output on failure.
...Whyyyyyyyyyyyyyyyyy?
Ugh. They say it's to make binding easier. That's dumb.
You're writing in C++, not some generic language that can be compiled as a bunch of other languages.
 
I'm ok with no exceptions, but the printing seems entirely bad
 
Box2D is in the same kind of pseudo-C++.
 
4:37 AM
Gamedevs don't like exceptions.
 
user868935
5:35 AM
hello
 
hi
 
user868935
5:50 AM
@Pubby found two ways that "suppose" to work for creating a directory in a win32 app, but it doesnt.
 
user868935
#define CreateDirectory CreateDirectory("C:\\foo\\",NULL);
 
Don't do that.
Also, you can't create things in root folder without elevated permissions.
 
user868935
@CatPlusPlus You understand what I'm trying to do?
 
Or maybe it was just files. Anyway, don't do that #define thing.
 
user868935
I'm trying to create a directory when the app starts
 
user868935
5:54 AM
I have it for a console, but I'm trying to convert my console program to a win32 api program
 
user868935
6:28 AM
@Pubby msdn told me this:
 
user868935
@Pubby BOOL WINAPI CreateDirectory(
__in LPCTSTR lpPathName,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
 
user868935
But doesnt really tell me exactly how to use it
 
Hmm, dunno. Don't know much about Windows API. You could try asking on the main site.
g++ is already on 4.8?
 
They just froze 4.7.
 
Didn't know that. Only knew about the new 4.6
 
user868935
6:56 AM
@CheersandhthAlf have you worked with win32 apps?
 
user868935
Hi scott
 
user868935
@ScottW have you worked with win32 applications?
 
7:18 AM
@チョコレート人 Ask it on the main site instead of asking it here.
 
3
Q: Back in the day... Really, good ole days already?

RSolbergI'll admit it, I have not been very active on SO for the past 18 months. In part due to having other things that I have to get done and also in part due to the decline of feeling good about spending time on the site. When I first started using SO, for me it was about getting help on a project I...

 
8:12 AM
@jalf... oops
> @TomWijsman: "SO users are tho ones who make popular questions without value. Meta.SO users try to filter these out" - ouch, ouch, just ouch – sehe just now
@チョコレート人 From that page:
@ScottW Well we all are entitled to. The pain there is from the distinction between meta users and SO users. It doesn't take a meta user to keep quality on SO :)
@ScottW only 30-or-so messages in chat since I went to bed 8-!
 
Xeo
7 hours ago, by Xeo
Ah, different calendars
:)
 
@Xeo missed that. cheers!
 
8:38 AM
> If you live in a democracy and you don't vote, you don't get to complain about the government. (...) – Josh Caswell 11 mins ago
Ouch.
@ScottW At least here, you can "vote for no one", which has a different value than "not vote".
But you always get to complain. Anything else is an opressive regime.
 
@ScottW: You should then pick the least smelly side.
 
Oh, apparently, it was an analogy.
I'm more confused now.
 
Well, I think that such behaviour is only a fraction better than not going to vote at all.
The problem I see with this is that you are giving free space to vocal minorities.
The disciplined core voters of established parties etc.
 
The fact that "disciplined core voters" exist is one reason that really makes me not want to vote. The fact that "disciplined core voters" exist makes all this look like a joke, or like a game. It pisses me off.
 
@RMartinhoFernandes Exclaiming 'that was a analogy' was his failed analogy for someone saying 'Oh drat, you're right. I misformulated'
 
8:49 AM
@sehe That makes some sense. Thanks.
@sehe Hmm. Only now did I read the answer where that comment was made. The blog post it links to totally seems to back up his argument.
> I think some members of the community have gotten the idea that Stack Overflow is strictly business — unless your question fits our rules exactly to a T, it is absolutely disallowed.
In my mind, there are three broad guidelines that determine whether a question is appropriate for Stack Overflow:

Does this question match the criteria provided in the Stack Overflow FAQ?
Is this question accepted by the community, as reflected in upvotes, favorites, views, and answers?
Does this question teach me anything that could make me better at my job? Can I learn something from it?
> As Meat Loaf once said, two out of three ain’t bad. It’s guideline #3 that ends up being the pivotal decision in most borderline cases.
 
Despite the best effort of micro-organisms, I am still ALIVE
 
You think. In two hours you'll be craving the flesh of your co-workers, and fifteen minutes later you won't care anymore if you're alive or dead, as long as—BRAINS!!!!
 
9:04 AM
I started to die lunch time Thursday. more or less passed out on couch that night, the evening was a blur. Friday morning was spent in bed, dead to the world. That afternoon ventured down stairs to save me from festering in bed. Saturday, party!
Seriously, never been so ill for such a short amount of time before
 
Sorry to break it to you, but you're a zombie now.
 
I thought he was a skeleton pirate
 
Well, may as well embrace it
I do actually have photos some where of Zombie me... but I think it would much more fun to get some fresh photos
 
Xeo
Close votes here please
 
@Xeo Gosh. I can see why he didn't try it. Neither snippet compiled.
 
9:19 AM
@RMartinhoFernandes you actually tried? I didn't read over the C#, but I could see the c++ was missing std namespace
 
@thecoshman I don't need to try it. I can compile both languages in my head.
Also, the syntax highlighting is a dead giveaway that base is a keyword in C#.
@ScottW It's a dupe of this: stackoverflow.com/questions/448258/….
 
@RMartinhoFernandes I try that with all languages, but they keep coming up against a compiler error "Compiler too lazy to bother"
 
Xeo
@RMartinhoFernandes, where was that constexpr turing question?
Ah, nvm
3
A: Is constexpr-based computation Turing complete?

Richard SmithTLDR: constexpr in C++11 was not Turing-complete, due to a bug in the specification of the language, but that bug is in the process of being addressed, and clang already implements the fix. constexpr, as specified in the ISO C++11 international standard, is not Turing-complete. Sketch proof: E...

î the guy who implemented constexpr in Clang
 
See, told you it lacked on the infinite part.
Glad to see that temporaries are not temporary in constexpr.
 
9:42 AM
thinking about adding a wiki page tracking which users have publicly expressed dissatisfaction with the meta police. It seems so hard for them to understand that it's not just individual troublemakers
 
@jalf where would you add that page?
why on earth do people abbreviate words in there email signatures? it 'types' it for you every damn time!
 
@thecoshman no clue. Was just a thought
just to have it as a useful reference, since it seems whenever you talk to them, you constantly need to remind them of the obvious
I'd probably make it a temporary one too. Doubt it'll be needed a month from now
 
9:59 AM
Oh my God, what does this mean?
> @sehe: Or those that share my thoughts. Note though that there are comments in this whole question targeting me, most of them are just a personal statement without no proof / back-up / facts / references whatsoever. In this occasion ShaDowWizArd actually partially agrees with me, so unless someone else throws a comment towards me I don't need proof anymore for this comment thread. – Tom Wijsman 49
^^ My initial response "does that have any relevance outside of the circle you, Tom and Mr. Wijsman?" (probably not constructive to post as reply)
 
Xeo
10:11 AM
// An infinite tape!
struct Tape {
  constexpr Tape() : l(0), val(false), r(0) {}
  constexpr Tape(const Tape &old, bool write) :
    l(old.l), val(write), r(old.r) {}
  constexpr Tape(const Tape &old, Dir dir) :
    l(dir == L ? old.l ? old.l->l : 0 : &old),
    val(dir == L ? old.l ? old.l->val : false
                 : old.r ? old.r->val : false),
    r(dir == R ? old.r ? old.r->r : 0 : &old) {}
  const Tape *l;
  bool val;
  const Tape *r;
};
 
Xeo
From the turing machine code in Richard's answer
 
Yes, I saw that.
 
Xeo
Argh, I think I'll go sleep another hour or so...
 
10:37 AM
can anyone see a way of rescuing this: stackoverflow.com/questions/9565003/…
I can't quite figure out what they're actually asking
 
Same here.
 
So, there are two problems?
 
Sounds like he's underestimating us! We're much more than just another half! ;)
At least two thirds
 
@awoodland stackoverflow.com/questions/9565003/… my best effort of working it out :S
ah, @sbi... what you say on the subject of 'dinner for one'?
 
sbi
10:47 AM
@thecoshman I say: "Huh?"
 
@sbi apparently, it's unavoidable new years eve in Germany
 
WTF are you talking about?
 
According to QI, every new years eve in Germany, an old Sketch called 'Dinner for one' is aired on every tv channel
 
Maybe "dinerisch für ein".
 
could be :P
it's an old black and white sketch, where some posh old lady is having dinner, and the butler is trying to convince her she is with company. The butler slowly get's more and more drunk as the sketch goes on
 
sbi
10:54 AM
@thecoshman Ah, that. Yeah, it's true. I guess it even is funny, for the first ten times, or so. (There's a year between the broadcasts, remember.) But I've been without a TV for >20 years, so I didn't even know they're still broadcasting it.
 
OMG, they've been at it for 20 years?
 
sbi
@RMartinhoFernandes No, it's an old British lady and her servant. IIRC, it's all in English, and the title, in Germany, is indeed "Dinner For One".
 
sbi
@RMartinhoFernandes At least 40 years, probably longer.
 
so it's true!!!
 
sbi
10:56 AM
@thecoshman Yeah, it is.
 
was it really broadcast on every channel at the same time?
 
sbi
@thecoshman I don't think so.
Dinner for One, also known as The 90th Birthday, or by its corresponding German alternative title, Der 90. Geburtstag, is a comedy sketch written by British author Lauri Wylie for the theatre in the 1920s. German television station Norddeutscher Rundfunk (NDR) recorded a performance of the piece in 1963, in its original English language, with a short introduction in German. This comedy sketch went on to become the most frequently repeated TV programme ever (according to the Guinness Book of Records, 1988-1995 eds.; later editions no longer have the category). The 18 minute single take bl...
Look, they even have an Wikipedia entry about it.
 
"Der 90. Geburtstag"? Damn, I would never get it right.
 
@sbi oh yeah, we get that too
not sure why, tbh
 
@jalf what country you from?
 
10:58 AM
denmark
 
> As of 2005, the sketch has been repeated more than 230 times.
I have to see this. Let's see if it's been purged from YouTube.
 
@thecoshman if it came from QI it's probably somewhere between false and half-truth
 
@awoodland :P bet it makes for great entertainment :D
 
What's QI?
 
sbi
@RMartinhoFernandes "...it gained its fixed spot on New Year's Eve in 1972" — Wikipedia. So I was wrong and it will only be 40 years this New Year's Eve.
 
11:04 AM
@ScottW One of four half-truths.
 
@RMartinhoFernandes worth youtubeing :D
 
@RMartinhoFernandes it's a quiz show with Stephen Fry - QI stands for "Quite interesting", the format is basically ripping into one of the regulars and falling into obvious common myths
they have quite a few famous comedians on it
he's a bit pompous
 
@awoodland is he? really?
 
(I like QI and a lot of the older roles he's had)
I got bored of house - they only actually have about 5 distinct cases
 
@awoodland You're wrong! It's lupus!
 
sbi
11:09 AM
@thecoshman To understand this issue, you will have to know that there are two official non-private German TV and radio stations, one of which (ARD) is split into regional broadcasting corporations. Each of them has their place in the main channel's schedule, but they also all have their own regional channels. (Which by now you can of course receive all over Germany, no matter what region you're in.)
According to the Wikipedia entry most or all of those regional channels broadcast the sketch, and I would assume their main channel does so, too — which accounts for high numbers. The other non-private channel doesn't, though, nor do the private ones.
That's all TTBOMK, of course, since I don't watch TV.
 
It's not that funny. It's way too long. Gets boring.
 
@sbi and that's exactly what they neglect to mention in the QI factoids
 
I don't want to have to put up 50 rep just to get this WPF question answered :( I only have 77
 
sbi
@RMartinhoFernandes Aw, c'mon. You young people have no patience for a good sketch to play itself out. It is funny.
 
@sbi Yes, it has funny moments, but it's too long.
 
11:13 AM
Do you think it's okay to use Boost.Serialization for saving binary data to file? In my case, I have the skeleton of an animation, together with its skin that I want to write to a file as binary data.
 
@sbi you Germans :P
 
sbi
@RMartinhoFernandes I think I disagree. Maybe it's a bit too subtle for you young folks, but the way the butler keeps getting more and more drunk, drinks from the flower pot, stumbles over the tiger, etc. is increasingly funny. And the final words ("I'll do my very best") are just great.
 
@sbi perhaps this is why it is not aired in the UK, we just don't find that sort of thing funny
 
which I guess is because most people get so drunk that drinking from a flower pot is a relatively sober thing to do
 
11:16 AM
lol I got a pizza hut ad on that video
 
I got a "Zombie Infestation" ad.
Whatever that is.
 
targeted advertising - so close and yet so far
 
sbi
@RMartinhoFernandes Well, that video isn't available in Germany. Oh the irony.
 
21 mins ago, by R. Martinho Fernandes
I have to see this. Let's see if it's been purged from YouTube.
@sbi I knew it!
-10
Q: How to get your 15 rep points before Jon Skeet (an maybe with his help)

vulkaninoI've found a good, working method to answer a question before Jon Skeet arrives, writes a perfect answer and gets his 15 reputation points (it is legal). No need to wake up at 3AM anymore. The trick is to search for the newer questions without using the tags. In fact many questions have bad tag...

 
sbi
@RMartinhoFernandes Well, there's always someone putting up an alternative version that hasn't been deleted yet... youtube.com/watch?v=BN9edpdCH7c
 
11:24 AM
@sbi Maybe it doesn't strike my funny chord. I don't see how age is relevant: the comedic bits are ageless.
 
@RMartinhoFernandes I think that is a strong argument for a meta.meta.stackoverflow
 
> So, you don't fix tags to get rep? That doesn't make the site a better place. If you want, I also know a good, working method to answer a question before Jon Skeet arrives, writes a perfect answer and gets his 15 reputation points, and isn't gaming the system: write a perfect answer yourself. – R. Martinho Fernandes just now
The "(it is legal)" bit in there makes me think there's some seriousness involved.
 
sbi
Me thinks that, if he would have been really serious, he probably wouldn't have shared the trick. Well, or he's a dick who's proud to have discovered that incredible insight and just couldn't hold back.
 
stupid replys, only one user can be notified
(╯°□°)╯︵ ┻━┻
 
6
Framed Garbage

Proposed Q&A site for people who like to preserve the popular detritus of other sites where questions and their answers are no longer on-topic (if they ever were).

Currently in definition.

 
11:35 AM
@RMartinhoFernandes I could get behind that if the title wasn't so loaded - it doesn't break links if they're migrated instead of deleted and you can still close as dupe of migrated things
 
good day all
 
cpx
good day
 
how's things?
 
@RMartinhoFernandes anything interesting in them?
 
11:46 AM
Looking over it right now.
 
damn; I want to go for lunch now
stupid small breakfast
 
There's a push for including Boost.Asio.
Bignums.
 
There's an Intel proposal for what looks like making OpenMP part of the language.
 
@RMartinhoFernandes about time IMHO
and whilst they're at it I'd like reductions on user defined types :)
 
11:51 AM
why openmp
 
it has quite a lot of weight behind it
it's by far the easiest way to do simple bits of parallelism
 
@awoodland Looks like there are some reductor templates in it. But it's still a presentation so far. Actual proposals coming next meeting.
 
yeah sure, but to mee it seems just strange to code, with all these pragma stuff, the tbb/ppl stuff with lambdas etc just feels more natural to me, don't know about you guys?
 
the pragmas can be used to implement a parallel <algorithms> equivalent
and I like the way they degrade to a warning on systems which don't support it
 
11:55 AM
note that the pragmas are there precisely because it's not a part of the core language. If it was, I'd imagine that it'd get some dedicated keywords instead of hiding in pragmas
 
@jalf that would be cool
 
@jalf Yes, the slides show these as keywords.
It seems like Intel has those implemented in their compiler or something.
 
@jalf and you can always make "it's still serialized" be a valid implementation though
 
@ScottW actually, I had a muffin and yoghurt
 

« first day (506 days earlier)      last day (4425 days later) »