« first day (139 days earlier)      last day (4824 days later) » 

2:00 PM
yeah
 
I'm supposed to be busy studying
but dreaming instead
 
I dropped off P1 once I stopped studying for some reason
 
Did your studies involve lots of SO research? ;)
 
lol
 
2:02 PM
@Johannes Did you have trouble connecting to the SO chat as of lately?
 
Me and @sbi did :(
Thought it was a german issue.
 
hmm let's hope they won't remove UDLs from c++0x WP
 
I read the paper, and I think Doug is right. There's basically no experience with them, and nobody really needs them.
 
it's Doug
the apple guys are saying to remove these
 
2:04 PM
I would not miss them at all.
my_type(1, 2, 3) is good enough for me.
 
they don'T conflict with C99 hexfloats. that's incorrect IMO
 
I think the problem with literals isn't that we don't need UDLs
it's that the built-in literals truly suck
 
i already thought i would use them for binary literals
 
Binary literals longer than 8 bits are unreadable, anyway.
 
depends on whether or not they follow a specific pattern
 
2:05 PM
the boost emulation does not satisfy me
 
Just use hex literals and assume everyone knows how to transform from hex to binary in their heads.
Which is a valid assumption, imho.
 
uh, no
 
some hex literals don't convey certain patterns
 
if the intention is to generate values with a specific pattern in binary, then they should be specified in binary
not least because hexadecimal I find has very little use
 
it's also not immediately obvious what bit a specific hex literal sets. you first need to think about it and translate it to binary if you aren't working with bits all day long
i can understand his concern with inheriting ctors though
 
2:09 PM
can you linky the paper?
 
sbi
@FredOverflow It wasn't even a germane issue, let alone a German one!
 
UDLs are still in n3242
 
I don't see anything there about inheriting constructors
 
what does the number on the right in "Number: N3250=11-0020" mean?
 
2:12 PM
frankly, I think that UDLs are a good idea
half the reason that you don't see UDLs in the Standard library is because the new initializer lists cover that aspect pretty solidly for most STL types
that doesn't, however, make them useless for other aspects
 
sbi
UDL? Uniform Destructor Locations? Unterface Definition Language?
 
like, I'd sure love s"" as a std::string literal
user defined literals
 
a complex imaginary number specified as 10i would be useful
 
to be completely and entirely honest
 
(5+10i) would mean 5 real and 10 imaginary
certainly not possible with initializer lists
 
2:16 PM
I think that C++ is going to be kind of doomed if they keep trying to be source-compatible with C
there's only one way that's going to go, and it's not forwards
how can we blame all those people for talking about C/C++ when the Committee still acts that way?
 
how can we blame anyone who talks about C or C++?
 
@sbi Underberg Delirium geLaber
 
no, I meant, "C/C++" as that crappy hybrid thing where they tag every C question with C++ too and "I'm starting to learn C/C++"
 
i intentionally misinterpreted you. I perceive it as a weird thing that some see something evil in the term "C/C++", instead of just reading it as "C or C++".
 
sbi
2:19 PM
@FredOverflow That was a real question, you know. What are you babbling about?
Ah, now I get it: User-Defined Literals!
 
You made up some stuff, I made up some stuff. Where's the problem?
 
@Johannes: Because the difference is more than significant enough to warrant completely different answers
if you said, "I'm starting off in C, how do I allocate memory dynamically?" and "I'm starting off in C++, how do I allocate memory dynamically?", you would see completely different answers
you may as well say
I'm starting off in Prolog or Assembly, how do I allocate memory dynamically?
 
it's a bad question when it says "I'm starting off in C/C++, how do I allocate memory...?"
 
Do not let litb troll you. :)
 
but when it says "I like C/C++." I think it's fine
 
2:21 PM
it is a completely valid question to ask how to dynamically allocate memory
assuming that hasn't been asked six billion trillion times already
which is beside the point
 
some people will answer "Oh stop it. There is no C/C++ language.". Those who intentionally interpret things the wrong way.
 
no
 
c: malloc(), c++: new(), prolog: ???, asm: push hHeap, push cb; call HeapAlloc;
 
sbi
@FredOverflow My problem, as so often, was that I couldn't follow you.
 
c++: Don't, use RAII.
 
sbi
2:22 PM
Anyway, now that I know what you're talking about I'll go back to work...
 
because if you're not discussing the preprocessor, then the question has some very different answers whether you're in C or C++
so the distinction is really kind of important
 
ah. true. raii: c++: alloca()
 
