« first day (1699 days earlier)      last day (3248 days later) » 

11:00 PM
I never talked to any well-known author except Scott
Scott is awesome
 
I don't think I'll do it here, but I might give you guys a short summary of the picnic evening from this year's C++Now at the uncon.
 
sure, would be interesting
this year we'll have Chandler at Meeting C++, I hope I'll be able to talk to him too
 
(A short summary of the short summary: we had fun, then Gabriel came, then Chandler went away.)
 
Ell
I like chandler
 
lol
 
Ell
11:01 PM
He seems like a cool dude
 
Yeah, Chandler is a super cool guy.
 
yeah
 
So is Sutton.
 
I had an email exchange with Sutton and he was very kind yes
 
The most hilarious moment of the evening when I got to Aspen was when Andrew started saying "now I know what it's like to be a compiler maintainer" to Chandler and Chandler was just like, "don't even say that". :D
 
11:03 PM
His saying that "Discontiguous data structures are the root of all evil" was recently a real eye-opener to me.
 
Yes.
 
I'm not a huge fan of those "root of all evil" arguments but I still like his presentation style
 
He made me realize that stuff like std::map is never gonna be useful in a performance critical context.
 
But it won't stop people thinking they are smarter than him.
And claiming their containers that are trees of arrays are SO MUCH FASTER than std::vector.
 
Ell
Women are confusing man
 
11:05 PM
@Ell That sentence stays true whether you put that comma in there or not.
 
TBH I think performance doesn't matter most of the time, and sometimes even when it matters unordered_map can outperform continuous arrays
 
@StackedCrooked std::map is only ever useful if you really need sorted data.
 
depends on usage pattern
 
Which is... close to never.
 
fucking mosquitos
 
11:06 PM
@Griwes I'd prefer something like boost::container::flat_map.
 
I never needed a sorted map myself
 
@AndyProwl We are agreeing, just it's hard to summarize what Chandler said in that talk in few sentences.
 
Probably
 
@Griwes (1) use map[key] rather than map.find, and call it only once. (2) never use map
 
I think map should be unsorted by default
 
11:08 PM
@StackedCrooked That's... not a fair summary of that talk.
 
and ordered_map should exist by its side
I include map so often when I really don't need it to be sorted
just because I know I need a "map"
 
@AlexM. That's basically a struct of two arrays where insertion is push_back.
 
FTR I don't think you can actually make a good summary of that talk... it should just be watched by everyone.
But then again, some people will claim it's a talk by "a random guy" (that's an actual thing that happened this week on one of ##C++-family IRC channels on Freenode :/).
 
Ell
I use unordered map by default
And regular map if I CBA to write a hash but I have ordering for some reason
 
11:10 PM
@Griwes The title summarizes it: "Efficiency with Algorithms, Performance with Data Structures"
 
@Griwes Yes, that talk was great.
 
@StackedCrooked The title describes it. :P
 
Ell
Is unordered_map awful for performance?
 
Funny thing is that linked list are very often used in lock-free code.
 
I wonder what working with Chandler would be like.
 
11:11 PM
@StackedCrooked The slide about linked lists is probably equally important.
 
That's an awesome talk, but IIRC he's also bashing unordered_map because it contains linked lists and suggesting people to never use it, but I think that's beyond the line
 
@StackedCrooked That kind of code is inherently slow.
You can't actually make it slower by using linked lists. :D
 
guys, can anyone give me some decent advice about renting 1bd apt in london UK? Zone 1 or 2? Like how much is too much? Or what's a decent price? Say for an 600sq feet (>= 500 m^2)?
 
Which is absurdly. Bad.
@AndyProwl He's bashing it, because the standardized interface is terrible and forces the implementation to give you bucket iterators, and their invalidation rules are those of a list.
 
dude, wrong room
 
11:13 PM
Dang, those two messages got there in the wrong order. :P
 
@AndyProwl I dont think he says you shouldnt use it, he said it could be implemented faster if it wasnt for bucket thing leaking into the API. He also goes on to say that in some cases (i.e. a small ish number of elements) sorted vector is faster.
 
@StackedCrooked well. I try contributing to C++ as much as I can :)
 
