« first day (863 days earlier)      last day (4084 days later) » 

12:01 AM
I've seen two questions about factorials today
both about the same thing..
guess it's homework.
0
Q: Calculate # of factorials between 1 and X

user2105644I'm a bit stuck on computing the number of factorials between 1 and n. An easy solution would be to just use a factorial table. For example, between 1 and 362,880 there is 1!, 2!, 3! ... 8! and 9!. The program would then output that there are 8 factorials between 1! and 9!. == I am also worki...

 
@Rapptz Obviously, the correct answer is to use the Inverse Gamma Function and do a floor function.
 
Is there a name for the sequence of code units that make up a code point in utf8?
 
@Mysticial lol I was going to answer a question with the gamma function today but I decided against it
 
@jalf I don't think I've ever seen it with a specific name.
@Xeo Any further thoughts?
 
@Rapptz: I hope you haven't missed the one asking whether a function that returned 1 all the time computed the factorial. Awesome
 
12:05 AM
Yeah I saw that. That was the first one I saw.
 
@AndyProwl linkage?
 
I linked to it earlier, sec.
 
@DeadMG: Can't find it
 
@AndyProwl That was pretty special.
I think it's been deleted.
 
@Johnsyweb: Indeed
 
12:07 AM
yeah
 
Xeo
@DeadMG I'm on it.
 
2 hours ago, by Rapptz
-4
Q: Determine if factorial

user2074033Does the following function answer the question: determine whether a number x is a factorial? Thanks. bool testfactorial(int x) { if(x>=1) return true; else return false; }

 
> I'm fairly advanced with c++; I just don't understand the task. – user2074033 1 hour ago
 
@Rapptz User got deleted...
 
this I le doubt
 
12:08 AM
@Mysticial I bet it's the same user.
 
@DeadMG yeah, that's what I thought. Seems like something they should have a name for though
 
also another "I don't know bitshift operators" question.
0
Q: Please explain the >> in this program

healixWhat is the extraction operator doing? I have never seen it used this way. void DecimalToBinary(int decimal) { int remainder; if(decimal <= 1) { cout << decimal; return; } remainder = decimal % 2; /*----->>>*/ DecimalToBinary(decimal >> 1);/*what is the ext...

 
Xeo
Hm. Seems my mobile phone doesn't like to load new pages anymore.
I can chat fine in here, but I can't even open SO
Oh, nvm, it finally loaded.
 
@jalf I think that's a "coded character".
 
@R.MartinhoFernandes ah cool, thanks
 
12:12 AM
Hmm.
 
user142019
Hmm?
 
Anyone knows a good way to clear a uint render target?
 
Xeo
@DeadMG: Okay, let's see that I don't embarass myself with this explanation. Disclaimer: I don't know how hard or easy it would be to implement the proxy / reflection part.
 
@jalf Ah, sorry, no, that's not it. It's "minimal code unit subsequence".
 
Xeo
Lemme describe it in terms of the goal first: You'd only have to be able to reflect Wide objects as C++ objects, and let those reflected types mingle with normal C++ types in a special block, say extern cpp{ /*stuff*/ }. Any changes to the reflected was-Wide object would propagate to the original Wide object, like a reinterpret_casted reference/pointer, or a proxy. With this, you can hand the subsystem to the already working Clang++, being done with the integration.
You also wouldn't have to work out how to make C++ types or objects work in the Wide world and could design and implement that part seperately, cut off from interaction with C++. In the end, you'd have three components - Wide, extern cpp, and Wide-to-C++ proxy/reflection.
 
12:13 AM
> Minimal well-formed code unit subsequence: A well-formed Unicode code unit sequence that maps to a single Unicode scalar value.
 
@EtiennedeMartel Using Clear on the Device(Context?)
 
Xeo
If your fundamental types, like int etc, don't work different from how C++'s fundamental types work, the reflection part shouldn't be too hard. And even if they do, you can just inject special code into the proxy / reflector.
 
oooorrr you could write a shader to wipe it clean.
If you're doing deferred rendering, use a cleaning shader.
 
@ThePhD I'm using another render target for hit testing.
 
12:14 AM
o_O
What the hell.
 
I use a shader to push a unique ID per object.
 
