« first day (444 days earlier)      last day (4487 days later) » 

7:00 PM
4
A: How to combine auto getter&setter with PIMPL design pattern in a public API interface class

sbiGetters and setters are there so that you can "grab" into an object's guts and fiddle with its innards. That should make your alarm bells ring very loudly. For a well-designed class, you do not have to dig through its guts, since it lets you do everything you need to do through its interface with...

 
@Xaade Post an article on Slashdot on how it has been cracked - buy for real money - ... - profit.
 
Ah, I think this is it. My router finally started cooperating in my search attempts!
 
@StackedCrooked You know, instead of governments bitching about a currency they can't control, they could just figure out how to inflate it to death.
 
Xeo
I wondered all evening why my rep just won't increase... I'm repcapped for today. :|
 
@RMartinhoFernandes I don't see how changing a player's name or accessing it is digging through its guts
 
7:01 PM
@Xeo Congratulations and praise for making good contributions.
 
@CaptainGiraffe ... That seems backwards....
 
@Xaade The Slashdot article is key.
 
@RMartinhoFernandes nice
 
Usually you profit off an asset before you destroy profitability on that type of asset. Like Wall Street and the housing market.
 
@Xaade The slashdot effect will only make enough of an impact for you to capitalize on before it recovers to the drugtrade levels.
 
7:04 PM
@CaptainGiraffe Claim you cracked it without cracking it, and you assume I'll get it all cheap, then sell later? Apparently you haven't read up on Great Depression. Massive runaway is hyper deflation, I'd be waiting years if ever it bounced back.
Since it's simulated money, it'll likely never bounce back if it ever fails.
 
@Xaade Well next of course you post as AC on Slashdot stating it was never compromised in the first place. Benefit is no cracking will have taken place.
 
It doesn't have an asset to back it with. Dollars has America as an asset (not gold anymore). So basically the American name is the value of the dollar.
 
@Xeo I'm watching your ideone account :)
 
Xeo
lol
 
@CaptainGiraffe typically you have to have evidence that it's been cracked.
 
Xeo
7:07 PM
@sehe I was kind of thinking about functional programming, repition, infinite lists n stuff. Decided to continue watching that AskUsAnything from C++&Beyong though xD
 
What's VVTTs?
 
@Xeo Mmmm. My luck: I was wondering why I wasn't getting any rep for a decidedly nice (overkill) answer here:
4
A: Boolean expression (grammar) parser in c++

seheHere is an implementation based on Boost Spirit. Because Boost Spirit generates recursive descent parsers based on expression templates, honouring the 'idiosyncratic' (sic) precedence rules (as mentioned by others) is quite tedious. Therefore the grammar lacks a certain elegance. Abstract Data ...

Turned out, I accidentally community - wikid it and no moderator likes me enough to respond to my flag (? guessing)
 
@Xaade On Slashdot?? no just create 2 sites and your good to go.
 
Xeo
@RMartinhoFernandes Scroll up a bit
 
Hmm.... it seems I wasn't a frequent user over the holidays.
 
Xeo
7:10 PM
template<template<class...> class... VVTT> basically
 
I'm trying but chat is confused again.
 
Xeo
Arbitarily nestable, of course
 
I'm a room newbie again.
 
Xeo
Read the hints then!
:P
 
Does anyone know of a way to write out characters to console as binary ?
 
7:12 PM
Seems like you dropped out of the frequent list. No idea who purged you.
 
@CatPlusPlus you get these locally on installation too and there is a hotkey (which I forgot right now)
 
@RMartinhoFernandes I have lots of enemies. Apparently people don't appreciate expertise in trolling.
 
@angryInsomniac What does that mean? Characters are binary.
 
@sehe You mean Browser? F1 from the listener. :P
 
@angryInsomniac I can't recall a way to write binary to a stream.
 
7:14 PM
@sehe I think he means the expanded text that represents binary?
 
@angryInsomniac out<<c; // out that char.
 
user406009
There is only a difference between binary and text in windows.
 
@MooingDuck fstream.write(buf, len)?
 
Usually hex does the trick for me. And it's even shorter.
 
It's even better than web-based docs, because it can search through your own code, too.
 
7:14 PM
@sehe I assume he means std::cout << '\n' will display 00001010.
 
