« first day (559 days earlier)      last day (4382 days later) » 

4:00 PM
Is #undef a way to do undefined behavior?
 
#undef?
 
My textbook says it's for undefining things :D
 
Hmpf.I don’t succeed in building libgcc :(
 
@StackedCrooked haha
 
@KonradRudolph Don't try the (nearly) impossible.
 
4:03 PM
I haven’t really got any alternatives
I really don’t understand why it’s so hard to build GCC … :(
 
you need the newest version?
 
yes
and as far as I can decipher the error message there really is an error in the GCC build process
it’s trying to invoke an intermediate xgcc build with the -V flag, and this flag simply doesn’t exist
(“unrecognized command line option”)
 
Why are you trying to build it yourself?
 
Trunk GCC is not guaranteed to build or work.
 
@StackedCrooked Do you have precompiled binaries for my machine?
(It’s not trunk, it’s 4.7)
but I think I found the culprit
> 2) if GCC links dynamically to the prerequisite libs (GMP/MPFR/MPC) then the shared libraries must be in the dynamic linker's path, both when building gcc and when using the installed compiler.
RTFM, indeed
 
4:09 PM
@KonradRudolph maybe this helps solarianprogrammer.com/2012/04/13/…
 
Building GCC is a wizard's job.
It's funny how easy it is to build clang in comparison.
 
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Argh.
What a stupid piece of crap.
 
Woah
 
4:18 PM
lol
 
who doesn't love Zerg Rush?
 
The opponent.
 
pffft
 
I used to play zerg for a while back in 2003 and I mostly massed hydralisks in later game.
 
learn to worker micro, noob :P
 
4:19 PM
Bat I was never good enough to pull off rushes.
Not at that level at least.
 
ok I’m giving up for now. Tomorrow I’ll just follow advogato.org/person/redi/diary/240.html
 
I was quite good at micro buildup when playing Age of Empires II.
 
Does the C++ library have a class that is a predicate like "returns true if less than X variable?" (for partition)
 
I would like to see a strategy game where all user actions are scriptable.
 
oh hey: std::bind2nd<std::less<Obj>, Obj>
 
4:24 PM
Never played the first one.
 
hmm, I looked at the word "functional". I thought to myself "functional". I typed "vector".
 
That's quite dysfunctional.
 
Dysvector.
 
I keep forgetting about std::next too in my algorithms.
 
never heard of it
 
4:32 PM
Neither had I.
 
Fixed std::advance, that actually returns a new iterator instead of modifying it in place.
From Boost, of course.
 
why is it that my brain is showing undefined behaviour right before the exams? :(
 
For the same reason why an unhandled exception is thrown after you ship your product.
 
@CatPlusPlus I can see keeping them seperate, some iterators could be theoretically expensive to copy
 
It'd be a very poor iterator.
They're copied all over the place anyway.
 
4:41 PM
@CatPlusPlus alright, I can't think of any justification
 
posted on April 27, 2012 by Scott Meyers

For C++98, the standard everyday reference work for the C++ standard library was Nicolai M. Josuttis' The C++ Standard Library.  His updated version for C++11 has been eagerly anticipated, and I was pleased to receive my copy yesterday. I was confident that the new edition would be a worthy successor to its predecessor, but I have this whole Trust-and-Verify mentality, so I forced mysel

 
Does Feeds ever show anything I care about or should I just put it on my ignore list?
 
Yeah, if only it showed important stuff, like, tits.
 
@MooingDuck I usually find them interesting.
 
4:51 PM
Yeah i actually like those too.
A lot of stuff from herb and scott.
 
However, books like The C++ Standard Library seem less useful now that we have things like cppreference.com.
 
oops, bind2nd is a function, not a class. No wonder my code doesn't compile
well that makes it even more useful! :D
 
I would buy a dead tree version if it supported ctrl + f.
 
bind2nd is a factory for binder2nd
 
k, I'm going to run my sort for the first time. Wanna take bets as to crash vs. infinite loop?
 
4:56 PM
im thinking SO or segfault
 
@ScarletAmaranth the point of this sort is it uses constant space. no stack or extra memory. If I get a SO I'm gonna cry.
hmm, dereference invalid iterator assert. I guess that falls under crash, right?
 
@MooingDuck Test driven development is useful here.
 
@MooingDuck You'd have to try really hard to overflow the stack with insufficient data to overflow it with ^^
 
You don't need data to overflow the stack. You only need to (try to) allocate beyond the end of it.
 
meh, cba touching the base pointer :)
 
5:08 PM
Boost phoenix has lazy statements, e.g: if_(arg1 > 5)[ std::cout << arg1 ]. How can it avoid the evaluation of the std::cout << arg1 statement if the condition fails?
 
Magic.
Possibly expression templates.
 
Expression templates being the kind of magic.
Note that std::cout << arg1 uses a Phoenix operator, not a stream insertion operator.
 
You mean it has a signature that looks like: PhoenixObject operator<<(std::ostream &, const PhoenixObject &);
 
More likely to be a catch-all on both sides, i.e. (Lhs const& lhs, Rhs const& rhs) with some SFINAE magic.
 
Basically, lots of magic.
 
5:16 PM
The Boost.Proto kind of magic. It goes deep.
 
Templates all the way down.
 
5:33 PM
there we go, now my sort got in an infinite loop.
(that's progress, right?)
 
Are you stepping through the code with a debugger?
 
… and we’ve got another flamewar in the making
1
A: C++11 friendly graphics library

Konrad RudolphThe closest to what you want is probably SFML which is a quite clean object wrapper around OpenGL that uses modern C++ idioms more or less throughout. It’s not using C++11, however, and it’s much too large to be just ported over (it includes sound, networking and lots more in addition to graphic...

 
@StackedCrooked haven't got that far yet
@KonradRudolph it's the internet
 
To be fair, SFML sucks.
 
@CatPlusPlus Dunno. Not as much as SDL or Ogre3D, surely
out of interest: why does it suck?
 
5:36 PM
@StackedCrooked it's also tricky since I'm using my data as my data structure :/
 
It's reinventing the wheel, badly.
 
@CatPlusPlus That implies that there is already a free C++ gaming library out there … which one do you mean?
 
Everything from here shouldn't exist.
 
and what does it do badly?
oooh, yes, true
 
Especially that string class with implicit conversions between every possible type.
Also AFAIR it uses deprecated OpenGL stuff, like every damn OpenGL-using "game library" in existence.
But I'm more off put by that wheel thing.
 
5:40 PM
So, I am wondering how to go about generating an HTTP POST request and sending it to a server... what library would I want to use to do such a thing?
 
A HTTP library.
 
@CatPlusPlus Looking for a recommendation on a good one that is easy to use and light weight.
 
@Nate PoCo.Networking, libcurlpp
 
15
Q: Boost.ASIO-based HTTP client library (like libcurl)

TronicI am looking for a modern C++ HTTP library because libcurl's shortcomings are difficult to work around by C++ wrappers. Solutions based on Boost.ASIO, which has become the de-facto C++ TCP library, are preferred.

 
@CatPlusPlus The implicit conversions are the bads, but I don't see what's so wrong with having some of the rest of it.
if Boost had decent Unicode support, then I'd say use that; but as far as I'm aware, it doesn't
 
5:42 PM
There's ICU if you want serious Unicode support.
 
@Nate That is a kind of 'FAQ' in +
 
ICU's API is suck
 
You can always write an API wrapper.
 
I use Poco for unicode.
 
i was about to say poco would probably be his best bet
 
5:44 PM
@CatPlusPlus That looks perfect. Now, let me ask this. How do I use it in my VS project? Let me preface that with the fact that I'm a C# guy, so I usually do "Add Reference" and browse to the .DLL.
 
> I could never comprehend why somebody decided to make another library when SDL is already available.
 
@CatPlusPlus Because, what I'd like is to have it encapsulated into my project's binary...
 
Because SDL is terrible, duh. (I don't really want to join the flame.)
 
@DeadMG That's pretty nifty. I fired it up in Chrome as well, just to see whether the 'sprites' would be Chrome logos. Turns out it wasn't actually Opera logos in the first place :)
 
It wasn't?
 
5:49 PM
 
@sehe wait, what the... I missed that the first time
 
^ the similarity is eerie
 
@CatPlusPlus I dislike having to add .dlls to my final project. I prefer static link
 
And that's related to above how?
 
because I'd have to cock around with Makefiles for 999999 years to build ICU as a static lib
 
5:53 PM
oh, and you can click to kill them, hadn't realized that
 
@MooingDuck What other actions can you perform to rack up your APM? :P
 
have you guys seen this new votes tab?
 
@bamboon which one?
 
@classdaknok_t check your profile page, there is a new tab where you can see all your votes
 
@bamboon which one?
 
5:57 PM
@bamboon that is awesome!
 
@bamboon looking
 
Imma write a documentation generator. I'm not happy with Doxygen's output.
 
@sehe should be the right most tab
 
@classdaknok_t If the documentation can be generated by machine, it has nothing useful to say.
 
Who's happy with Doxygen output?
 
6:01 PM
Not me.
 
Also, it fails to note = delete
 
And it sees static_assert as a function declaration.
 
^^ now I can finally find closure
@classdaknok_t You're gonna use libclang, spose?
 
@sehe Yeah.
 
@classdaknok_t Yep didn't cut it, no?
 
6:04 PM
@sehe Nopez.
 
Jennifer Nopez?
 
I want to do something and to not do anything at the same time.
It's annoying.
 
Go watch television
You'll do something and not do anything at the same time
2
 
Or get involved in politics.
 
I want at least C++11 support and maybe Git integration.
Whoever the fuck is starring everything, GTFO.
 
6:08 PM
star fest
 
retract all stars
 
Someone who'll run out of stars in a minute.
 
thanks fuck for that
 
Fucking stars.
I think the star icons look unrealistic, compared to this:
 
WOW. Was the chat DOS-ed by stars?
That's a first
 
6:10 PM
 
@ScarletAmaranth TYPO FAIL
 
I still like it :D
 
@sehe Yuck.
 
get him, boys!
 
@sehe more DoLS; denial of legit stars which go down in the star list.
 
6:11 PM
@KonradRudolph: "without also applying it" It also applies to libraries you mentioned to some extent. I'm not a big fan of Boost, although there are portions I use (libraries you mentioned aren't one of them). Boost gives impression that its developers wanted to create the most sophisticated solution possible, instead of simplest possible solution. Going after "extensibility" is a very dangerous path - it is quite easy to get carried away and spend a lot of time simply modifying class hierarchy without actually doing something useful that improves software... — SigTerm 54 secs ago
 
@Nate I quite like the Pion library mentioned on the post that Cat Plus Plus sent you
 
… I’m off, restaurant
 
I only need a good name for my documentation tool… That's about the most difficult thing of all.
 
Coxygen
 
@KonradRudolph Don't call me 'restaurant'
 
6:13 PM
@sehe that's it! I'll call it "restaurant".
 
Makes perfect sense.
 
Meh I'll just call it dakdoc. I can always change it.
 
Call it "askdiufnyvalseq".
 
First of all, I'm implementing it as a damn library.
 
What for?
 
6:16 PM
So that if some IDE developer in the future likes it (which implies he's an idiot, probably) he can integrate it easily.
 
Feh, hardware acceleration makes Flash go blue.
@classdaknok_t It still doesn't have to be a library.
 
@CatPlusPlus then still I like the separation between a back-end (parsing, generating data) and a front-end (generating HTML, PDF, …).
 
Nevermind me, I'm just bored and think too much.
 
I think you're on to something
I wonder whether there is a causal relation somewhere
 
Or too little.
Depends on POV.
 
6:19 PM
Doka.
Cling.
Trombone.
Tympani.
Writher.
Hades.
DocLab.
 
@sehe Cling is something already.
 
Cleng.
Clong.
 
Let me know when I can make you an offer :)
Srsly, have at it
 
aha, found my infinite loop. During iteration it only advances to the next element in the absolute rarest case. (which never happens in this test)
 
I think people need to realize this when they come here :P
 
6:25 PM
finite loops are too fast for me.
 
my code executed to completion!
 
Does anyone know a decent Markdown implementation in C or C++?
 
@ScottW it's also less than optimal in debug builds
 
.NET has a function in the Process class that is WaitForExit(), that waits until a proc has exited, but isn't that technically impossible? isn't that the halting problem?
 
@TonyTheLion no, it doesn't have to know if the other process will ever halt
it will happily wait until infinity ends
 
6:33 PM
oh I see
hmmm interesting
 
hmm, this sort needs optimizing. For 1,000 int it takes 0.000s, For 10,000 int it takes 0.204s, For 100,000 int it takes 19s.
oh right, I took out an optimization to make sure the thing worked first. Oops
 
which sort are you implementing
?
 
I've been writing a DHCP server, and there are discrepancies between the Wikipedia documentation for DHCP and the Cisco documentation.
Ironically; the Wikipedia one was more accurate than the Cisco book.
 
@bamboon quicksort with O(1) extra memory
 
@MooingDuck by mentioning the O(1) you mean not a recursive version?
 
6:42 PM
@bamboon or constant depth recursion. Mine has a max depth of 16 (with one particular optimization on, 0 with it off)
 
@MooingDuck then you switch to what? heapsort?
 
@bamboon With that one optimization disabled, this implementation is purely iterative to completion. It doesn't switch. The optimization is switching to whatever std::sort uses when there is less than 16 elements. (which is a constant upper bound on memory/stack/runtime)
 
Did you check out that random paper on Springer?
 
@bamboon so, ignoring optimizations: I don't have to switch to anything, I have no recursion, I have no extra data (besides 5 iterators and a bool)
and yes, it's still a quicksort :D
 
@MooingDuck so you switch when your ranges are smaller than 16 elements or when your recursion depth is bigger than 16?
 
6:47 PM
how do I remove people from my ignore list?
@bamboon one optimization is to switch when the range is smaller than 16, but that's not required. I have no recursion.
is it a bug that GCC doesn't like (long long)x? Or is that technically by the spec? It freaks out when I cast to a type with a space in it.
 
I believe that should be a bug
 
At line 29 I get: error: 'sqD' cannot be used as a function
 
I must use the toilet. When I return, I shall describe the events to you in detail.
 
gigles
Thanks for the info DeadMG.
 
7:06 PM
Hello!
 
@MooingDuck I remember Neil Butterworth and I arguing about it once, and I was right, but I can't remember what positions we had...
I'm pretty sure it's ill-formed, and you have to use static_cast.
 
@GManNickG strange, I would really expect it to work. (And signed char, unsigned char, unsigned short, unsigned long, long long, unsigned long long, long double, unsigned wchar_t, unsigned char16_t, unsigned char32_t...)
 
Maybe someone have an idea about how to run a comand in Vim while a portion of text is selected?
 
hmm, I should comment my sort, it makes no sense without this paper next to my elbow
 
7:13 PM
@MooingDuck: Ah, sorry. I was thinking of this question, which takes the form x y(a), rather than (x y)a, though I think the latter is still wrong for reasons of the former.
 
@MooingDuck Why are you implementing such weird stuffs again :) ?
 
Y u C casts.
 
reinterpret_cast<> for teh winz
 
@ScottW habit/fewer characters
@ScarletAmaranth the cast or the sort? The sort because lots of people told me they didn't think it could be done
 
@MooingDuck Oh, ok, it just seemed rather impractical to me. (Plus i can imagine it obfuscates the shizz out of the code.)
 
7:24 PM
I downvote to probe Im better programmer
 
@ScarletAmaranth oh, yes, a quicksort with O(1) space will take at least twice as long as one without. It's only useful if memory/stack is a serious limitation.
 
@MooingDuck Hell even on mobile / embeded platforms nowadays log(n) of extra memory won't kill you :)
(While the 2x processing power requirement still might.)
 
@ScarletAmaranth well, worst case of quicksort is O(n) depth, which can SO
 
You would need a really stupid pivot picking strategy for it to go O(n) depth ?
 
@ScarletAmaranth if you have an array of only the same thing you can't avoid it
 
7:30 PM
@ScarletAmaranth no, you just need to be unlucky, or not do median of 3
@ScarletAmaranth and MSVC for instance no longer does median of 3 if I recall, because it slows it down on average, and that bad case virtually never happens.
@bamboon some implementations do a three way split to handle that, can't recall if MSVC does or not
 
@MooingDuck yeah right, that is true
 
gah, why does MSVC Release build not define NDEBUG by default?
 
Uh ? It doesn't ?
 
@ScarletAmaranth by default it never defines NDEBUG
which means assert triggers in release builds too.
 
PSPad sucks .-.
 
7:37 PM
yeah those are the asserts you don't even know about until after you already released your program :P
 
bitches
:)
 
