« first day (605 days earlier)      last day (4329 days later) » 

8:00 AM
I am sure there is a 'white space' 'combo
 
user457812
There is. It's \s.
 
^\s*///[^\.]*\.\s*$
 
user457812
I use regular expressions way too much when editing code.
 
@Default I'd suggest you take this question to stackoverflow.com
 
yeah, I prefer not using non greedy searches
 
user457812
8:01 AM
The easiest match is ///[^\.]*?\s*$
 
there are also a few online tools
 
@sehe I thought of that first.. But I thought it was such a small thing.
 
@Default As you can see, this is clearly not suited for chat. More confusion and chaos than information.
 
user457812
No need to concern yourself with the previous contents of the line (because anything beforehand doesn't matter and anything after is guaranteed to be a comment).
 
@nil except that will match '///'
 
user457812
8:02 AM
Then use + instead of *
 
true, no need to start the match with a '^'
 
@Default Don't worry, we all use regexen. A lot, and we all can answer a question on SO :) So, you can, still, and give someone (including yourself, perhaps) a little bit of rep in the process
 
He needs to match where the last (meaningful) characters is a dot, so you need to add that to the pattern
 
@sehe I'll take it to SO and post the link here
 
user457812
I need to run off and take care of something, so I'll leave the regex funtime reps to someone else.
 
8:04 AM
@Default make sure you provide a very clear picture of what you do and do not want to match
 
@thecoshman will do
I'll give my first try as an example.
0
Q: find any summary that does not end with

DefaultI am looking for consistency in my projects. But I don't always remember that it when I am typing. This leads me to an issue when I have commented half of my project and I don't know if I ended all the lines with a . So, I'd like to find all the summaries that does not end with a dot to remedy t...

 
8:41 AM
guys
why are there two dots on the "i"
what purpose does it have?
 
Als
@JohannesSchaublitb what dots?
 
"Naïvely "
@Als in the string
 
@JohannesSchaublitb it's when someone had a bad pen, instead of one dot, it became two (and they were to lazy to write a new paper) :)
 
Als
@JohannesSchaublitb: see here:
germans eh
 
Good work, coshman — sehe 1 min ago
that almost sounds patronising @sehe
and I spelt patronising right first time :D twice!
 
Als
8:45 AM
@thecoshman We don't know that because comments can be stealth edited :)
 
@Als huh? I just spelt it right there in chat, where you can't ninja edit
 
@thecoshman you have an extra s in your comment in your answer
 
grumble
 
Als
someone please help out the guy here with namespaces
1
Q: Why does DialogResult::Yes require a ::?

Jon CageWhy does this work: using namespace System; using namespace System::Windows::Forms; ... if( MessageBox::Show("Really do it?", "Are you sure?", System::Windows::Forms::MessageBoxButtons::YesNo) == System::Windows::Forms::DialogResult::Yes ) { Console::WriteLine("Do it!"); } ..when this fail...

fully qualified names seems to have confused him
 
9:00 AM
Well, this is an experience for the ears
 
9:19 AM
oh hi
 
ih ho
 
@Als Good to see you again, Als. :)
 
Als
@Neil Not really
 
@thecoshman It was meant as a complimen. I like how that post on SO totally evaporated the clouds of chaos that arose in chat. And the 'good work' pertains to the explanation part.
@thecoshman But, I guess you have a point. I make it a point to express my appreciation, especially when I was the one prodding people to try it a certain way, and it worked:
Wow. I knew someone would have seen this problem before. Answers like these are a tribute to how the site works. +1 — sehe Jun 7 at 13:20
 
@Als That's my opinion, not yours, though I'm sorry to hear it's not reciprocal
 
Als
9:35 AM
@Neil I am sorry. The damage done is done.
 
@Als Everyone has their own opinions.
 
Nostradamus
Alea iacta est
 
@sehe Nunc est bibendum
 
Als
@Neil Its fine. I have nothing to say
 
