« first day (510 days earlier)      last day (4424 days later) » 

6:00 PM
But, but..
 
but what? can't dev with a dev tool that's broken
 
VS10 doesn't support nested lambdas?
Hmm.
 
it does, but not nice ones
the name lookups are broken
 
What are "nice ones"?
1
Q: Can't find XCode c++ sperm() function

creativetechnologistI'm using C++ and XCode to create a cmd line app to save file permissions, however I can't get the sperm() method to work, my includes and the piece of code in question are below ... // My includes ... #include <iostream> #include <stdio.h> #include <sys/types.h> #include <d...

 
well
ones where you don't have to dick around manually making the names available
 
6:03 PM
lol @ Oli's comment.
 
heh, yes
I upvoted it
 
sperm() hmmm wonder what that does???
 
set permissions, i would think
"google man sperm" he he
 
@TonyTheLion It is mentioned in the stat man page, but it doesn't have one man page for itself.
 
ah ok
 
6:07 PM
I now have a set of search terms that produces relevant content about the sperm() function!
Mwhahahahaha.
 
lol
 
^ The eye-phone
 
huh
turns out I already had a backup of VS2010
how convenient
 
@DeadMG Now the question is, will that work?
 
6:13 PM
I think so
 
will it play crysis?
 
yes, my GPU can play Crysis
most new GPUs can, you know
 
it was more of a joke ^^
 
@ScottW sure they can, just not well
 
ARGH NOW VS2010 WON'T INSTALL EITHER
the fuck is wrong with your shit, Microsoft
 
6:17 PM
That sucks.
 
4 mins ago, by R. Martinho Fernandes
@DeadMG Now the question is, will that work?
Guess the answer is no.
 
hi guys, I've a question about overloaded operator. I know that I cant overload operator= globaly because it's already exist in every user-defined type(class). so making it global will make the compiler confused which one he should use. but what about others like () [] -> , why I cant overload them globaly
 
Mar 6 at 10:09, by R. Martinho Fernandes
Compilers are female.
 
@AlexDan I've never heard a good reason besides "that would be really freaking confusing, and you shouldn't do it anway"
 
and it doesn't even give an error message
just goes "AMAGAD FAIL"
 
6:19 PM
@AlexDan if I recall, at least some of those were more or less arbitrary decisions
 
lol
 
14
Q: Rationale of enforcing some operators to be members

Armen TsirunyanThere are 4 operators in C++ which can be overloaded but cannot be overloaded as freestanding (aka nonmember, standalone) functions. These operators are: operator = operator () operator -> operator [] This thread explains perfectly well the rationale behind prohibiting operator = to be a ...

 
of course
when I "uninstalled" the vNext Dev Preview, it hardly uninstalled shit
 
Didn't you install the Beta?
The Dev Preview doesn't have ranged-for.
 
no
oh well
 
6:22 PM
Did MS improve their uninstallers? When I uninstalled MSVC 2003 and all included libraries off my old machine, that was a four hour progress bar.
 
what I'm more concerned about is the fact that I'm sitting here manually cleaning out my list of Microsoft shit left over
 
I remember when I installed VS2008 beta 2, I had to jump through hoops to uninstall that and install VS2008 RTM.
 
plus, of course, VS2010 is too stupid to install all components except the one that isn't working
it's some irrelevant component I don't need and then everything else, or nothing
 
@AlexDan "Bjarne Stroustrup's rationale was, as I recall from earlier debates on the subject, to retain some sanity in the language, i.e. having at least some things you could rely on no matter how much Someone Else has screwed up by defining non-member operators for existing classes."
"Bjarne Stroustrup said it appears that the apparent inconsistencies of the rules are no more than a case of frozen historical accident. He notes that "It looks worse now than it was then because our rules for lvalues and references have changed since the overloading rules were formulated. I tried to look into this issue again a couple of years ago, but ran out of time before producing a complete proposal.""
 
So, "because".
Do 3-vectors with addition and cross product make a ring?
 
6:29 PM
thanks @MooingDuck I guess I'll consider them just as conventions
 
Hmm, looks so, as long as cross product is associative. Is it?
 
