« first day (1110 days earlier)      last day (3840 days later) » 

1:00 PM
@Xeo yep, it may be const. doesn't really matter here.
@R.MartinhoFernandes well it's a "handle"
 
Xeo
Take a hint iterator or something
 
void modifyA(ObjectId id) { auto&& obj = *m_objs[id]; ...} would be a better API, but it will be ~slow~. like really slow.
 
@Rapptz Nice to see that non-Windows-specific tools are catching up. I was auto-storing/restoring Windows forms, (including the all the UI data in the controls), in 1999, (Delphi 5).
 
struct handle {
public:
    Obj const* operator->() const { return ptr; }
    Obj const& operator*() const { return *ptr; }
private:
    Obj* ptr;
    friend class the_containing_class;
}
 
well... Obj can keep a non-const pointer to itself. but meh, that's just an ugly hack
 
Xeo
1:03 PM
No, make a new handle class
 
yeah. or a new class.
but constness is kinda fucked in C++.
 
user1804599
Your architecture is bad and you should feel bad.
 
ok. I'll use struct the_containing_class::handle. so I won't use const_cast, friend and other bad keywords.
 
I still don't get the hate for friend.
Yes, its granularity is too coarse. That's all. In this case, there is one private member, so there's no difference between fine and coarse granularity.
 
Who else is there to hate, if not your friends
 
user1804599
1:08 PM
Other languages have alternatives for friend which are usually much more “open”.
 
Xeo
@R.MartinhoFernandes And really, it's the same as putting handle into ObjectTable here
 
@R.MartinhoFernandes taht would be an enemy
 
user1804599
E.g. internal in C# and private in D.
 
well maybe I just don't like to have friends.
 
@thecoshman yup. not even zebras are black and white
 
1:10 PM
I also don't know what's that bad about that keyword, but it kinda feels wrong.
 
Learn to stop worrying and love the friend.
 
Turn him the other cheek
 
I use friend with no qualms in my code, and anyone that comes spewing nonsense about how bad it is can go take a hike. Assuming they have legs.
 
@sehe they are black
 
user784668
friend is goto in disguise
 
1:12 PM
@LightnessRacesinOrbit yup that's the fun of this hack. It's rather old, really. I remember 'inventing' it around jan 2012 and even then ISTR that the Robot pointed out this wasn't the first time anyone discovered this
 
@thecoshman Obviously
 
@sehe no really, they are black with white strips
 
they are actually white with black stripes
 
#define halloween_goto friend
 
1:12 PM
@R.MartinhoFernandes ... used well, it is a good thing IMO.
 
now shaddup
 
@thecoshman What baffles me is that it is really hard to use wrong :S
It's almost impossible unless you are going for pathologically bad.
 
Zebras ( or ) are several species of African equids (horse family) united by their distinctive black and white stripes. Their stripes come in different patterns, unique to each individual. They are generally social animals that live in small harems to large herds. Unlike their closest relatives, horses and asses, zebras have never been truly domesticated. There are three species of zebras: the plains zebra, the Grévy's zebra and the mountain zebra. The plains zebra and the mountain zebra belong to the subgenus Hippotigris, but Grévy's zebra is the sole species of subgenus Dolichohip...
 
@TonyTheLion are you trying to lead the pirate in yet more pointless arguments? Just pass NULL :/
 
user784668
1:13 PM
Also why people who don't know C++ file bug reports about C++ compilers.
 
> Embryological evidence, however, shows that the animal's background color is black and the white stripes and bellies are additions.
 
user1804599
Ugh
 
@TonyTheLion now shut up
 
user1804599
file.open(File); // ugh not ctor
// do stuff // ugh exceptions
file.close(); // ugh explicit
 
@thecoshman what's your point?
 
1:14 PM
@thecoshman oooh spelling correction
 
@sehe ugh
 
@TonyTheLion that they are black with white stripes, not white with with black stripes
 
user784668
@rightfold do_what_i_mean();
 
