« first day (545 days earlier)      last day (4386 days later) » 

12:03 AM
man
my previous puppy is dead
I wish I hadn't remembered that
 
12:14 AM
That's sad.
 
I know
poor thing only wanted a cuddle
 
12:38 AM
@DeadMG: What's the syntax for specifying function return types in Wide?
 
1:00 AM
@RMartinhoFernandes pronouns
 
1:27 AM
posted on April 13, 2012 by Herb Sutter

Last week at the Lang.NEXT 2012 conference in Redmond, I gave a 40-minute C++ talk and participated on a native languages panel. Both are now online at Channel 9. Here’s the 40-min C++ talk, taken from the C9 site: (Not Your Father’s) C++ Herb Sutter  What makes ISO C++11 "feel like a new language"? What [...]

 
1:57 AM
Hi
 
HI
 
cpx
hI
 
user406009
Hello
 
Wasn't nearly as good as last time guys :/
I'm bored of learning stuff
and I wanna do something cool
 
2:17 AM
Camera matrix?
 
Isn't 3ds max a modeling tool?
 
Hi I'm looking for people to help test my new Android application, is anyone interested?
It is free.
 
user406009
Sure, what the heck. My download is not going to complete any slower.
 
Thanks.
If you have time to give me any feedback I would really appreciate that.
 
I would, if I had an android device :(
 
2:31 AM
Thanks anyways.
 
user406009
Hmm. I punch 4/(5)4 and get 1.25. I sort of feel like either an error or warning should be made.
 
Thank you I will fix that right now. Again I appreciate the feedback.
Right now it expects an operator to be in between operators and parenthesis.
I will make it so it automatically inserts the *
 
2:47 AM
@ScottW Probably can get the position and direction and aspect ratio
@ScottW So does it give you the matrix or just the camera properties?
Ah, cool. Just curious.
 
I am on a new computer now
recommended C++ environment/download?
 
is visual studio free?
 
You should run Windows inside a VM running Linux inside a VM running Windows inside a VM running Linux and use notepad.
 
Visual Studio Express is free.
The full version is not.
But there is a lot you can do in the free version.
 
2:58 AM
what does the full version have that the free does not
 
Not a lot
 
For me, the only ones that matter are the x64 compiler and OpenMP.
Without those two, it's useless.
 
Cool stuff, but not essential if you're learning or not doing big softwares
 
x64 compiler?
i am on a x64 laptop
 
3:01 AM
If you're asking that, then you don't need it.
It won't be able to compile for 64-bit.
 
well i might
 
But you can run 32-bit programs on 64-bit.
 
what does the 64 bit compiler allow me to do?
 
Do you know the difference between x86 and x64 programs?
 
not really
 
3:02 AM
Then you don't need the 64-bit compiler.
 
what is the difference?
 
64-bit is a word size that defines certain classes of computer architecture, buses, memory and CPUs, and by extension the software that runs on them. 64-bit CPUs have existed in supercomputers since the 1970s (Cray-1, 1975) and in RISC-based workstations and servers since the early 1990s. In 2003 they were introduced to the (previously 32-bit) mainstream personal computer arena in the form of the x86-64 and 64-bit PowerPC processor architectures. A 64-bit register can store 264 = different values, a number in excess of 18 quintillion. Hence, a processor with 64-bit memory addresses ca...
 
well i know that
i mean what is the fundamental advantage
 
Memory.
 
and (in most cases) performance since there's more registers.
 
3:03 AM
so it's just more memory efficient? no speed gains?
so how would i "not need" such gains
if i am primarily focused on speed
 
What are you writing?
 
user406009
You would probably have more instructions available. That combined with more registers should allow the compiler to make faster code.
 
programs that require speed
 
Like...?
 
probably his recursive Binomial modulus thing.
 
3:05 AM
@CatPlusPlus Stuff that runs on cars, of course.
 
yes
 
@JohnSmith Those two things aren't unrelated.
 
user406009
Perhaps you should comment in red stripes in your code. Maybe that will get you the speed you want.
 
user406009
</sarcasm>
 
It's common knowledge that "da red wunz go fasta!"
 
3:07 AM
If the program requires speed, strap your laptop to a jet engine.
2
 
@Mysticial: What occupation do you have that you go to various super-duper-computers and run stuff on them?
 
@GManNickG I'm an RA for some biggie professor who helped get that computer.
 
@Mysticial I am, as they say, jelly.
 
Jelly meaning jealous.
 
3:10 AM
oh. How have I not heard of that before - English being my best language...
 
Don't know why you guys are being needlessly rude in the face of otherwise reasonable questions
 
It's mostly internet-stupid speak.
@JohnSmith I'm kinda with you there.
 
still... I (think) I read enough reddit and other forums...
@JohnSmith Didn't I answer your question? 64-bit is (usually) faster?
 
Sure, but not without a lot of you guys being dicks simultaneously
 
Well, it's the C++ room. We're all dicks at times and we hate being on topic.
 
3:13 AM
Just saying, it perpetuates the stereotype
 
You're taking Internet way too seriously.
 
<3 for all.
 
It's not healthy.
 
case in pt
 
user406009
I think all the joking around is because how small a difference the CPU architecture would make related to other things.
 
3:14 AM
Well, then that's important to know
Like I said, reasonable question
 
To give you answer that I think you're looking for. For what you're doing, it's probably not worth paying the $$$ for Visual Studio Professional just to get the x64 compiler will probably give you negligible speedup.
 
We're on chat to unwind, be silly, and generally joke around.
room topic changed to Lounge<C++>: Being serious is a bannable offence. [c++] [c++11] [c++-faq]
 
offense*
Or did I miss the joke. :)
 
