« first day (1513 days earlier)      last day (3436 days later) » 

4:00 PM
Good ol' -Wall served me well.
 
@E_net4 Retarded Visual C++
 
user3010322
-Wall is less crazy in g++ and actually helps. Here it's just.... telling me all kinds of stuff I don't care about.
 
I know, I know. I dropped VC in favor of GCC a while ago.
The main reason was C++11.
 
user3010322
Clang does the same thing too with it Tautological Compare stuff. If I have a boolean that originates from a template, and I write some code that uses that boolean, I shouldn't have to write a second function that's specialized for the True Branch and specialized for the False Branch.
 
As in, seriously, why won't they just implement the 3 year old standard.
 
user3010322
4:02 PM
VC++ can't do it because their code is nightmarish, internally.
 
user3010322
WARNING CONDITIONAL EXPRESSION IS CONSTANT
 
user3010322
FFS
 
no shit
of course it is - I want to loop infinitely
 
You know, that also makes me wish C++ had static if's.
 
while(true)
 
4:04 PM
Without preprocessing, I mean.
 
and then C4127
 
Phabricator is rather chatty
 
user3010322
"default constructor was implicitly defined as deleted" NO IT WASN'T I HAVE IT DEFINED AS DEFAULT RIGHT THERE.
 
user3010322
Holy shit, holy fucking shit.
 
@E_net4 No, you really don't want that shit.
 
4:08 PM
@E_net4 Not gonna happen, ever.
Bjarne took it down
 
and for good reason
he did more than take it down, he took it down, kicked it in the balls, stabbed it in the heart, and crushed it in a car compressor
 
Curious.
 
user3010322
The reason why is because Templates + Concepts are a better version of static if.
 
no
anything is better than static_if.
 
user3010322
static_if should, however, be implicit to if, like hte way g++ does it even with -Wall turned on.
 
user3010322
4:11 PM
But clang and VC++ are too cross-eyed to figure that one out.
 
nah I disagree.
 
Xeo
@ThePhD That... doesn't change shit.
 
user3010322
AND WILL INSTEAD GIVE ME 545 WARNINGS.
 
Ell
lel
going to work. bye folks
 
bye
 
Xeo
4:12 PM
if you = default a ctor that would be deleted, it will still be deleted - that's what = default means, "do the thing you'd do without me saying so (and without anything else stopping you from doing so)"
 
user3010322
Yes, but that means I've explicitly told it to Do The Thing™. So... it should Do The Thing and not Warn Me About It. >:c
 
that's... a really unintuitive thing to do.
 
Xeo
@ThePhD just = delete it
 
I would have said that = default; should mean the generated default constructor, and if for any reason that would be ill-formed, then = default would be ill-formed.
 
user3010322
Question, are iterators meant to be default constructible?
 
4:13 PM
yes
 
depends on what Standard version you refer to, exactly.
 
user3010322
vLatest ?
 
I believe that in <14 and maybe also in 14, but planned to change for 17, is that they have no requirements for constructibility.
(except copy construction, construction from c/r iterator, etc).
 
user3010322
Good enough for me! \o/
 
@Puppy Let's not go quite so far overboard. I'm sure if (for example) we got the "designers" of Ruby and PHP to form a committee and gave them a set of requirements, they could manage to design something (substantially) worse that static_if.
 
4:15 PM
@JerryCoffin Yeah, but they could also probably not convince the Committee to seriously consider it.
 
Hey, if I were sure that if behaved like static_if where possible, I wouldn't be bringing the topic.
 
if can never behave like static_if.
that's the whole problem with static_if.
 
Xeo
I don't quite see the problem with a static if that is properly scoped
 
user3010322
I would like static_if so I don't have to write 2 functions to appease the Tautological Compare warnings.
 
user3010322
Maybe I can just disable the warning specifically.
 
4:17 PM
If the conditional expression is a constant expression, why not making it behave like a static if?
 
user3010322
.... Orrrrr.
 
because static_if has very different scoping rules to regular if, for one.
 
user3010322
I can be a dirty sleevebag.
 
Xeo
@Puppy Does it?
It was just one proposal that presented it like so
 
yes.
 
