« first day (314 days earlier)      last day (4635 days later) » 

sbi
6:00 PM
@FredOverflow I think Alexandrescu (and maybe others, the name of James Kanze comes up when I think of it) at one point tried to popularize the idea of an immutable string class. But it never caught on. IMO the biggest problem of std::string is that it is too big (just count the number of find functions), and that is very hard to fix, since you can never remove anything without breaking billions of LoC.
 
I have never looked into the alternatives. How is QString, for example?
@sbi Oh, immutable strings, I like them.
 
sbi
@FredOverflow They are using, basically, the same syntax :), but are very different languages.
 
Today I read a blog entry that complained about schools teaching too much syntax and not enough semantics. It was a very interesting read.
 
Als
Hello
 
> Programming courses for beginners often concentrate heavily on getting the syntax right. By "syntax" I mean the actual letters and numbers that make up the program, as opposed to "semantics", which is the meaning of the program. As an analogy, "syntax" is the set of grammar and spelling rules of English, "semantics" is what the sentences mean.
> Now, obviously, you have to learn the syntax of the language -- unsyntactic programs simply do not run. But what they don't stress in these courses is that the syntax is the easy part. The cargo cultists had the syntax -- the formal outward appearance -- of an airstrip down cold, but they sure got the semantics wrong.
> To make some more analogies, it's like playing chess. Anyone can learn how the pieces legally move. Playing a game where the strategy makes sense is the hard (and interesting) part. You need to have a very clear idea of the semantics of the problem you're trying to solve, then carefully implement those semantics.
I couldn't agree more.
 
6:03 PM
This text is too idealistic
 
Als
I will say that the programming courses are no way close to real software development.
 
@hexa Aren't most blogs too idealistic? :)
 
Als
In a way they make little sense in practical scheme of things.
 
But really, do you think you can make someone be an "engineer" or "programmer" in 5 years in a college course?
 
Als
@sbi: Hola Mister.
@hexa: No but i also don't believe that you just throw people in water and expect them to learn swimming
 
6:05 PM
@hexa I don't know, I had already been programming for 10 years when I started studying.
 
Als
You need to teach them to swim if they are supposed to swim, not teach them to ride a motorboat.
 
sbi
Hi @Als.
 
You teach them how to float
thats college
 
@hexa I prefer double to float.
 
:P
 
Als
6:06 PM
@sbi: how are you today? Hope all is well.
 
He is german, at this time he is probably on his eleventh beer
(and he barely started)
 
"The 11th Sour"
 
I dream of going to germany, renting a porsche, getting on an autobahn on my way to a castle where I can drink the best beer in the world until I pass out
 
@FredOverflow - Why O(2^n) ? Sorry if the question is so naive
 
> I downvoted because of your absolute statement that singletons are always bad. Think about cases when you want to automate (de)instantiation of a module (like a graphics module); singletons are great for that.
I want to cry.
Please shoot me.
 
6:09 PM
I would if I could
 
@Mahesh Because there are 2^n sublists of a list of n elements?
Generating those takes up the majority of time.
@CatPlusPlus link?
 
5
A: What is wrong with this singleton?

Cat Plus PlusYeah, it's a singleton, that's what's wrong with it. If you're going to make all methods static, don't bother making a class at all, just use free functions.

 
@hexa Are you gonna eat ham in the castle?
 
Yeah! And Einsbein! And Sauerkraut (i had to look for)
 
Als
 
6:12 PM
@hexa Because ham-castle = ham-burg = hamburg ;)
@hexa Actually, it's called "Eisbein" (ice leg), not "Einsbein" (one leg).
 
Oh, ok
 
Als
oh I like this one
 
I wonder what all those singleton lovers do when they face a functional language.
 
You are too radical mr cat
 
I'm a bit tired of repeated bullshit.
 
6:15 PM
You are just 19
If you are tired now, imagine in 10 years
 
And I've been programming for about 9 years now.
 
What is your point?
 
Als
@CatPlusPlus: That is more than what I have been doing it & I am much older than you
 
I don't know, I haven't slept for 30 hours now.
 
Push for 36 like a boss
 
6:17 PM
@CatPlusPlus They claim it's an utterly stupid and useless language.
 
Als
@CatPlusPlus: Why? If i may ask?
 
@Als Wild insomnia appeared, what else.
 
IHateCamelCaseWithAllMyStrength
2
i_like_underscores_tho
3
 
