« first day (1852 days earlier)      last day (3079 days later) » 

user1804599
1:00 PM
@TonyTheLion wa'n baas
 
1:11 PM
Translation: what a badass
 
@TonyTheLion I like the way hundreds of sparks drift off the bottom of the car during that shot
good morning everyone
 
good morning
 
good "morning"
 
@Mr.kbok lol
 
TIL about touch base today
merkins.
 
1:17 PM
$ touch base
 
Fun things in the latest Kona trip report.
Also, hello everyone.
 
@TonyTheLion Morning <3 <3 <3
@Morwenn Sup
 
hallo,
 
@Borgleader I woke up too late :(
 
@Borgleader morning <3 <3 <3
 
1:21 PM
@Mr.kbok hallo, FTFY
 
@Borgleader thanks.
 
@Morwenn Why dyu go and do that? :(
 
I woke up too late too.
 
auto {x, y, z} = std::make_tuple(1, 2.8, "lol");
 
I wanted to sleep today
 
1:22 PM
@Borgleader Because I went to sleep to late.
 
@fredoverflow Lisp dialect right there
 
@Morwenn destructuring declaration-initialization!
 
@Morwenn oh?
 
¬_¬ a nice 'from string' function with signature fromId(String). Are people really that bad at naming things?
 
@thecoshman the answer is yes
 
1:24 PM
@Mr.kbok Yep, the fun thing is that the syntax is exactly the one I proposed (but everybody ignored at the time) in the C++ future proposals forum x)
 
@thecoshman I saw functions named "setGetSetPercentage" so yes
 
@Morwenn tsk tsk
 
@Morwenn It is a good syntax. Maybe you should have gone there :p
 
@Borgleader Reply faster so that I can read my messages again and fix the mistakes before it's too late plz :/
 
@Morwenn I still think the main motivation for having that is to try and solve the wrong problem
4
i.e. multiple return values
 
1:25 PM
@Mr.kbok What for? It was proposed for the first time and everyone wanted (says the report).
 
user1804599
@Mr.kbok void setGetSetPercentage(std::pair<percentage_getter, percentage_setter> pair) :D
 
the user still has to declare the names at every point of call
 
@AndyProwl Math.
Everytime I want such a feature, it's when I'm writing some math formula which returns several values.
 
just return a struct
where things have names
 
struct lolwhat { int a, b, c };
 
1:27 PM
and they're consistent every time
 
That's the point: names in math are often irrelevant :/
 
@Morwenn eh.
 
@Mr.kbok originally only saw one of the sets wtf?
 
@Morwenn consistency is hardly irrelevant
 
@AndyProwl I mean: how would you name the result type of a quadratic(a, b, c) function?
 
1:28 PM
@jaggedSpire what rightfold said essentially
 
@Morwenn but what value you get does matter
 
@Morwenn struct interceptPair = std::pair<double, double>;
 
@Morwenn the only time a woman asked me to be faster sir, yes sir :P
 
it sets a function that is used to get/set the percentage (?)
 
@Morwenn Whatever names you pick, I don't want to redeclare them every time I call that function, possibly in inconsistent ways
 
1:28 PM
tupple only really makes sense as a return type when the different elements really don't matter what you treat them as, ie it's just a set of values.
 
tuples as a return types only make sense in generic code
 
tupple
that's cute
 
@AndyProwl naw mang
 
damn I can't type today
 
ah, some people say it like "tup-pull"
 
1:29 PM
top pull
 
I imagine a tupple as a small animal
 
@AndyProwl To me they make sense wherever names are irrelevant.
 
I suck at starbait apparently :(
 
@Borgleader Apparently :)
 
@Morwenn like I said, if you can't freely mix up the elements, you need to use a struct.
 
1:30 PM
lookup by index vs lookup by identifier/key/symbol is its own debate regardless of genericity
 
@Morwenn Names might be irrelevant, but consistent naming is still relevant
 
@Borgleader join the club. I've tried to make so many dirty jokes...
 
looking up via an index is no more or less generic than an identifier and vice versa
 
@LucDanton that's only part of it.
 
@thecoshman oh yeah I need to fix that
 
1:30 PM
@AndyProwl Consistent parameter position is enough when names don't matter.
@thecoshman I won't create a struct with irrelevant names for the sake of it.
 
@thecoshman I really meant records
 
@LucDanton except looking up by 'key' will never change if things are added/removed
 
@Morwenn but if accessing by position is all you need, why that proposed syntax?
 
@Morwenn you just did with a tuple though
 
@thecoshman is that an argument for saying such code is less generic, or that it is more generic?
 
1:32 PM
@thecoshman you're missing a <
 
@AndyProwl Because naming irrelevant variables is better when it's shorter :D
 
@Mr.kbok I noticed, and confused myself
 
@thecoshman As I’ve said, you can have that debate. I’m saying that 'oh generic code does that' is wrong.
 
yeah I was confused too 8D
 
@Morwenn but it also makes the code more awkward, that function now has to extra careful that it doesn't accidentally change the order of the elements of the tuple
@LucDanton true, it's something to reserve for generic code.
 
1:34 PM
@thecoshman Of course.
 
@LucDanton I dunno, I see a correlation between the need to look up by index and the fact that you're writing generic code. When does looking up by index in non-generic code help readability?
 
@Morwenn where as if you use a struct, it will not break
 
@thecoshman I know.
 
@Morwenn so stop writing bad code you badlet :P
 
I mean, when do you care about "the second member" rather than "the member that means X"?
 
1:35 PM
@thecoshman This won't happen :D
 
@Morwenn well I hope your at least beating off to your deviant code
 
@AndyProwl ...when you're using pair?
 
@AndyProwl don’t forget that C++ does not have anonymous records (more or less), so it’s not like you have a choice
 
@jaggedSpire I don't use pair. I prefer a struct with names
 
@thecoshman What? Read everything again.
 
1:36 PM
@AndyProwl You have first and second in pair. Isn't that equivalent to only knowing the position?
Oh, argument three messages too late...
 
@Morwenn Yes, that's the same thing - I don't like it
 
@Morwenn snipe'd
 
@LucDanton I read what you said as "it's ok because generic code does that"
 
@AndyProwl Matter of taste. Still, how would you write the return type of a quadratic solver function? :p
 
pair is just a stupid tuple
I went through a phase of using it, I don't like it so much now.
 
1:37 PM
@thecoshman it’s literally the same damn thing
 
ffs, I always have to look up the return from a map search, which thing is what.
@LucDanton yeah, no, sort of. Pair is a subset of tuple :P
 
a pair is a double i.e. a 2-tuple
/contribution
 
@Morwenn if I need to return two values, I return a struct with data members whose names carry some information about their nature. If that information is irrelevant, like a, b, or c, then I still name them a, b, and c to make sure they're named consistently - also, changing their order won't break code. And if it's really all about the order, then ok, I could use a tuple, but I wouldn't want/need to use that multi-binding thing: if index matters, access by index
 
user1804599
I'm fixing an "uitvoerspecificatieformulierbug".
 
tl;dr nominative vs structural and tuple vs (anonymous) records are two orthogonal debates, and generic programming is affected by all choices
 
1:39 PM
@AndyProwl words of wisdom
 
The C++ structs are in the nominative, record corner while std::tuple is in the structural, tuple (duh) corner but those are not the only two choices.
 
curses, work time again. It's almost like I have less than an hour before work after getting up every morning oh wait
 
@jaggedSpire I wake up and leave the house an hour later :\
 
@AndyProwl When the result is ony an aggregate of variables, there's almost no reason to change their order anyway. I get your point, still I don't want to code like that :)
 