which one is associative an which one is commutative?
but regardless, I think that cross product is both
 
Commutative is x op y = y op x, which is not true for cross product (u x v = - (v x u)).
 
yeah, I was just thinking about that minus
 
Associative is (x op y) op z = x op (y op z)
Wiki says no. :(
 
6:31 PM
@MooingDuck hey i remember writing that. i think that now, with more experience, i would not ask bjarne about SO questions. there are just too many questions, like they're asked without restraint
 
right
I uninstalled all the shit left over
my Programs list includes not one single Microsoft program
 
Woot.
What a rebel.
 
now if this doesn't work, I might have to reinstall Windows. Again.
 
Ah, screw it, I can live without using +.
<+> it is.
 
6:38 PM
ARGH, NO
::(((
time to reinstall Windows again
 
Try linux first?
 
@Pubby Linux doesn't run VS10.
 
@RMartinhoFernandes Windows doesn't seem to either ;)
 
lol
 
Who'd want to run VS10.
 
6:44 PM
Take a guess.
 
@Pubby I'm still not a fan of linux, too hard to learn to use
 
Wut.
You must've last used Linux a decade ago or so.
 
@CatPlusPlus I only started using it about two years ago. But I've never found an IDE as good as visual studio, and then Ubuntu changed it's whole UI and I can't figure out how to do anything
 
sudo apt-get install gnome-shell
 
Don't generalise Linux to mean Ubuntu.
2
 
6:46 PM
and you got the classic gnome again
 
Chocolate.
 
@CatPlusPlus alright, fine. Ubuntu is too hard to learn. I've heard most other big distributions are harder.
 
Ah, too late.
 
Strawberry is fine, too, I guess.
 
Ubuntu is not hard to learn.
 
6:47 PM
VS is 10 times harder
 
@StackedCrooked I still haven't figured out how to open a command line or view my files
 
As for IDEs, meh.
I don't really like any of them.
Eclipse and Qt Creator are decent, though.
 
@Pubby Click the green button to debug-run, or Debug->Step into to step through. I know of no linux IDE that can do that as easy
 
@MooingDuck for a command line you need to look for "bash" or "terminal"'
 
Wait, what?
 
6:48 PM
Ha, element-wise multiplication is associative and distributive over addition! Got my ring, yay.
 
@MooingDuck Code blocks and eclipse probably do it
 
@TonyTheLion I only have a menu on the left of the screen that I can find, and those options aren't on it
 
What IDE has harder "run" step?
 
@MooingDuck Whose ass did that come from?
 
@MooingDuck meh
 
6:49 PM
The Terminal application can be found in the Applications menu. If you use Unity then you can also press the Windows start button followed by typing "Terminal" + ENTER in the keyboard.
 
@StackedCrooked I'll have to try that, never thought to press the start button
 
Anyway, vim > IDEs.
 
@CatPlusPlus that doesn't have a run button and can't step into
 
6:52 PM
You know what sucks about vim? The fucking keybindings don't work. It's hardcoded in many places.
 
Debuggers are for people writing buggy code.
 
I recently realized that the reason emacs works better in combination with gcc and gdb than vim is because the former three are all written by the same person.
 
@Pubby What's hardcoded?
 
@Pubby Pretty much nothing is hardcoded.
:help :map
 
Well then why do I keep running into trouble with it?
Like I can't remap text objects
 
6:53 PM
@StackedCrooked is Unity the name of the UI that Ubuntu changed to?
 
Some plugins make some assumptions, but those can be edited.
 
@Pubby Have you considered the possibility that perhaps you're doing something wrong?
@MooingDuck Yep.
 
@StackedCrooked Yeah, I'm trying to fix Vim.
 
@Pubby :onoremap foo aw
Now dfoo deletes a word. Works here.
 
@RMartinhoFernandes But why doesn't remapping a and w work?
 
6:56 PM
Because the object is aw.
:help text-objects
 
:)
 
Why would you rebind them, though? I find the defaults rather intuitive.
 
Not using qwerty.
 
Okay, so you're crazy.
 
6:59 PM
Remapping is unwise if you plan to use Vim on more than one computer.
 
@StackedCrooked I think the intention is to use the same muscle memory independently of the keyboard.
 
I used azery in the passed and found that Vim works a little better on azerty than qwerty. Nobody agrees with me though.
@RMartinhoFernandes I see.
 
@RMartinhoFernandes Na, it's a full remap. I figured might as well improve on the layout while I can
 
You use Colemak, right?
 
I had that problem in the past. Now I bought a US keyboard to use at home so that it would the same as the one I use at work. Having to switch keyboard layouts sucks very hard. (I think it caused permanent damage to my neurons..)
 
7:01 PM
That one shows some sanity: no Caps Lock key.
@StackedCrooked "past"
I wouldn't mention it, but you wrote it twice, so maybe you aren't aware.
 
Dammit.
It's not that I don't know how to spell English words.
 
It's just I don't always feel like it.
 
Like, you know..
I taught my colleage about smart pointers.
Now he stores stack-allocated objects in them.
 
"Taught".
(Now I suppose it's a French-ism)
 
You should have edit permissions.
 
7:07 PM
Let's make a meta proposal! "Please give global chat edit permissions to the robot. It's either that, or a rep-bookie. Pick one."
 
Let's call it "community chatwiki".
 
0
Q: Please give global chat edit permissions to the robot

StackedCrookedLittle spelling mistakes happen all to frequently. Instead of having him point out our mistakes and hope that we are quick enough to edit them in time he should be able to do the job himself.

 
gah, already fixed your little spelling mistake
 
Yep, good thing I reread.
 
Closed in 5...4...
 
7:12 PM
@StackedCrooked Erm.
 
@RMartinhoFernandes He already got +4
 
in fact, a fifth of his rep is from that question
 
Needs the Friday tag.
 
7:15 PM
> Oops! Your edit couldn't be submitted because:
users with less than 500 reputation can't create new tags. The tag 'friday' is new. Try using an existing tag instead.
 
Iceland must be a nice country.
 
> @CatPlusPlus: Suggesting that the non-const references are better is wrong. This is purely subjective and a personal preference... there is no right or wrong. – Samaursa 1 min ago
In reply to "non-const refs > pointers".
facepaw
There sure are a lot of pointer lovers, aren't there.
 
A cat making a facepaw doesn't really convey the message.
 
What about a lion?
 
7:20 PM
That's better.
I was imagining it stroking the paw against the side of its head.
 
0
Q: Template or function overload for generic argument

ADCoonI have a function which takes three arguments void replace(const string, const string, string*) ; My problem is the second argument which I'd like to rewrite so it can be either a string or a Path object (from the Boost Filesystem library, but really any object that can be treated as a string ...

Comments. :.
 
FWIW, Stroustrup also prefers pointers to non-const references
 
@CollinHockey do you have a link?
 
And I can understand the point, if a function plans on modifying something, it's nice to see it where it's called.
 
Pointers are only valid where nullptr is valid.
They're not valid for always-out arguments.
 
7:27 PM
Easy. Don't write sneaky functions like get_the_frobnikle(x) that change the arguments.
 
@Abyx: Let me dig it up
 
Returning the thing might be better, but still.
 
@CatPlusPlus I don't agree, pointers are also valid where we want mutable thing
 
Er, what?
T& is mutable.
 
T& x is mutable T but not x
 
We're talking about function arguments.
 
@Abyx: www2.research.att.com/~bs/bs_faq2.html#call-by-reference - "I do want to change the argument, should I use a pointer or should I use a reference? I don't know a strong logical reason. If passing ``not an object'' (e.g. a null pointer) is acceptable, using a pointer makes sense. My personal style is to use a pointer when I want to modify an object because in some contexts that makes it easier to spot that a modification is possible."
 
@RMartinhoFernandes mutable object, but not mutable reference itself
 
When do you rebind function arguments?
It's silly.
Please don't tell me "because then I don't have to create a new variable".
 
why "rebind"? it's just a variable
@CatPlusPlus see, I don't need to tell it
 
7:32 PM
void please_set_the_frobnickle(int& x) {
    x = 17;
}
int y = 0;
please_set_the_frobnickle(y);
assert(y == 17);
 
Changing the referee of a reference would be rebinding.
 
@CatPlusPlus ah... and changing T* x is repointing?
it's just terminology
 
And making the interface of a function vulnerable to nullptr where it shouldn't be passed, just so you can do argument = something_else; inside its body, is not even silly, but just stupid.
 
how do you guys feel about multiple variable returning? Think Matlab.
 
It's cool.
 
7:34 PM
@Abyx But that only works if you have a pointer to begin with. You pass that pointer by reference to change it.
The alternative would be **... I rest my case.
 
Even some language support for tuples is nice, but native support for multiple return values is better.
 
How about initializer list syntax for that: {r, theta} = cart2pol(x,y)
 
we need another language...
 
@rubenvb coords<pol> a = ...; coords<cart> b = a; TADA!
 
@rubenvb it's not a syntax problem, it's C++ standardization problem, we will have what we have for now in next 10 years
 
7:37 PM
@RMartinhoFernandes that's a lot of code you hide there.
 
(IOW, that's a bad example. The two values make more sense together)
@rubenvb Hiding is good.
 
What's wrong with my idea?
 
Both x, y and r, theta make more sense together in the same object.
 
not always
 
It's not a good use case for multiple returns.
 
7:39 PM
numerical activity on either benefits from r and theta being in their own array/"joined memory block"
 
You lost me now.
 
{number, str} = parse_int(str); - a bit better example - any function where you have a state, and don't want to make an object
 
f(coords<pol>) is clearly better than f(double, double).
 
Why would parse_int return a string?
 
hmm, maybe I'm thinking too much matlab
 
7:42 PM
@CatPlusPlus in C++ it's int parse_int(const char*& str); - it returns chars after that int
 
@Abyx we're not talking C++
 
What a weird and ugly type you've got there.
 
I like {ok, number} = parse_int(str);
 
@RMartinhoFernandes you can throw exception, "ok" gives no information what actually failed
 
and variables should be initializable in that statement IMHO.
 
7:44 PM
@Abyx Ah, you can make that error if you want. The idea is that when you are actually expecting parse failures, throwing an exception forces the user to try-catch.
 
@rubenvb I think it can be emulated with a variadic class template and helper function
 
@MooingDuck Erm, std::tuple?
 
@MooingDuck I was really asking more generally, for a non-C++ language.
 
He's creating a language, not asking for C++ implementation.
 
@RMartinhoFernandes yes, I'm currently playing with a tuple, but it might not have what I need
 
7:47 PM
std::tuple<T1, T2, T3> frob();
T1 a; T2 b; T3 c;
std::tie(a, b, c) = frob();
That's C++.
 
@rubenvb I can't think of a use case. A struct would be better for everything I htink of
@CatPlusPlus std::tie? Don't know of that
@CatPlusPlus but a google search shows that to be just like what I just coded, but without the bugs
 
It yields a tuple of references.
 
@MooingDuck Pretty much any situation where you have output parameters. Sometimes the values make no sense in a struct. The standard has at least one example: std::align is freaking confusing with output params.
 
@MooingDuck it's all from boost.tuple
 
std::tie(aligned, remaining_space) = std::align(ptr, space, align) would be much better.
 
7:50 PM
k, got it :/ ideone.com/O8wtH
 
@MooingDuck That's std::tie.
 
sans actual math in the cart2pol function
@RMartinhoFernandes yeah. I reinvented the wheel, but worse. At least this time I didn't know it was already invented, usually I do.
 
Multiple return values is more like returning a tuple that will be pulled apart immediately, so in effect skipping the pure utility "tuple"...
 
regarding to coordinates, tuples are not type-safe: same (double, double) for both coordinate systems
 
Pure tuples are useful, too.
 
7:52 PM
@rubenvb yeah, I think it does make more sense to have multiple returns over a one-time-use struct
 
@CatPlusPlus Yeah, I can imagine, but often they're an intermediate step.
 
What is the method of creating profiling graphs?
 
With... a profiler?
 

« first day (510 days earlier)      last day (4424 days later) »