Als
@CatPlusPlus: So if it's insomnia then it shouldn't bother you at all.
 
what about you guys?
 
6:18 PM
This is Pascal case, camel case starts with lower case letter ;p
 
I use both.
PascalCase in C#.
 
Als
I thought you were overworked, now you lose my sympathy
 
@Als Here, have a naked pointer: new char[42]
 
lower_case in C++.
 
oh really, never knew about pascal case
 
6:19 PM
I felt strongly about using camel case everywhere for quite some time.
 
Als
@FredOverflow: Did you mistook me for @TonyTheTiger?
 
@RMartinhoFernandes Why different casing if I may ask?
 
Now I just say "fuck it, let's pick it at random".
 
@RMartinhoFernandes Functional languages aren't utterly stupid :)
@Als You posted the pic about nudes.
 
@hexa I adapt to the environment.
 
Als
6:20 PM
@hexa: Stop imitating my polite tone :P
 
@als I am trying to be a gentleman, just like yourself
 
Als
@FredOverflow: ah oh okies....You were a lil late on it
 
@RMartinhoFernandes So you write ninja code
 
Als
@hexa: Point is are you? :P
 
The .NET BCL uses PascalCase all over. The C++ stdlib uses lower_case.
 
sbi
6:21 PM
@hexa Actually I don't have beer at home tonight. (I do, however, have half a bottle of Federweißer, which I'm drinking with ice, since it was so incredibly hot today.)
 
@Als I was busy doing something else, but I forgot what it was.
@sbi OMG Federweißer is so awesome!
 
sbi
@CatPlusPlus They will whine, just like our PROLOG hater here. :)
 
Well, back to Bra*nfuck (guess what casing I use with it). This is harder than I expected. I'm rusty.
 
Als
@FredOverflow: That makes you sound a c++ programmer yes
 
sbi
@RMartinhoFernandes It is called Brainfuck.
 
6:21 PM
@Als the drinking?
 
@sbi That looks great, I will see if I can get some here in Brazil, which i doubt
 
Als
@FredOverflow: The Nudes
 
sbi
@hexa No, Brainfuck doesn't come in Brazil.
 
I drank one ginger (I think) beverage the other day
 
Jul 27 at 20:43, by sbi
@MartinhoFernandes Yeah! That's it! Henceforth I will refer to it as Bra*nfuck! You're a genius.
 
6:22 PM
the thing had like 80% alcohol
you germans are crazy
 
sbi
@hexa In ten years he'll only be 29, and still very young. Even another ten years later he didn't even turn 40. From my POV, that's still young.
 
Als
I don't drink alcohol
 
@sbi I agree, it was a futile attempt on showing him some temperance
 
@hexa I'll show him some Temperance:
 
Als
Okay, So a question, for everyone here: How many years have you been programming?
 
6:24 PM
About 13.
 
sbi
@RMartinhoFernandes Fuck. Henceforth, you will be called The Brain. I will forget about it, no doubt, but you will be around to remind me. Robots FTW!
 
Als
@FredOverflow: Ah here we go again...that's a temptress
 
sbi
@Als Poor sod. Really.
 
Als
@RMartinhoFernandes: 13?? uhoh..that is like double of mine
 
@Als about 22 years
 
Als
6:25 PM
@sbi: What, the question or the chick?
 
maybe 23, can't remember exactly
 
sbi
@Als I was answering the one mine refers to. What else?
 
I've been programming seriously for about 12 years
 
You can program seriously?
 
Als
@FredOverflow: Did you start writing in the cradle?
 
6:26 PM
@hexa wait wait wait, Als didn't specify "seriously" :)
 
SRS BSNS
 
I only program silly.
 
Als
Geez looks like I am the one who has least programmed.....about 6.5 years
 
I had tonnes of fun with QBasic PLAY and PRINT commands before that tho'
 
@Als No, but it must have been 2nd or 3rd grade. I had my first Commodore 64 in 5th grade, and before that, I had a Commodore 8032 for a couple of years.
 
sbi
6:27 PM
@Als I think I must have started sometimes in the middle of the 80ies. Probably around '86. ICBWT. (And before that I was soldering and fiddling with TTL ICs. Basically the same, only in hardware.)
 
(and mirc scripting :D)
 
Als
@FredOverflow: What were you a mini Bjarne?
 
