« first day (1403 days earlier)      last day (3537 days later) » 

12:00 PM
"Hello sir, I've heard you were having trouble with your Singleton, how may I assist?"
 
"May I kindly offer you knife stab in the eye?"
 
@FredOverflow I took an extra gulp of air
 
@Rapptz it was a party appropriate to the size of the release... i.e. quite small
 
UGSDFJHGSFH
MY EYES I HATE YOU
 
12:01 PM
> This allows you to quickly retag questions that need it, which you'll find especially useful combined with the list of new tags on the stats page.
What a silly way to validate this.
 
lol did you really add the C++14 tag
it was garbage free too
 
:D
yeah just messing
can we nuke the question now?
 
I voted to close it before I edited it.
 
12:03 PM
right, so, I'm asking people who haven't vtc yet
 
So I was watching Lost the other night. Will the numbers ever be explained? The whole "Push The Button every 108 minutes" thing is just so unbelievably stupid. Why would you ever design such a system?
 
@FredOverflow lol, explained.
 
.gitattributes, .gitignore, VenkatSol.rar
 
Impressive repository all around actually.
 
12:07 PM
@FredOverflow Indeed.
@FredOverflow That broke my suspension of disbelief.
 
Hi Everyone
I ask an underling how he's getting on with this bug on his first day back; I can see from Skype's "writing" icon that he's been writing his reply for about 11 minutes so far. Typical.
he types with two fingers
our manager is a moron
 
We call that peck typing.
 
@LightnessRacesinOrbit what?
 
@Rapptz lol sounds about right
@BenjaminGruenbaum ikr
he's still typing
 
12:13 PM
How do you hire a programmer who does peck typing?
 
ooh, there we go. three sentences; actually quite impressed it wasn't just "its going ok"
 
I didn't even know that was possible.
 
@Rapptz by having management who doesn't bother to do any practical tests or observations whatsoever, then not giving a flying fuck for the ensuing four years
this situation is a constant thorn in my side
 
Wow, and he's been working there for four years?
Truly impressive.
 
12:17 PM
Whoa. I got an anonymous downvote.
 
turns out he's not done a thing on this bug he's supposed to be fixing
 
Been so long.
 
fathing about with some other nonsense
 
Aw.
+69
-1
:(
 
I’m not super fond of η for return :s And it provides µ for join, great. There’s an option to disable those specifically though.
 
12:18 PM
@LightnessRacesinOrbit who is doing the interviewing?
 
@BenjaminGruenbaum in this case, a Software Development Manager who is long gone
 
@R.MartinhoFernandes Off the top of my head, they explained why that little toy plane was so important to Kate. Not that I cared about that at all, but hey... :)
 
@Rapptz How can you program for four years and still hunt and peck?
@LucDanton Tis what we used in class when doing proofs.
 
In the programs?
 
Kinda reminds me of this.
 
12:20 PM
Well, we were doing proofs about programs.
 
@R.MartinhoFernandes He's been programming for 30 years, ostensibly. He came with a long CV and probably gets paid more than I do, accordingly.
 
And the programs used that.
 
@LightnessRacesinOrbit lol :D
 
Lucky for me this is my last week of work for a while
 
Blind typing takes like... a week to pick up?
 
sbi
12:22 PM
0
Q: How to get a meaningful function signature from anything callable

