« first day (453 days earlier)      last day (4720 days later) » 

00:00
wait, that's probably going to be too long
@DeadMG That didn't come through. Too long?
yes
Limit is 99 chars
but your current site version doesn't allow for shared secret insertion
@KerrekSB <textarea> tag.
00:00
I'm like Twitter, only more hardcore.
@DeadMG No. I think that was semiintentional to have it read-only. Meh, I don't remember.
ok, let me try
2637165172973644135789796208020762237534601936941939693819617954796055629845314542332943487803354915085272382658521706893645832686594008844811654842896039795830643119109637784728565386637258693023940916827798879924336232413837784129305149201
@KerrekSB <textarea> is a tag that can contain default text, like this.
<textarea name="input">The user can edit this.</textarea>
2686418115095957326843599987980828056285770466703842293206394670715486869600684775391048935612744249243983566179302102731129384012116158271965011717312814142140926297820269403358369861381517391604159665448695184589421080036504354061421861175
@Maxpm Now I feel very lazy
I think the revamped UI actually has large enough fields.
I like the new UI.
Yay, that means I can continue with my snarky remarks about the fields being too small.
00:06
3103779877129618242402966940729129102104240351986966882736684977157545789286937884025082580089755530771229824299767642432065319041332889193380067997497338378314894997929362620525312480815846843561271323082326794252989340905858758562663570803
I thought it was a little confusing that you still have to click done after random, though.
@KerrekSB I like how your method of transmitting messages is through a public chat room.
@Maxpm it should start with a random value.
A random number could also be placed outside an input field for the user to copy.
@MooingDuck By now the whole security is a sham. After so many messages, I'm sure this could be cryptanalyzed in no time.
"Enter a number. (If you can't think of one, this one has been randomly generated: 31415926535...)"
00:09
@KerrekSB only if you keep using the same numbers/keys isn't it? Isn't it the point that they can be transmitted publicly?
I need help in the comments.
-2
Q: Function objects in C++, possible styles?

user1131997We know, that we can overload operator() to use functional style in C++ , let's look: (PS: are there any other styles to use functional stuff in C++ with other ways, which aren't in the code? please give me your pieces of advice). #include <iostream> using namespace std; struct A { priva...

