« first day (202 days earlier)      last day (4760 days later) » 

1:00 PM
If a person who incessantly corrects the grammar usage of others is called a grammar nazi, then what kind of nazi would a pedant be called?
Correctness nazi?
Or just an asperger?
 
sbi
@Als I have provided my own answer. I hope it's right.
@StackedCrooked It's a C++ programmer. (That was easy.)
 
@sbi hahahah
 
sbi
Mhmm. The @Feeds guy seems to have been in this room again, but I can't find any messages. Why is that?
 
@sbi no idea
does the feeds guy actually come in the room randomly or at predetermined times?
 
1:18 PM
Most likely polls the feed every X minutes or so.
 
sbi
@TonyTheTiger There are two feeds set up to appear as messages from the @Feeds guy.
 
I leave you guys for a day and you start discussing C++. Tsk tsk.
 
@CatPlusPlus heheh we possibly couldn't talk about cats without you
 
(Also excuse any grammar issues or totally incoherent messages, not my best day).
 
@CatPlusPlus ugh, join the club
 
Xeo
1:21 PM
You're a cat, we expect you to walk over the keyboard, not produce good grammar
 
@TonyTheTiger Yeah, but I went to sleep 1:30, kinda drunk and after being awake for 30 or so hours; and then got up at 6.
 
@Xeo hahah, I'm also part of the Felidea family :)
@CatPlusPlus oh
 
sbi
@TonyTheTiger Yeah, except that you're in the weight class that would break the keyboard if you walked across it.
@CatPlusPlus 6am or 6pm?
 
@sbi I have stainless steel keyboards to walk over :p
 
@sbi AM. I tend to use 24h clock. :P
 
Xeo
1:25 PM
room topic changed to Lounge<C++>: Which should really be called Lounge<boost::any>
 
@Xeo that would confuse people
 
Xeo
@TonyTheTiger I think the boost comittee sees that as their job
 
sbi
@CatPlusPlus Sure, that's why you said 1:30am, right?
 
where cats walk over the keyboard, meow
 
@sbi No I didn't, I said 1:30.
 
sbi
1:27 PM
@CatPlusPlus Ah, I see. Sorry. Brainfart of mine.
 
@sbi I was wondering what you were saying?!!
what is the average air velocity of an unladen swallow?
 
An European or African one?
 
@CatPlusPlus African
 
interesting question
the hell am I going to attach a CD to a physical sheet of paper?
 
@DeadMG for what?
 
coursework
what's irritating is that I think I'm quite close, and if I hadn't been sick overnight, it could be finished :(
 
what's the coursework about?
 
2:09 PM
shunting in prolog
 
is the shunting algorithm or what is it?
 
yeah, implement shunting algorithm
 
not the simplest of algorithms
 
Is anyone here familiar with the graphs theory and all?
 
it's not that complex, if I weren't dealing with PROLOG
 
2:16 PM
@Sword22 I'm somewhat familiar with it
@DeadMG oh ok
 
the language is impossible to control
really control, like, this is a VALUE, this is a RETURN, this is a REFERENCE, that kind of thing
 
hmmm
oh
 
@TonyTheTiger it's simple stuff, I have to implement a depth first algorithm for a graph
 
@Sword22 I'd say there is plenty of examples on the web
and what kind of graph is it?
is it a specific tree or just any acyclic graph or what?
 
