« first day (1245 days earlier)      last day (3707 days later) » 

user1804599
10:06 PM
Dude …
 
user1804599
Stop doing such silly things.
 
I don't know why I always look for JSON libraries
they all end up being shit anyway
 
user1804599
JSON and static typing is meh.
 
zomg.. I hope I'm not correct on this one
any language-lawyers present?
 
no
 
10:16 PM
aw well, I'll rant about this anyhow
According to [temp.res]/8: "If every valid specialization of a variadic template requires an empty template parameter pack, the template definition is ill-formed, no diagnostic required."
this means that having struct Obj { Obj (int); }; and template<class... Args> void foo (Args... args) { Obj x (0, args...); } is ill-formed (if I interpet it correctly)
 
user1804599
@FilipRoséen If there are no valid specialisations, all valid specialisations require an empty template parameter pack. :O
 
as well as this being ill-formed -> struct A { A () = default; } ... template<class T> struct Factory { template<class... Ts> void func (Ts... ts) { T x (ts...); } }; if one instantiates Factory<A>
no Factory<A>::func can be instantiated other than that taking an empty variadic parameter list
scary? well, if that is the case.. erhm, the standard forces std::vector's emplace to be conditionally compiled in (and I'm not even sure if the standard allows that.. but maybe as a result of the as-is rule), and that isn't the case for any implementation I've seen
ie. we are doomed, we will all die in agony.. etc etc
 
user1804599
If you use C++ you are doomed regardless of this being in the standard or not.
 
but then again.. a type in std::vector must be CopyConstructible, which saves us from that particular case I guess
@rightfold sure
 
It can be move-constructible
 
10:23 PM
@CatPlusPlus doesn't really change the circumstances in this case
 
@FilipRoséen No
Well, it won't compile when pack is expanded, but that's kinda obvious
No different than trying to call a function with more arguments than it takes
 
@CatPlusPlus mhm, but the standard says that such a template is ill-formed, not just that it's ill-formed when trying to instantiate such thing
 
@FilipRoséen This is not "every valid specialisation" either
 
@CatPlusPlus it isn't?
 
Xeo
the scary part of the standard here is 'no diagnostics required'
 
10:26 PM
It's most likely some obscure corner case that's impossible to actually detect
 
template<typename T> struct Factory { template<typename... Ts> void func (Ts... ts) { T x (ts...); } };
instantiate that Factory with a T that is only default-constructible, the only valid specialization of func is an empty parameter pack
 
1 min ago, by Filip Roséen
@CatPlusPlus mhm, but the standard says that such a template is ill-formed, not just that it's ill-formed when trying to instantiate such thing
You can't have it both ways
 
@CatPlusPlus certainly not, but doesn't an ill-formed template result in the entire source being ill-formed?
 
Also it says "every valid specialisation", not "only valid specialisation", so I doubt it applies anyway
1 min ago, by Cat Plus Plus
It's most likely some obscure corner case that's impossible to actually detect
 
Meh. I've dropped more legendaries in 2 hours of the new Diablo than all of my previous play time combined =_= not sure if happy or disgusted
 
10:29 PM
@CatPlusPlus it's probably written the way it is to ease up for implementors, surely (since analysing every possible template specialization that could be valid would be a tedious task). doesn't change anything though..
@CatPlusPlus how does that make a difference in this scenario?
 
Also "Note: If a template is instantiated, errors will be diagnosed according to the other rules in this Standard. Exactly when these errors are diagnosed is a quality of implementation issue"
I've used up my yearly quota of thinking about C++
 
@CatPlusPlus well.. it doesn't say that the template must be instantiated for it to be ill-formed
 
0
Q: Does it make sense to use sidekiq with unicorn?

user3401124How do they work together? Do we still need to write thread-safe code? If we have an application what already uses sidekiq and unicorn together, will it make sense to migrate to puma? Or start using resque?

Fucking stupid names
 
Ruby hipsters
Wait that's redundant
 
> will it make sense to migrate to puma
> mfw
I don't even
 
10:34 PM
> Do we still need to write thread-safe code?
ruby.txt
 
@CatPlusPlus I mean, the usage of std::vector<T> vec; vec.emplace_back (); isn't exactly uncommon
 
Or maybe programmers.txt
@FilipRoséen Who cares, if it compiles, it's fine
 
