« first day (896 days earlier)      last day (4067 days later) » 

4:04 AM
oh my fucking god it's 5AM
and it's already day outside
 
lol
 
i wonder if I should go to sleep at all
well, if I wake up at 11 it's pretty nice 6 hours
 
@R.MartinhoFernandes I hate smokers. =[
They make my clothes smell like shit, they make my air smell like shit, they have shitty breath, their teeth look awful....
 
Smokers are as bad as malloc.
 
user1357851
smoked bacon, heh :x
 
user1357851
4:08 AM
 
What are you doing, Telkitty? Stahp.
@BartekBanachewicz Welcome to the club.
 
@DogPlusPlus let me guess - posting shitty pics as usual
 
Yes. :(
 
@BartekBanachewicz s/shitty/kitty
 
hmmm
PugiXML has header-only mode
And I will collapse in a while from sleep deprivation
hmm
tomorrow.
good day/night.
 
4:12 AM
All the good stuff happens tomorrow.
I can't wait for tomorrow.
 
-1
Q: Hello, good morning world. Its look like a shiny day, right?

gua juaraToday, I want to share you something. Are you want to hear it?

 
@DogPlusPlus There.
I've fixed the entire everything.
It compiles with multiple CPP files, but it takes like 5+ minutes to compile rather than the usual 8-15 seconds.
 
Well done. I'm actually working on the rendering website right now. So, you'll get to fix your deferred renderer soon. :Đ
 
user1357851
@Borgleader ♫ ♪ ♬
 
Did I mention I hate the new compile times?
It's monstrously atrocious.
 
4:17 AM
I can't wait for my semester to be over so I can start working on my engine T_T
 
user1357851
@DogPlusPlus but you can not live in tomorrow, you can only live in today, nobody can live in tomorrow
 
@Telkitty Dr Who can
 
Here, have some gay songs.
 
Ooh, faggoty~
 
4:20 AM
I don't even see why I did this splitting up into multiple .cpp files.
I have: drastically increased my compile times, had to add like 50 new files...
 
user1357851
@Borgleader true. But not dog++
 
It just doesn't seem worth it. What have I gaine from all this? =/
 
Sanity?
 
How long are your compile times?
 
Also, you must meet precompiled headers and enable concurrent compilation which can dance over your - now many - TUs.
 
4:23 AM
Because my teacher's 27 kloc game engine compiles in under a minute on my 3770k iirc
 
user1357851
@Borgleader that's an old song, lol wonder how tatu is doing, have they split up?
 
@Telkitty no clue, that's the only song i know of them
 
user1357851
@Borgleader this:
 
I don't know how to properly set up PCH and Concurrent Compilation with VS2012 or MSBuild.
I guess I'll have to look it up.
 
4:26 AM
Figure it out, it's well worth the effort.
 
there are tutorials on how to do PCH
 
FWIW, I don't really care about my Sanity, as long as I can build things really fast and make changes without waiting a million years to see those changes. ._.
 
PCH and Concurrent Compilation
itll build quickly AND you'll keep your sanity
now shaddap and DO EET
 
Lol.
Concurrent compilation is set to 0.
Which means "use all available threads"
It still builds 1 file at a time. ._.
 
user1357851
Don't know what to say about this ... it is so weird:
 
user1357851
4:34 AM
 
o.O
People need help.
I'm just gonna delete my whole deferred renderer now.
Start fresh.
 
@Telkitty This looks shopped.
 
user1357851
@EtiennedeMartel A bit inhumane but ... : ww3.foundshit.com/pictures/animals/pig-tattoos-01.jpg
 
Well, well.
 
user1357851
 
4:41 AM
I guess it's free tattoo practice?
Farmers could even sell the pigs for use.
"Tattoo this pig for only 50 bucks!" or something.
 
@ThePhD: I timed a rebuild of the engine, ~140 sec.
 
Guess I'm doing things horribly wrong again.
How surprising.
 
This one has PCH. So get on it :P
 
Meh.
Later.
After I fix rendering.
And after I finish the design docs for this other game.
 
@Telkitty ok seriously wtf
 
user1357851
4:47 AM
I was searching for tatu's pictures, I typed in 'tatus' in the image search & I saw the pig with tatoos
 
4:58 AM
awwwwwwwwwwwwwww
 
Look, I was just talking to her. You know I love you. DirectX, come on, don't be like that.
 
I love you more, dog plus plus
 
@Crowz You only love people when you're about to ask them for help.
 
will you write everything for me?
EVERYTHING
 
5:13 AM
Oh hell no.
 
I was reading my C++ book trying to figure out these pointer shenanigans
 
Now I'm gonna play some AC3.
 
@EtiennedeMartel hf
 
@EtiennedeMartel Good man. Have fun, Connor.
Reminisce about your old days at Ubihard.
If a website produces a sound and the visitor didn't ask for it - is the web developer a baroque idiot?
 
5:16 AM
deviantart is an odd place
 
@DogPlusPlus Well if it's the Deus Ex website and the visitor goes "I didn't ask for this", then it's brilliant design.
 
Deus Ex had a great soundtrack
 
5:38 AM
The C++ Programming Language (98) is really good.
 
A modicum of violence is also good.
 
It contains so many ideas that I never seen before.
 
Also, I make great coffee.
 
Damnit, are you telling me I should buy this on top of "Principles and Practices Using C++ Language"
 
Mass Effect 3 is still running in the background. lolwut, this is the fifth day.
 
5:41 AM
and you didn't know it was there ?
 
I alt-tabbed to do some work. Apparently, work was interesting this week.
 
one of my friends just asked me a question in C, and it doesn't make any sense
 
I know about statements in C, but not questions.
 
void ambiguity (char * foo) { .. } Q: what is foo ? A: pass-by-pointer char. B: C-style string. C: pointer to single char.
 
all of the above
 
5:47 AM
so much for readability ..
 
It's a function which takes a C-style string called foo and returns nothing.
 
.. it get worse when you add another *, the number of possibilities goes higher
 
also, A & C are redundant as far as im concerned
 
The question sounds rhetorical
 
moral of the story. C sucks
 
5:51 AM
Too bad it's not the good kind of suck.
 
In programming language theory, lazy evaluation or call-by-need is an evaluation strategy which delays the evaluation of an expression until its value is needed (non-strict evaluation) and which also avoids repeated evaluations (sharing). The sharing can reduce the running time of certain functions by an exponential factor over other non-strict evaluation strategies, such as call-by-name. The benefits of lazy evaluation include: * Performance increases by avoiding needless calculations, and error conditions in evaluating compound expressions * The ability to construct potentially infinit...
 
user1357851
Why C sucks so much why this lounge is called < C ++>
 
people who created C++, when there was no C++ .. they were programming in C, stuck as were we
they say in Haskell, if you shoot someone's foot nothing happens until he try to walk.
 
but they also say, that in Perl, You shoot yourself in the foot, but nobody can understand how you did it. Six months later, neither can you.
 
Collectors have invaded the Lounge. Quick, call Commander Shepard.
 
Eh, I haven't been here in a long while. Not ready for the invasion yet.
 
user1357851
perl is so simple that when you are experienced with it and someone comes up with a complicated problem, especially when the execution speed is important, you wouldn't be thinking about perl in the first place.
 
6:23 AM
I'm going to invent a new programming language for idiots, where if they try to read outOfBounds or a null pointer, I'll make it automatically read a circular dumb memory
 
circular dumb memory?
 
a circular buffer that has keeps track of last K bytes you read or write ..
the compiler randomly choose which path to take on an ambiguity ..
the compiler also produce no errors or warnings, everything is resolved
 
How is everything resolved -- when there is bug in code and user doesn't even get to know it.
 
user1357851
6:50 AM
 
7:01 AM
I made the pilgrimage today.
 
user868935
7:12 AM
Hey all! Whats a good naming convention for four booleans (top, bottom, left, right) for the borders of an image? I'm checking to if the mouse is within the image's border, but don't know a good way of naming the booleans
 
Depends on usage. How will you use "top"?
 
user868935
@VinayakGarg "top" checks if the mouse is more than the Y-position, bottom- less than image height, left - more than X-position, and right - less than image width
 
actually you have 8 states instead of just 4
and in the end, all parallels have to sync with the core
 
How about mouseOutsideTop or mouseOnTop?
 
top, top-right, top-left, right, left, bottom, bottom-right, bottom-left, inside
 
user868935
7:26 AM
Thats overkill @KhaledAKhunaifer
 
There are 9 states, and can be described using 4 bools.
 
user868935
@VinayakGarg that gave me a good idea
 
exactly
bool top_right = top & right;
 
9 states remind me of line clipping algo :)
 
bool inside = !top | !right | !left | !bottom;
 
user868935
7:28 AM
Im just checking the image's x position, y position, x-position + width, y-position + height
 
if you have the 4 booleans, you don't need to check positions again
 
how i retrieve string from vector?
i got error please look in screenshot
where i'm wrong?
 
this place isn't a help desk, if you have a question, ask in StackOverflow
 
user868935
@KhaledAKhunaifer the first two checks the position of the image (top-left). The second two booleans checks if the mouse is somewhere more than x and y, but less than the width and height of the image
 
@SpicyWeenie why can't you see how simple it's
 
7:34 AM
i think your questions also same like help desk , why you not ask them on main site?
 
@iAmbitious simple\basic questions are okay, but not a complete question
 
user868935
Mine is as simple as it gets
 
i guess my question is so much basic .. just retrieve string object from vector
i m newbie in C++ that why i want to know about this and wanting to clear some doubts as well
 
What's going on.
@iAmbitious Use c_str() to get a const char * out of a std::string.
 
user868935
7:38 AM
@iAmbitious are you new to programming?
 
why use char* when you have string, std::string works as an array too
 
8:03 AM
thank you guys
 
thanks a lot friend
cloudsImages[i].c_str() this is my solution
 
Xeo
Dafuq is with the flags.
 
@Xeo: Good morning! (It's morning where I'm living). Do you have an answer for my comment on the tuple-pretty-printer?
 
@StackedCrooked can this be done in macro? #DEFINE X(A){B} X(A){ log("entering X"); B log("exiting X"); }
 
No, that's not valid syntax.
 
Xeo
@DanielFrey It's also morning here. :)
And yes, I already prepared something yesterday, but went to sleep and planned to modify the answer today.
 
@StackedCrooked #DEFINE X(Y); log("before X"); X(Y); log("after X");
 
Xeo
8:34 AM
@DanielFrey How does your version handle empty tuples?
 
With a simple overload.
 
Xeo
k, same
I couldn't find a more elegant way, since one of the tuple-elements needs to be special-cased to not include a delimiter.
Wait, thinking about it....
Hmm.... nah, you need an extra overload one way or the other.
 
what is the tuple issue ?
 
Ha! I got rid of the overload!!! :-D
 
Xeo
You still need to special-case one of the element-accesses, as far as I can see.
 
8:39 AM
No :)
 