You're doing per-pixel hit-testing?
 
user142019
o.O and o_O are the stupidest smileys ever.
 
Yeah. It's for a tool, so I can afford it.
 
@Zoidberg ^_______^
@EtiennedeMartel Oh. Well then.
 
12:15 AM
@Zoidberg o.o
 
user142019
(\/)(;,,;)(\/)
 
@Zoidberg That's the dumbest smiley ever.
 
That's a smiley?
 
@EtiennedeMartel Cleaning shader might be your best bet.
 
user142019
What else?
 
12:17 AM
@Xeo Right. But then, how am I going to seamlessly work with C++ objects?
I mean, from what I understand of your proposal, you don't have anything anywhere near as user-friendly as I have right now.
 
@R.MartinhoFernandes ah, rolls off the tongue, doesn't it? :D
 
also, looks like it's actually "minimal well-formed code unit subsequence"
which is even better
 
well, yeah, but I assumed you were not interested in "minimal ill-formed code unit subsequences" :P
 
How's ogonek coming along, btw?
 
Xeo
12:23 AM
@DeadMG Where do you have C++ objects, if not within such extern cpp blocks? The idea is "what happens in C++, stays in C++", except for those proxies that cleanly propagate things out to Wide. And on the user-friendliness one, maybe, but what's the cost on your part for that?
On the other hand, I may well have not thought this idea through all the way.
 
Xeo
It's basically just some things that came to mind.
 
^^ woah... 2 months...
 
well, I don't see how implementing extern cpp would be that much different to what I have now.
 
Xeo
@Mysticial He's rep-whoring like crazy, though. :P
 
12:24 AM
I'm surprised I haven't noticed him earlier...
 
@Mysticial Hardcore repwhoring.
 
Ell
Maybe just have what you have now, but restrict it to extern cpp blocks
 
@Ell So I'd lose the user-friendliness, and gain nothing?
 
I'm not capable of rep whoring :(
 
Ell
Would people still write wide wrappers? Or just use c++ direct?
 
Xeo
12:25 AM
@DeadMG With what you currently have, from what I understand, you'd need to deal with all the baggage that C++ brings, all over Wide.
0
Q: Order of Vector elements for C++

anup.stackoverflowThe following piece of c++ code gives int main() { vector <int> myvect(3,0); vector <int> :: iterator it; it = myvect.begin(); myvect.insert(it,200); myvect.insert(it+5,400); //Not sure what 5 makes the difference here cout << myvect[0] <<...

Dem tags.
 
Ell
Well not direct. C++ in wide
 
@Xeo Like what?
 
Xeo
Hmpf, he removed the C one already.
@DeadMG Wasn't your goal to make a better language, and don't you constantly complain that C++ is held back by all the C stuff? Isn't that exactly what would happen to Wide, then?
Again, just stuff that floats to my mind right now.
 
@Xeo Not without source compatibility.
 
Xeo
@DeadMG What exactly do you mean with "source compatability"? Not being able to just compile any .cpp?
 
12:28 AM
@Xeo I mean that the C++ part and the Wide parts are clearly delineated in source code.
 
Xeo
He's basically doing nothing but watching for new questions, right now.
 
Damn, Andy Prowl's at +903 this month in C++. I believe Luchian's only beaten that once?
 
Xeo
@DeadMG Maybe I don't understand how your C++ integration works, then.
 
Oy.. hold on a minute
He seems familiar.
 
Xeo
@Mysticial Eh, +900 in a month isn't much.
 
12:29 AM
Main() {
    str := "Hello, World!";
    str_two := "Goodbye, World!";
    str_three := "Innit, World!";
    str = str_two = str_three;
    cpp("<iostream>").std.cout << str << str_two << str_three;
}
I parse the C++ header, use Clang to perform name lookup and all that stuff.
 
8
A: Why can't my constexpr function return a lambda?

Andy ProwlYour function fp() does not return a literal type, therefore it cannot be a constexpr function: From 7.1.5: "The definition of a constexpr function shall satisfy the following constraints: it shall not be virtual (10.3); its return type shall be a literal type; each of its parame...

 
@Xeo Hey... I've never come close to that without a viral question. It's HARD...
 
this guy..
I knew it seemed familiar.
 
Xeo
@Mysticial Huh, just go 200 every day for a week and you're over that oO Or do you mean just upvotes?
 
@Xeo upvotes
 
Xeo
12:30 AM
Welp, would make sense, actually.
 
I'm actually 0 for the month. Only question I've answered in the past month was a C question.
 
Xeo
@DeadMG And your Wide types need to obey all rules of C++ types to work with the "streaming" to std::cout, no?
 
@Xeo Well, not exactly.
strictly speaking, as the "implementation", I have a lot more leeway than a plain user.
and
whether the Wide type has to obey the rules of C++ is only true if you pass it to a C++ function.
if you wrote your own extraction operator which eventually only dealt in C++ types, then there's no reason why it wouldn't work, even with Wide-only features.
 
Xeo
I have a feeling you're making this a lot harder on yourself than you have to. But oh well, I'll shut up for now, since I also have a feeling that I may just not be understanding how Wide works / is supposed to work in that regard.
 
and finally
when you're in C++ then you obey C++'s rules- for example, if you pass in an array from Wide, then use it in C++, it'll decay to a pointer there, but not in Wide.
Wide and C++ can have different ideas about what a type can and can not do
 
12:34 AM
inb4 DeadMG Jr. complains about all the C++ cruft inside Wide.
4
 
hell, you're in a long way before DeadMG Jr.
considering that I'm currently single
 
It can be a spiritual successor.
 
true
but I'm pretty sure that Wide won't really be affected by this kind of interoperation, it's mostly source-interop that sucks.
it's just that Clang's implementation isn't as helpful as it could be.
 
If your dog is neutered there won't be any DeadMG Jrs
wait what gender is your dog again?
 
female
 
12:37 AM
ah.
 
lol, DeadMG Jr.
 
Robot Jrs
 
@Rapptz Ow! Harsh!
/me tries to think of a counterexample.
 
@Rapptz The exact opposite is true for Anime comedies. :)
 
