« first day (657 days earlier)      last day (4309 days later) » 

7:00 PM
@JohannesSchaub-litb sorry I confused you with the OP's poor wording :(
 
but "7, 8, 5, 10" would also fit your requirement
 
@JohannesSchaub-litb as stated by the words yes, but not as clarified by the sample input/output.
 
@MooingDuck sample is sample. There may be sequences where that could occur.
 
@MooingDuck i see. as quicksort isn't stable anyway I guess it doesn't matter much
clever predicate definition :)
 
@rubenvb could be
 
7:07 PM
@MooingDuck doesn't make sense to me, but only way I can see recursion in there is if r.first / r.last are in some way seen as an MbRange. Explain?
 
@SamDeHaan in UNICODE builds, r.first is a wstring, but ostream<<wstring does not exist. So it converts the wstring to a MBRange, and calls ostream<<MbRange. Ergo, infinite recursion.
 
@MooingDuck Ah, makes sense. I was missing the "but ostream<<wstring" doesn't exist step that was needed to get to the why.
I don't do enough C++. Is sad.
 
we should be allowed to overload functions in the std namespace. As it is, std::lower_bound on set/map iterators is (virtually) required to do an absurd amount of travelling up and down the tree.
or I should contact MSVC and tell them to optimize that case using enable_if somehow. No wait, does that count as an overload still?
 
@MooingDuck It probably still counts as an overload, but the implementation is allowed to add things to std that us mere mortals can't.
 
no wait, I don't think an implementation can change the templates/signature of std::lower_bound. Can't be optimized.
@JerryCoffin oh right, that's true. So MSVC could do it
 
7:15 PM
Isn't overloading std:: functions allowed?
 
@rubenvb no, only specializing, and only some of them
 
Or is that only template specialization?
 
Specialising some templates.
 
oh
Bastard dictators.
 
Unrelated: wunderlist.com looks cool.
 
7:15 PM
they could alter the spec to say if iterator::lower_bound exists, then std::lower_bound returns the result of that instead of doing its normal thing. Or something.
 
@SamDeHaan You should do Haskell instead.
 
@CatPlusPlus I should just do something, instead of the nothing I'm doing right now. It's bound to start looking suspicious, as I am at work.
 
Haskell!
 
bye thank u
 
@CatPlusPlus Haskell FTW! FTFY.
 
Ell
hi guys
anyone doing anything with that chat protocol with the features of so chat?
 
Ohai
Bloddy, even forgetting the chat protocol there :)
 
Ell
written in python iirc?
 
Is IIRC a pun?
 
Which container would you use if the most common operations are push_back and pop_front?
 
Ell
7:33 PM
haha I was going to write IRC :L
 
@StackedCrooked deque
 
@StackedCrooked deque
 
@StackedCrooked deque
 
Ell
@StackedCrooked deque
 
@StackedCrooked it is designed and optimized for that exact situation
 
7:33 PM
@Ell Bandwagon
 
@StackedCrooked ...vector?
 
So list it is!
:P
 
lol
 
Ok deque then.
 
@StackedCrooked I have never run into a case where std::list beat out all the other container types. I've heard it debated whether it's ever useful, but I withhold judgement on that.
 
Ell
7:34 PM
I need to save bandwidth so having a plugin for pidgin would mean i don't have to load all the images and whatnot
 
@MooingDuck oh, it's useful
If you need a hard guarantee that its elements are never moved in memory
and if you hardly ever iterate over it
 
@jalf usually I end up with set at that point, but yeah, I can see that.
 
Conceptually it's a thread friendly data structure. Herb Sutter wrote about that.
 
@MooingDuck for certain 'graphy' algorithms, were copying/moving nodes is expensive (or iterator invalidation would hamper parallelization)
 
However, you need a mutex per node then.
 
Ell
7:35 PM
I have 2gb for a month :'(
 
@StackedCrooked not as thread-friendly as a singly linked list though :)
 
@sehe set/map
 