@Griwes That's sensible, but IIRC he's saying "don't use that, prefer vector of pairs" or something - which IMO is not a good advice
@Borgleader My memories are a bit blurred but I do seem to remember that at the end of that talk he really makes this argument
 
@StackedCrooked I'm just asking some quite pressing question
 
@AndyProwl It's an extreme advice - I watched the talk quite some time ago, but I think he didn't actually say "never use unordered_map".
 
11:14 PM
Let me see if I can find that part
 
@AndyProwl But he does suggest better alternatives.
 
@AndyProwl whoa
 
@StackedCrooked You mean vector of pairs and pairs of vectors?
 
whoaaaa
 
For instance at 42:41 the slide says "Stacks? Queues? Maps? Just use std::vector. Really`. That's overshooting IMO
 
11:15 PM
@AndyProwl He mentions that the interface forces a specific implementation and that it's a shame because it could be implemented better.
 
@AndyProwl No, if index is already taken, try the next ones. So it remains contiguous. Then he talks about cuckoo hashing as a promising alternative.
 
He doesn't outright say that it's terrible but it's heavily implied.
 
The biggest contribution to C++ is @Andy's video.
 
@Rapptz Yes, that's certainly a good point
 
@Mysticial I'm amazing that actually reached them
 
11:16 PM
@AndyProwl I don't think so.
 
But it does get the point across
 
He has good ideas.
 
Ell
Aren't stacks and queues container modifiers?
 
Yeah
 
Ell
Or w/e they called
 
11:16 PM
So 2/3 could easily be done with std::vector.
and std::map could just be a sorted std::vector<std::pair<T, U>>
 
Ell
They are just a facade. They don't add overhead I thought
 
I'm referring to maps
 
@Ell Yeah, ...and queue defaults to deque.
Which is terrible.
 
and std::unordered_map is a map
 
@AndyProwl His point is valid.
 
Ell
11:17 PM
Well if you're in the business of performance you're surely not relying on defaults, no?
 
Because the standard interface of unordered_map is terrible for no reason.
Bucket iterators? I mean, fucking seriously?
 
@Rapptz Whether that's going to be more performant depends on usage pattern. In my case, benchmarks clearly favored unordered_map over vector or pairs
 
YAGNI, dear committee.
@AndyProwl How many hash collisions did you have? :D
 
I wonder if it would be possible to "unroll" a linked list and have it make sense
 
@StackedCrooked Wait I thought he said that cuckoo hashing was a good example of a beautiful algorithm that was horrible in reality because of cache misses. Did I just completely misunderstand?
 
11:18 PM
@AndyProwl well in theory that has to be true
since accessing the unordered map is O(1) due to hashing
 
@Griwes I don't know, (why) does it matter?
 
and the others don't have this feature
 
@AndyProwl linked lists in buckets. :P
 
@Griwes I'm pretty sure there had to be collisions at some point - there were quite a lot of items in the map. But good point, haven't verified that
 
Who said anything about std::unordered_map lol
The slide you mention talks exclusively about std::map.
He doesn't even mention std::unordered_map until way way later.
 
11:20 PM
Still, giving such a "default" guideline as "never use maps, prefer vectors" IMO is not sensible
 
is linking collided stuff in the table the de facto way to handle collisions
 
He never gave that guideline.
 
with linked lists I mean
 
I suggest you rewatch the talk m8
 
@Rapptz I suggest you read the slide at 42:41 m8
 
11:20 PM
I did
 
@AndyProwl I'd have to rewatch the entire thing, but I believe he did say that what he's saying might be too extreme for some (?) cases.
 
I suggest you take a seat m8
 
What do you call a data structure that holds pointers to objects in contiguous memory?
 
But you obviously just saw the slide and didn't bother hearing him speak.
 
I suggest you all order pizza
 
11:21 PM
I suggest you m8
 
I suggest you cool down m9
 
I didn't start the m8 thing
 