Also, if the point of the challenge is to write the fastest program. I don't think beefing up your compiler and running on the fastest computer @ 10GHz under liquid nitrogen is what they are looking for.
 
Offence in BrE.
Unless I have a wrong dictionary installed.
 
3:23 AM
It's not about "fastest program"... just fast
when a program takes days to run, that sucks
even with O(log n) runtime
 
When a program takes days to run, switching compiler to x64 won't help it.
Also it sucks less than an equivalent program that takes a minute to run, but 10 years to develop.
 
@CatPlusPlus Indeed, even at the extreme, I rarely see x64 providing more than 2x speedup even with hand-tuned micro-optimizations that fully utilize the greater register width and quantity.
 
Hmm..odd -- I fairly routinely see around a 3x speedup.
 
so what 9 days to 3 days?
 
Hitting a slightly earlier topic, I'm reasonably certain you can (still) get the x64 compiler for free as part of the SDK -- it just isn't integrated with the IDE that way.
 
3:27 AM
that seems rather large to me no?
 
@JerryCoffin What kind of programs? 64-bit multiply intensive?
 
@CatPlusPlus TIL.
 
@Mysticial Mostly floating point (keep in mind the x64 compiler generates SSE instructions -- not optimally, but still better than x87).
 
@JerryCoffin Oh, you're also factoring x87 -> SSE2... That I didn't count.
When I compare x86 SSE with x64 SSE, I rarely see more than even 25% difference on the same code.
 
I don't think I've ever seen a noticeable speedup with x86 vs x64. But then again, I don't do boring number crunching.
 
3:30 AM
Even when the intrinsic code was written for x64 and register spills all over the place on x86.
 
@Mysticial Ultimately, I'm just counting what I see when I take programs and run them through the x64 compiler.
 
@JerryCoffin Fair enough.
 
Granted, I don't see 3x from anywhere close to every program, but enough that it doesn't surprise me at all when I do see it.
 
The only place where you can expect a gigantic performance with x64 is with tons of 64-bit integer multiplications
 
which is precisely what i am using
 
3:31 AM
Well, Goblin Camp crashed faster on x64, that's kind of a speedup.
 
