« first day (457 days earlier)      last day (4492 days later) » 

3:30 AM
Is 16 layers of 256-bit encryption and 12 passwords overdoing database protection a bit, or is that the kind of protection that is necessary to protect confidential databases these days?
AES encryption to be specific
I also use RSA to negotiate a secure connection
I'm using an IC80 Virtual Secure Filesystem to store the data.
Is that enough protection; or should I use more, or less?
Anyone here have cryptography experience?
 
3:46 AM
What do you mean by 16 layers? Encrypting the same data with 16 different keys, one after the other?
 
4:21 AM
@IDWMaster i think one layer of 1024 bit encryption would be superior to any number of layers of 256-bit encryption
 
user406009
Can you return move-only classes?
 
user406009
So return values act as if they automatically have a little std::move around them?
 
user406009
Then why does this fail to compile: ideone.com/TboTR ?
 
Mainstream algorithms with key sizes that large (almost?) exclusively use block ciphers with far lower key sizes and only use the extra key spaces for IV permutation
 
4:26 AM
@EthanSteinberg That only applies for objects local to the function.
 
If you are new here, please read the newbie hints. Thank you.
13
 
Possibly not for function arguments, or that could be a weakness of GCC 4.5.
 
If an attacker can break your crypto once, in a meaningful timeframe (i.e. while the person who the data applies to has any living heirs) he can break it 16 times in a similar timeframe.
To me, a secure database:
1. Restricts the services that use it to what they need
2. Separates authentication and authorisation services from the rest of the business logic
3. Encrypts session data in-transit
4. Encrypts the data store on-disk (both ends, if need be)
5. Encrypts user-specific data with user-specific keys
On top of this of course there should be application-level security, like not exposing database object IDs in public APIs, or allowing requests by ID to retrieve them; use session tables to create a map of authorised objects to temporary keys... etc.
 
4:45 AM
@EthanSteinberg it's a compiler error. report it. the code compiles fine with g++, and it also compiles fine with any complete type instead of void.
 
user406009
Well ideone is old gcc so that's fine, no need to report an error.
 
i compiled with g++ 4.6.1 and msvc 10.0
 
5:20 AM
where does the standard specify that an automatic variable in a return statement is a glvalue or xvalue expression?
 
It doesn't specify that outright. And there is no need for it, even.
 
no need?
 
Well yeah, if the name of the variable would be a glvalue outside of a return statement why would you need to special case return statements?
12.8 Copying and moving class objects [class.copy] paragraph 32 (n3290) is where it's specified how returning a local variable first attempts moving rather than copying.
Elision takes precedence to that though.
 
not very elegant
but then, better with a standard than no standard
:-)
 
Yeah, the "save for being a function parameter" thingy is highly misleading, too.
 
 
2 hours later…
7:08 AM
Hi @Alive_Peoples :)
 
7:44 AM
Hi
 
0
Q: Coded Smilies in SE Chat?

IntermediateHackerAlthough the audience in the chat rooms of SE sites are generally different from sites like , say, Facebook. You usually just don't chat about unrelated random stuff in SE chat rooms (with the possible exception of Lounge<C++>, that room is awesome!) but still I sometimes do feel the need o...

 
8:22 AM
The peoples in C# room really sucks at quick hint or help :\
 
lol, this toad is awesome:
 
not bad, 3936 posts over the weekend guys
 
We have a no-gif policy, you know.
 
+1
 
