« first day (804 days earlier)      last day (4144 days later) » 

9:08 AM
I think I am near the time when I will also say screw that 1 rep Questions
just screw the people who don't know what a virtual destructor is
they are damned to hell anyway
 
How do I flag a question to be moved to math.stackexchange ? is it possible ?
 
@vivek flag as it doesn't belong here
@ddacot why are you putting bacon in your coffee?
 
Yes, that what I ended up doing :)
 
:D
it's not bacon :D
 
@EtiennedeMartel I have often found that replacing current management with void would improve things
 
9:19 AM
@StackedCrooked Do you mean, the protests at India Gate?
 
can somebody tell me, why when i compile a program written in c++ with winapi, first cmd opens, then the app itself? why not just the app?
 
@ddacot you have main instead of winMain
 
noo, it's winmain :)
 
@ddacot so something is fucked up. Anyway, it should appear after you run, not compile your program
And in general, it's safer to say build than compile, but ignore that one, I'm just picky
 
@bartek my mistake, yea, after i run it.

something is fucked up. - i don't think so, 'cause it happens to every program i run :), yes, i'm using codeblocks
 
9:23 AM
@ddacot you are using winApi, so you must be on windows. Why on earth are you using codeblocks then?
 
@ddacot It's dangerous out there. Take this
 
@BartekBanachewicz and why on the earth shouldn't i use codeblocks?
 
@ddacot Do you want "Because it's shitty" or "Because VS is a lot better" answer?
 
@BartekBanachewicz i want a decent answer, pro/con. And you're telling me this because you are a VS fanboy?)
 
Anyway, fun fact, my trivial OpenGL program is now 180 LOC and growing, and still not working properly =.=
@ddacot Woho, should I write an essay for you? It would take a long time to sum it all up, I'd give the most important one - everyone is using VS, so if you want to become paid for coding someday you will have to learn it anyway
VS has a lots of bugs and stupid things that annoy me, but it's still the best, at least on windows
 
9:33 AM
@ddacot what's the problem, and where's the source?
 
bartek you made my day. lol
@melak47 wait a sec, i'll upoad it on pastebin.
 
@ddacot I'm amazed how people fight with Visual Studio just for the fun of it. Are you maybe an Apple hater too?
 
@BartekBanachewicz i'm amazed how "smart" people give advices to use one or another, without givint proves that's beter, pro/con, but just saying that "everyone is using VS", just funny. What the heck has apple in common with what we're talking about? omg)
@melak47 take it - pastebin.com/h9B3Q7hL
 
:6900034 "everyone is using VS" makes learning it more beneficial. I don't really know what's funny in it. Is saying "everyone knows C#/Java/C++, so you should learn one of those" funny for you too?
 
@ddacot and what is the problem? what goes wrong?
 
9:42 AM
@melak47 he already said it. It spawns a new console window alongside
 
can't reproduce.
but then I use VS :p
 
Of course. It works perfectly for me too.
But then again, there are people who use VS, and there are people who use codeblocks and write their own binary trees without destructors.
 
so it's all about the ide?)
 
I don't know. I just know that in VS it works, in C::B not.
 
what compiler do you use with Codeblocks?
 
9:45 AM
there's probably some option which forces the console to spawn
can you run your program outside the IDE?
 
@ddacot It's about the compiler
 
maybe possibly an improper linker configuration? i.e. Console subsystem instead of Windows? tried running release instead of debug build?
look, I think your app is trying to tell us something
 
)) maybe :D
 
so, does running it outside of codeblocks change anything?
 
9:50 AM
no, the same)
 
@ddacot so the compiler/linker/project options are bad
 
do you have a working win32 window application to compare options with?
 
you have two options. Dig into the internet and find your problem there or uninstall CB and install VS
I can bet 2nd would be faster
 
no, every win32 app shows the same. the app window, and the cmd one.

http://s14.directupload.net/images/121228/ct5n5xwz.png
 
hint, hint
 
9:57 AM
/Debug/ui.exe
what's this
 
i ran the program outside codeblocks
 
@ddacot try this
0
A: How to get ride of console box of a GUI program compile by MinGW + Code::Block

chrisPut it in a project, and in the project settings there's an option to not have a console window. If you can't be bothered to have it in a project, a call to ShowWindow (GetConsoleWindow(), SW_HIDE); will make it flash on the screen and then disappear. Note that you must #define _WIN32_WINNT as ...

 
yea, change "console application" to "gui application"
 
same shit
 
cpx
I'm trying to change my schedule to wake up in early morning.
I think it will take a month to get used to. xD
 
10:08 AM
@ddacot hint, hint
 