std::cout << std::bitset<8>('n');
 
@MooingDuck, @Xaade: I don't think so :)
 
@EthanSteinberg mac has a difference between a binary file and a text file as well
 
@sehe I mean suppose 'a' is represented by 00101001 (not the representation but this is just an example) so I want to print 00101001 and not a
 
See mine.
 
7:15 PM
@CatPlusPlus I'll try that
 
@sehe I don't think you don't think so.... think so.
 
@sehe see? I was right about my interpretation of the question
 
Oh, good.
@Xaade: I _thought_ not so
@MooingDuck: congratulations.
 
You guys should think so more often.
 
user406009
@MooingDuck Are you sure? I though the whole binary vs text thing was due to Window's alternative line endings.
 
7:16 PM
@sehe Mine makes less sense. Obviously better.
 
@CatPlusPlus Killing an elephant with A-A ammunition trapped in a cave, locked by concrete encasing.
 
I was right about implementation of the question.
 
@EthanSteinberg wait, Mac used to just use \r if I recall, but then changed to \n with OSX. I heard.
 
Yup, old MacOS9 used that. It's ancient and nobody does that anymore.
 
See, now that I actually have to earn stars and can't cheat. It's fun again.
 
7:17 PM
lol
 
\n is the newline character, unless you're an Internet protocol.
 
@CatPlusPlus or windows.
 
user406009
Window likes to be stupid though.
 
I don't use \r\n on Windows.
 
@CatPlusPlus =)
 
7:18 PM
I'm an Internet denizen. I use the protocols for my own nefarious needs.
 
Use not-broken tools.
 
@CatPlusPlus precisely
 
@CatPlusPlus Like any sane person.
 
user406009
@CatPlusPlus That's because the runtime does it for you.
 
user406009
When you open in text mode.
 
7:18 PM
Yes, because clearly, I don't know what I'm doing.
Thanks for the vote of confidence there.
 
How come notepad.exe has felt broken for over 15 years?
 
Because nobody uses it for anything serious.
 
47 secs ago, by Cat Plus Plus
Yes, because clearly, I don't know what I'm doing.
qft
 
There's no pressure to fix it.
 
It's still an option on most right clicks.
 
7:19 PM
notepad++
 
What's this notepad thing you're talking about?
 
What's a right click?
 
Ok, that was silly.
 
Sometimes, I don't even know right from left.
 
vi -> /usr/vi-alternatives
 
7:20 PM
Used to, editing HTML in notepad showed sophistication.
 
"So now you open the folder, wrong-click on it, and select delete."
 
And it happens way too often for me to be comfortable about it.
 
@CaptainGiraffe vi sucks. Don't recommend that to anyone. It will make them biased against the awesome vim.
 
Also why I keep away from driving.
 
@RMartinhoFernandes sry I use vim for quite a lot of stuff.
@RMartinhoFernandes Oh, sry, I should have read your complete comment =)
 
7:21 PM
Do you guys have an established opinion on the practice of implementing the Pimpl idiom using shared_ptr for the pointer to implementation?
 
Why shared_ptr?
 
@CatPlusPlus I thought the main reason for people to avoid driving was that I did so.
 
Did driving or did avoid driving?
 
Actually I do both. But I mean the first.
 
@CatPlusPlus Because you can pass the object around by value. Which is convenient.
 
7:23 PM
 
@Xaade Our favourite troll =)
 
@StackedCrooked You can implement deep copy with unique_ptr easily.
 
@StackedCrooked Make a unique_ptr wrapper that gives it value semantics (i.e. copies).
 
Copies with shared internal state might be confusing.
 
Google is starting to lose my love.
 
@Xaade Its weeping now
 
> No images, no base64, no SVG, no canvas, just 3395 lines of CSS code and 335 lines of Javascript code (with jQuery, of course).
 
Guys, theres this new place called wikipedia its awsome!
 
7:26 PM
3000+ lines of CSS! Awesome!
 
@CaptainGiraffe Wiki didn't show the actual definition for PIMPL, it showed some kind of bloated mess that I didn't bother reading.
 
How about I make GCC play nice with libc++? Then we can all use a mostly functional compiler with a full-features C++11 lib
 
@StackedCrooked See above
I don't miss anything from stdlib. What'd be missing is in Boost, anyway.
 