I never did punch cards, though :)
@Als Nope, never designed my own language.
Although my first attempt at programming sure looked like it:
> 10 you are in a labyrinth surrounded by ghosts. if the ghosts get you, you are dead.
> What do yo mean, syntax error?
 
Als
@sbi: 26 years wooh
 
That's more than I have existed.
 
6:30 PM
@RMartinhoFernandes Have you accounted for the 9 months in the womb?
 
Hmm.
That might make it even.
Wait no.
 
Damn now I really want to taste this federweisser drink
 
Fuck, I had to check my profile to remember my age.
2
 
sbi
@Als Um, wouldn't 1986 be 25 years ago now?
@hexa Basically it's somewhere between grape juice and champaign. :)
@RMartinhoFernandes You don't even remember the year you were born?
 
If you were stranded on an island and the only thing you could do for fun was programming in a single programming language for the rest of your life, what language would that be?
 
Als
6:33 PM
@sbi: I counted mid of 80's as 1985.
 
@sbi yeah, it's like a soda, for adults
I am guessing
 
sbi
@Als But I did write "Probably around '86."
 
evening all
so I must be the one with the least years of programming experience in this room
 
sbi
@TonyTheTiger You can leave again, we didn't talk about that.
 
Me, I would probably just kill myself. Programming without access to SO can't be that much fun.
 
Als
6:34 PM
@sbi: hmm..Pedantic details.
@TonyTheTiger: We were sorely missing sex talk
now that you are here let the games begin!
 
@sbi I haven't mentioned it
 
talk dirty to me
 
@TonyTheTiger 5 years here.
 
2 years really for me
I did some stuff when I was 14, but that wasn't much at all, just some MFC
 
sbi
@hexa Actually it's quite sweet. Not what I'd drink everyday. But for two or three bottles in the fall it is quite nice.
 
6:35 PM
I think 'really' isn't allowed!
 
sbi
@TonyTheTiger Neither did we. Until you came, that is.
 
@TonyTheTiger Mentucky Fried Chicken?
auto it = v.begin();
@TonyTheTiger There, I mentioned it.
 
Because of rapid fermentation, Federweißer can not be stored for long and should be consumed within a few days of purchase. As carbonic acid is constantly produced, the bottles can not be sealed airtight and have a permeable lid (they would burst otherwise). They must be stored in an upright position to allow the gas to continuously escape from the bottle and to prevent spilling.
 
Als
@TonyTheTiger: Thanks for being someone who has programmed for less no of years than me, Now you get bullied not moe :P
 
It.
Damn Morkdown.
 
6:37 PM
So yeah, I will only be able to drink some in europe probably
 
I'll beat you.
 
here's a start
:)
 
Als
Is this going to be a striptease or something?
:P
 
@Als Why would Moe get bullied? He's adorable!
 
I wish
 
6:37 PM
I wish all women would get to 42 like J Lo
 
you mean instead of dying?
 
Als
@hexa: You mean the rear? or something else as well?:P
haha
 
@als I mean everything :D
 
@FredOverflow Instead or wrinkles and flaccid body :P
 
Als
6:38 PM
@hexa: And this case everything means only something
:P
 
Why are women so anal about their age?
 
It's funny @sbi always seems to go quiet when I come, I think I chase him away or something
 
because unlike wine and men, they only decline with age
 
Als
uh here we go
 
@sbi Did your weather also just turned 180°?
first lightning just now
 
6:40 PM
right
sleep: I need some
good night
 
so I was trying to study and understand SFINAE and I got confused :p
 
Als
The puppy is here!
 
The puppy is gone.
 
puppy is going to catch some Zzzzzzz
 
@DeadMG Good night.
 
6:41 PM
@TonyTheTiger Lession 1 of SFINAE: The 'S' stands for "substitution".
 
Als
@DeadMG: Good night puppy sleep tight
 
@FredOverflow figured that much out
 
Wanna join that singleton-discussing room and continue for me? I think I'm too tired for any reasonable discussions.
 
6:42 PM
@sbi not as bad as planking
 
You were arguing singletons with someone this whole time?
 
sbi
@FredOverflow No. After the houses baking the whole day (35°C!), it's still to hot here to open the windows.
 
@CatPlusPlus wtf? singleton room disussion?
 
ownling dude, planking is like so last year man
 
Als
Ah there is a new term to that thingy not planking
 