@ddacot so...install VS. you don't even have to use it, you could still try setting up codeblocks to use the msvc compiler...but I bet it would be much easier to just use VS :p
 
@cpx Why after all these years ?
 
cpx
Well, maybe I took your advice.
 
does getting up at 23:00 and then staying up count as "getting up early" ?
 
@cpx Nice, I'm changing the world.
or atleast the Lounge<C++>
 
cpx
10:15 AM
Hmmm.
 
cpx
10:29 AM
I felt so refreshing when I woke up in this morning.
I have to go now. Bye.
 
Ell
Morning
@ddacot why do you want to use code blocks if not for mingw?
 
Can I use boost::counting_iterator in C++11 foreach loop?
 
10:47 AM
great hiring practice: divide resume in 2 random stacks, throw out one stack. Don't want to hire unlucky people.
@BartekBanachewicz range based != iterator based
You looking for Python's iter()?
@cpx you felt.... refreshing? You were a wind?
 
I want to write for (int i : numeric_range(0,10)) or <0,10>() or whatever
 
@BartekBanachewicz boost::irange(0,10)
I think it's boost/range/irange.hpp or similar
 
@sehe kthx
 
8
A: C++ range/xrange equivalent in STL or boost?

seheBoost irange should really be the answer (ThxPaul Brannan) I'm adding my answer to provide a compelling example of very valid use-cases that are not served well by manual looping: #include <boost/range/adaptors.hpp> #include <boost/range/algorithm.hpp> #include <boost/range/irang...

 
oh, if you are there anyway....
for (int i : std::vector { 1, 5, 3, -9 }) does it make sense?
 
10:50 AM
> I put my 1 in her 0.
 
@BartekBanachewicz why not array?
 
I wonder if std::vector could be dropped from it; my reasoning says that you can't iterate over initializer list
 
@sbi ask @EtiennedeMartel - I just made it slightly more SFW on the starboard.
 
@Abyx okey, array would be even better. Or boost::mpl::vector
 
15 hours ago, by sehe
There. Better on the starboard
 
10:52 AM
@BartekBanachewicz does mpl::vector support std::begin/end ?
 
@Abyx I don't know. That's why I asked @sehe
 
@Abyx Nope. mpl is compiletime. So it only supports mpl::begin/mpl::end (from memory)
 
Oh, I just found for (int x : {1,2,3,4,5,6,7}) in your answer
 
IIRC mpl has some run-time stuff
 
why is it "highly inflexible"?
 
10:55 AM
@BartekBanachewicz I think it's GCC specific. It "should" not work, IIRC
 
@DeadMG I am aliiiiiive!
 
@Abyx I think that's Fusion
@BartekBanachewicz What is?
 
fuck. The puppy ain't here?
 
@sehe I thought it shouldn't. But for (T i : std::array<T> { ...}) is ok?
 
well, you can use for (auto x : "\x1\x2\x3"), but it ends with 0
@BartekBanachewicz <T, N>
 
10:56 AM
@Abyx that's fucking useless then. It has to be a vector.
 
@BartekBanachewicz vector allocates memory in heap
 
@Abyx aaaand?
 
@BartekBanachewicz and it's fucking slow
 
@BartekBanachewicz Of course. initializer_list is for initialization. A bare initializer_list isn't officially supported, IIRC
 
I can't use it anyway, because VS don't support initializer lists yet
 
10:58 AM
@Abyx wow, wut?
 
well, maybe it's not so slow for yyyyou
@rubenvb that.
 
I wonder how slow exactly is allocating a vector of a few integers
 
@Abyx You don't know that. It's an implementation detail. Make it a std::string { ... } and profit from the uniquitous SSO (but vector may do the same)
 
@BartekBanachewicz unmeasurably slow!
 
can't you just create an std::array from initializer list without counting elements by hand?
 
10:59 AM
@BartekBanachewicz On windows, very!
 
Can't you range for on a raw C array?
 
@rubenvb I'd have to create it outside the loop.
It was supposed to be a one-liner
hmm, is it possible to create a helper class for that? I know that you can count elements in initializer list.
 
template<typename T, unsigned N> T(*identity(T(&a)[N]))[N] { return &a; }
 
won't (int*){...} do?
probably not, but something like that ought to work.
 
@Abyx that won't work because the return value isn't an array reference
 
11:02 AM
some template returning a std::array from an braced init list must be doable.
 
@Abyx @BartekBanachewicz Anyways send some rep the Robot's way if you like his 'temp array' hack:
10
A: Arrays and Rvalues (as parameters)

