« first day (2172 days earlier)      last day (2769 days later) » 

Ven
10:00 AM
@Griwes Nope. Conversions are not allowed in non-type template arguments
 
@Ven Give me a second.
 
Ven
That's why you need template<int * = nullptr>, not template<int * = 0>.
However GCC is buggy and doesn't apply this rule.
 
@Ven Yup
 
// Example 1
template <int N> struct X {};

template <typename T, T n>
void f(int (&a)[n], T);

// Example 2
template <auto n>
void g(int (&a)[n]);

int main()
{
   int arr[1];
   f(arr, 1);
   g(arr);
}
 
Ven
10:04 AM
@Griwes you're not on discord mate
 
Ven
4 spaces or riot
 
@Ven I thought markdown works. :P
And the polls:
> Should we break f(arr, 1)? 0 | 2 | 5 | 11 | 0
Should we break g(arr)? 0 | 0 | | |
Should we break neither? 5 | 10 | 3 | 0 | 0
So I assume that CWG proceeded to change the proposal to make both work, which means... it works. :P
 
What's T deduced as in f?
I can see two different ways of making it work.
Make it int and convert n, or make it size_t and convert the 1.
I don't think any is better.
 
Thank you guys, working now =)
 
10:07 AM
@Ven I think that only applies(d?) to deduction. Conversions have always been allowed.
@Ven Also, that explanation makes no sense. int* = nullptr has a conversion.
The type of nullptr is std::nullptr_t, not int*.
@Ven The compiler that rejects one and not the other is the buggy one, not the one that accepts both.
 
@R.MartinhoFernandes I... don't know. :P
I know I voted for both being valid in the straw polls.
 
I guess making it int is slightly better.
Conversions are less likely to be a problem with n than with the 1.
But that's not applicable to the general case (i.e. replace int(&)[N] with std::integral_constant<std::size_t, N>).
(Or replace integral_constant with template <size_t> struct unknown;)
@Griwes The more I think about this, the less happy with it I am.
@Griwes I would vote for breaking f.
Well, it should be already broken, no?
If it works, it's too late already.
 
> MichaelS: having two conflicting types not coming from array bounds should not be ok.
> John: "type is only deduced from an array bound if it's not otherwise deduced"
> John: 14.8.2.5p2 has wording for conflicting deductions; put the wording for lower-priority array bounds there.
Alright, so it's a special case for array bounds really.
 
Ah, that's ok (as far as special-casing shit is ok), then.
 
@Ven You were right, it'd only apply if it was a C array, not std::array.
 
10:16 AM
I thought the call to f would not compile
I thought it would be impossible to deduce T
cause from the first argument you'd have std::size_t and from the second argument you'd have int
 
@AndyProwl It does, but it fails for std::integral_constant<std::size_t, N> (or anything other than an array)
@Griwes The special case already existed anyway, AFAICT.
 
Xeo
@AndyProwl What's the type of an array's size? :P
 
Ven
@Griwes \o/
 
Xeo
(as in, does the standard actually define that?)
 
@Xeo isn't that std::size_t?
 
10:19 AM
@AndyProwl It is, but C++17 now says: "The type of a type parameter is only deduced from an array bound if it is not otherwise deduced.".
No idea what exact rule made this work before.
Probably some other rule changed by P0127R2. :P
 
Yeah but it compiles also with -std=c++14
both on Clang and GCC
and int is deduced
 
I'm not even going to try to figure out which rule that was exactly.
 
@AndyProwl :S
 
Go ask someone who has enough mental health to sit in CWG sessions.
 
10:21 AM
I don't understand
the size parameter is of type std::size_t, no?
 
Not sure I like this.
Well, I definitely don't like it. Just not sure how bad it actually is.
 
You are not sure how bad what is, the fact it doesn't compile?
 
You're not talking to me now Robot are you?
 
can someone explain what kotlin's flatmap does?
I kinda get it... but my brain is having a serious fart about it
 
user1804599
haha
 
10:25 AM
@thecoshman it's Haskell's mbind
hope that helps
 