@Mysticial too many tsundere females
 
12:45 AM
anywy
time for the sack to meet my head
 
@Rapptz And they're all voiced by Kugimiya Rie. :P
 
Nope I give up!
I reckon there's a market for an online C++ debugging service. There's a constant stream of people approaching SO with, "Plz 2 debugg mai codez".
 
I'd use it too if there was such a thing..
GDB sucks.
 
Ell
Why?
 
because I suck at using it.
Anyway I have to go eat.
 
Ell
12:48 AM
Also inb4 js implementation of c++
 
@Johnsyweb It's been a problem for long time. PHP has it worst.
 
Ell
use clang to compile clang to js xD
Haha its the only reason anything sucks for me
 
@Mysticial That probably because people think they can develop websites in PHP without learning to program.
 
1:05 AM
@Johnsyweb Yup - 'I don't have time to get comfortable with the debugger for this project' - failed developer. "Plz 2 debugg mai codez" pisses me off as well, especially the 'trivial' C-style stuff with several single-letter array indexes. Too lazy to do the hard work of getting stuff working and find it easier to try an con some experienced developer to do it for free.
 
@MartinJames Indeed. Had a classic one yesterday: stackoverflow.com/questions/15048994/…
I grinned like an idiot when they posted "after putting it in a seperate method it works"
 
@Johnsyweb 120 lines isn't that bad...
 
@ThePhD oyy look it works i.imgur.com/gQYiWbo.png
 
I have functions that are upwards of 300 - due to loop unrolling. :P
 
@Mysticial: Context is king!
I don't judge functions by the number of lines, per se, but on the number of functions they perform.
 
1:09 AM
@Johnsyweb Debugging 101 - if it's complex and it doesn't work, break it up.
 
Loop unrolling... is an amazing optimization. And for some reason I always seem to be able to do it better than the compiler.
 
@Mysticial That's not a skill I could put on my resume!
 
@Mysticial Is it possible it's because you have information that the compiler doesn't ?
 
@Borgleader Even in cases where it's even, I still beat the compiler.
Even - meaning that there's no external information to exploit.
 
Luckily, my apps never require such manual optimization to perform adequately.
 
1:13 AM
This song I listen to has the SO plink sound
It always makes me think someone is plinking me
 