@AndyProwl In another language you could return a record and you’d have the names and except for the fact that you’d be using names and not numbers it’d be the same as using a tuple.
 
1:41 PM
@Morwenn if it's just an aggregate, why not a collection?
 
A tuple is a collection.
 
@thecoshman Types could be different.
 
@thecoshman and I meant before leaving for work, and am just being infuriatingly inexact with my word choice once more. I guess large amounts of sleep are in my future tonight too. :\
 
@LucDanton if you have names, you have a struct
@R.MartinhoFernandes a proper one :P
 
@thecoshman No. I just covered that.
 
1:42 PM
@Morwenn ah, then struct it bro
 
at least I don't feel incoherent today
 
@LucDanton I'd like that
 
@thecoshman Only if the names are relevant.
 
@LucDanton a record with named values is basically the same as a struct, how is it different?
 
auto func() -> struct { bool good; int i; std::string text; }
{
     return {true, 6, "yeehar"};
}
not valid C++, but I'd much rather have this than the multi-bind syntax
 
1:42 PM
Honestly, for me it's only a question of relevant names vs. irrelevant names.
 
@Morwenn does it matter if I swap those elements around?
 
@thecoshman Did you read anything?
@AndyProwl You say that, but you initialised the members by index and not by name.
 
@AndyProwl no, that's yucky
 