6:42 PM
I think you put too much effort against singletons.
 
Als
I don't seem to rememeber it
 
Yeah, maybe.
Probably.
 
@als its not a new term, its a new pose
 
Most likely.
 
6:43 PM
@TonyTheTiger Have you seen this video? IIRC it deals with SFINAE.
 
I need to teach my brain to plonk it, together with Perl, PHP and the rest of that utter garbage.
 
Als
@hexa: Planking is different and acting as if wth severd head is different
 
@als I thought you were talking about ownling
 
@CatPlusPlus You can't argue with Singleton lovers. Just leave them alone with their passion.
@CatPlusPlus Just let the garbage collector take care of it this time ;-)
 
@FredOverflow I have seen it
 
Als
6:46 PM
@hexa: Yeah right
 
@TonyTheTiger Did you also understand it?
 
@FredOverflow prob not; since I still don't get SFINEA
I'll have to watch it again I think
 
@TonyTheTiger You're on phase 1?
 
6:48 PM
@RMartinhoFernandes yea, lol
 
sbi
There's a supernova happening right now, since Wednesday, only 21 million light years away. (That's basically at our doorstep.)
 
Phase 1: ? Phase 2: ??? Phase 3: Understanding SFINAE? Phase 4: Not really, no.
 
I guess I'm on phase 2, since I haven't made any profit yet.
 
Anyway, bed. Bye.
 
@sbi if it is happening RIGHT NOW, how can you know?
 
6:49 PM
@sbi Which star?
 
lulz, but how long did it take you smart people to understand it and so you could actually use it?
 
 
sbi
@hexa Well, Ok, the light happens to arrive here right now.
 
hahaha, just teasing you with pedantic details. after all this is the room for it aight? ;)
 
6:51 PM
@RMartinhoFernandes Do things like template<typename T> auto plus_one(T&& t) -> decltype( t + 1 ) { return t + 1; } count?
 
sbi
@RMartinhoFernandes It's PTF 11kly, part of the spiral galaxy Messier 101, Ursa Major.
 
how long it will last?
 
sbi
@TonyTheTiger I dunno, but I understood it the moment I read it in Josuttis' and Vandervoorde's book. Have you tried that?
 
I'm disappointed.
I can locate the thing in the sky, but I probably won't even be able to see it because it's at magnitude 17 which is pretty much invisible.
 
@TonyTheTiger There is a website for easily generating these kinds of images, isn't there? ;-)
 
6:53 PM
@sbi no haven't tried that, but I should read it
 
It's supposed to brighten up to magnitude 6, but that's about the threshold for me to see a star with the naked eye with the atmospheric pollution around here.
I'm sad.
 
@sbi How long does a supernova last?
 
@FredOverflow I don't know, I just found it while looking for some place that explains SFINAE
 
Als
I want to ask, any book on C++11 or one that is about to published? I am not sure i can learn it through reading the standard.
 
@FredOverflow Could be visible for weeks, or months.
 
sbi
6:54 PM
@RMartinhoFernandes Well, they say in about one week it should be visible for amateurs, too. I don't know about the magnitude, though.
 
(Magnitude is the brightness.)
 
@Als S. Meyers has some presentation notes available.
 
sbi
@FredOverflow @hexa "...it's likely to remain a major target for research for the next decade or more." tgdaily.com/space-features/… (I just found an English page using google. I was reading a German article on the thing.)
 
@sbi Visible for amateurs probably means atop some hill, where the polluted urban atmosphere doesn't hinder your view.
 
sbi
@RMartinhoFernandes They say it will have to be very dark, yeah.
 
Als
6:56 PM
@LucDanton: Do they cover like basic aspects or how about them..I can't really say I am well really versed in what C++11 is going to be about(templates, metaprogramming).
 
aw
imagine if they had picked it from the start
the article says "hours" after the explosion
 
@Als They're not good as a first read, what with them being notes (i.e. the presentation and the lecturer are not included, sadly). They're more of a reminder.
 
sbi
@hexa Well, that's when you see it. You can't see it before it starts to explode.
 
Steven Weinberg's "The First Three Minutes" is a great book on astronomy
 
I'm pretty sure the supernova is dubbed PTF 11kly in honor of C++11 ;-)
 
6:58 PM
actually the only I half-read, but its great
 
kly stands for "kool language, yo!"
 
Als
@LucDanton: Probably, for him to remember about stuff when he comes up with his book More Effective C++11
 
