« first day (127 days earlier)      last day (4813 days later) » 
00:00 - 19:0019:00 - 00:00

7:10 PM
hey!
can someone help me with a doubt??
 
@cyberroger Just ask, and if someone can and wants to help, they will.
 
7:33 PM
Anyone present here from USA? I have some offtop question, but here the most full room )
 
sbi
@KonradRudolph Very obviously, I'm not in favor of re-opening any of these two.
 
@JuliaMironova: I'm not from USA but perhaps I can answer..
 
@sbi Not even after Konrad's edit?
@JuliaMironova Yeah, I am.
 
sbi
@JuliaMironova Some of those logged in are in the U.S., although I'm not sure they are all from the U.S. (Well, you asked this in the C++ room. Why would you expect people not to be picking nits?) However, I have no idea whether they just didn't shutdown their machines when they left work on Friday or whether they are truly working on them.
@PigBen Did he edit this?
 
The first one, the one he wants reopened. Yeah, he edited it.
 
7:40 PM
@BlackBear Today I read that in USA if somebody doing something not well, I can't to tell him that he is doing something wrong, or he is stupid/idiot/etc. Also I can't use such expression like "I disagree", "You absolutely wrong", "No, you don't", "It is bad idea", but must say something like "I will be agreeing with you, if…". The same with «You have must», «You must», «You need»... I must use something like "I recommend you"... Is this true?
 
sbi
@PigBen I just had a look at it. Yes, it's toned down a little, but the essence is still the same: starting from the position that stack objects are a needless complication it sports an abominably bad piece of code to proof that.
 
@JuliaMironova: I don't have any idea.. but this sound a bit idiotic in my opinion =)
 
sbi
@PigBen And even if that gets even more reformulated and re-opened as a valid question as to when to use stack and heap objects, I'll vote to close it as a dupe. There's numerous such questions out there (and me telling him to go and research them prompted him to post this rant twice).
 
@BlackBear This is was topic about differents in our cultures and how to talking with american colleagues from IT )
 
@JuliaMironova then probably it's true.. perhaps americans think it's rude..?
 
7:44 PM
@sbi Maybe one needs to have fallen hopelessly in love with RAII to be able to appreciate "stack objects" :)
 
sbi
Wow, I've just just looked at the first three questions from the "related questions" list that seemed to fit, and they all have very good accepted answers:
26
A: Stack,Static and Heap in C++

Mark SantessonA similar question was asked, but it didn't ask about statics. Summary of what static, heap, and stack memory are: A static variable is basically a global variable, even if you cannot access it globally. Usually there is an address for it that is in the executable itself. There is only one cop...

44
A: Proper stack and heap usage in C++?

CrashworksNo, the difference between stack and heap isn't performance. It's lifespan: any local variable inside a function (anything you do not malloc() or new) lives on the stack. It goes away when you return from the function. If you want something to live longer than the function that declared it, you m...

10
A: How to identify if an object should be on the stack or not?

Andrew GrantWell firstly vectors (and all the STL container classes) always allocate from the heap so you don't have to worry about that. For any container with a variable size it's pretty much impossible to use the stack. If you think about how stack allocation works (at compile time, basically by incremen...

 
Good work, Sherlock!
 
sbi
@FredOverflow Really, these were the first three I tried! Had he done a minimum amount of research he would have run into these. Even looking at the list of related questions after his first rant got closed would have gotten him to these. He's just one of those who will never learn, because they can't ask.
 
@BlackBear Yep, something like rude form. Also this is bad idea to disagree with boss ) So, i'm very interesting, it this all true, or some myths... )
 
> Clearly, C++ sucks, because it is different from that other language that I vaguely know!
 
sbi
7:48 PM
Wow, now he's really going over the top: stackoverflow.com/questions/5058831/….
 
@JuliaMironova No, that's false. Although, it is, of course, rude to call someone "stupid/idiot/etc", it is perfectly acceptable to tell someone you disagree with them. To say "You are absolutely wrong." is a bit strong, and you probably shouldn't say it in a more formal discussion, as it is a bit arrogant. As for "No you don't", that's a bit vague, I'd need a more complete sentence. Nothing wrong with "It's a bad idea."
 