@Als Most people don't write when they don't have anything to say. You have something you want to say, whether you're aware of it or not.
 
Als
9:40 AM
@Neil Zips up from here on
 
@Neil :) You're so right. But I don't think it's working
@Als where you just letting us know about the question? Thanks for the heads-up
 
@sehe Ah, that's where you're wrong. As a sage professor once told me, it's impossible to not communicate. Even silence is communicating something.
 
Als
@sehe I don't know what u are talking about
 
Ah I see, it wasn't tag c++
 
 
9:46 AM
On the topic of bears: My client handed out Pedometer-s at the door. It was related to national health day (or something)
A pedometer is a device, usually portable and electronic or electromechanical, that counts each step a person takes by detecting the motion of the person's hips. Because the distance of each person's step varies, an informal calibration, performed by the user, is required if presentation of the distance covered in a unit of length (such as in kilometres or miles) is desired. Used originally by sports and physical fitness enthusiasts, pedometers are now becoming popular as an everyday exercise measurer and motivator. Often worn on the belt and kept on all day, it can record how many ste...
 
@sehe Interesting. I wonder how much one of those cost
 
We have set it to silent. We don't want to live the embarassing moment when a collegue walks by and the pedometer starts beeping like mad :)
@Neil I reckon about 0.80$ :)
 
@sehe Once upon a time, that would have cost a lot more. Things Electronics really have cheapened
 
@thecoshman but it doesn't always work out that well:
> @user1131997: you should ask specific questions and tell us why you are stuck doing what you tried. And stop arguing :) In fact, asking why A obj2 = *(new A()) is a memory would be a much better question already. – sehe Jan 12 at 0:00
Jan 13 at 0:12, by sehe
@RMartinhoFernandes I'm so happy that you aced that answer. Not just the answer, but the whole stackoverflow experience for the guy. He will be a better (internet) person for it! For fun, let me reference the (now-deleted) question posted by that same user1131997:
My prediction didn't quite work out:
Jan 13 at 0:15, by sehe
I'm pretty sure he's gonna be completely awed by the difference it made, when he actually stopped arguing and posted a good question. Newbie question, but at least not a 'sucky/whiny' newbie question. I gave him the +10, so now he even has a Nice Question badge to show for it
We all know how celebrated that guy has become in this room (and beyond, in fact)
 
> A obj2 = *(new A()) is a memory would be a much better question
I think you a word
2
 
9:57 AM
 
hmmm
optional<T>, should have explicit boolean conversion?
 
Yes.
It's a much more natural way of performing a test.
 
yeah
designing the optional interface is more tricky than I had imagined
for example, x := Optional(T)(); doShit(x); x := T(); // assignment or construction..?
 
What does the first statement do?
 
no, wait, thank you boost::optional for suggesting the pointer semantics
@RMartinhoFernandes Creates a default-constructed Optional(T).
 
10:10 AM
Default construct a T, or construct an empty optional?
 
empty
but boost::optional's pointer idea solves the problem anyway
x := T(); // construction *x := T(); // assignment
 
Direct Value Assignment (upon initialized): To assign a value to the wrapped object.
Direct Value Assignment (upon uninitialized): To initialize the wrapped object with a value obtained as a copy of some object.
x := T(); constructs if empty, assigns if not.
 
that necessarily imposes the requirement that you can only ever use arguments which are supported by both assignment operator and constructor
 
Personally, I don't find that too restrictive.
 
hmm
 
10:16 AM
The kind of things where you want different copy ctor and copy assign (proxies) are not going into optionals.
 
heh
an Optional(Proxy(T)) :P
also, why would you ever want such a thing for proxies?
that reminds me
need to change my rules for automatic casts a little bit
 
@DeadMG Not sure. But I think proxies are the only thing weird yet useful enough to justify broken copy semantics.
 
right, but who said anything about this being just copies?
my Optional has move semantics too
 
I can't think of a reason to not have both move ctor and move assign, either.
 