@thecoshman If you're a synesthete they are contralto with tenor stripes.
 
user784668
@thecoshman they're yellow, you moron.
 
1:15 PM
yesterday, by R. Martinho Fernandes
@thecoshman What's the problem?
 
@thecoshman fascinating
 
@R.MartinhoFernandes isn't synesthete that thing where you taste colours?
 
@thecoshman it's that thing when your brain cross-talks sensory signals
 
@TonyTheLion ¬_¬ now if people would just automatically assume anytime I correct someone is only to be an arse
 
@thecoshman I suppose that's one possible manifestation.
 
1:16 PM
@sehe oh right, so not just the tasting colours thing
 
@thecoshman I didn't know that. Fascinating
@thecoshman indeed
 
@sehe you know that argument we often get into about me perceiving you as an arse... fairly sure this time you are actually trying to an arse
 
@thecoshman Wikipedia doesn't list that form, but it lists this one: en.wikipedia.org/wiki/…
 
user784668
@thecoshman @sehe doesn't need to try to be
 
@thecoshman ... go ahead
@Fanael be? "trying to an arse" is clearly something else
 
user784668
1:19 PM
@sehe Oh, you're right, thanks for the correction.
 
Already meta
 
@sehe (╯°□°)╯︵ ┻━┻ what ever
@R.MartinhoFernandes yeah I think that was what I was thinking off
 
c'mon, stop arguing, and do the quiz!!!! serial killer or a programmer
 
@thecoshman You do realize that there's only one party suffering, right. And there is precious little I can do to stop that. (Assuming that throwing tables is somehow related to negative emotions)
 
I got 9/10 :F
 
user784668
1:23 PM
I got 5/10 by always picking "serial killer". Seems about right.
 
lol
 
@Fanael That should actually be 10/10
 
@sehe erm, 'meh'?
 
@thecoshman Why does "Yup, that tasted purple!" jump into my mind now?
 
user1804599
@BartoszKP 4/10
 
1:26 PM
@ArneMertz Because that's the color of your avatar? Well, distantly I hope
 
@ArneMertz ... Ralph?
 
@rightfold : DD probably you should just remember to reverse your judgement in this context :P
 
@sehe no, I don't see my avatar because its blocked by the company proxy
@thecoshman Lulu.
 
@ArneMertz It's a nude sexy woman.
 
@ArneMertz ... all avatars are hosted by the same site... so you shouldn't be able to see any of them then.
 
1:29 PM
@R.MartinhoFernandes damn shouldnt have uploaded that photo of my ex...
 
user1804599
@thecoshman false.
 
user1804599
You can upload your avatar on Stack Exchange without using Gravatar.
 
user784668
@rightfold nil.
 
user1804599
@Fanael [nil nil:nil]
 
1:29 PM
I should answer questions again
 
@R.MartinhoFernandes guessing, or you actually recognized them?
 
@BartoszKP Recognised language inventors, guessed cannibals for the rest :)
 
user784668
@rightfold A vector consisting of a symbol nil and a symbol nil:nil?
 
@rightfold do correct me then
 
@thecoshman I can see 3 right now: @BartoszKP, @rightfold, @TheForestAndtheTrees (whoever that is)
 
1:31 PM
@R.MartinhoFernandes nice ;o I only recognized the haskell guy
 
@rightfold you can o_0 since when
 
Xeo
@Fanael Looked like Objective-C
 
user1804599
@thecoshman I don’t know.
 
@thecoshman A while back, actually.
 
user1804599
@Fanael send the message nil:nil to nil, resulting in nil.
 
1:31 PM
@thecoshman his company's proxy filters out only non handsome ones ;0
 
user1804599
(Not sure whether it compiles but oh well.)
 
Jeremy Tunnell on January 15, 2013

One of our New Year’s resolutions here at Stack Exchange is to take a hard look at our user experience. As the network has grown and our audience expanded, the system has grown with it – but there are some rough edges in places that can use a bit of smoothing. You’ll be seeing a lot of improvements over the next few months, but today I’d like to announce the first bit of polish: built-in profile pictures.

