« first day (601 days earlier)      last day (4346 days later) » 

7:01 PM
can't you just static_cast those?
they're both already integers anyways.
 
You can't static_cast unrelated pointers.
 
@ManofOneWay My current project is implementing dtoa (converting floating point numbers to strings) from scratch. I never thought there would be that many hoops to jump through. Getting it right for "sane" numbers is trivial, but the corner cases really get you.
29 mins ago, by Collin
@FredOverflow Top right corner, there's a little icon, click it.
 
@FredOverflow any reason you aren't just using David Gay's dtoa?
 
@ecatmur I want to understand dtoa by reimplementing it, not just use blindly.
Also, David Gay? I don't want to use a homosexual dtoa ;) just kidding
 
ah, that kind of current project
 
7:09 PM
@ecatmur That looks extremely complicated. I bet I can do it with less code and way more readable. But we'll see. I like the challenge.
@ecatmur Are you implying anything? ;)
 
Why isn't my tree view getting the drop event?
 
Did you register the tree view as an observer (or whatever)?
 
aargh gcc is segfaulting in ___chkstk_ms... wtf
 
Well, it works when I drag from the tree view to the tree view, but not when I drag from somewhere else to the tree view.
 
What GUI framework are you using?
 
7:13 PM
WPF.
 
never heard of it
 
@FredOverflow Windows Presentation Foundation.
 
@FredOverflow Windows Presentation Foundation? Goodness how not?
 
I hate GUI programming with all my heart. All I (barely) know is Swing.
 
7:14 PM
It's like one of the big APIs that was introduced in .NET 3.0, along with WCF and WF.
@FredOverflow Maybe that's because you hate GUI programming.
 
Never did any programming in .NET either, sorry :)
 
Because Swing is made of shit, with a side order of shit, covered with shit sauce.
 
Can I have shit for dessert?
 
No.
Anyway, WPF is WinForms' less retarded cousin.
 
Hey, I like VB.NET winforms
 
7:17 PM
@EtiennedeMartel Is WinForms that stuff from the Win32 API? Or is that even worse?
 
I only once looked at Qt, and the user code is nice.
the underlying code has to be one big mess.
 
@FredOverflow swing ain't c++...
 
@Hans So? I'm not married to C++. I sleep with many programming languages. Even that Java slut.
 
swing ain't punk
 
How do you new an array in C? I honestly don't know. And I'm proud of that.
 
7:21 PM
@FredOverflow It's a .NET wrapper around the GUI parts of Win32.
 
@rubenvb int * p = malloc(100 * sizeof *p) gets you an array of 100 ints. You free it with free(p). Note that there is no distinction like delete and delete[] you have to keep in mind.
 
Proud of ignorance?
 
@FredOverflow thanks.
 
@FredOverflow Try C#. If Java's a slut, then C#'s an high class escort.
 
@Pubby proud I'll never misuse malloc cause I don't know how :)
 
7:22 PM
Shooting yourself in the foot is better than never shooting at all :)
 
@EtiennedeMartel Does Visual Studio run in Linux?
 
Shooting yourself in the foot is better than not knowing how to hold the gun.
 
I don't want to shoot myself in the foot.
@FredOverflow mono, and monodevelop.
 
@Pubby Better to have shot and suffered than never to have shot at all!
 
@FredOverflow No.
 
7:25 PM
2 days ago, by Mooing Duck
user image
 
@FredOverflow isn't that a bit like asking if google bings?
 
@Hans Does it?
 
 
@FredOverflow visual studio is pretty much an ms orgy of .net-ness
 
FYI, the malloc thing is for a simple C test of performance: CRT asm vs C and GCC builtins
 
@FredOverflow You teach programming / C++ ?
 
@ScarletAmaranth yes/yes
 
Programming slash C++?
 
It's a new programming language.
 
 
7:29 PM
@FredOverflow What books do you use as recommended material ?
 
Best title ever
 
/ C++ actually sounds like a programming language
or maybe \C
 
@FredOverflow (C++-wise)
 
to mean "escaped c" or something
 
lol i need to \coding at work before I go mad!
 
7:30 PM
Is Haskell the shit?
 
@ScarletAmaranth For the C++ course, the Stroustrup swan book.
Also Accelerated C++ and C++ Primer.
 