Xeo
4:17 PM
1 min ago, by Xeo
I don't quite see the problem with a static if that is properly scoped
 
I believe that's how it behaves in D and that's how it was presented to Committee.
if there's some other version of static_if around, I don't know about it.
 
Reading code that uses static if is as fun as reading (lisp-style) macro definitions.
 
frankly
static_if, constexpr and friends are all Inner Platform problems.
I added some constant support in Wide but I'm probably going to take it out.
 
user3010322
WAIT
 
user3010322
Xeo, does VS 2015 have constexpr implicit conversions of type traits to bool?!
 
Xeo
4:21 PM
nope
> operator value_type() const _NOEXCEPT
 
user3010322
q________q
 
user3010322
It was a nice thought.
 
All right, I didn't really mean D's static if to replace if in some cases, as this one seems to put everything in the original scope.
 
ah.
that's how I will solve the sizeof problem- by not going with Inner Platform.
 
I use static_if to impose contracts on const things
I dunno what's supposed to be wrong about it :(
 
user3010322
4:24 PM
I have to write all this like this just to avoid the warnings. .-.
 
user3010322
if ( must_chop_t::value )
	--it;
 
user3010322
Compared to just... doing that.
 
user3010322
What a life.
 
Xeo
@ThePhD Wtf is that even for?
The name is horrible man.
 
ah
 
user3010322
4:25 PM
@Xeo It's in a detail namespace, the naming doesn't matter!
 
and I just remembered that I have a couple of excellent use cases for it even in my own source.
 
You can't avoid the warnings on MSVC because MSVC sucks.
 
user3010322
But it's for when I get C-arrays passed into my functions.
 
user3010322
Well, C-arrays that are strings.
 
Ugh that's... horrible.
 
user3010322
4:27 PM
I assume anything that's been text( "Blah blah" ) is a C-Style array and should have it's null chopped off, since std::end (rightly so) doesn't hide the null pointer.
 
If you take an end iterator, it's not a C string.
Any other policy is fucked up.
 
user3010322
My functions are taking Ranges.
 
user3010322
With the exception that there's a special policy for T* on text functions.
 
Irrelevant.
C strings are char const*, or a special explicit wrapper type, or not at all.
 
user3010322
I have a c_string_view that a person can use, but that still doesn't help me when someone does text_function( "blah" )
 
user3010322
4:31 PM
I either decay to a pointer and then call std::char_traits<T>, or I take the array as if (which means also dealing with the difference between a buffer and a regular c-string array).
 
And you chose to support the wrong option.
 
user3010322
I think it's the right option.
 
user3010322
Decaying to a pointer means forcing the user to pay the std::char_traits::length() penalty.
 
user3010322
As it stands, I think one thing to help prevent real issues is to make it so the chop_null only applies to C-Arrays of type char, wchar_t, char16, and char32_t
 
4:34 PM
Because fucking up their input is so much better.
 
user3010322
C-Array to these kinds of text functions means "string" to me, and that's the default case.
 
user3010322
If someone wants a buffer they'll need to buffer_view( c-array ) it.
 
Or accidentally fuck up.
If you don't support the ambiguous option, it just works.
 
lolwot?
"I'm going to do this, because doing the other thing means a whole one iteration through a very small array!"?
 
UDLs can save you all those keystrokes if you really want it.
You have one ambiguous case and you chose to handle it by defaulting to the destructive option.
Shit. I failed to win that game where I stabbed both my allies before they realized what was happening and joined forces. Now I'm getting my ass kicked.
 
4:42 PM
lol
 
But so close.
 
Oh wow. A game.
 
Xeo
Hm. WTB T stuff { get; private set; } for C++.
 
Maybe they'll accept a draw.
 
0
Q: const correctness when don't be afraid of don't using it

Mr AlmightyI'm doing an application and sometimes I need to pass the reference of an object and I known the benefits of const correctness in order to avoid modifications in an object and to avoid a mess, but sometimes it's really hard to use it because if I pass an object to a method that is const correctne...

 
4:46 PM
By being in this room you agree to the Rules and giving us exclusive and irrevocable license for your soul.
38
 
user3010322
property<T> stuff;
 
I made the main site less crappy
 
@Xeo It doesn't quite work, because you have value category and mutating member function problems.
 