sbiConsider such a beast: template<typename Func> void register_function(Func func) { // type-erase Func and pass it on to some other function } Assume that this can be passed anything callable. I know hot to get at the function's signature if Func is a plain function type. Given that func c...

Any takers?
 
You just use a software that teaches you to blind type and you kind of memorise where the keys are and from that point it's just muscle memory... why would anyone not do that if it's their profession?
 
now my questions take 5 minutes to garner a response
fuck me
 
@sbi oh you and your C++03
 
Xeo
@sbi Impossible in the general case
 
> this is strictly C++03
:/
 
sbi
12:23 PM
@Abyx It's not mine at all. In fact, I rather hate it. But so far we're stuck with it.
 
@R.MartinhoFernandes just found this:
> According to the DHARMA Orientation video in the Lost Experience, the numbers represent the factors of the Valenzetti Equation, which claims to accurately predict when humanity will be extinguished. A part of the plot is based on certain characters using the numbers to constitute a code that must be entered in a terminal.
> The writers originally introduced the numbers solely to engineer a meeting between two characters, Hurley and Rousseau, not because they had a plan for them. Due to viewer feedback, however, they were eventually implemented into a greater part of the story.
 
Xeo
> I know hot
 
@sbi func probably won't be std::function<F> if this is strictly C++03 :P
 
Xeo
@milleniumbug std::tr1::function, then
 
sbi
@Xeo I don't think so. I can do this for plain functions, and I could do this for std::function. I suppose with clever use of enable_if one could find out if there's a function object and crack its operator(). I just don't know how to differentiate between these three cases and I am hazy on the implementation on any except #1.
@Xeo Yep. @milleniumbug
 
12:25 PM
@sbi Oh god, not you.
@sbi No, you can't.
 
Xeo
@sbi struct X{ template<class T> void operator()(T); };
 
sbi
@R.MartinhoFernandes I could get @melak to ask this, if that's better for you.
@R.MartinhoFernandes I can't what?
 
Xeo
I think he meant "not you too"
 
Why do you need to know that information?
 
@melak is probably aware of how this topic is seen here.
 
sbi
12:27 PM
@Xeo What's your argument?
 
i.e. the arguments
 
Xeo
@sbi Go ahead and tell me the call signature of an object of type X.
 
sbi
@Rapptz Because we need to pass a member function template through an pure virtual function. Hence type erasure.
 
@sbi You can't what you said you can do for plain functions. Unless you mean something else with plain functions.
 
Xeo
Sorry, but this is impossible in the general case. You should know know, at registration site, what kinds of arguments you're going to pass to the callback. — Xeo 3 mins ago
Second sentence
 
sbi
12:28 PM
@Xeo It's void(T). I am not sure what your argument is.
 
Xeo
You have to have some kind of information about the final arguments
@sbi What's T?
 
@sbi No, it's not.
It's an unbounded number of signatures.
It's void(int) and it's void(double).
 
sbi
@Xeo Some type. Shrug. This is all templates. If I can do T obj = T() I am fine with any T.
 
Xeo
sigh
 
@sbi But it's not some type. It's all types.
 
12:29 PM
@sbi You can't type-erase "some type".
 
sbi
@Puppy template<typename T> type_erasure : public some_abstract_base { virtual void f() { T obj = T(); yaddayadda(obj); } };
What am I missing?
 
@sbi Which must be instantiated for some known T. It cannot be instantiated for any T.
 
@sbi You have to provide T. You can't deduce it.
 
sbi
Ah, now I know what you mean.
No, this isn't an issue here. The function has zero, one, or two arguments. It will be a real function, not a function template. It's something one could slap a std::[tr1::]function<> around.
 
If it's a non-overloaded function just use partial specialisation on Return(*)(Arg0), Return(*)(Arg0, Arg1), etc.
@sbi Anything can be slapped a std::[tr1::]function<> around.
Note how std::[tr1::]function<> does no deduction and leaves it to the user to provide the exact signature they desire to keep after erasing the type.
 
sbi
12:34 PM
@R.MartinhoFernandes Yeah. As I said, I know that. What do I do if I have an std::function, though? How do I get at the arguments? And what about a functor?
 
I'm resuming the build queue
 
@sbi You don't.
 
sbi
@R.MartinhoFernandes I don't what?
 
@sbi You can partially specialize on the template arguments.
 
If you haven't added agent restrictions like I told you to, your builds will probably fail!
 
sbi
12:36 PM
@Puppy You mean, I can have overloads for plain functions, std::function<F>, and for function objects?
 
@sbi Sure.
 
Do non-static member functions have linkage? I don’t recall. (I’m not concerned about visibility or the like though.)
 
sbi
@Puppy Mhmm. Ok, let's assume we eliminate the function object overload by requiring the user to provide an std::function. Then that leaves two overloads I know how to deal with.
Right?
 
yep
 
sbi
The problem is that in template<typename F> void f(std::function<F> f), F is a non-deducible context, isn't it?
 
12:40 PM
no.
 
Xeo
You know what's strange to me? How exactly is that registered function supposed to be called?
 
@Xeo Always the same.
 
sbi
@Xeo Through the type erasure magic.
 
Magic is always the correct answer
 
Xeo
@sbi That doesn't answer the question. What exactly do you pass as arguments?
 
sbi
12:41 PM
@Xeo I get a void* from a C API and need to cast this to the correct type to call the registered function with.
 
@sbi The only problem with that is that it forbids implicit conversions (so you must construct a std::function explicitly)
 
Xeo
@sbi Ah, that sounds more sensible.
 
For some definition of "sensible" :P
 
sbi
@R.MartinhoFernandes You mean from a bind() expression, right?
 
@sbi For example, yes.
 
Xeo
12:41 PM
@R.MartinhoFernandes heh, yeah
 
Can you use boost?
 
sbi
@Rapptz 1.52
 
Argh Inoreader's DNS went down
 
good enough
 
@R.MartinhoFernandes No.
 
12:42 PM
@LucDanton What, bind expressions make std::function?
 
unspecified type
 
Also note that by constructing a std::function explicitly you're back to telling the argument types yourself instead of leaving it all to deduction.
 
Xeo
@LucDanton "forbids implicit conversion from bind() expression", though I guess you could also read @sbi's answer the other way
 
oh
 
sbi
@R.MartinhoFernandes Yeah, I think we can live with that. (Or is there some official [template] type which std::bind() returns?) But is there anything else I miss that need casting?
 
Xeo
12:43 PM
asking about "constructing std::function explicitly"
 
@R.MartinhoFernandes Okay then yes, it forbids. No, you can’t construct explicitly from bind.
 
Xeo
@sbi There's not, it's implementation defined
 
sbi
@R.MartinhoFernandes Ah, damn.
Oh, so I'm back to square one. Sigh.
 
Xeo
@sbi No?
 
> If you restrict it to only having one signature, then you can take the address of operator() and then get the arguments from the member function pointer type using regular template specialization.
 
Xeo
12:44 PM
If the user passes you a std::function, he already made the choice about argument types
 
maybe I should just charge you and then walk you through every step.
 
Xeo
you have nothing left to do in that regard
 
sbi
Well, we could overload for R(), R(T), R(T1,T2), and std::function<R()>, std::function<R(T)>, std::function<R(T1,T2)>, couldn't we?
 
Xeo
yes
 
Then add another one that takes whatever and grabs &T::operator() and then call something overloaded on R(C::*)(), R(C::*)(T), etc.
 
sbi
12:46 PM
@Xeo Yes, I do not want to require users to specify them again as template arguments so I can get at them.
 
I worked out a solution out of curiosity but it's not worth the effort
 
Use Boost.Signals and have three different signals for those types
 
You'll always hit trouble the moment someone makes an overload.
 
Xeo
^
This "gimme a call signature" needs to be explicit in the general case, especially in your case where your final function arguments come from void*.
 
Also note that it's perfectly ok to call void f(long) with an int.
 
12:48 PM
Or always take two arguments and callees that don't care about them can ignore em
 
If your void* is actually an int, using this f seems perfectly valid, but will wreak havoc.
 
better to always use std::function<void()> and make the user bind additional arguments at the call site.
 
Or that
 
yeah that's a good solution
 
sbi
@R.MartinhoFernandes Nope. They will have trouble. :)
@R.MartinhoFernandes Yes, it is. But then this is wrapped in a std::function<> anyway, which already takes care of this.
 