R. Martinho FernandesThere is nothing wrong with foo_array. It's the test case that is bad: "hello" is an lvalue! Think about it. It is not a temporary: string literals have static storage duration. An array rvalue would be something like this: template <typename T> using alias = T; // you need this thing bec...

 
@Abyx Oh. Damn. I missed the trailing [N]. Rotten cdecl syntax
@BartekBanachewicz Pretty sure MSVC doesn't have it yet though
 
yeah, it doesn't
 
11:09 AM
11 mins ago, by Bartek Banachewicz
I can't use it anyway, because VS don't support initializer lists yet
 
Of course. If it's nice, it's probably not supported. But you get the winapi out of the box
 
@sehe I'd pay them to get that away from me
 
@BartekBanachewicz nope, it supports initializer lists in CTP
 
@BartekBanachewicz I think you are paying them. But it doesn't work
 
@sehe MinGW-w64. Best of both worlds.
 
11:10 AM
@Abyx wat.
What about using?
 
@Abyx But not uniform initialization and the corresponding library constructors
 
...and doesn't support using.
 
@Abyx well, it sort of does...but none of the standard library thingies support them yet. so you can use it for what, structs? :p
 
@melak47 I knew it. Supports my ass.
Well, here's a nice addition
template <typename T>
using make_array = T[];
for (int i : make_array<int> {1, 2, 5})
 
@melak47 Nope. That's uniform initiliazation, unsupported. You can try to use it for your own types: struct Fancy { Fancy(std::initializer_list<T>); };
@BartekBanachewicz How would that work? Looks like you use it as a macro?
 
But make_array is more to the point, as namings go, yes
 
hi all,shall we discuss about winapi c++
 
I feel like doing science.
 
clis
Should I upgrade to VS12?
 
I put some ingredients in the bowl and look what happens
 
11:18 AM
Also hi
 
and sometimes it blows in your face.
and you know science
 
@BartekBanachewicz Darn. You are right of course. It's basically a typedef, and you can just slap uniform initialization on. That is, if it is supported.
 
@NolwennLeGuen yes.
 
@NolwennLeGuen From what?
 
11:19 AM
@NolwennLeGuen Ohai
 
@sehe 2010 ofc!
 
@NolwennLeGuen there is no VS12 .
 
@sehe it is so stupid that compiler just let this work :P
 
@Abyx VS'12 :P
 
@Abyx VS11 VS2012 VSMENUINCAPS whatever
 
11:20 AM
@NolwennLeGuen menu in caps can be disabled in registry. Now go and update
 
VC++ SUCKS.
=(
 
@Abyx we were talking about VS not VC++
 
cpx
@sehe I were a feather! :P
 
like you write in a language other than C++
 
@Paul what was that supposed to mean?
@Abyx of course I do
 
11:22 AM
and what is it? html?
 
Lua, motherf*cker
 
lua sucks.
 
> Microsoft Visual Studio 2012 Ultimate 32-bit - Web Installer (French) - DreamSpark - Téléchargement
32 bit. what???
Lua is nice, fuck you Abyx
 
@Abyx kill yourself
@NolwennLeGuen I like you.
 
fuck you, did you saw its source code?
 
11:24 AM
@BartekBanachewicz Have my babies
 
@BartekBanachewicz sudo kill yourself ;)
 
@Abyx it's ANSI C, how is that supposed to look?
 
@NolwennLeGuen What? You have spare babies to give away?
 
@BartekBanachewicz it's fucking C, and it looks and smells like a crap
 
@Abyx Sawing source code...
 
11:25 AM
@Abyx That's something you share with C then
 
@NolwennLeGuen yup. They suck at 64-bit coding.
 
@sehe Two for the price of three
 
@Abyx there's a difference between ANSI C and fucking C
 
I still don't understand what's so wrong about people in this room. They say C is ugly, but they code in C++? That's like saying "spinach taste bad" and then proceeding to eat shit.
 
@NolwennLeGuen well, there's even bigger difference between C and C++
 
11:28 AM
@NolwennLeGuen C++ > C. Although this is probably Undefined Behavior.
 
@NolwennLeGuen C++ is not that ugly. it tries at least, they even added lambdas few years ago
_Static_assert is ugly.
 
@Abyx I heard C added boolean type
 
But VS2012 looks ugly. I liked the blueish interface of 2010 ;_;
Oooooh the dilemma
 
ah, and this thing:
#define cbrt(X) _Generic((X), long double: cbrtl, \
                              default: cbrt, \
                              float: cbrtf)(X)
 
11:32 AM
@NolwennLeGuen I believe you can change colour of VS2012 too
 
@NolwennLeGuen it looks OK. it even has a dark theme
 