"to your soul"?
No?
 
yes
 
4:47 PM
nah that would be "an" exclusive licence.
 
Xeo
@Puppy ?
 
@Columbo The title alone is giving me an aneurysm.
 
@Xeo Well, what's the value category of obj.stuff?
is it a copy or a const ref or something?
 
@E_net4 You're a twenty-two years old PhD student?
 
user3010322
4:48 PM
decltype( get() ) ?
 
@Columbo Well, yes.
 
@R.MartinhoFernandes So for types that don't ban rvalue assignment (like all C++03 classes), you could actually still do obj.stuff = expr;, it would just do something incredibly surprising.
 
Ah, you mean that.
 
Barring a const obj :v
 
I'd expect cv- and ref-qualifiers on get;
 
4:50 PM
@E_net4 So you started this year?
 
Indeed. :)
 
@LucDanton I think it's probably sane to suggest that whatever you roll with for properties, it should work for non-const objects :P
 
Xeo
@Puppy Should be T const& for outsiders, and T& for the class itself and friends. Basically, it should do what I want :P
 
get const;
 
lol
 
4:51 PM
Calling a const-qualified member works for a non-const object.
 
user3010322
I'm torn.
 
> However as you see, there are some mistakes . Source
 
get const; private get; private set;
 
user3010322
I see the code where people do char s[50] and then just shift the null terminator over into s[20] = '\0'...
 
Time to bring back readonly.
 
user3010322
4:52 PM
But...
 
ignore MAGIC_BUFFER_SIZE cavemen.
 
user3010322
Hnnngh.
 
user3010322
The problem is if I make it do pointer rules, then ANY array gets decayed into a pointer an then is char_trait'd.
 
ignore primitive arrays.
just func(T (&arr)[N]) = delete;.
problem solved.
 
user3010322
:c
 
@Xeo For Wide, I implemented get as just "obj.stuff means this expression here".
 
(using a template parameter instead of char has no impact)
 
@LucDanton Originally, I thought it would be a constness issue, since the array version is not const. But no matter where I add the const, it doesn't seem to make much difference.
 
It’s supposed to be const, yeah. Not sure what’s going on here, I certainly make use of it in my code. Oh right…
 
boy
had I never heard of CreatePrimGlobal when writing this code...
 
5:03 PM
There are several things going on: preferring template to non-template as well.
So I solved it by having the pointer-taking one into a template effectively constrained on char. Fun!
 
lol
 
tl;dr array decay is poison
 
yep
fuck native arrays, that's what I say.
 
user1804599
I wish I were dumb.
 
Xeo
@Puppy "lol" is a non-const array, though :P
 
5:05 PM
I saw the weirdest porn on TV a few days ago
I wasn't really sure what was going on there
everyone was dressed and mimicking sex
 
@Xeo Yeah, but it's full of const chars.
 
if I start my TV at 4AM and see a +18 sign in the corner, I'm at least expecting some real porn
 
or at least, should be.
 
is this what people without internet watch?
 
Xeo
No it's not
not really, anyways
string literals are weird
 
5:07 PM
@Xeo Why
 
@Xeo It is as of C++11.
or maybe they always were in C++03 and C++11 just allowed implementers to remove the conversion to char*.
 
user3010322
.... It's happened.
 
> An ordinary string literal has type “array of n const char” and static storage duration (3.7), where n is the size of the string as defined below, and is initialized with the given characters.
From the C++03 draft.
 
It’s always been an array full of const chars, which is the same as a const array.
 
user3010322
5:08 PM
char32_t and char16_t are in
 
user3010322
I can throw out my uint16_t defines! \o/
 
user3010322
Conformance feels SO GOOD.
 
gotta cook a Bitchload™ of pasta
 
TIL you can have constexpr classes.
wat
 
user1804599
5:33 PM
Ok.
 
user1804599
React seems nice.
 
user1804599
No DOM shit.
 
eh
React is nice, but I've worked with it at work and it can be super annoying.
you often find that React doesn't update properly
 
You mean it doesn't... react? ;)
I'll let myself out.
 
kek
 
5:39 PM
I find Lawrence Oates' last words endlessly fascinating.
 