12:51 PM
@sbi You mentioned overloads for plain functions.
 
sbi
@R.MartinhoFernandes ???
@Puppy Sigh. I guess I will have to explain the actual problem, so it becomes apparent that this isn't working...
 
No shit
 
@sbi If you pass the f I gave above, your thing will pick the overload with R(T) [R = void, T = long], deduce a long argument, and cast what is an int into a long. You're in UB land from there. (Yes, I realise int -> long might never blow up, but other pairs of types apply)
 
sbi
@R.MartinhoFernandes No. In my case, if you pass an void(long), then some void* will be interpreted as int*. (So much for "UB land".)
 
@sbi What how.
Where do you guess the int?
 
sbi
12:58 PM
@R.MartinhoFernandes This is to make a C RPC interface usable from C++: You have a function that takes some input, some output, or both or none, and you register it for being called when a specific call is to be processed. If such a call is received by the RPC server, it will cast the C API's void* to whatever the input type is, and call the registered function with it. It then copies the output to some byte buffer and pass this back as the reply.
 
Because if you have additional restrictions on the types that makes everything easier.
 
sbi
The part here is the registering of the function to be called.
 
@sbi And how come "whatever the input type is" becomes int in my example?
Why not long?
 
sbi
@Puppy That's 2.95, I think.
@R.MartinhoFernandes Because the RPC call is defined to carry an int in its byte buffer as parameter in some interface definition document.
 
