« first day (514 days earlier)      last day (4660 days later) » 

Xeo
Xeo
09:02
Okay, clang build is started, with that, g'night
night, Imma off too.
09:21
I know this is a painfully open question, but what do you guys make of unit testing and aiming for 100% code coverage with it?
It seems like a noble pursuit to me, and I guess if you combined it with some good automation, could really help prevent little mistakes being introduced
I don't aim for code coverage but I do use unit tests.
(sort of playing devils advocate) but then, with out code coverage information, how do you know if you are properly unit testing you code?
@LucDanton +1
The number of bugs you need to fix (in the wild/under time pressure).
Is a pretty good indicator
@thecoshman I have unit tests for the unit tests.
@LucDanton ...
09:31
@thecoshman how do you know that you are properly unit testing your code if you do have 100% coverage?
@jalf my point exactly. Unit tests are not a silver bullet
I create unit tests for things that carry risk for regression or won't usually be covered in acceptance/regression/chain testing. That's a lot of stuff, but really, not even close to 'testing everything'
good point @jalf, but if you do not have good code coverage with your unit testing, it is probably safe to assume you are not unit testing everything
which isn't to dismiss unit tests at all. But you can only ever prove the presence of bugs, not their absence. There's no way to ensure that everything is tested, any more than there is a way to ensure that everything works
To be completely blunt, I create unit tests mainly to feel good about my own code.
@thecoshman it's always safe to assume that you are not unit testing everything. :)
09:33
@thecoshman Absolutely. What's your question?
@sehe I was chatting... does everything need to be a question? :P
you can write tests to exercise every branch, every loop in isolation. But you still won't have tests for "this outcome in this branch, and then that outcome in the branch following it".
And the number of bugs I spot with my own unit tests is so significant that it humbles me. Also, you get a good reminder of what 'trivial' things get fucked up in practice. Mostly it is with leaky abstractions or interaction of components
but yeah, having 100% code coverage is obviously better than not having it
but it's not a silver bullet, and aiming for it may or may not be the most efficient use of your time. :)
@thecoshman No. Exactly my point: "good point @jalf, but..." there was no contradiction, and a hesitant use of 'probably safe' suggests a question. Just don't use but and don't question your statement if it is a statement. A rather obvious one at that.
09:39
@jalf I guess having code coverage for unit testing, as well more integration testing, is more important when you start changing your low level stuff. if you 'optimise' a class, and it helps to have a cock up pointed out sooner rather then later.
yep, absolutely :)
at the same time, if you assume you are starting with a good baseline, and make only small changes at a time, it should be obvious if you do make a stupid mistake of that sort
my point is just that even with 100% coverage, there are plenty of ways for cockups to slip past you undetected. And perhaps the time spent achieving 100% coverage could have been better spent getting 90% coverage and then spending the remaining time on other kinds of tests, or code reviews, or...
also, as soon as you introduce multithreading, your 100% coverage is basically meaningless
oh yeah, I totally a agree that getting 100% code coverage is not a wise way to spend your time. I guess ye old 80:20 ratio comes into play here
it takes 20% of your time to get 80% code coverage, and then 80% of the time to get that last 20%
yeah
I certainly don't have 100% coverage in my library
If I had to guess, it's probably only 30% or something. But at least it's on the important 30%, and has helped me catch a lot of nasty bugs :)
wouldn't mind having better coverage of course
09:44
I assume you are using source control, do you host it, or use something like github?
@jalf problem is, unit testing is boring as hell :P
I host it myself
and do you have some sort of automatic systems/scripts for when you check in code?
nope
@thecoshman Really? You may be testing the wrong stuff then. Or the wrong way. I find unittesting basically more interesting than writing the implementation about half the time.
to automatically run the tests and scuh?
09:46
@jalf indeed
@sehe or perhaps the problem is at the other end, and you're implementing something boring? ;)
nah, my library is small enough that I just run the tests myself
@sehe perhaps... though atm, I working on (or more intending to work on) unit testing the more low level classes
since I'm the only one who's working on it, that's good enough for me atm
@jalf True. True. No, not really. From devising the unit tests I learn new interesting corners in 'seemingly boring' code. That's the interesting bit.
that's true :)
IMO it depends on what you're testing though. Having to come up with contrived ways to test the internals of some code you really really really trust to be correct in the first place is kind of boring
09:49
I do like the idea though of having some fancy pants script, so that when I check in an update, I get unit and integration testing done and then reports generated that the script can check back into the documentation part of the source control
writing tests for something that you know will actually pay off is a lot more rewarding
Erm.. I usually unittest _just_ the lowlevel stuff. But frequently I abstract bits of business logic such that, in isolation, it becomes lowlevel as well.
The rest is _integration testing_ in my book.
btw, how do you people unit test in C++? I always run into problems where the code I want to test is tucked away in some .cpp file I really don't want to include, but can't access otherwise, or where all the state I want to test is private
isn't the idea of unit testing that is just the public side of classes that you test
@jalf I pick classes as units to test, so I prod the public interface.
09:52
so if you decided to add in result caching to a class, you would not have changed the public interface (other then perhaps adding controls for caching) and so the unit tests stay the same
Dunno, I've heard conflicting opinions on that. But if so, there's a kind of conflict of interests. I usually want my classes to expose a high-level interface. But when unit testing, I need to touch all the low-level bits
@thecoshman and then you can't test the class and the cache in separation, which annoys me :)
It's not always obvious what a 'unit' consists in. If it's not a class or larger, then C++-wise I think you're hosed. Other languages can sometimes get around that.
sbi
sbi
Whatever the meaning of blackbox/whitebox/unit testing, all I am interested in is results. If I feed a unit this data, does it output what it is expected to? And how about that data? If it has internal bugs that cancel out each other to produce the expected result, then that's a pity, and would concern me if it were my units, but otherwise I'd rather have those bugs that cancel out each other than fix half of them and break the results.
@jalf I mean if you had a class with a large chunk of data, and wanted to cache a checksum, rather the calculate it every time because the data dose not change that much
@thecoshman example http://ideone.com/z2Y0A
I don't hate writing code like that. It is important enough and just writing the cases makes you think about more cases
09:55
@thecoshman but if I'm unit testing, I'd prefer to write two tests: one that checks that the checksum calculation is correct, and one that checks that the cache caches correctly
but maybe that's just too idealistic, and I should just settle for testing larger units
it's just a limitation I'm always running into
@sehe a fine example of unit testing. It's not so much boring, as hard work to think of all the input and expected results
@sehe yes, i find it very much to be a snowball effect
just like the compilation model. Normally you try to keep things out of the headers if they're not strictly needed. But when unit testing, you might suddenly want them to be exposed after all
sbi
sbi
@jalf You could check the caching by having a test that makes the data source alter what the cache stores and verifies what the unit returns is still the old value. No fiddling with internal bits needed.
@sehe What does ToWerChar mean?
@jalf If that calculation is really part of the plumbing of the class, then that's a good example of something that I would simply not test in and of itself.
09:57
@sbi yeah, there are lots of ways to test it. But as I see it, the point in unit testing is basically to be able to pinpoint where something goes wrong. If my cache breaks then I want the caching unit test to fail, and not the "cachedchecksumcalculator" test
@RMartinhoFernandes It's the thing under unit test. It is a device that I used in migrating a lot of Oracle code to C# (the oracle code used ToChar and ToNumber). Wer is the name of the component.
@jalf but the idea of unit testing is that you just want to make sure that as feed it different data, you always get the right check sum. of course, in this case you can't tell if the caching is really being used, but you wouldn't really use unit testing for that
If the user can't tell the difference, what are you really testing?
@thecoshman wouldn't I? I kind of disagree. The idea in testing in general is to feed it different data and check that you get the right checksum. The idea of unit testing is to test units. And logically, "caching" and "checksum calculation" are two separate units
in my example of a cached check sum, I was meaning that the fact the value is cached can't be seen by the user, if it works correctly
09:59
@jalf Is it realistic that in some situations the caching could be made separate, i.e. it becomes its own unit and not something intrinsic to the class? Then that's testable.
@jalf Careful with that 'logically'. What the 'unit' in unit testing means is not something that has consensus.
@RMartinhoFernandes in this example, that you get the right checksum value. the user does not care if it is cached or not since they last asked for the checksum, they just want that value
sbi
sbi
@jalf For me, the point of unit testing is to reveal that something is broken, even if it is broken in some part of the code that nobody has touched in decade, breaking a feature none of your users has used in years, on a platform you don't even have at the company except for that one unit test virtual machine. If the test also reveals lots of details about the source of the bug, then that's an additional bonus, but I settle for discovering the bug at all.
@LucDanton indeed, I am under the impression that the 'unit' is basically the class
@jalf I think you're more interested in functional testing tbh.
by unit testing I mean 'public interface of a class testing'
sbi
sbi
10:02
@jalf Unit testing is but one tool in your box for finding errors. Code reviews, stepping through the code, explaining its workings to your cow-workers over lunch etc. are other means to reach the same goal. Not every tool is the right choice for every type of bug.
thus my example of a cached value, the public users of a class do not care if the value is calculated each time or cached, they just want the right value
@thecoshman Sometimes, the user cares about it. But if they do care about it, they must have some way to tell the difference. That's where you should plug your tests.
sbi
sbi
Caching bugs might be revealed by performance testing. So? The point is they are revealed.
@sbi cow-workers... I think that was deliberate :P
If there's no way for the user to tell the difference, there's nothing to test.
10:03
@sbi And there are also testing possibility after unit testing (we have about three more QA stages after development).
Like I think @sbi was getting at, something like caching results is more a performance test
@sbi yeah, absolutely. When discussing testing, I obviously just want tests that reveal as many errors as possible. But if we're talking unit testing specifically, then I want the smallest possible units tested
@jalf No, that's functional testing.
@LucDanton Functional testing is for testing units?
So what are unit tests supposed to test?
Functional testing is for testing functionality.
10:05
@jalf interfaces
Someone really needs to work on their terminology
sbi
sbi
@KillianDS Yeah. In a company with little more than half a dozen developers we recently hired an experienced tester. Within a few months she has found more bugs than all of us combined in several years, and she has become the star of the team. (Although I usually approach her by saying "You have again sabotaged my efforts to meet the deadline." It's all jesting, though, and she takes it in good spirit.)
Needless to say 'unit testing' is one of those things that has attracted a lot of attraction from the more marketing/buzzword oriented segment of the software industry. So take it all with a grain of salt imo. If you want to test something, do it, don't worry what to call it.
2
@LucDanton but taking the same example again, a class which computes checksums and caches the results: functionally, I want to know that the class works, that it always returns the correct values. What is cached, and what is computed on the fly doesn't concern me, as long as the functionality is correct
sbi
sbi
31 secs ago, by Luc Danton
Needless to say 'unit testing' is one of those things that has attracted a lot of attraction from the more marketing/buzzword oriented segment of the software industry. So take it all with a grain of salt imo. If you want to test something, do it, don't worry what to call it.
10:07
but the class consists of two units. One which computes checksums, and one which caches
@RMartinhoFernandes by the way, the code went down from 27k LOC in a single Oracle package (requiring external packages) to about 2.5k LoC in 31 classes.
@jalf Isn't that against SRP?
@jalf Don't you think you should be testing two classes, then?
@sbi reminds me of a web comic, "not invented here"
@sehe maybe. But that's been the working example in this discussion so far :)
10:08
@jalf isn't that two functions
@thecoshman well, 10 minutes ago you proposed it as a single class. Make up your mind ;)
@jalf I don't think that's so much refining existing terminology as adding fire to the unit testing buzzword/marketing spiel. No offense intended to you, but there have been books and books written (and sold) about unit testing, and so far I've managed to read none of them. So I'd rather keep it that way and not argue the terminology :p
@sbi Yeah, I work currently as a tester and that kind of comments sound very familiar :). I've gotten a lot more respect for testing since working here in general, it's the major reason this product is doing well.
@LucDanton fair enough. I couldn't really care less what my tests are called either, as long as they catch errors
10:10
@jalf yeah, one class, one public function public getCheckSum() the checksum is cached internally as private checkSum
I like pirate checksum.
4
but I can logically see the value of testing the smallest possible components in isolation, and that's just damn hard to do since that requires you to expose all those implementation details which you normally want to hide
@sbi In our workplace we have a team of 30 'heads' including about 10 .Net devs, 2 Oracle/other devs, 5 system testers, 5 acceptance testers/'valideurs' (testing domain specific metadata configuration). I like it a lot.
to the user of the class, there is no caching
@RMartinhoFernandes shh you :P
sbi
sbi
Jan 26 '11 at 19:23, by sbi
@Xaade Yeah, I like this typo and use it all the time. I guess the others are already tired of it. I'm glad I managed to amuse you with it.
Note the date.
10:12
@thecoshman but I'm not a user of the class, I'm a tester of the class. I know there's caching, and when something breaks, I'd like to be able to pinpoint the problem just by looking at which test failed: was my test of the caching, or my test of the checksum algorithm?
I wouldn't dare code up 27kLOC from scratch in .NET without proper business testing. Especially since this was core calculation logic, and our client is distributing 34 billion EUR on a yearly basis, based on these calculations :)
My biggest problem with wearing the tester hat is that to play the role properly you have to deviously try to trip up whatever you're testing. It's not something that always comes naturally when writing code to test in the first place is exhausting by itself.
@jalf I see what you are saying
@sehe You should divert a few cents...
(I'm sure there's a tvtropes link to go with that, but I'm not risking it at this hour)
but I guess there's no simple answer. It's just a tradeoff I'm always struggling with, especially in C++ with static typing and an amazingly stupid compilation model :)
sbi
sbi
10:15
@LucDanton Proper testing has to be done by people not knowing the code, preferably even by ones unable to understand it.
@jalf To be fair, even without the stupid compilation model, you struggle with it. In C# you need ugly hacks like placing attributes in your assemblies that give internal access to the test assemblies, or gasp reflection.,
@LucDanton I'd go as far as to say that it is impossible to 'forget' about the implementation details of the code you wrote.
think of it more from a TDD point of view, do you get the right checksum value? that is all you care about. of course, if you are not, you need to investigate why, but that is why you can step into the code as it calculate this value, then you can see if it is working it our wrong, or caching it wrong
@RMartinhoFernandes Well.... you can. That's not a limitation. That is a feature IMO
@RMartinhoFernandes Can't the ugly details be done for you by a unit testing framework?
sbi
sbi
10:16
@sehe Isn't 27kLoC pretty much what you need to type in .NET in order to connect to a remote server? (It always seems too talkative and repetitive to me.)
@sehe Sure, but you're still struggling.
@RMartinhoFernandes yeah, but the compilation model is an additional obstacle
@LucDanton You have to at least plant the backdoor in the code by yourself and making the members you want to be testable internal, not private.
@RMartinhoFernandes hmmm. I'd think there is a number of check before that. The payments are handled via a separate application, which is completely isolated. You cannot get your bank account registered for payments :)
Is coding backdoors into security programs illegal?
10:17
@sbi Not in our codebase :)
I'm not saying our framework is ideal (it's not. trust me) but it does allow you to focus on the work at hand.
@RMartinhoFernandes That sounds almost reasonable.
that's it. since my game-boy is broken and can't get fixed. I'm upgrading.
@IntermediateHacker yeah, I here the game-boy colour is fairly stable now
@LucDanton Well, I guess you could write the test code alongside the tested code, in the same assembly, even in the same classes, and then a tool could gouge the test code out of it for release.
sbi
sbi
@sehe Then maybe the guy doing it for us is wrong, but if I add a method, or modify one parameter of some other, in the wrong class, there's half a dozen ConnectorChannelProxySingletonInstanceWrapperBaseInterface classes I need to declare it in, too. I can never remember half of them, and usually just rely on the compiler to spit nasty error messages into my face in order to find all the spots. Thank god the compiler is fast and, so far, all of this fails at compile-time.
10:21
That actually sounds like an interesting idea.
@thecoshman actually, my game-boy was a game-boy color. I'm thinking of upgrading to some cell phone.
@RMartinhoFernandes dose c# not have pre-processor widgets like c++
@thecoshman Ugh, yes. But those are... unaesthetic.
@RMartinhoFernandes oh yes, silly me, of course the main priority for writing code is how it looks :P
Seriously, when was the last time you saw an #if in C# code?
sbi
sbi
10:23
@RMartinhoFernandes The last time I looked at C# code. Ours is riddle with #if 0.
@RMartinhoFernandes trying to think of the last time I was subjugated to C#
@RMartinhoFernandes I regularly code a lot of stuff with internal/protected internal visibility. This was especially true for this project - I had wrapped all database-entities in proper C# classes that form a tree struture (complete with .PreOrder(), .PostOrder(), .DepthFirstVisit(preAction, inAction, postAction) algorithms). There was no need to limit visibility since it is not a library. Nothing of this will be visible outside the tested assembly, anyways
@RMartinhoFernandes Everyday. I use them. Only for temporary purposes (scaffolding, A-B testing)
Dammit, at least agree with me that they're ugly.
sbi
sbi
@thecoshman Actually, the main priority for writing code is how it looks. According to the compiler, you could write everything (but preprocessor statements) on the same line. It couldn't care less. It's the humans who will have to read the code later which you are making it pretty for.
10:24
@RMartinhoFernandes Oh, they are. But they work. That's a pre
sbi
sbi
@sehe ...mature comment of you?
@thecoshman No it doesn't. It has a very limited #define, but nothing like C++'s preprocessor
@jalf For selectively compiling code out, that's all you need.
@sbi Don't act all that surprised. I've been (acting) mature since primary school. That's basically my problem, socially :) I just act out on this chat
@jalf That is a pro, too
10:26
@sbi you know exactly what I meant ¬_¬
sbi
sbi
@sehe I was finishing your sentence for you.
@sehe pre?
@jalf an advantage. Is that a 'pro' in English?
What language are you speaking?
sbi
sbi
@thecoshman I dunno. I felt I answered to what I think you meant.
@RMartinhoFernandes Whom are you speaking to?
10:27
@sehe oh right, makes sense then :)
@sbi perhaps my sarcasm didn't portray it self well
@sehe as in a pro or con, yes. Though it is not 'proper' English, more like universal slang
sbi
sbi
@thecoshman Confused. I did take it for sarcasm. That is why I objected.
@thecoshman Actually, "pro" is Latin, I think.
@sbi but your point seemed too serious to be a response to what you know is sarcasm... where you being funny?
Damn timeouts.
typos; typos everywhere
@RMartinhoFernandes I was slow to edit :P
sbi
sbi
10:30
@thecoshman You keep making me more confused. You said what I (later) said, only you said it in a way that implied to me you were being sarcastic. So I said it again, trying to emphasize that there should be no sarcasm in the statement.
@sbi my initial comment, about the aesthetics of code was sarcastic, your response to me was...
sbi
sbi
@thecoshman ...emphasizing you shouldn't be sarcastic.
Yeah, I already said so.
@RMartinhoFernandes but it's use as an adjective for an attribute is slang, I believe
@IntermediateHacker I see what you did there
IntermediateHacker, Al Buraymi, Oman
2.2k 3 19
I upgraded!.
@thecoshman In "that is a pro" pro isn't used as an adjective.
@IntermediateHacker still a game-boy :P
sbi
sbi
@DeadMG Surprising as this might be for you, but your sexual attractiveness does not necessarily correlate with your weight.
@thecoshman I'm an obsolete cell-phone now.
@LucDanton I guess not... but it's use in that example is slang AFAIK
10:34
damn, this looks idiotic.
I'm changing to something else.
@IntermediateHacker the game-boy didn't?
@sbi something about correlation not implying implication
@IntermediateHacker It connects to cells and makes calls. What's obsolete about that?
@thecoshman The answer to that is only a dictionary entry away! Admittedly though I'm more likely to check a dictionary when the language involved is not my first.
sbi
sbi
@thecoshman Actually (and: as I said; sigh) there isn't even a correlation.
@thecoshman The word you're looking for is "causation".
10:36
@RMartinhoFernandes it can't run Angry Birds like @Akki can.
@LucDanton but the dictionary (at least the de-facto Oxford) has abbreviations in it
@IntermediateHacker That's the job of... a game console?
@sbi well then... I think we have both made a point
@RMartinhoFernandes indeed I am :D
@thecoshman An abbreviation isn't necessarily slang (E.g. 'e.g.', which incidentally also comes from Latin). Regardless of that though, I expect a good dictionary to also explain the word and point out if it is, in fact, slang.
@IntermediateHacker Angry Birds ... (╯°□°)╯︵ ┻━┻
@LucDanton oh, well if we are talking about 'good' dictionaries, that changes things
10:38
@thecoshman ma' aarif japanese.
@IntermediateHacker Yes?
sbi
sbi
@thecoshman No?
Btw, the page I linked to the latin version of the word has English a tad up.
sbi
sbi
@RMartinhoFernandes tl;dr
:b
@thecoshman As I've said, I would never put that kind of effort for my first language ;) Using another language makes me walk on eggs though.
10:39
damn, can't think of a good gravatar.
@sbi huh, so guerrillas can learn
sbi
sbi
@IntermediateHacker For an intermediate hacker?
Guerrilla warfare is a form of irregular warfare and refers to conflicts in which a small group of combatants including, but not limited to, armed civilians (or "irregulars") use military tactics, such as ambushes, sabotage, raids, the element of surprise, and extraordinary mobility to harass a larger and less-mobile traditional army, or strike a vulnerable target, and withdraw almost immediately. Etymology The term means "little war" in Spanish, and the word, guerrilla, has been used to describe the concept since the 18th century, and perhaps earlier. A person who is a member of a guer...
@thecoshman gue-what?
@LucDanton you should use them to make cakes instead. Every one likes cakes... EVERYONE
@sbi FFS
at least I didn't say monkeys :D
No, seriously, "guerrilla"?
lol
sbi
sbi
10:41
Interestingly, the first pic google image search throws at me for "guerrilla" is that of a gorilla. Epic fail.
@RMartinhoFernandes I meant gorillas
For when you can't afford a real war.
@sbi see, it's not my fault
sbi
sbi
@thecoshman Aren't you working for google Ireland? :)
10:41
@RMartinhoFernandes ¬_¬ not sure if NSFW or just YT trolling through thumbnails
@thecoshman AFAIK it's SFW.
@sbi huh? if I am, I've been turning up to the wrong place for the last 8 months
@RMartinhoFernandes is it really worth me stopping my music that I enjoying muchly? (yes, I said muchly, start using it!)
@thecoshman You're a pawn subject in a cunning evil plan psychological experiment.
Next thing you know, you'll be pushing a button in a bunker in the Pacific.
@RMartinhoFernandes that is some what nice to know, sort of takes away the fear of depth though...
but maybe that is the point of the experiment :O
10:45
@RMartinhoFernandes jeez. Did I cause all that fuzz? :)
sbi
sbi
Well. I need too pack my stuff now, have a shower, and leave the incredible hospitality of this house. Then I'll have another afternoon to spend in London until I have to catch my flight back to Berlin. Silently weeps. I've had a wonderful time here.
I give up. I'm reverting to my previous one.
yeah, I really loved my short stay in london as well
@sbi oh I didn't realize you were away from home
@sbi hollywood hacker?
10:46
Anyone has insights regarding the named constructor idiom in C++? The better if it's C++11, too.
@thecoshman No idea. I don't know what you like.
@thecoshman I stayed there for <5 days. Saw more concerts/plays in that time than during the rest of my life (well, maybe not exactly but...)
I just posted it because mentioning "guerrilla" reminded me of it.
@sehe <5 days? That was two days too much.
Damn, how long will it take to revert?
10:47
@sehe is that all, seemed longer then that
fuck it. I want my game-boy back!
Wait, I think I've got idioms wrong. Which one is it that makes it easy to construct an object when possibly multiple parameters can be passed, some of them possibly optional? E.g. T foo = make_T().with_bar(bar).with_quux(quux);.
Ah.. here we go.
damn. still didn't come up.
<-- curse this obsolete mobile phone.
@LucDanton isn't that just function chaining...
And the copy-and-swap idiom is 'just' construction and swapping.
10:51
@LucDanton That sounds like a builder pattern. Does it have a C++ specific name?
@sbi I think you need a new hobby
@RMartinhoFernandes Don't think so. Tried googling 'fluent constructor' since this kind of thing has the word 'fluent' attached to it these days for some reason, and I'm getting hits. And yeah, Builders are appearing in the examples.
@sbi you went to London and all you did was go to museums ???
sbi
sbi
@thecoshman If you have enough kids, you don't need any hobbies.
We walked Richmond park for hours, cooked a gorgeous Sunday roast, and discussed issues of sociology until midnight. What a spectacular day!
10:53
@sbi I guess I did
@sbi you accidentally added the word 'enough' in there
2
A: Object constructor "settings" idiom