5:49 PM
> I am just going outside and may be some time.
 
my food
where is it, I want my food
one hour my ass
 
I ate it.
 
I hope you get fat
 
Your spaghetti? I thought you didn't like it either.
 
5:52 PM
A single core 64bit CPU processes maximum of 64bit of data per cycle? e.g 8 bytes?
 
user3010322
So.
 
user3010322
I can't handle the /W4
 
user3010322
It's too strong for me.
 
user3010322
Warning, unreachable code...
 
user3010322
...Well, yes.
 
user3010322
5:54 PM
That's the point.
 
user3010322
It should never be reached ever.
 
user3010322
But you'll also complain fi I don't have the return there, VC++.
 
user3010322
So what would you like me to do, hm, compiler?
 
Xeo
using stuff = struct { ... };
ehehehe
 
@Xeo Why would you ever use that? lol
(Apart from possibly screwing around with name lookup and stuff)
(Because typedef-names might be treated differently somewhere)
 
Xeo
6:02 PM
Because you can!
Left-to-right decl and stuff
 
@Xeo Don't superimpose such idiomatic BS to C++ :(
 
@Xeo is typedef obsolete now that we have this?
 
Wait, what does superimpose even mean
@Borgleader Pretty much.
 
Xeo
@Borgleader yes.
 
using has the same semantics and is nicer to read. But its consistent with alias templates which cant use typedef
 
user3010322
6:03 PM
....
 
user3010322
while ( true )
 
user3010322
WARNING: CONDITIONAL EXPRESSION CONSTANT
 
user3010322
Oh, oh GEE VC++
 
Xeo
for (;;)
 
user3010322
I WONDER WHY.
 
6:04 PM
@Xeo that
 
user3010322
.-.
 
define ever (;;)
You know the rest
 
user3010322
for(;_;) // for all my tears
 
@Xeo Do you know when Clang will finally support fold-expressions
I can't wait no longer
 
Xeo
> finally
jesus, that thing was proposed what, a month ago?
 
6:05 PM
@Columbo what are those?
 
@Borgleader Rightfold is basically invading the C++ programming language.
 
@Columbo so youre saying the next standard will never be finished?
 
@Borgleader ... what are you implying
 
user3010322
This has to be so dumb.
 
user3010322
Even for all my miniature structs, VC++ warns me that I don't define all the operators and constructors explicitly.
 
user3010322
6:09 PM
Like the dumb data holders and everything.
 
user3010322
You have to be kidding me.
 
user3010322
I can't do this. Warning Level 4 is insane.
 
@ThePhD Some warning levels just want to watch the world burn
 
WARNING! You're programming!
 
I made a browser in C++. Am I one of you guys now?
5
 
6:11 PM
@corvid Cool! Is it open source?
 
it's not even on source control, because it's the worst thing ever!
 
food is here, finally
it doesn't look bad, hmm
 
Oh.
 
@corvid yes, you're part of the guild of browser developers
 
French fries? People still eat those?
 
6:13 PM
Yes?
 
Watch out, I might pick one of those french fries while you're not looking. :P
 
Apparently morning stars were possibly used for crushing very small Miley Cyrusi.
 
user1804599
@AlexM. You also like McDonald's.
 
Now let's see, are 300k seconds of a medical appointment reasonable?
 
@AlexM. lol at that tiny bit of salad
 
6:19 PM
@corvid we don't have Murican Fries in Europe
 
why aren't they coated in sugar, like in America?
 
@StackedCrooked decorative, probably
also an opportunity to go full LRiO
@corvid they're chips
 
@corvid Because Lord Diabeetus has banished all sugar-coated chips from Europe.
 
@corvid lol what
 
6:27 PM
O wow.
 
the chicken was great but the beef not so much
meh
 
Seriously fries with sugar what the fuck
That's on the level of people eating butter straight
 
@Borgleader kit kat lasagna
that's new
 
Is it true, though?
 
user3010322
> fatal error C1001: An internal error has occurred in the compiler.
 
user3010322
6:36 PM
@Xeo It happened. =/
 
Xeo
haha
 
user3010322
Even after I fixed all the Warning Level 4 errors.
 
user3010322
Even after I cleaned up my code as much as possible.
 