user142019
@Ell Emscripten.
 
Loop unrolling and vectorization are things that I always seem to beat the compiler at. But stuff like inlining, instruction re-ordering, I can't.
At least not always.
 
OTOH, the SO plink never fools me into thinking I'm listening to a song.
 
user142019
@Mysticial so you'd like [[force_unroll]]? :)
 
Let me link to it on youtube, sec. Maybe I'm nuts.
 
1:15 AM
@Zoidberg No, I unroll it manually.
 
it's linked to the time
 
@Mysticial: That was me, wasn't it? :)
 
user142019
@Mysticial ohh I thought you meant detecting whether a loop could better be unrolled or not.
 
@AndyProwl Yeah. First time I noticed you as the rising star.
 
@Mysticial: That's flattering, but I don't think I deserve it. Thank you anyway
 
1:16 AM
I've been fairly inactive recently in the real C++ questions so I didn't notice you until like an hour ago.
 
In order to answer SO questions I have to drop my morals a bit.
 
user142019
As long as you stay inactive in the real C questions it's fine.
 
Some of these questions are so stupid
I feel bad answering them
but then I do it sometimes anyway
 
@Rapptz Just do what Chris does. Answer them all in comments just to piss off @Luchian. :P
 
yeah I'm starting to do that now
downside is I don't get rep but whatever
already got the privileges I care about :D
 
1:18 AM
You will care when you get to 10k.
 
it's okay. Mysticial's Screenshot StackOverflow Printer™ works okay for now.
 
I got to 10K. Nothing changed much..
 
@Xeo: "Hardcore repwhore" should be me? :D
Not sure how am I supposed to take that
 
Xeo
@AndyProwl Yep.
 
user142019
Do compilers inline lambdas?
 
Xeo
1:19 AM
@AndyProwl Not as an insult. :)
 
There is someone who did better than you
 
@AndyProwl Most of us have been through that period.
 
He slowed down a bit though
 
@Xeo: Oh, all right :-)
 
user142019
As in, []{foo();}(); would be inlined to foo();.
 
user142019
1:20 AM
(Time to check.)
 
Xeo
@Zoidberg Well, it's a plain-ass normal functor, so if you're passing to a templated parameter, the chance is high
And especially if you're using it on-site anyways.
 
@AndyProwl I started out like you. Then I burned out after about 4 months.
 
nneonneo, Saskatoon, Canada
22.1k 1 13 51
this guy
 
@Mysticial: I just happen to have a lot of time for learning, but that won't be forever
 
user142019
@Xeo I'm not passing it as a template argument, but it seems it does inline the call: gist.github.com/daknok/5026713.
 
1:22 AM
@Rapptz Yeah, I don't see him much anymore.
Granted, I haven't really been trawling the normal C++ questions anymore.
 
Xeo
@AndyProwl Also, can you start replying to specific messages, please? :)
@Mysticial Same
 
@Xeo: What do you mean?
 
yeah same.
 
Xeo
I only go with C++ questions that are C++11 or are about templates.
 
@AndyProwl There's an arrow at the right of each message if you mouse over.
 
Xeo
1:23 AM
@AndyProwl Read the newbie hints linked on the right, top starred message.
 
@Mysticial Oh, I see
@Xeo Found out, thank you
 
There we go. :)
Welcome to the club. :D
 
Xeo
@AndyProwl I still recommend reading them.
 
@Xeo If you mean the link to be read for people not to hate me, I think I've read it
 
user142019
Oh lol it even optimizes printf to puts awesome.
 
1:24 AM
Maybe I should have read it better
 
Xeo
@Zoidberg Well, if it has all the information...
Anyway, stop stealing my template questions. :( I need 200 votes in there still for Gold badge.
 
lol
 
@Mysticial So since you started out like me and burned out in 4 months, am I to imply you amassed >80k mostly in that short time?
 
@AndyProwl lol.
 
@AndyProwl No, I was at about 30k when I burned out.
 
1:27 AM
@Xeo You already have a c++11 gold badge :-)
 
he got a lot of his rep from this too
6170
A: Why is processing a sorted array faster than an unsorted array?

