« first day (375 days earlier)      last day (4566 days later) » 

7:00 PM
Tom, San Francisco, CA
1.3k 5 19
isn't that @CatPlusPlus?
 
He has a sockpuppet!
 
7:11 PM
damn, I'm sick
 
user34537
nice thanks
 
@AlfPSteinbach So Cat is into iPhone and Objective-C now? Interesting.
 
There's one difference between git and Mercurial.
Git sucks, while Mercurial doesn't.
 
I was about to say
"the name?"
 
sbi
7:20 PM
@AlfPSteinbach No, that's Tomcat.
 
My knowledge of Git and Mercurial is very superficial, but from what I've read Git seems quite attractive. I like the idea that it provides a minimal set of tools that can be combined into more advanced tools using Unix pipes and stuff.
 
@sbi Thanks, reading it now.
 
sbi
@StackedCrooked Note that it is quite old. Well, not that much.
 
@StackedCrooked - I guess I should do a C++11 update for that answer
 
7:29 PM
@awoodland the first update was already for C++11, not?
 
@StackedCrooked the first update was for member functions
but neither showed perfect forwarding
 
But the using syntax only works in C++11 right?
 
all of the syntax in that answer as it stands works in C++03
but the perfect forwarding would need C++11
 
Cool. I didn't know I could use the 'using' keyword to make a member function from a privately inherited class public.
 
@StackedCrooked - using like that is more useful to fix overload resolution stuff
so if you have a base the provides a constversion and a derived class that provides a non const versoin then the const version wouldn't get considered for calls until after it's too late without using using to bring the const version from the base into the derived class
struct foo {
  void test() const {}
};

struct bar : public foo {
  void test() {}
};

int main() {
  const bar i = {};
  i.test(); // error, const version isn't considered
}
 
7:40 PM
I never knew.
 
Madness.
 
Dvorak++
 
the bit it took me ages to realise you can do is template<void f(void)>
where the function pointer itself, not the type of the function pointer is the template argument
 
Like in boost function?
I posted a somewhat related question in the past: stackoverflow.com/questions/6636658/… .
 
sbi
@StackedCrooked Actually, this is the older usage of using, from before they adopted it for namespaces.
 
7:49 PM
is forwarding (perfect forwarding) and forward declaration is different?
 
@MrAnubis yes
 
hi
 
forward declaration is a promise that definitions will exist somewhere appropriate if you need them in the future
perfect forwarding is passing stuff on without accidentally makeing lvales into rvalues
 
@awoodland thanks for intro :)
 
@sbi His arguments against git not as strong as I had anticipated. For some reason my interest in mercurial is growing though.
 
7:55 PM
am I the only one who is increasingly viewing Java as a religion?
it has a prophet, James Gosling, and the rules of the language are as he decreed, and it's extremely inflexible and conservative
2
 
@DeadMG - it's all for "the greater good" though :)
 
@DeadMG for me, it's a cult.
 
lol
 
Java thinks its job is to teach programming to the user.
"The greater good" as in file and memory size?
 
it even has second-class citizens, primitives
just like physical religions have second-class citizens- women
 
7:58 PM
Stepanov is possibly even worse than Gosling. But he doesn't have as much influence.
^ Still nice background music.
 
@StackedCrooked How'd you like this one? youtube.com/watch?v=-n6Pv_zTfjc
 
Does anyone else find pair/group programming difficult? Sometimes I just want to steal away the computer and work on my own.
 
@maxpm - it depends who you're paired with a lot
there's a bunch of studies on it IIRC
 
Pair programming sucks. I always want to punch the other guy.
 
@Maxpm the few times I have done it, it wasn't that bad. I suppose it really depends on the quality of the pair. I have had the same experience as you when watching other people code though :)
 
8:06 PM
If "pair programming" means someone leaning over your shoulder, then hell no. Code reviews are useful, this is madness.
 
Pair programming means someone sitting next to you and co-operatively working on the implementation.
On my first code review at my current job I was critiqued for not checking if a pointer is null before deleting it.
 
did you quote chapter and verse at that one?
 
Did you facepalm?
 
did you modify the code to read:
if (var != NULL) { delete var; var = NULL; }
 
user34537
@codemaker another one of my pet peeve right there
 
8:13 PM
So, you've got like, a peeve zoo.
 
@acidzombie24 the delete then null?
 
user34537
no, the if statement. completely unnecessary
 
@acidzombie24 oh right, of course
 
@CatPlusPlus I wanted to kick him in the ass. But I simply explained to him that this check was not required. He retorted by claiming that it was implementation dependent. I explained that it was standard behavior. He didn't have enough confidence to challenge my claim. And that was the end of the discussion.
 
@StackedCrooked maybe he had a bad experience with a non compliant implementation at some point. Probably not though...
 
8:16 PM
or pre-Standard
 
Nah. You haven't seen this codebase man.
 