Xeo
Oh, wait, I also got an idea.
 
I think I should post my answer now... :-}
(just kidding, let's talk first)
 
@KhaledAKhunaifer It's not pretty..
 
Xeo
@DanielFrey Btw, I noticed GCC doesn't play well with list-initialization for user-defined types. The order is still random in 4.7 atleast.
 
OK, there is a "special" case, but no additional functions. only one operator<< and one print_tuple.
 
8:42 AM
@StackedCrooked there is a more bueatiful way, use a Tree data-structure .. add a node if there when entering, remove the node when exiting
 
Xeo
@DanielFrey Meh, os << (Is > 0? ", " : "") << std::get<Is>(t), I guess.
 
Yes
 
@KhaledAKhunaifer Go ahead :)
 
@StackedCrooked or you can use a directed weighted graph, then you can even do a static analysis
 
very good
 
8:46 AM
@StackedCrooked this way you can get to know who is stalking your function
 
Xeo
Too bad one can't simply do void{...}
 
@KhaledAKhunaifer this won't work if the original statement was int x = foo();. my ugly concoction does take care of that.
 
Xeo
#ifdef __GNUC__
using swallow = int[]; // fuck you, GCC
#else
struct swallow{ template<class... T> swallow(T&&...){} };
#endif
 
@Xeo you can do Void{...}
 