what I do is "marking" the actual edge (don't know the term in english) then throw a for that will call recursivily on the connected edges the function if they aren't marked yet
(sorry for spagetthi english, it's not simple to explain D: )
 
2:21 PM
that's what mark-and-sweep GC's do
 
my issue is : is this really a depth first search? shouldn't I mark the connected edges first then throw the recursion?
 
Depth-first search (DFS) is an algorithm for traversing or searching a tree, tree structure, or graph. One starts at the root (selecting some node as the root in the graph case) and explores as far as possible along each branch before backtracking. Formal definition Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hasn't finished exploring. In a no...
that article explains it quite well
you should be able to figure it out from there
 
Hi
 
heh prolog
 
Has anybody here worked with C++\CLI
 
2:24 PM
hi
 
(because, if there is a cycle the first edge I will display will not necessarily be very far from the first edge)
(it's oriented graph stuff)
 
oh fuck
 
if you can store your tree in an array, you can iterate over the array without recursing
 
I don't actually have a disk drive
or a disk, or anything like that, for that matter
 
we had some math prof who showed us how to implement various calculus rules in prolog.. but didn't look at prolog for years
 
2:25 PM
the trick is to store the tree such that iterating goes along the tree the way you want to traverse it
 
@RonaldLandheerCieslak I'm using adjacant lists
 
k
that doesn't preclude storing the vertices in an array, though: it'll just help you to find adjacent vertices and, thus, the edges
 
Here's a picture that illustrate my issue : img716.imageshack.us/img716/9448/depthfirst.png
 
the edge between D and B, is that bidirectional, or did you forget an arrowhead?
 
Oh yeah I did forgot it's B->D (though it doesn't change the result I guess)
 
2:34 PM
well, if your graph is acyclic, you can assign a weight to each vertex, sort them by weight and simply go from the heaviest vertex to the least heavy
 
@RonaldLandheerCieslak but that looks like a cyclic graph to me in the picture, unless that's just supposed to show the path it travels...
 
if a vertex with no-one pointing to it has weight 1 and you get the cumulative weight of everyone pointing at you (so B has weight 2, D 3, E 4 and C 6) you get CEDBA
 
Yeah right, but I still don't know if there will be a cycle or not.
I already coded the version that gives CEDBA
and I'm wondering if the correct answer shouldn't be EDBCA
 
what do your edges model? dependencies?
 
Has anybody here worked with C++\CLI
 
2:38 PM
C is at the end of A->C but also at the end of A->B->D->E->C, so I would expect C to be the deepest node
 
distances
@RonaldLandheerCieslak that was also my guess, but I did like this because it was easier
 
if they're distances, you want to visit the "furthest" vertex first?
 
In fact I will use this to check if there are cycles in the graph after by using a temporary vector the will change if I try to access to an edges that has already been marked. But then in oriented graphs I'm not sure of the result.
that* the
 
ok - that's a different question from what I thought you were looking for
 
I think I found something
 
2:45 PM
in that case, you don't really care about whether C gets visited first or not - you just need to know that you can't get back from C to A even if there's more than one path from A to C..
@TonyTheTiger FWIW, I meant acyclic in the sense that you can't travel around the graph full circle - you can't go from A back to A without swimming up an edge
 
Ok, found what I need to do.
As my graphs are relatively smalls I do the Depth first CEDBA on all edges while memorizing the fact that an edge has been visited a second time but refused because it was marked. Then if the starting edge is revisited that means there is a cycle.
 
cycles don't necessarily go back to the starting edge
 
Yeah but I will check all edges that way
 
if your edges are all small, why not just create a stack of edges and, as you go through the graph, declare a cycle if you come upon an edge that's already on your stack? you can do that without recursion and without marking the edges (both of which are handled by having a stack of edges)
push an edge onto the stack when you go down it, pop it when you go back up
or push the vertex - that would probably be easier
so s/stack of edges/stack of vertices/g
your stack can just be an array large enough to hold all the vertices, and an index into the array to tell you where to push next
looking up a vertex in the stack is O(n), but if your graphs are small, that is probably not a problem
 
3:02 PM
Yeah but would that work? If A->B and A->C and B->C are my only vertex wouldn't C indicate that I have a cycle while that isn't true?
 
nope: that's why you pop when you swim back up an edge
My old dependency tracker at depends.sourceforge.net does this
pretty old though - I may need to update the links (I just say it still referred to the developer's corner, which hasn't been there for a few years now)
 
0
Q: Overloading T and vector<T>

StackedCrookedI have a static method ToString(T) and an overload ToString(vector<T>). This works for normal use, but not with boost bind. See my example code: #include <boost/bind.hpp> #include <boost/function.hpp> #include <boost/lexical_cast.hpp> #include <iostream> #include &l...

^ Any takers? :D
 
@StackedCrooked try giving bind the prototype of what you're binding
 
@RonaldLandheerCieslak When you say "go through the graph" do you mean Depth First or what?
 
yes
but the detection of cycles is done when assigning weights
so it's actually done as the graph is constructed
 
3:09 PM
@RonaldLandheerCieslak You mean like this: boost::bind<std::string()>(...) ?
 
@StackedCrooked where your comment says the compiler gives you an error, does it give candidates?
those candidates will tell you what to tell bind
 
@RonaldLandheerCieslak I appended the compiler errors to the post. The error message goes like this: cannot convert <something very long> to int
No candidates.
 
@Stacked, I'd try using a static_cast to choose the overload you want.
static_cast<std::string (MetaData::*)(std::vector<int> const&)>(&ToString), ...
 
Als
@sbi: Thanks for the answer, though there seems to be a blur line between overriding MUST need virtual or not
 
@AProgrammer I'm going home soon, I'll give a try later!
 
Als
3:20 PM
@sbi: I am going to +1 your answer but I am still not clear if that second scenario qualify's to be overriding or its just a form of hiding
@sbi: that +1 is for taking out the time to putting out your thinking in that answer.
@AProgrammer: Thanks for your detailed answer as well...
 
@Als Overriding is used only for virtual functions in the standard with one of the use in italic thus making it the definition of overriding for the purpose of the standard.
I'm pretty sure that one of itemized books (Meyers or Sutter) has an item on the subject.
 
Als
@AProgrammer: That is the understanding I had and hence my statement "Virtual keyword allows you to override functions not overload them." which I dont think is wrong given the context.
 
 
1 hour later…
4:29 PM
Does anyone know of a way to automatically deduce the `T` argument here?

    template< template<class> class Container, class T>
    void Test(const Container<T> & inContainer)
    {
    }

    int main()
    {
        std::vector<int> vec;
        Test(vec);
    }
 
Xeo
@StackedCrooked Uhm, T is automatically deduced
Your problem is another one - a std::vector takes 2 template arguments :) the type and the allocator, see this answer of mine.
 
@Xeo Is doesn't compile:
main.cpp:17: error: no matching function for call to 'Test(std::vector<int, std::allocator<int> >&)'
 
Xeo
>std::vector<int, std::allocator<int> >
>template<class> class Container
see the difference? :P
 
Aha
That sucks.
@Xeo Indeed I can make it work like this:

    template< template<class, class> class Container, class T, class U>
    void Test(const Container<T, U> & inContainer)
    {
    }

    int main()
    {
        std::vector<int> vec;
        Test(vec);
    }
@Xeo Aha, traits.
 
Xeo
Hm.. to make a move-aware container work with movable-only types, you only need a move constructor, right? so you could make the normal copy ctor private.. but MSVC2010's std::vector doesn't seem to accept this
 
sbi
4:37 PM
@Als As usual, I can't quote the standard. :( For almost twenty years this is what I've thought the three terms to mean, though, and I'd be very surprised if that's wrong. (Not that that's never happened...)
 
@Xeo: Look at std::unique_ptr, you can easily make vectors of them
I had no problem with movable types
what you should remember is that there's no automatically generated move constructor
 
Xeo
@DeadMG I know, but my class has one, and it works as long as the copy ctor is public, even though it uses the rvalue ref overloads of the vector functions
 
that is a bug with RVO and NRVO
basically, there's a hierarchy
you ellide if you can, then you move, then you copy
but MSVC10 is bugged, and if it tries to ellide, then it tries to ellide a copy and not a move
 
Xeo
@DeadMG Meh, seems like it. It did say something about an elided copy in the error messages... Thanks
 
even if it's actually elliding a move
I'm fairly sure there is a workaround
but I don't recall what it is
 
Xeo
4:55 PM
@DeadMG Well, it works to make it public but not implement it (only declare)
 
yeah
it'll be fixed
 
5:26 PM
anybody ever used QThreadPool to cycle over limited number of runnables ? through QThreadPool::globalInstance()->start(this) ?
Here I've 16 QRunnables at the beginning I am setMaxThreadCount(16) start()ing all of them. and at the end of run() I am doing QThreadPool::globalInstance()->start(this)
after some time Its just invoking only one thread..... and forgetting about all others
why ?
anybody there ?
knockknock ?
 
well, we're not really interested in answering full questions in the chat
 
Ya I Know. But I'd prefer a warm discussion over the chat
in this regard
 
well, that's pretty much tough
I hate answering full questions in the chat, and it seems like everyone else is asleep
besides, I've never actually seen any meaningful Qt discussion in here, come to think of it
 
Well have there been any use of any kind of thread pool to cycle over limited number of threads ?
I meant repeating the limited number of threads ?
 
5:41 PM
normally, the point of a thread pool is that it manages the threads for you
you just say do this work X times and it does it
 
6:11 PM
@DeadMG and if done well, it'll do it better than you'd do manually :-)
 
6:24 PM
right
time to start creating me some UI codings
 
sbi
7:14 PM
@NeelBasu I've used the .NET thread pool from C'. Would that count? :)
@DeadMG And I'm not asleep!
 
