« first day (1026 days earlier)      last day (3928 days later) » 

4:00 PM
@R.MartinhoFernandes yeah I got it in the end. some bullshit thing that I had to fully log out and back in because I had gone to the site via an order confirmation page
 
Ell
Hi guys
 
yeah, dns updated... now to leave the site alone for a good while :P
 
@DeadMG I hate you with a firey passion that passeth understanding.
 
@R.MartinhoFernandes Yep.
 
@MartinJames lol
 
4:03 PM
@MartinJames I am with you
 
bit unfortunate though since I drank more than a pound of orange juice (apparently) prior to weighing myself
 
@thecoshman Do you accept pullreqs with typo fixes?
 
We need to form lounge fatties club
 
I would die if I lost 15 kg.
6
 
I would be able to fit into xs if I lose 15 kg
 
Ell
4:05 PM
I think I would continue living normally
 
I've still got plenty to go
 
I am hungry :(
 
@R.MartinhoFernandes I have to admit that you are not the fattest dev. I've ever met :)
 
that's only like, between a third and a quarter of how much I'd really like to lose.
 
If I had lost 15kg I would rescind my contract on DeadMG.
 
4:07 PM
You want to lose 60 kg?
 
well I don't usually work in kg
 
@MartinJames is he really that skinny or was he just exaggerating?
 
but maybe 50 or so total would be good
 
@Telkitty猫咪咪 I weigh around 60 kg.
 
@R.MartinhoFernandes 60kg! You gonna measure your waistline with a micrometer?
 
4:08 PM
@R.MartinhoFernandes how tall though?
 
@Telkitty猫咪咪 I never drink and tell :)
 
@Telkitty猫咪咪 My ID card (about three years old) says 1.69m.
 
that's not too skinny
I am only slightly shorter and slightly heavier
 