@Mysticial Well, if you have a lot of 64-bit operations in general, you're likely to see a pretty decent improvement (not least because you suddenly get more register space).
 
why are all these IDE's so bloated
i open up VS, takes eons
I open up Eclipse, takes eons
 
@Mysticial Have you ever looked into superoptimization?
 
If opening an IDE takes eons, then you might want to seriously consider upgrading your hardware.
@GManNickG That's exactly what I do.
 
@JohnSmith Jerry's first rule of building computers: always go heavy on RAM. For real programs, it makes more difference than CPU speed even dreams of. VS opens on my 5 year-old machine in (just checked) about 3 seconds (2 if I don't have it show the "start page").
 
3:34 AM
I don't think I've ever open-sourced anything that I've (seriously) superoptimized... yet...
 
@Mysticial ! As in generating a provably most optimal program?
 
@GManNickG It depends on how you define provable. For example, if I assume that a task needs N multiplications. And I know the processor can handle M multiplications/cycle. I can write programs that achieve a certain factor of "optimal".
Depending on the task 90% is considered good inside cache. 70% is good in memory.
But if you want to factor in algorithmic improvements - then that's probably not provable.
 
@ScottW That's not true at all.
I should clarify then that when I say superoptimization I mean this:
Superoptimization is the task of finding the optimal code sequence for a single, loop-free sequence of instructions. While garden-variety compiler optimizations really just improve code (real-world compilers generally cannot produce genuinely optimal code), a superoptimizer's goal is to find the optimal sequence at the outset. The term superoptimization was first coined by Alexia Massalin in her [http://portal.acm.org/citation.cfm?id=36194 1987 paper] and then later developed for integration within the GNU Compiler Collection ([http://portal.acm.org/citation.cfm?id=143146 GSO] 1992). Recen...
It's relatively new.
 
@GManNickG Oh, yeah. I do that. I can never get it perfect. But depending on the situation 90 - 95+% of a "provable limit" is common.
 
@ScottW Because there's a metric to determining its speed?
For example let's say on my simplified platform, the fewer the instructions, the faster it is.
 
3:40 AM
The # of instructions is an integer. You can't get lower than zero. Therefore one of them has to be the lowest.
End of proof.
 
Can any programs with a length of one instruction compute it? If so, there's the fastest solution. Otherwise try two instructions, and so on.
 
@GManNickG I think your proof by induction is rigorous. :)
 
@Mysticial That's awesome. My recent major interest is in trying to research this stuff and see what new ways might exist to come up with guaranteed optimal programs. No trivial task, but that's what hobbies are for.
@Mysticial Oh is it, I'm known for extremely rigorous proofs. The previous statement is true, for example, because this one is too. QED.
 
@GManNickG In the general case, finding a tight lower bounds is NP-something. But in the most actual applications, you can prove a lower bounds simply by identifying a single bottleneck - such as a critical path or the number of a specific type of instruction.
 
@Mysticial Yeah, identifying one bottleneck about halves the search space.
 
3:45 AM
A very common thing I do, is start from bottom up. You can call it premature optimization if you like it:

Basically, I start by writing the inner-most loops and superoptimizing them to achieve that 95% of a provable limit.
 
(Interestingly this also applies to generating superoptimal tool-assisted speedruns, another hobby of mine.)
 
Then I start building the rest of the program on top of that low-level code. And at each layer, I run benchmarks to see how much overhead I take.
 
@ScottW Heh, same argument as before. There is a limit, so your statement is trivially false. I can't beat the game if I'm at the title screen.
 
Typically, after going into memory-bound data a 70% efficiency of the provable limit is already amazing.
 
@Mysticial That's a good approach that I may steal. Considering your occupation, I don't think you can call such optimization premature. :P
@ScottW Huh? Such a thing isn't (necessarily) possible.
 
3:49 AM
@GManNickG Yeah, from my experience, a properly done bottom-up (premature optimization) approach can get factors of 10x or more over an OOP-heavy "top-down" (make it work - optimize later) approach.
 