@JuliaMironova lol disagree with boss == being fired I guess
 
@PigBen For me this is not a rude at all )) if someone doing something bad, he is stupid in that moment and this will be good idea to say this to him, or when someone telling this to me )
 
Sorry to pop out out of the blue, but what's up with Russians and smilies missing eyes?
 
sbi
@LiraNuna What?
 
7:58 PM
@JuliaMironova's smilies are missing eyes
 
sbi
@BlackBear I've seen better bosses.
 
@LiraNuna Maybe they are blindfolded? Could be some sexual thing.
 
Every russian I know uses that convention of ) as a :)
 
Or maybe their keyboards don't have a colon?
 
sbi
@LiraNuna Oh, I see now. (Maybe you should have directed your comment at her then?)
 
8:00 PM
@LiraNuna Don't know, I never use eyes, nobody use ) I know guy from Taiwan, they are never use such "western" smiles, they prefer something like ^~~^
 
we should standardize smilies
 
@JuliaMironova It's okay to say to friends, light-heartedly. But one certainly doesn't call their boss stupid(unless of course, they are friends, and their ranks in the company are not too disparate.)
 
@LiraNuna does your profile's pic represent a smiley?
 
@BlackBear: maaaaaaaybe
 
@LiraNuna lol ok =)
 
8:04 PM
can I be "using" a base class constructor as subclass?
 
just like I can do using Base::operator =
 
Ah, you mean inherit constructors? You can in C++0x IIRC.
Example taken from Wikipedia:
class BaseClass {
public:
    BaseClass(int value);
};

class DerivedClass : public BaseClass {
public:
    using BaseClass::BaseClass;
};
 
damn you C++0x, release faster
 
Why do you think you need this?
 
8:08 PM
I'm trying to reduce boilerplate code
and by doing this I'm generating more boilerplate code
 
@LiraNuna, No. By using an assignment operator, you make accessible a member function which is just hidden, a constructor is something different (they are not hidden, to be usable for a derived class, they need to do more, i.e. constructing the new members).
 
@LiraNuna Inheritance is not the only means to reduce boilerplate. (In my experience, it is also the worst way of achieving "code reuse".)
 
I am well aware of that
but I have no clue how else to do this, there are so many restrictions for this specific case
 
@Fred, cut and paste win over inheritance every time as worse way to achieve code reuse...
 
@AProgrammer Cut and paste does not duplicate code. Copy and paste is a different beast, however...
 
8:13 PM
@LiraNuna, would a constructor of Derived taking a Base as parameter help you?
 
Anyway, many OO purists seem to be unaware of the fact that you can use an object without inheriting from it :)
 
@AProgrammer: it still /defining/ the constructor, which is more LOC to maintain
 
@LiraNuna Can we see some code?
 
hold on
branch new_swizzle
warning: lots of code
to make stuff clear: there's a "vec4" class, where it should emulate glsl's behavior 1:1
 
I'm not looking at lots of code. pastebin or die ;)
 
8:16 PM
I know - I can't make this example smaller
 
it has so many variables, and solving it in one small way does not solve the bigger problem
I figured D
 
Ah, so the D programming language is basically just a big joke from Russia?
 
*grin
 
I dunno
every time I try to look at D, it gives me more things that I want to hate about it
 
8:18 PM
hey, I have this class declaration
StackX::StackX
{

and it says, expected unqualified-id before ‘{’ token.
why?
 
I'm puzzled, vec4 has no base class, how would inheriting constructor help?
 
Yay, DeadMG gives another D hate speech :)
@cyberroger You need a parameter list.
Like StackX::StackX()
 
well, look
 
@FredOverflow im gonna try that
 
import std.metastrings;
pragma(msg, Format!("7! = %s", fact_7));
printf, really? I thought we got over that a long time ago
 
8:19 PM
Well, as long as it's type-safe and it works...
 
@AProgrammer But it's swizzle does (_swzl)
 
@FredOverflow now, look at this:
:365661 StackX::StackX()
{

private:
    int maxSize;
    vector<double> stackVect;
    int top;

public:
    StackX(int s) : maxSize(s), top(-1)
    {
        stackVect.reserve(maxSize);
    }

    void push(double j)
    {
    stackVect[++top] = j;
    }

    double pop()
    {
    return stackVect[top--];
    }

    double peek()
    {
    return stackVect[top];
    }

    bool isEmpty()
    {
    return (top == -1);
    }

    bool isFull()
    {
    return (top == maxSize-1);
    }

};
 
Personally, I prefer printf-style formatting over shifting to the left ;)
 