@MooingDuck Ultimately, the only "key" is the shared secret
@KerrekSB the rest has to be private? I thought that... huh.
But since my Super Clever Line Code is so combinatorially awesome, a baby should be able to crack this once more than a handful of messages have gone through
@MooingDuck Well, both parties have a personal secret that nobody else knows.
From that, both parties generate a public token which they exchange publicly.
Combining the other's public token with the own personal secret yields a shared secret that only the two partners know, but nobody else.
The personal secret is the random number.
@KerrekSB k.
00:13
If you make it too small, it's easily brute-forced, which is why we have the RNG
@LucDanton Hi - thanks for the heads up!
@TonyTheLion That's left after projection!
@LucDanton This sort of static iteration over packs is really cumbersome. There should be a library for that sort of thing.
00:15
@CatPlusPlus lol
Especially all your self-indexing stuff...
Like, get_elements<std::tuple<A,B,C,D,E>, 1,3,5>::type should be tuple<A,C,E> etc.
@RMartinhoFernandes Bastard, you brute forced me!
That number was randomly chosen!
@MooingDuck Hey, actually the page is pretty self-explanatory... why did I just repeat all this here? :-S
By a fair dice roll?
@CatPlusPlus I like my dice a bit bigger than usual, so they have nine sides.
@KerrekSB because I thought this was a zero-knowledge implementation, which contradicted your claim that it could be decrypted here
@Maxpm For the record, I ended up repeating the assertions in the method, in case the object's internal state somehow changed between its construction and the method call.
00:19
Non-six-side dices are not unheard of.
@MooingDuck It can be broken solely based on the weak line cipher
Why is @Maxpm talking to himself?
What did I miss?
@CatPlusPlus I'm trying to figure out how he did that
@CatPlusPlus He's been going through a design trilemma all evening
@MooingDuck does this work? Apperently not. His was a reply
00:20
By using message ID?
@CatPlusPlus Like this?
@CatPlusPlus In case someone curious finds the conversation later.
oh right, message ID. not user. I'm slow.
@CatPlusPlus But dice with an odd number of sides are really uncommon.
@CatPlusPlus not that I have... any idea... how to do that
I've seen asymmetrical dices.
00:21
@MooingDuck One has to beware of zero-knowledge cryptography where the designer had zero knowledge of cryptography.
@KerrekSB true true. Or limits in UI design
@MooingDuck Go to the permalink of your message. The ID is included in the URL.
@RMartinhoFernandes You can simulate one: Take a die with even sides and pool powers of two.
00:21
@RMartinhoFernandes sweet. I need me one of them
@MooingDuck You type :messageid.
@RMartinhoFernandes How very esoteric
@Maxpm Plus, the ping sound almost tricks me into thinking people want to talk to me. Almost.
@MooingDuck Shush. Stop repeating RMF's propaganda.
It's like how I set my alarm clock a few minutes ahead, so I rush to get up in the morning.
00:22
The original design was perfectly functional, until he up and badmouthed it all over the 'net...
Theoretically, at least.
Hello everyone :)
Can someone help me on that ? (OpenCV problem)
http://stackoverflow.com/questions/8828064/unhandled-exception-after-reading-histogram-craeted-with-calchist
@Maxpm Ping sound?
00:23
@KerrekSB Hey, I was one of the original beta-testers. I assumed that task involved badmouthing.
I never used sounds!
@RMartinhoFernandes You were supposed to test the maths and laud my chic input box placement and gratuitous exposition of internal details.
Is that a word?
Opera says: "Enable sound in website: no tick".
@CatPlusPlus Which one - "and"?
00:25
Good option.
Yes, "and", because it's such an exotic word.
How do I make it make sound?
@KerrekSB So, no plinks for you?
You have to hit it really hard.
Nope - I hit "visible room"
00:26
Do you have Flash?
@CatPlusPlus Oh, I fixed it.
@CatPlusPlus Of course not
Oh, I thought this was some HTML 6 <audio> magic
HTML5.
And no.
@KerrekSB We are on HTML 7 now please keep up.
It's Flash. And the other day it managed to crash on me. A simple plinker.
@CaptainGiraffe I lost track. I think Firefox is already on 9
@RMartinhoFernandes Opera crashes enough as it is, I don't need Flash to help with that.
00:28
@KerrekSB That would be 11, FF 9 is already in my backups
Would it make sense to have a move/input iterator?
@KerrekSB Flash runs under isolation, so it's not troublesome.
@MooingDuck move or input?
Xeo
Xeo
Hm
Question
@RMartinhoFernandes Ha. Ha. Ha. U must be kidding?
00:28
@KerrekSB an input iterator that returns && of its objects so they are moved from somewhere into your new container
Xeo
Xeo
shouldn't std::cout << other_ostream.rdbuf(); output anything in the other_ostream's buffer?
I mean, maybe it runs in isolation, but that doesn't mean it can't store all my behaviour and consume all my CPU
@MooingDuck §24.5.3?
@MooingDuck Like std::make_move_iterator?
@KerrekSB perfect. I figured if it made sense it existed. Good to know.
00:29
Anyone good in OpenCv ?
Xeo
Xeo
@MooingDuck That's a pretty generous assumption. After all, where are my polymorphic lambdas?
@KerrekSB But when it crashes (way too often, and I only run this plinker and some YouTube with it) it doesn't bring the browser down.
@MooingDuck That's a sensible attitude. Usually it goes like, "if it makes sense, 1) it's in std, 2) it's in Boost, 3) RMF knows where to find it, 4) Luc Danton solves it at compile time."
2
00:31
@Xeo make_move_iterator is trivially makeable though. The question was does it make sense. (Most of my ideas don't after a while)
@RMartinhoFernandes OK, that might be true... but no way does that crappy piece of code run unless absolutely necessary
@Xeo Did we ever agree that those made sense?
KerrekSB: but no way does that crappy piece of code run unless absolutely necessary
@KerrekSB Of course they make sense.
Isn't this true of any code?
@CaptainGiraffe But of Flash moreso than anything else.
00:32
Compare with GCC.
I cannot begin to remember the number of occasions where it caused pure fury on my part.
The fact that it breaks the interface is the worst thing
Xeo
Xeo
Great my stream question is being ignored. :(
I like to Ctrl-W out of unwanted tabs at a scary frequency
It's also a crappy piece of code, but one doesn't avoid running GCC as much as one avoids Flash.
but come a flash object, and the keyboard breaks
00:33
@KerrekSB Beta blockers are commonly available from your physician
@RMartinhoFernandes I'd prefer compiling a Boost-Qi application over watching a Youtube clip in Flash. Both take the same time, too.
Xeo
Xeo
@KerrekSB It's especially annoying when opening a pdf in a new tab and wanting to scroll in the current... it just won't work until you tab in and out of the pdf tab...
@CaptainGiraffe What do they do? Are they like Ad blockers?
@Xeo What's the relationship between PDFs and Flash?
Xeo
Xeo
00:34
5 mins ago, by Xeo
shouldn't std::cout << other_ostream.rdbuf(); output anything in the other_ostream's buffer?
@Xeo Ohh, PDF-viewing inside the browser is a whole new level of d'oh.
@RMartinhoFernandes They both suck.
Xeo
Xeo
@RMartinhoFernandes Adobe Reader, IIRC
Wait for the day that we'll have Flash inside PDF
Oh, right. Sometimes I forget people actually use Adobe Reader.
00:35
What's Adobe?
@RMartinhoFernandes What do you prefer?
On Linux I use Okular.
@KerrekSB Even better, they work for you only en.wikipedia.org/wiki/Beta_blockers
Xeo
Xeo
@KerrekSB No PDFs, obviously. :P
@KerrekSB Me too. On Windows I use SumatraPDF.
@CaptainGiraffe You mean they're like Opera for my brain?
Like, I can disable sounds on a person-by-person basis? That'd be grandiose.
00:36
Exactly, you can even sing opera while doing this.
@KerrekSB No. Plink.
And I could "empty cache" and "clear history" when going to bed.
Thats the idea
Forget about everyone you talked to that day...
@Xeo PDFs are cool. I like good typography, and consequently Xelatex.
Xeo
Xeo
Okay, since nobody reacts to my stream question I take it's to difficult for you. :|
00:37
Almost like heavy drinking and lsd without anything spent
@Xeo bump,
Xeo
Xeo
@CaptainGiraffe Again?!
@Xeo Striking at our egos so we provide an answer?
Xeo
Xeo
8 mins ago, by Xeo
shouldn't std::cout << other_ostream.rdbuf(); output anything in the other_ostream's buffer?
@RMartinhoFernandes Yes
@Xeo Post it. I'm scared of rdbuffers
@RMartinhoFernandes Is it any good? I think I have an old version somewhere, but I remember you can't select text in it
What does rdbuf() return?
00:38
@CaptainGiraffe With hangover or without?
Xeo
Xeo
@CaptainGiraffe The stream's buffer
@CaptainGiraffe One of the more complicated innards of the iostreams zoo...
Assumptions are running wild here
@KerrekSB Oh, that's very, very old.
@Xeo Those have iterators, too, right? I never get this right
00:39
Like two-years ago old or more.
Xeo
Xeo
@KerrekSB Yeah
Hm. OK. Link?
Ah, I remember, someone wanted to read a file into a string.
Apparently you can do that with the rdbuf-iterators of the ifstream
But it's about three times slower than stdio
@Xeo What should be in the stream?
Today I learned that to make a conflict as resolved in git, you use "git add". Also, I managed to get a conflict in a one person project.
@Xeo: I would think it should work like that
00:40
@RMartinhoFernandes lol, Thats the MineCraft notch?
Xeo
Xeo
@CaptainGiraffe ideone.com/erohQ
Xeo
Xeo
Huh?
@Xeo looks very suspicious.
00:42
The SO ranks confuse me. A while ago I was the week's #15 and counted among the top 0.01%. Today I'm #11 and only in the top 0.04%. How is that? Does SO ever lose members?
@CaptainGiraffe Hand me the beta blockers...
@KerrekSB I think the leagues only consider users that gained at least 200 rep.
@KerrekSB under the counter
@CaptainGiraffe Counter?
@RMartinhoFernandes Oh, within the week you mean?
Xeo
Xeo
Well, stupid me.
@KerrekSB kerrek pays, with a gentlemans handshake
00:44
@KerrekSB Yeah, something like that.
Buy SO can lose members through bans and people "retiring".
Xeo
Xeo
Seems an ostream buffer can't be fed to another ostream
So "total users: 944,543" really means all registered users, ever, right?
Xeo
Xeo
Using std::stringstream instead works... >_>
Makes sense, if you think about it.
944,543 seems low for all ever registred.
@CaptainGiraffe Don't forget the many unregistered users.
00:46
@KerrekSB for sure, keep in mind this site is quite visited
not reddit but close for coders
@CaptainGiraffe What who? Are you soliciting a sex change?
Release the pheromones!
@KerrekSB Not yet, but who knows what might come
@CaptainGiraffe Or are you saying the top ranks are reserved for ... the daughter's wedding, if you get my drift
Now you mention it, it is uncanny how Mr Skeet gets such consistent rankings while talking exclusively about C#.
is the most popular tag.
00:49
Did I in any way solicit gifts ? I was totally unaware, and I'd appreciate if you'd point out my faux pas
But he also answers Java questions occasionally (after all, that's what he works with).
is it possible to find most favorited questions? Or just votes?
@RMartinhoFernandes Who me?
3
Q: Can I alias variables without incurring the storage cost of a reference?

SamaursaIf I have the following code: struct someStruct { int x; int y; } class someClass { public: someStruct m_member; alias m_x = m_member.x; // I am aware alias is not a keyword and even if it was, I cannot assign it a value like this alias m_y = m_member.y; // I am awa...

This is curious. I wonder if in C++11 you can get away with no cost.
Thanks to inline initialization.
@KerrekSB scheme rules for teaching
00:51
@CaptainGiraffe ??? Scheme?
@KerrekSB yes, the stack is obvoius, along with
most other optimising stuffs
@CaptainGiraffe Hm, but this is really about a practical C++ matter...
@KerrekSB Yes, a reference should be zero cost. QED =)
The question is whether the compiler can change the size of a class depending on the class's constructor implementations.
E.g. if you know that a reference always has a constexpr initializer, you don't need the reference at all
@CaptainGiraffe Well, not if it's dynamically determined
@KerrekSB Of course it can. As-if.
00:56
@RMartinhoFernandes Seconded
@CaptainGiraffe Can inline initializers be overridden by constructors?
@KerrekSB in what way?
Foo { int a = 4; Foo() : a(3) { } };
struct foo { foo() : x(17) {} int x = 42; }; std::cout << foo().x; // prints 17
00:59
So... then the only way the compiler could omit members is if the class had no out-of-line constructor bodies, right?
Proper goods,
@KerrekSB Or if it was smart enough to see through that.
@KerrekSB Why would the compiler omit members?
@CaptainGiraffe Like in the posted question
(I have an urge to play the Terminator soundtrack while writing some destructors.)
In a class struct Foo { int a; int & b = a; };, you don't need b.
But if it were Foo { int a; int & b = a; Foo(); };, then you couldn't know.
@KerrekSB Now I think I see what you mean, the language has been ambiguos
01:02
@KerrekSB You could if you could look across TUs.
R. is on your tracks.
@RMartinhoFernandes How could you? That'd break the entire compilation model
I.e. changing one TU might necessitate recompilation of everything
@KerrekSB AFAIK that's not forbidden by the standard.
You end up with a crappy compiler. So what?
@RMartinhoFernandes Hm. I guess. WeakC
I had a dream about two great exam questions about 6 weeks ago. Now the exams are underway.
The dream helped me alot. Now I'm going for astrology for my next exam.
01:07
You mean, you will take an exam in astrology? Or you'll answer according to the zodiac's configuration?
I dreamed about Paul and Mary, Mary was throwing a waterballon on Paul. Paul is at xP, yP, Mary throws at Mx, My. What is the function calculating the wetness of Paul
0, 1 2 or 3 full wet =)
to make things more interesting, you should swap the names
01:10
@DeadMG In sweden this is the interesting swap =)
lol
Just odd that this happened to me in a dream =) I'm not sure what to make of it =)
Do you get work done in dreams?
I was just looking at stackoverflow.com/questions/7884705/…, aren't there possible speed penalties associated with multiple return points when returning two different objects? Nobobdy seems to have mentioend it on the page.
I spend most of the dreams I can remember running.
From things.
Not sure what, but I know they're scary.
@MooingDuck voids?
01:16
@CaptainGiraffe well, not with a void return type obviously. But a vector or something.
@MooingDuck It breaks NRVO
@DeadMG right
assuming that you return two separate complex objects
of course, in C++11 you can still expect move semantics
crap I have lots of php code that is almost perl-esque
01:18
@Mooing Duck: I would think it also depends if the lifetimes of the objects overlap
@RMartinhoFernandes I do a lot of nightmares too, they are creepy.
Mine are pretty bland. A bit silly.
Usually odd objects when I'm waking up though.
I never see anything scary in nightmares.
I saw a huge green spider just the other day =)
Xeo
Xeo
01:20
@RMartinhoFernandes I thought you programmed singletons in your nightmares?
There's just an ominous feeling of fear, and a constant sensation of impending doom.
Xeo
Xeo
0
Q: Why does the rvalue overload for `operator<<` for `std::ostream`s return an lvalue reference?