lol
 
sbi
@DeadMG And I'm thankful for that. I somehow have a strong aversion against frameworks that attempt to do anything for you. I much prefer those small 3x4 LEGO bricks, which you can use for pretty much anything.
@DeadMG Is that you, @Johannes? Are you in there somewhere?
 
lol
 
@sbi Qt is a language about as different from C++ than C++/CLI is.
 
sbi
@AProgrammer I see.
 
7:17 PM
frameworks should do for you what would be tedious/repetitive/difficult for you to do for yourself
and no more
 
sbi
@DeadMG So they should write my programs?
 
well, I doubt that's within the realms of a feasible implementation
 
sbi
Anyway, I've promised one of my sons that we're gonna watch a movie tonight, so I'd better stop talking.
 
@DeadMG The problem of frameworks is that they assume that all the code was written to interact with them. They consider themselves as the center of the world.
5
 
sbi
I might show up later.
 
7:19 PM
that sounds to me like a problem of a specific framework
rather than a framework in general
 
sbi
@AProgrammer Right. I see you share my aversion.
 
Libraries on the other hand tend to assume that they will be used in unknown situations.
 
sbi
@DeadMG Isn't that the definition of "framework"?
 
@DeadMG It is a definition of framework :-)
@sbi, we are really inline on this subject.
 
