« first day (358 days earlier)      last day (4606 days later) » 

12:34 AM
I have error in eclipse on linux , when try to compile a c++ program , it says " binary not found " what does that mean ?
 
12:54 AM
if i had to guess, i'd say it's not configured to use your compiler
btw, that's the very first result when i google eclipse "binary not found" :P
 
I tried everything online :) but dint seem like working
@chao
 
1:13 AM
then you need to be a bit more specific :)
can you build from the command line?
 
yes I solved that prob , I checked the settings and I selected for gdb debugger and it solved ..i guess it did ..I am new to eclipse
so finding it difficult
@chao but then I am trying to link a external library to the project
how do i set the path for include , I do not see options in project properties
 
i don't use eclipse for c++...don't even have the CDT installed :P so, can't help you much there
 
@chao no problem thank you
 
 
3 hours later…
4:35 AM
Lol does anyone know their way around eclipse? I only assk here because java chat is like empty.
 
<emptyness>
Also, no (not me at least).
 
Eclipse is being gay to me :(
 
5:10 AM
eclipse seems to be being pretty gay in general lately
see above
 
@cHao Do you know why it would give me:
BUILD FAILED
C:\Users\cc\Desktop\aima-core\build.xml:43: java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main : Unsupported major.minor version 51.0
even though my JDK is updated and so is my eclipse?
 
51.0?
that sounds odd
what's that the version number of?
 
I'm not sure. I am executing AIMA (collection of search algorithims etc)
executing i mean building/compiling
 
ahh...the version number's actually not that odd, it seems. but what's the jvm version?
 
Oh ffs
jvm?
 
5:23 AM
hey anyone know where I would ask a question about ftp problems, ping, traceroute, stuff like that. It seems like it wouldn't be the right question to ask at stackoverflow
 
The JDK i have is literally the one i grabbed from the website today
 
what version, though? there's different ones available
 
jdk1.7.0
@ButtleButkus No idea, sorry mate
 
@ButtleButkus stuff like that generally goes on serverfault or superuser
serverfault preferred, imo
 
@oorosco Serverfault will delete because it's not a purely business application, although perhaps I could disguise it as such.
 
5:27 AM
But yeah, i was having problems earlier about apparantly having improper JDK, googled the issue and ended up adding the jdk's tool.jar into ANTS, that gave me the above error. But i removed that and then it gave me an option to compile via JUNIT, and now it is testing..
 
it shouldn't matter whether it's business related or not. if it deals with networks and such, it should be on topic there
 
@cHao Ok thanks I'll try. They deleted my last one because I mentioned Windows 7 Home premium. I'll pretend it's enterprise. thanks, bye.
 
@oorosco sounds like something's using the wrong jvm. class file version 51.0, corresponds to some java version higher than 1.6
 
Jvm... is not the jdk? I'm not sure how to update it
 
@ButtleButkus if it's really a home thing, you might try superuser. but they tend to know more about computers than networks
the jvm is part of the jdk. or can be. but it's also available separately
and eclipse iirc can be configured to use any jvm that's installed
 
5:31 AM
iirc? Is that in windows>preference..
 
"iirc" == if i remember correctly
it's wherever you change preferences in eclipse. :P hold on, lemme start it up
 
@cHao When i go into prefernces it says "Jre 6"
 
that means it doesn't know about the 1.7 jre yet
try adding its location there, and then set it as the default
 
Kk did so.
Damn the 2095 "problems" it's solving atm. I'm too scared to exit it though lol
 
lol
 
 
2 hours later…
7:27 AM
@cHao U there?
Does neone have an ideas for 2 hueristics for a grid problem where you try getting from a to b while avoiding obstacles?
 
8:19 AM
morning fellas
 
hi.
 
hello, how are you?
 
user457812
I wonder if I'm is considered an insomniac if I just refuse to sleep instead of cannot sleep
 
user457812
Probably not.
 
user457812
Being unable to edit that "is" out is driving me insane.
 
8:27 AM
afaik insomnia is the inability to sleep, so I don't think refusal to sleep comes under that header
lol
 
user457812
That's good.
 
user457812
It means the only problem I have is lack of self-control.
 
10:31 AM
hi
knock knock
ok everyone is asleep...
 
11:03 AM
I'm awake
somewhat
 
@TonyTheLion Hello Liger , how're you?
 
@MrAnubis I'm good, you?
my throat hurts horrendously though
not sure what's going with me
 
good here too , thanks
@TonyTheLion ohh , must be some bone stucked in your throat from last hunt :P
 
lol, I wish :P
 
lol
I wonder whether it's legal if you take all your answer you gave on SO and release them again under a different license?
 
11:19 AM
template<typename T, typename... Args>
struct count<T, Args...> {
static const int value = 1 + count<Args...>::value;
};
 
and whether you have to remove the comments on your answer and the question that you answered, because they were not authored by you?
 
i was wondering why we need specialization here of count?
 
@MrAnubis needs a base case..
 
why not directly
template<typename T, typename... args>
struct count{
static int value= 1+ count<args...>::value;
};
 
where will it stop?
 
11:20 AM
@JohannesSchaublitb i already have base case
 
wait, that is not the primary template for that partial specialization is it?
 
no
 
you cannot specialize a <typename T, typename ...args> by <T, Args...> for a partial specialization
 
@JohannesSchaublitb pardon me i meant partial specialization
 
the primary template implicitly "specializes" itself by <T, Args...>.
you lost me lol
 
11:23 AM
what i mean why we must partial specialize the count ( very first code) , why can't we directly write something like second code
template<typename T, typename... args>
struct count{
static int value= 1+ count<args...>::value;
};
 
ah nice
@JohannesSchaublitb does copy initialization always do a cast ?
for example T a = u
 
@LewsTherin lol you should be in queue for asking question
 
does u get converted to T(u)
@MrAnubis oops my bad
:)
lol
@MrAnubis do you know if it always does a conversion?
 
