« first day (1362 days earlier)      last day (3812 days later) » 

user1804599
09:01
@FredOverflow TIL about require and ensuring in Scala.
Xeo
Xeo
akdkajsdjad
this is annoying
I can't think of a good data-structure / way to do this
@rightfold Those are just library functions in the Prelude, right?
user1804599
In Predef.
@BoltClock +1 for style
user1804599
09:02
I think I should call it require and ensure instead of pre and post in LasagnaScript.
user1804599
pre and post are meh.
require and ensure sound very nice.
@Xeo Yes.
user1804599
I currently have always for class invariants.
Xeo
Xeo
@Puppy Yeah, but turns out that thing doesn't help me achieve what I want :/
user1804599
Oh god.
better rename it ;)
user1804599
always leaks == 0;
always: control flow!
user1804599
@FredOverflow can you disable require and ensuring in Scala?
09:06
@rightfold Last time I peeked into the implementation, it was a simple if/throw that was always done.
Is it true that Concepts Lite is introducing void f(auto x); syntax for functions?
@Xeo lol
user1804599
Hmm.
Apparently short-hand for template<typename T> void f(T x);
user1804599
@Rapptz Nice.
09:08
@Rapptz It gets even better!
Jul 12 '13 at 12:06, by R. Martinho Fernandes
#auto <auto>

auto auto() {
    auto::auto << "auto";
}
@Rapptz have you never heard the expression 'cry me a river'
Xeo
Xeo
@Rapptz Wait, isn't that available without Concepts Lite?
I don't see the relevance.
Xeo
Xeo
I thought they added that
@FredOverflow Debugging in C++ should be called autopsy.
09:10
@Rapptz as in a lack of sympathy... he can't review edits for two days, big deal...
user1804599
I wish Slack had message relocation.
user1804599
@FredOverflow In Scala that would be << and it would use implicits for the stream and the message.
@Rapptz as far as I understand, this will only work for lambdas
No I meant for actual functions. Not lambdas.
I don't think this will work for normal functions
although void foo(Concept x) is being considered IIRC
09:17
Who needs normal functions, anyway? Just lambda-ize everything!
const auto len = [](auto&& x)
{
    return x.size();
};
user1804599
@FredOverflow in an anonymous namespace. :v
(instead of template <Concept T> void foo(T x) which is in turn shortahnd for template <typename T> requires Concept<T> void foo(T x))
Xeo
Xeo
@rightfold just make 'em static
@FredOverflow Why const?
@MarkGarcia I don't want len to be bound to a different function later. This is not JavaScript ;)
09:18
@MarkGarcia so you don't change it? :p
user1804599
@FredOverflow how can you reassign it to anything else?
@FredOverflow that can't happen I think? lambdas have their own unique types afaik?
^ that
user1804599
Lambdas have unique data types.
09:19
oh, nice!
I'm a genius...
(not)
user1804599
Also ugh prefix const.
are one-past-the-end pointers legal on non array things? :S
@melak47 yes
Xeo
Xeo
define "non-array things"
09:19
int i;
int * p = &i + 1;
perfectly valid
Xeo
Xeo
an object always counts as an array of size 1 for the purpose of pointer validity and arithmetic
int a = 42;
std::sort(&a, &a+1);   // just to be sure...
3
user1804599
Win.
Thanks for helping me win, you two ;)
@FredOverflow I suspect you've been sneak-writing Haskell and neglecting C++ as of recent; naughty!
09:21
@FredOverflow that's actually pretty close. I need an iterator pair for a single value, and constructing an array of one seems silly :)
@ScarletAmaranth Replace Haskell with Java and you're close :(
Xeo
Xeo
@melak47 See the message above that :P
user1804599
nullptr should be represented by the very last memory address. :)
user1804599
Then you can use everything but nullptr as iterator, and all addresses are usable.
template<typename T> auto melaks_special_need(T& x)
{
    return std::make_pair(&x, &x+1);
}
user1804599
09:23
&&!
user1804599
rvalue iterators!
@FredOverflow not really useful since I need this iterator pair in a constructor's initialization list ;)
@rightfold I'm not gonna play with fire.
@melak47 You mean you need two iterators? Or literally a std::pair?
@FredOverflow two iterators.
I didn't mean "iterator pair" that literally
user1804599
You should be able to have local variables in initialisation lists.
09:25
@melak47 #define melaks_special_need(x) &x, &x + 1 (dont' know if valid macro) :P
I'm afraid you're gonna have to write the tedious &x and &x+1 instead of the nice reusable melaks_special_need then ;)
@MarkGarcia better parenthesize defensively
user1804599
begin_object and end_object methods.
@FredOverflow lol it's a single occurance anyway :p I was just wondering if it's legal
#define melaks_special_need(x) std::address_of(x), std::address_of(x) + 1
09:26
urgh plz stahp
user1804599
You need std::addressof instead of operator& btw.
@rightfold right
user1804599
In a macro you even need ::std::addressof!
@FredOverflow lol. Interesting if x is an expression that returns an object.
how does std::address_of work anyway
do they just typecast to void* and return it?
09:28
Temporaries...
3
A: If an operator is overloaded for a C++ class how could I use a default operator instead?