8:32 AM
damn. :(
 
@CatPlusPlus at least it's not that too annoying
 
Still. Preface link with [gif] and it won't be oneboxed.
 
But how do I use smilies? see this
 
I'd move it, but I think I can't access the bin.
 
Don't let the puppy know about your breach of contract.
 
8:35 AM
Also, graphical emoticons suck mightily.
 
@RMartinhoFernandes what :D
@IntermediateHacker I think you've seen all that here chat.meta.stackoverflow.com/transcript/message/821483#821483
 
@RMartinhoFernandes oh no. I forgot all about that. :(
 
@RMartinhoFernandes I wanna be a garbage man, too!
 
@IntermediateHacker: I think you can CW a question too (?) - saves you the negative rep on that meta-Q
 
@CatPlusPlus Request access to the bin. It saves on the number of links I need to click.
 
8:38 AM
@sehe I don't have enough rep. on meta to CW. And by the looks of it, I never may have. :(
 
@RMartinhoFernandes Done.
 
@IntermediateHacker hehe. too bad
 
Thanks.
@sehe Wasn't manual CWing removed at some point?
 
On questions, yes.
 
8:39 AM
@RMartinhoFernandes like a ninja (look, to the right is a white light grey ninja!)
 
@CatPlusPlus unsure, I hardly have a use for it.
@RMartinhoFernandes that sounds like it makes sense
 
lol, there are so many acronyms that people don't know about. i could just use some of them without getting flagged, and the other person not getting a clue what I'm talking about.
 
People don't know about them, because nobody actually uses them.
 
kma!!! bfd.
 
I can create acronyms out of thin air, too.
 
8:44 AM
GMEQ
 
there is a difference between acronyms and just retarded 'text speak'
 
imnsho acronyms are aah.
 
@CatPlusPlus what is air an acronym for?
 
Awesome Infrared.
 
8:45 AM
Jawesome.
 
lol.
@RMartinhoFernandes that's sounds like something from javax.
 
It's was one of the dumb jokes from The Oatmeal that Fred linked here yesterday.
0
Q: Multiple render systems

ZayatsSome time in the near future, I will begin developing a game engine. One feature that I want to include is having multiple render systems such as directx 9/10/11 and OpenGL. This way, a game using this engine will be able to support more players since if one render system doesn't work, it will re...

I hate these questions whose answer is "If you have to ask, you're not ready yet."
 
mawning
 
@CatPlusPlus I can't wait till we have something invented with 'thin awesome Infrared'
 
Have you ever seen thick IR?
 
8:49 AM
lol
 
Tin
good morning guys! one short question. given the copy-swap-idiom, i read that there are several ways to define the swap function, e.g. in some posts, people threat it as a friend void swap(foo&, foo&) or as a class member function void foo::swap(foo&). which of those 2 ways would you prefer and why?
 
Have you ever seen IR?!
 
Member function sucks.
 
I would go with friend void swap(foo&, foo&), at least you are passing both things you're swapping, makes easier reading
 
Tin
@CatPlusPlus, so you are for the friend version one, why does the member function sucks?
 
8:51 AM
I don't like friendship.
 
@RMartinhoFernandes you're a bot
 
Tin
@TonyTheLion, yes that's true, it's more clear what's going on
 
good, then the decision has been made :)
 
Tin
8:52 AM
@RMartinhoFernandes, so you would prefer the member function one, why? and second, why you don't like friendship?
@TonyTheLion, not yet, I would like to know why @RMartinhoFernandes didn't like the idea of friendship :-)
 
Really, just make it standalone. For ADL and stuffs. You can have a member function and call it from free one.
 
That's what I do.
 
@Tin cause he's a robot
 
In some cases where templates are involved you may need to resort to friends. IIRC.
 
@LucDanton I don't see why
 
8:57 AM
@thecoshman This is assuming you want to enable the non-member form swap(foo, bar);.
 
Tin
@LucDanton, do you have an example? actually my classes are templated and i even also have a polymorphic hierarchy of classes (meaning that the swap of the derived classes usually call the swap of their parents)
 
Enable swap(foo, bar); where foo and bar have type Foo<int> then.
Also, converting constructor. Yeah, that's important too. Possibly.
 
woah, I can't believe I actually posted a good, useful answer.
 
The rendering stuff? Don't use preprocessor for that, that's silly.
Abstracting via TUs is not so good either, if you want to switch between renderers at runtime.
Well, unless you want to build several executables. That's a solution, too, I guess.
 
9:21 AM
> Rarely, old functionality is actually abandoned, as e.g. has been done with the fixed function pipeline in DirectX 10. This is another reason why I'd suggest to rather use OpenGL - it's more backwards compatible and you can more easily support multiple versions.
WTF?
 
Yeah, I was considering commenting, but meh.
 
@RMartinhoFernandes ignorance is bliss
 
You know what's funny? That we have , and that it's alive.
 
@CatPlusPlus is in a tag for dos or you are running a dos machine?
 
9:23 AM
No, I just linked to the tag for kicks.
 
and wasn't that a hoot and a half :D
 
-1
Q: Assembler read file byte by byte

quba88How to read file byte by byte to the end of file, no matter how big is the file? In NASM

LOL
 
So apparently I managed to commit a file containing conflict markers on friday. I didn't realize cvs even allowed that
 
no point learning the basics when you can use the complex shit straight away
 
@jalf conflict markers?
 
9:26 AM
@jalf CVS?
@TonyTheLion Poor merge tools mark conflicts in files with those.
 
ah right
 
Tin
thanks guys for the feedback ;-)
 
