« first day (876 days earlier)      last day (4079 days later) » 

2:00 PM
Because a) marathon b) coding marathon no less c) I'd have to go somewhere d) I don't like competitions
 
people on this site apparently suck at algorithms :(
 
user1357851
@nneonneo SO my solution could be the optimum :p
 
@CatPlusPlus eliminations are done from home.
@nneonneo maybe because there are engineers, not damn mathematics?
 
I'd still have to go somewhere if I qualify
And if not, then it's a waste of time
 
user1357851
P.S. I have added some details to even shorten the solution time
 
2:01 PM
@BartekBanachewicz yeah, I know. 'tis a wee sad
 
Hell it's a waste of time regardless
 
Ell
@Zoidberg is that simpler?
 
@CatPlusPlus if we qualify I'll give you a cookie
 
I have seen bad problems at ACM before where the authors accidentally post an NP-hard problem
because they screw up the problem spec
 
user142019
 
2:01 PM
@Zoidberg: uh, isn't this thoroughly trivial for a computer?
 
This sort of crap is inevitably "implement this this and this but don't you dare looking at any specs"
 
@CatPlusPlus Also, from you it's damn close to Katowice. We traveled 12 hours from Gdynia last time.
 
bad CAPTCHA.
 
String literals are of type const char[len + 1], where len is the length of the string. — H2CO3 18 secs ago
what?
I thought string literals were const char*
 
@TonyTheLion no, he's right
 
user142019
2:02 PM
@nneonneo Yes, but no attacker cares enough for that website to do that.
 
@Zoidberg sure, but no attacker cares enough for any captcha used at only one site
if that caught on at all it would basically be broken instantly
so, bad captcha.
 
user142019
In fact, it can just do brute force.
 
or any strategy, trul
 
user142019
@nneonneo STILL A NICE IDEA.
 
yeah yeah. reminds me of the russian math site that used integrals.
(not a russian math site)
 
2:04 PM
xD
epic
 
Ell
haha how ridiculous
 
too bad wolfram
Reminds me of "Van Troff's Cylinder" novel
 
user1357851
expecting : question: what is 1 + 3 + 3 + 7 =
 
Xeo
@Zoidberg That sucks.
 
@Ell It's actually not that ridiculous.
 
Ell
2:05 PM
@DeadMG I guess a lot of people couldn't answer it :P
 
Also, that's rather trivial.
 
user1357851
unless it is on a maths forum
 
since x = 0, then 4*sin(-(pi/2)), which is sin(-90).
 
user142019
Maybe "select the emotion" and a picture of a human face will do for quite a good CAPTCHA. :P
 
CAPTCHAS are stupid anyway
 
user1357851
2:06 PM
diffentiate it first?
 
So I broke my Fallout completely
 
Robots will just continue getting better and better
 
@CatPlusPlus Modded the shit out of it? :D
 
Xeo
@DeadMG Wait, doesn't that thing divide by zero, or do I not understand the notation?
 
I disabled all mods and it still crashes
FUBAR
 
user1357851
2:07 PM
differential of sin is cos, so 4 cos(0) = 4?
 
@Xeo Why would it divide by zero?
 
@Xeo That's Leibniz's notation, it's not a real fraction xd
 
Xeo
So I don't understand the notation, k. :)
 
non-zero/zero = +/-infinity
 
2:09 PM
@Xeo Don't worry, it just signifies the rate of change of the stuff to the right as the input, x, changes.
 
Ell
What should I do if I want a tostring type thing, write a cast operator to std::string? just have a GetString() function?
 
wait, did anyone get the right answer to the captcha?
 
user1357851
Gosh you guys are as good with maths as you are with programming :p (just joking)
 
does not look like anyone did
pretty much
 
user1357851
@nneonneo read above
 
2:10 PM
@Ell operator<<(ostream&, yourtype)?
 
@Telkitty yea, damn awesome
 
@Telkitty no, I don't see anyone with the solution
 
@nneonneo zero ^^
 
Ell
@DeadMG meh I guess.
 
2:11 PM
@NikiC congrats, have a star!
 
user142019
You know.
 
user142019
void (char meh[static 1]) is pretty awesome in C.
 
user142019
You get diagnostic if you pass NULL.
 
Ell
@BartekBanachewicz It's a lot of effort to just get an std::string, e.g. you need a stringstream (I think?)
 
uhh, wtf is with <stdexcept>
 
Xeo
2:12 PM
std::runtime_error etc
 
@Ell I don't know,ignore me
@Xeo why ain't these in <exception>
 
@Zoidberg: whaat
 
@Zoidberg It's one of the worst keyword abuses ever.
 
user1357851
@nneonneo if you are talking about the maths one mine is: 4 * cos( 4x - pi/2) | x=0 => 4cos(-90) = 0
 
so the type of "foo" (string literal) is different in C to C++?
 
2:13 PM
yes, right, but NikiC beat you to it
 
@TonyTheLion No.
 
Ell
Damn, my sneeze can't reach it's climax, how frustrating!
 
@Zoidberg: ok, seriously, that's weird
 
It's const char[N] in both
 
user1357851
@nneonneo takes time to write steps down ...
 
2:14 PM
@CatPlusPlus not per this
@H2CO3: 6.4.5.5 - "For character string literals, the array elements have type char"; + .6: "If the program attempts to modify such an array, the behavior is undefined." (I just happened to be checking this recently) — teppic 5 mins ago
 
user142019
 
user1357851
afk for 10 mins
 
Xeo
@BartekBanachewicz Because <exception> only deals with the basic std::exception class and exception handling facilities, while std::except adds niceties?
 
no matching function for call to 'std::exception::exception(const char [40])'
 
Xeo
2:16 PM
@BartekBanachewicz Wat
 
I have both and this ^ pops up
@Xeo exactly
what I did wrong? :/
 
Xeo
Oh wait, exception itself isn't constructible from a string. :)
Only the subclasses.
 
@Zoidberg: what is the static in the array length called? I've done C for like 13 years without knowing about that.
 
@Xeo you are kidding me
Damn Fuck ICC why u no compliant :/
 
Xeo
Well, throwing a generic std::exception doesn't tell you much.
 
user142019
2:17 PM
@nneonneo I don't know what it's called, but it makes sure you don't pass an array of a size smaller than X for [static X].
 
oh wait is that a C99 extension
 
Xeo
I go with std::runtime_error by default untill I find something more fitting
 
@Xeo sigh you are right, of course. I am just angry there's so much shit that passes ICC/MSVCC
 
@Zoidberg: parameter array declarator
 
Ell
quarter past 8
 
2:18 PM
apparently
and it is a C99 thing
 
@Xeo Boost.Exception
 
why is C99 support still not universal if it's been 14 years?
 
GCC supports it since forever
 
I always had the idea that string literals were const char* in C++, not sure where I got that from
 
@TonyTheLion They are.
uh, const char[N].
 
Xeo
2:20 PM
They're not. oO
Yeah, that
 
> Ordinary string literals and UTF-8 string literals are also referred to as narrow string literals. A narrow string literal has type “array of n const char”, where n is the size of the string as defined below, and has static storage duration (3.7).
 
oooh fuck @Xeo I need your help.
 
in C++98 and 03 they had a deprecated conversion to char* for old code's sake.
that was then removed in C++11.
 
ah I see
 
Xeo
@BartekBanachewicz 50 bucks
 
2:20 PM
awesome. I've learned something today. mission accomplished.
 
@Xeo sigh. CRTP. Base class function uses CRTP-ed static private function of derived. Legal or not?
 
Xeo
If the base is a friend, I think.
 
@Xeo ain't. But yea. that'll work. kthx
 
The year is 2152. Numerous alien species have brought their languages and culture into the galactic community. UTF-64 is now a thing.
 
lol
a few more ideographic languages would probably overwhelm Unicode
we're having enough damn trouble with Chinese as it is
 
2:24 PM
woohoo
3 more files compiled
 
Ell
hmm. msvc doesn't support = default, does it?
 
uh. My linux just froze.
~stability~
 
Ell
ctrl-f1 :3
 
nah, it's dead
mouse cursor works
 
Then it's DE or X11 that froze not Linux
 
2:27 PM
uh
what do I do?
Ctrl-Alt-Backspace is disabled here, as it seems
I hard-rebooted it :/
 
Alrighty, boys and girl(s), time to get to work. Have fun and, Zoidberg, don't antagonize the populace... Without me. <3
 
Ell
Bye now :)
 