@Griwes It compiles. The compilation failure is just the "compile-time printf" (struct{}_=)
 
@Griwes not at all :P
 
user1804599
Somebody founded a new political party yesterday, and everyone in the Pirate Party administration left the PP and joined that new party.
 
@R.MartinhoFernandes Ah. Right.
 
I.e. the detect type is well-formed.
 
10:26 AM
is it basically iterating a collection, doing something to each thing and spitting out a new collection?
 
user1804599
RIP PP
 
@thecoshman It takes a function that takes an element and returns a list of other things.
Then applies the function to every element, which gives you basically list<list<R>>.
Then it flattens the list, giving you list<R>.
a.k.a. monadic bind
 
I think I get it :S
 
10:29 AM
so... if I do someCollection.flatMap { it... } the it will be each element in the collection?
and I'm expected to return a list in from the lambda?
 
You're expected to return a list from the callback to flatmap, yes.
 
oh I get how this works...
 
user1804599
@thecoshman yes
 
That's how monadic bind works: M a -> (a -> M b) -> M b.
 
user1804599
10:30 AM
flatMap on lists is map followed by flattening
 
I was getting confused by the 'get' in val Class.fnName: ReturnType get(){ ... }
 
I wonder if this can be (ab)used for something.
 
user1804599
flatMap is also known as bind and >>=
 
I was trying to call that as a function, buy sugar makes you able to read from it like a public variable
 
@R.MartinhoFernandes This one is kinda expected though, right?
 
10:31 AM
I still fail to understand why the original call to f() is not ambiguous
 
@Griwes Yeah.
 
@AndyProwl Ping Richard Smith and ask him. :D
 
@AndyProwl Array bounds don't have a "type". They're magic.
 
I see
Thanks
 
@R.MartinhoFernandes Ah, so the special case existed before?
 
10:33 AM
I thought they were size_t
 
Just was far more magical than it is now?
 
Xeo
15 mins ago, by Xeo
@AndyProwl What's the type of an array's size? :P
 
@Griwes All my experiments suggest so.
 
Alright.
 
user1804599
auto
 
10:33 AM
I'm not gonna try language-lawyer on this.
 
Didn't check the standards, but implementations agree on it.
 
@Xeo Yeah, well, I gave an answer but no further reaction. What am I to deduce?
 
I'm pretty sure the wording for that is insane.
 
So far, I'm really liking what I am seeing in Kotlin
 
user1804599
@AndyProwl the type
 
10:34 AM
And probably sits in chapter 14, so... eh.
 
@rightfold That's apparently impossible
 
user1804599
@thecoshman I see you finally ketchup with new technology!
 