@CatPlusPlus isn't it fairly normal for merge tools to show conflicts they can't auto resolve? or do you mean poor ones just leave in markers to show where the conflicst are and never resolve them?
 
Tin
now i'm redefining my swap functions as friends
 
@thecoshman Well, if you don't run some GUI merge tool, then you have to mark the file as conflicted and leave it with conflict places clearly marked.
 
9:30 AM
@CatPlusPlus another reason why people shouldn't just stick to CLI?
 
Tin
@LucDanton, could you pls tell me what does the acronym IIRC stands for, so as too google for it?
 
If I Recall Correctly.
 
testing mark down
===============
did it work?
 
¬_¬ no
# how about #
doing it this way?
ffs
 
Tin
9:31 AM
@CatPlusPlus, thanks, I thought it was a c++ idiom, or sth. like that :-) hehehe
 
@CatPlusPlus every VCS I know of inserts conflict markers. But the tools you use for resolving conflicts remove them again
and of course, doesnt' display them during conflict resolution
but they're there if you open the file in a dumb editor
and I thought CVS would reject a commit containing them
 
>! now you just to click it didn't you
 
I don't think Mercurial does.
 
@Tin There's a GotW on the topic of member vs non-member. That's where I got my information.
 
Well, okay, poor merge tools leave them.
 
9:33 AM
@CatPlusPlus yeah, we're using CVS at work.... For now
 
¬_¬ ok... so what markdown does chat actually support?
 
Markdown doesn't work in multi-line messages. Read the hints.
@jalf Well, CVS fails at everything. Doesn't it have "conflicted" state for files?
 
@CatPlusPlus or for much of mark down
 
AFAIR Mercurial creates two new files for merges and then runs three-way merge tool.
 
Is there any sound reason why chat doesn't support the full range of markdown?
 
@CatPlusPlus probably not, but I think (thought) it scanned the file looking for conflict markers
 
@CatPlusPlus ¬_¬ I hate mark down
 
@CatPlusPlus afaik, bzr and git does both. Creates copies of the files (named something like foo.LOCAL and foo.REMOTE, and inserts markers into the original file foo
I'd assume hg to do the same. Why don't you check? ;)
but yeah, a sane system developed in this millenium wouldn't force you to ever look at the conflict markers
 
Nope, no markers.
 
yay :D I can do science me!
 
9:41 AM
 
@TonyTheLion the only thing it is missing is actually being a doubly-linked-list
 
hahah
 
I wonder if the Buddhists are right... perhaps life's last node's next is life's first node
 
perhaps
 
@TonyTheLion ...and it sucks?
 
9:46 AM
yes, esp when one's body always hurts, like mine :(
 
Heap corruption.
 
I have to maintain code that has this private static final String ARROW_SYMBOL = " -->";
why :'(
 
Could be worse. private static final int ZERO = 0; and so on...
 
wouldn't be surprised to find that
lets say you are looping through all lines in a file. Would you rather say if(not comment){do stuff} or if(comment){end this iteration} do stuff
 
9:54 AM
@RMartinhoFernandes private static final int ZERO = 1;
 
@thecoshman depends on the do stuff bit, but often, I'd prefer the latter
 