I'm not gonna argue that << was the best move
 
for ADL reasons I need to change the _swzl define to pastie.org/private/lfmrfoiwceflwgos5dg
 
8:20 PM
but it's sure as hell better than printf
 
@FredOverflow and it shows this errors:
@FredOverflow expected primary-expression before ‘private’
 
@cyberroger You are not allowed to access non-existent vector elements. Your vector is empty, hence stackVect[0] is an error.
 
@DeadMG have you really used D, I was curious at once, but never really got into it...
 
@cyberroger We need more context.
How does the surrounding code like like?
 
@FredOverflow now look at the main class
 
8:22 PM
Show us the definition of StackX.
 
Uhm.. should that not start with:
class StackX {
rather than StackX::StackX??
 
@DavidRodríguezdribeas i tried that
:365678
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    StackX theStack(10);
    theStack.push(20);
    theStack.push(40);
    theStack.push(60);
    theStack.push(80);

    while( !theStack.isEmpty())
    {
        double value = theStack.pop();
        cout << value << " ";
    }
    cout << endl;
    return 0;

}
 
Ok, have you included the header file that contains the definition of StackX?
 
@DavidRodríguezdribeas Yes.
 
@DavidRodríguezdribeas like the way you said, it returns this error redefinition of ‘class StackX’
 
8:23 PM
I thought he was posting constructor code.
 
I included this on main.cpp #include <QtCore/QCoreApplication>
#include<stackx.cpp>
 
You don't want to include cpp files.
 
@cyberroger. Do not include .cpp files
 
@DavidRodríguezdribeas its the .h files??
 
<insert another comment about including a cpp file>
 
8:24 PM
Yes, it should be in a file called stackx.h
 
Don't take it harsh (it seems to be a common pattern these days), but some introductory book/tutorial on C++ might be of help here
 
And as David said, the line should say class StackX.
May intuition says he is learning from a bad tutorial. Unqualified use of the standard names, and explicitly returning 0 from main...
 
It is too long to write in a short comment, but basically you should declare your classes in headers (if you want them used from other translation units) and add include guards
 
@DavidRodríguezdribeas look at this
@DavidRodríguezdribeas candidates are: StackX::StackX()
@DavidRodríguezdribeas StackX::StackX(const StackX&)
 
What line provokes these errors?
 
8:27 PM
You are not providing enough context
What code, what line are causing the error?
 
If you were asked for a test to write some program, and you needed to use a Combinations algorithm to calculate some combinations, would you write it yourself or use a library? (Test does not explicitly state that external libs are not allowed)
 
those two errors look like if you are trying to create a new StackX by passing arguments to a constructor that are not matched by existing constructors in the type
 
@Tony What kind of test is that?
 
@FredOverflow for a job
 
Most probably the line:
StackX theStack(10);
Do you have a constructor that takes a single integer argument?
 
8:29 PM
@DavidRodríguezdribeas Yes, he does.
 
@FredOverflow Kind of, he has it in the "redefinition" of the class
What is there in the actual first definition of the class?
 
Oh, I thought that "redefinition" stemmed from including a cpp file.
Hence violating ODR.
 
yeah, this one

public:
StackX(int s) : maxSize(s), top(-1)
{
stackVect.reserve(maxSize);
}
 
So, did you move the definition of StackX into a .h file successfully?
 
The redefinition is because the compiler in one specific translation unit is probably seeing something line:

struct test {};
struct test {}; // redefinition error!!!
 
8:32 PM
@Tony: Depends, the question is, does the examiner want to know whether or not you are capable of writing it yourself?
 
