« first day (1433 days earlier)      last day (3741 days later) » 

08:00
On x86 it'd probably end up being cmp followed by some conditional moves.
At the machine code level is unknown because the C++ standard doesn't specify what machine code the implementation should generate if it does that at all.
@RedX (lx!=0) should be as performant. And much less confusing both to the reader and to the compiler. The latter is important because the compiler knows far better how to optimize this for your particular target platform
Thanks to all for confirming what i thoughgt.
08:21
oughg
English is toughgh.
@PolymorphicPotato there are 'proper' ways of doing these things btw. If someone needs to authenticate, 403 it is.
You are allowed to see the login form if you are not authenticated.
And you are allowed to enter the wrong details and hit the login button.
It's not forbidden to do that.
Of course not
but why are they logging in if there is nothing that would be restricted?
I am talking about the status code I should return when the login form is submitted with invalid credentials.
Of course I return 403 when you try to access a page you are not allowed to access, but the login form is always accessible.
08:29
maybe just a 200 then. They entered data, you processed it, and presented feedback.
Yeah, prolly.
Though I would avoid making users logging in until they need to log in
morning
@rightfold does {Foo, [Existing|New]} = {Foo, Existing}, do what I think it does... ie, update the tuple so that it's second field, a list, has one new entry added to the end.
@Jefffrey ಠ_ಠ
user1804599
08:37
@thecoshman No.
@rightfold :(
how do?
user1804599
It will fail because it checks for equality.
ah right...
user1804599
You cannot shadow variables that way in Erlang.
user1804599
You can do that in Elixir, though.
user1804599
08:39
In Erlang this is the typical solution: {Foo, [Existing2|New]} = {Foo, Existing}.
erm... hang on... I have old that is {Foo, AList}... and I want to return {Foo, [AList, NewEntry]}
so, do I need to pull out the Foo and AList first?
¬_¬ I'm sure I was able to do this not that long ago
user1804599
Sure you don't want {Foo, [NewEntry | AList]} instead?
erm... well, probably would be smarter to have the latest at the front...
but not really the problem :P
user1804599
I think you want to return {Foo, lists:append(AList, NewEntry)}.
is it generally smarter to use records for stuff?
user1804599
08:45
I don't know what you want to do exactly.
user1804599
Also, if you have access to OTP 17, prefer maps over records.
user1804599
Records are an ugly inconvenient preprocessor hack.
well, I have this sort of structure {ID, Versions} where 'Versions' is a list, and I want to add a new 'Version' to the list of 'Versions'
@rightfold I do, so I will :P
user1804599
#{id => 1, versions => [1, 2, 3, 4]}
Anyone feels like reading my shitty workplace.SE answer and giving me feedback?
Ell
Ell
08:49
Sure
Ell
Ell
I need a link to the answer itself pl0x
@thecoshman Then MyMap#{versions := [NewVersion | MyMap#{versions}]}.
Ell
Ell
08:52
I like it
I'll make an account and up vote later :P
@rightfold is it not overkill to use a map for this? or are maps nice and 'light weight'
Lol, thanks, really just wanted feedback on the content itself, don't feel obliged to vote.
user1804599
@thecoshman Premature optimization is the root of all evil.
@rightfold and I can just use OldVersionList = maps:get(versions,Foo), NewVersionList = list:append(OldVersionList, NewVersion), Foo2 = maps:update(versions,NewVersionList,Foo).
@rightfold I thought that was inheritance?
08:58
@rightfold sh you with your logic and stuf :P
@Jefffrey No, inheritance is its base class. :P
There can't be a base class of the root, silly :D
yeah, I can hardly recall shit about erlang :(
@Rapptz Not really.
You move-capture once, and then you can call it as many times as the code in the lambda can be called.
How you capture doesn't really change the number of times you can call it.
is ostream_iterator a ForwardIterator?
09:09
[u = std::move(some_stream), bar, qux] { s.read(bar, qux); } Totally fine.
I am wondering if you can use iota directly to stdout
@BartekBanachewicz No. It's an output iterator.
@BartekBanachewicz No.
@PolymorphicPotato Oh!
Is it correct to use std::forward at line 14? (Not sure if F is still considered a "deduced type" at that point.)
Here is the table of iterator concepts: en.cppreference.com/w/cpp/iterator
then why does iota require ForwardIterator? :S
Idiots everywhere
@StackedCrooked There it's just a verbose way of saying std::move.
09:11
@R.MartinhoFernandes So std::move would be correct as well?
Oh wait, don't mind me.
@BartekBanachewicz No idea.
> ISPs should monitor VPN users for excessive bandwidth use, assuming they would then be pirates.
That's an earlier piece of idiocy courtesy of BBC
But I think you want std::iota_n, which doesn't exist.
09:13
@PolymorphicPotato how do I create one?
Do I need to specify an intermediate medium?
template<typename OutputIterator, typename Size, typename T>
OutputIterator iota_n(OutputIterator out, Size n, T value) {
    return std::generate_n(out, n, [&] { return value++; });
}
I wanted to do it without generate/generate_n
Then use a for loop.
Or write iota_n once and use iota_n, then generate_n is an implementation detail!
09:22
SRP
Or use range::copy(range::iota(0, n), out). :D
That's closer
Of course, this should just be generate_n because, that's what the code intent is
If you do it many times iota_n is beneficial.
@StackedCrooked I think this question needs to be on SO. Make sure it mentions "universal refs in lambda signature inside template function" or similar
@PolymorphicPotato You'll get sore
Also LoL World Championships 2014 are there
I wonder if the final will be at 5 am again in my timezone :/
09:28
@PolymorphicPotato generate_n(outit, [auto x=0]() { return x++; }) -- should not that roughly be the c++14 way?
o_0 this windows erlang vm makes no sense
I can't work out how to get it open my code
@BartekBanachewicz oh no there goes my spare time :(
@thecoshman compile it, noob.
rebar compile && erl -pa ebin
09:34
@PolymorphicPotato no I mean, I can't work out how to get the vm working dir to be where my code is
cd project && rebar compile && erl -pa ebin
@ArneMertz bah you never told me you play! Are you on EUNE?
Also EDG vs Samsung White just staarting
I read that as "EUGENE" and had to think of Mr. Krabs.
lol Ryze and Twitch banned
#korea
@BartekBanachewicz Final is October 19th CEST - 9am - 2pm according to preliminary schedule
09:35
ergh... I think I need to restart for cmd to know about erl
@ArneMertz wut?
ah October
yeaaah it's sunday :D
me gusta
@BartekBanachewicz I think I have a lvl 5 or somethig on EUNE, because EUW connectivity sucked a while
else EUW
0
Q: Universal reference and local classes

StackedCrookedIn my code below I have a function which accepts "universal reference" (F&&). The function also has an inner class which accepts an object of F&& in its constructor. Is F&& still a universal reference at that point? I.e. is F still considered to be a deduced type? In other words, should I use st...

what the hell Zilean
09:36
but haven't played normals for a while now
> But the silver lining is that a 'yes' vote will allow we of the rUK to move on to Central European Time with Germany, France and Spain which has been entirely logical, at the very least, since we joined the EEC. Indeed, the Scots could have a different time zone from the rest of us now if it wasn't for HMG appeasing Northern Scottish farmers for reasons obscure to me.
lol
@BartekBanachewicz You mean banned?
Vote Yes for Scottish independence so the rest of the UK can change to the wrong timezone.
@R.MartinhoFernandes well, to start with, let's just drop BST
@Griwes I mean picked
09:38
I bet that wastes pounds each year with confusions and slightly late appointments
Mao/J4/Orianna/Thresh/Lucian vs Zilean/Rumble/Kha/Trist/Nami
@BartekBanachewicz That's not... weird.
Zilean is awesome.
having DST and not having DST both produce wastage, just different areas.
@thecoshman And I bet that's incredibly minor and completely offset.
@Griwes "awesome" and "awesome in top-level play" are disjoint typically
09:38
@R.MartinhoFernandes o_0 was I not sarcastic enough?
I am from a country that experimented with dropping DST during my lifetime and went back to DST because the alternative wasn't worth it.
@BartekBanachewicz what is it about top lane casters recently anyways? I didnt notice much of a change since the days where it was bruiser only
user1646075
@R.MartinhoFernandes part of australia doesn't do daylight saving because the locals thought it would confuse the dairy cows affecting their milk production, and also the extra sunlight would fade the curtains faster.
@aclarke lol
you do realise that cows in Australia are very lucky - they don't have to work & have large patch of lawn to graze on usually
user1646075
09:42
I figured out the milk thing, but it doesn't give the cows enough credit for flexibility. The curtains still has me bamboozled.
user1646075
@chmod711telkitty yeah - outside cows!
aren't they usually outside anyways? cheaper that way
Hellooooo
How's everyone
user1646075
@chmod711telkitty piggeries and so on cram more in for more profit etc. Also I hear that in places with snows, a lot of livestock spend a large part of winter in barns
user1646075
@dolan funky, but clearly not at cheerful as you
09:44
If I were a pig, I would not want to be outside the barn in snowy weather either ...
user1646075
@chmod711telkitty if i was a pig (which is arguable anyway) i would not like to know that I'd be turned into bacon, no matter how tasty I might end up.
France is bacon
user1646075
@dolan go stand in the corner.
user1646075
plus, i'd be very depressed about how so many people in the world think that me and my kind are intrinsically evil.
Xeo
Xeo
@dolan mmm, bacon
09:51
@aclarke maybe something about the curtains being closed only during sleeping time and they think DST => more sunshine during sleeping time. Which would be ironic since it's meant to be the other way round.
user1646075
@ArneMertz hmmmm, but if farmers always go to bed at 7pm straight after a late supper....
user1646075
you might be onto something there
damn I miss monads
The famers here seem to go to bed at 01:00 after a late drink.
user1646075
@BartekBanachewicz /read that as gonads
09:53
@aclarke ouch..
@aclarke They're dumb?
user1646075
see also bicycle accident
The Earth rotates the same regardless of DST.
user1646075
@R.MartinhoFernandes that was the general wisdom
@R.MartinhoFernandes no it doesn't
Xeo
Xeo
09:54
user image
2
I don't understand this DST/farmers crap in UK. Agriculture is mostly mechanized and the tractors etc. have lights.
And you don't have to take the cows in at 7pm.
Take them in at sunset regardless...
user1646075
@MartinJames the argument about the cows was, if the farmer has to get the cows up to the milking shed one hour sooner in siderial time, then the cows would be coming in too early. The farmers had to do that to get the milk to the foundry where it could be forged into bottles in time for the shops to open. Or some such crap.
user1646075
might be getting industries a bit confused there. It's all a bit vague.
spring, magpie season. how lovely
user1646075
09:59
@chmod711telkitty yup, time to dust off the ice cream tub hats
ready for your hair to be unplugged yet?
user1646075
I hope this isn't famous last words, but I've NEVER been pecked.
user1646075
pictures of gaping wounds tomorrow...
Xeo
Xeo
Jumping spiders are cool.
user1646075
@Xeo and seriously cuddly!
10:01
ugh kick and ban
Xeo
Xeo
wut
@MartinJames blah blah blah tradition blah blah blah
@dolan feels like a while since I've seen your beak
@CatPlusPlus I was thinking the same
@thecoshman Pretty sure I come here weekly (most of the time)
10:02
@dolan maybe
user1646075
@CatPlusPlus too much joie de vivre for your liking?
No french please
No french in this room
C'est insupportable
user1646075
@dolan that's french? i thought it was english
fucking shitty wanking crappy Windows wankered cmd not fucking knowing about the wanking fucking shitstain Erlang (ノಠ益ಠ)ノ彡┻━┻
> def load(): # real signature unknown; restored from __doc__
fail
10:05
omg wtf you can't use non-moveable types with std::packaged_task? coliru.stacked-crooked.com/a/67371be2828b1afc /cc:@StackedCrooked
or maybe it's just a stdlib bug
The fuck is a copyable but not moveable type
@aclarke not forthcoming, you promised!
@CatPlusPlus why not?
Because it makes precious little sense
That's funny actually
10:06
@Abyx Remove the ctor.
moving implies copying for "legacy" or unmoveables
@Abyx That type's not copyable.
It's broken.
user1646075
@sehe i have 3 rugrats to prove it's still working, much to my chagrin.
user1646075
oops, sorry about the french again
@thecoshman It's rather sad to watch developers struggling to use the near-useless command-line interface on an OS that as designed primarily for GUI's.
10:07
@aclarke lol
@R.MartinhoFernandes why?
Because it's not moveable.
@Griwes it won't compile then.
@CatPlusPlus There's no such thing.
The compiler begs to differ.
@R.MartinhoFernandes thanks.
@MartinJames PEBKAC
Things like CopyOnly c((CopyOnly())); are ill-formed because you deleted the rvalue overload.
So it's not copyable.
10:09
@MartinJames technically, to struggle I would be having to try
@CatPlusPlus lol
@CatPlusPlus :(
@R.MartinhoFernandes Wouldn't that invoke MVP?
Install Erlang vm, restart machine, open CMD, ¬_¬ does not recognise 'erl' as a command. (╯°□°)╯︵ ┻━┻
user1646075
@thecoshman where does it install it?
10:11
prog files
user1646075
you'd expect it to fiddle the PATH to add that in
I would expect a registry entry.
I just expect it to do it for me
Well, yes. Installers normally do that shit. Wierd..
user1646075
10:13
i thought cmd only looked at %PATH% as per tradition. which is stored in reg anyway, right? - so technically - yeah!
@Puppy what is MVP?
Most Valuable Professional
user1646075
most valuable player
user1646075
damn
Most Vexing Parse
10:13
Oh right.
Most Voluptuous Penis
@thecoshman This is something I'd expect Puppy to say
user1646075
show-off
@thecoshman vagrant up
@CatPlusPlus true... but come on, what sort of program installs a command line tool and doesn't update path!
@PolymorphicPotato ?
10:15
@thecoshman !
@PolymorphicPotato &
I wish none of them touched PATH, because they're more likely to break it than be useful
@thecoshman Is that a reference to a PolymorphicPotato
Not to mention they modify system PATH instead of user PATH
PATH in Windows is broken anyway
10:16
It gets broken when it gets too long
@CatPlusPlus nah, system path or gtfo :P
user1646075
@CatPlusPlus pity ms didn't copy the idea of one bin to rule them all. Well, 3 or 4....
That's why installers just appending shit to it should fuck off
@aclarke Puppy did copy that idea of "one bin to rule them all"
Fuck PATH
user1646075
10:17
@MartinJames you'll get gravel rash
@aclarke Not with the amount of moss on ours.
ooh, mr lardy dar with his gravel paths
@thecoshman <marc joke>
Why is righfold online in two disguises?
split personality, obviously ...
10:22
@TonyTheLion because he can!
@TonyTheLion Which disguys?
dis guy ^ he meant ... 1 of the guys?
I was under the impression that @PolymorphicPotato was an incarnation of @rightfold.
@dolan dat guy
but maybe I'm wrong
10:24
it's the other way around
so the first match of worlds ended
man LoL is so better to watch than say football
You should qualify your statement with "I think"
saying it like you did makes it sound like its a fact, which it isn't, its your opinion
You don't have to when you are obviously right.
ahahahahah
10:30
@BartekBanachewicz indeed.
@TonyTheLion apparently not only mine
@TonyTheLion Entirely agree
@BartekBanachewicz what
@TonyTheLion I think you should qualify your statements with "I think"
@TonyTheLion saying that saying it like you did makes it sound like it's a fact like you did makes it sound like a fact, which it isn't
2
Bartek Pedanchewicz
10:33
I don't even...
@BartekBanachewicz We have to go deeper.
Yummy, baguette.
10:48
My fridge is in the same miserable state as it was 2 days ago
But I figured it out: scrambled eggs with rice!
odd
@TonyTheLion Disagree. Everything anybody ever says is an opinion, unless demonstrated otherwise.
Paradox
and I've failed my exam.
fucking shit.
last try on tuesday.
Why, was it C++
10:57
Elaborate
I don't want to
fucking bullshit
@dolan Haskell.
@Puppy Then just rephrase it as "saying it like you did makes it sound like it is demonstrable, which it isn't, its your opinion"
@StackedCrooked Ouch
hey that rhymes with couch
10:59
@R.MartinhoFernandes If he didn't actually demonstrate it, it doesn't count.
On the first exam I got 10/60
this time 17/60
I needed 25 to pass.
I sneezed, just so you know.
@BartekBanachewicz Progress!
@Puppy Doesn't count for what?

« first day (1433 days earlier)      last day (3741 days later) »