@R.MartinhoFernandes If we assume a runtime description of the parameter type, we still can’t produce a static signature from it.
 
1:00 PM
@LucDanton Yeah, I typed that before the RPC thing popped up :)
@sbi Ok. If the arguments to the call you're going to make is defined elsewhere, why do you want to deduce the arguments of the function I pass in?
 
Also I’ve had this particular scenario in mind rather than the general case. It must have come up here before.
 
Here's an easy thing to do
1. Embed Mono
Yeey Inoreader works
 
sbi
@R.MartinhoFernandes Because otherwise users would have to write a function with the correct signature and then again provide the correct signature when they register the function. That seems wrong.
 
@sbi Why.
You don't have to provide something with the right signature when you initialise a std::function.
 
sbi
@R.MartinhoFernandes void f(long); register_function<void(long)>(&f);
Seems redundant to me.
 
1:04 PM
it's really not.
 
Welcome to C++
 
And... it is, if you're going to ignore that and just call it with an int.
That's the part I don't get.
 
Xeo
Question: Do you always get an int out of the void*?
 
If you're going to call it with an int, even if I gave you a void(long), why do you want to know about the long?
 
sbi
@R.MartinhoFernandes I do need to cast the void* to the correct input type and I might have to create an output object of the correct type to pass to the function to fill and copy into the reply's byte buffer. For that, I do need the exact types in the type-erasing wrapper.
 
1:06 PM
@sbi How do you decide the correct type?
You keep saying you need the exact types, but then when given a long parameter you pass it an int.
 
sbi
@R.MartinhoFernandes It's in some spec, usually coming in as a Word, Excel or PDF document from some 3rd party. Yes, we need to implement those specs correctly. No, they're not in a format we can generate code from.
 
sbi
That doesn't mean I need to spell out the function's signature twice, though.
 
No, I still don't get it.
2 mins ago, by R. Martinho Fernandes
If you're going to call it with an int, even if I gave you a void(long), why do you want to know about the long?
This is the question I feel hasn't been answered (and is important).
 
sbi
@R.MartinhoFernandes I am not going to call it with an int. I am going to call it with a void* casted to whatever the argument of the function is.
4 mins ago, by sbi
@R.MartinhoFernandes void f(long); register_function<void(long)>(&f);
 
1:09 PM
14 mins ago, by sbi
@R.MartinhoFernandes No. In my case, if you pass an void(long), then some void* will be interpreted as int*. (So much for "UB land".)
 
