« first day (215 days earlier)      last day (4733 days later) » 

6:16 PM
silence
is golded
 
silence, when gelded
 
bitches
uuuaaahh :( Emacs
 
what's new @Nils
 
so I guess for now I just go out and drink
a bit frustrated with crap which doesn't work
 
6:32 PM
oh damn
 
but I'm satisfied with how my vectors work
acctually I think std::vector is nice engineering work
2
btw
codepad.org/aMMhV1SO this is probably not the smartest way of doing things, but is this correct according to the C standard?
compiler warns about uninitialized struct being passed to a function
 
UB because you're dereferencing an unitilialized pointer
 
@Xaade but I guess no semiconductor physics w/o quantum theory therefore no computers.. so it's useful
@LucDanton UB
?
 
Undefined behaviour (notice you get a segfault)
 
ah really? I didn't get that on my machine..
 
6:37 PM
Well that's UB for you
 
but what exactly goes wrong?
 
int getNeighbour(neighbour_t *neigh)
{
neigh = neighbours;
return sizeof(neighbours)/sizeof(neighbour_t);
}
 
Browser crash...
 
The neigh = neighbors; isn't doing anything useful. You need something like: int getNeightbour(neighbour_t **neigh) { *neigh = neighbors; }
 
In your main neigh is used uninitialized
 
6:40 PM
Why not just int len = sizeof(...)?
 
ah because the pointer is passed by value!
stupid
structPointer > gcc -m32 -o blah blah.c
structPointer > ./blah
Segmentation fault
w/o -m32 it works, wonder why
 
Because it's UB
UB doesn't mean you get a crash
5
 
Well, you're either using gcc 0.1 and it's miscompiling the code, or the code is still wrong.
 
UB means the Standard washes its hand at whatever your program will or will not do
 
how can I be so stupid
and not see that
thx for pointing this out
 
6:55 PM
brand new video: STL talks about Boost
> In this 5th part of the n-part series, STL digs into the Boost Library (boost.org). In his words, it's an open source, super quality, community-driven STL++. Stephan will walk you through a sample application from end to end, using boost.
Damnit, I've got stomachache :(
(That's got to be one of the funniest words with a not-so-funny meaning.)
 
what does it mean if you leave out the virtual keyword on a virtual method in a derived class?
 
@chriskirk Nothing, it's implicitly virtual.
 
sbi
36
A: ( POD )freeing memory : is delete[] equal to delete ?

sbiWhether this leads to a memory leak, wipes your hard disk, gets you pregnant, makes nasty Nasal Demons chasing you around your apartment, or lets everything work fine with no apparent problems, is undefined. It might be this way with one compiler, and change with another, change with a new compil...

 
Once virtual, always virtual.
 
so you don't have to include virtual in derived classes if the methods are virtual in the parent methods
I see
so you can never force a method that is virtual to be non-virtual in derived classes?
 
6:59 PM
@chriskirk Correct, but I would still advise to do so.
 
I understand. Thanks
 
Being explicit is almost always a good idea.
2
 
sbi
@chriskirk It means that your cow-workers need more effort to find out that function is virtual.
 
I see, so it's generally best practice to keep the virtual keywords?
 
@chriskirk Yes.
 
7:00 PM
thank you
 
@chriskirk you should be using a code analyzer that tells you when you leave out 'virtual' for an implicitly virtual method
 
like what? cppunit?
 
cppunit is a testing framework, not a code analyzer.
 
sorry, I meant cppcheck
 
7:56 PM
@jalf If that's the case, then I like the guy.
 
rlc
@chriskirk have you used that? is it any good?
 
8:31 PM
What if for some odd reason you replace so much implementation in your base class that you choose to rewrite it. Having the extra virtual keywords will clue you in.

Better case, for some reason you don't need the grandparent class anymore, whoops, just lost virtual table.
 
@Xaade such massive refactorings have more important issues than this
 
@FredNurk Understood, but there's no reason to introduce yet another issue, just because you forgot to explicitly declare virtual in your derived classes.
 
@chriskirk code is often, but not always, the best documentation; keeping/enforcing "virtual" where it is implied is a way of self-documenting
 
@FredNurk When you decide to replace a bridge, there are bigger issues than making sure the lane lines are appropriately marked.
 
argument by analogy is like trying to explain a spoon to a two-year-old
 
8:38 PM
@FredNurk Analogies make hidden faults readily more apparent. I don't understand why you think it's difficult?
 
no, analogies make hidden faults less apparent, by definition, because switching domains loses all subtleties
the benefit of analogy is to provide a framework for someone to understand the broadstrokes of an idea/concept/pov
and arguing by analogy isn't difficult, people do it all the time, but it's still like trying to explain a spoon to a two-year-old
and I mean that both as a self-referential example and as a serious analogy
 
8:53 PM
@sbi epic answer :)
 
sbi
@TonyTheTiger :)
@FredNurk It just as often adds subtleties.
 