Xeo
huh?
 
8:51 AM
it's a capital V
 
@KhaledAKhunaifer: Not exactly, Xeo also wants simpler expressions.
 
@DanielFrey expression for what ?
 
Instead of Void{(foo(args)...,0)}, it should be void{foo(args)...} - not possible today.
 
Xeo
@KhaledAKhunaifer There is no Void type in C++. And if Void is a user-defined type, you get a warning about an unused value, so you'd need (void)Void{stuff...};, which is.. eh
Also, I just noticed Alias<int[]>{stuff...} doesn't play well with stuff being an empty pack
Since that'd create a 0-sized array
Alias<int[]>{0, stuff...} it is, then
 
Xeo: Alias<int[]>{0,(stuff,void(),0)...}?
 
Xeo
8:57 AM
(void)swallow{0, (void(stuff), 0)...}; with using swallow = int[];, rather.
 
How do I show my code on LWS to others? Fork? And send which link?
 
Xeo
Usually, you can just copy the link in the address bar after hitting "run".
 
OK. Here's my code: liveworkspace.org/code/p5JxO$15
 
How can you capture an object member in a lambda? This won't work [object.member](){}
 
moaning
@StackedCrooked references; what name would the variable have had inside the lambda? You might just capture object
 
9:11 AM
I want to capture a copy.
 