@ScarletAmaranth You've seen this right?
1210
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are released every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a good C++ book...

 
@Collin I'm Yeah I may have, I'm just wondering what's used as learning / teaching material.
@FredOverflow Thank you.
 

Haskell

concatMap = ((.).(.)) concat map
 
7:32 PM
@Hans Haskell is awesome.
 
1
Q: Auto populate select box

Ryan MurphyI am trying to auto populate a select box using Jquery and JavaScript. I done some searching and came across this question and followed the advice of the selected answer. I originally set up a jsFiddle to illustrate my problem: http://jsfiddle.net/GJdBR/ After receiving some advice on answers...

 
Where is Captain Bin?
 
i'll make sure not to ever play any of those games
 
Hey, what's the Review tab for?
 
@PrivateVoid Why does the language a game is programmed in matter?
 
7:35 PM
The review tab is for boring people
 
what does it do, though?
 
It doesn't i just dont like Oracles crap all over my system
 
You get to review other people's posts and do stuff with them
 
it lists things that might suck
and you're supposed to make them not suck
 
@PrivateVoid You do realize that it sucked before Oracle took over, right?
 
7:39 PM
It still sucks.
 
Those lucky bastards @ 0:20!
 
Warning, incoming fanboys.
 
Lol.
 
7:48 PM
> only wimps use BASIC - write in C
 
Yargh. Someone broke my fix. And then someone else did a crappy svn merge and lost the revision information. I DO NOT KNOW WHO TO YELL AT.
 
@SamDeHaan breaking my blame command is probably worse than breaking the build
 
@SamDeHaan Yell at everyone.
 
howdy
 
@EtiennedeMartel including jalf? Can we yell at jalf?
I hate how long it takes MSVC9 to cancel a build
 
7:54 PM
sure, go ahead
 
@jalf what the hell
 
Did someone actually write a song about C?
 
@DomagojPandža More than one, I think
 
I hit the build button. I hit the cancel button. It compiled 14 files before it stopped.
 
the CS department where I studied had at least 3 songs for any language you care to mention
 
7:56 PM
4>Build Time 0:03
2>Build Time 0:05
1>Build Time 0:05
 
C is for cookie, that's good enough for me
 
@MooingDuck and you're not on a 14-core machine, I assume? ;)
 
I finally made myself a full linux machine
soooo nice :)
 
7:57 PM
as opposed to a half full one?
 
You mean a non-working one? </troll>
 
Go away @Cat.
 
actually it works
surprisingly
@jalf I have loads of Linux vms
but now I have a machine with only Linux on it
 
@Collin Seriously. Blame is the best.
@Collin Luckily our bug tracker still believes the merged branch exists, and saved the revision information for me. Muahahaha blame success.
 
@jalf IA64
@jalf IA64 assembly, that is
 
8:08 PM
user image
3
 
@jalf nope, four core.
 
I wonder if you can disas java
 
Sure you can.
 
and i don't mean with the java profiler
 
8:12 PM
javap -c Foo
 
I mean disas the actual jvm
such wonders you must be able to find
 
The JVM itself or the JITted code?
 
the jvm itself
 
The JVM probably features an unhealthy amount of crap.
 
The JVM itself or the JITted code?
 
8:15 PM
I wonder what would happen
when you gprof gprof
 
Your computer would emit dark smoke.
 
How the fuck does this have two votes?
2
Q: C++ array shift to element

user1435915Ok the title is not the best but here is what im looking for. int arr[] = {3, 4, 5, 6, 7}; int index = 2; someFunctionICantRemember(int arr, int index); // result {5, 6, 7, 3, 4} I saw this function on www.cplusplus.com but i cant find it anymore. It was "built in" as far i can remember.

 
@Hans Isn't the JVM open source now?
 
huh
I wonder what language the JVM is written in
 
There is more than one JVM, you know.
 
8:19 PM
there's one main one that comes with the sdk for windows and another one that comes with the sdk for linux
 
> The Oracle JVM, named HotSpot, is written in the C++ language.
 
@FredOverflow Ah, OpenJDK is the reference implementation for Java 7, but maybe HotSpot is still closed
Oh, no HotSpot is open source now too: openjdk.java.net/groups/hotspot
 
I'm sad, Beyond Good & Evil doesn't want to run. :<
It wooooorked before.
Stupid Windows.
 