I guess that's what I get for using shitty distros
 
user1357851
work ... on sunday? >_<
 
he probably meant coding
 
2:31 PM
Is there a question that explains why you shouldn't pass std::function as a parameter to a function?
 
@TonyTheLion yes
 
link?
 
@TonyTheLion don't have one, but I remember it. Search your friend
 
@TonyTheLion Well, you shouldn't not. There's situations where it would be appropriate
@BartekBanachewicz Luc & Robot have two pertinent answers
 
@TonyTheLion Whenever dealing with templates would be inconvenient.
 
2:33 PM
@DeadMG he probably wants to ask more questions :)
 
"he"?
 
@BartekBanachewicz no, I wanted to know the technical reasons why it's not a good idea, and when it would be a good idea?
 
I assumed he wanted to link to it from a comment
 
I don't want to ask any questions
 
2:35 PM
@TonyTheLion performance and flexibility are good reasons against std::function, type erasure and runtime polymorphism are good reasons for it
 
~performance~
is type erasure a perf concern?
 
or what's the performance concern?
 
not substantial.
std::function is pretty lightweight.
 
flexibility is also a concern then with normal function pointers
because you can only pass it a function with same signature
 
2:37 PM
yes, but std::function does not have flexibility problems
 
wait what?
didn't @sehe just say that it is a reason not to use std::function
 