@sbi Don't worry, C++0x will have perfect following ;)
 
lol
 
@DeadMG if you have a question that does mention 'C/C++' in a way that doesn't beg a question about C or C++ that's fine IMO
 
2:23 PM
@FredOverflow hahah
 
if you say "Our project uses C/C++. How do I allocate memory in C++?" it's a completely fine question
 
@JohannesSchaublitb Okay I have a question: Is C/C++ undefined behavior?
 
but still some people will come up and troll about "There is no C/C++."
 
well, that is a fine question, but the first statement is completely and totally redundant and worthless
 
@FredOverflow it's completely defined
 
2:24 PM
oh hey, half my program is in assembler. How do I allocate memory dynamically in the Prolog half?
 
@JohannesSchaublitb Really? But I'm reading C and writing to C without an intervening sequence point!
 
in c++ you never allocate memory, as I don't believe that "memory" is defined in the standard.
class memory {...};
memory mem;
 
@DeadMG it's just to make up the question. of course it would not be part of a real question
 
would be the only valid way to allocate c++ memory.
 
@FredOverflow (i'm trolling)
 
2:25 PM
@ChrisBecke Yes it does, section 1.7 of the standard is called "The C++ memory model", and it specifically talks about bytes.
 
@Johannes: Yeah. That's exactly what I mean
 
and thereafter? what is c++ "memory" defined as?
 
either the use of "C/C++" is completely redundant, or it demonstrates that the asker has absolutely no idea about C and C++
 
@DeadMG if your point is that questions with redundancy are bad, then this doesn't have anything in particular to do with the combination "C/C++"
 
theres a memory model, but c++ has no tangible handle on "memory" as something you can allocate
 
2:26 PM
no, my point is that C/C++ is terrible
the only scenarios you can come up with where it's not terrible are where it's also redundant, which is bad in any case
 
(says I not bothering to actually find and read the relevant section).
 
> The fundamental storage unit in the C++ memory model is the byte. A byte is at least large enough to contain any member of the basic execution character set (2.3) and the eight-bit code units of the Unicode UTF-8 encoding form and is composed of a contiguous sequence of bits, the number of which is implementation-defined.
> The least significant bit is called the low-order bit; the most significant bit is called the high-order bit. The memory available to a C++ program consists of one or more sequences of contiguous bytes. Every byte has a unique address.
 
then "That's exactly what I mean" can't refer in a correct way to my statement or the statement was unclear
@DeadMG no. if half of your program is "assembler/C++", then if a question about assembler or C++ follows, it's completely reasonable
 
I don't even get what you're trying to say
 
just that "half of my program is assembler/C++" isn't really important to the question
 
2:28 PM
but it's just redundant
 
you haven't actually used assembler/C++ in any fashion
 
but if you say "My jacket is blue. How do I allocate stuff in C++?" it's just the same redundancy
 
so what? I don't care about redundant uses
 
it doesn't have particularly to do with the combination "C/C++". So I'm not sure what you find "terrible" with "C/C++" in particular
 
2:29 PM
because people do use it non-redundantly
whereas I've never seen someone use assembler/prolog non-redundantly
 
If you say "I've been programming in C/C++ for a long time. What do you recommend I learn next?", then the statement containing "C/C++" is relevant and not redundant
 
and wrong
 
I have been programming in Haskell/Java for a long time. I'm pretty sure people would look at my funny for saying that.
 
because the answer is most assuredly going to be different for C and C++
 
@DeadMG why is it wrong? I have been using C and C++ for half my life for example
 
2:31 PM
well then, memory can be allocated in c++ through a combination of operator new, and statically, and locally defined objects
 
it would completely reasonable for me to ask such a question
@DeadMG that's the point
 
it's wrong because the question is not functional, you haven't provided enough information to answer the question
 
you would have used both C and C++
 
in c, malloc() / alloca(), and statically scoped, and localy scoped declarations
 
and an answer would need to be useful for a person who has used both
 
2:32 PM
in c/c++ a mix of both, as apppropriate
 
not really
if you've been programming in C++ for a long time, how would in addition knowing C be of any benefit or value to you?
 
in Win32 asm/c/c++/whatever: a combination of language runtume: virtual alloc, globalalloc and heapalloc calls, perhaps even SHAlloc, or OleAlloc
 
how is it any different from "I like apples/bananas. What can I cook out of them?".
 
the fact that you also happen to know C is pretty irrelevant to the fact that you know C++
2
whereas apples and bananas are different things for different uses, whereas as a language C++ completely supersedes C
 
@DeadMG it's not important how it be of benefit or not
we have a question that has programmed with both. we are not to discuss the merits of programming with C
 
2:34 PM
no
 
@DeadMG youare being silly and guilty of wishful thinking
 
but the statement that you programmed with C is irrelevant
if you know C++, then you know templates/OO/etc, and everything you would know if you knew C
 
sbi
@FredOverflow But will that also apply to me while I have to program in C#??
 
@DeadMG no C++ does not completely supersede. Programming for example a linux driver is much easier with C than with C++. And providing a C header is impossible with using C++
 
that's because of the implementations of those systems
 
2:36 PM
C source exist. You can't undo that. And whether C or C++ better suits for particular things is up to each own's opinion.
 
not because C isn't superseded by C++ wherever it can be used
i.e., as a language, like I originally said
 
@DeadMG c++ hasd until now been a useless language. almost any non trivial application involves some interop with a non c++ framework
 
@Chris: So what? Any application involves interop with the OS which is going to be at least partially written in assembler
 
@DeadMG not true at all. you don't know designated initializers, compound literals, tentative definitions, don't know that you can assign to non-void* from a void*, don't know about so many other things
 
as c++ simply does not have an ABI this means that C has to be invoked as a compatibility layer
 
2:37 PM
any non-trivial application will depend on frameworks that are written in other languages
 
@DeadMG Not necessarily. You can write perfectly idiomatic C++ without ever touching function pointers and void pointers, whereas they are essential in C.
 
@Johannes: assigning to non-void* from a void* is an excellent reason that C++ is much better than C
 
right
 
@FredO: Sure, you could do, but it's hardly a novel idea
 
and you probably won't understand code that does int new = 0;
 
2:39 PM
because forcing the cast actually promotes type safety?
 
a function pointer is a function object generated by the compiler that when called invokes a function
@Chris: Of course it does
 
@DeadMG well I don't care about opinions. This doesn't explain why the term "C/C++" would be bad
 
you should have to explicitly violate the type system
 
saying that "C++" is the same as "C/C++" is not sound
 
I didn't say that it was
 
2:40 PM
and how does that actually help? except to force you to type more in the same location.
 
I said that knowing C is pretty irrelevant if you also know C++
 
you said that the "C/" would be redundant
 
Foo* f = (Foo*)pv;
 
@Chris: To ensure that you did not do it by accident
 
or you didn't. I have no idea what you really say now anymore. The discussion has been going on for too long.
 
2:40 PM
yes. that really helped.
 
yes you said that "C/" is completely redundant because C++ would supersede C or something. That doesn't make sense at all.
 
@ChrisBecke C-style casts in C++? Ew.
 
If I asssign pv to Foo* by accident, im always going to do it by accident.
all youve done is force me to type Foo* twice
 
how we fall over such trivialities still baffles me, I think it must be an inherent nerd trait or quirk to do so
 
which the c
0x committee finally realized
and gave us auto
 
2:42 PM
auto has existed since 198..3? 7?
it wasn't introduced purely for compatibility with C
 
16 mins ago, by DeadMG
no, my point is that C/C++ is terrible
16 mins ago, by DeadMG
the only scenarios you can come up with where it's not terrible are where it's also redundant, which is bad in any case
 
> People actually LOVE discussing things that don't matter, because it's so easy to have an opinion about those things.
 
anyway I think we can terminate the discussion. It doesn't seem to lead anywhere
 
actually the c++ rules aboit void* actually removed a layer of safety that exists in C
 
What layer of safety would that be?
 
2:46 PM
void** ppv;
struct* ps;
ppv = ps; // error in c & c++
ppv = &ps; // error in c++, correct in c
ppv = (void**)ps; // the forced cast how hides the level of indirection error
 
sbi
@ChrisBecke You're bullshitting big time again. C++ almost totally eliminated the need to use void* in the first place.
 
yes it did
except where interop with C is required
like, when defining COM interfaces
so, in C, you can go
IUnknown* pUnk;
pUnk->QueryInterface(IID_IUnknown,&pUnk);
whereas c++ (Without MS's custom declspecs) forces you to go
 
sbi
@ChrisBecke So? Are you trying to sell me the fact that, when you have to lower yourself to C, then C++ becomes unsafe, as one of its deficiencies?
 
pUnk->QueryInterface(IID_IUnknown,(void**)pUnk);
Given that c++ doesn
t need to use void*
why fuck with the C semantics of it is my argument?
void* isn't a c++ construct
its a c construct
so leaving it with its to and from casting rules was nothing more than a unsublte attempt to discourage its use
 
sbi
Oh c'mon! Give me a break. COM is a C way to hack OO onto C. What does it feel like using this from VB? ObjectPascal? Bad! But it's C++' fault that it's bad from C++, too?!
(JFTR, that offensive vote isn't mine.)
 
2:54 PM
What? COM is just a single example of C style interop with C++
that is more unsafe due to the c++ void* rules
 
sbi
3 mins ago, by sbi
@ChrisBecke So? Are you trying to sell me the fact that, when you have to lower yourself to C, then C++ becomes unsafe, as one of its deficiencies?
 
Are you hard of understanding today?
 
flame war
 
Prolog sucks
 
C++ becomes MORE unsafe than it otherwise should be
 
sbi
2:55 PM
@ChrisBecke I'm as thick as everyday.
 
by forcing the cast it forces the developer to hide errors that in C are visible
 
sbi
@ChrisBecke I have already explained why this argument is bullshit. After I did so, you came with COM. Then I explained why I think that argument is just as bad. And now you're going back to square #1?!
I have said it before: I'm pretty much grown up. I have a job to do. I have kids to attend to. My tests just finished. My time is too precious to argue with people who argue for the sake of argument and ignore counter-arguments. Have A Nice Day.
 
Prolog is the best thing since corned beef!
 
@sbi What tests?
 
sbi
@FredOverflow Unit tests. NUnit just finished. Of about 300 tests, 3 failed. And I considered all of them far removed from the changes I made. :( I will now have to look at the issue. I need to check this in tonight.
 
3:01 PM
You are arguing redundantly. void* is meant to be unsafe when used from c++, because it is a C construct. What is pointless is C++ making it more unsafe than it needs to be, when it is needed for interop via C style interfaces.
 
@sbi Oh, I thought some medical tests or Turing tests ;)
 
sbi
@FredOverflow Didn't you know? I failed the Turing test, utterly. Several times. I'm a bot. I'm here to patiently answer the same arguments over and over. Except I fail at that, too.
"I'm the fume that fires the engines of failure."
(Now who knows where that one's from? Hush! Don't you google!)
 
sbi
@JohannesSchaublitb Nope. No folk.
 
user379888
3:15 PM
has anyone tried GTKMM with Visual Studio?
 
user379888
gtkmm*
 
user379888
I am having trouble installing it on VS
 
@sbi "The C++ Programming Language"? ;)
 
sbi
@FredOverflow Close enough. OMG, it's "fuel", not "fume"! I have mis-quoted MG! He's going to haunt me for the rest of my life! (Now there's a scary thought...)
 
3:48 PM
for all latex enthusiasts: checkout stackoverflow.com/questions/5195982/…
 
hmm
i'm a latex enthusiast. but about the real latex.
3
lol
 
4:03 PM
heh
how is (gnu) make usually invoked so that it gives you verbose output (eg every command it executes)
Well I thought VERBOSE=1 was most common, but it doesn't work atm
 
It doesn't say in --help/manual?
 
ah it's after make and not as env variable
 
@sbi: What?
 
sbi
4:25 PM
@DeadMG Never you mind.
 
Hi
How long have people been here to get some astronomical reputation scores? Mine's going down as fast as up :(
 
Well, the site launched in 2008
and for the most part, you're capped to gaining at most 200 rep per day
 
In three years, I'll have a reputation of.. um... about -300
 
heh
 
sbi
@TimLutherLewis That would assume that, in three years, you have learned nothing.
 
4:37 PM
you get far more rep for an upvote than you lose from a downvote though
and downvotes are relatively rare
 
Ha... Well, I've had two down votes in 3 hours.
 
@sbi or that he just hasn't applied his knowledge!
 
sbi
@TimLutherLewis Just wait until someone gets mad at you and goes through your old answers, downvoting left and right..
 
Or haven't found a popular-enough question. :P
 
Or got in there quick enough. Besides, I've been programming for years and must be having an off day :(
 
sbi
4:39 PM
@jalf Where's the difference?
 
@TimLutherLewis Don't worry too much about rep.
 
sbi
@PiotrLegnica Yeah, that's what falls under "learning": which questions will yield lots of rep for a simple answer. However, I feel like I have yet to learn a lot about that...
 
anyway, if you get downvoted, try to learn from it. It may be that your answer was wrong, or misleading, or it's possible that it was badly presented, or with a bad attitude. Of course, it's also possible that it was completely undeserved. That happens too
 
sbi
Who is here for the rep anyway? :)
 
Heh, I'll try not to... but achievements are addictive and this is like professional achievements
 
4:40 PM
I'm here for the ponies.
 
quite a few people, I suspect ;)
 
True, I came her for answers damnit!
 
I've hardly gained any rep for the last 6 months
been slacking off ;)
gone from around 60k to whatever I have now. Can't even remember. 67k or something maybe?
 
