« first day (513 days earlier)      last day (4661 days later) » 

18:07
Oops. Of course I can't see the items. I placed them all exclusively inside the walls.
You like putting stuff inside the walls.
"The kilogram is the only SI base unit ... that is still directly defined by an artifact rather than a fundamental physical property that can be reproduced in different laboratories." "The International Prototype Kilogram is kept in the custody of the International Bureau for Weights and Measures (BIPM)"
Yeah, they regularly compare all the prototype kilograms in the world to check how much they drifted.
18:35
I discovered this weekend that my fixed point class truncates to a multiple-of-whatever-base on input, and truncates to a multiple-of-power-of-ten on output, causing repeated serialization/deserialization to decrease the value slowly, until it hits one that is a perfect multiple of both. I'll have to put in rounding tonight :/
@CatPlusPlus Not anymore!
Time for some fooding now.
Truly "talented" trolls
hahah
didn't know trolls could even be considered in that category :P (yes I know the word talented is in quotes)
What's the best random function to use in C?
the one that finds you a random new language to code in
18:50
rand() is very poor
0
Q: Prevent an Object from destroying prematurely

IntermediateHackerHere's the (relevant) code for my pro::surface class: /** Wraps up SDL_Surface* **/ class surface { SDL_Surface* _surf; public: /** Constructor. ** @param surf an SDL_Surface pointer. **/ surface(SDL_Surface*); /** Overloaded = operator. **/ void operator = (SDL_Su...