@sbi How was your day today?
 
sbi
@FredNurk Actually, a two-year old knows what a spoon it.
Well, should.
@TonyTheTiger Well, it was a day. It's gone now. I'll try not to look back.
And yours?
 
@sbi gosh :(
@sbi not too bad at all
back to .NET world for a bit
 
sbi
@TonyTheTiger Yeah, me, too. I'm not fond of it, though.
 
8:58 PM
away from all the nitty gritty details of C++, even though I'm still doing C++ in my free time...
@sbi I've come to like C++ more then .NET, where it used to be the other way around, but I do like not having to worry too much about memory for a bit ...
 
sbi
@TonyTheTiger I find myself worrying about memory in C# more than I ever worried about it in C++.
 
@TonyTheTiger Same thing here.
 
@sbi oh... how is that?
 
sbi
Got a job offer last week. C++. I find myself thinking about it even though they haven't made a single substantial offer. Just speech bubbles. But C++ seems really appealing.
 
@sbi C++ to the core eh! :)
 
9:01 PM
@sbi my argument by analogy breaks down? say it isn't so! </sarcasm>
 
sbi
@FredNurk Ok: It isn't so. Fine?
 
SGML's optional start tags are widely employed in most chat mediums
 
sbi
@TonyTheTiger Remember, I'm working on a document workflow system. Scanned pages of differing resolution, some of which are really big. If you have many of them on the same machine, the inner details of the GC suddenly start to become important. But twiddling them is much harder than deterministic C++ memory management. We keep adding Dispose() calls. Yeuchz.
 
@sbi oh I see, from that scenario, you probably would have been better off with C++
 
obj.Dispose(), obj.FinallyDispose(), GetGCInstance().CleanupFoRealYo()
 
9:05 PM
@FredNurk hahah
@sbi well at least you have understanding of what you're doing, but the people I've known to call Dispose() were calling it for the wrong reasons... ugh
 
sbi
@Xaade One interesting thing I have seen that relies on functions in derived classes not being declared virtual was to employ CRTP to make those functions either virtual or not. But it was only interesting in an intellectual way, I've never come across some case where I thought it would be handy.
 
@sbi ever played around with graphical stuff in C++ (OpenGL and the likes)?
 
@sbi that is used in some safe-bool implementations, though I suppose it's not really the same
as I've only see that where you'd know when writing the base class list whether it would be virtual or not, rather than logic in the base class determining it
 
sbi
@TonyTheTiger No. And I guess I never will. I'm the guy who's having his dirty hands in the engine up to his elbows, not the one polishing the lacquer.
@FredNurk Please elaborate.
 
@sbi :)
 
sbi
9:15 PM
Haha!
Today I was called a chicken for pointing out a threading inconsistency in someones code #baffling
 
Dammit, where are std::begin and std::end supposed to be declared?
Or aren't these supported yet in GCC 4.5?
 
@MartinhoFernandes not supported in 4.5, they're required to be declared by any one of several headers, including <iterator>
 
I'd think they'd be in utility, seems like a good place for them.
 
any of <array>, <deque>, <forward_list>, <iterator>, <list>, <map>, <regex>, <set>, <string>, <unordered_map>, <unordered_set>, or <vector>
FDIS §24.6.5
@MartinhoFernandes hmm, maybe it was 4.4 I tried to use them and couldn't; 4.6.1 prerelease has them
 
9:31 PM
@sbi Debugging: The only time you stick your hands in a dangerously moving part, while it's operating.
 
Well, you usually pause it for a while right before sticking your hands in.
 
Hands and head.
 
sbi
@Xaade Oh, I rarely ever fillde with code while it's compiling. :)
 
@sbi I did.... once.
 
@sbi hahah :P
 
sbi
9:33 PM
@FredN: What about those safe-bool stuff manipulating the virtualness of member functions through CRTP?
 
@sbi I do that often, but I stop compiling then...
 
Compiling file 1 of 10, Saving file 5, do you want to save during compilation process?
 
sbi
@Xaade Of course, we all did that at some time.
 
@Xaade heart surgeons and car mechanics are essentially the same, fixing intricate and delicate parts – but the heart surgeons have to do it while the car is running
 