@jalf me too... guess what this code isn't
 
Less nesting the better.
 
:)
 
oh god! nextLine is actually the line currently being read! :(
 
9:55 AM
lol
 
Why!? What sort of sick twisted fool would do this!
strange... it's reading in a key value pairs, storing them in a map... but also storing the key's in a vector... redundancy much?
I'm sure I will find some vomit inducing reason behind it sooner or later
 
I think someone was trying to "smart"
@CatPlusPlus tell that to a bird :P
 
@TonyTheLion I am sure all the birds think that nesting is great, then they try it. Sure it's fun at first, but then they realise, the other birds where right, nesting sucks all the fun out of life
 
lol
I don't usually nest, but when I do....
I wanna go live there
 
perhaps I am mistaken, but can you not normally get all the values from a map? is there really need to store a copy of the keys in a vector so that you can loop through said vector getting the values from the map?
 
10:06 AM
Maybe it needs two kinds of lookup? By index, and by key?
 
@thecoshman you can just do value = map[key];
 
AFAIK all look up's in the map are via key, or iteration through all keys
@TonyTheLion don't forget I am stuck with Java, but I am sure you can do similar
 
@thecoshman ohhh, for some reason I had this suspicion, but wasn't sure... and since this is the C++ room, I assumed C++ anyways
 
@TonyTheLion is that 12 atom per bit hard drive? where you need to keep it super chilled
@TonyTheLion yeah I know :P
 
@thecoshman yes, I'm guessing. HDD's nowadays need a few billion atoms still per byte. SO this is kinda crazy
 
10:09 AM
oh come on ¬_¬ final Class clazz
 
@thecoshman end of the school year? :P
 
@TonyTheLion they obviously need to tone it back a bit. a few more atoms such that they can have it at sensible temperatures
 
@thecoshman I guess.... but it's still impressive...
 
@TonyTheLion In java you can make an instance of a class if you have the name of the class as a string... it seems
 
WTF???
 
10:11 AM
@TonyTheLion oh year, I think I saw some where that it equates to 100TB in the space of a normal 3.5" HDD
 
@thecoshman reflection???
 
@TonyTheLion /r/wtf you mean :D
@TonyTheLion if that's what you call it :S
 
@thecoshman r/funny :P
 
this code is loading in class names from a file and making instances of those classes
@TonyTheLion I think I saw this in /r/wtf this morning... dam reposts
 
10:13 AM
@thecoshman Poor man's dependency injection, perhaps.
 
so you're a reddit addict too?
 
@TonyTheLion :( yes
@LucDanton ¬_¬ it's not fun one bit
 
It's been my understanding that I wouldn't find 'fully-fledged' dependency injection very fun either. If that helps.
 
oh, dependency injection... I remember that from my .NET days
I was into patterns back then
 
@TonyTheLion oh but DI has seen the real hype long after the patterns bubble :) In all likelihood you have seen nothing yet (Unity, StructureMap, AutoFac, ... I'm only naming the ones I see (have been) used at my current workplace
 
Tin
10:18 AM
@LucDanton, thanks for the GotW link
 
There are a legion of them
 
to be fair, this 'department' of code is self depending... it has a a project that is built and run at compile time that generates some text files that the main code depends on
 
Tin
@TonyTheLion, where's that place on the picture?
it's an amazing place!
 
@Tin Oregon USA
 
It really seems people believe it is today's silver bullet. I've yet to find a real case where I needed it (I can see the convenience, but I also see the cost of carrying a framework on my back just to get the convenience)
 
10:19 AM
@thecoshman Hardcode the softcode, so that you get the benefits of both hardcode and softcode without any of the penalties!!! Unless it's the other way around!!!!
 
@thecoshman Inversion of control in a 'self depending' module. That sounds positively schizofrenic
 
My attempt at recreating the original thought behind what you're describing.
 
to top it of, this code that is run at compile time, has hardcoded values that are put into the text file
 
AutoFac seems to succeed at being rather lightweight, though
 
@LucDanton no I think you got it
If I told you what I was working on, you might not be able to relax. Knowing what I know makes me amazed that our society is able to use modern technology
huh... that made it sound more epic then it really is...
 
10:26 AM
@thecoshman eh, there's nothing unique about it. Most of the software that we rely on really really stinks
 
@thecoshman that's ok, we're used to taking what you say with some helpings of salt. It helps that we have a warm winter, I don't need it for defrosting :)
 
@jalf stink is an understatement
@sehe Are you a native English speaker?
Finally brought in a mug for my self at work... SO MUCH MORE COFFEE!!!
 
grrr I don't like bugs that I cannot find
 
@thecoshman still not. Why?
@TonyTheLion I like bugs that noone can find
 
huh, yes well, my bug is visible during run time, but I cannot determine where it originates from
well, it comes from a change I made in the code, question is "What change?", without source control, hard to remember... damnit
 
10:32 AM
From the program!
SOPA 'shelved' until consensus is found http://j.mp/A6UJOC
 
@sehe It just that a few things you say seem (to me) rather abrupt, I assume you don't intend them to sound so
 
So, is the blackout still on?
 
@thecoshman Do tell :) I'd like to know what my engrish actually sounds like to you
 
@RMartinhoFernandes yes! there is still a chance the wrong consensus could be found
@sehe this is a typical example. At face value is just a funny remark, but just feels like you could be meaning something more vindictive.
Like I said, I assume it is because you are not a native English speaker. Probably doesn't help that I am a sport retarded when it comes to engrish
 
@RMartinhoFernandes well, that's one small step...
 
10:38 AM
Aw. It's not intended too harsh. I'm sort of trying too match your obvious levels of humorous intent.
I think it is fair to say "you talk a lot" (as do I, but not as often :))
 