@NolwennLeGuen there's no dilemma.
 
@Abyx what black magic is this
 
@melak47 generics in C11
 
C11 has macro-ish templates!
 
11:36 AM
which are terribly fucked, why they can't just allow function overloads?
 
Because backwards compatibility!
 
C would make more sense as a subset of C++
@NolwennLeGuen what backwards compatibility does it break to allow to do something more?
 
@BartekBanachewicz because overloads require mangling but extern "C" doesn't support it
 
VS11 9GB is this nigga serious
 
11:39 AM
@NolwennLeGuen wat?
my iso is 1.48GB
 
well.... lua it not such a bad language. implicit conversions, array indexing starts with 1, they even added goto in 5.2!
 
lol
 
Yeah the array indexing is stupid
Other than that the language is very cool
 
oh yeah, it has great API
with that beautiful stack
 
@NolwennLeGuen niggas always srs
@Abyx no language is grown up without implicit conversions (<bait/>). Surely, you don't dismiss C++ and C# because of implicit conversions and goto?
 
11:44 AM
Idk I think VS2012 looks depressing
Too much gray
 
@NolwennLeGuen do you use the dark theme?
 
@Abyx array indexing starts whenever you like it. It can be 0, 1 or "chicken"
 
@sehe Please stop replying constructively to flawless arguments
 
@NolwennLeGuen Wow. I didn't think you'd notice
 
@sehe Well I'm colorblind
 
11:45 AM
@NolwennLeGuen Sorry. It won't happen again
 
@NolwennLeGuen s/flawless/flawed/ ?
 
@NolwennLeGuen See, they dedicated VS12 to you and your fate-fellows
 
@BartekBanachewicz Get a sarcasm detector
 
@StackedCrooked That's... not a very good analogy for anything IYAM
> YouTube Kills Billions of Video Views Faked By Music Industry
^ There. Informative
 
11:47 AM
@sehe I beg to differ
 
Yeah. I just copied it from the article.
But I agree.
 
@StackedCrooked dropping from a total of more than 850 million to just 2.3 million
 
@StackedCrooked But it doesn't mean anything. It doesn't even imply what went on.
Once you know what transpired, yeah, you can 'imagine' how the analogy fits
 
Edited during last 10 seconds. Adrenaline is rushing.
 
@StackedCrooked Woot
 
@StackedCrooked See, this is the typical press headlines
"LIFE DISCOVERED ON MARS"
 
@StackedCrooked lol
 
(maybe)
 
"LIFE DISCOVERED ON MARS"
(candybar)
 
cue relevant 4chan jpg
 
11:54 AM
?
your job
 
Somebody knows about jemalloc?
 
@robert Sounds tasty
 
@robert use jenew
 
11:56 AM
The question I would pose is whether jemalloc overwrites the usual malloc implementation.
@Abyx xD
 
@Abyx This looks painfully close to jew
 
Stop it, already! :D
 
@NolwennLeGuen jedelete.
 
@robert jemalloc looks like it would allocate memory
 
@Abyx jelly wait no
 
11:58 AM
Basically jemalloc is a memory allocator optimized for multi processor systems. I have stumbled upon it while browsing the folly code (facebook library published in summer 2012).
 
@robert Well it's an allocator... so you can use it as a replacement for malloc I suppose
 
jemalloc is a French version of imalloc.
 
I don't think it's a good idea to use both together though
 
@robert why would you even care about memory allocations? We're in C++ room
 
@Abyx jemallocul /cc @EtiennedeMartel
 
11:59 AM
Or an electoengineer's version of imalloc, yeah yeah.
@BartekBanachewicz You mad? The folly library makes use of this internally, for good reason I suppose. I am interested, but of course you don't have to get involved. However, don't tell me I shouldn't care, because I do.
 
@robert There's a fuckload of allocators out there. Use the one that suits your needs
 
@robert You shouldn't care. Umad?
 
Why is there so much C talk in here.
That's better.
 
Ultimately, all memory is reserved by interfacing with the operating system, right? I always thought that malloc is one of the functions provided by the operating system. Considering that I, as a developer, can obviously go for other allocators as well, it seems to me that malloc is not yet the interface to the operating system. It's one level above. Right?
 
Ohnoooesssssssss, again
WHO THE FUCK CARES
 
12:04 PM
@robert Yeah. malloc call sbrk
 
@NolwennLeGuen nah, it's HeapAlloc.
 
@NolwennLeGuen or mmap
 
@Abyx I'm talking about linux, idk how it works (does it?) on windows
 
@NolwennLeGuen Okay that points me to the right direction. I also needed to put my thoughts into words and somebody to verify it. Thanks a lot!
 