@LewsTherin i didn't even understand your question
 
@LewsTherin What is the type of u?
 
11:29 AM
@FredOverflow the same type as T
 
Then why would there be a conversion if the types are the same?!?
 
yes very same i want to ask
 
That's what a text said
 
what text
 
I read it wrong, it said if u is of some other type.... but assigning 1 to a wouldn't work
T u = 1 doesn't convert 1 to be of type T
 
11:31 AM
Sure it does: double u = 1;
 
What if T is user defined
 
Then it needs a non-explicit constructor that takes an int.
 
oh you need a constructor?
 
T::T(int); is not a copy constructor.
 
yeah...so a constructor that takes an int..and the conversion happens implicitly then?
 
11:33 AM
If the constructor is not declared as explicit, then yes.
 
ok I think I understand ty
Using explicit means I have to do it myself?
 
Using explicit means T u(1); works, but T u = 1; doesn't.
 
conversion also takes place when u's type is derived of T
 
@MrAnubis Even without a constructor?
 
@MrAnubis You mean derived of T, right?
 
11:35 AM
yes :)
 
you are right it works
isn't that type slicing
 
object slicing
 
yes
 
@FredOverflow there is a difference?
 
Well, inheritance and value semantics don't go together well. We've known that for ages.
@LewsTherin There is no such thing as "type slicing".
 
11:37 AM
oh ok, I used it because someone said so
 
When it comes to C++, you should mistrust almost everything you read and hear.
Because most of the C++ "knowledge" out there is complete rubbish.
 
So how can I trust what you are saying is right? :)
 
You can't trust me per se. Look at my profile, look at my questions, look at my answers. Then decide for yourself.
 
@LewsTherin you shouldn't have said so lol
 
@MrAnubis I'm sure @FredOverflow knows I'm only kidding...
I hope
@FredOverflow yeah looks pretty authentic :P
 
11:39 AM
@FredOverflow is one of the wizards of c++
 
@LewsTherin Why? Anyone can be mistaken. I'm no expection.
 
Btw I got an upvote, finally
1
A: php isset or greater than zero error

Lews TherinThen I think you need && not || and if the argument in isset is "" it is considered as set. So initialize that value to null initially or use another check

 
@LewsTherin i did:)
 
@MrAnubis you gave me the upvote?
 
@LewsTherin just kidding , you deserve that vote
 
11:41 AM
@FredOverflow yeah maybe...but you know your stuff
 
you deserve too much @LewsTherin
 
@MrAnubis lol ty :P but it was an easy question
@MrAnubis lol too much? Avada kedavra
 
@LewsTherin you nasty slut!! <- a HP spell
lol
 
@quasiverse obvious misspell
 
lol I really need a spell checker for Firefox
suggestions?
 
11:45 AM
@MrAnubis lol, becomes a nasty slut...sleeps with any girl...
 
@LewsTherin I see what you did there. :)
 
@quasiverse xD caught me ;) ha damn
@FredOverflow use chrome
 
@MrAnubis installed thx
@LewsTherin Why?
 
@FredOverflow you don't have to install anything :P
 
11:47 AM
What's so good about Chrome in your opinion? I never had it installed yet.
 
I prefer firefox, but Chrome just starts up quicker
 
@FredOverflow What's wrong with the built-in one?
 
that's why I use it more than ff
 
If you start a browser more than once, you're doing it wrong anyway.
 