It still entertains me how people think SFINAE is something magical, it almost doesn't deserve to have an acronym. Like RAII, it's such an obvious language design decision.
 
@DomagojPandža RA II? What was RA I?
I'm just kidding, guys
 
8:32 PM
SFINAE is a language design?
 
Random Acronym I and II for obvious design decisions.
@Pubby What?
 
The way it's used is an intentional feature?
 
I like how SOLID stands for SRPOCPLSPISPDIP
 
Anything else but the concept that SFINAE represents would've been destructive to the notion of overload resolution and the entire template system.
 
> A young man contemplating his decreasing significance on the world stage
I like it when news articles add an explanation too obvious stock photos
 
8:35 PM
@Pubby technology inhibiting interpersonal communication
SRPOCPLSPISPDIP sounds like a band name
though come to think of it, so does "the SOLIDs"
 
Ken
Anyone ever notice that the list of 'qualifications' for IT jobs is ridiculous?
 
@Pubby Who's that hot lady in the background?
And why is she having way too much fun talking on the phone?
So many questions.
 
And why isn't the young man all over her?
 
@EtiennedeMartel It's your mom and she's talking to me
 
@Pubby I'm pretty sure it's not my mom.
 
8:39 PM
@DomagojPandža he's contemplating his decreasing significance on the world stage
 
And why is she in the background.
 
@CatPlusPlus Because she's a woman.
Sexist photo is sexist.
 
cause women are cray cray womenlaughingalonewithsalad.tumblr.com
 
But that doesn't make any sense!
 
Ken
It's photoshoped, and that's his delusional day dream.
 
8:40 PM
I love women. This world should manufacture more women.
 
 
I'm going to get a dog and name him cray cray
 
Another article used that image to show she's dumping him. Poor guy.
 
so people go like, you see that dog? that dog cray cray
 
8:41 PM
@Pubby Damn.
 
The company owes $150.7 million... What the fuck costs 150 million?
 
@Hans You do, and I will reach through this interweb pipe connecting us and I will stab you in the eye.
 
I already have a dog named America
 
Oh, it's on.
 
so I can say, I'm going to go feed America
 
8:41 PM
@DomagojPandža A lot of pizzas.
 
@Hans 'Merica.
 
it's time to help America
 
@CatPlusPlus Or a lot of beers.
 
I know what America wants
 
You could support a team of 20 people with a salary of ~3000 dollars for an entire year with just over a million bucks. Take a few years, spend a few million bucks, make a quality product based on your own technology. If it's good, it will sell without dickheads in marketing. If it's not, try again.
But no, better spend 150 million in a few years on pizzas and big titties.
 
8:44 PM
@DomagojPandža to be perfectly honest, that does sound quite awesome
 
It's arguably more fun than making a quality product.
 
I admire the QA guys for their ability to not go insane.
 
Is it possible to tell GCC to skip the std frames when stepping through an std::function invocation?
 
GDB, you mean.
 
Yeah, GDB.
 
8:45 PM
Set a breakpoint inside the inner function, continue.
 
GNU gdb 6.3.50-20050815
Already a year has passed...
Death draws near.
 
so what's everybody gonna do for Y2K38?
 
Turn on my x86 machines
and watch them die.
 
Hello.
 
Drive. The. Damned. Rendering. Loop. On. Another. Thread.
 
8:53 PM
@CatPlusPlus That sometimes works. But in my case it's a central dispatch function that gets called many times before my original breakpoint. My workaround then is to disable it and the enable after I hit the original breakpoint. But that requires careful coordination taking my concentration away from the real problem..
Anyway asked on SO.
 
@MooingDuck You around?
 
@Drise I just ended my lunch break.
seconds ago :D
 
Can you check if I did this right?
0
A: Quickly labeling some elements according to the most occuring labels