We have used Gravatar to let you manage your profile picture since roughly six to eight weeks before Stack Overflow entered beta. Gravatar is a wonderful service that lets you use a con …

 
user784668
@Xeo Oh, and I thought it's Emacs Lisp.
 
0
Q: C/C++ How does compiler separate tokens according to operator's precedence and associativity?

user1645275Consider the following codes: int a = 3; int b; b = a > 0 ? ++b, ++a : --a, b = 0; After execution, I get the value of b to become 0 and the value of a to become 4. That means the result of condition expression, a > 0 is evaluated as true and the expression a++ has been executed, while the exp...

 
1:33 PM
@Xeo Success!
He was trying to get the car out of the road, right?
@Rapptz Gosh what a mess
 
some sequence point related issue probably
 
2
A: Exception safety - patterns for reliably rolling back object state

Evgeny PanasyukIn general it is called ScopeGuard idiom. It is not always possible to use temporary variable and swap to commit (though it is easy when acceptable) - sometime you need to modify existing structures. Andrei Alexandrescu and Petru Marginean discuss it in details in paper following paper: "Generic...

 
user784668
@BartoszKP No.
 
@R.MartinhoFernandes huh... well there we go then
 
@Xeo great success
 
1:36 PM
@BartoszKP I didn't recognize anyone. 9/10 tho
 
@BartoszKP Not really. It's about parsing.
 
@Fanael tldr for me right now, so just guessing
@ArneMertz you can safely hire people ; )
 
Is this an ok place to ask a question on libpqxx C++ library? Used for accessing postgresql
interface with*
 
user784668
@digvijay91 No.
 
@Fanael Alright. thnx
 
user784668
1:40 PM
@digvijay91 Ask on SO.
 
yea
 
the best thing I found to eat was a brownie
 
mmm, brownies
 
@sehe your cousin is so much cooler than you
 
@BartoszKP you can't say that from the 9/10. If I accept 6 and 1 of them is a serial killer I mistook for a programmer, that's a bad quota. Luckily I dismissed a language inventor ;-)
 
1:46 PM
@ArneMertz Also depends on the serial killer's target group ; )
 
@Xeo Mateusz Pusz aced the C++ brainbench :v
 
Xeo
Meh, you needed to make your result public, hab no idea about that
 
@TonyTheLion ...
 
well, still, he had score of 5
 
I wonder why vector::push_back doesn't provide strong exception safety.
 
Xeo
1:52 PM
it doesn't?
 
> If an exception is thrown other than by the copy constructor, move constructor, assignment operator, or move assignment operator of T or by any InputIterator operation there are no effects
No guarantees given for exceptions thrown by the listed sources.
 
Xeo
huh
 
Also, that sentence is ambiguous.
 
I interpret it as the state of the vector doesn't change.
 
@Rapptz But it says nothing if any of those exceptions to the rule throws.
 
1:54 PM
¬_¬ only work yesterday and today this week, already too much shit for me
 
(The ambiguity I see is that I can't tell "if by any InputIterator operation" is part of the exception list or another object to "thrown")
 
user784668
vector sucks
 
user784668
Use new[]
 
Anyone know how i can regex split a string on newline without caring for empty rows?
 
@DavidKron we all know
 
1:56 PM
"thrown (other_than (or ... InputIterator))" vs "thrown (or (other_than (or ...)) InputIterator)". But that's irrelevant.
 
@BartoszKP \\s+ is not enough
 
@DavidKron didn't say that \\s+ is enough
 
\\s+ is a regex that matches things like \sssssssssss, not whitespace.
 
assuming raw string
 
\s+ durrhurr
 
1:59 PM
@DavidKron regex does not 'split' strings.
 
it's a valid assumption because no one would escape backslashes here.
 
@thecoshman No,but you can usually split it one by using a regex
 
@BartoszKP I don't
 

« first day (1110 days earlier)      last day (3840 days later) »