@CatPlusPlus there is one? Funny never works for me
 
11:48 AM
@FredOverflow uninstall that add-on , install this one addons.mozilla.org/en-US/firefox/addon/…
 
It's been there since 1.5 or something.
 
@CatPlusPlus ah ok excellent.
 
You just need to have right dictionaries.
 
@CatPlusPlus There is one? Didn't seem to be active...
 
11:49 AM
I have to go now...brb later thanks
 
RMB on a text area > Check Spelling
 
what's rmb
 
But I need the squiggly lines.
 
It's a toggle.
For the squiggly lines.
 
where
 
11:50 AM
Where I said.
 
Global toggle is in Options > Advanced > Browsing > Check spelling as I type
 
If Firefox has a built-in spell checker, why are there still external ones?
 
Where?
 
what?
@MrAnubis Isn't that the exact same one?!?
 
11:57 AM
@FredOverflow nah different one ( since it works with latest release also i think )
 
Addons on AMO are either dictionaries or some additional functionality to the built-in one.
The linked one is a dictionary.
 
I see
 
@FredOverflow was wondering why'd you require dictionary or spell checker?
 
Because English is not my native language?
 
aah , i thought you're from US
 
11:59 AM
@MrAnubis But 5.0.1 is exactly what I have installed according to Firefox...
@MrAnubis What made you think so?
 
@FredOverflow your rock star hair style :P
@LewsTherin anexanamon!!
 
@MrAnubis Germans can be rock stars, too ;)
 
@FredOverflow they are very lovely peoples , i know a guy named Rob , we chat frequently on IRC
 
I'm pretty sure the Germans are only one people ;)
 
lol , i need tense corrector
 
12:05 PM
has nothing to do with tense ;)
Do you chat in English or German?
 
@FredOverflow i am natively Nepali , Hindi
English
 
how to win at math
 
112 centimeters != 112 centi meters though :(
 
yea it was a joke :P
 
Just because 2 + 2 = 4 you can't generalise to x+x = 4!
 
12:14 PM
What is the point of delegates?
 
Having some fun:
 
@KianMayne To abstract over methods.
 
@LucDanton what did you render this with?
 
@TonyTheLion Irrlicht
 
sounds German
 
12:20 PM
That's because it is :p
 
Wasn't there an Irrlicht in "Die unendliche Geschichte" (The neverending story)?
 
Some people involved in Irrlicht (IIRC) have also developed Irrklang, try to guess what's the library for.
 
parsing C++, like clang? Sound would be too obvious.
 
@FredOverflow Been too long since I've read that :( In fact I don't think I've read it per se, my father read it to me!
@FredOverflow It predated Clang (well possibly not).
 
@LucDanton It's been about a year for me, maybe two.
 
12:23 PM
Anyway, it's an audio library.
 
of course :)
 
@FredOverflow I see
 
Nobody wants to upboat me today, I give up.
 
12:25 PM
@KianMayne Do you know what a function pointer is? Delegates are like member function pointers where the object is already bound (I think).
 
@FredOverflow Yeah, but it just seems like making your code messier for no reason
 
What.
 
It's useful for callbacks and stuff.
> Any method that matches the delegate's signature, which consists of the return type and parameters, can be assigned to the delegate. This makes is possible to programmatically change method calls, and also plug new code into existing classes. As long as you know the delegate's signature, you can assign your own delegated method.
> This ability to refer to a method as a parameter makes delegates ideal for defining callback methods. For example, a sort algorithm could be passed a reference to the method that compares two objects. Separating the comparison code allows the algorithm to be written in a more general way.
 
What does the syntax/code look like? delegate<ret, arg> d = object.method; ?
 
public delegate string MyStringDelegate(string input);
This is like a typedef.
 
12:32 PM
Reusing method declaration syntax seems like a bad idea.
Then MyStringDelegate d = object.method; ?
 
Well, there were no genericts in C#1, so...
MyStringDelegate dlgtUpper = new MyStringDelegate(mc.UpperFunction);
(code stolen from Wikipedia)
 
Verbosy.
 
Again, C# 1
 
So is there a superior alternative these days? Lambdas? Or do both of those coexist?
 
Lambdas are internally rewritten as delegates if I'm not mistaken. (Which I might be, C# is not my strong suit.)
> A lambda expression is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types.
 
12:46 PM
boost::variant is not move-aware :(
 
poor fellow
Maybe they are already working on it?
 
@LucDanton the proper generalization of 2 + 2 = 4 is 2 op 2 = 4, for any basic fundamental arithmetic operation op (like +, *, ^, ^^, ^^^ and so on), i.e. "2 and 2 is 4" always.
 
For some meaning of 'proper', sure.
 
@AlfPSteinbach 2 and 2 is 0 in C++ ;)
 