> resque
cringe.avi
 
@CatPlusPlus we are language-lawyering here, how implementations compiles things are not important, what is important is the standard
 
UB notwithstanding
Fuck the standard
 
10:36 PM
I guess I should take this discussion in [std-discussion], and maybe even write a DR on the matter
 
> Sony Computer Entertainment Canada has confirmed to the Toronto Sun that the price of PlayStation 4 will go up from $399.99 to $449.99. The DualShock 4 and PlayStation Camera each cost $59.99 now, but will soon cost $64.99. All price changes go into effect as of Saturday, March 15th.
why :(
 
@Borgleader because money
 
@Borgleader if soneone just handed me an extra $50 for something I've already made I'd be happy, wouldn't you? that's why.
 
Demand goes up, Price goes up.
Demand goes down, price goes down.
 
10:44 PM
@Borgleader taking advantage of console hype
 
@barlop That would mean demand is way higher in Canada than anywhere else.
Which I find doubtful
 
@StackedCrooked no, long() is a constant-expression and the compiler can prove that static_cast<long> (0) can fit in an int
 
@FilipRoséen ah, you are well-informed :)
I totally did not think of that.
 
the keyword there is narrowing
int main()
{
    constexpr long l = 1;
    int i { l };
}
will also work
 
10:48 PM
Shouldn't it be an error instead of a warning?
 
that's initializer lists IIRC
 
no
 
hmm.. the standard has an example of int x2 { 2.0 }; being ill-formed
 
that's according to the first bullet in 8.5.4/7
 
user3010322
That's explicitly a double.
 
10:50 PM
as well as int i = 999; char c1 { i }; // error: might narrow
@ThePhD let me finish!
 
user3010322
u.u
 
user3010322
Sorry.
 
@FilipRoséen That's not the first bullet though
 
[dcl.init.list]p7
 
(not that it matters)
 
10:51 PM
@AndyProwl I should write everything in a single message to prevent stuff like this from happening
 
@FilipRoséen What was your old username?
 
lol
 
refp
 
oright
 
A narrowing conversion is an implicit conversion.. from an integer type.. to an integer type that cannot represent all the values of the original type, except where the source is a constant expression whose value after integral promotions will fit into the target type.
In the case of long l = 1; int i { l }; the compiler can actually prove that 1 will fit inside i, but according to the error it should error
@StackedCrooked coliru.stacked-crooked.com/a/f107daa291c52e85 <- clang shows the correct behavior. ie. it's a bug in gcc
 
10:53 PM
i see
 
I'm still intriged by what I wrote about empty parameter packs earlier on (and templates being ill-formed if that is the only valid specialization). maybe I should write an SO question to gather further information on the matter
 
I didn't read what you said
can you give a tl;dr
 
chrono is a fascinating library
e.g. std::duration<long, std::milli> * 1.0 creates an std::duration<double, std::milli>
 
it's using std::common_type
 
10:56 PM
@Rapptz [temp.res]/8: "If every valid specialization of a variadic template requires an empty template parameter pack, the template definition is ill-formed, no diagnostic required." that means that in template<typename T> struct F { template<typename... Args> void func (Args... args) { T x (args...); }};, F<T>::func is ill-formed if F is constructed with a T that is only default-constructible
 
^^ Well that's a shame... :(
 
@Rapptz and with that the entire application is ill-formed
 
@Mysticial due to the tone of his post it's basically self-defeating behavior
 
I feel like you're misreading
 
10:59 PM
No refp
or maybe I am, iunno
 
@Rapptz hmm, please elaborate?
 
where is F being constructed there?
 
@Rapptz it hasn't been constructed yet, but let's do this; struct Obj { Obj () = default; }; and then F<Obj> x;
F<Obj>::func is ill-formed since the only valid specialization would require an empty parameter pack
 
I don't think that's illformed.
a parameter pack can be empty
?_?
it'd be illformed if you did F<Obj>::func(0, 10, 11, 12); but that's pretty obvious is it not?
 
@Rapptz yes, a template parameter pack can be empty, but if it's the only valid specialization the entire template is ill-formed according to [temp.res]/8
see why it's a scary section of the standard?
 
11:06 PM
The Standard is just one big scary section
 
@AndyProwl that's true.. but some parts are scarier than others
 