I'll opt out of this discussion here. Most of the interesting arguments are already there and nobody's gonna change opinions ^_^
 
@LucDanton Ok, but that's just once (and if that could be fixed, fine). Every client will use consistent names.
 
1:45 PM
C has a nice initialization syntax for structures last I checked
 
@Morwenn wait, you're French, ofc you run away :P
 
@thecoshman Yeah, that.
 
@jaggedSpire it’s largely nominative though; not that it’s a bad thing per se but it would be hard to faithfully adapt Andy’s example to it
 
dammit Lounge you're too interesting for my own good
 
@Morwenn wait what's this mature behavior
 
this is the Lounge how dare you
 
@AndyProwl I don't care enough to pursue. And all of us know where that this is going nowhere :D
 
@Morwenn so now it's time to intensify and start getting really upset at each other
have you learned how things work here :D
 
@AndyProwl Here, have some love: ♥
 
1:48 PM
@Morwenn Such wisdom :O
are you vulcan?
 
What.
 
@Borgleader shame he makes the wrong decision about struct return types :P
Vulcans are logical, not wise, jack ass
 
They're also monocultural pricks.
All alien races are.
 
as in they don't fuck other species?
 
It seems that deterministic order of evaluation was approved too.
 
1:51 PM
@thecoshman No, they don't have any cultural variation among them.
 
`auto f() -> struct {double a; int b; std::string c}{
    return {2.5, 13, "Yo"};
}
...
auto { x = .c } = f(); // same as auto x = f().c but allows initialization from more than one element of the struct returned by f
ionno
 
@R.MartinhoFernandes perhaps it's just the perspective we view them as. Sort of like the "all asians look the same" 'trope'.
Not being part of that race, we, as the observers, fail to see the differences in culture they do actually have.
 
Yeah, right.
Vulcans aren't logical; we just can't tell the illogical ones apart.
 
Oh right, Vulcans are from Star Trek, right? My culture is mostly non-existent when it comes to Star Trek.
 
Or maybe the idea that to become space fairing, the unification of the race tends towards bluring all cultural distinctions. sort of like in Blade Runner (and then Fire Fly) they way you have this 'Amercasia' mash up
 
1:53 PM
@Morwenn ?
 
@Morwenn Yes, Vulcans as in the race of Mr Spock.
 
@thecoshman Yeah, applies to all but humans. Impressive.
 
like in foo(bar(), buzz()), the order of calls to bar() and buzz() must always be the same?
 
@R.MartinhoFernandes may it's just bad writters then :P
 
@AndyProwl Yeah, foo must be evaluated first, then bar, then buzz.
Prior to the calls.
 
1:55 PM
@Morwenn I guess foo() must be evaluated last
 
@AndyProwl Evaluated, not called.
 
@Morwenn o_0 how that mean?
 
@thecoshman i_am_a_factory()(bar(), buzz())
 
so call order is still unspecified?
 
1:56 PM
@Morwenn i... erm... what?
 
not sure I understand
 
glad I'm not the only one
 
@thecoshman Well, you have to know what the function it, sometimes creating it before calling it.
 
does bar() have to be called before buzz()? I expect that's what you meant. If so, where are all those good motivations for letting compilers optimize etc.?
 
Evaluating the function and caling it are two different steps.
 
1:57 PM
if you say so... (who let the crack pot in?)
 
@AndyProwl In you example, foo is evaluated first, then bar(), then buzz() then foo(bar(), buzz()) I think.
 
@Morwenn That's surprising. I've always read that indeterminate order was important for letting compiler perform optimizations and stuff
 
You evaluate the caller, then you evaluate its parameters, then you call.
 
@R.MartinhoFernandes Speaking of that, I was reading books from the Mass Effect universe recently, and that subject was actually mentioned. One of the characters actually reflects on how all members of the alien species look alike, whereas humans dont.
 
@AndyProwl The paper says that it only matters for the 1% older compilers and that correctness should be preferred.
 
1:59 PM
I also wonder if i = i + ++i is still going to be UB at this point
 
@Borgleader All paper plates look the same, unless you are a serious collector
 
There's actually too much today that relies on the order of evaluation without knowing it.
@AndyProwl Hum, no idea.
 
if not, there's gonna be like a whole new wave of those "interesting" questions on SO
 

« first day (1852 days earlier)      last day (3079 days later) »