Tom KerrLooks like a mix of things. The Settings object is created with the Named Parameter Idiom. Though usually you see it returning a reference to itself so you can chain them. struct Builder { Builder &one(int val) { one_ = val_; return *this; } Builder &two(int val) { two_ = val_; r...

sbi
sbi
@thecoshman That was just to mislead you. Actually, one can never have enough kids.
Anyway, gotta get going. See y'all later!
@sbi at present, I believe you are just trolling me, but I am sure they are addictive once you get 'stuck' with one
@RMartinhoFernandes Oh so that's why I thought the C++ FAQ did have an entry on that. But it's NPI, not NCI. And not to be confused with named parameters. Meh.
Thanks a lot.
The proper Google incantations brought it up: "constructor parameters idiom c++".
sbi
sbi
I like to imagine the sub-editor who wrote this headline slumping over her keyboard in despair halfway through — Helen Lewis
And did I mention I need to get going?
@sbi you did, but some how I don't think you will :P
Yeah. In this room that always means "sometime in the future I'll be going; I should be doing it right now, so I'll mention it to make me feel good about it, but I'll still stay around for a possibly long while"
11:01
There's been a flood of Europian expatriates in my town recently. It's like all of Italy is rushing to inhabit it. I've even seen a few German people. I wonder why they would want to come from their respective countries to this desert just for jobs?
Isn't Oman having a revolution or something?
@RMartinhoFernandes no.
I think it's one of the few left.
Oh. I thought you had some Arab Spring thing going on.
@RMartinhoFernandes lol, that's Syria and Libya.
So, Oman is not ruled by an opressive regime? (Can you mention that on the Internet?)
11:05
That's odd, I attempted optional<T[3]> just for fun and I get an error on get().~T() (in the optional destructor) saying that's a request for the destructor for a type that is non-class.
Obviously though optional<int> works. GCC being helpful again.
It isn't. Though I'm not an Omani, so I wouldn't know more about it. It is a monarchy though.
I actually managed to convince my friend yesterday that Libya was no longer a country
@IntermediateHacker Wait, am I confusing you with someone else?
@thecoshman What?
@RMartinhoFernandes No. I do live in Oman, but I am not an Omani.
11:06
@IntermediateHacker FTR there are lots of monarchies in Europe, just as there are in the rest of the world. (And in fact it's the most common form of government all in all.)
Not all monarchies are the same obviously however...
Most European monarchies are just for show, though.
@RMartinhoFernandes I told him that Libya had been broken up by surrounding countries like Egypt, and despite giggling as I told him, he believed me
We just murdered them all when we implanted a Republic.
Well, the Sultan is just for show too. Most Omanis respect him though.
All that just to say that 'monarchy' isn't the most helpful description of a government.
11:09
Most Northern European countries have monarchies.
@RMartinhoFernandes monarquies?
@thecoshman Damn.
It's when you make a large tent out of nobles.
oh right, wasn't sure if it was some thing I had was unaware off
Ah, so when I make a typo, you think it could be for real? Awesome.
Thanks for the vote of confidation.
11:12
Ironically most of our finance , industry etc. is managed by Germans.
The Sultan literally hires people to govern the country.
That's literally how it happens in other countries, too.
@IntermediateHacker He's too busy eating grapes for that.
Well, except for the Sultan I mean.
(That's what sultans do, right? Eat grapes and watch odalisques dance?)
@RMartinhoFernandes yeah, lol. And decorating his dress.
Qaboos bin Said Al Said ( '; born 18 November 1940) is the Sultan of Oman and its Dependencies. He rose to power after overthrowing his father, Said bin Taimur, in a palace coup in 1970. He is the 14th-generation descendant of the founder of the Al Bu Sa'idi dynasty. Early life Sultan Qaboos bin Sa‘id was born in Salalah in Dhofar on 18 November 1940. He is the only son of Sultan Said bin Taimur and princess Mazoon al-Mashani. He received his primary and secondary education at Salalah and Pune [Maharashtra, India] and was sent to a private educational establishment in England at age ...
11:14
@RMartinhoFernandes Yeah, 'odalisque', like that's a real word. Stop fibbling.
@RMartinhoFernandes in that example ¬_¬
@LucDanton What? It is.
@RMartinhoFernandes stop trying to make up words
@RMartinhoFernandes 'fibbing' is real too, but 'fibbling' isn't.
You have no idea what you unleashed.
11:16
@RMartinhoFernandes Doesn't count as a real source.
lol, urbandictionary is being used as a authentic source. :D
There was no way I could invent a word similar to 'fibbing' that wasn't on UD.
@LucDanton it is a real source, to deny that it is a source is just pig dumb. You want to be denying it's validity as a source
Pig dumb, lol
@thecoshman It's clearly valid. It even cites examples.
@thecoshman Not even, that would dilute that meaning of 'source' to nothingness.
11:18
Don't star that!
@RMartinhoFernandes Why not? You posted it
@RMartinhoFernandes oooh... now I want to
So amazingly I'm going to add support for optional<T&> so that optional<alias<T[N]> const&> is possible.
why isn't my gameboy gravatar returning?
dammit!
@IntermediateHacker did you try turning it off and on again?
11:21
@thecoshman yes.
I find it weird that there are no such things as const references to arrays.
@IntermediateHacker I see that green thing
@IntermediateHacker well then I'm out of ideas
Any attempt to construct such a beast quickly devolves into a reference to an array of const elements.
Well, it's like references.
11:22
@IntermediateHacker I just refreshed, your still a shity phone
damn. I hate being a f*cking phone. :'(
@LucDanton What do you mean?
@IntermediateHacker the girls love it
well, not all of them I am sure
Both immutable types that have no need to be const-qualified.
in fact, most probably would hate the idea
std::array<T, N> const& is possible and not the same as std::array<T const, N>&.
@LucDanton Yeah, it makes sense, but it just irks me.
wohoo! I'm a game-boy again!
nope, still a phone
<-- the game-boy is back. refresh to see.
11:24
¬_¬ fine
@RMartinhoFernandes Well yeah. What if someone else assigns to the array referred to by the std::array<T, N> const& you're holding? On the other hand, that's not possible with the second kind.
there you go, your now a shitty game-boy again @IntermediateHacker
in fact, AFH.
11:27
Away From Hell?
Away from House.
@RMartinhoFernandes lol.
oh, you mean away from help
11:49
Egad. The one TU that makes GCC freak out these days is the unit test for optional... I can't test optional<T&> there, gah!
Yay, I got it right on the first attempt. Probably.

« first day (514 days earlier)      last day (4660 days later) »