@FredOverflow so, if I want to create a new class, should it be with .h extension insted cpp??
 
@DeadMG if only I knew that
 
That is a compiler error, different from having a single definition in the translation unit but multiple when linking (result of compiling method definitions in more than one TU)
 
@Tony: I'd always write it myself, especially since nCr is a pretty trivial algorithm
 
@cyberroger You always put the definition of a class in a header file. You can put the definitions of the member functions in a separate cpp file, if you want. You normally do that when they are above a certain limit, say 1 line of code.
 
8:33 PM
@cyberroger If you want to create a new class, and you want that used from different translation units (.cpp files) you should do something like:
// xxx.h
#ifndef XXX_HEADER
#define XXX_HEADER
struct xxx { ... };
#endif
 
But again, any reasonable book on C++ should cover that.
 
@Tony, without feedback from the interviewer, I'd mention the possibility of reusing and then providing mine. (Note also that the standard has a permutation generation algorithm).
 
@FredOverflow ok, im checking it.
 
@DeadMG yes nCr is pretty trivial, but actually taking some objects and generating all possible combinations of them, not sure if that is as trivial as it looks
 
from memory, that's in some std algorithm function
 
8:36 PM
Then provide implementations (of the non-inlined member functions) in a single translation unit:
// xxx.cpp
#include "xxx.h"
void xxx::foo() { // assuming void foo() is declared in xxx
// ... code here ...
};
Users of the class only need to see the header and call the functions:
// main.cpp
#include "xxx.h"
int main() {
xxx myobj;
myobj.foo();
}
 
@FredOverflow what have you posted that you deleted??
 
sbi
You native English speakers, how would you interpret: "Nobody said doing X will lead to Y. However, everybody that doing so is Z."
 
syntax error
 
@cyberroger I was reading an old post of yours and thought that it was new, thus repeating myself.
 
@FredOverflow ok.
 
8:41 PM
@sbi If Z is undefined behavior, that looks like a common discussion on many features in C++. Then again I am not native
 
@sbi s/that/said/ right?
 
sbi
@DeadMG It was a typo.
@FredOverflow I meant to write "...everybody said that doing so...".
 
@FredOverflow I though that when I created a .cpp class, the .h file was automatically updated
 
@cyberroger Dream on :)
 
@FredOverflow LOL
 
8:42 PM
@cyberroger :) So you modified the constructor in the cpp and expected that to be transferred automagically to the header :)
 
@sbi: It seems like a pretty straightforward sentence to me
 
sbi
Obviously, the person on the other hand was interpreting it as "...everybody doing so is Z".
 
@DavidRodríguezdribeas yeah. LOL
 
oh
no, that's not even remotey accurate
 
Why are you using std::vector to implement a fixed-size stack, anyway? Why don't you take advantage of the fact that a vector can grow dynamically?
 
sbi
8:43 PM
@DeadMG With Z actually being the word "stupid", that seemed to have hurt.
 
sounds to me that some person is doing X and getting butthurt about it
 
@FredOverflow so whats the difference of a cpp and h file? being the same class..
 
sbi
@KonradRudolph Thanks for taking that offending passage out, but he's put it in again. That guy is beyond help. (Did I mention he doesn't seem to be here to learn?)
 
@cyber You may want to change the reserve call to a resize call if you want to push elements via the [] operator. Otherwise, you will access non-existing elements, causing undefined behavior. Or you could use push_back and pop_back, in which case reserve in the constructor is fine.
 
Is this a place to ask a short question? :-)
 
8:45 PM
no
 
sbi
Oops, Konrad isn't here anymore. I thought he was here a while ago...
 
we have a whole Q&A site
go use it
 
@cyberroger You need to read a book on C++, I cannot explain the "module system" of C++ in a couple of sentences.
 
@FredOverflow ok. sorry.
 
sbi
@JezFischer The newbie hints linked to on the right explains this and other stuff.
 
8:45 PM
especially since this chat is Off Topic By Law™ dictated by Uncle FAQ over there
 