sbi
@R.MartinhoFernandes That was a typo. Sheepish grin. Of course, if you pass an void(long), then some void* will be interpreted as long*.
 
Are you fighting
 
Then best-effort signature detection does seem appropriate (as opposed to the general case you can’t do yadda yadda).
 
sbi
@LucDanton ???
 
1:11 PM
With the caveat I mentioned, though.
22 mins ago, by R. Martinho Fernandes
If your void* is actually an int, using this f seems perfectly valid, but will wreak havoc.
 
sbi
@R.MartinhoFernandes Yes, of course, if either the caller or the callee mess up correctly implementing the interface specification, then all hell might break lose. Such is working with low-level C APIs.
 
remote_call([](int i) { f_that_eats_a_long(i); }) comes in handy for those
 
sbi
@LucDanton Yes, it would, had we a decent compiler.
Of course, std::function takes care of this, too.
 
I’m guessing not a lot of people is interested in solving that frequently asked question.
 
I'd upgrade everything, but alas, but my employer wishes to finish sawing down the tree before sharpening the blade. C# and Wpf? Nah 10+ year old MFC and C++. // Thank you @FredOverflow that worked for me! — AnotherUser 1 min ago
lol "finish sawing down the tree before sharpening the blade"
 
1:15 PM
I just realized std::back_inserter is quite a clever idea. It's growing destination buffer. You could never do this in plain C.
 
In fact, some libraries do it.
It's function pointers all the way down.
 
@R.MartinhoFernandes Ah. Growable destination buffer is possible if it's a **.
 
As with everything generic in C, I guess.
 
The level of meta is measured in the number of stars.
 
C is a functional programming language!
 
1:17 PM
purely
 
So how many levels of stars do I need in C to simulate Monads? :)
 
and it's full of stars
 
you've probably seen this
 
lol, a friend bought programming books.
One about C, one about Java and one about PHP.
;_;
 
@PolymorphicPotato Well, does he need those languages for the job?
 
1:18 PM
@StackedCrooked Yeah.
 
Well preprocessor is purely functional
 
@FredOverflow No idea what he has them for!
Ah for school.
 
The assumptions there are p silly
 
@R.MartinhoFernandes So how would \x -> x + y look like in C?
 
How is that even relevant
 
1:21 PM
woot
 
I stated before that I don't think lambdas are an essential ingredient of functional programming languages.
 
I've filled my 250GB disk?
 
sbi
@LucDanton I am afraid the @Puppy chased them all aways with his definite it's impossible for the general case. (Which, while correct, is also not relevant in practice, since you rarely ever need to implement the most general case.)
 
250GB is nothing
 
@R.MartinhoFernandes Functional programming without lambdas is just ctional programming :(
8
 
1:22 PM
@R.MartinhoFernandes In fact C preprocessor doesn't have them, and is still purely functional :v
 
Jul 2 at 20:22, by R. Martinho Fernandes
Lambdas are essential to functional programming in the same way that true and false literals are essential to imperative programming.
 
Functional programming is not about functions
 
What's next? OOP is not about objects?
 
May 3 '13 at 13:58, by R. Martinho Fernandes
@DeadMG Right now I think first-class support for all these are leagues more important that lambdas, in no particular order: higher-order functions, lazy evaluation, generators/continuations (as in, not fucking CPS).
This one's better.
 
@FredOverflow Not really, no
 
1:23 PM
@R.MartinhoFernandes That's been proved and implemented.
 
@sbi When the question is wrong, I do not presume that I know better than the asker what the right question would be. So in general I tend to shy away from this kind of stuff.
 
@R.MartinhoFernandes Without boolean literals, noobs couldn't write entertaining marbles like these:
if (flag == true)
{
    return true;
}
else
{
    return false;
}
 
sbi
@Puppy You mean this is not a non-deducible context?
 
No, it is not false that it is not a non-deducible context.
 
@FredOverflow more like without indentation or whitespace around ==.
 
1:25 PM
@JerryCoffin That’s very much programming with functions though.
 
@sbi Right. It's just a template argument to a class template. Why would it be non-deducible? It is identical from a language perspective to something like template<typename T> void f(std::vector<T>).
 
I thought the canonical representative of obfuscated languages was Malbolge.
 
sbi
@R.MartinhoFernandes Oh, I thought it was.
 
@LucDanton Functions, yes. Lambdas, not so much.
@R.MartinhoFernandes It is (or at least may be), but it's not nearly as good/direct an example of a pure functional language without lambdas.
 
@JerryCoffin Oh, I was referring to what says in what you linked.
> Obfuscated programming languages, of which the canonical representative is Intercal.
 
1:27 PM
@JerryCoffin Heh, I’m not sure what went in my brain that ‘function’ bumped lambda expression. Kinda proves the point, no? Syntax vs semantics.
 
Intercal is awkward, but I don't know if it counts as obfuscated.
 
sbi
@Puppy As I said before, I am the opposite of a language lawyer. All I have to judge deducibility from is a hazy feeling earned from lots of incomprehensible error messages I fought with over the last decade. :)
 