That reminds me of a quote I once read...
"Sex is like air, you don't notice its importance unless you are not getting any"
Well, reading from someone with 50k+ rep that rep is not important...
 
4:41 PM
Well, I made a crappy assumption about copy constructors and operator = overloads doing a similar thing.. I made that mistake before. Dofus.
 
I've been badge-hunting at first, too. But after several it's meh.
 
sbi
@DavidRodríguezdribeas 50k? So it's not me, you're talking about. :)
 
Right only 45k+... my bad
 
@sbi yeah, but that's less than 10k in half a year. Not exactly hitting the cap often
 
huge difference when looked at from the point of view of a new user that has below 3 digits
 
4:43 PM
Well, I'm a bit proud of my programming ability so a 20 something rep is a bit embarrassing really.
 
true :)
 
sbi
@TimLutherLewis Well, here's a suggestion: Post a link to that crappy answer here, so we can all find it and downvote you. That will make sure that you never forget what#s wrong about that answer.
 
Ha
I'll not forget again.
 
@TimLutherLewis eh, it's very random. Sometimes, you spend an hour or more writing the perfect answer, and get 1 upvote
sometimes you spend 3 seconds posting a quic note, and before you can refresh the page, you're at +20
 
sbi
@jalf What are you talking about? Yes, there's a little curve in that, but almost no dents, and certainly none in the last six months.
@jalf Holy cow! +20?! I have yet to have that happening to me. :)
 