You can't pass a function of a different signature to a function taking a function pointer
 
yes I know that
 
But you can std::bind and put the result in std::function
 
@TonyTheLion Different people can have different opinions.
 
2:38 PM
Or use a lambda
 
@TonyTheLion well, everything getting slammed in a std::function<> isn't flexible. Also, you loose any polymorphic functor support, just to name two
 
wow
I opened Engine solution, and it now automatically detected it is in repo /cc @sehe
 
@DeadMG that's true
 
@BartekBanachewicz I suppose you mean "VS2012 automatically detected" it is "a git repo". Well, that's how git was designed you know. If it didn't, the git support would be broken.
Git is not your grandfather's VCS
 
Immamazed
I am always amazed when any software works, to be honest
3
That's why I want to be a programmer since I was a kid
:)
 
2:41 PM
@TonyTheLion Ultimately, nothing is as flexible as templates.
but std::function is maximally flexible for it's intended interface/use case.
 
I think std:function is the best thing since buttered toast and it can have my babies anytime.
3
 
yes, there are many places where templates can't be used
and std::function is the primary choice.
 
right, I see
 
@BartekBanachewicz I have that too. It's why I like DVCS
@AndreiTita That's implementation defined
 
@sehe I'll talk to the compiler vendors.
 
user142019
2:44 PM
Herro my fliends.
 
Herro
 
Anti-Herro.
 
typeof(zoidberg)
 
@TonyTheLion I found this one (not the ones I was looking for):
27
Q: std::function vs template

Red XIIIThanks to C++11 we received the std::function family of functor wrappers. Unfortunately, I keep hearing only bad things about these new additions. The most popular is that they are horribly slow. I tested it and they truly suck in comparison with templates. #include <iostream> #include <...

 
well at least it's something
 
2:46 PM
@TonyTheLion It makes a few good points (in the Q already) on first glance
 
user142019
@TonyTheLion void
 
voidberg?
 
user142019
lol awesome
 
user142019
I should call void Zoid instead of Unit in Zoidlang.
 
A zoid pointer
zoid*
 
2:48 PM
Yet another job for Superman! Erm, I mean, for indices. — R. Martinho Fernandes Nov 27 '12 at 17:39
lol
 
Xeo
@Zoidberg And I didn't tell you exactly that, erm, a month ago or so?
 
user142019
Time to update Xcode.
 
user142019
It has been improved by making C++11 the default version of C++.
 
> Comma operator to the rescue, with void() to silence warnings about lack of effects, and also preventing overloaded commas.
what does overloaded commas have to do with it?
 
Damn. That was hard to find:
Aug 29 '12 at 1:07, by sehe
Jul 26 at 15:47, by R. Martinho Fernandes
@sehe Anyway, while Luc writes that rebuttal, I recently wrote an answer where I had to explain this.
 
2:53 PM
it's from here
 
@TonyTheLion Because types might have operator, do something else
 
user142019
Would it be possible to combine futures and Boost.Context to write linear (as in, callbackless) code that does async I/O under the covers, but all on one thread?
 
25
A: why do lambda functions in C++11 not have function<> types?

R. Martinho Fernandesstd::function is a tool useful to store any kind of callable object regardless of its type. In order to do this it needs to employ some type erasure technique, and that involves some overhead. Any callable can be implicitly converted to a std::function, and that's why it usually works seamlessly...

^ That's the one of the two answers I meant earlier
 
user1357851
Oh sweet, Android tabs actually have colors and is prettier than iphones <3
 
2:54 PM
@Xeo Yeah, I was just gonna say I think you 'invented' the idiom
 
Xeo
I think I remember seeing it somewhere else before, but maybe not.
 
@sehe thanks
 
@Xeo I've seen it used in more ... useful contexts, though. By you. In an answer
 
Xeo
@sehe Most likely inside of decltype or when doing pack expansion. :)
 
what's the advantage of make_array with indices trick over just creating your array the normal way?
 
Xeo
2:58 PM
Btw, I think this:
 
@Xeo the latter i think
 
Xeo
4
Q: Is there a use case for std::function that is not covered by function pointers, or is it just syntactic sugar?

static_rttiThe notation for std::function is quite nice when compared to function pointers. However, other than that, I can't find a use case where it couldn't be replaced by pointers. So is it just syntactic sugar for function pointers?

Is a dupe of this:
12
Q: Why do we use std::function in C++ rather than the original C function pointer?

Michael DorstWhat is the advantage of std::function<T1(T2)> over the original T1 (*)(T2)?

 
@Telkitty ~prettier~
 
Xeo
(No, pure coincedence I answered that other one~)
 

« first day (876 days earlier)      last day (4079 days later) »