@CatPlusPlus std::is_trivially_copyable is not in boost!
 
@Xaade The wiki entry is not that bad actaully.
 
7:28 PM
(I never needed that though)
 
Incredible.
 
I almost clicked.
 
There, we're safe now.
 
What's your secondary Programming language ? after Cpp
 
7:29 PM
You can have two?
Haskell.
 
@EmAdpres Unfortunately, today it seems to be Java. But if I could choose it'd hesitate between Ruby, Clojure and Haskell.
 
I have seen it just now
 
Wait.... where did you move my message?
 
I code small stuff in various languages and never finish them.
 
@Xaade To the bin. It was a danger to public health!
 
7:30 PM
@Xaade feel free to join it :)
 
I don't see the move message!
 
Python is still my primary language.
 
@Xaade I edited it :P
I'm sneaky.
 
I use python myself
 
2 mins ago, by R. Martinho Fernandes
There, we're safe now.
It's this one.
 
7:31 PM
but maybe Haskell be fourth ...
 
Every time I code something in C++ I get terribly annoyed by some crap.
 
@CatPlusPlus where do you include pimpl.inl? In the using class' cpp file?
 
Mostly related to tools.
@StackedCrooked Yes.
 
Yesterday I think I used the F-word. My message was presumably flagged. In that same minute the F-word was used by at least 7 others - sometimes even multiple times in a message. There is no justice.
 
After the definition of wrapped type.
 
7:32 PM
Every time I code in PERL I get annoyed by some crap.
 
@CatPlusPlus Is that the one you stole from Herb?
 
Or maybe it doesn't have to be after.
 