auto&& member = object.member; [member](){}
 
Xeo
auto copy = object.member; [copy]{ ... };
Or that
 
That copies twice :v:
 
@StackedCrooked I know. Irrelevant. auto& memref = object.member; [memref]() {}
Damn. Am I slow?
Just out of bed
 
I just woke up too, and I'm fastestest
 
> This HTML is meant to be iframed in an iframe in order to do cross-domain iframe resizing.
 
I don't understand it all but it's got to do with frames.
 
Sounds like enterprise-level documentation... no wait... it still makes too much sense...
 
Xeo
There, edited the answer.
 
Nooooooo!
A few points:
typename gen_seq<>::type is missing
 
Xeo
9:24 AM
It's not. :P
 
Ah, OK, but only because you are using the wrong way to generate them. Consider gen_seq<10000>() and gen_seq<10001>() - the latter does add another complete set of instantiations.
Use my version (which was also accepted into libstdc++ a long time ago) and you scale much better.
 
Xeo
huh
 
@CatPlusPlus $('#element').watch({ re-init element style });
 
13
A: How do I replace a tuple element at compile time?

Daniel FreyYou can use this: // the usual helpers (BTW: I wish these would be standardized!!) template< std::size_t... Ns > struct indices { typedef indices< Ns..., sizeof...( Ns ) > next; }; template< std::size_t N > struct make_indices { typedef typename make_indices< N - 1 ...

 
@KhaledAKhunaifer What
 
9:28 AM
And the last point... no cookies for me ;(
 
@CatPlusPlus jQuery, it'll activate whenever you change any element inside the iframe
 
...so?
 
@CatPlusPlus how to counter that?
 
I don't know I don't care why are you pinging me with this
 
He's kinda hyper.
 
Xeo
9:31 AM
@DanielFrey Meh, if you're worried about instantiations, I'd rather go the O(log N) route.
 
@StackedCrooked I'm always hyper, ADHD
 
Show me, pls
 
Xeo
8
A: C++11: Compile-time Array with Logarithmic Evaluation Depth

XeoIf what you're using in the code is a weird form of the indices trick, here's an implementation that has O(log N) instantiations: template<unsigned...> struct seq{}; template<class S1, class S2> struct concat; template<unsigned... I1, unsigned... I2> struct concat<seq<I...

Also reuses atleast half of the instantiations for odd numbers. I think it can be changed to actually reuse all by simply taking the last index away and manually appending N-1.
 
Nice!
 
Xeo
So it'd be concat<gen_seq<N/2>, gen_seq<N - N/2 - is_odd<N>::value>, seq<0>>
I think
 
9:39 AM
That's odd.
No, seriously, I like it. I never considered the compiler's instantiation depth, only that the instantiations can be reused. Yours seems even more scalable.
 
Xeo
Just see Luc's comment.
 
I did. +1 for you.
 
@Xeo doesn't compile on the link in your post: liveworkspace.org/code/dcd5060a651c2da8fcfd5611aad1c5c9
 
user1357851
The idiot from North Korea is finally doing it: smh.com.au/world/…
 
@Telkitty: WTF??
 
Xeo
9:46 AM
@KhaledAKhunaifer Did you even take a look at the error message? It's intended that way.
 
user1357851
@DanielFrey lol, if anything actually happens it probably will be over in 3 months.
 
@KhaledAKhunaifer: C'mon, add the {} to the function`'f'` yourself.
 
user1357851
OMG y u here at 5:46am
 
Xeo
@DanielFrey No, it was supposed to cause an error.
 
9:51 AM
@Xeo to illustrate how it works ?
 
To see that it works, yes.
 
user1357851
@DanielFrey how does boost work? Are there just a bunch of people maintain stuff from all around globe or do you have a headquarter?
 
The former, no headquarter or something like that.
 
They have a lair
 
@CatPlusPlus We are organized in cells, waiting for the right [keywords] to show up on the list... :-P
Gave me a badge :)
I'll just check the number of people with this badge in 10 minutes - guess it will be higher by then :-D
 