sbi
@AProgrammer See, I said so!
 
7:21 PM
nah
 
sbi
@AProgrammer That's how the world should be: everyone should always agree with me. :)
 
that's the definition of a problem.
 
sbi
@DeadMG Yeah, frameworks are a problem. We said so already.
 
Frameworks are a bundle of problems.
 
sbi
Anyway, I really gotta watch that movie now. See you!
 
7:22 PM
Hello everyone
is there any netbeans 7 user ?
 
in the C++ chatroom? good luck with that
 
@DeadMG why ?
 
@OmeidHerat Well... I've about as much considerations for IDE than for framework. For about the same reasons.
 
well
likely because NetBeans is not a particularly renowned C++ ide
 
netbean is developed in java but the IDE itself is for java,php,C/C++,python and some other
 
7:24 PM
technically, I'm sure it supports C++
but I've never actually come across anyone who uses it for that
most people use either GCC or Visual Studio
 
@AProgrammer fair enough, its something to care about
I got netbeans 7 and the linker setting is missing
how wired is weird is that !
or maybe it not where its suppose to be ! which is weired anyways !
 
7:36 PM
ur fail
:D
 
folks, what's up
 
@Nils no sh!t i
hahah
any used openglut under cygwin ?
 
@JohannesSchaublitb not much
u?
 