@StackedCrooked oh... I have seen the codebase so many times before...
 
Hundreds of compiler warnings. Some of them about functions missing a return statement. Horrible. I fixed most of them already, but I hope I'll convince them to enable -Werror.
That was the C++ code. The Java frontend also has 400+ compiler warnings.
 
lol
 
And incredibly stupid code.
 
8:19 PM
You can have compiler warnings in Java?
 
what happens when you say a function returns an int, but you don't actually return anything half the time?
 
I mean, 99% of it is generated by the IDE, anyway.
 
/me writes a test case
 
error, I'd guess
 
@codemaker If you skip return, UB.
 
8:20 PM
ub?
 
oh, in C++, it's UB if you don't return anything
 
@CatPlusPlus Most warnings are about not using generics. Which is kind of acceptable since some of the code is older than the generics feature. Actually no, it should have been fixed by now.
 
Considering that Java generics is really the same thing you'd write without generics, I wouldn't say it's a priority.
 
The attitude seems to be: "Warnings are not errors. So you don't have to fix them."
It enables compile-time checking.
 
Except casts are added automatically. But OTOH, they're checked at runtime anyway, AFAIR.
 
8:23 PM
Fail early.
 
@codemaker Undefined behaviour.
 
@StackedCrooked warnings aren't errors until they are. Warnings aren't compile time errors so we'll fix them later.
 
@StackedCrooked You failed when you chose Java. Is that early enough? :P
 
@CatPlusPlus I'm about to get my ub on, oh yeah!
 
@codemaker It's the minimal-effort design pattern.
@CatPlusPlus That's early. They're using the Eclipse platform. Fail++
 
8:23 PM
isn't that all of them?
 
@StackedCrooked some places that is called efficient development, which btw is only slightly less agile than agile development
 
I wish I could show you the code. You don't know a thing man.
It's like it's written by Amatorski.
 
user34537
ugh, i WISH most warnings would be compile time errors
 
user34537
even some in C#....
 
-Werror
 
8:26 PM
You can enable that in the project settings in Java. Which I did for the section I was working on.
 
user34537
psh, i could never code like that
 
@StackedCrooked I'm glad you can't show me the code. I don't need those nightmares
 
user34537
do you know how often i do if(blah) { a=a; }
 
All the time, right?
 
user34537
that a=a will get me an error. Actually its more like blahvar=blahvar.
 
8:27 PM
@acidzombie24 what is that for?
 
user34537
yeah....
 
user34537
am i the only one who does that??
 
Today is day 500 without a Belgian government.
 
user34537
@codemaker usually means i want to check a cond so i write if(cond) then assign the variable to itself so i can place a breakpoint on that line
 
8:28 PM
@StackedCrooked how are they doing with their anarchy?
 
@codemaker Just going about.
 
user34537
in C# i can set the breakpoint on the closing brace so i dont need to do it then
 
@acidzombie24 you can't set conditional breakpoints?
 
What's the point of setting a breakpoint in a dummy condition?
On a dummy assignment.
Also, programmatic breakpoints.
 
What's the point of life?
 
8:29 PM
There is none. Next question!
 
user34537
cause way back there was either no way to set a cond breakpoint or its easier/faster to write a dummy if statement
 
@StackedCrooked to live (and then die).
 
user34537
also its easier to toggle on/off most of the time
 
@codemaker It's hard to fail at that.
 
@acidzombie24 shrug
 
user34537
8:30 PM
@codemaker how do you set cond breakpoints :p
 
@StackedCrooked if you are alive, then you are doing it right. If you don't feel alive, take some drugs until you do. That's the american way.
@acidzombie24 depends on your debugger. In my debugger I type "b file:line_no if my_var == 1" YMMV
 
@codemaker Where did you read that?
 
Life is an STD with 100% fatality rate.
 
lol
 
You think only Americans take drugs?
 
8:32 PM
@StackedCrooked edit! I read it right up there ^^^
 
user34537
@codemaker is it easy to turn off for a few minutes then turn on?
 
STD is life. Therefore life is STD.
 
@StackedCrooked no
@acidzombie24 as easy as it is to unset a break point and set it again
 
user34537
cool, which debugger is this btw?
 
Penicillin.
 
8:33 PM
@acidzombie24 gdb
@StackedCrooked bringer of sandwiches (edit!) (edit edit!!)
 
user34537
cool, i only used gdb once and through an ide. I use firebug a few times and VS all the time
 
user34537
you dont have to retype the condition if you disabled it? (i guess i think you must remove it)
 
Print messages are a way of debugging that have never failed me.
 
user34537
ugh.....
 
@acidzombie24 oh wait, in gdb you can also just disable a particular breakpoint. I don't know if VS lets you do conditional breakpoints
 
user34537
8:35 PM
callstackplz
 
@StackedCrooked sometimes that's the only way to fly
 
user34537
it does but i like source control seeing my cond breakpoints when i am looking at an old file
 