me neither
I just went with the boost wording
 
@RMartinhoFernandes Yes, so I changed it.
 
also introduced a new optional allocator function, Release(), which releases everything currently allocated by a specific allocator.
should enable something faster in terms of stuff like object pools or arenas which can release multiple allocations all in one go
 
Are you allowing perfect forwarding construction (with tuples, right?) on the optional?
Optional(T)(some, args, for, aT)
 
yes
for a moment I thought I'd forgotten that constructor, but I didn't
also, here's another reason to remove decltype: it's really not idiomatic Wide.
 
10:25 AM
What about default-constructing a T in-place?
 
there's a lot less reason to gain the type of something directly with the extra type inference
and it's much more idiomatic to simply take any type which fits the interface
@RMartinhoFernandes Didn't provide. T must be movable so you can just Optional(T)(T());
 
ahh, noise
 
@DeadMG Ah. The guys discussing the std::optional proposal are still trying to decide that thing.
They don't want to force movability.
 
all Standard containers value type must be movable in Wide.
 
It would prevent std::optional<std::mutex> for example.
 
10:28 AM
eh
that's not really the intended use case
if you're desperate for that, then allocate off arena or pass null pointer
also, mutexes can't be moved? I thought they could be...
 
There are also types with copies but no moves, and expensive and shit.
 
copyable but not movable? wtf type is that?
 
std::array?
 
oh
not in Wide
also, expect compiler optimizations to elide
 
@DeadMG Nope. Ultimately it's because POSIX mutexes use their own address as an ID. It's not an issue since there's std::unique_lock<...> to plug movability.
 
10:32 AM
how strange
oh well
immovable types are way the minority and I'm not particularly interested in changing the interfaces to support them
 
Sure. std::mutex is the only one I know.
 
I mean, Optional is far from the only Standard library which requires movability
pretty much all of them do, in fact
 
@DeadMG Arrays are movable in Wide? Or no such thing as Array?
 
@RMartinhoFernandes I did define Array(T, N) to be tuple(T,T,T,T,T...).
and as tuples are movable if their contents are
 
10:36 AM
that reminds me
I failed to specify or even think about how I was going to specify much of my event-based type-mutation stuff
 
@DeadMG Look ma: almost no compiletime overhead!
Remind me, does Tuple support the operator[] now?
 
@sehe Eh. Suck my JIT and precompiler :P
 
@sehe No. How could it?
 
@DeadMG Where can I download it?
 
@sehe Try writing the signature.
 
10:37 AM
@sehe Too true:(
 
@RMartinhoFernandes Mmmm. Perhaps I did, you'll never know, you know :)
 
Oh hai.
 
I actually haven't specified Arrays yet
 
Uhey
 
but of course, I can go back and change whatever I like whenever I like
 
10:38 AM
@DeadMG Great. Save the best till the end
 
For example, for std::tuple<int, std::string>, what's the return type of operator[]?
 
@DeadMG For some years to come
 
morning biatches
 
also reminds me that I failed to remember to overload the damn operators
OVERLOAD ALL THE OPERATORS
 
Guten Morgen, @TonyTheLion
 
10:39 AM
The return type would depend on the value of the argument passed. That's a no-no in C++.
 
oh wait, I didn't encounter any types where I was going to overload them yet
 
@RMartinhoFernandes I think now that sarcasm detectors are up and running, the irony are in routine maintenance :)
 
But std::array does support std::get.
 
@ScarletAmaranth morning, what's up?
 
@sehe Oh, shit.
 
10:39 AM
@TonyTheLion Nothing much, just woke up as well. Ya ?
 
:) Happens to me all the time. Annoying, isn't it?!
 
@ScarletAmaranth yea, pretty much just woke up, just had coffee
 
@RMartinhoFernandes Kinky. Look at what Mpl/Fusion support. Crazy. Sexy. Cool :)
 
here's a question
 
@TonyTheLion My water is about to boil, brb ^^
 