@ScottW I'm not sure I understand what you're saying. :/
@Mysticial But don't tell people that!
 
But bottom-up optimization is something that's taken me a few years to master - not recommended for the average programmer.
@GManNickG Oh yeah, it's gets even better when you start factoring things like parallelism... Sure, "top-down" will make you finish your program 10x faster, but then you stand helpless after you realize that you can't parallelize for shit.
 
@Mysticial Yeah, I've noticed the one thing I can't quite tell people is to not worry about concurrency until the program is done. It's too fundamental.
 
So that's where people start to blindly insert OpenMP pragmas everywhere and get like tiny speedups - or negative speedups.
 
@Mysticial Oh god. "Guys why isn't this loop faster when I thread it? float s = 0; for (...) { s += e[i]; }"
(To be fair I have no idea if OpenMP is smart enough to do that properly, I assume it just puts a lock on s.)
 
3:54 AM
@GManNickG That's about where half the rep I get from the OpenMP tag comes from...
 
@Mysticial Ha. I should follow you around on tags and steal your reps.
 
Another big difference between "top-down" vs. "bottom-up" programming is that "bottom-up" will catch the kind of things that got me my two best answers on SO. :)
 
OH I didn't realize it was you that figured out it was denormalization on that particular question, nice.
 
@GManNickG Yeah, that question was awesome... I can't believe how popular it got.
Reddit loved it. StackExchanged twittered it. Hacker News picked it up a month later...
 
@Mysticial Nice. All I have is my stupid --> operator joke question, urg.
Well and the copy-and-swap.
 
4:02 AM
@GManNickG Dude... that's the what 3rd best non-historic question on SO?
And 4th in all of StackExchange?
@GManNickG One of these days, I need to plant a stellar question. The question badges are all that I'm missing. And I don't really ask questions.
 
@Mysticial It needs to be some bug you've encountered that only you know the answer to...that way you can email me the answer. :)
 
@GManNickG Actually, I already have one (potentially awesome) example. I wrote up the question and answer a few weeks ago. But I'm still trying to decide whether I want to be the one to ask it or the one to answer it.
I won't be doing it anytime soon though. As I need to do some more observing.
 
@Mysticial Both!
 
And if you're wondering, it's similar to my top two answers. Where you read the question and go: WTF?!?! Are you serious?
@GManNickG Can't, because of the way it "flows" it'll ruin the dramatic effect.
 
@Mysticial Haha, alright.
 
4:11 AM
Also, I think self-answers do have a tendency to make people hold back their votes.
The one I've prepared so far has the potential to be cross-tagged as Java and C# as well. So I might want to be the one to answer. In that case, I'll need to come up with another question to ask.
 
I love the planning going into this.
 
But yeah, no one else in my department has an active SO account. So I might pick you to be the one to ask it. :P
And I do need a high-rep user to ask it...
 
I just calculated that my copy-and-swap Q&A accounts for roughly 4% of my total rep (3365), I assume that's significant.
@Mysticial Fair enough, though I feel like that might get dangerously close to the line at which they say "cheating!"
 
@GManNickG Yeah, I'm a little worried about that too...
 
@Mysticial Though I can't actually point at any particular thing that's wrong with it...
 
4:18 AM
@GManNickG We're both high-rep users. So it's not like we're sockputting... The content will (hopefully) be very interesting. I think people will like it.
Heck the Trigraph question was also planted...
 
Which one?
 
238
Q: What does the C ??!??! operator do?!

Peter OlsonI saw a line of C that looked like this: !ErrorHasOccured() ??!??! HandleError(); It compiled correctly and seems to run ok. It seems to like it's checking if an error has occurred, and if it has, it handles it, but I'm not really sure what it's actually doing or how it's doing it. It does loo...

 
How was it planted?
 
The OP knew the answer and just wanted a fun question. (and badges)
 
Oh, gotcha.
 
4:20 AM
he admitted it on meta
I have no trouble with that. I learned what a trigraph is. :)
 