@Als Indeed.
 
@FredOverflow They put the year in the name, so they're named similarly for the same reason :)
 
sbi
> The supernova is still getting brighter, and may even be visible with good binoculars in ten days' time.
> "The best time to see this exploding star will be just after evening twilight in the Northern hemisphere in a week or so," says Sullivan. "You'll need dark skies and a good pair of binoculars, although a small telescope would be even better."
@RMartinhoFernandes tgdaily.com/space-features/…
 
Als
6:59 PM
@LucDanton: The lack of an good book is really giving me shivers, The standard is almost out and I feel I might get left behind
 
@Als Just read some questions regularly and you should be fine. And watch C++0x videos.
 
@sbi Thanks. That's what I figured, but I completely forgot about binoculars! My father has some.
 
sbi
@Als I proof-read his C++0x slides in, I think, 2009, and I learned quite a lot from them.
 
Als
@FredOverflow: Thanks, Yes that is indeed a good way assuming most people using the new standard will face those problems.
 
@Als I learned all the C++11 stuff from SO and standard docs.
Oh, and wikipedia has a good listing of features.
 
7:01 PM
@Als You could start with this shameless plug ;-)
 
Als
@RMartinhoFernandes: Reading the standard is difficult for me....It takes me a long time to comprehend
 
sbi
I wish I could challenge downvotes in #stackoverflow.
 
The C++0x episode with Scott Meyers on se radio is a good bird's eye overview.
 
Als
@sbi: Any links? I know you read those in 2009 but anyhow if you can, or direct to the source
 
Who did I discuss wait-free vs lock-free with some time ago?
 
7:03 PM
ask your secretary
 
I was there.
I remember everything, remember?
 
Als
@sbi: That is because he got one measly downvote here.
7
A: What is a union?

JaredParWhen a struct contains union members it's generally done as a space saving mechanism. If the struct can be of certain sub-types by which only certain members are valid then a union is a good way to not waste space. For example enum NumberKind { Integer, FloatingPoint }; struct Number...

Now y'all don't go and flood it with upvotes :P
 
sbi
@Als Erm, he sent them to me (on paper, IIRC), asking whether I could proof-read them. I don't think I should forward them to you or anyone else. :(
 
@sbi good man
 
Als
@sbi: Ah okay, tells me you are an important guy :)
 
7:05 PM
He is widely known as "the C++ proofreader with offspring".
 
You forgot "grumpy".
 
sbi
@Als No, I'm not. :) I just happened to get to know Scott, and he liked my proof-reading.
 
Als
@FredOverflow: I know you have met him and so i want someone to tell me who he is (pretends @sbi is not around) probably some famous guy I probably know only by name.
 
@Als Met whom? I haven't met anyone from stack overflow yet (except for FredOverflow).
 
sbi
@Als Fred has never met me, and I really am wholly unknown.
 
Als
7:07 PM
@FredOverflow, @sbi: Didn't you all met for SO meet in Berlin? I remember something like that
 
@Als I have never been to Berlin, so no.
 
Als
Who met Whom in Berlin then?
 
Hasselhoff met the Wall, if I remember correctly.
 
sbi
7:09 PM
@Als Of the first meeting in Berlin I only knew @Konrad and @balpha. At the second there were @Konrad, @SpaceCowboy (now under his real name), @Tony, and me.
@FredOverflow Apparently you're not even living in Germany. ("This video is not available in your country.")
 
Als
@sbi: tsk tsk tell me who you are. :P
 
He cheats!
 
@sbi I can't see it either, but that didn't prevent me from posting it here :)
Ich been ine hum burglar!
 
What's special about the video to be unavailable in Germany?
 
Als
And for some strange reason I can see it
 
7:11 PM
@RMartinhoFernandes It's probably offensive to Germans ;-)
 
@Als You're in Germany?
 
Als
@FredOverflow: A guy who is singing?
@RMartinhoFernandes: No I am not
@RMartinhoFernandes: Do i sound germane? :P
 
sbi
@RMartinhoFernandes many music videos aren't available here, because the company/association managing music rights in Germany (GEMA) can't settle their dispute with google.
 
@Als Hasselhoff claims to have re-united Germany by singing "Looking for freedom", so yeah...
 
sbi
7:12 PM
@FredOverflow While we all know it was The Pear doing this.
 
Als
The Pear?
 