10:40 AM
if you have a string in Swedish and you have another string in Chinese, is it possible to lexicographically compare them?
 
My water is about to break
... oh wait
 
@ScarletAmaranth sounds wrong
 
@DeadMG You just need to specify the collation, as always
 
right
 
It is quite possible that no sensible collation can be chosen, but it is really a non-problem. The caller decides
 
10:41 AM
@DeadMG convert the Chinese to pinyin and the Swedish to English
 
never mind, the scenario which would lead to this happening was le dumb
 
English always wins!
well, Latin-1
 
@ScottW Impossible. Wrong genes. It would have to be a GenePoolSingleton anwyays
 
@DeadMG Why was it dumb?
 
Mmmm, coffee.
 
10:42 AM
Sort a list of customer names, where some are Swedish, and some are Chinese.
 
@RMartinhoFernandes Because that would entail keeping track of the language of every single string in the program.
 
Because only the dumb speak both Swedish and Chinese.
Stupifyingly quietly
@RMartinhoFernandes Try working for Google+ :)
 
@sehe Challenge accepted! :P
 
which is quite clearly le dumb
 
(the typo - RLFO)
 
10:43 AM
I don't know what typo you're talking about ^^
 
@ScarletAmaranth Tits or GFOT :)
Lunchtime
 
Argh, I always make up a super random elaborate password so that no russian kid hacks whatever account of mine and then I get an e-mail that I should change my password because xyz's databases got hacked. What the high definition fu*k.
 
Leakedin?
Or something else?
 
@RMartinhoFernandes yeah ...
@RMartinhoFernandes I mean, how is that even possible ? Do they store they passwords in plaintext ... o_O ?
 
10:49 AM
@ScarletAmaranth it's ok that it's plain text, they only let 2 super trusted people onto that computer
 
@thecoshman So it would seem ... I honestly wouldn't mind all hackers in the world having my password hashes ... but storing stuff not encrypted is just a way of company saying: We don't know what we're doing actually.
 
@ScarletAmaranth They SHA-1 them.
SHA-1 is designed to be very fast.
Throw GPUs at it and you get super fast cracking.
 
GPUs or some soon to be common clouds of tons of hardware and have fun :)
 
11
A: Why would salt not have prevented LinkedIn passwords from getting cracked?

TwentyMilesKrebs follows up on this question, and Ptacek does clarify what he meant: BK: Okay. So if the weakness isn’t with the strength of the cryptographic algorithm, and not with the lack of salt added to the hashed passwords, what’s the answer? Ptacek: In LinkedIn’s case, and with many other s...

 
Still not as bad as the fiasco with sony network, rofl.
 
10:57 AM
-2
Q: Visual Studio 2012 RC Crashing

עידו הדרWhen i'm trying to create Win32 Project, I'm entering Name to the project and hit OK. Then its show: Click on me to picture.

Close as off-topic, please.
 
doneded
hmmm
for Variant visitation, if the visitor does not provide overload for some type, give compiler error or ignore?
 
Error.
The point of using that kind of scheme is to get the compiler to validate it.
 
yeah, I figured
 
If the visitor returned a value, you would have to throw when the overload is missing. That's the kind of stupid exception that should never be thrown in the first place.
 
agree
oh cockles, I forgot to specify the return :P
 
11:07 AM
@ScarletAmaranth You can have multiple GPU's in the cloud now, only $2.01 per hour
> Cluster GPU Quadruple Extra Large 22 GB memory, 33.5 EC2 Compute Units, 2 x NVIDIA Tesla “Fermi” M2050 GPUs, 1690 GB of local instance storage, 64-bit platform, 10 Gigabit Ethernet
@DeadMG specify? You mean "type" (verb)?
 
@sehe No, just at all.
hmmm
array constructors... want to provide a range constructor, but not sure about what to do if range is not big enough
 
Value-initialize the rest?
 
