« first day (240 days earlier)      last day (4706 days later) » 

12:01 AM
@FredOverflow Apart from being wrong, unenforced, and unenforceable, it's not too bad...
 
sbi
12:12 AM
Have anyone of you something to add to this:
10
Q: What could increase the upvotes on old answers I am getting?

sbiLooking at my rep tab it feels like I am getting a lot of upvotes for older answers recently. In the last month I have only given about a dozen answers, which earned barely above 30 upvotes, yet my rep has increased by more than 1000. I don't feel like there was a comparable rep reap on old answe...

 
Xeo
12:36 AM
You know, I like the "related questions" list on this question.
 
1:10 AM
hello, any one still here?
 
No. We've all gone.
 
Also. I lie.
 
I've entered the channel to plead my ignorance
I really don't understand git/github
I know that's not really the topic of the channel, but I was wondeing sof some kind soul could help.
 
Git is excellent. As is GitHub. From which SCM have you come?
 
1:13 AM
An Aeon ago, in the 90's I used perforce for a while
 
Ah, okay. I've not used it.
 
I believe I understand the concepts, but I can't seem to get anything loaded to github.
I've gone over Pro Git, I think I'm missing something basic
 
Git from the bottom up, by John Wiegley makes for interesting reading.
So you have a local Git repo that you want to add to GitHub?
 
I have a repository on Github, but I can't seem to load anything to it
I don't have a local one that I know of
this is the repository on github: github.com/aperrien/DroidBones
 
Ok.
 
1:17 AM
I'm trying to push a few python and xml files there
 
I usually create a repo locally and push to GitHub.
 
I did the following steps:
cd DroidBones
git init
 
Yup.
 
touch README
git add README
 
Nice.
 
1:21 AM
git commit -m 'first commit'
git remote add origin git@github.com:aperrien/DroidBones.git
 
Sounds like you're on track :-)
 
git push -u origin master
Craps out on the last point saying : Permission Denied (publickey)
 
I guessed that was what you were going to say next.
Have you set up SSH Authentication?
 
I have tried adding my public key, but github responds with: Oops! The key has already been taken.
I briefly tried the setup in PyCharm, but all it did was set up another repository, and I can't add anything to that one either
 
Does GitHub think you have another account?
 
1:30 AM
Not that I know of
 
When I go to github.com/account/ssh , I can see my SSH Public Key. Can you?
 
I see:
Add another public key

Title

Key

Add key or cancel

Our RSA fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
Sorry about that
I don't see a key, just a button to add one
 
That'll be why you're not authenticating.
I'm guessing "Add another public key" is not giving you any joy?
 
No... Keeps comming back with "That key is already taken"
Even though no key is visible
 
Did you try with a different key?
 
1:37 AM
Hm
 
Yeah. Time to create a new key.
 
I can try that, give me a few to make a new pair
Hey, does it matter if it's a ssh1 or ssh2 key?
 
I don't think there's any difference between the two protocols, key-wise.
 