MysticialYou are the victim of branch prediction fail. What is Branch Prediction? Consider a railroad junction: Image by Mecanismo, from Wikimedia Commons: http://commons.wikimedia.org/wiki/File:Entroncamento_do_Transpraia.JPG Now for the sake of argument, suppose this is back in the 1800s - before...

 
Xeo
@AndyProwl Yes, but I want it for too! :(
 
@Mysticial That's still farther than I'll get in the same time
 
I didn't suddenly stop. So it's hard where to draw the 4 months.
 
user142019
I only have bronze tag badges.
 
1:28 AM
Same here.
 
user142019
10 famous questions lol.
 
@Xeo You can't have everything! Leave something for new repwhores too :-)
 
@AndyProwl I started in September 2011. I started slowing down in November. And by February 2012, I had basically stopped.
 
user142019
lol one of my questions has 10k views and zero votes.
 
Ell
Night guise
 
1:29 AM
night
 
CHAT :D
 
user142019
It's one of the worst questions ever.
 
@Mysticial I've seen you've achieved quite impressive stuff though. I believe rep alone doesn't tell much in your case
 
user142019
I included like all of my code. xD
 
Xeo
@Zoidberg Wat
 
1:30 AM
hi guys :)
 
user142019
It's really a silly debug my code for me question.
 
@AndyProwl For me, rep doesn't mean much after 30k or so.
 
@Rapptz I really liked that one
 
I've actually started going back and purging a lot of my useless FGITW answers - even if I lose rep in the process.
 
are you all c++ devs
 
1:31 AM
Yes
 
@c0de NO
 
@c0dem0nkey No, I don't even know C.
 
Doorknob is a noob
 
Lol
 
and im a codemonkey
were even
 
1:32 AM
haha
 
user142019
@c0dem0nkey nah.
 
...sort of. C++, +
 
user142019
I know very little C++.
 
@Mysticial Yes, I realize that. In fact rep is not a measurement of skill, just a possible consequence
 
user142019
I prefer Haskell and other superior languages over C++.
 
Xeo
1:32 AM
Rep is a function of how much time you're putting into SO.
 
agreed.
 
kinda
 
Anyone use stack guru?
 
but if you don't know stuff you can't get rep even if you stay for a long time
 
@Xeo Yeah, pretty much for the most part.
 
1:34 AM
@VaughnCato What's that?
 
am i the only one in the office chatting?
 
@Doorknob: It's an IM bot that notifies you when certain stackoverflow questions are asked
 
hm
I have tags for that...
 
@Xeo More or less yes
 
1:35 AM
anyone of you guys do freelancing
 
I find it handy when I want to do some other coding but still be available for SO questions without having to check constantly.
 
@c0dem0nkey no I don't
@VaughnCato I find that too distracting though
 
There's a little delay though
 
@AndyProwl There's two things that skew it away from a direct measurement of time. One are the low-volume users who have a reputation farm. The other are the people who continue after the repcap.
 
@Doorknob What about this person? stackoverflow.com/users/179736/timex
 
user142019
1:36 AM
Stupid DSL was borked.
 
@c0dem0nkey Yes
 
@Rapptz 'Grats
 
user142019
Okay.
 
@ThePhD thanks. I'm working on dragging now but I don't know of a good way to do it actually
 
user142019
This is the third time today somebody comes in here to ask about freelancing.
 
1:37 AM
@MartinJames where do you get clients :|
 
user142019
What the fuck is happening.
 
14K and 28 gold badges!
 
@Johnsyweb um.
 
lol the 3rd?
 
Famous Question x27...
 
1:37 AM
@Johnsyweb It seems he's great at asking questions
 
@c0dem0nkey They just sorta appeared through industry contacts.
 
LOL
 
@Mysticial ahahaha
 
@AndyProwl Certainly prolific!
 
were you guys smartasses already back in school
 
1:38 AM
what a nice way of putting it.
 
indeed.
 
whoa? i get subtracted 20 reps for chatting?
err
 
@c0dem0nkey No you don't
a post was probably removed
 
@Zoidberg I don't know - you tell me!
Is something happening?
 
uh
yeah
I guess
 
1:44 AM
Wake me up when the thing is over.
 
@Mysticial I see. personally, it motivates me seeing my progress (or lack of progress) as a growing (or not growing) number. Spending effort in something that cannot be measured if not after long time can be frustrating. But I understand that's not a reliable indicator.
 