Exactly.
 
The site where everything's made up and the points don't matter :)
 
@Pubby Exactly. Why not have some fun while you're here. :)
 
THE POINTS MATTER, OKAY? :(
3
 
lol
And it's hard to get a lot of rep from just one post...
 
4:28 AM
Depending on your definition of a lot :P
 
More than 1000... Unless the post is highly googlable or is on the front page of the top questions list. Most of the votes it'll get will be concentrated into a few days.
 
ja
 
That's one thing I've noticed. After the whole deletion controversy ended and a bunch of historic questions were pulled off the front page. I started getting a steady stream of residuals on my top two answers. About 1 vote a day for each one.
Turns out that both questions were brought onto the front page of the top questions list...
 
Nice. I don't actually know what the deletion controversy was.
 
Oh man... meta went on a rage for a week about whether to delete all the non-constructive popular questions.
 
4:34 AM
Urg. I say widen the definition of what is constructive.
 
And it ultimately ended when them being "historically locked" - all votes and activity are locked, knocked off the front page and searches.
 
Not for an empty page. :P
 
@GManNickG This one started it:
29
Q: The Great Question Deletion Audit of 2012

Robert HarveyIn the spirit of The Great Question Deletion Audit of 2010, I give you the great question deletion audit of 2012. These are basically all of the highly-voted questions on the first "Most Votes" page that, if asked today, would quickly be closed as Not Constructive (this is not a complete list):...

 
@Mysticial Sounds fair I suppose. I don't know how anyone could consider this non-constructive: stackoverflow.com/questions/1012573/how-to-learn-haskell
@Mysticial ! The Definitive C++ Book Guide and List?! No!
 
4:36 AM
@GManNickG That's the only one that survives because we're awesome and we keep it well maintained.
 
@Mysticial Damn right. I don't want to have to start setting buildings on fire.
 
I believe everything else on that list has been deleted or historically locked.
 
Meh. They're always too worried about micromanaging.
@Mysticial So if I asked you to implement this function in x86 assembly to the best of your knowledge so that it executes as fast as possible (likely meaning smallest instruction count?), what would you come up with? int sgnnum(int x); // 0 is 0, 1 if >0, -1 if < 0
 
Believe it or not, I actually don't write assembly - aside from snippets of inline assembly.
But for that example, I'd probably just trick the compiler into using conditional moves.
*if I couldn't find a simple expression that would give it.
 
@Mysticial Ah. :) I was hoping to get a simple listing to compare against once I get around to writing a superoptimizer for x86.
 
4:50 AM
Most of the performance critical code is completely branchless aside from an occasional loop here and there.
 
How can you write branchless code? :S
 
I found that I can usually beat the compiler in optimizing SSE code. But not for the messy x86 integer code.
 
@Pubby: int i = 0; i++; // branchless! :P
 
So I still leave most of the optimizations to the compiler.
And I "help" with all sorts of dirty tricks.
 
@GManNickG Yeah, well that's not very interesting!
 
4:51 AM
@Mysticial Yeah, they always find the weird modulo and carry flag nonsense.
On a Motorola 68020, the smallest listing that implements if (x > 0) return 1; else if (x < 0) return -1; else return 0; is just three instructions, without branches.
Found by the first superoptimizer, which I thought was pretty damn neato.
 
@Pubby If you're doing numerical stuff, there's hardly any branching at all. Loops can be unrolled.
 
Ah, right.
 
I usually don't superoptimize too much for tiny things like that. Usually a carefully hand-unrolled loop does wonders and achieves that 90%+ of optimal.
What's fun though... is micromanaging the cache...
So far I'm the only one in the whole department to attempt it. Everyone said I was crazy... But it works...
 
I have too many games. I can't decide what to play. :(
 
@Mysticial Yeah, that's my fear with "real" superoptimization, is that instruction count is not the only factor in speed. Might get complicated too quick to be practical. :/
@CatPlusPlus Solitaire.
 