DriseOk, I'm taking a big shot in the dark here, but it's worth a shot. std::map<std::string, int> foundLabels; for (unsigned int i = 0; i < labels.size(); i++) { if (foundLabels.count(labels.at(i)) foundLabels[labels]++; else foundLabels[labels] = 1; } std::string mostOccuringL...

I think I'm on the right track...
And jesus, if you just ended you're lunch break, I'm about ready to go home lol.
 
Any time
is break time
with a kitkat bar
 
vector<string> labels;
std::map<std::string, int> foundLabels;
foundLabels[labels]++;
There's definitely something wrong there
 
9:06 PM
hmmm
 
@MooingDuck Good catch
Fixed
 
folks, whats the matter?
 
@Drise You should note that your answer only solves the last step of the quetsion
 
@JohannesSchaublitb See above
@MooingDuck I did.
 
@Drise no, you have a comment that says that. Comments can be and are deleted without warning.
 
9:11 PM
@MooingDuck Also fixed.
 
@JohannesSchaublitb It would so appear that whenever you fancy a star, you incorporate "folks, lads, dudes, pals, mates or friends" in your sentence :)
 
x^2+y^2 looks suspiciously like ax^2 + by^2
 
uuuh what ?
that's analytical representation of a circle with center at [0,0]
 
just saying it don't look too circular
 
x^2+y^2=r or something like that
Possibly r^2.
 
9:22 PM
also 9gag ಠ_ಠ
 
but
if you want the center
it is (x + a)^2 + (y + b)^ = r^2 i think
 
Also tg and ctg not silly tan and cot. ._.
 
I'd like to see U(0)
or U(1) + U(-1) - 1
a.k.a. the egyptian
 
I'm so bored doing anything seems too boring.
 
thewikigame.com
 
9:25 PM
Boring.
 
@MooingDuck Awww... stealing my thunder?
 
@Drise you only had half a thunder
bam, now it even compiles
 
@MooingDuck I have 3/4 of it now...
I'm still missing something
 
@Drise FLT_MAX is in <cfloat> btw
 
9:33 PM
@CatPlusPlus notpron? the hardest riddle on the Internet.
 
@CatPlusPlus Heres some catnip...
 
I don't like notpron.
Obscure and not really fun.
 
@MooingDuck Would you mind helping me finish mine? I'm so close, I think..
 
@CatPlusPlus I liked it, I was able to take it seriously back in 2008? i think, that was good fun.
Oh. We all purchased the Humble bundle and are trapped in Amnesia?
 
9:40 PM
@Drise you never change minDistance even when you find a shorter distance
@Drise distances might be bigger than 1e100
 
I'm not going to play Amnesia, ever.
 
@CaptainGiraffe or we started playing psychonauts and realized it was the best game in existence
 
mawnin
 
@Hans That one didn't work for me. Blast my 2 monitor setup. I need to yank a cable to try it.
 
@MooingDuck Thats a placeholder for now, and I updated it.
 
9:43 PM
@CaptainGiraffe :(
 
Yes, Psychonauts is a wonderful game.
 
@Drise so you have associated the labels of d to c. (dataToComponent) Now you need to iterate through components, and find the data/label that shows up the most. Your two halves don't work well togeather at all :( One will probably need a complete rewrite
 
There is something eating at me in the water, after I jumped down a level, any Ideas how to get away from that, besides "stay out of the water" Amnesia.
 
@MooingDuck Bah, I don't want to give up. But this question is so very puzzling...
 
@Drise yeah, I had to read it like 6 times before I felt safe to start coding.
 
sbi
9:53 PM
@RMartinhoFernandes Well, I guess we all know that kids can be mean sometimes. It's mainly because they know so little about this world, and still have to learn so much regarding social behavior.
 
@MooingDuck I don't handle multiple containers and containers of containers very well.
 
@Drise that's what typedefs are for
@Drise if it's confusing, only touch one per line.
 
Which is why I put them in my post originally lol
@MooingDuck Ok, I'm lost. I have no idea whats going on anymore...
 
@Drise note that for his sample, you don't have to do anything with COMPONENT or DATUM, they might as well be int for all you care.
@Drise I never had any idea what your plan was, sorry :(
 
yea, I know, but it's the second piece thats bothering me
 
9:57 PM
dudes
 
How do labels = {l1,l2,l1,l2,l1,l1,l1,l8,l1}
I have both peices, how do I stitch them together?
 
@Drise what language is that?
 
@Drise 9 elements in data were close to a component c right? Each data has a label. Those labels were {l1,l2,l1,l2,l1,l1,l1,l8,l1}. The label that was given to that component the most was l1. So that component should be named l1.
 

« first day (601 days earlier)      last day (4346 days later) »