(that ain't a typo m10)
 
but if people behave aggressive, I won't shy out
 
You can act aggressive all you want
 
11:21 PM
Yo fite me IRL m8
 
@Griwes Don't tell me what it is or isn't m11.
 
stop m8ing, m12
 
I'm only m8ing with your mum, m13.
 
@Rapptz I know. So what you're saying is that the slide contains a mistake and he didn't really mean to add "maps" there?
 
so uh
why haven't we come up with a way to match memory access to processing speed now?
 
11:22 PM
No I'm saying you should go to 44:10 or so
 
and hear him actually talk about std::map
 
@Rapptz He did specifically bash unordered_map, too, though :P
 
@AndyProwl I agree with you, but making a radical statement helps to convey the message :)
 
@StackedCrooked Exactly. People should be smart enough to figure out what he is really saying.
 
11:23 PM
@Griwes yea
 
@Griwes "People should be smart enough" oh hahaha, ye of too much faith :P
 
@Borgleader hence "should"
 
@StackedCrooked Sometimes it does, but then people take it too seriously and make silly things because of the radical statement. Another one of the same kind I don't agree with is Sean's "never use inheritance" and "never use owning pointers". I understand where they're coming from, but it's really overshooting
 
@AndyProwl Those are guidelines to people who don't know what they are doing.
So they do less harm than they'd do without them.
 
(when I say "people" I also include myself, because when I hear stuff from such authors I tend to absorb what they say)
 
11:25 PM
inheritance is overrated, I just re-write my code several times
 
It's not so they write better code; it's so they write less bad code.
Aaaaand he go my hopes of going to bed at a reasonable hour.
 
@Griwes Eh, I'm not sure. I see your point (and Chandler's) but I think that's an over-generalization. On the one hand I see the value in this attitude (e.g. I'm a huge fan of Uncle Bob, who (over)uses it a lot), but for some reason I find it inappropriate here. Can't distill this better, sorry
 
Yeah, I can see what you are getting at.
 
@VermillionAzure 3 levels of cache and you're still moaning? You want the main memory and mobo designers to implement FTL data travel?
 
@MartinJames I want them to implement time travel.
 
11:28 PM
@MartinJames Something something quantum entanglement
whatever I'll take that next semester
 
He never says "never use std::map, std::unordered_map" etc.
I just rewatched this segment.
 
@Nooble Well, getting outputs from apps before reading the inputs would help, sure:)
 
He just says prefer to use std::vector as your default container.
 
Ell
I do anyway really
Oh wait
No I still use unordered map
 
but he does bash std::map and std::unordered_map but he actually gives reasons for bashing it
 
11:29 PM
Which IMO is a silly guideline if your problem is more naturally expressed in terms of an associative container
 
I just use a sorted std::vector.
It's easy.
 
Ell
I thought we were supposed to measure before prematurely optimising?
 
He mentions that too.
@AndyProwl Good luck avoiding it because everyone says this guideline.
 
Aren't linked lists better for huge data nodes though
 
Bjarne, Herb, Scott.
Just to name a few.
 
11:30 PM
@Rapptz No, not really.
 
Yeah really.
 
They (and the Standard itself) say vector should be the default sequential container, not the default container
 
Ell
I have an exam in 8.5 hours I'm gonna sleep
Night all
 
that's what Chandler claims
and I think that's exaggerated
 
what about circular buffers?
 
11:31 PM
I don't see the exaggeration. Sorry.
If for some reason you want the performance guarantees of a map (e.g. faster insertion, iterator invalidation) then more power to you and use it.
Otherwise just use a sorted std::vector.
 
> maps are worse

wow.
 
A more reasonable guideline IMO would be "If your problem is more naturally expressed in terms of associative containers, use associative containers. If you have performance problems, consider vectors.". You need a reason for deviating from the simplest solution. You make it sound like you need a reason to reach for the simpler solution instead of using the "swiss knife"
 
But aren't maps worth the convenience?
 
Any situation where map is useful is a situation where performance doesn't matter. The log(n) lookup is a lie (IMO) because once the size gets big cache misses will dominate everything.
 
btw when I say "map" I really imply "unordered map" most of the time - ordering is rarely necessary
 
11:34 PM
Also wouldn't it be possible to create a contingent binary tree?
 
gahhhhhhhhh
gaaaaaaaaaaaaaaaaaaaaaaaaaaaahhhhhh
non-sarcastic GASP
 
meh
I'm talking about actual maps
 
what are "actual maps"?
 