Uh oh ?
 
I'm trying out the new ubuntu and am bored during the installation..
entertain me
 
@Nils you will be even more bored after the installation, it's exactly the same
 
well I haven't installed a new version in ages
heard that the new one is good
 
7:46 PM
0
Q: What IDE has the best support for ISO C++11

Jonathan DunlapAside from compilers, what IDE is best suited for developing C++11 code right now? I've noticed that even in the latest version of VS11 beta that it does not even understand the for each colon statement... and gives it a red underline for statement such as the following: for(auto &e : v) W...

Haha, IDE understanding C++ semantics.
 
bah what a question
is there any other than VS with reasonable C++ support?
 
VS has reasonable C++ support?
 
What was the IDE that was recommended to the famous "hockey game programmer" ?
 
That's new.
 
7:48 PM
The following tables list notable software packages that are nominal IDEs; standalone tools such as source code editors and GUI builders are not included. ActionScript {| class="wikitable sortable" style="font-size: 85%; text-align: center; width: auto;" |- ! IDE ! License ! Windows ! Linux ! Mac OS X ! Other platforms ! Debugger ! GUI builder ! Profiler ! Static code analysis ! MXML |- ! FDT | | | (unstable) | | JVM | | | | | |- ! FlashDevelop | | | | | | | | | | |- ! Flash Builder | | | | | JVM | | | | | |- ! IntelliJ IDEA | | | | | JVM | | | | | ...
 
well with visual assist maybe
 
In the guy's profile : I've been a professional game engineer for almost a decade and specialize in AS3, haXe, PHP, C#, and C++ development.
How can he ask such a nonsense then ?
 
It's a special skill.
 
ah there is qtcreator, but never had a look at it
php game developent
 
IDEs considered stupid.
 
7:50 PM
What are you bonkers ? I love IDEs.
 
Stupid and handy.
 
There are games in PHP.
 
It just so happens i fancy a whole bunch pressing f5.
 
IDE is useful is you have more than one source file.
 
Can't recall the last time i wrote a one-file program.
 
7:52 PM
For what?
 
heh press f5 to see the next frame
 
@ScarletAmaranth I write a lot of small experimental programs to test new features.
 
@StackedCrooked Recommend me a good anime! :)
 
@ScarletAmaranth One Piece :D
 
Panty and Stocking.
It's Friday, after all.
 
7:53 PM
@StackedCrooked Seen all the epis so far ... and i CBA reading manga :)
 
@CatPlusPlus Any day would be fine for that.
 
It works best when drunk.
 
I have to agree with you @StackedCrooked
 
@ScarletAmaranth Nice!
 
@StackedCrooked It's an amazing insight into different natures of humans (imho).
 
7:55 PM
It's just awesome.
 
Yeah it tends to have pretty awesome moments too (even more awesome than the "average - awesomeness" of it ).
Say, Luffy punching the Celestial Dragon or whatever they call them, can't quite recall.
 
If I want to use boost asio I'll have to use the -lboost_system flag to the linker. It works fine if I just create a main.cpp and add a simple example.
However, if I want to use it in a bigger project, and I'm only using the boost::asio in one specific class, I don't really know where in my Makefile to add the linker option.
Should I add it to just the linking part in the end from all .o files?
 
Sorry I forgot to mention the other part -L/...
where my boost is located
that's what is messing things up
should I add that just to the linking part as well?
I'll show an example instead
 

« first day (559 days earlier)      last day (4382 days later) »