4:45 PM
I didn't want to get hung up on the rep thing but after getting some good answers from people, I felt I should give back.
 
sbi
@TimLutherLewis Twenty something wasn't that bad an age, though. I'd love to go back there with my today's mind.
 
Um... yeah, If I was still in my 20s I'd tell you how sunny it is over here :)
If I could go back to being 20 knowing what I know now... well, I'd have written minecraft for starters.
Embedding manifest... 7 minutes and counting... what is it doing in there?
 
btw, most rep is gained on C# questions, I suspect. If you want rep, you could do a lot worse than answering a lot of those :p
 
I've never been into C#
 
You can edit messages here for 2 minutes after posting.
 
4:50 PM
I mean, I can read it but if I want a slightly less than optimal JIT compiled language, I usually go Java.
neat
 
Java is like C# without all the redeeming features though
3
 
yeah
C# has stronger generics, extension methods which I like, some operator overloading
 
Yeah, I wish they'd revised their stance on first class objects
and operator overloading
 
automatic boxing and unboxing
boxing is still a stupid idea, but at least C# automate sit
 
and I'm not fond of the garbage collector
What's boxing in this context?
 
4:53 PM
int i = 0; Object o = i;
in Java you have to do
 
converting built-in types like an int to a reference type
 
Object o = new java.lang.Integer(i);
but in C# it's automatic
 