@MooingDuck completely disagree. Everything is invalidated on a single insert or delete
 
@MooingDuck Though I didn't restrict it to std::list, one of the (two) questions I ever asked on SO was to give people a place to expound on that.
37
Q: Under what circumstances are linked lists useful?

Jerry CoffinMost times I see people try to use linked lists, it seems to me like a poor (or very poor) choice. Perhaps it would be useful to explore the circumstances under which a linked list is or is not a good choice of data structure. Ideally, answers would expound on the criteria to use in selecting a ...

 
@sehe say what? map/set don't invalidate on insert ever, do they?
 
7:36 PM
why not?
 
@MooingDuck iirc, iterators are invalidated, yes
pointers/references to elements are not
similar to deque in that respect
 
23.3.5.4 [list.modifiers] on insert(...) ... "Remarks: Does not affect the validity of iterators and references. If an exception is thrown there are no effects."
 
@MooingDuck At least IIRC, the only way an iterator is ever invalidated is if you remove the item it referred to. insertion/deletion leaves all other iterators valid.
 
wait, wrong data type
 
@StackedCrooked deque
 
7:39 PM
@JerryCoffin For map/set? Why not?
 
@jalf why would they be invalidated?
 
Keep in mind it's a balanced binary tree. It has to reshuffle nodes on insertion/deletion to maintain the complexity guarantees
 
@jalf it changes the interdependant pointers, but no nodes are moved during that process. No reason to invalidate iterators. They'll still hit all elements in the same order, even after a shuffle.
 
@jalf Because there's no reason to do so. When you re-balance the tree, you rearrange what pointers point at a node, but you don't change the address the node lives at. The iterator points to the node itself, and doesn't care about what other nodes point at it.
 
7:40 PM
hmm, that does sound plausible :)
I know they're invalidated for deques
but you might be right about sets/maps
 
@JerryCoffin How would an iterator 'point' to the node? That sounds inaccurate at best
 
@sehe By containing a pointer to it?
 
hmm, 23.4 "associative containers" does not contain the word "invalidate"
 
@jalf Yes, for all sequences other than list, any insertion/deletion can/will invalidate iterators.
 
I mean, std::is_same<map::value_type*, map::iterator>::value == false
 
7:42 PM
I wanted to be clever and find the invalidation rules in the standard first, but I can't so screw that.
 
@DeadMG Ah. containing. It is the rest of what the iterator contains that causes the trouble
 
@sehe Point to, refer to, whatever you want to call it -- dereferencing the iterator gives you a node.
 
@sehe Nothing.
 
@DeadMG Interesting
 
as far as I'm aware, there is no cause for an iterator to contain anything except a pointer to the relevant node.
 
7:43 PM
How would that work. it++ would first need to do a lookup before advancing? That sounds horribly ineffecient
 
@DeadMG Iterator to map elements allows a first and second.
 
@sehe No, it can simply follow the inter-node pointers
 
Actually, I can't find anything that says set::erase invalidates its iterator either, so shows what I can find.
 
I think I get what you hint at: intrusive node types.
However, that was _explicitely_ ruled out above. Let me find quote
 
@Drise .... which are the same thing.
 
7:45 PM
@sehe Every node has to contain some additional information about how to locate the next node in order to satisfy the time complexity guarantees, as I recall
because incrementing an iterator is required to be constant time, not just amortized constant
 
@sehe intrusive? no, each node has 3 node pointers and a value_type.
 
well, it's kind of incumbent on the structure of a binary tree that it has left and right pointers, at least.
and probably parent
 
@jalf I believe they basically use a threaded tree, which makes that pretty trivial.
 
@MooingDuck I suspect it has to have one additional pointer. But can't remember the details, been years since I looked into that
 
@DeadMG I have no idea what we are talking about.
 
7:46 PM
@JerryCoffin probably. I just remember that part tripped me up at an exam once :)
 
@jalf I can't imagine why, but I won't discount it
 
@Drise This, I have observed.
 