Daniel EarwickerI define this utility function: template<typename T> T *GetRealAddr(T &t) { return reinterpret_cast<T*>(&reinterpret_cast<unsigned char &>(t)); }

user1804599
template<class T>
T* addressof(T& arg) {
    return reinterpret_cast<T*>(
               &const_cast<char&>(
                   reinterpret_cast<const volatile char&>(arg)));
}
@Xeo so I'm guessing that you went for map<tuple<optional<T>, optional<T>, optional<T>>, value_type>?
oh god, right (this is ugly)
reinterpret_cast<const volatile char&> facepalm
So, @Puppy
did you see that ludicrous display last night?
09:32
@rightfold mmm; using C cast instead of reinterpret_cast and removing const_cast wouldn't do?
@LightnessRacesinOrbit IT Crowd :D?
51
A: How can I reliably get the address of an object?

Matthieu M.Let us first copy the code from Boost, minus the compiler work around bits: template<class T> struct addr_impl_ref { T & v_; inline addr_impl_ref( T & v ): v_( v ) {} inline operator T& () const { return v_; } private: addr_impl_ref & operator=(const addr_impl_ref &); }; template<class T

Xeo
Xeo
@Puppy actually multiple nested maps. Currently refactoring
@Xeo I don't think you can convince any of the Standard associative containers to cough up the goods here.
My boss is rearranging the bookshelf at work. Like a butcher.
because effectively, what you have is a many-to-one mapping and they are not built for that.
unless you want to just hardcode a lookup of all possible permutations of the placeholder.
Xeo
Xeo
09:38
Guess one way is to check for (id, id, id), and if that doesn't exist, check for (*, id, id), if that doesn't exist check for (*, *, id) and if that doesn't exist go for the general fallback (*, *, *)
there's std::uninitalized_copy but there isn't std::uninitialized_move :(
Move iterators.
I thought you implied that something like (id, *, id) would be legal too.
Xeo
Xeo
@Rapptz std::uninitialised_copy(std::make_move_iterator(first), ...)
but you know in advance that since the tuple size is only 3, there are only 8 permutations, so I figure it's not that unreasonable.
09:39
@R.MartinhoFernandes Right. I forget those exist.
Xeo
Xeo
@Puppy No, I won't allow that after all. What would (*, id, id) and (id, *, id) in the data table mean?
the nested maps is probably easier/simpler though.
@Puppy nah, tri-vector set
Xeo
Xeo
@Puppy Not really. I need to back up and shit there too
@R.MartinhoFernandes :D
Xeo
Xeo
09:40
Which is what the current implementation doesn't do, which means it doesn't actually fall back to the more general fallbacks
well, if you're definitely only going to allow placeholders in that order, then I'd definitely go with something like map<tuple<optional<T>, optional<T>, optional<T>>, value>.
Xeo
Xeo
yeah. I'll prolly go with unordered_map though, and get a manual hasher (with hash_combine)
personally I typically favour unordered_map but the lack of proper hash facilities by Standard for many types and the lack of hash_combine is quite annoying.
@Puppy @Xeo How do you implement hash_combine?
Xeo
Xeo
Copy from boost
09:42
ask Boost.
Okay, thanks.
Xeo
Xeo
Though I have one other idea that maps individual id-1, id-2 and id-3 to indices into a vector. that would leave me with 3 unnested maps and a vector
(a flat 3D vector)
big meh.
wayyy worse than the map of optionals.
Xeo
Xeo
yeah, prolly
I didn't know the original STL had type_traits
it sure is ugly
09:48
17
Q: Is Type(::x); valid?

chrisWhile discussing the Type(identifier); syntax and how it's a declaration, I came across Type(::x); not working with Clang. I would expect that given a global variable x, it would treat ::x as an expression (::x + 2 works) and cast ::x to Type. However, it gives a compiler error. Here is a short ...

@Feeds YOU GOTTA BE FUCKING KIDDING ME.
C++ y u stupid syntax?
@R.MartinhoFernandes At least this time they're actually releasing a CTP2.
> ALL CAPS. Last week with the RC for Visual Studio 2013 Update 3 we added an option to sentence case menus; in this VS “14” CTP we changed Menu Bar styling to Title Case for everyone to help us get feedback on the change. We’ll use the feedback we get to help determine if we keep it as it is in this preview, make it an option under the Tools/Options menu, or take some other path.
@Puppy I just gave up with the CTP1 yesterday.
09:50
lol I had forgotten ALL CAPS MENU was a thing
:<
I don't want to spend more time trying new versions.
They should have released this on Monday.
Amason
British way of saying a popular Online retrailer of books, Amazon(.com). English was first invented in United States of America but when it arrived in Britain, they Britainized most of standard American vocabularies such as Amazon.com. And as a result they've decided to call it Amason.com instead of Amazon.com.
@R.MartinhoFernandes Microsoft seems to recommend not installing it along side other VS versions because it breaks things.
Xeo
Xeo
hahahaha, I just checked. It has been raining basically non-stop since 4:30am yesterday
@Rapptz I have a VM.
Xeo
Xeo
09:52
@R.MartinhoFernandes No VC++ changes apparently
@R.MartinhoFernandes oic.
@Xeo Come on, they must have fixed some bug.
> VC++ Property Pages and Editor Enhancements
"Enhancements" Like I'll believe.
The way it is, it must be impossible for them to change anything without accidentally fixing a bug.
@R.MartinhoFernandes Is it an Azure™ VM?
Sucks.
The antique Property Pages should be revamped.
Is Microsoft required to recommend their own products?
tbh I didn't know Azure VM existed
IaaS, SaaS, web hosting, all the cloud buzzwords
I hope XaaS dies sometime in the future.
09:56
LaaS - Lounge as a Service
8
> 14.0.21901.01.DP
Double Penetration? :v
developer preview
Damn.
too many links
10:01
To be honest, I'm still hoping for the VC++ team to provide something significant this release, like standard C++ wrappers instead of C++/CX.
lol, Puppy 2014.
@MarkGarcia Haha, how gullible.
@R.MartinhoFernandes lol
@R.MartinhoFernandes woof woof
Bye all.
#if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
#pragma reset woff 1174
#pragma reset woff 1375
#endif
what do you guys think woff means?
Xeo
Xeo
10:08
Well well well. Reconfirming the specifications, it seems I don't need to support any wildcards at all, except for the generic fallback where there is no specific match
that simplifies this just a tiiiiny bit
Now I can really just go with map<tuple<id, id, id>, info> infos; and an extra info fallback;
that's considerably simpler.
Xeo
Xeo
yeah
@Puppy oooor, not enough
Xeo
Xeo
no mocking about with not finding stuff
@Rapptz "warning off"?
10:12
makes sense
I guess that it would have been too many characters to actually have warningoff or something.
I'm really tired. I should go to sleep. I can't even think straight.
Night.
night
user1804599
@Rapptz warning offset!
Wide has Wide strings.
10:22
-1
Q: Disallow languages other than English in chat

Second RikudoIt happened again. It keeps happening and no one is doing anything, so I've decided to. I don't mind other languages. In fact, גם אני לפעמים מדבר עברית בצ'אט. As long as it's contained and doesn't bother anyone, let them be. But it's not. It's very often now that I see messages in other languag...

kindly gtfo dumper
Oh god
Xeo
Xeo
Oh Puppy...
@Xeo Oh puppy dog
10:28
what
What a mean @Puppy you are...
not my fault he had to come in here and shit on the carpet
@Puppy I did not come here to "shit on the carpet"
5
I neither know nor care what your intentions were; that is the effect you have achieved.
I know that there are folks here who are interesting in the flag problem, so I figured it was interesting.
10:29
@Puppy Gosh, no.
If you don't want it here, either ignore me or have the message trashed.
it's not interesting, merely sad.
11 secs ago, by Second Rikudo
If you don't want it here, either ignore me or have the message trashed.
if either of those were genuinely effective, we wouldn't have a flag system in the first place.
This is getting nowhere so I'll just stop arguing.
10:37
@SecondRikudo Why not? Everybody else did. :)
@SecondRikudo Yes, it is. Thank you for posting that.
@Puppy Try to be less of a dick. Maybe. Just maybe. Try a tiny bit.
3
@LightnessRacesinOrbit Glad to see I wasn't a bother to everyone here
Thanks @Xeo
@LightnessRacesinOrbit People who dump their shit in here deserve a hostile reaction.
@Puppy there is a fine line between dumping a help question like people dumping their C++ questions and posting a meta discussion about the chat that is relevant to the room.
"fine"?
That's quite the euphemism there.
Shh, I'm trying to be polite :D
10:42
@Puppy And yet, whenever I look around, the only person spewing "shit" is you. So here's your hostile reaction: fucking pack it in.
@BenjaminGruenbaum There's no line at all. It's the same thing. You have a problem and you dump it here for my attention.
Maybe it's not for your attention. Considered that? There are "other people" here, too. Y'know, "other people"?!
@Puppy yes, but in his case it's your problem just as well as his.
And if you were so uninterested in the question that @SecondRikudo posted, then why the fuck did you answer it?
I gave my two cents.
10:44
Can I have two cents?
Even though I should have been asleep 40 minutes ago.
0
A: Disallow languages other than English in chat