He meant "the beer".
 
Grows on trees.
 
Als
wtf
 
sbi
@Als The nickname of the former chancellor Helmut Kohl.
 
7:16 PM
I remember that guy!
 
sbi
@RMartinhoFernandes Of course you do. He was German chancellor from 1982 to 1998. That's 16 years! There's a whole generation that grew up here in that time.
 
Als
@ah okay, Afraid that probably happened when i was not too keen or aware of international politics
 
sbi
@Als Well, you are far more away from that than The Brain. (Ha!)
@Fred, aren't you of the Generation Kohl?
 
Als
@sbi: Is the joke on me or The Brain
 
I just watched this trailer video for Deus Ex: Human Revolution:
I don't really care about the game, but now I feel a strong desire to see a movie based on this short clip!
 
sbi
7:22 PM
@Als No joke. I forgot about all the leaders of your country except the first and Indira(sp?), so you're excused for not knowing some obscure piece of German politics from the 80ies and 90ies.
 
Als
@sbi: Yup Indira Gandhi, known as the Iron Lady
 
sbi
@Als Why's that, did she love ironing that much? :)
 
Als
@sbi: She led the country in war against arch rival Pakistan and even won it.
Indira Priyadarshini Gandhi (; ; 19 November 1917 – 31 October 1984) was an Indian politician and the leader of the Indian National Congress. She was the third Prime Minister of the Republic of India for three consecutive terms from 1966 to 1977 and for a fourth term from 1980 until her assassination in 1984, a total of fifteen years. Gandhi was the first female prime minister to hold the office and remained as the world's longest serving female Prime Minister as of 2011. Noted for her charismatic authority and political astuteness, Gandhi adhered to the quasi-socialist policies of indust...
 
I know this is not the right room :) but how do I check two cells for equality in Bra*nfuck?
 
copy one into another cell
decrement for the other one in the same cell
and then see if it's 0
IIRC
 
7:36 PM
Oh, I got it. Thanks.
 
I haven't done much with bf since I tried to make a GA evolve "hello world" in it
 
Sad boyfriend huh
 
Not working yet: ideone.com/A3Avx. I'm going to sleep now.
 
sbi
@hexa I thought the same. (But I kept my mouth shut.)
 
;)
@RMartinhoFernandes Black Magic is not allowed in here
 
7:51 PM
But it's thoroughly commented!
 
8:12 PM
thoroughly commented BF is more confusing than BF :)
 
The fact that some people actually use BrainFuck is a bigger brain fuck than the language itself.
 
@RMartinhoFernandes I wondered why your comments exactly described what the code was doing. Now I know.
 
8:29 PM
 
is there an advantage of doing this std::ostream & os = std::cout; instead of using std::cout directly?
 
@TonyTheTiger Only one site to change if you ever want to stream to something else.
 
oh ok
 
hey all ! can someone explain me what lower_bound does in c++
I am trying to find K smaller number in an array than a key value
 
what's up
on friday
 
8:42 PM
does /review honour ignored tags?
 
can someone spare little time to explain me what is lower_bound does in c++
I am trying to find K smaller number in an array than a key value
 
@NicholeGrace What exactly is "K smaller number" supposed to mean?
 
@NicholeGrace lower_bound finds the first element in a sorted array which is not less than the given value.
In other words, equal to or greater than.
If you want the element such that the next K elements are smaller than X, use lower_bound( first, last, X ) - K.
but make sure not to go past the beginning, of course.
 
sbi
@Tony, I think you'll be interested in this video. (But start at 7:30.)
 
say an array has 10 elements .. and we have 6 as key value ..then i have to find out number of elements lesser than 6
 
8:53 PM
@sbi ok, what's it about?
 
sbi
@TonyTheTiger College dropouts. Well, basically.
 
@FredOverflow if I have an array of 10 elements .. and key value = 6 ..then i want to find out number of elements lesser than 6
 
sbi
@TonyTheTiger Really, it's about following your intuition, rather than the beaten path, making detours that are important.
 
@FredOverflow so for this problem I can I use lower_bound?
 
8:57 PM
@NicholeGrace std::distance( first, std::lower_bound( first, last, 6 ) )
 
@sbi oh cool; watching it right now :)
 
supposing the array is sorted, which you haven't mentioned.
 
ya the array is sorted
 

« first day (314 days earlier)      last day (4635 days later) »