@JezFischer, You mean asking short questions like Is this a place to ask a short question? Most probably.
 
@cyberroger No need to apologize. There was a very good article on h and cpp files on gamedev, but it seems to be dead :(
 
oh, @sbi
I ate that burger, it was delicious, and I was totally fine afterwards
 
sbi
@DeadMG Uh oh. Be careful. People tend to take things literally.
 
well, no less fine than that time I drank some water before going to bed
 
sbi
8:46 PM
@DeadMG Great!
 
no
not great, at all
 
sbi
That's no reason to not to change your eating habits, though.
 
because now, I have even less control over when I'm bad and when I'm not
not going to stop trying to adhere to The One True Way™
 
sbi
(My English grammar module seems to have taken a serious hit today. I need to be very careful.)
 
@JezFischer, if you feel like, just go ahead and ask... @cyberroger is already asking a couple of things that don't really fit the format here...
 
8:48 PM
@cyberroger I found the updated link! Click me to learn about header files.
 
just once in a while, a man needs to consume a colossal quantity of fat in one sitting
 
@FredOverflow thanks buddy!
 
I mean, I love yoghurt, grapes, bananas
 
sbi
@DeadMG What I have found when my stomach gave me trouble was that there was no true cause-result relationship between doing wrong things(TM) and having a bad stomach, but there definitely exists a correlation.
 
but, they just don't fill you up
 
sbi
8:49 PM
@FredOverflow I want to click you, too!
 
@sbi I call that "bowel-defined behavior".
 
it's ™ you peasant
not (TM)
 
@sbi You should, it's a great article.
 
@JezFischer This is a chat room. You can say or ask anything you want.
 
@PigBen "anything you want".
Wow, it really worked!
 
8:51 PM
@FredOverflow Ah, but can you ask it?
 
anything you want?
easy
 
lol I used to think that programmers are boring people =)
 
@PigBen I don't dare try!
 
you type it, then you add a question mark
 
Better not challenge fate twice.
Every time I type a question mark, my fingers eventually want to type a colon, too...
 
sbi
8:52 PM
@FredOverflow Am I likely to learn anything new from it? Because if not, I'd like to spend the rest of the evening (when, or if, I can tear myself away from the chat, that is) finishing that book of Reynolds I'm currently reading.
 
@sbi: Fuck, I forgot about all those eggs
 
@sbi I strongly doubt you will learn anything from the article.
But it's good to have it handy in case some newbie asks about the topic.
 
sbi
@BlackBear Well, I have found that C++ programmers tend to be anally obsessed with details. Which often makes this chat, um, interesting.
@DeadMG No eggs in that book. What are you talking about?
 
the eggs in my fridge
oh, and the milk too
 
sbi
@FredOverflow Then I won't read it. I have better stuff to read at hand. :)
 
8:54 PM
@BlackBear C++ programmers can appear boring to people not fluent in C++.
 
sbi
@FredOverflow I will then refer any newbie to you, knowing that you will point out a very good article, Ok?
 
@sbi Why the double indirection?
 
flexibility
 
I think that is a trait of programmers in general, and C++ programmers in particular. A programming language is usually much more strict than natural language. An C++ is a particular example where being precise makes a big difference in many cases
 
sbi
@DeadMG What about them? Do you need to eat them but don't feel like it, or mustn't eat them, but can hardly resist?
 
8:55 PM
no, I should be eating them but they're hidden behind the cheese and so I forgot
 
@FredOverflow On the other hand, some C++ would not pass the turing test...
 
sbi
@FredOverflow Because I can remember @FredO, but will forget the link.
Oh, and because adding another layer of indirection is The Programmer's All-Purpose Cure™. (I actually had to copy that "™" from one of @Dead's messages.)
 
maybe we should start abstracting over programming language
 
@sbi That is called know-who and is always more important than know-how if you ask me
 
are you guys familiar with low level stuffs?
 
8:57 PM
it is alt + 0153 for me
@blackbear: We're C++ programmers, you can go no lower and no higher
 
sbi
@BlackBear No, I'm living on the 4th floor. Why do you ask?
 