@robert You're welcome. Feel free to come back if you have more questions!
 
12:05 PM
linux? we don't need it
 
@Abyx "we can write our own". Zoidberg isn't back yet :P
 
@Abyx Linux User Master Race will dominate you all. Eventually.
 
@NolwennLeGuen :-)
 
12:20 PM
hi
 
@sh4kesbeer hi
Or should I say "h1"?
 
i dont understand? :)
 
@sh4kesbeer look at your name
 
fail
 
12:36 PM
moose
 
@sehe oh, you' /*fuck*/ re so funny
I wonder why there's no gl before any function in OpenGL spec. Are they trying to save paper?
 
@BartekBanachewicz they forgot. meh. nitpick!
Also gl might sound a bit wishful (good_luck::foo, good_luck::bar in C++ lib)
 
@sehe incorrekt and incomplet
 
incontinent
 
1:08 PM
Duh, I just drawn two lines on the screen.
I feel like back in 2002 when learning openGL 1.1
 
1:19 PM
In C++ prior to C++11, only const references could bind to rvalues. C++11 introduced rvalue references, which can also bind to rvalues for the purpose of move semantics (perfect forwarding etc.). Are these statements correct?
const A a; What is a? lvalue or rvalue or something else?
const A foo(); What is foo()? lvalue or rvalue or something else?
 
@robert Seems correct to me.
@robert a is an lvalue
foo() is an expression, foo is an lvalue, I think.
 
@StackedCrooked For clarification: foo() is a function with return type const A. I would like to know what type of value the returned value is.
 
@robert that depends on the context of the function's use.
 
I'd say that I don't know :)
 
@rubenvb A bar = foo();
 
1:32 PM
then bar is an lvalue.
 
bar has a name, so it can't be an rvalue.
 
I don't know if foo is a *value or if such a designation would make sense.
@StackedCrooked my mistake.
mixed them up :)
 
So, foo() in A bar = foo(); is an lvalue.
It conflicts with the intuition of "lvalues have a name", but it seems to make sense.
 
@robert foo is name.
@robert also: see this:
220
Q: What are rvalues, lvalues, xvalues, glvalues, and prvalues?

James McNellisIn C++03, an expression is either an rvalue or an lvalue. In C++11, an expression can be an: rvalue lvalue xvalue glvalue prvalue Two categories have become five categories. What are these new categories of expressions? How do these new categories relate to the existing rvalue and lva...

 
Of course, I am referring to the returned value, not to the function.
@rubenvb Thanks.
I must say that in retrospect C++03 is really simple stuff. :D
 
1:39 PM
So in your case the value returned by foo would be a prvalue (pure rvalue).
@robert Indeed :)
 
That's a nice answer.
 
@StackedCrooked I'm not so sure. To me, the value returned by foo is an xvalue.
It is copied (into bar), but the original value expires.
 
huh, the answer says so literally. I find it surprising as well, but I tend not to care so much about these thing :)
> [Example: The result of calling a function whose return type is not a reference is a prvalue]
Where's Johannes when you need him.
 
I find it confusing as well. If the return type is non-reference then I would think that makes it an xvalue (expiring) since it's lifetime will end very soon.
 
@robert You probably never looked up the specs in the time of C++03
@rubenvb seems wrong to me. prvalues are like 1, 'a' AFAIR
@StackedCrooked Yup. Perhaps glvalue (?) may come into the picture but my memory on that hazy
 
1:46 PM
Well, technically with RVO there has to be no copy.
 
@rubenvb irrelevant. That's all under the as-if rule
 
not quite, it's the exception to the as-if rule.
or was that the copy constructor itself? I forget.
 
@rubenvb I think you're referring to copy-initialization
 
@sehe Can't RVO be applied for non-initializing copies?
 
@rubenvb RVO is an optimization that compilers may or may not implement. It shouldn't affect semantics.
 
1:49 PM
@rubenvb Huh. Of course.
 
@StackedCrooked yet it does: (copy) constructors with side effects don't have their side effects any more, and it is completely legal to not have these side effect executed.
 
Basically, once you have two physical locations then RVO is no longer possible.
 
@StackedCrooked technically, the new one can be constructed in the memory of the old one if the compiler knows the old one is not used in the construction of the new one...
but I digress. Please ignore a man who hasn't slept enough to be remotely sensible.
n3376 has this text:
> [Example: The result of calling a function whose return type is not a reference is a prvalue. The value of a literal such as 12, 7.3e5, or true is also a prvalue. —end example ]
 

« first day (804 days earlier)      last day (4144 days later) »