If you keep clicking the refresh button in Google Chrome it occasionally becomes disabled for a fraction of a second. Like a rate-limiting mechanism.
 
Chrome is bad yes
 
1:29 PM
@CatPlusPlus You don't know what good is.
 
Not Chrome
 
@CatPlusPlus s/Chrome/Internet
 
Chrome is pretty good.
 
WebKit is
 
Hmm, I think I might be passing a non-SWO to lower_bound.
 
1:29 PM
Chrome not so much
 
Chrome is a memory hogging whore
 
sbi
Ok, so if that is deducible, I could overload for the three possible plain functions, the three possible std::function<> specializations, and "everything else", with the latter being assumed to be function objects. Now, given that they will be result of bind() the function objects passed might have multiple overloads of operator(). However, only one of those would compile, so the SFINAE should take care of this, right?
 
Wouldn't say so.
 
@sbi Not a chance in hell.
 
sbi
@Puppy ???
 
1:31 PM
and seeing we're in hell, that is saying something
Lounge<Hell>
 
@R.MartinhoFernandes Oh, didn't realize that was what you were referring to. I'd have to agree with them though: although Malbolge is undoubtedly more obfuscated, it simply isn't nearly as well known as Intercal.
 
If the signatures are fine, the bodies are not relevant. If the bind objects have more than one operator(), &T::operator() will just not work.
@JerryCoffin Malbolge is a victim of its own success.
 
@TonyTheLion So are all its competitors. Fortunately, memory's cheap.
 
@JerryCoffin If it was expensive, I would be even more annoyed if they didn't use it.
 
@R.MartinhoFernandes Technical success leading to market failure, yes.
 
C++14 is released?
 
@JerryCoffin Given that market failure was pretty much its design goal...
 
@R.MartinhoFernandes nice fast website.
 
Woah.
Connect layout changed since this morning.
 
@R.MartinhoFernandes Haha someone voted -1
 
1:34 PM
@R.MartinhoFernandes When it was expensive, you typically had little enough that you always had a fair amount swapped out to disk, so it was all in use to some degree or other.
 
As a consequence of the changes, the paragraphs in the description were merged into a single glob.
Well done.
Where do I file bugs for the bug tracker?
 
@R.MartinhoFernandes In the buggy bug-tracker, of course.
 
2 hours ago, by FredOverflow
Have you guys celebrated C++14 being finished yet?
 
@JerryCoffin Yea I guess I need more RAM
 
@TonyTheLion download it
 
@FredOverflow With Google Ultron, right?
 