@FredOverflow Seems like it, I'll wait for the next release.
 
12:55 PM
@LucDanton boost::variant is "either T or U", right?
 
@FredOverflow Nope, it's variadic, so more like a tagged union.
boost::variant<T, U, V, W, X, Y, Z>
 
cool
How do I find out which member is currently "active"?
 
You can do variant.which() for getting a 0-based index but that's not the recommended interface.
The recommended interface is boost::apply_visitor(visitor, variant); where visitor is a polymorphic functor.
Then the correct overload of the visitor is picked depending on what type is active in the variant.
 
A polymorphic functor is a class with multiple operator() overloads, I suppose?
 
@FredOverflow Yes (disregarding surrogates).
 
12:59 PM
What's a surrogate? (besides a movie with Bruce Willis)
 
If you have struct functor { typedef ret (*signature)(int); operator signature() const; };, then functor f; f(42); is valid.
I.e. conversion operators to reference or pointer types to functions participate in overload resolution, too.
 
@FredOverflow no, it's 2, I think?
or 1, perhaps?
 
@AlfPSteinbach Of course, it's 2. I was confusing and with xor :)
@AlfPSteinbach Oh no wait, it's actually true :)
Now I was confusing and with bitand :)
 
@FredOverflow Johannes to the rescue!
@CatPlusPlus Upboated.
 
ouch, if i was eating anything it would have killed me, johannes' "decay an array to a pointer" in that link. hah. i think i would kill any person who actually wrote that in code.
 
1:10 PM
@AlfPSteinbach I won't lie, I don't have qualms about (ab)using unary + in my own code.
 
what is it with them silly moderators closing the most popular questions always?
@LucDanton yeah, but on array?
anyway, if i want promotion i write x+0, not +x
more clear, imho
 
How do you feel about using + on function names?
 
should be criminal offense, i.e. punishable
 
Time to grep my codebase!
Good news! Not a single unary +.
 
@LucDanton What does that even do?
 
1:13 PM
I do have a +success() but that's in a unit test.
@KianMayne The traditional (ab)use is to turn an lvalue into an rvalue and/or forcing a conversion.
 
how does that parse? i'd think +(success()), but could be (+success)() ?
oh it must be the former, ok
 
@KianMayne The answer (by Johannes) that prompted Alf's reaction.
@AlfPSteinbach Well I assumed the formed and the test succeed. Good enough for me!
 
Right
 
More seriously the type returned by success() implicitly converts to int and without that conversion the test would have caught it, so yes, the former.
 
1:29 PM
is there any cross-platform way to get the names of all files in a directory?
ideally into a string array.
?
 
Assuming C++, I recommend Boost.Filesystem.
 
Thanks.
@LucDanton by the way, does the boost filesystem library need to be built?
or is it header only?
like other boost libs
 
It's not header only.
 
oh no. its a pain to build anything using minGW ...
 
1:45 PM
@AlfPSteinbach Postfix operators always have higher precedence than prefix operators, I think.
 
@FredOverflow then ++x++ should not compile (which would be nice)
 
@AlfPSteinbach That's right, it does not compile for built-in types, because it is parsed as ++(x++).
 
> error: lvalue required as increment operand
Using an int.
 
oh one has to write x++ + ++x
oh well
 
Or (++x)++ which is fine in C++11, by the way.
 
1:54 PM
user image
4
 
@AlfPSteinbach That describes my morning (and early afternoon)!
'Moving an invariant' sounds wrong, that wouldn't make it terribly invariant.
 
2:12 PM
I seriously don't get this
I need to update the UI based on the progress of my updater function
 
use a progress bar?
 
But I can't and don't want to do that from the updater function
@AlfPSteinbach How
 
he he, moose glazed with honey and oven-baked potatoes:
@KianMayne add some event support
 
@AlfPSteinbach Got a link?
 
like, hey, now dinner is ready!
 
2:14 PM
Because I can't find anything
 
Boost.Signals.
 
as the simplest, use a function pointer
that the calling code can supply
 
Or that. Except std::function not a function pointer.
 
why not keep it simple
when u want a toaster, do you want an ordinary simple one, or the one that weights a ton and has 6 mainframe computers?
 
std::function is simpler than pointers (what if you need a member callback?).
 
2:17 PM
that's what the void* argument is for
he he
 
void* arguments can go to hell.
 
you just want my dinner
 
What's simple about C-style stateful callbacks when compared to std::function exactly?
 
I've figured it out
I need to write a wrapper
One that deals with all the Async stuff and fires events
 
Er, what wrapper?
 

« first day (358 days earlier)      last day (4606 days later) »