@codemaker Yes
 
user34537
kind of fun. also there really no reason for me not to do it via source code
 
For VS there's __debugbreak, you know.
 
8:37 PM
yuck, I'm knee deep in undefined behavior. I think my program is in an infinite loop printing space chars
 
::DebugBreak();
 
DebugBreak breaks inside DebugBreak.
Intrinsic is better.
 
Yo dawg.
I should check it out. But as for now, DebugBreak does a fine job for me.
 
Standard assert has the same problem.
Breaks somewhere inside the CRT.
 
What exactly is the problem?
 
8:39 PM
Wasting time on switching frames needlessly.
Breaks the flow.
 
user34537
huh, DebugBreak??
 
WinAPI call.
 
user34537
where do i type ::DebugBreak ? also that looks C/C++ish, what about C#
 
user34537
oh
 
I never knew that. Does it really matter? Breaking blocks the flow anyway.
 
user34537
8:42 PM
disappointed -_-
 
__debugbreak is a compiler intrinsic, which works in C++ and C++/CLI, too, I think.
C#, dunno, I don't write C#.
There's System.Diagnostics.Debugger.Break, apparently.
Oookay, let's take a break from doing nothing and OpenGL. I haven't touched GC for two months.
 
sbi
@StackedCrooked Well, one thing that's wrong with git is that it's not just internals leaking through some abstraction, staining the floor with a few wet spots, but rather that it's a whole ocean of internals you have to cross on your own, with treacherous maelstroms, and all you have as abstraction to get you to the other side is a rotten door to sit on and a wooden spoon to paddle with. (And he explains this quite well, if you ask me.)
 
I haven't touched std for 39 years
 
std hasn't existed for 39 yers
 
std's have existed for a least 100 million years
 
8:48 PM
you guys should try it, it's gotten new stuff lately :)
 
oh, you mean std as in STDs, as in syphillis, not std as in std::cout
 
std::exception maybe =)
 
user34537
i haz std:exception
 
the subheading stand in a different light now =)
 
Boost.Exception FTW.
Y'know, the pun was there all along.
You people just don't get my references often enough.
 
8:51 PM
Yes I know, I was just milking it
 
Ooh, a non-alpha SCons. Let's use that.
 
hi
quiz!
a friend of mine did: typedef int aptype[22]; void foo(aptype x) { aptype y; memcpy(&y, &x, sizeof(aptype)); ... }
it crashed. can you spot what was wrong?
 
yeah
there's the use of C arrays and memcpy
 
@CatPlusPlus I tried SCons out for a while. I'm over that now.
 
I can!!!! =)
 
8:53 PM
@CatPlusPlus I'm into build tools that build themselves before they build your app now
 
user34537
i cant :(
 
@JohannesSchaublitb a friend? You can tell us if it was you :)
 
=) no this was not litb =)
 
it was Captain
 
Johannes, you quite often refer to you working among coders, and you have a mutual respect. Do they do this stuff often ? =)
 
8:56 PM
@codemaker Well, SCons is the best choice right now.
 
I hurt in strange places
 
what's a "mutual respect" ?
 
@JohannesSchaublitb Thanks for outing me =)
 
user34537
8:57 PM
you know its been a while when you cant remember that memcpy requires string.h, i thought it was stdlib or io
 
memcpy sucks, anyway.
 
i woulda thought stdlib too
 
@JohannesSchaublitb You often agree with your fellows decisions?
 
sbi
@CatPlusPlus Are you really arguing that, when you are breaking into the debugger, thereby penetrating through several layers of OS security (I see two or three dialog boxes popping up before this gets handed to the debugger), and maybe even requiring to start the debugger first, that in this case it matters whether you create another stackframe first?! I must be missing something, because that would be utter nonsense.
 
but mostly you appreciate their input
 
user34537
8:58 PM
@JohannesSchaublitb it compiled and ran fine for me...
 
@CaptainGiraffe I always seek to disagree
to cause maximal rage
 
@JohannesSchaublitb &x and &y are wrong
 
@JohannesSchaublitb Disagreement on basis is a very good thing
 
@sbi Er, what? It's for breaking when the debugger is already attached.
 
assuming the typedef is fine
 
8:59 PM
@JohannesSchaublitb x is a pointer, and you're copying from it's address on the stack rather than copying from the array.
 
@JohannesSchaublitb i agree with deadmg. it's the memcpy and C arrays.
 
@BenjaminLindley ohh thanks!
 
because the array decays to a pointer before the &
 
@awoodland wrong
 
not valid, because the decay produces an rvalue
 
8:59 PM
full stop
 
so you have int ** becoming void*
 
which cannot have it's address taken
 
sbi
@CatPlusPlus You care about an additional stackframe (in the odd case you break into the debugger, that is) while running a program in the debugger? And you're trying to sell me this as less nonsense than the other one?!
 

« first day (375 days earlier)      last day (4566 days later) »