not-a-hash-table-with-a-terrible-name
 
11:36 PM
> Oracle has one type of index and Access also has another type of index. All indexes are the same”.
THATS A CONTRADICTION
 
well, I think "map" is commonly understood as "associative container", not as std::map (it includes multimap + unordered variants) - but ICBW
anyway this is how I think Chandler uses the term
 
map is an associative array or dictionary
hash table is a data structure used to implement it
they're not the same thing
 
an actual map is a true scotsman, ya herd?!
 
because starting from ~45:50 he starts talking about map and unordered_map
 
ADT != data structure
map = ADT, hash table = data structure
 
11:37 PM
@AlexM. we had this discussion already..
it's opinion based. closed
i'm just kidding
 
@Rapptz so a less efficient map?
 
no?
 
hash tables aren't used to implement maps
 
I don't think you can pick something that's not a hash table to implement a dictionary that's faster
in general, I mean
 
@AndyProwl All Chandler says about std::unordered_map is that it has cache misses and that the interface sucks.
 
11:39 PM
> Mapping : Term arising from (discrete) math describing a function from one set to another. Map: In math, shorthand for "mapping"; adopted specifically by the C++ STL to mean an ordered table
 
He proposes a different way to do std::unordered_map without as many issues.
 
oh wait
your wording is wrong
 
"hash tables are used to implement hash tables is what you literally said
did you mean: associative arrays are used to implement hash tables.
 
@AndyProwl the one in that thread going on about how he can not not listen to german lol
you should also do one with this
 
11:42 PM
@AlexM. :D I think he has a point though
 
wtf @ flag
 
wut flag
 
I was thinking about it, if I actually understood German I wouldn't find it that funny
 
yep, he does have a point
never claimed he didn't
 
@StackedCrooked this is where he talks about Cuckoo hashing. "Unfortunately, this means you have a locality hostile probing pattern."
 
11:43 PM
5 mins ago, by Alex M.
hash table is a data structure used to implement it
^ I think for that (can't remember correctly).
 
god damnit rapptz /s
 
@AlexM. lol
 
@Rapptz The way I understand that talk is that he pretty much says "prefer vectors to maps as default containers, both std::map and std::unordered_map"
 
@AlexM. not sure if this was ever fixed
 
@AndyProwl >I actually come from the Downfall Parodist community. This is one of the best one I have seen that is made by a nonParodist.
clap clap
 
11:44 PM
@Rapptz they apologized
 
@MarkGarcia lol, haven't seen that comment
 
and that was it
 
that's not exactly fixing it
 
wtf murkap
 
@Rapptz yup, it wasn't
 
11:45 PM
I didn't even know there was a Parodist community
it's interesting that a non-C++er can appreciate it, actually
 
he could be with one foot in the C++ thing and with the other in the parodist thing
 
true
 
time to sleep, I guess
 
"it's a feature"
 
11:47 PM
night folks
 
> “Instead of being excited that we invented a way to increase memory of the GTX 970 from 3GB to 4GB, some were disappointed that we didn’t better describe the segmented nature of the architecture for that last 1GB of memory.”
lmao
 
amazing
 
@AndyProwl Good night.
 
wonder if it went through
the class action suit I mean
> GTX 970 is a 4GB card. However, the upper 512MB of the additional 1GB is segmented and has reduced bandwidth. This is a good design because we were able to add an additional 1GB for GTX 970 and our software engineers can keep less frequently used data in the 512MB segment.
 
To be fair it really is a 4GB card.
 
11:51 PM
fwiw I don't really care much
it is 4 GB
idc if the last 512 MB are slow
 
I don't even have a 4GB card
there are so many things wrt software testing the prof shows me here it's amazing software really gets done in companies that supposedly use all this shit
I mean it must take ages to write all these greek characters how
> ψ(X, Z): (k є N)
that's like poseidon's fucking trident
altho this whole course is like fucking poseidon's trident
 
Good job on that flag
 
what flag
 
Some idiot flagged your first trident message
 
lol
 
11:58 PM
 
@AlexM. Someone loves you.
 
House for sale ... isn't this a lovely dwelling for your family :p
 
the most annoying part here is
 

« first day (1699 days earlier)      last day (3248 days later) »