GoingNative 2012 with Stroustrup, Boehm, Lavavej and Alexandrescu. I'm gonna cream my pants!
 
@thecoshman In particular, I assumed this didn't mean you are working on software for a nuclear facility
 
@sehe I didn't think so :D sadly, it is hard to type sarcasm
@sehe oh god, if this software was for such a place, I would be living my final few days of my life!
I'm working on mobile network operators management code. some how, despite this code, network operators manage to keep the phone working
 
@FredOverflow > In this presentation, I'll explore how some of the C++11 Standard Library's magic works, including how the Standardization Committee fixed pair's constructors (I bet you think that pair is the simplest type in the world - ha! wrong!) and how I saved a million zillion bytes of memory across all the programs using VC10+'s make_shared<T>().
 
@sehe directed quotes don't work :(
 
10:42 AM
@FredOverflow markdown don't work :( FTFY
 
@thecoshman I meant the message with the "In this presentation..." quote :)
> Oh, and I will also reveal a secret that has never been announced before.
 
Let me guess. The pair constructor (because they require exponential constructors just like tuple constructors, which MSVC obviously has many problems supporting because lack of variadics and template limits in general)
 
Christmas coming early this year? :)
 
I wish I could go to that conference
just a bit far to fly to Redmond WA just for 3 days...
 
And 'I saved a million zillion bytes of memory across all the programs using VC10+'s make_shared<T>()' means that they (finally) optimized std::vector/std::queue class layouts to be about 8 bytes smaller per instance... I think I knew those.
> Oh, and I will also reveal a secret that has never been announced before.
 
10:44 AM
@TonyTheLion holiday?
 
That would be, MSVC will one day implement C++11? That would be awesome news
 
@sehe such as "my team has no fucking clue what it's doing, or why, or where we're trying to go"?
 
1 min ago, by FredOverflow
> Oh, and I will also reveal a secret that has never been announced before.
 
@thecoshman yea, well, then I'd need to make it a bit longer...
 
¬_¬ do we really need functions to wrap a single line of code?
 
10:47 AM
@thecoshman have you ever tried wrapping lines of text? See knuth and typography. Now, try wrapping code without parsing the syntax. That is non-trivial
 
Xeo
> static if
Wait a second
 
@Xeo Sounds like D to me
 
Xeo
Yeah, but they only mention C++ all over
 
oh, this is even better! A function that provides a trace output and then just returns true!
 