Coliru's clang and gcc don't have support for template<auto> :(
 
Trunk clang and gcc don't have support for template<auto> either.
:P
 
we have template<auto> already?
nice
 
10:35 AM
At least that's what their C++ status pages say.
 
@rightfold oh I knew about it for a while, since @fredoverflow was using it for something. But I never really looked into it too much
 
@AndyProwl Voted into the standard in Oulu.
 
Xeo
@R.MartinhoFernandes I wonder if the type changes depending on the value there too.
 
@AndyProwl I guess that technically they do have a type, but that's overlooked when deducing templates.
 
user1804599
I wish Kotlin had HKT.
 
10:36 AM
Before it was impossible to observe that type (so "has no type" was a good model), but with template<auto> you can (so "has no type" is a slightly flawed model).
 
> If the constant-expression ([expr.const]) is present, it shall be a converted constant expression of type std::size_t and its value shall be greater than zero
 
doesn't this mean the size has type std::size_t?
 
No.
It means the expression you put there will.
 
10:38 AM
@AndyProwl My snippet above could give you uintmax_t without breaking that rule.
 
@rightfold Hong Kong Time?
@AndyProwl lol
 
@Griwes Huge Knob Types
 
user1804599
@Xeo lol a stack overflow
 
user1804599
@Griwes Higher-kinded types
 
@Griwes what should I deduce from the lolling
inb4 the type
 
10:40 AM
@Xeo ahahahahhah
 
whew just realized
 
Brexit -> no CETA for us
this is the only time I have ever felt relieved over Brexit.
 
@Puppy only if you actually leave before it's signed, right
 
10:40 AM
@Puppy No anything else either, though.
 
user1804599
wtb nexit
 
@Griwes I assume leaving would leave all agreements made by the EU.
 
@R.MartinhoFernandes Well, they'd get CETA for a moment. :P
 
The EU negotiates trade deals as a bloc, not as bunch of individual identical deals.
 
hmm... canny do list.maxBy{ it.maxBy{ ... }} poo
 
user1804599
10:42 AM
Higher-order functions are magic.
 
huh... have to flatMap first...
 
So technically, the other parties doesn't know who they're actually signing with, since the membership is fluid (only + before, but - as well now, er, I mean in 20 years)
 
@AndyProwl There's a lot of cans of worms there. The new wording is much better and frankly I'd argue that it should be applied retroactively. :P
 
@Puppy CETA?
 
@thecoshman Trade deal with Canada.
 
10:43 AM
it's a trade deal with Canada
one of the many incredibly dumb things involved is that investors can sue the state for loss of profits when new legislation is brought in
 
@R.MartinhoFernandes afaik, yes. The deals are for EU, not all the countries individually... except for those that are
 
@Griwes I trust you. Diving back into Standardese gives me the creeps already
 
user1804599
@Puppy sounds like TTIP
 
user1804599
PETA lol
 
@Puppy Is that true?
 
10:48 AM
@R.MartinhoFernandes I'm sure there is a grain of it somewhere
 
I hear a lot of shit from activist groups, but I always dismiss it as propaganda, not as fact-checked claims.
 
I can believe it
 
@thecoshman Yes, but that doesn't mean anything.
If the grain is "investors can sue states for other reasons that actually make sense", there is a grain of truth there, but it's still a lie.
 
@R.MartinhoFernandes In the world of politics, that's perfect :P
 
user1804599
TTIP being secretly negotiated is enough reason to dismiss it as utterly evil. Is CETA negotiations public and fully transparent?
 
10:51 AM
yeah, I don't see how anything can really be allowed to come into power secretly
 
For example, I can't seem to find anything here that would enable sue for profit loss: trade.ec.europa.eu/doclib/docs/2014/september/tradoc_152806.pdf
 
I'm sure there are some valid reasons... but they should be few and far between
 
(AFAIK the relevant article is 8.10)
But activist groups never actually link to sources, so.
 
Yeah. That's my primary problem with these things.
 
user1804599
@thecoshman Live stream or GTFO
 
10:52 AM
I think it's hypocritical to criticise some party for being intransparent when you make claims without linking to any reasonable sources. Or to any sources at all, actually.
 
Like, "this is bad and was secretly negotiated" - ...alright, please tell me what exactly is so bad with links, linking to the source...
 
@rightfold perfect!
 
@rightfold Negotiations? I don't see why they should be public. The actual agreement text is the only thing that matters.
 
actually, I think the UK house of commons is publicly streamed most/all of the time
 
That's not where negotiations happen, I think.
 
10:54 AM
@R.MartinhoFernandes but it's nice to know what concessions were made, which asshole shut down the reasonable parts and pushed the horrible parts,...
@R.MartinhoFernandes those happen in committees
 
If you're not linking to anything when you accuse someone of being evil and intransparent when the agreement text is available on public official sites, you're 1) fearmongering and 2) slandering.
 
user1804599
@thecoshman In NL you can attend IRL. There's a visitors' balkony.
 
user1804599
The rules are pretty much: shut up.
 
@rightfold NL => Netherlands.... but IRL?
 
...in real life
 
user1804599
10:56 AM
@R.MartinhoFernandes Because if they say stupid things then the people know who to democratically remove.
 
The UK house of commons has that too, but I think it's so busy as to be useless
oh yeah... IRL :S
 
user1804599
Politicians should live in constant fear of being removed.
 
user1804599
Only then they will choose to not fuck up.
 