@AndyProwl In other words, it's basically just a game up to a certain point.
Which most of us have played at some point.
 
@Mysticial Indeed, it's a game
 
Most of the guys who hang out in chat here are the ones who have burned out long ago. :P
 
I guess I'll play the game eventually.
 
1:46 AM
Unlike in the other tags, there's never been a single person in C++ who's been able to keep at it for years on end...
Does anyone know how long Neil Butterworth lasted before he ragequit?
He left long before I joined so...
And Roger Pate... Also before my time.
 
@Mysticial That's likely to happen to me as well, I won't always have as much time as I had in the last few months.
 
I remember a Deborah Pate
 
Anyway apart from being a game, teaching/helping is the best way of learning. More than getting answers to your own questions I believe
 
I was totally in it for the game. That's it. Screw teaching people! :D
Now I just hang out in chat.
 
@Mysticial A few days ago I've seen a question posted by a new user who later told he was Neil Butterworth.
I had no idea who he was, but others seemed to recognize him
 
1:50 AM
@AndyProwl Yeah, he comes back from time to time and disappears again.
But his main account has been long deleted.
 
Why was his account deleted? o_O
 
A whack-a mole user
 
@ThePhD He ragequit.
 
..Ragequit?
How do you ragequit out of SO?
 
Email them and ask for account deletion.
 
1:51 AM
... But why?
 
I don't know what the circumstances are. But I heard it has something to with SO bring out the worst in him.
 
0_o
 
@ThePhD StackOverflow is serious business.
 
People take this Q&A shit too seriously.
 
click and drag too hard
 
1:52 AM
Stop being a scrub click & drag is ezpz.
 
user142019
You don't need to send an email to ragequit.
 
;_;
 
user142019
There is a hidden page to do it.
 
I can sorta understand it, what with all the gimme/debug codez questions.
 
@ThePhD how?!
 
user142019
1:52 AM
Quitting Stack Overflow is impossible, though. You'll come back eventually.
 
If I told you it wouldn't be a challenge anymore, would it? :D
 
@Mysticial Btw, while browsing through your answers I've seen you know much -among other things- about CPU caches. If one day you'll have little to do and you won't be in "screw teaching people mode" (:D), please consider giving some advice about this question of mine (stackoverflow.com/questions/14543965/…).
 
@MartinJames Lightness (Tomalak) ragequit and then came back. He never deleted his account.
 
I got references and read stuff, but little useful guidance and still haven't figured out what's the problem.
 
Hello, anyone can provide me a name for some API in C++ for transcoding multimedia (video)?
 
1:53 AM
@AndyProwl Oh that "screw teaching people" was only when I first started.
 
Q_Q SFML WHY U NO DEBUG BUILLDD.
 
Since I was addicted to the "game". :)
 
user142019
@user1929959 FFmpeg's libraries.
 
@Mysticial Oh, good, that increases my chances ;-)
 
Actually deleting an account seems like extra work. If I was to get pissed off, I would just ignore SO.
 
1:54 AM
Now I'm actually around to answer real questions with a broader audience.
 
@ThePhD I actually have two issues.
 
@Zoidberg FFmpeg have not a good documentation ...I want something like Xuggle
 
@user1929959 Then use Xuggle.
 
I want something for C++ not for Java
 
@user1929959 Then use FFmpeg!
 
1:56 AM
 
so I think that u have enough humor, so I'm repeat : FFmpeg is in C ...I want a API object oriented with more documentation
 
if(dragged) {
sf::Vector2i ms = sf::Mouse::getPosition(*window);
//what do.
}
 
Yeah - I just glanced at FFmpeg - can't see any API?
 
I left comments for you
 
sf::Mouse::getDelta(*window);
 
1:58 AM
no such thing :|
 
Then write it.
store the last mouse position on the class - in fact, it should probably be stored in Stencil.
Get the difference with the current, move by that amount, update the old mouse position.
ezpz.
 
already tried that
 
You are agree with that FFmpeg have not enough documentation...seriously
?
 
It seems to have lots, but no API :(
 

« first day (863 days earlier)      last day (4084 days later) »