« first day (3511 days earlier)      last day (1428 days later) » 

6:21 AM
Also when you put everything in the same file, it helps the inliner resulting in faster code :-)
 
 
2 hours later…
nwp
8:09 AM
Why is "Password too long" a thing? 33 characters, come on! And it's Microsoft, not some garbage site that doesn't know better ... oh.
 
I really don't get it either, they should all just add a warning like "security doesn't increase beyond 33 characters", no idea why they set max length so low.
I've commonly seen stupid stuff like maximum 16 characters? like what?
 
Beats minimum length 16 characters long. Once I typed in a password 9 characters long and was told that it's too short.
 
nwp
That makes more sense though.
 
If so many people want to be unique, why not making names 1000 characters long.
This way, at least their names have a chance to be unique.
 
nwp
Because that is just one property of many you want for a name and making the name longer is contrary to the other goals.
 
8:24 AM
That answers your own question on why passwords should not be so long.
 
nwp
It doesn't. Names need to be readable. Passwords don't. Passwords do not have the same requirements as names.
 
1) Password does not have to be unique 2) there is no evidence how 33 characters password is significant harder to hack than, say 13 characters long password 3) Passwords need to be remembered, so the shorter the better in that regard.
Longer name is still readable.
 
nwp
1) They really really should be. If people have the same passwords that suggests they are guessable. 2) Of course there is. Every character you add multiplies some factor to the difficulty, so longer passwords are inherently safer than short ones. At some point it doesn't make a difference, 1 billion years or 100 billion year, but looking at such short passwords when you have requirements like 1 capital letter 1 not capital letter 1 number 1 special character it starts becoming unsafe.
3) Passwords should not be remembered. Passwords should be filled out by tools protected by a master password.
 
8:49 AM
@nwp Crack it once, crack 'em all. Very wise.
 
user7659542
Do you think it is possible to view the history of a word document using its metadata or smth alike?
 
nwp
It is indeed. Humans just can't remember multiple safe passwords. Having one safe passwords and random ones for different sites is much better than reusing the same insecure passwords everywhere.
 
user7659542
I received a word file containing a job description via email. But they removed the line containing the salary range. Do you think there is some metadata or smth like that which still contains that info?
 
@traducerad unzip it and take a look
 
user7659542
unzip?
 
user7659542
8:52 AM
It is a docx file
 
nwp
Look at it with a hex editor, maybe after unzipping. There were stories of Word saving undo data and people getting in trouble for leaking what they thought were censored versions.
@traducerad I'm pretty sure the x stands for compressed.
 
docx files are most of the time just zips with xml files
 
user7659542
interesting, didn t know that
 
user7659542
nothing at first sight
 
user7659542
hmm
 
9:15 AM
Hi all,
I'm wondering something about the difference between move constructor and copy constructor when the corresponding class contains C-style array of, let's say, char (or any built-in type). Does the move constructor perform the same operation as the copy constructor, ie. copying every elements of the array?
 
if you have a C-style aray as a data member then both the copy and move custructor would be disabled right?
 
Disabled, no. I'll keep the default ones. I just want to know if there could be any performance increase by using the move constructor in that case.
 
@PeterT I understand where you’re coming from but funnily enough that is not the case
@PeterT bask
@Pierre morally speaking, yes
 
@LucDanton Morally speaking? What should I understand? :)
Do you mean it doesn't change anything in that specific case (a class with just an array of a built-in type) but it could improve performance depending on the other members of that class and, as a good habit, it is always better to perform move operations when possible?
 
9:39 AM
@Pierre You have the right idea, even though if you get into the very, very gory details it’s a bit more specific like that. For instance, sometimes move construction is performed without using a move constructor. Luckily it’s not worth worrying about that.
 
@LucDanton Can you give me an example of move construction without move constructor (or move assignment operator)? Just as a curiosity.
 
9:55 AM
(it is different for older C++ versions, e.g. here’s Clang in C++14 mode)
 
 
1 hour later…
11:03 AM
@LucDanton I'm not sure to get it. In your example, cant_make_without_move can't compile because the copy constructor is implicitly disabled. It doesn't mean move construction is performed without move constructor, right?
 
@Pierre no_move_allowed is here to demonstrate that the move constructor of move_only did in fact have a meaning to the program
 
11:37 AM
@LucDanton You said "sometimes move construction is performed without using a move constructor". Here, move_only is construct using the move_constructor, right?
 
@Pierre if that were the case, wouldn’t you expect output on stdout?
 
Like RVO?
 
@LucDanton In your Clang version, there is an output in stdout.
 
@Pierre that example is not so much about the choice of compiler, but the choice of language
i.e. the example I picked only holds for C++17 and later
 
@LucDanton Okay, it makes sense now. So why, since C++17, the move constructor is not used anymore?
 
11:46 AM
all the moves are redundant & all that truly matters is constructing the mo variable in main
i.e. the program is morally (and effectively) the same as having move_only mo { 0, 1 }; inside main
it’s caring for the big picture without getting bogged down in pointless minutia :)
 
@LucDanton Okay, so it is due to mandatory elision introduced since C++17, right?
 
@Pierre yes
 
@LucDanton Well, thanks for this example. It's really interesting.
 
 
3 hours later…
2:50 PM
For some reason, coding in C has me anxious about every byte used in a program I've coded
 
 
3 hours later…
5:36 PM
I have never had a reason to use iterators...
 
You never had a reason to iterate?
 
@Lapys a begin and end pointer can be used as iterators, are you telling me you never had a begin and end pointer?
even a pointer and a null pointer can be used as iterators if you have null-pointer terminated list
 
 
2 hours later…
7:11 PM
I meant std:: iterator. I've always just used for or while loops
That moment when you find a bug that's been causing errors since 3 days ago...
 
I don't think I've use std::iterator ever either, it's not a very common thing to use honestly
the various STL container iterators don't inherit from std::iterator in the implementations I've seen
 
std::iterator is dead anyway (deprecated in C++17)
 
 
2 hours later…
9:30 PM
So, I can't find a static analysis tool that detects this kind of issue: std::function<void(struct&)> by_reference_function = [](struct by_value){};. Somehow seems like something that should be lit up. Maybe because things like std::async make copies?
 
 
9:48 PM
Lol
 
@nwp You have a point, especially when some of those websites store passwords in plain text. Unless you are sure a website does not store your password in plain text, it's safer to sign in using third party authentication when available rather than giving them your password.
 
10:35 PM
@nwp And to be really cool, use SSH keys stored in a TPM. michael.stapelberg.ch/posts/2014-02-19-ssh-keys-in-your-tpm
@MyWrathAcademia ...and worse, given how most people use passwords, a compromise on one site still destroys their security on most other sites that are competent.
 

« first day (3511 days earlier)      last day (1428 days later) »