Xeo
10:48 AM
Ah, but it's Andrei's talk
 
@sehe see this
private boolean checkNotificationStatus(final ManagedObject managedObj) }
     return managedObj.getRoot().getNotificationStatus();
}
 
Alexandrescu cannot not mention static if in his talks, it's simply too awesome.
 
Xeo
Heh
Yeah
 
what's static if ?
 
wrapping. Depends on what it does. Encpapsulation, self-documenting, testability etc.
 
10:48 AM
Yeah, C++ should have it.
 
@thecoshman Looks like Java. Why is the parameter final?
 
Xeo
Would safe the hassle of those darned partial specializations with code duplication
 
@TonyTheLion std::enable_if on steroids
 
@TonyTheLion Neater SFINAE.
 
@TonyTheLion Its like preprocessor #if/#else/#endif but without preprocessing
 
Xeo
10:49 AM
@TonyTheLion A mixture of preprocessor and TMP
 
ah I see
interesting
 
@FredOverflow fuck knows. Java people seem to love shitting final all over the place
 
@Xeo Yeah that's more accurate than my blurb
 
void foo(T)(T x) if T is numeric    // not sure about the syntax
 
@thecoshman Don't you love shitting 'const' all over the place. It is the same
 
Xeo
10:50 AM
@FredOverflow Well, I think it's more useful inside classes
 
@sehe no it is not
 
@Xeo It's useful everywhere!
 
they are similar, but not the same
 
Xeo
True
 
@thecoshman The same phenomenon. I'm not comparing const to final
 
10:50 AM
You can static if part of a function's code if you want.
Anything goes.
 
Xeo
@RMartinhoFernandes You can emulate that in C++11 :/
 
@thecoshman It is the phenonemon that language bring specific (idiomatic) habits
 
@Xeo Lots of work!
 
@sehe ah, true. except, with const, you can stop being from mutating the object you pass into a function (with in reason)
 
Xeo
@RMartinhoFernandes Well, a macro and a lambda IIRC
@Johannes played around with it once
 
10:51 AM
@Xeo What's the macro for?
You can't use, say, type traits on macros.
 
Xeo
@RMartinhoFernandes #define static_if(X) ...
 
Xeo
@RMartinhoFernandes Ask @Johannes, maybe he still got the ideone link
 
template <typename T>
void f(T t) {
    t.frazzle();
    static if(is_quxable<T>::value) {
        t.qux();
    } else {
        t.frob();
    }
    t.wizzle();
}
Try macroing your way out of that.
 
I might be the new robot. He said it here:
Jun 4 '11 at 22:05, by Johannes Schaub - litb
with lambdas+GCC, static_if can be emulated very nicely
 
Xeo
10:55 AM
@sehe Oooh, nice!
But yeah, the macro was just to "make it look nicer"
 
Lacks return abilities :P
Also, not compilable if the type doesn't have the foo function.
 
@RMartinhoFernandes lacks goto abilities too <ducks/>
 
Xeo
@RMartinhoFernandes Huh?
As you can see, it compiles just fine
With an integer
 
@RMartinhoFernandes I don't think that is right. Perhaps on MSVC but it does it parsing template definitions wrong
 
Oh, how come?
Is that some GCC trick/bug?
It should not compile.
 
10:58 AM
it might be a spot late to decide this, but my new years resolution is going to be to try to get as much ascii art into the code as possible. table flip all the comments!
 
Xeo
@sehe Actually, if it doesn't compile on MSVC but on GCC, then something is wrong, as MSVC is more lenient than GCC
 
No, templates aren't fully interpreted by a conforming compiler unless they are being instantiated.MSVC is wellknown to be aulty in that area
 
@sehe But the lambda is not a template.
The lambda is not well-formed.
 
@Xeo It is more lenient in that it doesn't require typename/template qualification as much. But it doesn't require it because it it interprets the template prematurely
This will break use-cases like this, which are perfectly ok by the standard
 
Xeo
@sehe No, it interprets it at the last possible moment
 

« first day (457 days earlier)      last day (4492 days later) »