Xeo§27.7.3.9 defines the following overload for operator<<: template <class charT, class traits, class T> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&& os, const T& x); Effects: os << x Returns: os (§27.7.2.6...

good night knights
@Xeo Even with auto const & s it's broken
Shouldn't that prolong the life?
Xeo
Xeo
01:28
@KerrekSB No, since you aren't returning an rvalue
an rvalue reference itself is an lvalue
and you return such
@Xeo Oh, indeed
Xeo
Xeo
You can't extend the lifetime of a temporary through multiple layers (sadly)
So even auto const & s = std::move(...) isn't good?
Xeo
Xeo
@KerrekSB Err, no, since you only casted the lvalue to an rvalue, but didn't creaty any temporary from it
The result of std::move is an xvalue.
Xeo
Xeo
01:30
auto const& s = std::ostream(std::move(...)); should work, tho
Same with auto&&
Or without a reference and lifetime extension: auto s = std::move(...);, theoretically
@Xeo That moves.
Xeo
Xeo
@RMartinhoFernandes I know.
There's no lifetime extension.
The disemboweled body of the temporary will die at the semicolon.
Xeo
Xeo
Yeah, but that would make it safe. :)
@RMartinhoFernandes The "organ-donored"
"organ-harvested"
Xeo
Xeo
01:35
Hmm, since automatic generation of move ctor / assignment op is disabled at the slightest touch... I want MSVC to add __declspec(organ_donor) to always generate them.
Xeo
Xeo
class __declspec(organ_donor) Foo{ ... };
Or even better, the C++11 attributes
It's only disabled if you declare some copy or move special member.
I got my stickers today. :D
got mine in the post just before christmas
Xeo
Xeo
01:38
> It's a defect and it is my fault, sorry.
lol
So, in what way was COW (for strings specifically) broken again? I remember reading somewhere, that it got serious problems.
Multithreading perhaps?
Xeo
Xeo
Many answers and comments here say the opposite
(so long you have atomic operations that are faster than a deep copy)
With the existing std::string interface, you may end up doing copies even on reads.
char_type& operator[](difference_type);
std::string s = "blah";
std::string t = s;
char c = t[1]; // will cause a preemptive copy :(
Xeo
Xeo
That's certainly a problem, but not one of the "serious" ones I was hoping for. :|
It does turn what would otherwise be an optimization into a potential performance hazard.
You may not be expecting the hit of a copy when indexing in the string.
Xeo
Xeo
01:53
@RMartinhoFernandes You'd have copied earlier anyways.
Ah, that's what you mean
Xeo
Xeo
Yeah
Because, y'know, I think of writing a string library (oh noez, another one!) that includes immutable strings. However, to be able to actually efficiently interface mutable and immutable strings, the latter needs to be convertible to the former without immediatly causing a copy. At the same time, the mutable one needs to be able to convert to an immutable one and be able to detach its internals when its no longer needed, so the immutable string has the sole ownership.
(Now that sounds a bit like interfacing std::unique_ptr and std::shared_ptr under the hoods...)
Taking advantage of "blah"_s?
Sounds interesting.
Xeo
Xeo
for one. That would be an immutable string
No allocation necessary
I supposed mutable and immutable would be a single type though.
This is so awesome:
29
A: How to get every possibile pattern of an array of letters

Eric LippertYou can do so very easily with LINQ: string[] items = {"a", "b", "c", "d"}; var query = from i1 in items from i2 in items from i3 in items from i4 in items select i1 + i2 + i3 + i4; foreach(var result in query) Console.WriteLine(result); If ...

Xeo
Xeo
01:58
Mmm, it'd better interface with the string const& idiom to obtain an immutable string, true.

« first day (453 days earlier)      last day (4720 days later) »