« first day (571 days earlier)      last day (4378 days later) » 

6:13 PM
@RMartinhoFernandes you'll only be perfect when I can spit code at you like a geordi-bot, have you compile it and output the result.
 
That would be subservience, not perfection!
 
@RMartinhoFernandes yet you are incapable of it, even if it is just to patronize us, which means you are lacking the ability
 
@RMartinhoFernandes Oh, you.
 
@RMartinhoFernandes ah, but the ability would be part of perfection
 
@RMartinhoFernandes #define t1 template\#define t2 typename\#define t3 typedef\t1<t2 T>struct a_p {t3 T*type;};t1<int N,t2 T>struct a_ps : a_p<t2 a_ps<N-1, T>::type>{};t1<t2 T>struct a_ps<0,T>{t3 T type;};t1<int N, t2 T> struct amp : a_ps<80,t2 amp<N-1, T>::type> {};t1<t2 T>struct amp<0,T>{t3 T type;};int main() { amp<80, int>::type p; }
see? you wrote it and it won't even work
pathetic!
 
6:16 PM
hmm, a google search for webscale returns a lot of mongodb hits
 
@MooingDuck Duh.
 
If any one of you gets hold of the source of SimCity 2000 (no matter how, but that probably wouldn't be legal), please plink me, I want to port that shit to Mac OS X.
 
Wow, that's random.
 
@stdOrgnlDave That one's easy: has an undefined reference to main.
@MooingDuck I do have the ability to do that.
 
6:20 PM
@RMartinhoFernandes undefined reference to main?
 
Yes. That code defines a single macro named t1 and nothing else.
I bet geordi-bot wouldn't be able to tell you that.
 
@RMartinhoFernandes I think some of the `\` are supposed to be newlines
 
they are for geordi-bots
 
@EtiennedeMartel Do you mean code.google.com/p/micropolis
 
and geordi-bot will happily segfault on that
 
6:28 PM
@MooingDuck So? I'm perfect, I don't assume code is quasi-C++ if I'm told it's C++. :P
 
both the clang and gcc versions
 
Micropolis (also called OLPC SimCity) is a city-building sim game developed by Don Hopkins. It is based on the original source code of SimCity, which was donated to the One Laptop per Child (OLPC) project by Electronic Arts as free and open source software under the terms of the GNU General Public License in 2008. Micropolis is based on the X11 version of SimCity for the Unix operating system. There are two versions: The original version uses the Tcl/Tk user interface, and can be run on the OLPC, as a stand-alone game in any Linux or Mac OS X system with X11, or as a port for OpenBSD. T...
 
I was hoping to crash you too
 
@sehe he said 2000
 
> Two decades later, in January 2008, the SimCity source code was released under the free software GPL 3 license
^ it could be 2000+, logically
 
6:30 PM
You know, there's a SimCity 3000.
 
AND IT BLOWS THUNDER COCKS
 
@sehe That looks extremely boring
 
@sehe That's the first one. 2000 is the second title in the series, and it's still closed source. Hence my comment about non legality.
 
@sehe Exploding chicken causing sonic shock waves?
Oh wait, thunder is the sound.
Damn, I'm always confusing those two.
 
6:36 PM
@RMartinhoFernandes Sound is still quite fast.
 
@RMartinhoFernandes Naturally
 
why the heck does my company's XML that describes speech recognition for a language contain javascript?
 
To be hip.
 
@RMartinhoFernandes apperently it's semistandard
 
0
Q: Inheritance from two abstract classes

MWrightI have a problem that I have not yet tested/compiled and wondering if it is possible and if it is bad design? My Problem: I want to have an abstract base class A and a abstract derived class B. I realize if this is possible I will have a number of pure virtual member functions in each class an...

NARQ close votes please.
 
6:41 PM
@RMartinhoFernandes Done.
 
I don't know why people think they can tell good or bad designs expressed with As and Bs.
AFAIK, a B deriving from an A is wrong. They're both letters, and a B is not an A.
 
It's like they took the SSCCE concept way too far.
 
@RMartinhoFernandes picky picky picky
 
@EtiennedeMartel no, it doesn't compile
 
6:44 PM
@MooingDuck Oh, so it's a SSCE then.
 
@MooingDuck Well, if A, B, and C are just placeholders, then the entire example seems to be made of placeholders. There's nothing I can tell about it being good or bad. If they are concrete things, I can't thing of anything other than letters that they could be.
@MooingDuck nice, your ideone test has 19 lines, which fits nicely with my "less than 20 lines" estimate.
 
@RMartinhoFernandes helps that I deliberately avoided includes (no good reason)
@RMartinhoFernandes trivial to do it in far less (and keep it sane), simply remove foo and empty lines.
 
7:05 PM
With GCC or clang, can I exclude a specific directory from the header search path?
 
I don't think so. At least not with GCC.
#exclude <stdio.h>
9
 
Meh that sucks.
I'd be happy if I get that piece of shit called Open Dynamics Engine to finally compile.
"Use of undeclared identifier 'assert'"? WTF?
 
@classdaknok_t include <cassert>?
@classdaknok_t you can probably rearrange the order it searches paths to search the "right" one first (Assuming there is a "right" one)
I know I've rearranged path orders like that with MSVC
 
ODE is a mess. It has millions of dependencies which all have header files with the same names and some have the same name as standard headers.
 
@classdaknok_t my work is like that
yesterday I told it to an incremental build of the project with the one line I changed (in a cpp file). I went to lunch, and came back, and it said "Build: 43 succeeded".
 
7:18 PM
i descended into chat room
 
ODE y u no compile.
You know what? I'll just use Box2D.
Fuck this shit.
 
@EtiennedeMartel reminds me, the norwegian term for "vegetable" translates back to English (literally) as "green thing". like, green apples are vegetables, for sure. but then, in norwegian squirrels are "ekorn", while in english they eat "acorns". hm.
 
Finally my game compiles.
 
Yesterday I checked in a fix with the description "Project should compile again" that caused the nightly to fail. I forgot that it was a fix for a problem I hadn't checked in yet. :/
 
ouch
 
7:26 PM
umbrella effect
instead of fighting build errors, play some drums
 
The irony of the description was not lost on my coworkers
 
-12
Q: Does C++ have an API Specification?

Anonymous181If Java has an api for looking up classes, does c++ have one also for looking up commands?

^ Needs more votes to reopen.
 
Ell
Im not high enough rep :L
sorry
 
Not anymore.
 
Ell
does anyone use blogger? (thats the google thing, right?)
 
7:44 PM
I hath returned.
 
Ell
hello :)
 
@Maxpm Reminds me of the Dragoon.
 
meh, should I post this really angry rant on someone's FB?
 
Ell
one pill makes you bigger. One pill makes you small.
and the pills that your mother gives you, do nothing at all. Just ask alice. When shes ten feet tall
@TonyTheLion lemme see it first!
 
How do I find textpatterns in files using Vim?
 
7:49 PM
@TonyTheLion Probably not.
 
can I use find and grep in some combination?
 
@TonyTheLion Post it here.
 
sigh
@Lounge<C++> sigh
 
What?
 
7:51 PM
it's just someone posted a fucking spam message about hackers, blah blah, I pointed out it was crap, with a link, and then she tells me I'm being rude
I'm fucking tired of people posting claims of being hacked or forwarding these silly messages. They have no idea what they're talking about
fucking ignorant idiots
4
 
@TonyTheLion Might be because I am cold and unfeeling, but I don't find this particularly angry.
 
@TonyTheLion Apt.
 
can I specialize so I don't need a second struct to do this?

template <int n1,int n2,int iter>
struct fibonacci_c {
enum { value = fibonacci_c<n2,n1+n2,iter-1>::value };
};

template <int n1, int n2>
struct fibonacci_c<n1, n2,0>
{
enum { value = n1 };
};

template<int n>
struct fibonacci {
enum { value = fibonacci_c<0,1,n-1>::value };
};

const int a = fibonacci<10>::value;
 
@EtiennedeMartel oh ok
 
I can't seem to make it happy with only having a fibonacci struct
 
7:54 PM
@RMartinhoFernandes aww what, that doesn't sound encouraging
the 'here be dragons' part, that is
 
Candidate for longest SO answer?
5
A: How does Q_FOREACH macro work and why is it that complex?

Seth CarnegieThe GCC version The GCC one is really quite simple. First of all it is used like this: Q_FOREACH(x, cont) { // do stuff } And that will be expanded to for (QForeachContainer<__typeof__(container)> _container_(cont); !_container_.brk && _container_.i != _container_.e; __ex...

Oh wait nevermind, I remember seeing one way longer
can't remember what it was though
 
@stdOrgnlDave There's probably a way, but I can't immediately think of it.
 
@TonyTheLion he he do you believe it was a "she" :-)
 
@SethCarnegie candidate, but I've seen longer. I'm not sure whether I've written longer myself, though
 
7:56 PM
Yeah same
 
I usually link to larger samples on github if I need to post a lot of code.
 
I lost a lot of interest in Fibonacci once I realized I could calculate more digits than unsigned long long could hold in miniscule amounts of time and no lookup table.
 
Mine is just a lot of short snippets
 
If I included that, I'd definitely have longer answers than that
 
7:57 PM
@SethCarnegie Ah. I didn't notice it was your own A
 
@MooingDuck did you ever consider fib relation to golden ratio?
 
@CheersandhthAlf yes it was a "she", and she is not the smartest if you ask me
 
@Maxpm is that like a reverse fibonacci? I'm calculating the nth fibonacci number
 
@CheersandhthAlf not really
 
8:00 PM
@Maxpm not really sure what that calculates...
 
@stdOrgnlDave Not according to Wikipedia.
 
@stdOrgnlDave his calculates teh same fibonacci sequence yours does.
 
lol
indeed it does
 
Going back to thing that I gave a couple days ago:
int n = 48;
return (unsigned long long)(pow(1.6180339887498948,n) * 0.44721359549995794 + 0.5);
1.6180339887498948 is the Golden Ratio
 
@Maxpm I'm not immediately seeing how it follows the same series, unless it's using a different algorithm
 
8:02 PM
I did mine in a more functional style; I defined that a Fibonacci number "is" the sum of the previous two Fibonacci numbers.
 
I am the golden horatio
 
ok I posted my rant
 
It's not an algorithm so much as a definition.
 
@stdOrgnlDave it's the same algorithm
 
8:03 PM
ahhh. I see.
 
To be honest, I'm still having trouble understanding yours.
 
mine?
it does 0 +1 + 1 + 2...etc.
for n iterations
recursively
what's so hard about it?
 
One moment. Gotta switch computers.
 
@Maxpm his caches the last two values, which is a common optimization when calculating fibinacci. It just doesn't offer anything when doing it at compile time.
 
Hmm.
n1 and n2 are the two values before the value at iter?
 
8:07 PM
iter is just a counter to do it a number of times
notice how the halting specialization is for iter==0
 
Oh, it counts down.
I understand now.
 
@Maxpm iter counts down, the other two count up like normal
 
@MooingDuck that's called memoization right
 
@SethCarnegie That sounds like a word. I don't word.
 
8:13 PM
@SethCarnegie yes it is
 
@SethCarnegie It is indeed :-)
Easy to do with variadic templates.
 
Memoization is "fun" to deal with you start running into memory problems. :)
I've done a few things where I had to find creative ways to "compress" the things that are cached - while preserving as much precision as possible.
 
Sounds fun.
 
Yeah... I had an example where a lookup table was approximately 20 GB - about 120% the size of the dataset itself.
By introducing (an expensive) math trick to "compress" it, I got it down to about 70MB.
 
Luckily it rarely comes up for most programmers. Only for science/physics/HPC
 
8:22 PM
Although it increased the amount of computation by about 10%. It sped up the code by 50% and cut memory usage down by a factor of 2.
 
@Mysticial changing 20GB->70M cut memory by factor of two? You had 20GB of other data too?
 
@MooingDuck Yes.
 
I think the troll got trolled without knowing it
seeing as he put so much time into his responses and the other guy didn't at all
 
Yeah.
 
lol
0
Q: c++ how to save a double with ony two decimals?

user1165435I have the following : double r=1.9887894e+09; double th=5.08878856+06; when I print double result =r*th; the number is very huge and is not realistic. How to change the r and th value to 1.98 and 5.08? How to solve this? I need to change each double to just 2 decimals after "." I am workin...

huh????
 
8:27 PM
Does anyone know where I can find a list of all the ways you can pass parameters in Common Lisp? I can't seem to find a list of them anywhere
 
ewwww... lisp...
 
@Mysticial apparently huge numbers are not realistic
And lisp is awesome
 
Ell
at a guess - intel i3 2nd gen could play bf3, right?
 
There's a couple child-hood games that I've been wanting to play again.
Haven't had the time to find a PS1 emulator yet.
 
@Mysticial which ones
 
8:30 PM
I did manage to find a SEGA genesis emulator.
The Sonic series on SEGA genesis. That one I found and got it to work. :)
 
I'm sad my long answer didn't get more upvotes :(
 
And Musashi on PS1. I haven't had the time to start looking for it yet.
@SethCarnegie What answer?
 
This one
7
A: How does Q_FOREACH macro work and why is it that complex?

Seth CarnegieThe GCC version The GCC one is really quite simple. First of all it is used like this: Q_FOREACH(x, cont) { // do stuff } And that will be expanded to for (QForeachContainer<__typeof__(container)> _container_(cont); !_container_.brk && _container_.i != _container_.e; __ex...

 
Xeo
@Mysticial Don't remind me of that, I'll get all nostalgic!
You know, you could also point to that post explaining BOOST_FOREACH, since the VC part of Q_FOREACH works the same as BOOST_FOREACH in general
 
@Xeo Don't need to be. Just get the emulator. :)
Though I forgot exactly where I DL'ed it from. I can quickly google the name though.
 
Xeo
8:33 PM
I think I already have it (+ the games)
 
Kega is best genesis emu
 
Now what I want to find are emulators for the entire pokemon series and find a way to transfer all my saves from my carts to it.
 
Xeo
Savegame editor?
You can just handedit them in there, I think
 
The handhelds and those cartriges don't last forever. But an emulator that runs on x86 will.
@Xeo That's a lot of data to hand-edit.
 
@Mysticial: For PS, you probably want PSXjin. Though it's made with a focus on TASing.
 
8:34 PM
Especially when you can't see your pokemon's hidden data like EVs and IVs.
 
Xeo
Well, no other choice really, is there?
 
I have an action replay with a USB link.
 
Xeo
Oh, right, I forgot about those
 
I just haven't bothered to find if anyone has made tool to rip out the save data via action replay and dump it into a major DS emulator.
@GManNickG Cool, I'll save that link for when I get around to it. lol
N64 emulators is next on my list.
But I think getting an N64 emulator to work with a GBA emulator for Pokemon Stadium 2 is too much to hope for. :(
ah... old games... good old times.
 
Xeo
Do you have some kind of nostalgia bucket list or something?
 
8:40 PM
@Xeo All in my head for now...
 
@Mysticial Project64 or MupenPlus.
 
@Mysticial he seems to want two digits of precision after the decimal
 
@GManNickG You seem to have already done this. :)
 
@Mysticial :) I like emulation.
 
Last year at the Anime convention in Chicago... they had a SEGA genesis emulator with Sonic 2.
I was like... holy shit...
along with another guy... 15 year man...
 
Xeo
8:41 PM
@Mysticial psst those are all secret projects he worked on, this is just shameless self-advertisement!
 
And were at it switching off between sonic and tails for several hours.
 
@Xeo Ha, I wish. I'll make an emulator someday...
 
koiyue/helllo/konnichi ha
 
Xeo
I really liked the concept of Sonic & Knuckles
 
As soon as I got back, I spent a few hours hunting down emulators until I got one to work. :)
 
8:42 PM
@GManNickG an emulator would be cool
 
Xeo
Inserting Cartridges into it to play varieties of the game
 
I was pretty deprived as a kid when it came to video games.
 
an emulator for what?
 
The only thing I had were GameBoys. My parents got me an N64 only because I could play pokemon on a TV rather than a tiny screen - better for my eyes.
 
Ell
I have an N64!!
 
8:44 PM
I have PC :D
 
Xeo
Heh, I had an SNES and an N64, then got a GB, GBC and my latest GameBoy is still the GBA
 
Ell
i have a sega mastersystem :L
 
Most of the other games that I'm nostalgic for I played at friends or school...
 
@TaylorBioniks Well, firstly an emulator that works would be nice. But mostly an emulator that doesn't end up as scraps of shitty code piled together. My main focus, purely out of bias, would be N64, though a universal emulator/plugin type thing would be neato.
 
Xeo
Oh, yeah, and I got a GameCube
 
8:45 PM
0
Q: Which C compiler should I use for creating my own simple OS?

Amir SaniyanThis tutorial shows how to write my own simple Operating System: Write Your Own Operating System Tutorial: http://joelgompert.com/OS/TableOfContents.htm Every thing is OK, but developing language is Assembly. I want develope my simple OS with C programming language. I want a C Compiler that ...

 
Ell
i have an n64, sega mastersystem, gb, gb colour, gba, gbsp, ds, ds lite, xbox360, ps 2
 
he wants
> Converts C source codes to Assembly sources.
what?
 
Xeo
Answer "Hit 'compile'"
 
Ell
wants asm output of gcc?
 
@Ell just something that creates ASM sources
 
8:46 PM
There's a number of very old PC games which I've never been able to find a DL for...
 
Ell
@Mysticial like what?
 
Netstorm for PC.
Pathways into Darkness for Mac
 
Xeo
Anyways, back to Hoshimemo. I need to finish this game (or atleast 1 route) tonight or I'll go for another night without sleep
 
Although not a game, I've been trying to find Windows versions of the entire After Dark screensaver series...
 
what's the GCC switch you compile with if you want to see the asm?
 
Xeo
8:47 PM
-S I think
 
@TonyTheLion gcc is the best for use with OS dev
 
So now I pretty much image every game that I play so I won't have this problem in the future.
 
I am working on an OS mysekf
 
Subject-oriented programming is neat!
 
@GManNickG a universal plugin base emulator would be super amazing
 
8:49 PM
lol
 
Xeo
@TaylorBioniks I don't think that will work, though, since they're just way too different.
 
Ell
@TaylorBioniks alone?
 
Xeo
The only common part you could make would be the emulator window or something..
 
@Ell what do you mean alone?
 
Ell
@TaylorBioniks I mean are you working on an O.S. on your own?
 
8:50 PM
@TaylorBioniks Yeah, I've been thinking about it for a handful of years now. It's important that the priority be quality rather than quantity, because there are already tons of half-assed emulators anyone can use. I want a reliable emulator with a clean and well-defined interface for tools and extensions.
 
@Xeo @GManNickG have you seen AROS OS it has a lot of emulators
@Ell yes I am working on it alone although my GF might help
 
Xeo
room topic changed to Lounge<C++>: Black Productivity Hole [c++] [c++11] [c++-faq]
 
Ell
@TaylorBioniks you have a GF that might help you write an OS!? Man you are lucky >.<
 
@Ell she knows C++
 
Ell
I wish I had a gf fullstop :L
nevermind one that knows c++
 
8:52 PM
@Ell her and I think the same way
@Ell I wish you luck finding a GF
 
Ell
thank you :L
 
Looks like it's heading towards abandon-ware, if I'm reading correctly.
 
There's also a few old games no longer run (or run correctly) on x64...
 
@Ell Yeah, no kidding.
 
8:55 PM
Haven't had the time to setup XP-mode to see if they work.
 
So many cool-sounding names get wasted on abandoned projects.
 
I love how the GF thing almost completely derailed whatever the hell we were talking about before. :)
 
@Mysticial custom OS
 
@TaylorBioniks I think every programmer dreams of making an OS, but most give up when they realize just how large/huge it is.
 
8:59 PM
Eh.
I think it's just that programmers are more irked by small imperfections than most people.
 

« first day (571 days earlier)      last day (4378 days later) »