Java has that, too, I think.
 
Right, that makes sense. Like a wrapper.
 
At least last Wednesday I was able to assign int to Object with no manual boxing.
 
4:54 PM
Does it work on Tuesdays too?
 
I don't know, I only write Java on Wednesdays.
2
 
Good plan
If java had first class objects, I'd be a lot happier
 
sbi
@PiotrLegnica What did poor Wednesday do to you that you desecrate it with writing Java?
 
@sbi Algorithms class.
 
rofl
 
4:57 PM
Universities are very keen on teaching Java these days but they don't tend to teach how to write optimal java.
 
yeah
 
And by that I mean ugly code that doesn't go anywhere near the garbage collector but runs reasonably fast.
 
they kind of seemed to forget about java after first year at my university
 
Java's not even a good teaching language if you ask me, because the concepts involved are so limited
 
agreed
 
4:59 PM
I think it can teach bad habits as Java only programmers don't really have much of a concept of what a pointer is and why that matters.
 
more importantly, I think it teaches them associations that don't exist
 
Such as?
 
java is easy to teach though. Even if it isn't optimal for the students, it's very convenient for the teachers ;)
 
like, objects and heap allocation
 
4:59 PM
in C++, you allocate objects on the stack, or on whatever memory custom allocator you have
but in Java, you just new them off the GC
 

« first day (139 days earlier)      last day (4824 days later) »