I already referred someone to you @DeadMG, when they asked on some details on parallel for loops and such
 
i am interested in that but too lazy to google for some books =)
 
@BlackBear I sleep with void pointers!
 
you know I've never written a shred of actual concurrent code, right?
 
8:58 PM
@BlackBear books on what in particular?
 
@FredOverflow: you slut!
 
sbi
@DeadMG Ah, good to know. I might even actually remember that, because it's close to the mdash I already use (0150). Thanks a lot!
 
@LiraNuna Yeah, it's not even type-safe sex.
 
I've just started C++ today and i'm a bit stuck with some logic. Any help would be appreciated. bit.ly/i8Lq2X (link to question)
 
damnit you just stole my line
 
8:59 PM
The other day you mentioned that you were playing with them, and that qualifies you better than me --I only know they exist, their name and where to look for them if needed
 
@David: I've read a book on assembly and I'm interested in cache / pipeline.. it's amazing that they actually work and nothing blows up =)
 
sbi
@LiraNuna Just get used to it. We, who've been around here for a while know that @FredO always drops these incredible statements, that tend to end up on the right. No way of beating him on his own ground.
 
If you are on a mac, Alt-H will do ™
 
sbi
@DavidRodríguezdribeas Are you talking about @FredO's void pointers???
 
@sbi duly noted
 
9:01 PM
@sbi @DeadMG and parallel fors...
 
@David: I think that I have a somewhat strong theoretical basis for concurrency, I've been looking at it a lot
but little actual prractical experience
 
@JezFischer your delayloop() function is wrong. Post your code
 
@BlackBear So you are actually interested in processors and how they implement it, or how does it affect programmers?
 
@BlackBear Witch caching, things blow up severly once you introduce multiple threads...
(If you're not careful.)
 
@BlackBear ok
 
sbi
9:03 PM
@DavidRodríguezdribeas Oh. I see. Maybe I'm too old for such a crowded chat room (21 of 14 users are in this room???), but I tend to get confused when more than one conversation is going on at the same time and you're not properly referencing each other.
Are these called "dangling statements"?
 
@David both.. I'd like to understand how they work, then how i can write better code
 
This is like IRC 2.0
 
sbi
@FredOverflow Wow, "witch caching". That must be that caching strategy from hell thing I read about the other day...
 
@sbi Referential dis-integrity? :)
@sbi Data flies on brooms, they tell me!
 
sbi
@FredOverflow Are you planning a political carrier? If not, you should definitely aim for a management job. You already qualify.
 
9:06 PM
@BlackBear :) Once you find a good book, do not hesitate on comming back and sharing :) I have tried doing some googling for articles, and I usually consult a co-worker on specifics. Still I only have a very high level knowledge of that
 
@sbi Na, I prefer unmanaged environments...
 
@BlackBear, the standard textbook for processor architecture is H&P, Computer Architecture, A quantitative Approach. But that will gives you far more than you need (it is more targetted to processor architects). And note than cache and pipeline is nothing compared to what is needed for out of order execution.
 
Even if it means I have to take out my own garbage :)
 
Xeo
hm.. I know there was a listing of my latest rep gains... just.. where?
 
@FredO: I refer you to the room message
 
sbi
9:07 PM
@FredOverflow Talking out your own garbage sometimes is better than eating your own dog food. :)
 
But if I were to become a politician, my catch phrase would be "Ressourcen-Anforderung ist Initialisierung" :)
 
Xeo
thanks sbi
 
@DeadMG :D
 
9:08 PM
@AProgrammer thanks, i'll give it a look anyway =) this summer i got bored and began studying assembly ; b
 
@BlackBear, David, agner.org has manuals which are more targetted to programmers and with less consideration to implementation. They may be more suitable for you.
2
 
@BlackBear Studying assembly is great, but beware: x86 is the C++ of assembly languages ;) Full of special rules and backward compatibility stuff.
 
@AProgrammer thanks @FredOverflow i like challenges =)
 
I like your mother
 
whose..?
 
9:15 PM
does it really matter?
 
don't know =)
 
How did you meet her?
 
in bed
 