I don't have value-initialization
but default construction will do, I guess
by the way
 
Has anyone noticed that Jon Skeet has so much badges that it looks like he "only" has 336 bronze badges?
 
@DeadMG Well, whatever equivalent thing.
 
11:15 AM
thinking of changing the specification so that static variables are always const (make you use a filter cast to override it), and all functions are pure.
 
@Default There's something wrong with your browser.
Pretty clear it's 3k+.
 
and that's a sick number of gold badges
 
@DeadMG Woah, that's radical.
 
@RMartinhoFernandes even if you look at it here? stackoverflow.com/a/10991492/238902
 
well, IMO, violating those rules should most definitely be the exception
 
11:18 AM
well, in Chrome it's not showing the last digit. In IE it shows half of the last digit
 
@Default Yes.
 
don't have firefox though.
 
@Default Working fine for me.
 
What browsers do you use?
 
@Default I'm using Chrome, btw.
 
11:19 AM
weird.. Oh! it's because I've Ctrl-minused the site.
 
good to know. :)
 
@RMartinhoFernandes Any other thoughts on that? :P
 
@DeadMG I'm perfectly okay with the idea, but I'm sure there are a few things that need careful design.
For example, how do you printf-debug one of those functions?
 
well, A), use a debugger
 
11:24 AM
Not always feasible. Sometimes you really need to just log.
 
but B), you have no obligation to actually ensure purity
it's like const- it's a logical thing, not a bitwise thing.
and if you're in debug mode, the compiler probably won't be basing optimizations on your purity
 
@DeadMG Ah. Ok.
 
... and even in release mode, there's no reason that printf debugging won't work for pure functions
and if you're desperate, then just manually remove the purity tag.
not like I don't provide the necessary features to modify your function to your heart's content at compile-time :P
 
Ell
hi guys
 
Hi
 
Ell
11:40 AM
is there a standard way of a buffer? is it just a char* with a size? or a void* orr?
 
std::vector<char>?
What kind of buffer are we talking about?
 
? what context? The 'standard' way would be std::streambuf<>
 
Buffer is a very broad term.
 
Ell
@RMartinhoFernandes as in a general buffer for data - e.g. a buffer containing an image to be made into a texture
basically just a chunk of memory
 
@Ell For fixed size: array<char, N>, dynamic: vector<char>
 
Ell
11:42 AM
it will be fixed size, but I don't know the size
I think :L
 
Lunch time. Hopefully there will be bacon.
 
Ell
@ScottW hey :) just got your message today
glad you enjoyed it :D
 
@RMartinhoFernandes In a sea of vomit?
 
Ew
I though Pyramid schemes were illegal these days
 
Ell
with array<char, N>, does N have to be a const expression? or compile time constant or whatever
 
11:52 AM
@StackedCrooked Hope not.
@Ell Yes. An ICE.
 
Internal Compiler Error? :)
 
Integral Constant Expression.
 
Why would we introduce an abbreviation collision for something like that
 
Yes, anonymous dynamic arrays have no such requirement, but they do not propagate size in type information since you just have a humble pointer to it. Use std::vector
 
n-ICE!
 
11:55 AM
But if you need to have a stream of bytes contiguous in memory, subject to later reinterpretation (for example 4 bytes to account for color information in an image buffer), you're going to have to dance on a lower level. But mostly, it can be precisely mapped to its particular usage, so there is no need for chasing void*s around.
 
@DomagojPandža Cue: The robot using his alias<> template alias to create a temporary array reference with inplace initialization.
Don't know whether using it would ever not be UB, but still, nice
7
A: Arrays and Rvalues (as parameters)

R. Martinho FernandesThere is nothing wrong with foo_array. It's the test case that is bad: "hello" is an lvalue! Think about it. It is not a temporary: string literals have static storage duration. An array rvalue would be something like this: template <typename T> using alias = T; // you need this thing bec...

That one ^
 

« first day (605 days earlier)      last day (4329 days later) »