@sehe it has to dereference it's internal pointer to get the node which contains a pointer to the "next" node, yes. That's basically the only way it could work.
 
@MooingDuck If all you have are parent/child pointers, how do you find the next node in constant time? That's easy if one of the children is the next pointer, but if you have to move into another subtree?
 
@jalf it will never travel more than 63 nodes, sounds O(1) to me :D
@jalf but if you're right then each node requires five pointers, doesn't it? no wait, you don't need parent then. clever.
 
7:50 PM
@jalf You don't really even need a third pointer. For a non-leaf node, you follow the right pointer. For a leaf node, you set the right pointer to the root of the sub-tree to the right. If memory serves, you need a boolean to tell you whether that's pointing to an actual child or not. You don't use that during traversal, but need it when you're doing re-balancing.
 
@JerryCoffin A non-leaf needs leftchild, rightchild, left, and right at minimum doesn't it? Even then, it'd be tricky without a parent pointer.
 
@Drise The project we're working on is secret we're not allowed to know about it.
 
@JerryCoffin Nice spill.
 
@JerryCoffin You're not allowed to know about the project you're working on?
 
I keep getting irked that there's no "good" way to give a C++ allocator the ability to rearrange objects internally, such as using mmap under the covers.
 
7:54 PM
@DeadMG An old line from when I was in the US Air Force. But yes, that was the gist of it. "What we're working on is so secret we're not allowed to know what we're doing".
 
@DeadMG "take this object and place it there in that way and leave and do not ask questions or tell anyone"
 
Ell
I can't use this chat from outside a browser can I?
 
Not really, no.
 
@MooingDuck Looking at things, I think this was starting from a mistaken precept. §24.1/7: "All the categories of iterators require only those functions that are realizable for a given category in constant time (amortized). Therefore, requirement tables for the iterators do not have a complexity column." It appears that amortized constant ++ and -- is good enough...
 
There were attempts on making IRC gateway, but it barely worked and is more than likely long dead.
This chat is not designed to be open for other clients.
 
Hi.
 
@JerryCoffin I think that would still require a next and prev pointer, since I don't think left/right/parent is enough even for amortized ++ is it?
 
Is there a compiler that supports the thread_local storage class?
 
MSVC and Clang had that as an extension some time ago. Dunno if Clang promoted that to 11 feature yet.
 
@MooingDuck Have to think about that -- at least offhand, it does seem like without it some would be logarithmic.
 
8:05 PM
GCC has __thread, too.
 
@wilx Most have had some sort of thread local storage for a long time, but at least when I looked (pretty recently) none seemed to provided it in a form that conformed with the standard.
 
I know about the various extensions like __thread and __declspec(thread). I am interested in the C++11 keyword now. Thanks.
 
Ell
how is everyone?
 
8:15 PM
@Ell lunchtime!
 
@Ell boooored.
 
@Ell If we average those who are freezing together with those who are too hot, and those who are starving with those of us who are...pudgy, we're all pretty close to perfect.
 
Ell
:D
 
Average is not perfect.
 
Ell
I had an idea for very cheap data, but its very crazy
you can receive texts for free right?
and some tarrifs have unlimited texts, so text a sim with a URL, this is connected to a computer. computer dl's is, sends it base64 encoded, receiving sim has an app that turns said base64 encoded file into proper, then there you have it :D
very cheap download :D
 
8:21 PM
Only a day to send 1MB of data.
 
Ell
anyone know how to find the bandwidth used of getting a package?
 
Also you'd probably get your SIM blocked by the operator for abuse.
 
Ell
@CatPlusPlus hmm. I didn't tihnk about speed :L
 
@Ell No. Nobody does.
 
SMS is 160 bytes long.
 
8:22 PM
@Ell more common is the other way around. Unlimited data, no texts, and then use the data to send texts
 
You'd have to send manymanymany.
Also base64 makes the data 30% bigger.
 
Ell
and you need to base64 it don't you?
 
