« first day (86 days earlier)      last day (4863 days later) » 
00:00 - 22:0022:00 - 00:00

10:00 PM
it does seem I guessed right, he's using cygwin without it being setup for windows-style lines
I just can't recall how to change that or even if it's configurable (no windows here anymore, so I haven't used cygwin either)
 
well hopefully your stab in the dark will be a solid hit.
 
sbi
10:17 PM
I'd like to create an improved version of my newbie hints. If you could refrain from posting any messages while I post the next...glances down... 9 messages, this might work.
You can edit your messages for 2mins. Click the v arrow appearing left of it when you hover your mouse over it. Also, cursor up will edit your last message, escape cancels this.
Markdown sort of works here, like in comments, but it fails for multi-line messages. Apparenty, that's by design.
Links to specific web pages (many pages on all of the SE sites, Wikipedia, Twitter,...) will inline an excerpt of the page, when they are the only text in a message.
Reply to others using the familiar @syntax. The UI will suggest matches after @ and the first two letters. You can cycle between the suggestions using the tab key, accept by entering space, followed by your message.
Reply to specific messages by clicking on the down-and-right arrow that appears at the right of a message when you hover over it (or by clicking the v arrow as mentioned above). This will start the message with :NNNNNN, where NNNNNN is the message's ID (which you also find in the link to the message.)
Now let's see whether I can just move that bookmark...
You can spend a limited number of stars per day on messages you like. Starred messages are shown on the right. (Room owners can also pin messages to the right.)
 
except for the bit where Johannes made multi-line code work
 
sbi
@DeadMG Code works. Mhmm. Should I add a paragraph on that?
 
what's markdown if not code?
 
sbi
Might be a good idea.
@DeadMG bold, italics, inline code...
How do you make those backticks appear? ``
`
``backticks``
Mhmm.
´
`backticks`
<kdb>tab</kdb>
Damn.
Ok, another try:
You can edit your messages for 2mins. Click the v arrow appearing left of it when you hover your mouse over it. Also, cursor up will edit your last message, escape cancels this.
Markdown sort of works here, like in comments, but it fails for multi-line messages. Apparently, that's by design. Code can be formatted using backticks or by indenting it fours spaces. There's also a "fixed font" button when you start a new line in your messages (by pressing Shift+Enter).
Links to specific web pages (many pages on all of the SE sites, Wikipedia, Twitter,...) will inline an excerpt of the page, when they are the only text in a message.
Reply to others using the familiar @syntax. The UI will suggest matches after @ and the first two letters. You can cycle between the suggestions using the tab key, accept by entering space, followed by your message.
Reply to specific messages by clicking on the down-and-right arrow that appears at the right of a message when you hover over it (or by clicking the v arrow as mentioned above). This will start the message with :NNNNNN, where NNNNNN is the message's ID (which you also find in the link to the message.)
 
@sbi might be better to start using some (free) web page hosting that you can edit instead of chat's limited bookmark mechanism; actually, why not post on meta (or has someone already done this?) with all of this information, since it's not limited to just this chat channel
 
10:30 PM
Even before the call of copy constructor , if a function returns a local variable by reference, the returned value becomes invalid. Right ?
 
the reference is invalid, yes
 
sbi
@FredNurk Well, I got it working, and I could even even delete and recreate the old bookmark. I'd hate to use anything other than SO for this. I think this should be easy to take over if I ever drop out here. But I guess meta would be a good place to take this. Why don't you do it? I'd happily delete the old hints and instead point to a new set updated by the whole of the community.
 
I'm not interested in keeping it updated, so I don't think I should create it
 
@Fred Nurk Thanks.
 
bah
turns out that if you have a near plane of zero, it makes you unlawful somehow
oh well
at least it works now :)
 
10:36 PM
@sbi: are you quitting so?
 
sounds like he's just trying to maximize bus number :)
 
sbi
@JohnDibling No, @FredN is right.
 
ok good
 
I practically never have to leave my flat
 
10:40 PM
it would be an evil day when you quit so
 
so I think you don't have to worry about me getting hit by a bus
 
sbi
(I don't think I'd ever pull a Butterworth/Pate. Why would I need to have all my data destroyed, when I could just as well simply stay away?)
 
the bus is metaphorical :)
 
why did Butterworth go?
also
 
10:41 PM
I've been looking back at some of my earliest SO postings
man, they were just so wrong
 
@Bocochoco This answer of mine deals with your question:
2
A: Does std::list::remove method call destructor of each removed element?

FredOverflowYes, removing a Foo* from a container destroys the Foo*, but it will not release the Foo. Destroying a raw pointer is always a no-op. It cannot be any other way! Let me give you several reasons why. Storage class Deleting a pointer only makes sense if the pointee was actually allocated dynamica...

 
sbi
@JohnDibling Thanks for flattering me, but I don't believe this is true.
 
and I'm so glad that I gained the experience of being told how wrong I was by many of the more experienced c++ers
because my old code was so horrific
it's unbelievable
 
@DeadMG C++ Rule #1: You're almost never right ;-)
 
looked at my reputation graph and it's hilarious- looks like an x^2 graph
lol
I'm definitely right about one thing - my old code sucks!
from memory, isn't there some programmer rule which says that everybody always says that about their old code?
 
sbi
10:43 PM
@DeadMG Mine's both more complicated and more linear. :)
@DeadMG Well, there's sbi's Code Theorem: If you don't dislike your old code, you haven't learned enough since you wrote it.
5
 
heh
 
@DeadMG Definitely, I have rarely any old code on my hard drive... most of it is simply too embarrassing to look at after a few months.
 
I had things like
universal reference counting
reference counting to see if text should be displayed
 
I had things like std::swap(t, u) in "generic code" until not so long ago :)
 
sbi
@DeadMG Nothing to be ashamed about, just for the topic. There's a nice series of articles by ark about that.
 
10:45 PM
well I think I just overreacted
suddenly decided that reference counting solved all my problems and didn't need to think about it
just refcount everything - with my own hand-rolled smart pointers, no less- and it'll all be fine
but it's been over a year since I did that
 
@DeadMG that's surprisingly true in the majority of real situations for which scopes alone aren't enough
 
well
since then, I discovered unique ownership, definitely helped by C++0x, and the idea that not everything MUST be a reference
which is a big help
 
unique ownership is just refcounting in the special case where the refcount can't exceed one :)
 
I disagree
 
@DeadMG Mine is mostly linear with a three month break during which I played WoW. I eventually decided that Stack Overflow was a much better MMO.
2
 
10:50 PM
that's like suggesting that the identity matrix is just a matrix with a few specially placed ones and zeroes
heh
I played WoW on and off for quite some time
but decided to drop it for good a few months back
haven't looked back
some good code is much more fulfilling, let alone beneficial
 
I think today I am using SO the most. Could someone go this link pastebin.com/i99nCRsk and comment on it. It is on returning a pointer and a reference. I think I didn't learn pointers/references the way it should be learnt. This is causing confusions. Thanks.
 
@DeadMG I wasn't entirely serious, as it has emergent properties
 
Neither of them causes UB
they both cause memory leaks, but neither is UB
 
@Mahesh sounds like you've been taught 'new' from the perspective of someone who only knows Java/C#
 
they're actually pretty much both the same function- you could implement the second as return *foo();
 
10:52 PM
@Mahesh: the pointer is the local variable in those cases, not the allocated object (which is said to have a "dynamic lifetime")
 
you can't return references or pointers to local objects
but you can return references or pointers which are local objects, that point or refer to non-local objects
the important thing is not where the pointer or reference is, but where what it points to is
 
OK, correct me if i'm wrong here.
 
the important thing is the lifetime of the pointed-to (or referenced) object, which can't be indicated in C++ syntax, but can be indicated by the semantics of a smart pointer class (which is why they're so useful)
 
consider the statement: a = (b+c) * (d+e);
 
@JohnDibling C++ Rule #1: You're almost never right ;-) (quoting @FredOverflow)
 
10:55 PM
:) true dat'
In this case both (b+c) and (d+e) are primary expressions.
 
@Fred Nurk: Unless you use a smart pointer.
 
the associativity of primary expressions is unspecified. so, ignoring the multiplaicative operator * the compiler could evaluate (a+b) or (c+d) first.
but
 
you still have to not abuse the smart pointer, because the syntax only provides limited ways to enforce its semantics
 
of course smart pointers can be abused
what's that quote, protect against ... something, not Machiavelli?
 
you cannot combine two+ primary expressions without some kind of operator that assigns associativity.
 
10:57 PM
the * operator is associative
 
@JohnDibling associativity isn't about that; you need to look at sequence points (0x: "sequenced before")
 
so it is not possible to write a C++ statement where the grouping is unspecified or platform-independant
 
so the compiler has complete freedom
this isn't true for all operators
 
@DeadMG what operators is it not true for
 
assignment operators and friends, to start with
 
10:59 PM
assignment operators group right-to-left
 
also, function calls
wait, that is complete freedom
 
@JohnDibling associativity is about a + b + (c * 2) + d meaning ((a + b) + (c * 2)) + d, but either a + b or c * 2 can be evaluated first
 
in function calls, the order of evaluation of arguments is unspecified
you can write code that will get different results in different compilers
there's a sample on the C# coding blogs, where they explain why they made it have a defined order
 
@deadmg yes, thats true. i wasnt really thinking of that tho
 
@DeadMG you can write identical lines of code that get different results in different locations in the source in the same compiler, in the same compilation, in the same way
 
11:01 PM
indeed you can
 
@fred: there are actually 3 primary expressions there: a, b and (c*2)
 
was merely refuting @Fred Nurk's assertion that you can't write statements with unspecified grouping
 
it was John that said that, not me
 
oh
whoops
 
right. but forget function calls.
 
11:03 PM
how about the comma operator?
int x = 2, 3
 
sbi
@JamesMcNellis SO an MMORPG? Lemme see: Experience points? (They're called "reputation" around here). Check. Special items? ("badges") Check. Check. Choosing fields of expertise to earn experience in? ("tags") Check. Sophisticated fight system? (ever tried to go for an enlightened and then improve in the 5min window?) Check. Massively multi-player? Check. What else would a real-time, MMORPG need that SO hasn't?
2
 
that intruduces a sequence point
 
@DeadMG that's a syntax error, not a comma operator
 
understandably, I've never seen the comma operator actually used or invoked
so you might have to forgive me for that one
 
but the comma operator also has a sequence point, which goes back to my comment about sequence points mattering and John's misunderstanding of associativity
 
11:04 PM
i have used it on rare occasions
aw crap
i actually have to leave :)
sorry to start up a convo then bail, but i gotta go! lol
 
that's ok
I've plenty of other things to do
like, probably, sleeping, it's like way later than I thought it was
 
How about the initializations in initializer lists ? Does that go according to the order we specify or it is up to the compiler to choose the order ?
 
till later, peace out yall
 
it's in the order of definition in the class
which in my opinion is stupid and it should be in the order of the list
 
(@Mashesh: those execute in the order the members are declared)
 
11:06 PM
@sbi SO is still missing a Night Elf class
 
MAH NIGHT ELF MOHAWK
 
@Mahesh the specified order, but that order might not be what you think: base and member declaration order matters, not order in the ctor initializer
struct A { int x, y; A() : y (x), x (42) {} }; // always gives both a value of 42
 
sbi
@FredNurk Why do you think stdlitb is awake at four in the morning six nights a week?
 
maybe he's on a different timezone?
 
@JohnDibling Ha ha! What a surprise! It's beer-o-clock and John runs for the exit!
 
sbi
11:09 PM
@DeadMG He is on mine.
 
it's beer-o-clock soon here, too
 
ah
 
@sbi wait, isn't that normal for programmers?
 
sbi
Funny. User edited their answer to re-insert profanity and received the cleanup badge for their efforts. http://bit.ly/gSlvQs
 
man
that's kinda sick
right
I should probably hit the sack
 
11:13 PM
interesting that 'fuck' apparently triggers significantly more workplace filters than 'cock'
 
sbi
Haha! "Did you want to see some of the other moderator tools in action?"
 
yeah, I noticed he's suspended too... seems an over-reaction
 
it's only for 24 hours
in my opinion, temporary bans work very well
people don't tend to check back after they've been banned to see how long it's for
 
@Fred Nurk struct A { int y,x; A() : y (x), x (42) {} }; // I just checked on VS2008. Garbage values being copied to y.
Thanks for the point
 
in my experience, temporary bans chase people away very well; I'm not sure this is always what is desired
@Mahesh then that's a bug in VS
 
11:16 PM
Really? Because I thought that y should be initialized first
since it is declared first
 
Yes, it should. y first then x. It doesn't matter what order they appear in the initialization list (though here it doesn't matter since they are in the same order).
 
oh, you changed my code, and I missed that "int y, x"
 
you're right, Fred
 
@FredNurk Yes
 
I went back and the initial struct was struct { int x, y .. } but the new struct is struct { int y, x ... }
 
11:17 PM
it looked so nearly identical, I read too quickly :(
 
I should have mentioned that I edited
 
@sbi Exactly. The only real difference is that in WoW I learned useless skills and here on Stack Overflow I learn useful skills from brilliant people. ;-)
 
@James: Glad I could help you :)
 
@JamesMcNellis see, I was addicted^H^H^Hplaying eve online for about two years, but it seems the difference from wow is I learned considerably about how to be a tax auditor or business analyst during that time :)
 
my father was an accountant
so I've already got that one covered
right
I said I'd go to bed
ban me from the chat so I actually do
 
11:22 PM
I don't think we can. The best we could do is make the room authorized-talkers-only and authorize everyone but you.
 
I ran a one-man business in eve that did, at the peak, ~40 characters worth of work; I was filthy rich, and had the game pay for all the accounts (about 15) by buying subscription time from other players for in-game currency :)
 
11:33 PM
still a lot of fun to remember, which I don't expect I'll get from SO a few years down the road
(hmm, missing context? in wow, which I've never played, it's common for people to have about a dozen characters? in eve it's quite rare for a person to have more than 2 non-throwaways)
 
@FredNurk Yeah; most hardcore players have a few characters. I only had one. But then again, I only played for three months.
 
I find sandbox environments (e.g. eve, second life, but not wow) fascinating, but all I've really looked at seem to be huge timesinks
incidentally, both eve and SL support or encourage exchange rates of in-game and real currency (though in eve it's only one way: the subscription time trade I mentioned)
no idea where minecraft is going, but it's fun so far, at least the little bit I've played; it's one to watch
 
11:59 PM
@FredNurk huh, i'm just re-reading Charles Stross' "Halting State". How the online gaming world has evolved in the near future. Also, Scotland got its constitution in March 2011 (adopted January 2012), and became independent January 2012.
 
00:00 - 22:0022:00 - 00:00

« first day (86 days earlier)      last day (4863 days later) »