@R.MartinhoFernandes that talk can be private, but what is being discussed should be public. The public should be able to voice opinion before the agreement is 'done'
 
No, in such a case they will only make popular decisions.
 
10:57 AM
@rightfold that ends up with them continuously campaigning
 
Popular decisions are often not the right decisions.
 
instead of governing
 
The "500+" thing we have in Poland is quite popular.
 
@rightfold but they need the ability to make long term decisions
 
It's also murdering the economy in the long run, so...
 
10:58 AM
@thecoshman Then all the activists claiming it's "intransparent and secret and evil" should shut the fuck up until they publish the agreements.
 
people like the short terms too much to appreciate the long term gains that could be had
 
@R.MartinhoFernandes the working drafts should be public too... I don't know if this is or not, I'm just saying it should be
 
@thecoshman Sounds like you want to live in ancient Greece.
Also "the public" usually has no clue about the topics being negotiated.
 
@Griwes ... yes, yes I do
wait... do togas come in black?
 
@thecoshman No, they shouldn't. Those are part of the negotiations.
 
10:59 AM
@Griwes opinions don't have to be acted on, just heard
 
@thecoshman Any justification you can come up with to keep the negotiations private will effectively justify private drafts.
@rightfold They fuck up all the time out of fear of being removed. That's how populist measures get passed.
Fear of being removed is a selfish motivator. I don't think selfish motivators are good for politics.
 
Ven
Kinda sick of hearing people who ask me if I've seen Stranger Things and Mr Robot tell me they don't have time to invest in their career.
Rarely do I get to read comments that stupid.
 
@thecoshman ...that... makes no sense.
It makes no sense to hear an opinion if you have no intention to act upon it.
 
@thecoshman Use your microphone.
 
@thecoshman Do you know what that'd bring?
Someone accidentally fucks something up and it ends up in a draft.
Then someone notices that and everyone agrees it was wrong and someone fixes it.
 
11:06 AM
@Griwes And they blow a deal with someone else because of it!
 
But it's forever in circulation.
 
@Griwes Meanwhile in activist land... MORE FEARMONGERING!
 
It's quoted forever on pro-Trump sites as a reason why it's wrong.
Nopenopenopenopenope.
Especially since people reading that will have no clue whatsoever that it was just in a draft.
(And they also will have no idea what's going on at all, because they're not lawyers.)
 
and constant flamewars about little details with misinformation abound
 
Yes.
 
11:08 AM
So anyway, maybe I'm reading wrong, but AFAIK CETA doesn't give investors the power to sue states over profit loss. The burden of proof is on whoever claims so, and they never take it on.
 
@thecoshman also, do you know any political party that does public drafting of bills they want to propose?
Are those bills inherently bad and evil because they were drafted in private and only presented when finished?
Is there any difference between those two situations whatsoever?
I don't see any.
cc @rightfold
 
@Ven how so? It's a bit black and white but there's clearly a point to be had
 
Ven
@sehe because we know human beings aren't able to work 24/7. That's like saying:
 
Yup. That doesn't make the "investment" in TV time a good one
 
Ven
"Kinda sick of hearing people who tell me they've slept well last night when they don't invest in their career"
@sehe yes investing time in "entertainment" is important
 
11:18 AM
Yes, no doubt. I have already given my more weighed response. No need to rehash.
 
Ven
The fact you think TV is stupid doesn't make it less "entertaining" to people
 
Strawmen all around.
Perhaps you didn't mean "you think" that way.
I can't help it you're mad about something someone said. I just think it has some merit. Don't put other things in my mouth. I'm not burning anyone's television set or getting them fired.
 
Ven
6 mins ago, by sehe
Yup. That doesn't make the "investment" in TV time a good one
You either mean a book (i.e.) would be a better investment, or you mean "having fun" isn't really necessary, or I don't understand that sentence
 
I said literally what I meant. /That ["human beings aren't able to work 24/7"] doesn't make the investment in TV time a good one./
I don't say the investment in TV time can't be a good one. I just said /that/ doesn't make it so.
 
11:38 AM
Wow heated debate
Tried to work a bit yesterday with the GF watching TV on the side
Impossible to concentrate
 