(Don't ask how I figured this out)
Even the damn logo is different.
 
lol
 
Well, it's the same, just stretched.
I can abuse a SWO to make a three-way partition, can't I?
 
I would say so, yes. I wouldn’t even call it abuse.
 
1:43 PM
I just need to make x < k mean "x in the first partition", k < x mean "x in the third partition" and !(x < k) && !(k < x) mean "x in the second partition".
Yeah, seems reasonable enough.
 
Xeo
seems like a reduced multimap
 
sbi
@TonyTheLion Hell<C++>
@Puppy I still don't know what this is referring to.
@R.MartinhoFernandes How did you figure this out?
(Yes, I have read it. Why else, do you think, I ask?)
 
Hmm, but can't make that work with lower_bound, even though I can with partition.
 
sbi
@Shog9 Anything ever came out of this discussion? Something planned?
 
Ahahhahaha no
 
1:49 PM
@TonyTheLion Come to that, so do I...should really have 32 GB.
 
Yea me too
 
spsc_queue::pop(T*, size_t) vs spsc_queue::pop(OutputIterator); kinda typifies the difference between C and C++. C writes until destination is full and then stops. C++ enlarges the destination for you.
 
That's not language-specific
 
And each camp loves the choice of their language.
@CatPlusPlus It's a way-of-life specific to programmers of each language.
C programmers hate that C++ does things under the hood. And C++ programmers are annoyed by the uselessness of C.
 
@StackedCrooked To paraphrase: C programmers are annoyed at the usefulness of C++.
18
 
1:53 PM
Yep.
They are proud of the fact that they carefully program each little step.
 
They're also just plain wrong: most have no clue in the world of just how much their C compiler does "under the hood". They're deluding themselves when they believe they understand everything it's doing.
 
user3079266
speaking of differences between C and C++, do yo know of any good tutorial that could help a C coder learn the features of C++ that make it different from C without going through their common basics again?
 
Xeo
there are really no common basics
 
@Mints97 Accelerated C++
 
Xeo
1:56 PM
not if you're going to learn good C++
 
sbi
@JerryCoffin That's like the famous quoting that everything we've known from childhood is "normal", everything invented before we're <some_age> is "cool", and everything invented afterwards is "unneeded": It all comes down to what level of abstraction/technology/whatever you are used to.
 
user3079266
@Xeo what do you mean? isn't C++ built over C?
 
sbi
@JerryCoffin Seconded, that's a very good book for this. /cc @Mints97
 
They complain that simple addition a + b can be overloaded to do anything, like starting webservers etc. They fail to realize that f(x) enables the same.
 
auto&& closest = find_closest_marker(m, optical_markers, i);
error[i] += std::abs(closest.timestamp - m.timestamp); // warning C4700: uninitialized local variable 'closest' used
 
1:57 PM
C programmers are bad at programming, and C++ programmers are, too
 
sbi
@Mints97 Syntactically, yes. In every other aspect (namely: program paradigms), it isn't.
 
"The programmer could do something tremendously stupid" is true of every language.
 
I think I might have made some mistake.
2
 
user3079266
@JerryCoffin Thanks, I'll take a look at that
 
@Mints97 Did you learn BCPL before you learned C?
 
1:58 PM
@Mints97 C-front is a long time ago :)
 
sbi
@StackedCrooked Not in C. There, you cannot overload f().
 
@R.MartinhoFernandes You used MSVC.
 
user3079266
@LucDanton no, I haven't
 
Someone is really bad at clicking
 
@sbi So what? f can still be a function that does absolutely anything. There's nothing that stops read_archive(archive) from starting a webserver.
 
1:58 PM
@sbi I mean that operator+ is essentially just function syntax like f(x).
 
Xeo
@R.MartinhoFernandes Using VC++?
 
:lol:
 
Why is robot making a mistake worthy of stars?
 
Because robots are perfect
 
@CatPlusPlus Yeah, I never click with people.
 
1:59 PM
lol
 
Xeo
@TonyTheLion See his message before that
 
Oh.
> error C4716: 'find_closest_marker' : must return a value
 
sbi
@StackedCrooked I know. However, their argument usually says that 1+2 is OK, but a+b might turn off the Internet. For that, you need overloading.
 

« first day (1403 days earlier)      last day (3537 days later) »