s/PERL/*/g
 
@RMartinhoFernandes Yeah, but I've added copying and moving and docs!
 
@sehe It was? And no outrage?
 
7:32 PM
Well, not from me. It's a bloddy chat :)
 
@CatPlusPlus Nice implementation. I usually declare the impl as a private inner struct in my class.
 
But I think I liked the inheritance-based one better. I'm not sure yet.
 
I wonder if you can link message from bin?
 
@CatPlusPlus Herb's has docs too. It has a couple of blog posts of documentation.
 
Tempted to try? Must.... resist.... evil....
 
7:33 PM
I was referring to VStudio dialogs at the time. I reckon, Microsoft software is easily offended
 
@StackedCrooked You're using it like struct foo { private: struct impl; pimpl<impl> d; };.
 
@StackedCrooked He stole it from Herb!
 
It has a note!
 
@Xaade It works.
 
I failed to resist.... :(
 
7:34 PM
@Xaade And you have trailing garbage on your truth statement (to resist... :( seems out of place there)
 
@RMartinhoFernandes When Herb posted the challenge I replied that there would be no point in librarizing the impl idea. I think I was wrong.. :(
 
It was librarised way before that.
 
Every time I see a "(removed)" message I feel the need to resurrect it.
 
But this way is nice.
 
@RMartinhoFernandes There's an undelete?
 
7:35 PM
I'm remembering a very good post from SO on how to ask a good question. I want to reuse it for my uni classes. It's not the Jon Skeet page I'm looking for. Does anyone have a clue how to find that post?
 
@sehe He forgot nul.
 
Also, FF seems to still be loading this chat.
 
user406009
Virtual base classes can sometimes be better than pimpl though.
 
I moved the chat to Chrome, it's bit more responsive this way.
Now I have two browsers full of tabs!
Beat that.
 
@RMartinhoFernandes FF is fine for me.
 
7:36 PM
Declaring Impl as a private inner struct is nice as well. As long as you don't want to implement deep copy semantics.
 
Having Chrome makes having Firefox too tempting.
 
@Xaade If an owner quotes a delete message it is properly quoted as if it was still there.
 
@CaptainGiraffe It is for me too. It is especially well-behaved since I stopped launching it.
 
@StackedCrooked It doesn't depend on Impl being inner class.
 
@RMartinhoFernandes Epic Necro QFT power!
 
7:37 PM
@CaptainGiraffe It's working here too, but the tabs still show the spinning green circle.
 
@CatPlusPlus Yeah, I realize that too now. Just never attempted it.
 
It's been at it for almost ten minutes.
 
Xeo
0
A: how to initialize the array of pointers to a structure to zero

Xeostd::vector<A> v(100); Or did I miss something?

 
@Xeo You missed nothing.
 
Xeo
Did I miss something in the question? I gotta admit I'm not very good at reading C code..
 
7:37 PM
@Xeo that's C++11 only
 
I'm Here ... 127.0.0.1 ! :D
 
I also don't know if pimpl using local buffer wouldn't be better.
 
Xeo
@rubenvb Eh... no. C++98.
 
@rubenvb What?
 
@rubenvb You're right, if you mean also C++03.
 
7:38 PM
@Xeo At least specify your answer is for C++.
 
Maybe not.
Stupid.
 
@StackedCrooked lol ok, nvm
must have misread cppreference :)
 
user406009
@CatPlusPlus Don't you have to worry about alignment when you start doing hacks like that?
 
It'd be susceptible to ABI breaks.
 
The vectory initializes the values as T(). Value-initialization on built-in types means initializing them to zero.
 
7:39 PM
C++11 makes the constructor taking only the size_t explicit
that's what confused me
 
@Xeo answered your answer
 
@rubenvb It wasn't explicit before?
Are you sure?
You mean you could do vector<A> v; v = 5;?
 
6
Q: How can I initialize a std::vector with a size parameter and have each object constructed independently?

StackedCrookedI like creating vectors with a given size and value, for example like this: std::vector<std::string> names(10); However, this a few times this led to unexpected results. For example in the following code each UniqueNumber turns out to have the same value: #include <iostream> #incl...

^ This is a potential pitfall if you are dumb, like me.
 
Xeo
> explicit vector(size_type n, const T& value = T(), const Allocator& = Allocator());
 
@RMartinhoFernandes no
 
7:40 PM
 
Xeo
From C++03 standard
 
That's insane, specially given the fact that explicit ctors were already in the language.
@rubenvb Ah, I see. They split it.
 
well, there's a lot of messing around with the constructors
It confuzzled me
 
I wonder why.
 
Dammit, dammit, dammit. It's 21 and I haven't started learning yet.
 
Xeo
7:42 PM
@RMartinhoFernandes It would require a copy into every object for default construction
 
@rubenvb Its confabulation makes a lot of sensializable construits though.
 
Xeo
Which would need the object to be CopyConstructible
 
@CaptainGiraffe That was on the tip of my tongue.
 
@CatPlusPlus Still about nine years before that. Here, it's only just beginning of 2012
 
7:43 PM
Wait, where exactly did the OP state that he wanted the most excruciating way possible? :-P

Or was that implied somehow... lol
 
It's 21. What is? It's!
 
Xeo
@Mysticial It was implied by the code.
 
Here, we use 24 hour clocks.
 
Xeo
Noes, he removed the C++ tag. :(
 
@CatPlusPlus I actually thought that you meant that you're 21 and haven't started learning yet.
 
7:44 PM
I'm not 21.
 
Xeo
Well, I'm at my repcap anyways, so let's just nuke that answer
 
No, you're 20. I guess calculatedly.
 
@CatPlusPlus Like sane people.
 
My apologies. It was the Jon Skeet post. Of course. >>I'm remembering a very good post from SO on how to ask a good question. I want to reuse it for my uni classes. It's not the Jon Skeet page I'm looking for. Does anyone have a clue how to find that post?
 
7:45 PM
hai
 
Xeo
@RMartinhoFernandes I use a clock that fluctates between 12 to 24 hours for a day, depending on when I get to sleep and how long I do
 
@Xeo I figured as such. :)
 
what are we chatting about?
 
wakarimas
 
7:45 PM
lol
 
@Xeo his keyboard is going out, or he started facerolling for no apparent reason. Maybe the Vicodin kicked in?
 
@CaptainGiraffe Waka waka, lol :D
 
meh, I'm bored
 
Are we censoring stuff again?
 
censoring?
who does that? In this day and age?
 
Xeo
7:47 PM
Whatever, it's not tagged C++ anymore, so answer.nuke();
 
Sick people.
 
Only half the world.
 
@RMartinhoFernandes Yes, how come the "Kama sutra" is at #1 in practically every book list I have seen "rated by popularity" ?
 
@CatPlusPlus Again?
 
7:47 PM
*rainfuck?
 
@CaptainGiraffe Is that really the case?
 
well, hardcore porn is surely censored in here?
 
@TonyTheLion Why doesn't?
 
@CatPlusPlus Fuck under the rain?
 
or maybe not
 
7:48 PM
@CatPlusPlus Ah that.
 
@StackedCrooked Not sure what you are replying to ?
 
@EtiennedeMartel Programming language, silly.
 
Xeo
@CatPlusPlus Bra**fuck
 
@CatPlusPlus Huhuhu
 
@CaptainGiraffe The thing it points to.
 
7:48 PM
@CaptainGiraffe You can see by the highlighting when hovering over my message.
 
blushes
 
ohhh someone checked kama sutra ratings....
 
Now you're being awkward.
 
*goes and checks on amazon...
 
Yes on all three of my bookreaders "Kama sutra" has held the 1-3 spot.
 
7:49 PM
For science!
 
For science and empirical evidence!
 
Kama Sutra's number one rating goes to show the average couple has zero imagination.
 
@CaptainGiraffe The true addict has three bookreaders in order to get more Kama Sutra bandwidth
 
7:50 PM
probably true
a true addict doesn't buy a book, he just goes to pornhub or something of that nature
 
@sehe One is discarded, one is a reader the other is my phone, you PERVERT!
 
no need to shout
 
A true addict sells three bookreaders to buy drugs.
 
Xeo
@TonyTheLion ffs - for fucks sake!
 
I don't even have a reader, suta or karma
 
7:51 PM
@Xeo you knew it had to be done :P
 
I have lots of karma.
 
@CatPlusPlus I don't even have any kama.
 
I have lots of zen
 
Xeo
I have lots of Zeny. In Ragnarok Online.
 
That thing is still alive?
 
7:53 PM
what thing?
 
@CatPlusPlus Yeah, they added another plane of restart and grind again at 1/100 exp rate.
 
Ragnarok Online. Pay attention.
 
Policy-based class design has the advantage over the Strategy design pattern that the "choices" are evaluated at compile-time (and not needing a ptr indirection) leading to better performance. One potential drawback could be that a changing policy of a core class might trigger a complete rebuild of the codebase while a strategy pattern can be encapsulated in a single .cpp unit. Will the runtime performance advantage of the policy solution still hold when compiling with link-time optimization?
 
I played it for some time on a private server somewhere.
 
Novice->Theif->Assassin->(restart) Assassin Cross-> (restart) something else.
 
Xeo
7:54 PM
@Xaade Not restart -> continue as 3rd Class
 
@StackedCrooked LTO cannot remove runtime branching compiler wouldn't remove without LTO.
 
Yeah, you get bumped back down to lvl ? and have to level up again.
Earning exp slower than before.
 
@StackedCrooked Not anything about layering complexity?
 
Xeo
IIRC it doesn't set back your level
You continue from 99 till 150
 
@CaptainGiraffe What do you mean?
 
7:55 PM
Hmm.... I thought there was some class tranformation that mad you start over.
Maybe it's the 4th class?
rebirth or something else?
 
@CatPlusPlus I have trouble parsing that sentence..
 
@StackedCrooked It seem to me that many OO designs has the disatvantage of not properly isolationg layers, but rather regarding the whole as a monolithic unity.
 
@StackedCrooked I don't really know what you mean, TBH.
 
@CaptainGiraffe That's not true.
 
@StackedCrooked This is what I'm reading between the lines here
@StackedCrooked Policy and Strategy should in an ideal world be different design goals.
 
7:58 PM
@CatPlusPlus I'm basically wondering: (1) how big is the performance impact is of a non-inlined pointer indirection. (2) does inlining the pointer indirection affect the performance?
@CaptainGiraffe Policy is a compile-time variation of the strategy pattern. I think that strategy pattern is better suited when doing top-down design (starting from UML use-cases). And policies are used when doing a bottom-up design (starting from low-level elements like pointers, posix mutexes, etc...).
 
Well, it's non-zero.
It might or might not matter, which you can tell after, y'know, profiling.
 
user406009
Can't you sort of mix Policy and Strategy? If your "policy" template is something like std::function wouldn't you get the same idea?
 
There's also cache considerations.
 

« first day (444 days earlier)      last day (4487 days later) »