Which is why my workstation is in the other room. There's no physical division, so sometimes I do ask to lower the volume (or play my own music softly)
 
Yeah but I have no space for that :(
 
I'd invest in comfortable head phones then. Or (also a well-tested method by Me(TM)) make sure you work after gf goes to bed.
This may or may not be appreciated by the so
 
Sure and I wake up very early so I am actually the one going to bed early
 
Ven
@Rerito it's not headed
I miscomprehended what sehe was saying and replied to a non-argument
 
11:57 AM
@Rerito That would work
 
I meant I cannot work while she's asleep
But I'll try more often in the evening
 
@R.MartinhoFernandes no just about anything else though, ISDS is a joke and should be banned
 
12:13 PM
I like the quote on the wikipedia page:
> If you wanted to convince the public that international trade agreements are a way to let multinational companies get rich at the expense of ordinary people, this is what you would do: give foreign firms a special right to apply to a secretive tribunal of highly paid corporate lawyers for compensation whenever a government passes a law to, say, discourage smoking, protect the environment or prevent a nuclear catastrophe. Yet that is precisely what thousands of trade and investment treaties over the past half century have done, through a process known as 'investor-state dispute settlement'
 
OpenSSL is so full of holes even patches have holes
 
@Xeo what a joke
 
Xeo
@milleniumbug Truly "open"
 
user1804599
Ugh, ATS standard library is GPL.
 
user1804599
12:24 PM
Except the object files are LGPL.
 
user1804599
But some of the headers are BSD.
 
user1804599
This is such a mess.
 
user1804599
 
user1804599
It's good to see that there are goodlets who use Future instead of Promise.
 
Ven
@rightfold I saw your tweet :)
 
user1804599
12:31 PM
how
 
user1804599
you don't follow me :(
 
Ven
I don't even have twitter
 
> Futures on the other hand are completely stateless by default. Every time you .fork them, they reevaluate their computation. In most cases, you won't notice this difference.
lol
 
user1804599
Do you spy on me?
 
Ven
I was bored enough to open a few people' twitter
 
user1804599
12:33 PM
XD
 
user1804599
> OH- "this pun is so basic"
 
user1804599
@Ven which is better, Static Land or Fantasy Land?
 
Ven
I didn't see static land
 
user1804599
It's basically Fantasy Land except with only static methods.
 
user1804599
So it's more like type classes and less like inheritance.
 
Ven
12:42 PM
oh, so map(xs, f) instead of xs.map(f)?
 
user1804599
Yeah.
 
user1804599
Particularly important with primitives, but more cumbersome to pass stuff around.
 
Ven
yeah
that means you need to use typeclasses.functor.map or somesuch shit?
or is map a giant switch of all known instances ô.o?
 
user1804599
function sum(monoid, xs) {
  return xs.reduce(monoid.concat, monoid.empty());
}
sum(monoidNumberAdd, [1, 2, 3]); // => 6
sum(monoidStringCat, ['foo', 'bar', 'baz']); // => 'foobarbaz'
 
Ven
lol xs.reduce
 
user1804599
12:45 PM
function sum(monoid, foldable, xs) :(
 
Ven
:-)
sounds annoying as fuck
 
user1804599
@Ven You pass the type class instances around. Much like OCaml functors, or Scala implicits without the implicits.
 
Ven
> Scala implicits without the implicits.
:D
 
beat me to it
 
user1804599
That was meant so.
 
user1804599
12:47 PM
@Ven help ATS generates C code with a syntax error when I try to construct a singleton set
 
Ven
@rightfold Obviously it was. That's still funny
 
user1804599
I want Fantasy Land but for Bash.
 
Ven
DO IT
 
user1804599
XD
 
Ven
@rightfold Scala implicits without the implicits are "function parameters"
 
user1804599
12:54 PM
Yeah.
 
user1804599
But to emphasize the way they're used.
 
everything is good on that picture ^
that podium thingy, railing, females in the first row taking selfies
 

« first day (2172 days earlier)      last day (2769 days later) »