@FredNurk and they don't have as much documentation on the stuff they're trying to fix
 
9:34 PM
@sbi struct A : safe_bool<> {... using a virtual method, struct A : safe_bool<A> {...calling a method on A directly (which isn't required to be virtual)
 
sbi
@FredNurk And the engine mustn't stop. Actually, heart surgery is like fixing airplanes while they're flying. :)
 
@FredNurk Not really.... bypass blood, then stop heart. Shock startup heart when done. They do it all the time.
 
@Xaade So, they keep the car running, but stop the engine?
 
@Xaade the car as a whole is still running, even if they stop a single pump down inside it ;)
 
sbi
@FredNurk Eitehr you misunderstood me or I misunderstand you.
 
9:36 PM
@MartinhoFernandes Pretty much
But I wouldn't use the engine analogy. More like the gas pump.
 
sbi
@FredN: What I was talking about was this:
template< class B >
class D : public B {
   void f(); // if B declares f() as virtual, then D::f() is virtual, too
};
Oh, I now see that this isn't really CRTP. Sorry.
Anyway, were you talking about the same?
 
The curiously recurring template pattern (CRTP) is a C++ idiom in which a class X derives from a class template instantiation using X itself as template argument. The name of this idiom was coined by Jim Coplien, who had observed it in some of the earliest C++ template code. General form // The Curiously Recurring Template Pattern (CRTP) template struct base { // ... }; struct derived : base { // ... }; Some use cases for this pattern are static polymorphism, and other metaprogramming techniques such as those described by Andrei Alexandrescu in Modern C++ Design. Static po...
@sbi I think your example is similar.
 
@sbi yes, safe_bool<void> (the void is a template parameter default value) declares a method, we'll call it "boolean_test" as virtual, while safe_bool<T> casts as CRTP to call T::boolean_cast
 
But you forgot
template <class D> class B
class D: public B<D>
 
9:42 PM
So, when you make a template, you can have the template call any of the 'T'ype's methods, but the type you supply to the template must implement those methods.
 
@FredNurk Thanks. Installed 4.6 and got them.
 
sbi
@Xaade Mine derives from a template parameter, not from a template.
 
how do i run an xml install, install.xml, with unix?
 
@MartinhoFernandes welcome; wasn't sure when it was added to 4.6, just know the snapshot I have here has it :)
 
sbi
@FredNurk Ah, now I see. Sorry for being so dense.
 
9:50 PM
@sbi: I forgive you
 
sbi
@DeadMG Are you a sockpuppie of @FredN?
 
sockpuppie, lol
 
I find it somewhat unlikely, personally
 
9:53 PM
@DeadMG that's just what I would say
 
sbi
@FredNurk Which makes perfectly sense if you are the same person.
 
@sbi hahah :P
yawn
going to catch some zzzz
night all!
 
sbi
@TonyTheTiger Yeah, me, too. Have to get out the door before eight tomorrow morning.
Night!
 
Going to bed early.... it's only 5PM!
 
sbi
@Xaade It's midnight here.
 
9:59 PM
Seems like the majority of people in this room is somewhere on Europe.
 
@MartinhoFernandes on Europe. Did it finally leave Earth?
 
Oh, was that supposed to be in? Or at?
 
in
at would specify a place.... in would specify a region or enclosure.
He's at the mall. He's in Paris.
 
Ok. on seemed to make sense. We are standing on it after all :)
 
on would specify an object.
He's on the box.
 
sbi
10:02 PM
@Xaade Wasn't Europe a girl? So being on Europe might be actually be nice, after all she was beautiful enough to turn Zeus' head. :)
 
I think that was Europa.
 
pretty sure that I am sitting somewhere on top of the European continent, yes
 
(which in Portuguese are both written the same)
 
Or like the Python line, "I object to all this sex on the telly"
 
Yes, but you're in a region, because what if you're IN the subway. You wouldn't be ON Europe anymore, you'd be underneath it. Therefore Europe is a region, not a physical object.
Europe is treated like a concept.
 
sbi
10:04 PM
@MartinhoFernandes Which is what the continent is called in my language - because it's named after the girl.
 
Instead of the physical area it defines.
 
sbi
@DeadMG Don't brag. We all know you're not on the continent.
 
What? You're saying Europe has no subways?
 
@Xaade: You would still be standing on Europe
you'd just also be standing under Europe
 
Yes, you can say you're standing on Europe.
But if you want to mention you're location without defining how you are located there, you say 'in'.
 
10:06 PM
true
 
Because at that point, the region Europe is no longer physical, it's conceptual.
 