user3010322
... This is what I get. :(
 
I'm starting to support the rumor behind Microsoft employees smoking something funny.
 
user3010322
6:38 PM
It's not even at something crazy.
 
user3010322
There's like, 1 template parameter involved. Not even.
 
user3010322
THexAxial neighbor( HexDirection direction ) const {
	const auto& entry = Neighbors[ static_cast<std::ptrdiff_t>( direction ) ];
	return THexAxial<T>( *this + entry ); // here, of all places!
}
 
user3010322
Thankfully, the engine itself compiles without a hitch, so I guess that's nice.
 
@ThePhD those tabs, my eyes!
Thanks a lot I'm blind now.
 
@StackedCrooked The goggles do nothing!
 
6:42 PM
The goggles didn't work.
 
They often don't change the indentation in code.
 
user3010322
Xeo, I trusted you. :(
 
user3010322
I upgraded my project and believed. I BELIEVED.
 
@ThePhD He made you of all people believe in VS?
 
6:46 PM
I have built my new PC
 
@Rapptz \o/
 
Fans so quiet.
 
user3010322
Kinky.
 
For my next PC I wanna go with water cooling.
 
user3010322
It's a really big hassle to do water cooling.
 
user3010322
6:48 PM
And you'll still need fans.
 
user3010322
Lots of them.
 
its gotten a lot easier with CLCs. Hell some GPUs now ship with water cooling stuff out of the box
 
chlorololocarbons?
 
user3010322
Oh, that's right.
 
user3010322
I shouldn't need a copy-step for my Natvis Visualizers anymore.
 
user3010322
6:59 PM
VS 2015 is supposed to just pick them up in-project now.
 
that's a nice feature
 
user3010322
Yeah, so you can have multiple of the same kind of projects with incompatible natvis' without having to throw them in the folder and clobber each one with your Special Snowflake Debug Visualizer™
 
user1804599
7:30 PM
You're all scum.
 
Sourceforge is so bad
 
user3010322
o.0
 
user3010322
Why does it have a cloudfront security certificate?
 
7:45 PM
Guess they switched to serving everything with CF
Grr I need a fucking file and everything's offline
 
@CatPlusPlus hehe you are annoyed
 
@rightføld more like mildly interesting
 
user1804599
8:05 PM
You're just jealous because you don't have a tractor beam.
 
user1804599
> Maglev (derived from magnetic levitation) is a method of transportation that uses magnetic levitation
 
@rightføld envious not jealous (TIL from Homer)
 
8:32 PM
oh man, people started noticing that the graphics quality in the latest witcher 3 trailer is sometimes much lower than in the E3 trailers
inb4 shitstorm
 
surprise surprise
 
hmmm fuck
apparently, there is a clause in my rental contract that says I can't change the meter.
I didn't realize that was even legal.
 
@CatPlusPlus What, them packaging adware with popular projects wasn't enough for you?
 
user1804599
Maybe it also says you have to wear a dress.
 
user1804599
:D
 
8:42 PM
ah
apparently it's unenforcable
 
@EtiennedeMartel Oh I was convinced way before that
 
Ell
Are you trying to cheat on your water bills? :P
 
user1804599
Who needs water? Silly humans.
 
Ell
lobsters need it more than humans
 
no, I have a prepayment power meter and I'm trying to get rid of it
 
Ell
8:44 PM
well I guess you're stuck if it's in the contract :S
 
@rightføld lobsters need water too
 
user1804599
shush
 
user1804599
> Programming is terrible—Lessons learned from a life wasted.
 
cock lobster
lol puppy thinks it's legal to change the water meter on a house you don't own?
you can pay any supplier you like son but you can't go fundamentally altering the property
get a mortgage innit
tenants like teh pup are why i will never let out my place
 
Ell
you don't let out the place you live in silly
 
8:51 PM
another good reason
there are several
 
Ell
Somebody. I just had what I think is a good project idea
that oughtn't be too hard
3d graphviz viewer
I think it's a good idea
 
user1804599
What would you use that for?
 
Ell
for viewing non-planar graphs
 
user1804599
I thought GraphViz only outputs 2D diagrams.
 

« first day (1513 days earlier)      last day (3436 days later) »