just did a ssh1 key
Pasted it in, and I got another "Oops" message :(
 
Hmmm, there's something wrong going on. I'd say contact them.
 
1:45 AM
Will Do... Glad to know I've not lost my mind yet
I was thinking I was doing things right, but not being familiar, I wasn't sure
 
The same Oops message?
I've just added a new key to my account succesfully.
 
Same oops message
"Oops! The key has already been taken. "
 
Most odd.
Use ssh -i to try with your new key.
 
2:06 AM
One min, let me try with my mac
Actually, I have to go
Gotta pick up my sister from the airport.
Thanks for the help, though. I'll try when I get back
 
Good luck
 
2:38 AM
Hi all
I am using eclipse ide and for learning perl. The debugger complains like - "Error Install PadWalker Perl module to see local variables". I couldn't find much info on googling and any one ran into the same issue. I know this is not the chat room to ask Perl questions but there isn't any chat room for perl :(
It's problem with the debugger showing it's inability to show the variables. However, the program runs fine
 
I guess it needs to be within P5PATH.
But I have never used Eclipse as an IDE.
 
I am using Mac OS X
 
What was the trick for moving template specializations into cpp files?
header:
template<class T, class Bla = OtherClass<T>> class TemplatedClass
{
bool someFunction(const T&) { return true; }
};
template<> TemplatedClass<int>::someFunction(const int&);

cpp:
template<> TemplatedClass<int>::someFunction(const int&) { return false; }

complains about unresolved symbols during linking.
But if I provide the body in both header and cpp, it complains about function already having a body.
 
@Eugene template<> TemplatedClass<int>; ?
 
If you instantiate the template in the .cpp file, it should work.
template class TemplatedClass<int>;
 
Xeo
2:48 AM
You need to, somewhere, explicitly instantiate the template.
 
@LucDanton Yeah, I want the function specialized on int, abd default on other types
 
You can't specialize the member without specializing the whole template
i.e. template<> class TemplatedClass<int> has to be defined (in the header)
 
@LucDanton Ah, that sucks. But if I set the body in the header in my example, it works.
I only have trouble moving it into cpp.
 
Also template<> TemplatedClass<int> is not even valid; it should be e.g. template<> TemplatedClass<int, OtherClass<int>>
 
This works though, and it puzzles me:

template<class T, class Bla = OtherClass<T>> class TemplatedClass
{
bool someFunction(const T&) { return true; }
};
template<> TemplatedClass<int>::someFunction(const int&) { return false; }
Is that another case of MSVC "helping"?
 
2:55 AM
@Eugene I don't have much experience with MSVC, sorry
Weirder yet: your last definition is not even valid
there's no return type
 
@LucDanton Oh, sorry, there is return type of course.
Lost in translation :)
 
Fixing that makes GCC accept your snippet
 
Last one?
Can you move it into cpp now?
So that specialization is declared in header but defined in cpp
 
You can't declare a member outside of a type definition though
So you do need the specialization
 
Of the whole class?
 
3:00 AM
Alternatively you could make your member definition inline and put it in the header
Not sure what that means
 
Hm, let me restate the problem: I want to specialize only one function from the class. The function is not an independent template. When I do this:
template<> bool TemplatedClass<int>::someFunction(const int&) { return false; }
in the header, it works.

But when I do this:
header:
template<> bool TemplatedClass<int>::someFunction(const int&);
cpp:
template<> bool TemplatedClass<int>::someFunction(const int&) { return false; }

it doesn't link.
(and when I say it works, I mean it actually gets executed for the correct type and stuff)
 
That much was clear, yes
 
@Eugene You can fully but not partially specialize the member function, and as for the header stuff - just keep it in the header?
 
@KhaledNassar Yep, I'm fully specializing it, so I guess that's why it works in header. I wonder now why I can't move it into separate compilation unit though...
I'm sure I did that with free templated functions before...
 
@Eugene I can't help with that, as far as I can remember I've been always defining templated classes in their headers.
 
3:13 AM
I think the problem is how to declare (but not define) a member.
Heh it works for GCC
Declare in the header, define somewhere else
Two TU's, they link
Result at runtime is the expected one
 
Heh, maybe that's my compiler then...
 
Confirmed for Intel Composer too.
It works
 
3:29 AM
ohai!
 
Tried out my actual example in msvc 2010 (instead of original code), and it doesn't work, even if I get rid of second template argument...
 
 
1 hour later…
4:32 AM
user image
4
 
 
5 hours later…
9:24 AM
morning
 
Morning.
 
Morning
Although it's noon here. :')
 
morning FOLKS
 
 
9:55 AM
> I want metaprogramming, it is so incredibly convenient, but it has to be fully in-line with Go's strengths. We can leave half-assed crap for PHP.
I have this "half-baked" feeling about the range-based for loop.
 
Als
@FredOverflow: I guess(I see an update in the Inbox but can't see from whom) you had left me a comment on the returning an array from function question, that Q was cleaned up by the SO housekeeping before I could see it. If it was your comment can you please leave me the same as an comment over here.
 
@Als I said something like
> Returning a pointer to an automatic array has always been a) possible and b) undefined behavior :)
 
10:13 AM
If you are new here, please read the newbie hints. Thank you.
9
Someone please pin that.
 
10:35 AM
Thanks.
 
Oh, this is kind of cool, never knew SO had this feature.
 
What feature?
 
Realtime chat.
 
Oh that.
 