That was random.
@ManofOneWay That's the only standard C random number generator.
There's no other one.
@ManofOneWay I suggest embedding python into your C program for its sweet randomness. Though this may seem overkill.
lrand48.
guess I'll have to resort to pointers. :'(
uh
you know there's really no difference at all, assuming no exceptions, between { T t; ... } and T* ptr = new T; ...; delete ptr;?
Yeah, and what's the point?
as in, the object lives for the exact same amount of time?
Right.
But why would you want the second one?
Did you turn evil?
@DeadMG then why am I getting a runtime error without using the pointer?
@RMartinhoFernandes read the question.
the fuck should I know? I don't know SDL
ohhh, yeah
you violated Rule of Three, bitch
the reason that your pointer code works is because you happen not to need Rule of Three in that tiny little snippet
if it's a pointer
follow Rule of Three
Oh, right, no copy ctor.
Answer it and get your rep!
Quick!
Still, my answer still stands.
You should pair SetVideoMode with Quit.
@DeadMG post your answer.
@CatPlusPlus yeah. that works too.
18:58
@IntermediateHacker I just did.
damn, still 5 minutes till I can accept an answer.
I wonder how many people will downvote me for calling you a bitch?
You should be allowed, you're a dog.
woof woof!
lol.
@DeadMG your answer got censored.
19:01
That was expected.
I uncensored it
I've got high enough rep to uncensor my own damn answers! muahaha
Yay, edit wars.
@DeadMG lol.
well, I don't remember why the "bitch" is in there, but it's gonna stay there until someone more important than me comes along to remove it
19:02
damn.. still 2 min left.
@CatPlusPlus I learned a long time ago to not repeat myself in a fight. I censored, he uncensored, I walked off
and MooingDuck is definitely not more important than me
@DeadMG That won't take long, I'm sure.
yeah, I bet
19:05
@DeadMG accepted.
by the way
you really shouldn't have an explicit free() function
that's the destructor's job
@DeadMG yeah, I just made that to check what the problem was before posting the question.
What he said.
Btw, I like unique_ptr<SDL_Surface, decltype(&SDL_FreeSurface)>;.
It requires unpacking to use it with the API, though.
Or writing wrappers anyway.
19:08
ptr.get()?
ptr.get().
Xeo
Xeo
&*ptr; // !
anyway, bye all. It's 11:08 PM. And I'm sleepy as hell.
&*&*&*&*&*ptr;
@CatPlusPlus But even in the wrapper, it gives you rule of three-compliance for free.
Xeo
Xeo
19:09
@RMartinhoFernandes You have to keep in mind that not all SDL_Surfaces are meant to be SDL_FreeSurfaced.
@Xeo Ugh, what?
(The ones in his wrapper seem to be)
Xeo
Xeo
Most notably, the one returned from SDL_SetVideoMode or whatever it's called
Xeo
Xeo
Yep
0
Q: Ubuntu with cc1plus - error Not Implemented

bladepitI am trying to use the make command on Ubuntu 11.10, but get an error. g++ -g -O2 -fPIC -fPIC -Wall -Wpointer-arith -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -Wno-deprecated -Wno-unused-function -I/usr/local/include -I/home/jochen/RDKit...

Xeo
Xeo
19:12
So you need a special deleter
@Xeo So, the code in the question is buggy anyway?
Xeo
Xeo
And set whether it should delete or not with up.get_deleter().set_delete(blargh); or sth
@RMartinhoFernandes Dunno, I was afk until just now when I saw you mentioning that unique_ptr and SDL_Surface stuff
Now @Cat's answer makes sense.
Xeo
Xeo
Linky?
What frakking stupid API is this? Sounds like Windows registry handles that can't be closed with CloseHandle...
24 mins ago, by IntermediateHacker
0
Q: Prevent an Object from destroying prematurely

IntermediateHackerHere's the (relevant) code for my pro::surface class: /** Wraps up SDL_Surface* **/ class surface { SDL_Surface* _surf; public: /** Constructor. ** @param surf an SDL_Surface pointer. **/ surface(SDL_Surface*); /** Overloaded = operator. **/ void operator = (SDL_Su...

My first mobile game will be free but if you pay a little then the NPC's will be extra nice and complement you more while playing.
Xeo
Xeo
19:17
@RMartinhoFernandes SDL's API sucks dick, but hey, what did you expect.. it's C.
No ownership semantics, yay.
I hate it when people don't post the code they have trouble with
And I hate it when they mistake IntelliSense errors for compiler errors.
I hate char*.
Oh, that's from IntelliSense. I missed that.
Xeo
Xeo
@MooingDuck: Meh, ignoring the deprecated char* literals.
I'm totally into creative trades (this part is actually serious). Musical instruments (serious - esp synths and pedals); original art (serious); US Currency (for srsly); leisure suits (I'm 6'1'', 180, with long arms and broad shoulders. Let's stick with dark colors - I'm kind of pale and I don't like to look washed out); real estate/underwater mortgages (4realz dogg); antique firearms (I promise I won't trade you the bike and then shoot you with what was previously your firearm in order to steal my bike back and sell it again, although wouldn't that be ironic, or would it, I don't know, we
(see full text)
@Xeo and the const::std string?
Xeo
Xeo
19:28
Well, I said that this was not the code he compiled. :P
@Xeo true, but it's misleading still :/
I remember once I got a bunch of intellisense errors on code that compiled fine, so I started rearranging stuff at random to see if I could make it go away. I discovered that if I moved a particular comment from one line to another, I got completely different intellisense errors. No code change, just moving a comment :/
Xeo
Xeo
If IntelliSense fucks up internally, you need to reload the project.
Or clear the .sdf
@Xeo Or just disable it completely.
@RMartinhoFernandes No one ever logged into my FB account. Not even me. Works like a charm
hmm, kmangold says he regularly links files with VC++ that he compiled with MinGW. Interesting
19:33
@sehe Yeah, same here.
by the way
my sexual attractiveness vastly outweighs yours
4
I just figured I'd mention this
Are you drinking?
@DeadMG I thought you were delaying that unduly. Almost had to fill in for your omission
19:33
Smoking?
Falling down the stairs and hitting your head repeatedly?
Anyway, my sexual attractiveness certainly doesn't weight much. I try to keep in shape.
I wish I was drinking right now.
hey
saying such things is practically part of my normal behaviour
I don't see why you find that I must be mentally impaired
lol
@DeadMG You got a point there.
@DeadMG Well, being drunk mentally impaird (yay edits) might be part of the same, normal, behaviour, so that's a false contradiction
@ScottW Better than OpenGL, bitch.
19:37
@DeadMG Well, duh.
@DeadMG Yeah, but OpenGL is open!
It has to be better!
@EtiennedeMartel Openly shite.
like Linux
@DeadMG Openly shite is better. Much easier to decide when to stay away
Let's make ClosedGL. It will be the best of all.
@sehe All the time.
@RMartinhoFernandes It already exists. DirectX and friends
19:38
@RMartinhoFernandes Shitty. Closed-source. All it needs is for its owner to aggressively sue its competitors and we're golden!
@sehe It's not the best of all.
@RMartinhoFernandes My point exactly.
52 secs ago, by sehe
@DeadMG Openly shite is better. Much easier to decide when to stay away
@EtiennedeMartel Oh man, did you see that Ruby on Rails vs ASP.NET "commercial" which played that joke?
@DeadMG Noupe.
@DeadMG Oooh, linky.
19:39
@ScottW RARGH U STOLE MY LINE
@DeadMG Calm down and slap the motherfucker.
responsible: nothing -> martinhofernandes
Thanks for emailing me this, bitbucket.
@DeadMG Was that supposed to be funny?
It falls pretty flat.
(Plus, they can't even distinguish between type inference and dynamic typing.)
19:42
Wow, this series somehow managed to piss off ALL the programmers out there...
Top YouTube comment.
I think you're comparing pineapples and airplanes here.
lol
Does anyone have std::is_trivially_copyable?
what is a template template??
Xeo
Xeo
@KerrekSB Who is "anyone"?
@Xeo Any of you young kids with the l33t compiler trunk builds
19:50
one question asks about "variadic variadic template templates". wtf
Anyone can be "anyone".
Anyone.
I don't have it in my sedate GCC 4.6.2
@KerrekSB You mean 1337.
Xeo
Xeo
I guess Clang does.
l33t is not 1337 enough.
19:51
Anyway, could you check whether capturing and non-capturing closures differ w.r.t. trival-copyability?
@RMartinhoFernandes I was going for subtlety
what happened in year 1337
@JohannesSchaublitb I think it was a leap year, so it got skipped.
Maybe it was a leet year.
@JohannesSchaublitb Hundred Years War started.
Xeo
Xeo
@KerrekSB by ref or by value capture?
19:53
Oh wait what wow - 4.6.3 and 4.7 are out??
is it not true that "template template parameter" groups like "{template} {template parameter}"?
@Xeo Well, any.. compare to non-capturing
Xeo
Xeo
#include <type_traits>

int main()
{
  auto l1 = []{};
  auto l2 = [&l1]{};
  constexpr bool b1 = std::is_trivially_copyable<decltype(l1)>::value;
  constexpr bool b2 = std::is_trivially_copyable<decltype(l2)>::value;
  static_assert(b1 == b2, "huh");
}
Which indicates nothing changes
Clean compile
@Xeo Thanks!
Shame.
Xeo
Xeo
Heh, tried to find a difference?
19:54
So... what is the value?
Xeo
Xeo
true
@Xeo Yeah, I thought it might be a backdoor answer to that question from earlier.
Xeo
Xeo
static_assert(b1, "oO");
Compiles.
5
Q: C++ lambda capture constraints

UgoIs it possible to constrain the type of capture of a lambda given as parameter ? For example, Is it possible to take only lambdas that don't capture anything by reference ? template <typename F> void f(const F& lambda) // F must be a lambda that do not capture by ref { ::: }

@Xeo Hmm... maybe another trait will do?
Xeo
Xeo
Didn't I just test exactly that?
19:57
@Xeo I just pasted that link for the list of alternative traits
Maybe just is_trivial (though I think the standard says "no")...
Xeo
Xeo
Ah
is_assignable might be worth a shot, since you can't assign references
Xeo
Xeo
lambdas are never assignable
Also, I think the actual triviality of copying (or moving) lies in what the lambda captures
Yeah, also true...
Xeo
Xeo
If it captures something that is non-trivially copyable by value, the lambda will not be trivially copyable
19:59
(Should I compile and install GCC 4.6.3, an upgrade of a stable version I like, or 4.7, whose buggy betas have bitten me more than once?)
Xeo
Xeo
Install Clang!
@KerrekSB 4.7 isn't out yet.
I have clang 1.1 in my distribution
Xeo
Xeo
@KerrekSB 1.1?!
20:00
@RMartinhoFernandes Oh really? That would solve my problem.
$ clang --version
clang version 1.1 (branches/release_27)
Target: i386-pc-linux-gnu
Thread model: posix
Xeo
Xeo
Oh wow.
What crappy distro is that?
(Just so I can stay away from it)
@RMartinhoFernandes Ubuntu 10.4 LTS
Xeo
Xeo
20:55:24 $ clang -v
clang version 3.1 (trunk 152314)
Target: x86_64-unknown-linux-gnu
Thread model: posix
@KerrekSB Oh, I'm staying away from that one already.
20:01
@Xeo yadayada. That's like Firefox. "Hey, have you got Firefox 22 yet?" "No, I'm still at 17.1" - "Dude, that's so three months ago!"
@RMartinhoFernandes Well, it's pretty old. But it's LTS.
Generally there are backports of new stuff
E.g. I have some 3.x kernel
Xeo
Xeo
Except that 1.1 and 3.1 is a huge difference
Especially in terms of Clang and C++(11) support
But you wouldn't get a new version of glibc, say.
@KerrekSB Whatever, I like my distros with blood to keep up to date packages.
Anyway, upgrading a distribution has always broken so much stuff in the past that I absolutely want to keep upgrades to a minimum.
I might go for 12.4 when it comes out
But pain once every two years is enough.
@KerrekSB For me pain is every two weeks (rolling release, rolling way too fast sometimes).
20:04
Is there an online Clang compiler?
Xeo
Xeo
1
Q: Tag wiki excerpts getting displayed incorrectly on SO with FF 10

mKorbelTag wiki excerpts have been getting displayed improperly in Firefox 10.0.2 for the past three hours or so. They're being shown as tall boxes (divs) on the left side of the screen instead of short boxes using the full width of the column. It's wasting a lot of space in the middle of the screen. He...

@RMartinhoFernandes ^^
Would you guys mind if I ask a question here?
@RMartinhoFernandes I just don't have the patience or nerves for constant breakage... and there's always something that breaks
Xeo
Xeo
@KerrekSB Yes, 3.0 I think
@Xeo Where?
Why does the GCC page say "Active development: 4.8"?
@Rachel You already did! Some questions are fine here, some are not. We won't know until you ask.
Xeo
Xeo
@Rachel No meta questions.
@Xeo Haha, the default example includes non-standard headers!
20:05
@KerrekSB 4.7 is frozen for release.
Xeo
Xeo
@RMartinhoFernandes Yeah, I don't have that problem and I'm on 10.0.2 too
@Xeo And remember that there are no stupid questions.
Xeo
Xeo
@KerrekSB Huh? Non-standard?
Ummm well I'm from programmers.SE and I was trying to get the FAQ changed so the site is more about programmers, and not just software development, so wanted to try and get people to visit a meta proposal and vote for/against ideas they like/don't like
So I guess it kind of is meta-related
1
Q: Changing the FAQ to reflect the site's name

RachelA while back I made a suggestion to either rename the site to match the FAQ, or change the FAQ so it matches the site name to help clear up a lot of the confusion I see over what P.SE is for. That question was asked to see if this idea had any support, and I believe it does judging by the 25 upvo...

@Xeo That thing doesn't even have the <type_traits> header.
@Xeo Like <stdio.h>.
20:07
Someone suggested I post in SO chat, so I thought I'd give it a try :)
@KerrekSB That's not nonstandard.
Xeo
Xeo
@KerrekSB Take a look to the right of the edit box
@RMartinhoFernandes Oh, wait, it's a C demo.
Xeo
Xeo
And see the radio buttons with "C" and "C++"
D'oh
Or rather, clanggg.
As the Klingons would say
Xeo
Xeo
20:08
And anyways, yeah, <name.h> is not non-standard.
error: no member named 'is_trivially_copyable' in namespace 'std'
@Xeo It's not required, is it?
@KerrekSB §D.5.
@RMartinhoFernandes Normative?
Xeo
Xeo
@KerrekSB It is.
@KerrekSB Yes. Compatibility feature. Everything in Annex D is normative.
Xeo
Xeo
20:09
Hm, I don't know which stdlib the online compiler is using
@RMartinhoFernandes Oh OK
Hm, the example is interesting: It says that even the <c...> headers may put stuff in the global namespace.
I thought with the proper C++ headers you'd keep the global namespace clean.
@KerrekSB No, that's why they're a tad pointless.
@Xeo error: no member named 'is_trivially_copyable' in namespace 'std'
@RMartinhoFernandes Well, they assure you that you have the names in the std namespace.
Xeo
Xeo
2 mins ago, by Xeo
Hm, I don't know which stdlib the online compiler is using
So they're not totally pointless.
Xeo
Xeo
20:12
Also, it's not clear whether the online demo compiles with -std=c++0x
I see.
Xeo
Xeo
But I think it does if #include <type_traits> doesn't error
It's sad.
@KerrekSB And the point of that is?
OK. I'm off to compile 4.6.3.
Xeo
Xeo
Get the Clang SVN repo, compile that.
20:12
@RMartinhoFernandes You can have all standard stuff in the standard namespace. Tidy.
@Xeo I'd rather use cocaine than SVN.
@KerrekSB But it leaks to the global namespace.
The only thing you get is the ability to use five more characters in every use.
Xeo
Xeo
@KerrekSB There's also a git repo
Via git-svn
@RMartinhoFernandes It may leak.
Hm. Oh well.
@KerrekSB Sure, but show me an implementations where it is otherwise.
@RMartinhoFernandes Hmm....
20:16
No one does the Right Thing.
Xeo
Xeo
This is interesting, the reply notification seems to be updated asynchronously now
@Rachel Upshot seems to be, programmers.se is broken & sinking?
Shit, I followed a link to cracked.com. I foresee zero progress on my roguelike until about midnight.
nearly as bad as TVTropes
Xeo
Xeo
20:31
@RMartinhoFernandes plonk
@DeadMG Thankfully that’s not true. The amount of ads & the splitting of the articles is sufficient hassle to make me leave the site quickly every time.
@Xeo FTR, it worked.
I'm weak.
If a newbie posts a question, then edits it to be different, is there a way for high-rep users to fork it to a different question and roll the original back? Or are the options (A) requesting the OP make a new question, or (B) making the new question under my name?
Xeo
Xeo
Recca is a fast-paced Bullet Hell shooter with awesome graphics, creative bosses, homing weapons and techno music. Even with more than 20+ enemies and bullets on the screen, there is usually little to no slowdown. One must wonder how Naxat Soft managed to code something like this for the NES. [GeniusProgramming]
20:39
I see you trapped yourself too.
@MooingDuck Close it.
Xeo
Xeo
@RMartinhoFernandes Of course.
Linking to TVTropes almost always backfires on me
Especially if it's a part of TVTropes I haven't been on before.
I'm still only at 4 tabs, though.
Try recycling your tabs.
It's less depressing that way.
@Xeo Btw, what's your preferred method of trope binging? BFS or DFS?
Xeo
Xeo
Usually a mixture of both.
Depending on the immediate interest in the trope name
@EtiennedeMartel closing it is harsh. At worst I'd tell the OP to make a new question into a new page, and rollback his change.
@MooingDuck Blow it to smithereens.
3
Abuse your power as a high-rep user.
20:57
@EtiennedeMartel I'm not quite at the 10k bit yet. At that point I'll consider myself high-rep
@MooingDuck Need a few upvotes? wink wink
@MooingDuck Oh, you're still a low-life wannabe. Why do I even chat with you?
@RMartinhoFernandes we're too good for this!
Because you want to look like a hero to the downtrodden?
no, we want to downtrod them!
trod them... down...
whatever
filthy commoners
21:03
@EtiennedeMartel it would probably help if I posted answers more than once a week
@jalf I wasn't even at 10k when I started participating (that is, fucking everything up) here.
We've been fooled!
@EtiennedeMartel don't most people start participating at 0 rep?
oh, or you mean in this chat?
@jalf You need 20 to chat.
@jalf Yeah, by "here" I mean the Lounge.
21:06
we should have our own rep
We should have our own Internet.
on a fan forum for "X", a beginning troll may simply post "X Sucks"
sounds like someone in here???!!! :P
just wanted to let you know. it happens in room 69
i downvoted this one: stackoverflow.com/a/9661158/34509
lol
hmm, I wonder if I'm doing something wrong. Been unable to build clang from svn for the last 4 days. You'd think it was at least somewhat stable for building on mac
I remember there was a post about size_t and C++11, in particular, that it is now defined in some header. However, I cannot find the right question/answer anymore using the search. Do I remember this correctly?
sbi
sbi
room topic changed to Lounge<C++>: C++ sucks, blow it to smithereens, you filthy commoners! [c++] [c++11] [c++-faq] — I harvested the top-starred posts for this.
@RMartinhoFernandes - did you post a screenshot earlier today of a broken page on SO?
@RMartinhoFernandes - your no-repro just got repro'd: meta.stackoverflow.com/questions/125421/…
21:35
oh damnit I got stuck on TVtropes, because this time it's actually interesting
Does anyone here have any experience with the irrlicht engine ?
Xeo
Xeo
@TonyTheLion Isn't it always?
Xeo
Xeo
@jalf It's main platform is mac, IIRC
I'm trying to set up a system to display a directed graph, now whenever a node gets selected (clicked on), I want that node to be "active" or "available", I initially thought of going through a list of rectangles and detecting weather the click location lies inside any of them , but it seems like a clumsy way to do this ! any suggestions by anyone ?
21:47
@angryInsomniac easiest way to do picking in my experience is to draw every pickable object on the back buffer in in a unique colour and keep a map between colours and objects. Then you just need to look at the colour in the back buffer under the mouse and you've found the object.
heh, I guess C++ has its advantages after all
VS11 startup performance
@Xeo yeah, that's what I mean. Is why it seems odd that the same issue would basically keep the trunk broken for 4 days in a row
@jalf what is that "before" and "after" thing saying?
did they rewrite VS11 with c++, as a web application, with vb and with c# ?
@angryInsomniac irrlict has a "picker" for that. I have no idea how it works or how to use it, I merely know of it's existance.
@JohannesSchaublitb before and after their solution load optimizations
the languages are just for loading different types of projects
Xeo
Xeo
21:51
Oh, cool.
Xeo
Xeo
I was actually wondering why VS11 starts up so fast
@JohannesSchaublitb VS as a web application, that's a scary thought...
"When the user eventually pauses to think for more than a few hundred milliseconds, we resume processing of background tasks."
@CheersandhthAlf Good for dating dogs.
21:55
@CheersandhthAlf post it on reddit, bacon gets kharma :P
it was posted on google+

« first day (513 days earlier)      last day (4661 days later) »