user142019
10:01 AM
hi
 
Mawn Zoid.
 
user142019
@ScottW wot
 
user142019
10
A: Haskell - parse error on input `|'

ZoidbergBe sure to indent the guards; Haskell has significant whitespace. pow1 b e | (e == 0) = 1 | otherwise = b * pow1 b (e-1)

 
user142019
lol I got Nice Answer for something silly like this.
 
user142019
10:03 AM
ohlol
 
user142019
nice
 
Xeo
The fuck is up with you, @Scott
 
user142019
Oh almost hit repcap today again.
 
Drunkposting
 
Btw, it's also proof that unused variable can catch errors :P
 
user142019
10:15 AM
lol
 
My former boss even "switched of" access checks in my class. And complained that I had a bug there after he wrote random values in the private member variables of my class. Warnings... pffft...
`#define private public`
`#include <daniels_class.hpp>`
 
Xeo
@StackedCrooked Use indices, will ya.
 
Don't tell me what to do!
But is there any reason why I should?
 
@StackedCrooked: Do what you want, will ya?
 
@DanielFrey Go fuck yourself ;)
 
Xeo
10:20 AM
@StackedCrooked I like it better than recursion. It's also more scalable with the log N implementation. :P
 
Functorism vs Indicism
 
What's that log N thingy?
 
Xeo
48 mins ago, by Xeo
8
A: C++11: Compile-time Array with Logarithmic Evaluation Depth

XeoIf what you're using in the code is a weird form of the indices trick, here's an implementation that has O(log N) instantiations: template<unsigned...> struct seq{}; template<class S1, class S2> struct concat; template<unsigned... I1, unsigned... I2> struct concat<seq<I...

3
Q: CountDownLatch equivalent

LCID FireFor some concurrent programming I could use the Java's CountDownLatch concept. Is there an equivalent for C++11 or what would that concept be called in C++? What I want is to invoke a function once count has reached zero. If there is non yet I would write myself a class like the following: cla...

Hmm, abusing shared_ptr's deleter to implement this...
Oh wait, he wants manual count-down.
Oh and also @Stacked, with the indices, you can collect the return-values in apply more easily.
 
@Xeo Is linear not good enough?
 
Xeo
With recursion, you'd need a chain of tuple_cats.
@StackedCrooked Check Luc's comment.
 
user142019
10:24 AM
@ScottW bye
 
Xeo
In the normal case, linear will be just fine - same with not reusing old instantiations.
But if you're making a library, don't assume shit and be as generic and performant as possible. :)
 
mawning
 
@KhaledAKhunaifer Hey, what a cool badge you have... ;)
 
@DanielFrey which one ?
 
Xeo
Can you guys please reply to specific messages?
 
user142019
10:29 AM
@Xeo yes.
 
@Xeo Hey it's a clever technique.
 
@Xeo Okay.
 
Xeo
:s
Well, not that I didn't see it coming.
 
@Xeo Oh, didn't knew that...
 
@Xeo I like your Indices trick, it is recursive ..
 
user142019
10:38 AM
Hmm… TMP quicksort.
 
Xeo
STL did TMP merge sort in one video.
 
My head :/
I am dying.
 
Also Update 3 to ICC is live, right now only for linux
 
@BartekBanachewicz Grapefruit juice with a double vodka. Works for me.
 
user142019
10:51 AM
> Was the application written in a language other than machine code?
 
user142019
For the author, I hope so. lol
 
@MartinJames Does it work for coding overdose?
 
@BartekBanachewicz Ahhh no, not so far as I know :)
 
Xeo
@BartekBanachewicz Wimp
 
0
Q: Why does Visual Studio 2013 create a header file alongside a class?

Joseph My understanding is that is a typical C++ project there will be a lot more classes than header files. I just created a new empty C++ project in Visual Studio and created a main.cpp and a class called clockType.cpp. However, as default the IDE has also create a .h file for each .cpp file, like th...

Where does one start answering?
 

« first day (896 days earlier)      last day (4067 days later) »