8:08 PM
C++: You're doing it wrong => stackoverflow.com/questions/5916040/…
 
 
1 hour later…
sbi
9:10 PM
@JohannesSchaublitb Usually it's the direction pointing away from the closest center of gravity.
 
depends on your definition of center of gravity
my keyboard has a gravitational field
 
sbi
@DeadMG Is that why you're typing such heavy stuff?
 
yes#
my shadow weighs 42 pounds
 
9:34 PM
has anybody noticed that the Wine version of iexplore is even worse than the one that comes with Windows?
 
yo hello
 
hi
@TonyTheTiger you think you can make more sense of this question:
http://stackoverflow.com/questions/5917251/how-to-include-a-function-in-my-main-code
 
sbi
9:52 PM
@RonaldLandheerCieslak No wining here, please.
 
@sbi I wasn't wining, I was asking whether you can make more sense of the question. The asker seems a bit confused
 
sbi
@RonaldLandheerCieslak In the message mine refers to, you were discussing IE and Wine. I took the liberty to coin the term "wining" for discussing Wine. You took the liberty to fail to see which message mine referred to plus the liberty to overlook my irony. Seems I'm one behind you then. :)
 
Fair enough
 
sbi
@RonaldLandheerCieslak How's it fair if you're taking more liberties with me than I'm with you?
 
From my point of view, how can that not be fair?
:-)
 
sbi
10:01 PM
@RonaldLandheerCieslak And here I thought fairness is when it's not dependent from the POV?
 
That makes two liberties, then -- but it's a free country
Assuming wherever you are is as free as where I am, or more so
 
sbi
The big trouble with dumb bastards is that they are too dumb to believe there is such a thing as being smart.
Would you believe that this was twittered two minutes after your statement above? :)
 
So? Nice quote...
 
sbi
@RonaldLandheerCieslak Basically, anything from Vonnegut is great.
 
The one before that wasn't so great, IMNSHO
 
sbi
10:09 PM
I tell you, we are here on Earth to fart around, and don't let anybody tell you different.
I like it. But then, so far I liked everything from Vonnegut.
 
I don't particularly like farting around - I have enough gas as is
but I particularly don't like people telling me something and then saying "don't let anybody tell you different"
 
sbi
@RonaldLandheerCieslak Well, if you have too much gas, farting might be what you should like? Or the other way 'round: If you don't like farting, maybe that explains your excessive gas problem? :)
 
:)
Ah - shuttle launch is postponed again
 
sbi
@RonaldLandheerCieslak While I can sympathize with the sentiment, you need to make an exception for old men telling you so, and Vonnegut is so old, that he's already dead. (So it goes.) You can't get much older than that.
 
dead people (elderly or otherwise) sometimes have more influence that live ones - the ones that are still alive can usually be reasoned with (up to a point) and can correct out-of-context quotes
you know the old "he would have wanted it that way" that everybody knows goes along the lines of the one saying it, not the "he" being mentioned
 
sbi
10:19 PM
How embarrassing to be human.
 
@sbi lol
@RonaldLandheerCieslak voted to close
@sbi how was your day?
 
anyone know a good duplicate of stackoverflow.com/questions/5917678/…? there must be one
 
10:42 PM
I never remember duplicates
 
sbi
@FredNurk I don't, but if someone would overhaul this a bit, it would make a pretty good FAQ entry, I guess. (And before you ask: I won't do it.)
@TonyTheTiger Long.
 
@sbi: But you're Uncle FAQ!
 
sbi
@DeadMG Yeah, so I'm the one telling you what to do, not the one who does it!
 