@Ell need to do something to it, I don't know what the text protocol accepts
You'd also need a header to not interfere with "real" texts.
 
Ell
yeah
I have 140mb a day :O
 
I have 60Mbps link for ~20€/month.
 
Ell
8:24 PM
I am in spain atm, using mobile broadband
so :/
 
So you want a service that would make the download last weeks?
:P
 
Ell
also woaah thats awesome. At home I have a rubbish line :( I can get 4Mbps max
 
@Ell en.wikipedia.org/wiki/GSM_03.38 SMS character encoding
@Ell 4MBps = 24Mbps. Careful with the units
 
Ell
yeah I have 4 Mbps :(
 
@Ell that's crazy slow
 
Ell
8:28 PM
hmm
maybe you are right then :L
1 second
 
@Ell no wait, no it's not. That's what I have at home :(
@CatPlusPlus I'm moving to where you're at!
@CatPlusPlus I get 24Mbps for ~56€/month.
 
That's bit expensive.
Especially if it's asymmetrical.
Though 24/24 would probably be 3 times that.
 
@CatPlusPlus asymmetrical? Not sure what that means in this context
 
That download speed is different than upload speed.
 
@CatPlusPlus 24down, ... I think up is 4 or 5.
 
8:31 PM
@CatPlusPlus Just to clarify, downloads are a lot faster than uploads.
 
(though in practice, both numbers are a third of that)
 
I have 60/6.
@JerryCoffin Yes.
 
Ell
@MooingDuck yeah I get about 3.5 Mbps
 
Mine goes via coaxial cable and is really good quality.
I get 7MB/s on Steam.
 
I've got 12/4 (MB, not Mb) for the equivalent of 10 euros / month
 
Ell
8:32 PM
We have a really rubbish copper cable or something
and no fibre upgrades in near future :(
 
I'll measure mine when I get home
 
@JerryCoffin I completely agree. The programmer must follow the coding style himself, and if he doesn’t he either has a very good reason for it or he is a moron/just overlooked it and somebody else will notice and edit it.
 
Ell
 
Fuck my ISP.
meh
Lol my download speed is twice yours, but my upload speed is half yours.
 
Ell
at home I get about 0.6Mbps up and 3.5 Mbps down
 
8:37 PM
I once read there was a guy in Canada with 40 Gb/s.
@Ell Which one is down?
 
Ell
did he have a t1 line by chance? :L
@RadekSlupik hehe
 
@RadekSlupik Nobody corrects that crap in real code, because it's a waste of time.
 
Who says it’s crappy code?
 
@RadekSlupik i read the japanese have fast net
 
Reading comprehension. That crap, not crappy code.
As in, silly coding style violations.
 
8:39 PM
Oh lol. :P
Oh, you obviously never overlook anything.
Because you are the greatest man on earth.
 
I'm saying that nobody gives a fuck if you write if( zxcvzxc ) or if ( vzxcvzxcv ).
 
@Cheersandhth.-Alf The Japanese literally live on top of each other. Fast internet is a given since there isn't much distance to cover.
 
And nobody will commit time to fixing that, because it's not broken.
 
I guess I have to quit being so angry with my wife. We switched carriers so I no longer have fiber optic to the house (but she gets the Filipino channel). I guess I don't have much room to complain about the speed though:
 
Ell
:O
 
8:40 PM
Wait, Jerry.
 
Niiiice
 
Ell
@JerryCoffin I'm well jel.
 
Both our ISPs have three stars. .-.
My ISP sucks ass. It should have zero stars.
But dad is so stupid to use ISP’s email so he cannot simply switch to a better ISP.
 
Universities don’t count, Mystical. :P
 
8:41 PM
@Mysticial no way
 
@sehe You haven’t seen @Cicada’s results.
 
Ell
Universities have their own ISP?
 
@sehe At my undergrad it was even faster. 80 Mb/s both DL and UL.
 
lol :P
 
@RadekSlupik No I haven't. Sounds a bit suggestive :)
 
Ell
8:42 PM
ping of 2ms!?
 
fuck...
 
I have ping in 0.046 ms.
% ping localhost
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.046 ms
:P
 
Ell
ha
 
Did anybody notice that the photo shows a broken junction? The left part goes straight, the right part goes to the right, so the train might split in two! — Wout 1 min ago
 
Running speedtest.net locally.
 
8:43 PM
uh... wut?
 
 
@sehe I want XS4ALL.
Give me your Internet or I’ll shoot.
 
@RadekSlupik jesus!!
 
i have so low speed at first the speed test failed to load
he he
 
@Mr.Anubis Mohammed!
 
8:44 PM
maybe because i downloaded that raconteurs video
 
@Mysticial lol he's right
 
it was about 1GB
maybe there is cutoff per day?
 
@bamboon it looks fine to me
 
@RadekSlupik That's xs4all indeed. I'm not overly impressed. Especially at a meager 14.3 DL - should be ~20Mbit
 
8:45 PM
Ha!!! At my office:
 
No wonder my torrents are so damn fast...
 
@Mysticial Yes, he's mistaken. It's set for the train to go straight.
 
Ell
8:46 PM
do university ISP's block stuff?
 
@Mysticial 0o , that's photoshopped?
 
My Internet is quite fast too.
Except when I use Tor. It’s slow as fuck.
 
@Mr.Anubis nope, I just ran it
 
there's lots of "image not found" above, the default text before the image loads... so i can not see all these graphical results
 
Torshammer also slows down my Internet…
 
8:46 PM
@Mysticial look at the point where the two lines go apart at the inner side
 
I don’t know why.
 
@Mysticial Doesn't make sense one bit. Torrents, as everybody knows are capped by the UL speed of the combined seeders...
 
@sehe Not when it's an Anime with 500+ seeders.
 
Ell
@sehe "combined" speed of seeders? is that mean average or what?
 
8:47 PM
@Mysticial ah forget it, more zoom solves the issue
 
@Ell Effective, depending on the number of active connections in the swarm
 
@Ell Basically, your total download speed is the sum of their upload speeds.
 
@JerryCoffin Assuming perfect efficiency and full seeds
 
lol, gaining rep on meta is as easy as it is useless. :Đ
 
8:48 PM
it's almost like the guy from nepal
who was that?
 
@DomagojPandža What did ya do?
 
-74
Q: "Forced" retirement for top users

EkimAfter reading http://blog.stackoverflow.com/2012/07/kicking-off-the-summer-of-love/ and all the comments it occurred to me that some form of retirement for the sites esteemed users might not be a bad idea. Companies and governments do it all the time with "Forced" retirement if the person does n...

 
@sehe Of course -- and yes, of course that's never going to happen, but it is fairly close, and most of the overhead is fairly constant.
 
@sehe Smacked the guy who wanted to disable your account.
 
@Cheersandhth.-Alf I think the guy was apalled, not Nepalled
 
Ell
8:49 PM
retirement? :L
 
@JerryCoffin You mean, bittorrent works. Completely agreed
 
@sehe I guess that's one way to summarize it, yeah.
 
@DomagojPandža ? my account. Interesting. How so? I wasn't even in town
 
@Mysticial I would ban OP.
 
@Cheersandhth.-Alf That's me :) , though your internet speed is still faster than mine :/
 
8:50 PM
Simple as shit. Get those trolls out.
 
@sehe Well, he has a theory that the elder highrep accounts need to be forcefully suspended in order to leave room to the newbs.
Read the heavily downvoted question Mystical posted.
 
@sehe Wanted to disable everybody with high rep (or at least reset them to start over from 0). Somehow thought misleading other users would somehow be helpful.
 
TIL: SO is hosted in North-Korea.
 
@DomagojPandža Ah. Nice idea. Never going to fly, though, since Stack Overflow is about quality contents, not games
 
Yes, it's a horrible game.
Too grindy and not enough end content.
 
8:52 PM
@CatPlusPlus ...and no boobies!
 
@RadekSlupik Wouldn't bet on it. Can you spell CDN?
 
Cat wants highlevel content, raids on elite problems.
 
Plus the social features suck. As in, they're not there except for the chat.
 
@JerryCoffin Easily fixable.
@sehe content delivery network?
 
Chat is SO's 0.0.
 
8:52 PM
@RadekSlupik Yup. Or maybe it's Tor playing a reverse prank on you :)
 
@JerryCoffin That boob operator question would've lived if the OP wasn't as stubborn to bounty it.
 
@sehe Nooo :(
Torshammer is useful.
 
It is
That's irrelevant
 
@Mysticial Then speedtest server must have some bugs :P
 
Fast Internet is cheap these days.
 
8:54 PM
@CatPlusPlus And Lounge<C++> is the leading alliance.
 
We already have this in place. It's called a ragequit — random 17 hours ago
^ ROFL
 
Ell
thats if you have access to the cables :L
 
@Mr.Anubis My dorm only has 100 Mbit. But my office has full Gigabit. That's why the UL speeds are the same, so the DL is a lot faster.
 
Move to a city and poof, cables.
 
@CatPlusPlus Here one of isp provider asks around $300/month for 100Mbps , no joke
 
8:55 PM
Pointers
must.
not.
own.
resources.
Amen, brother.
 
@Mr.Anubis I don't know, it's pretty funny.
Move out.
 
Ell
@CatPlusPlus I am only in the rural/urban fringe! They stopped cabling at the end of my street or something
 
Ask ISP to bring cables further.
 
@Mr.Anubis well, at times there's decent speed here. just two days ago or so we paid for increasing the monthly limit to 15G. they don't have a subscription with free use :-( that's how it is in very rural area.
 
Ell
@CatPlusPlus I have :( they won't
 
8:56 PM
Big cities. <3
Move closer to civilisation, then.
 
it may be that the new fridge plays havoc with the wireless network
i'll have to check on other laptop
 
Ell
I am only 15 minutes from city centre :O
 
I live on a hill. It's awesome.
 
Ell
@Cheersandhth.-Alf the fridge? :L
 
Move to a better city, then.
 
8:57 PM
I live in the worst village on Earth.
 
Ell
@DomagojPandža I live on a hill! No phone signal at my house, ever :(
 
The fridge is unlikely to interfere with Wifi.
 
The fridge is only likely to interfere with your weight.
 
I am going to move to a fucking two-room house.
 
Walls, doors and microwaves.
Especially wooden ones
 
8:58 PM
 
Darn those wooden microwaves.
3
 
All I need.
 
@DomagojPandža The fridge doesn't interfere with your weight. Only the contents do.
 
"Self", I said, "surely -70 is enough for this post. I needn't add another -1." Then I read the whole post, and added my -1. — Andrew Barber 3 hours ago
^ +1 for that
 
@Ell my hometown was only 7 miles from end to end
 
8:58 PM
@JerryCoffin True that
 
I’m going to work on my website.
 
@RadekSlupik Where? R'dam proper? Zuid?
 
It’s fun.
 
@MooingDuck Mine was more like 3.
 
I should fix my server.
 
8:58 PM
@sehe wherever. In a big city.
 
Yesterday there was a hardware breakdown at the DC and now I get permission errors on /dev/null and other fun stuff.
 
Breda is the best city in the world.
 
Certain materials simply absorb some parts of the EM spectrum better. It's a bitch with wifi.
 
@RadekSlupik I'm afraid I'll have to corroborate that. Allthough, Rucphen, st.Willibrord, Oud Gastel and Stampersgat are pretty competing
 
@RadekSlupik If they're fucking, maybe you'll have some more (albeit, small) rooms soon.
 
8:59 PM
I also need to get new router dammit.
I'm so lazy.
 
I only need two rooms. Bathroom and a bedroom/living room/computer room.
 
Lazy is good.
 

« first day (657 days earlier)      last day (4309 days later) »