meh
fuckers
 
@FilipRoséen granted
 
that paragraph is the only one that uses "valid specializations"
they don't even specify which kind
 
@Rapptz mhm, and I've been looking hard for any rule that might shed some different light on it
@Rapptz that's true though.. that's actually very very true, the "which kind"
@Rapptz if a valid specialization of the func is template<typename T> template<> F<T>::func<> () { } then we are all good
since it doesn't say; "valid instantiation"
maybe that is the key here
 
11:10 PM
IIRC specialization and instantiation are kind of synonymous for that matter
 
but at the same time that specialization above sure.. implicitly has an empty variadic parameter pack
 
lol
 
need to rush to my gf, but this sure is an interesting matter
 
need std::lexical_cast<T>
 
@Rapptz please PING me if you come to any further realization, or write me on freenode (edoceo``) or efnet` -> mtpd
erhm.. it's supposed to be edoceo with a single `
edoceo`
^ there we go
 
11:14 PM
@BenjaminGruenbaum you mean the buffering pipes? Yeah, closing would help. Unless you wanted to continue communicating on the same pipe obviously
 
people still use IRC?
 
stupid ticks..
@Rapptz I never claimed to be "people"
 
> A specialization is a class, function, or class member that is either instantiated or explicitly specialized (14.7.3)
 
> I'm not a programmer - how do you tell something to read from a .penis file?
 
@Mysticial again... +13079 WTF ?!
 
11:17 PM
@sehe yeah, actually ran that code and it worked - he just had a lot of descriptors laying around
@Rapptz I do all the time, there are several good channels on IRC
 
@FilipRoséen Ooooooh.
:D
 
lol, gcc allows you to do this: enum class { a }; // a can never be accessed
 
Why can't people just use similar nicks everywhere :D
@StackedCrooked Sounds useful...
 
Yeah, for security purposes ^^
 
more like, for privacy purposes
 
11:22 PM
as in, the purposes of my privates.
sorry, that just came to mind.
 
why do I always feel uncomfortable when I include ~10 files
:(
 
there are a few Wide files with like, 30 includes.
by the way
have you guys ever come across two headers that are mutually exclusive, i.e. cannot both be included in the same TU?
 
nop
 
I was thinking that instead of creating a new translation unit for every header, maybe I could just put all the headers in the same translation unit.
 
you mean a precompiled header?
 
11:26 PM
not exactly, but it might have the same effect.
 
@Borgleader the department setting the price think demand is high enough that they can get that price. so, the marketting people in canada are making a different estimate of the demand. i'm sure in america they debated the price too so there is that subjective aspect to what price to set.
 
the problem that I'm looking at is that the Wide model of including C++ headers is pretty wasteful
if you have foo.h which includes vector and bar.h that also includes vector, then when you include foo.h and bar.h, you get vector included twice.
and Clang can't share data between translation units even if they're both in memory at the same time, which makes life messy.
so I was thinking that instead, I'd just change some kind of aggregate TU to include each header you request.
 
user3010322
What if bar.h defines SIMULATE_VARIADICS and is basically completely different code from foo.h's vector?
 
then you have an ODR violation, which is UB by Standard.
in other words, tough.
anyways, I could always offer two different inclusion models if the difference ever became important to anyone.
now I just need to figure out how to communicate that desire to Clang...
 
11:45 PM
Amazing/ So much ... miss conception
 
@sehe Yeah - condom, hopefully.
 
@sehe Not sure if trustworthy gf, or idiot bf.
 
@Borgleader well you should be sure
 
@Borgleader lol. A lot to learn then
http://t.co/j29tzkacHs
^ I better get started
 
@sehe Well I'm pretty sure she's lying but I try not to be cynical
 
11:51 PM
@Borgleader The crux is that all that is irrelevant
The irresponsibleness just is dripping from it. Directly, indirectly and meta.
So the real lesson is that when people are convincing you to accept "X", don't forget to form your own opinion and look for what the other party is not discussing
And DON'T FRACKING USE FACE PALM BOOK
@Borgleader inb4 Sony files for bankruptcy (because it's too early for April fool's)
 
@sehe heh, i doubt it, i heard they sold 6M of them already
 
The price increase is pretty steep and doesn't seem to conform to the market
 

« first day (1245 days earlier)      last day (3707 days later) »