lol
good luck with that
I have a small quantity of work to do and an incredible skill at procrastination
 
sbi
The worst that happened today was that old man in front of the hardware store, who threatened to fall down while he tried to drag his bicycle across the parking space. I basically caught him when his legs gave in, dragged him into a corner, where someone fetched him a chair, and some woman checked his pulse (120) and called an ambulance. He was quite confused. (His bicycle was still locked.) I packed his meager shopping results into a bag I had with me, and made sure the guys in the ambulance took it with them.
 
10:49 PM
that really makes my day look quite cheery in comparison
 
sbi
Yeah. And you know what I can't get over? The whole time he didn't realize that he had a collapse. He just couldn't understand why he couldn't get on his bicycle, and what was happening to him, and tried to talk us out of calling the ambulance while I supported him under both armpits because his legs were so wobbly, he'd just slide down without it.
 
@sbi I'm wary of adding this to [c++-faq] without some more time on it
 
sbi
@FredNurk Yeah, it would need a little overhaul, but not much.
 
@FredNurk: Feel free to add said time
by the way, have I mentioned that I have absolutely no idea how to make pictures
 
@sbi: actually, I find inline backticks less readable because of SO's style choices and purposefully avoid them in my own content
any code expression long enough to really need them I break out into a code block
 
11:00 PM
I usually insert them utterly randomly
 
sbi
@FredNurk Ah, sorry. I disagree, but it's yours, so just go and rollback these changes.
@DeadMG Just like your remarks? :)
 
lol
 
I appreciate that you were helping :)
 
sbi
@FredNurk Ouch. That hurt. :)
 
hmm?
 
sbi
11:07 PM
Mhmm. I though <pre> used to work in questions/answer on SO, but it seems it doesn't. What's an alternative when you don't want highlighting? ?
 
it does work that way, I just edited a question and changed that to a proper code block
got a link? something really strange going on?
possibly the previewer, which follows subtly different rules from the final parser, is screwing up?
 
sbi
@FredNurk It's what I say to the smallest of my kids, if she secretly wants to prepare the table in the morning, and when I get up and come in to the kitchen it's a mess.
 
hah, I see
 
sbi
@FredNurk I'm trying to format the output in the question you linked to.
 
ok
what do you guys think of my website design
it's only for university so
 
11:19 PM
any cinder developers here?
.. or graphics programming in general?
 
I do some DirectX
 
sbi
25 mins ago, by DeadMG
by the way, have I mentioned that I have absolutely no idea how to make pictures
 
@sbi the < it has in "<-- Why?" probably needs escaped if you use <pre>
 
@sbi: I made it in Paint
 
@DeadMG looks pretty good for a school project
 
11:23 PM
yeah
fortunately, I only have to mock it, not build it
 
stupid stupid jerk argh you you you .... silly! i love mocking.
cinder? anyone?
unity?
somethin?
 
I've used DirectX
no cinder or unity
 
just asking about basic 101 fundamental optimization tricks
 
go for it, I know those
sorry- did you have a specific code path or problem that needs optimizing?
what are you rendering, tec
 
sbi
@FredNurk Yep, that did the trick! Thanks for suggesting it.
 
11:27 PM
@sbi: while you're still in the 5 minute window, want to remove the indentation inside <pre>? :P
 
sbi
@FredNurk Good catch! Done.
Well, I guess I'd better go to bed now. It's 1:30am here, and those kids will be awake at in less than 7hrs.
 
I might have kids someday
but hanging out here, you really make me want to wait quite a bit longer ;)
 
lol
the thing is, I definitely want kids, and I don't want to be too old to run around with them
but if it's too soon, I won't be able to support them financially
 
would the c++ world be better or worse if the standard just defined "method" as "non-static member function" (so you'd have virtual and non-virtual methods) and "attribute" as "non-static data member"?
obviously the last doesn't gel with the new 0x "attributes"
 

« first day (202 days earlier)      last day (4760 days later) »