4:57 AM
@CatPlusPlus Life sure is hard!
 
I ran out of adventures in KoL and I don't know what to do. :(
Life sucks.
 
@GManNickG Let's just say that my cache managing experiment got me super-linear scaling on my NUMA machine... To this date, I have yet to find a satisfying explanation.
I was like WTF when I first noticed it...
The code that repros it is 60,000 lines long - not suitable for a SO... :(
 
Yeah. : [
That's crazy though.
 
16 cores, 17.6x speedup...
WTF much?
 
Obviously there was a core hiding in the corner.
 
5:02 AM
So far, I suspect that it had to do with the threads bringing each other's data into the cache. (since they share data)
But I have yet to be able to construct a benchmark to test this hypothesis.
 
@Mysticial That's a neat idea. I can see how that would be hard to test though.
 
@Mysticial Reminds me of this article.
 
I think my prof showed me something similar.
I think this is the only 1000+ question outside of SO?
1067
Q: Our security auditor is an idiot, how do I give him the information he wants?

samA security auditor for our servers has demanded the following within two weeks: A list of current usernames and plain-text passwords for all user accounts on all servers A list of all password changes for the past six months, again in plain-text A list of "every file added to the server from re...

 
5:17 AM
I remember that, so much stupidity.
 
A more recent one is this:
-24
Q: Fastest way in C# to iterate through ALL Guids Possible

SpoiledTechie.comI have access to one of the top 50 fastest computers in the world. This question I am trying to complete is for a job that is required to get done. While it might not make sense on an ordinary regular computer in the civilized world, it makes sense to do it with the hardware and capabilities I ...

I got a good kick out of that one as well...
 
LOL
Wow.
 
"This question... is for a job that is required to get done."
What kind of job would that be, I wonder.
I especially like Raymond Chen's comment
> Look at it this way: Even if you could generate the GUIDs infinitely fast, your output file is going to be 2^128*16 = 2^132 bytes in size. That is around 10^27 terabytes. One terabyte of storage weighs around 500 grams. The mass of the earth is 10^24 kilograms, so before you run this program, you will need to acquire 500 earths and convert them all to hard drives
4
 
Brilliant.
 
That question will go -100 if it gets linked... though unlike the email question, it doesn't have a good answer to keep it from getting deleted.
 
5:27 AM
Yeah. I don't see how anyone can be so dense.
 
 
Here's a good 10k link.
As far as I know, it's the only answer that has gotten all 3 answer gold badges.
 
Page not found.
 
someone care to screenshot it?
 
@Maxpm It's a deleted question, you need a certain amount of rep to see it.
 
5:34 AM
:C
 
gotta love my stacked monitors... I can do super-tall screenshots.
 
Dayum.
 
The accepted answer has 43 votes. So the top answer gets Populist as well...
 
I don't see why that's such a bad question.
He asked for a better benchmark.
 
I can make a screenshot of that entire page with one monitor.
 
5:37 AM
@Maxpm That's a nonsensical request, though.
 
Also " Even if you don't think its possible, it doesn't mean its no plausible." lol.
 
Lol.
 
(That from that GUID iteration question.)
 
WYSIWYG editors annoy me.
 
@Maxpm Use LyX!
 
5:40 AM
@GManNickG LyX looks nice!
 
Exactly.
 
can anyone tell me why this person got -15 on this question??
 
It's based on LaTeX?
 
LyX sucks.
The output vaguely resembles LaTeX.
Just write LaTeX.
 
Hm.
 
5:42 AM
@james Every single "which language is faster" question tends to get heavily downvoted
 
It's like Dreamweaver for LaTeX.
 
No matter how legit it really is.
 
Which language is faster: PowerPC assembly or x86 assembly?
 
Because languages don't have speed.
 
Frankly, badly written asm can be slower than python.
 
5:43 AM
is French faster then Spanish? – thecoshman Nov 15 '10 at 13:03 (85 votes)
 
@CatPlusPlus Oh nonsense, it's quite close to what it would be if you wrote the LaTeX file manually, especially for beginners.
 
Oh, that reminds me: Is it specified that C++ is a compiled language, and that Java is an interpreted language?
 
@Mysticial I vote for Mandarin Chinese.
 
ok..:D
 
Weak troll.
We've had this discussion what, 2 days ago?
 
5:45 AM
The only types "which language is faster" questions that work out are the ones that go, "Why is X faster than Y at task Z" - and has code and benchmarks in both languages to back it up.
 
One thing I've never understood though, is, if the Windows API(s) are all written in C, why do people invoke them from assembler and think their code is faster than those who simply call them in C?
 
Actually, come to think of it. Every single "Which is faster? X or Y" question gets heavily downvoted.
 
@Mysticial Barely. Depends on implementation.
 
@IntermediateHacker Good question.
 
How is invoke MessageBox... faster than MessageBox()?
 
5:46 AM
But "Why is X faster than Y" questions tend to do well.
 
It's not.
It's exactly the same code.
 
@CatPlusPlus Me?
 
@GManNickG Compiled/interpreted languages thing.
 
@CatPlusPlus Oh, ha.
 
I should refer to messages, but alas, I'm too lazy.
 
5:47 AM
@CatPlusPlus Definitely. Here's one of the few examples that worked out. (though it still got closed...)
36
Q: C++ vs Java? Why does the ICC generate slower code than VC?

thesaintThe following is a simple loop in C++. The timer is using QueryPerformanceCounter() and is quite accurate. I found Java to take 60% of the time C++ takes and this can't be?! What am I doing wrong here? Even strict aliasing (which is not included in the code here) doesn't help at all... long long...

forget the walls and walls of assembly
the OP added them later
The title was a lot worse in the beginning too.
 
Who wants to help me think out a math puzzle?
 
shoot away
 
@Maxpm I'm allergic to puzzles.
0
Q: JIT Optimizations at their finest

IntermediateHackerI have read and heard a lot about how JIT compilers can make optimizations that are impossible for Native Code Compilers and that these optimizations can give huge performance boosts. So I was wondering, what are the most important optimizations that, say, the .NET Framework or the JVM do that a...

 
@Mysticial how to get good reputation if your not a good programmer..:P
 
Okay. You have a set of three positive numbers. The sum of each possible pair in the set is a perfect square. What is the smallest possible sum of all the numbers in the set?
 
5:54 AM
107
A: Is jQuery always the answer?

paxdiabloThere are two rules to follow if you want to get your answers voted up on SO. 1/ Answer every web question with "jQuery". 2/ Answer every C++ question with "Boost". 3/ Answer every optimisation question with "premature" and "evil" 4/ Learn to count properly. Boom boom, I'm here all week, you...

 
@Maxpm I'm thinking it out... expectation : hmm.. let me do some calculations... || reality : WTF is this gibberish?
 
@Maxpm Number = positive integer?
 
@GManNickG No. It can be something like 1.23.
 
perfect square kinda implies integer
 
My math-y friend gave me a packet of problems to solve with programming. I'm not sure this particular problem should be solved by programming, but it's interesting anyway.
 
5:56 AM
I'd say 6 if all 3 numbers were 2.
 
@Mysticial Yeah, that's why I was trying to clarify lol. But on second though it need not be integers.
 
@Mysticial 9 is a perfect square. Two numbers in the set could be 8.5 and 0.5.
 
I sometimes wonder if programming is really as useful as people assume it to be.
 
@Mysticial Don't sets disallow duplicates?
Or is that just the programming sense of a set?
 
eh... I fail...
 
5:57 AM
Math sets generally mean without duplicates.
 
@IntermediateHacker Yeah.
 
Though its obviously just a matter of definition.
 
If all 3 numbers are sqrt(1/2).
Assuming duplicates are allowed.
 
@Mysticial: sqrt(0.5) + sqrt(0.5) is not a perfect square.
 

« first day (545 days earlier)      last day (4386 days later) »