11:20 AM
Ugh, seems like my stomach is now intolerant to coffee :(
 
oh no
 
-5
Q: Compare two text files for similar meanings

thilina cI need to write a program which compare two text files for there meanings. I just don't need to check the length and all. I need to see whether the two files have the same meaning. Please help and I need to do this in C#

Wow, some people really think you can do everything with the right incantantions.
2
 
11:49 AM
ok
I have an exam today and I thought it was tomorrow
done nowhere near enough revision :(
 
That sounds bad.
 
yeah
fortunately, I'm a very quick study and this is kinda my home turf, so
 
What is it? Graphics?
 
no, Legal and Ethical Issues in Computing
I'm not a very Ethical person, I like to sneer at such subjective things, but I did do two years of law before coming to University
 
Wow, I didn't even think there were courses dealing with that.
 
12:00 PM
@MartinhoFernandes Exactly what I was thinking
 
it's a module, not a course
covers things like copyright and privacy laws
 
12:12 PM
sides
I'm a quick study with a good memory, it'll be fine
 
oh good
 
you know
this reminds me of how much I hate Law ;p
 
12:42 PM
^^
I much prefer exceptions, pointers, and template metaprogramming
this stuff is buzzword bingo
 
1:17 PM
ohh hello all
i want my milk look like this foam too: dailymail.co.uk/news/article-478041/…
 
0
A: Doesn't null check before delete/free optimize out the call to the function ?

DeadMG I don't believe that all those programmers were unaware of the fact that delete 0; is safe. Well, they were. That's pretty much it. It's a fact that delete or free on null is perfectly safe. If they weren't unaware of it, then they wouldn't have wasted time checking for it. So, I won...

this question is so pathetic
I mean, the OP is desperately trying to rationalize something because he doesn't want to admit that people were wrong
although I find myself doing a bit of a Neil here
 
cpx
@JohannesSchaublitb I know how, thats how i do mine, with some clouted cream ;)
 
:P
Just found about this weird thing: http://t.co/7g6oIyf . Now when I slurp my next cappuccino, I'll think about dead fish!
haha
 
1:41 PM
lol @ ILikeBigInterfacesAndICannotLie
 
2:11 PM
1 hour ago, by DeadMG
I'm a quick study with a good memory, it'll be fine
@DeadMG What happened to that confidence?
 
it got closer to the exam in question
and I looked more at the exam content
it's "Be considerate", in ten thousand words of buzzword bingo
 
2:27 PM
Having a simple problem trying to call a derived class's function via a base type pointer.. I have declared the member function virtual but no luck. What may be wrong?
..the base class definition has an implementation for the function but in the hierarchy, a derived class between the base and the leaf class does not have this function implemented. Is that a problem?
I wonder if it might have something to do with the fact that the function has different parameters in the leaf..
 
@72con That's probably it. If you change the arguments, it is no longer the same function.
 
I sort of figured that out ;)
 
Xeo
3:33 PM
> error: cannot bind 'expression<expr_val<int>, expr_val<int>, plus>' lvalue to 'expression<expr_val<int>, expr_val<int>, plus>&&'
eh?
did I miss something or why won't that work with reference collapsing?
> warning C4503: 'expr_val<T>' : decorated name length exceeded, name was truncated
-___-
so much for expression templates with MSVC...
 
Xeo
> The decorated name was longer than the compiler limit (4096), and was truncated.
Holy.. xD
 
oh my, I thought they'd raised that limit years ago
since you so easily get long names when messing with templates
 
Hehe, 4k-long names. Glad those go away when compiled. That is, unless you're compiling a DLL.
But I'm coming to the conclusion those don't play very nicely with C++. Am I right?
Especially if you expose template stuff.
 
Xeo
> fatal error C1045: compiler limit : linkage specifications nested too deeply
...
 
3:48 PM
@Xeo meta-pwned
 
Xeo
this... sucks..
int main(){
    auto expr = catcher()->*1 + 2 * 3;
    int val = expr.exec();
    std::cout << val << "\n";
    auto expr2 = expr == 7;
    std::cout << expr2.exec();
}
that's my main. :(
 
code compression - now to avoid long names!!!
are you reaching the limit. is your name over 9000!
do all your base belong to them
do you want to tell the compiler, "This is Sparta!"
Then, get the city well ready.... and be prepared for madness, because we're going to kick all those names in.
 
Xeo
Stupid compiler. :(
I have an infinite recursion somewhere in my expressions...
GNAH FUCK IT
plays Terraria
 
4:15 PM
I think #define byname(...) [&]{ return __VA_ARGS__; } is a quick and easy way to simulate by-name passing of arguments. only downside is to have to use param() in the callee to receive the value
hm, and the return type of the lambda would be by-value, which seems sucky
 
4:32 PM
I also don't see how that would work for more than one
[&] { return x, y, z; } = not exactly passing one parameter
 
ahh it works fine!
perhaps it would be better if the template argument for byname specified the result type of .get() ? so people can overload on it just like for normal parameters
 
5:39 PM
@JohannesSchaublitb what does this line typedef typename std::result_of<T()>::type result_type; do?
 
5:59 PM
@Xaade Why do you create a type when you could just use T?
 
 
3 hours later…
sbi
8:59 PM
6 hours ago, by Martinho Fernandes
@DeadMG What happened to that confidence?
6 hours ago, by DeadMG
it got closer to the exam in question
I like that. :)
 
lol
 
 
3 hours later…
11:48 PM
Anybody here with moderator priviliges (10000 rep)?
I need a favor... I did not know that after you make 10 edits, your post becomes part of the "community wiki". So here I am fixing typos one character or word at a time, and before I know it, the best post I ever made (and possibly ever will) isn't mine anymore. If any moderator reading this would be kind enough to fix this, I would really appreciate it.
189
A: C++0x introduces a standardized memory model. What does it mean? And how is it going to affect C++ programming?

NemoFirst, you have to learn to think like a Language Lawyer. The C++ specification does not make reference to any particular compiler, operating system, or CPU. It makes reference to an abstract machine that is a generalization of actual systems. In the Language Lawyer world, the job of the progr...

 

« first day (240 days earlier)      last day (4706 days later) »