@R.MartinhoFernandes with much shame... yes :(
 
Oh wait - the scrolling!! I meant my last but one post for DeadMG, not robot.
 
4:09 PM
I was actually going to ask you do provide such a service @R.MartinhoFernandes
 
@MartinJames lol. If I lost 60kg I wouldn't have a recognisable waistline to measure.
Maybe with a microscope.
 
Though I will also settle for you just pointing out said mistake to me, or any other general comments
 
@R.MartinhoFernandes Your coffin would be a funny shape.
 
This chat's tab froze and closed :(
damn chrome.
 
@Telkitty猫咪咪 I'm not skinny. I'm normal.
 
4:11 PM
@Rapptz why? it uses isolation so that everything didn't crash
 
@Rapptz don't blame chrome for your lack of ram :P
 
'cos chrome.
 
it uses some 10gb of ram for me on my home comp T_T
all the tabs
 
My dad weights 60kg and he's 180cm ... one of my close friends back in uni days was that skinny too. Skinny people scare me :x
 
4:11 PM
@EiyrioüvonKauyf Lol. When Chrome crashes, the whole thing crashes. This is the first time I've had a single tab crash ever.
 
@EiyrioüvonKauyf With so many tabs, how do you have any screen real-estate for other stuff?
 
@thecoshman I had 5 tabs open! That's nothing compared to my 50 at a time.
 
what is it with you people and your funny measurements! (ps, please let's not go through that debate again)
@Rapptz and? get more ram!
 
@MartinJames i'm really not sure how it uses so much
i only have around 20 tabs open
when i purge and restart chrome it goes to like 5 gb
i'm pretty sure there's a few memory leaks lying around
 
4:13 PM
I am 192cm and 89kg. That's about a DeadMG weight-loss too heavy.
 
also i use dual monitors
 
Is it unreasonable to have Move or Copy constructor requirements in your class?
 
Why would it be?
 
ThePhD keeps giving me a class with deleted copy/move constructor and pointing out that it fails when I use it on my stuff.
 
Ah - all is explained.
 
What stuff?
 
@MartinJames similar BMI here :p
 
@R.MartinhoFernandes I was writing an optional w/o placement new.
 
@Rapptz problem, 'thePhD'
 
4:16 PM
How does that work? new?
 
@R.MartinhoFernandes Nah, just a bool and some traits.
 
@Rapptz wait you work with @ThePhd ? // kk i assume a project
 
@EiyrioüvonKauyf No. Still no.
 
@Rapptz How can you skip initialisation then?
 
Evening folks
I haz a question.
 
4:18 PM
@R.MartinhoFernandes What do you mean?
 
@MadaraUchiha that will be 19.99 per question
 
Xeo
@Rapptz So you always default-construct?
 
(Note, I am not a c++ guy, I'm asking this on the behalf of a friend)
 
Ell
@MartinJames I'm 80kg :3
 
@Xeo Unfortunately.
 
4:19 PM
@Ell how tall?
 
Xeo
That's a fine optional you have :s
 
Ell
idk >.<
 
Dude's making a chess game, graphics and all.
 
@MadaraUchiha then you really shouldn't bother asking
 
@Xeo I'm not using it, I made it for entertainment purposes.
 
4:20 PM
Now, I've seen his code that handles events (clicks, types, whatever), a triple nested switch case.
 
Well, I think requiring default constructibility is worse than moves.
@MadaraUchiha Ugh.
 
And I told him, no freaking way that there isn't a better way.
 
Well anyway, was just interested. I don't post my code here (nor will I ever).
 
So I proposed him to implement two classes, EventHandler and Event
 
@Rapptz When does it fail? When you move your optional? Or on some other operation?
 
4:21 PM
Where objects create Event objects (with "type" and a "callback" field), and register it with the EventHandler
 
@MadaraUchiha Still gonna need a switch on the message type - kinda like a WndProc.
 
EventHandler should catch all of the broadcasts from the OS regarding events, and trigger them.
 
If the former, that's fine and ThePhD is being silly and I don't want to know how he does it. If the latter, you should be able to avoid it easily.
 
@MartinJames Why? How does the OS send the message?
(I know that in JavaScript you get a very nice well formatted object with everything you need plus everything you don't)
 
@MartinJames or variant
 
Ell
4:23 PM
@MadaraUchiha in windows it comes through in the message loop
 
@MadaraUchiha I dunno - it's your, (sorry - 'your friends'), OS!
 
Windows
Is the target OS at this time
@Ell As what, strings?
 
Ell
Microsoft Windows programs are event-based. They act upon messages that the operating system posts to the main thread of the application. These messages are received from the message queue by the application by repeatedly calling the GetMessage (or PeekMessage) function in a section of code called the "event loop." The event loop typically appears as follows: int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int nCmdShow) { MSG msg; while(GetMessage(&msg, NULL, 0, 0) > 0) { TranslateMessage(&msg); DispatchMessage(&msg); } return msg.wParam;...
No, as integers I think.
 
Woah, there's a wikipedia page for that?
 
Will read, thank you.
 
Ell
4:24 PM
It doesn't matter what it is though, you just compare to stuff in the windows headers
 
@Ell But doesn't it send where it happened, etc?
 
Ell
@MadaraUchiha I'm not sure what you mean?
 
@R.MartinhoFernandes fairly sure it follows rule 34 too
 
@R.MartinhoFernandes Consequence of construction now that I look at it :S
 
@Ell For instance, if you clicked, which coordinates were clicked.
 
Ell
4:24 PM
Wait, we are talking about windows desktop? You mentioned javascript, just checking we're on the same page?
@MadaraUchiha well yes - but each message is different
 
Well, I suppose you could have a large vector of events, one for each msg no.
 
If you typed a key, which key was typed, if you click and dragged, where did you drag it to.
 
Ell
depending on the message type, lparam and wparam are different
 
@MadaraUchiha it think the more pressing question is wtf are you doing twating around with os shit yourself? use a library that has taken care of that mess for you.
 
Ah well. I don't need it. Never had a use for optional and if I do I can just go the placement new or pointer route :S
 
@thecoshman I think he's trying to learn?
By first implementing, then moving to a library. I would do the same.
@Ell Thanks, will read.
 
@Rapptz Meh. Anyway, fuck mutices.
 
@MadaraUchiha I see you logic, but no. Unless you REALLY want to learn how to wade through the shit that is OS code, don't.
 
Mutii.
 
Ell
4:27 PM
Mutices
or erm "Mutexes"
 
@MadaraUchiha That's actually quite difficult. It's easier to build stuff with a form designer, fill in event-handlers, get stuff working and then find out how it works.
 
@thecoshman Also an advice I'll give him.
@MartinJames It's not really a "form" that he's building.
But an actual GUI, a chess game, with full 3d graphics.
He's using DirectX for that.
 
I'm pretty sure triply nested switch-cases are just wrong.
 
yeah, use a library that has taken care of it for you.
 
7 mins ago, by Madara Uchiha
And I told him, no freaking way that there isn't a better way.
 
4:28 PM
In a "no way I'm ever working with that person" kind of wrong.
 
I'm pretty sure that learning the wrong way first is not very useful.
 
@CatPlusPlus I'll mention that to him as well :D
 
@R.MartinhoFernandes and yet also, so easy to solve by simply making use of functions...
 
@R.MartinhoFernandes I very rarely go past one, and even then only if the 2nd level is trivial. If I need more, then call another function, (or give up and use lookups).
 
Why do people prefix their classes with C.
 
4:31 PM
haha
MFC crap.
 
@Rapptz 'cos code can get complex.
 
In any case, having each object implement his own solution, and have some sort of message handler calling the objects' callbacks seems more correct to me to have some sort of God handler, which does everything on its own, changing the states of other objects as needed.
 
I prefix enums with 'E'.
 
@Rapptz there are a lot of idiotic throwbacks people still use
 
@MartinJames :|
 
4:32 PM
@MartinJames for the love of all that is sane, stop!
 
> Checkout failed, error message: The receivers X and Y can't belong to the same PayPal account
FUN
 
@MartinJames not 'e'?
 
@Rapptz EfsOpen,EfsRead,EfsWrite,EfsFlush,EfsClose..
 
@MartinJames Still better than prefixing enumerators with k.
 
user1804599
4:34 PM
Hurray. Got object patterns working.
 
(Hi Apple)
 
@MartinJames Ugly.
 
@Rapptz Thanks :) I know it's an enum, I know it's a file system request..
 
e_FsOpen e_FsWrite e_FsFlush
 
You made it even worse
 
4:35 PM
Better include the type name there, too.
 
Aarghhh - underscores.
 
And the file, and the line.
 
@MartinJames you mean FileSystem::Open FileSystem::Read FileSystem::Write FileSystem::Flush FileSystem::Close right?
 
@CatPlusPlus EfsRequest!
 
enum EFsEnum {
    kEnumFsEnumFsEnumH10Open,
    kEnumFsEnumFsEnumH11Read,
    ...
}
 
4:36 PM
@CatPlusPlus WTF that!
 
enum class FileSystem { Open, Read, Write, Flush, Close }; <-- the correct way
 
Too long.
 
@thecoshman Well, it will resolve to calling those, eventually..
 
enum class fs { Open, ... }; is.. okay I guess.
 
@Rapptz I'm sorry, didn't realise you where still running a bbc micro ¬_¬
 
4:38 PM
Ugh no.
Don't make the type name shitty because it's shorter.
 
@thecoshman I'm just used to namespace fs = boost::filesystem.
 
@thecoshman Can I combine Read and Write?
 
@Rapptz why make the code harder to read? I have to go look up what 'fs' means, 'FileSystem' already tell's you it's for 'file system' stuff
 
@LucDanton File system operations, not flags.
 
@LucDanton Can you combine light and dark?
 
4:39 PM
@thecoshman I was under the impression fs was common. Boost.FileSystem uses it in their examples quite a lot.
 
Yin and Yang? Life and Death?!
 
It's called necromancy.
 
@Rapptz C is common, what's your point?
 
@Rapptz Alias name != type name.
 
@LucDanton o_0
 
4:40 PM
@CatPlusPlus Yeah I know.
 
@thecoshman Scoped enums aren't hassle-free.
 
@thecoshman I already have 'FileSystem' class in another unit. Things are confusing enough as it is.
 
@LucDanton if you want a 'read and write' flag, use a 'ReadWrite' enum
 
And I don't mean that in a handwavy way. I mean that they can suck really hard.
 
@MartinJames well, to be fair 'FileSystem' is a bad name for both that enum and I assume for your class too
 
4:42 PM
@thecoshman Combinatorial 'no', with emphasis.
 
@thecoshman Ugh no.
These aren't flags, though.
 
true
but I was more getting at his terrible naming of enums, rather than worrying about details of file system crap
 
@thecoshman The FileSystem runs in another thread - I have to message it to ask it to do stuff, so I need a 'command' enum in the messages.
 
@thecoshman Right. And scoped enumerations aren't the end-all solution for that problem.
 
@MartinJames FileSystemCommands ¬_¬ boom done
 
4:44 PM
WAAGGHH! Nobody likes my code :((
 
@LucDanton no, but if you want combinable flags, I wouldn't use enums in the first place.
 
@MartinJames Me too man. Me too.
 
Needs a flag type.
 
@CatPlusPlus with overloaded operator+ and operator- :P
 
@CatPlusPlus EftTroll,EftStupid,EftProfane,EftFlaggot
 
4:48 PM
I saw a large flat in London for rent at 18,000 GBP per month. Who the fuck pays that kind of money for a flat?!
 
holy shit
almost new york prices
 
I feel like British Leyland - nobody liked my unions, nobody wants my product :)
 
the same sort of people who count their money in sacks
 
@thecoshman s/sacks/trustfunds/g
 
I don't know what food to order.
 
4:49 PM
@CatPlusPlus how do you feel about pho
 
@CatPlusPlus lasagne
 
0
Q: What does this naming convention for headers refer to?

Aditya Kumar PraharajI was studying Include guards in C++ and came across this naming convention from the wikipedia page : CREATORSNAME_YYYYMMDD_HHMMSS . Can someone explain what is this and how it can be used?

 
Anyway, coffee and no-croissants time. There was going to be eats, but then DeadMG weight-loss news :(
 
@MartinJames It's not a competition!
 
4:51 PM
@R.MartinhoFernandes question for you, can you point me to the part of the C++ spec that supports what you asserted? I'm curious because I've been looking for what you said about template class function members and I can't seem to find it.
 
> D:\Dev\jsoncpp\src\lib_json\json_value.cpp : fatal error C1083: Cannot open compiler generated file: 'x64\Release\json_value.asm': No such file or directory
wat :/
 
why does it generate asm?!
 
i have a few sheets of bubblewrap :3
 
user1804599
Awesome.
 
4:52 PM
@melak47 Maybe it uses asm?
 
user1804599
I'm going to implement string literals.
 
I gave the dog some bubblewrap. It was funny until I had to clean up the mess.
 
@MartinJames almost the same
 
@Mgetz Yes, I can, if you give some minutes to handle something else first.
 
@Rapptz the only asm is compiler generated...why does it need the asm output?
 
4:54 PM
that's fine
 
@Rapptz okay, I turned off the option that outputs the .asm...and now it doesn't complain about not having it. wtf
 
@melak47 silent breaking is best breaking
 
Ell
@cat Chinese
 
@Mgetz It's in §14.7.1/1: "The implicit instantiation of a class template specialization causes the implicit instantiation of the declarations, but not of the definitions or default arguments, of the class member functions, member classes, scoped member enumerations, static data members and member templates" (my emphasis)
 
@EiyrioüvonKauyf lib seems to work now. why the hell would a lib be complaining that an .asm file is missing anyway?
 
4:59 PM
don't ask me ._. libs are weird
@Ell that's cannibalism
then again it's a cat ..... :/
 
@R.MartinhoFernandes thank you
 
I have 7,222 rep. Need 555 more for 7,777..
 
lol
or i can downvote you to 6666 <3
 
@Rapptz Lord Roslyn's plan!
Hmm, that might be too obscure a reference. Even Google has trouble with it.
 
Xeo
Hey, Robot
Gratz to the gold badge on that finally answer :D
 
5:04 PM
Also, I got myself into a SFINAE vs assert thing again.
 
user1804599
@StackedCrooked Perhaps the compiler optimizes out everything past 42.
 
@StackedCrooked size_t, bitte.
 
user1804599
Heck maybe it optimizes it to std::cout << 3 << std::endl;.
 
@not-rightfold Certainly.
 
user1804599
5:05 PM
Try disabling optimizations. :P
 
user1804599
@StackedCrooked lol I get this without optimizations: coliru.stacked-crooked.com/…
 
Indeed. I shrinks the array as an optimization.
 
@Xeo Oh FFS 112.
@StackedCrooked Or gets rid of it entirely.
 
user1804599
5:07 PM
Okay. Time to implement &n. Let the pain begin!
 
@StackedCrooked Yep, compilers can do crazy shit - both good and bad.
 
@R.MartinhoFernandes You're probably right.
 
Xeo
@R.MartinhoFernandes And it can even optimize the call to size() out since it's marked constexpr.
 
@StackedCrooked Asking about stack overflows on Stack Overflow causes a stack overflow.
 
Can the optimizer reorder fields in a class to make your types more compact?
 
5:08 PM
I've had a case where the compiler optimized an infinite recursion to an infinite loop.
 
@StackedCrooked I think so. Checking.
 
So it never stackoverflowed.
 
@Xeo I'm sure that's not the surprising bit.
 
The result was that the program took infinitely longer to crash.
 
Xeo
@StackedCrooked To a certain extent.
 
5:09 PM
So the optimization didn't make it faster. :)
 
Xeo
@Mysticial Yay TCO :D
 
GCC goes beyond TCO to turn recursion into loops.
 
> [C++11: 9.2/14]: Nonstatic data members of a (non-union) class with the same access control (Clause 11) are allocated so that later members have higher addresses within a class object. The order of allocation of non-static data members with different access control is unspecified (11). [..]
rep plz
 
access control means public/private right?
 
@LightnessRacesinOrbit . i.imgur.com/COB6tpu.gif
@StackedCrooked Yes.
 
5:11 PM
@StackedCrooked Right.
 
Weird. So public: int a; private: char b; does not necessarily mean that b comes after a.
 
> [C++11: 11/1]: A member of a class can be: - private; that is, its name can be used only by members and friends of the class in which it is declared. - protected; that is, its name can be used only by members and friends of the class in which it is declared, by classes derived from that class, and by their friends (see 11.4). -public; that is, its name can be used anywhere without access restriction
@StackedCrooked Indeed.
 
@StackedCrooked It gets weirder. public: int a; int b; private: char c; char d; can end up as acbd, or acdb, or cabd, or a bunch of others.
 
Meanwhile, the UK is all agog because a UKIP MEP said "bongo bongo land". So what. Doesn't make him racist. STFU.
 
Is that against italians?
 
Ell
5:15 PM
Idk but I dislike ukip because of being against sex ed
IIRC
 
Is main.cpp considered a classless global scope where you can call functions defined in it from any class?
 
@JohnMerlino cat
 
Ell
No
 
semi random question, is a multidimensional static array allocated contiguously? and is it legal to modify it if it is?
 
5:16 PM
@Ell what is this answering you're doing
@JohnMerlino that was a really silly question
 
@JohnMerlino The short answer is "no", the long answer is too long and involves, among other things, linkage.
 
@EiyrioüvonKauyf cd ~ && cat is_main_a_classless_global_scope
@R.MartinhoFernandes thanks for response. I was just wondering. Because I see a lot functions called within classes that are defined in main.cpp
and yet main.cpp has no class reference
 
nothing is defined main.cpp
i can call it poop.cpp
g++ -o poop.exe poop.cpp
./poop.exe
 
But there has to be a top level scope, a starting point - so you could say that main.cpp or poop.cpp or whatever you use to compile is the global class
 
Xeo
No?
Stop thinking in classes
 
5:21 PM
That scope is referred to as the global namespace. (Namespaces are entirely separate from classes in C++.)
 
Yes, there is a global scope, but it is not tied to files nor classes.
 
Xeo
Ugh, my head hurts.
 
0
Q: std::bad_alloc assigning a pointer from address of a reference

pythonic metaphorFor whatever reason, I ended up with code that looked like this typedef std::vector<double> Vector; void f(Vector const& v) { Vector const* p; p = &v; } This throws a bad_alloc exception at the point of assignment. Why? This is C++03 compiled on gcc 4.1.

@Xeo Does this help?
 
0
Q: Why doesn't the index/list of an array begin with 1?

Sai KiranIs there any special reason? I know that that's how the language has been written, but can't we change it? And what are the challenges we'd face if the index start with 1?

this again :|
 
Xeo
@R.MartinhoFernandes I'm not even gonna bother.
Hey, robot:
 
5:30 PM
@JohnMerlino You did way too much Java.
 
inb4 Java is terrible
 
@TonyTheLion Java is good. Stop it.
> Epic Legendary Intense Massive Heroic Vengeful Dramatic Music Mix - 1 Hour
 
@EtiennedeMartel You're no longer my favorite Canadian.
 
YouTube just suggested that to me.
Dafuq.
 
1
Q: How does std::chrono::steady_clock::now report errors?

vitautThis is related to my previous question where I asked if std::chrono::steady_clock::now should be noexcept. Now that I know that it should I wonder how does this function report errors? For example, a common implementation of this function on Linux uses clock_gettime which can return an error.

 
5:39 PM
Technically, noexcept means it won't throw exceptions, but it could still report errors the C way, no?
 
Ell
I guess. Or the stream way
 
user784668
Hai guise.
 
Ell
Uh oh. I have to lie to my friends parents
this can only go wrong xD
 
@R.MartinhoFernandes What if you share the object accross compilation units (which may have been compiled with different optimization settings)?
 
5:43 PM
@Ell you could just be honest
and then not have to worry that your lie will ever come out
 
Ell
I could. But the consequences of the lie are greater than the cost :P
 
@Ell Nope - once you go there, you expose yourself to blackmail.
 
@Ell So you're saying you're going to lie because it has worse consequences than telling the truth?
always strive to tell the truth, because in the end your lies will catch up with you
 
@R.MartinhoFernandes I thought ordering is as declared within access modifiers
 
My roommate's GF just played LoL for the first time
I'm so evil.
 
user1804599
5:52 PM
Hmm.
 
hi foldr, long time no see
also only two people got the hidden message in my rep quantity :F
@CatPlusPlus Referral system in LoL is working again so if you want to play you can do it on mine
 
@TonyTheLion hi
 
also it's dead here so....
"MUSLIMS GAVE YOU ALCHEMY AND ALGEBRA!!!!!". Indeed, where would we be without alchemy? Dark Age achievements undoubted. But since then?
 
and dinosaurs
 
user784668
So my code has a 99.4% data cache hit ratio.
 
user784668
5:57 PM
Is it good or bad?
 
what kind of cache hit? L1? L2?
 
user784668
L1
 
99.4% cache hit into L3 or lower isn't really that good.
into L1 its pretty good. Assuming the majority of the misses are into L2 and L3.
 
@Mysticial what is this? data cache hit ratio != database data cache hit ratio?
 
user784668
@EiyrioüvonKauyf CPU cache
 
5:58 PM
@DeadMG ohai
 
@Fanael how do you get this kind of data?
 
@Fanael how do you find that
 
@EiyrioüvonKauyf A cache miss into memory is often 200x slower than a cache hit into L1.
 
oh o-o that's not good
 
user784668
@Mysticial actually, majority of the misses are into RAM
 
5:59 PM
So if you're cache missing 0.6% into memory, that's a lot of time spend stalling.
 
how do you find out this data?
 
@Mysticial "a lot" o.O
 
user784668
@BartekBanachewicz profiler?
 

« first day (1026 days earlier)      last day (3928 days later) »