(Does anyone get the reference?)
How I Met Your Mother, stylized in the opening credits as how i met your mother, is an American situation comedy that premiered on CBS on September 19, 2005. The show was created by Craig Thomas and Carter Bays. As a framing device, the main character, Ted Mosby (Josh Radnor), with narration by Bob Saget, in the year 2030 recounts to his son and daughter the events that led to his meeting their mother, which explains the title and allows for a narration in the past tense. How I Met Your Mother's other main characters are Lily Aldrin (Alyson Hannigan), Marshall Eriksen (Jason Segel), Robin...
 
the reference is to one of my memories
not a tv show
 
9:17 PM
lvalue reference or rvalue reference? :)
 
lvalue, for sure
I had a friend once who would reply "I fucked your mother!" to pretty much anything
 
How come he used to be your friend? :)
 
sometimes I just randomly get reminded of him and feel forced to spew such things
because that was before I went to university?
he dropped out of school (surprise!)
 
@DeadMG What was his immediate response to that?
 
don't recall, I wasn't there
I just heard that he dropped out, and then I never saw him again
 
9:20 PM
Did he tell the principal to... you know... :)
 
lol
it's a principal, and we don't have them in the UK, we have Heads
 
already corrected
I searched for "principle skinner" and was corrected by Google :)
 
principal nub
 
sbi
@DeadMG So Americans call a head a "principal"? Like in "shut up, or I'll knock your principal"? Doesn't that tend to take the wind out of such phrases' sails?
 
no?
it's only head as in the Head Teacher
not all uses of the word "head"
 
9:32 PM
good night guys =)
 
sbi
Haha, now that guy flagged my answer for being incorrect!
 
for some reason, I can't follow that link
 
sbi
@DeadMG ??
I can. It's this:
6
A: C++: vector<string> *args = new vector<string>(); causes SIGABRT

sbiThere is no real error in this code, although the style suggests that you urgently need a good C++ book. As @James said in his comment to the question, it is almost certainly wrong to use a dynamically allocated vector object, and it's certainly wrong to not to keep it in a smart pointer. If yo...

 
yeah I know
it's my internets
a glitch in, to be specific
 
@sbi I have already flagged the question … perhaps the moderator deems this worthy of locking
@sbi Oh, he already has :)
 
9:46 PM
lolwtf
 
Which question? I see no locking here...
 
sbi
@KonradRudolph Yes, I've seen this. But he seems to have flagged my first answer to him for being technical wrong. Really, I don't know what to say about this guy.
 
I think the guy is confusing stack/heap storage with direct/indirect access. Those are orthogonal issues.
Oh, I have +249 rep for today, my personal best :)
Must be Jon Skeet day :)
 
10:21 PM
@sbi Ha ha. Craziness.
 
10:42 PM
@AProgrammer Thanks, I think I have already browsed over those manuals before, I just need time to dig into it with greater detail
 
10:54 PM
Is there a way to pass arguments from command line to a boost unit test? (say, only do some particular test if the test executable gets called with a particular parameter)
 
@Manux Uhm.. not sure if exactly what you need, but there is a --run_test=<pattern>... I don't know how the pattern is.
 
How would I use the run_test parameter?
all I can about is it not working... :(
find about*
 
In my current setup, each binary has a root test suite, where different test suites are added (single layer), each internal test suite has a few tests. To run all tests from a test suites that contain Order in the name I would run:
./test --run_test=*/*Order*
And that will run the test suite "TestOrderContainer"
 
ok, I think I'm getting it
but, I'm not too sure how to prevent a test suite not to run automatically
 
I cannot help there, I usually just comment out the test suite
the line with the add( ... )
in the code, and that basically makes sure that the test/test suite will not get run
You might find more information here: ncbi.nlm.nih.gov/books/NBK7200/#ch_boost.Disabling_Tests
 
11:06 PM
great, thanks ;)
 
although that looks more like an extension to boost test than a feature present in the boost lib
 
@sbi The int count = sizeof(_arguments); seems pretty dubious.
 
00:00 - 19:0019:00 - 00:00

« first day (127 days earlier)      last day (4813 days later) »