RapptzI don't think rooms without English should be removed. Although StackOverflow is mainly English, there are many cultures and languages that encompass the group of people that make up StackOverflow. Many popular rooms have multiple languages being used, Lounge by itself has German, Dutch, English,...

:v
Xeo
Xeo
> a difference language
Yes puppy, you were a dick this time. Sorry.
there might be a lot of typos or weird things, I've been awake for like 21 hours.
I like difference languages
@Rapptz Lots of upvotes fast. Mine was the first. :)
10:47
@LightnessRacesinOrbit I don't mind different languages
Like I said in my post
לפעמים גם אני מדבר עברית בצ'אט
Xeo
Xeo
@SecondRikudo whooosh
The problem comes when it starts affecting others. Repeatedly.
Can I just mark it valid/invalid/not sure and move on? Sure. We all can.
That doesn't stop the occasional user from here jumping into our chatroom and telling us to stop to flag (when we flag shit) :)
Chat flags will probably never be fixed and it sucks.
@SecondRikudo Stop writing non-English in chat please, hypocrite.
I actually do mind different languages.
10:49
@LightnessRacesinOrbit :P I knew someone would post that
@SecondRikudo And if you spent more time in the Lounge then you'd know it was gonna be me ;)
@Jefffrey At least you're not @thecoshman. Poor guy minds any language.
Xeo
Xeo
lol
@SecondRikudo so your argument is "some chat users think my flags are invalid. Can we please elevate my flagging rules into chat law?" :)
@LightnessRacesinOrbit lol
10:52
Speaking of, where has he been? I know he's been about but rather quiet lately
@jalf My argument is that this is an English site, and users are expected to discuss in English.
he was here like an hour ago
If you cannot adhere to this rule, don't discuss here.
@SecondRikudo that's what I said. "I flag non-english stuff. Others invalidate my flags and tell me not to flag non-english stuff. Can we please elevate "no non-english stuff" into law?"
@LightnessRacesinOrbit Hindi
10:53
@SecondRikudo Actually, users are expected not to "discuss" at all. But chat is different. Oh, look! Chat is different.
@jalf No, that's not it
You misunderstood,
Nothing wrong with pocket communities. Look at the Lounge. We may speak English but we are hardly on topic or even employ basic manners, which is a far greater "problem".
@LightnessRacesinOrbit idgi
@LightnessRacesinOrbit I can at least understand the conversation here and follow it
@Jefffrey I was making reference to the evidence that @thecoshman is incapable of speaking or writing in coherent sentences. No offence, @thecoshman, if you can read this (which you can't).
10:54
@LightnessRacesinOrbit there's no "topic to be on" here vOv
And when a flag is raised here, I can effectively judge and follow what caused it
@SecondRikudo: Which language? "Non-English"? — Lightness Races in Orbit 1 min ago
lol
@ScarletAmaranth Professional and enthusiast programming discussion. SO.
1 min ago, by Second Rikudo
@LightnessRacesinOrbit Hindi
What do you have against Hindi?
10:54
I omitted that part on purpose on meta.
@SecondRikudo Comment on the thread please.
@SecondRikudo Why? Because you realised it was stupid?
Sounds like you only have enough evidence to ban Hindi, then.
@LightnessRacesinOrbit No, because I don't want to start arguing with people that I am not a racist.
@SecondRikudo hahaha
@LightnessRacesinOrbit I think not; I'd rather discuss the influence of gobelins on Russian culture of 17th century
I love that you felt it was still okay to write it here, based on that
10:55
@LightnessRacesinOrbit Yes, I do, because that's the only language that's being spoken here on chatrooms other than English.
@SecondRikudo expected by whom, though? You want that to be the expectation. It is currently a decision made on a per-room basis. I don't expect participants in the non-English rooms to discuss in English. It is not currently an expectation, except in clearly English rooms
Xeo
Xeo
@LightnessRacesinOrbit それは何?
I didn't want to say "ban all indians from so chat" because that's exactly what it would come off as.
2

 English-speaking Bulgarian Developers

New Rules - must read! A room strictly for English-speaking Bu...
10:56
And because that's not what I want.
Just from the top of the room list
@SecondRikudo So, this is total nonsense.
@SecondRikudo you just want to ban users from speaking Indian. :p
@SecondRikudo snigger
@LightnessRacesinOrbit Funny enough, I've never seen flags from that room
I'd love to ban users from speaking Indian English, but try getting that one past committee, Sir.
10:56
@LightnessRacesinOrbit Kindly do the needful.
@SecondRikudo So the rules should only apply to rooms that habitually flag?
@SecondRikudo Please can you guide me through my doubt and give me the solution to the answer to my question.
@SecondRikudo I sincerely doubt it.
@LightnessRacesinOrbit No, but those are the rooms I'm having specific problems with.
@SecondRikudo If nobody speaks the language nobody can moderate it :v
I honestly don't see a problem that's big enough to justify something this draconian.
10:57
@SecondRikudo You kinda keep changing your story. I don't have a particular problem with any variant of it, but you should try to stick to one if you want your proposal to appear coherent.
@CatPlusPlus If nobody speaks the language, it doesn't need moderation :|
@jalf Yeah that's pretty much my stance.
user1804599
@Rapptz So he's saying that because the flagging system is terribly broken, rooms must be deleted? :S
user1804599
10:58
Delete the idiots who flag.
@LightnessRacesinOrbit The motivation for the post was due to flags that keep getting raise, yes, in hindi speaking rooms.
if a tree falls in an Indian-speaking forest, does it require moderation?
lol
Frankly, I'd rather have a few Hindi chat rooms than a few more Engdian chat rooms
@jalf No, but it could be useful as firewood :)
10:59
@SecondRikudo but why is that a problem? Those of us who don't understand them can just skip the flags. Those who do understand can moderate them
It's so funny to see people who are always so quick to yell RULES to say rules aren't needed when nobody understands that rules are being broken
@jalf And thus my previous argument was
Even though people can just "skip flags" we occasionally get visits from users telling us to stop flagging
@LightnessRacesinOrbit why do you mention that
Why? Can't they skip the flag? Sure they can. But it's still very annoying.
@SecondRikudo but that's a different matter (flagging is broken), and has nothing to do with language

« first day (1362 days earlier)      last day (3812 days later) »