but "on" is not incorrect
there's nothing wrong with saying that you're standing on Europe, as in, the continental plate
it's just unusual
 
I'm not saying it's incorrect. I'm saying it's not in use.
That's like saying Laissez allez. It's right, it's correct, it means "Let's go", but that's not how they say Let's go, they have a phrase they use.
Therefore it doesn't mean "Let's go". It means the literal french words, "Let us go."
Just like, Bonjour, means hello in English, but it doesn't literally mean hello, it means good day.
 
@Xaade The word you're looking for is 'idiomatic'
 
Therefore, if they intend that they are locating IN the region of Europe, they use the word in.
Otherwise, they're saying they are located on the OBJECT Europe.
That's why it's unusual. Europe isn't typically considered an object.
Whew, boy English is unnecessarily complicated.
 
10:12 PM
at least we don't have genders
 
sbi
@DeadMG How do you procreate then?
 
I prefer languages with more inferences.... rather than the inconsistent requirement of explicit helping words.
Why should I bother saying 'I'. That much can be inferred if I don't reference anyone else.
 
@sbi: Pretty sure that the English language does not procreate
 
@DeadMG Yes it did. English procreated in America and produced Cajun and Ghetto.
 
lol
 
sbi
10:14 PM
@DeadMG What? If it wasn't for Chinese and Spain, it'd already have conquered the world.
 
@Xaade english has that, just not the way you expect, "eat the peanut" is a valid sentence, inferring "you". "I eat the peanut" is different
 
then it was obviously an asexual procreation
 
@FredNurk But eat the peanut inferring 'you' isn't declarative, it's imperative. It's a command.
 
agreed
 
that's right, and?
 
10:15 PM
@Xaade Those definitely aren't the product of PROcreation. Definitely amateur creations at best.
 
sbi
@FredNurk That's the imperative. Commanding. That doesn't need a subject in other languages either.
 
@sbi So all we need is an example of a language with an imperative that uses a subject to shoot down your argument?
 
@sbi maybe I've completely misunderstood xaade, but I thought the issue was whether or not "I" was implied and could be left out -- it cannot be
 
sbi
@LucDanton It would, had I said "in all other languages". Which I hadn't.
 
@LucDanton In other languages doesn't imply in all languages. All we need is one language to prove him right.....
 
sbi
10:17 PM
@Xaade See, being a German, I have one here right at hand...
 
But that's the same as not saying anything then!
 
@Xaade languageS would require at least two.
 
or "That much can be inferred if I don't reference anyone else." doesn't work in english
 
@FredNurk Yes, 'I' cannot be left out.
Yeah, but I know of a few languages where I is inferred if another subject isn't explicitly declared.
 
@Xaade without changes in verb form? (because changing the verb would just be including the information in a more compact way)
 
10:18 PM
Chinese.
 
sbi
Anyway, did I mention I need to go to bed? Too bad, because this is really interesting. But I do need to go to sleep. G'night.
 
night
 
In some cases.
But they still use 'I'.
Doesn't Portuguese have implied 'I'.
crap, gotta go.
 
have fun
you know one thing that irks me?
can't watch television from the US
 
rlc
11:02 PM
@DeadMG I called the cable company this afternoon to get them to cancel TV but keep Internet and telephone service
freaked them out :-)
 
lol
well, it's not like I actually would want to watch it
 
rlc
had to explain three times than, no, I don't want TV service, no, the TV is not broken and no, I won't change my mind, even if they do give me three months free TV
 
but the shows that I illegally pirate, I want to increase their ratings, because I want to watch them
 
rlc
then I had to explain the same thing to the guy's supervisor
 
oh, that's OTT
 
rlc
11:04 PM
@DeadMG OTT?
 
over the top
 
rlc
I thought so too
but we threw the TV out a few months ago and haven't looked back
4
the kids actually sleep on Saturday mornings now
 
lol
 
It used to be that you couldn't get Internet access without getting TV to boot where I live (which is of course tying and hence illegal). I think nowadays you can only get Internet access, but it costs just as much.
 
@Xaade Yes, it does.
We're egocentrical bastards.
 
rlc
11:11 PM
it actually saves me about 40 $ a month not having TV
 
same here
 
rlc
telephone is 3 $ / month more expensive because I don't get the three-in-one deal, but that's about it
 
we could get cable TV but don't
 
11:31 PM
@rlc I've been living without a TV for ... ~6 years now, I think. it's great
@DeadMG unless you have a nielson box, just watching doesn't affect ratings
 

« first day (215 days earlier)      last day (4733 days later) »