« first day (1568 days earlier)      last day (3372 days later) » 

12:00 AM
@Puppy Have you looked at std::lower_bound?
Sadly I couldn't reuse it here
 
Meanwhile I'm still hesitant to use expressions like return x = y;
 
user1804599
@sehe eww
 
user1804599
Extremely terrible and confusing.
 
Boy boy. I shudda known
 
user1804599
= and ++ not being statements is an abomination.
 
user1804599
12:01 AM
Or at least, expressions of type void.
 
@sehe Not really. But I wouldn't find any argument based on it's implementation to be convincing anyway.
 
user1804599
CQS master race.
 
Not to me, not when writing idiomatic algorithm implementations. And I do that... once a year (at this level). In production code I'd probably settle for a few more lines, but this was a demonstration in a SO answer
@Puppy There we go. Dismissiveness saves the day.
I'll disregard it then
 
oh hey
just for bonus fun
 
"Kijk me gaan" sounds funny to me. (It's not used in Flemish.)
 
12:03 AM
does it invoke sequencing-related UB if the iterators are pointers?
 
user1804599
@StackedCrooked it's said by plebs
 
@Puppy If it can, I'm disavowing c++ (by the way, it's obviously not pointers because then I would have reused std::lower_bound)
 
@sehe Well, it would be appeal to authority on the part of random STL implementers. Of course I would dismiss it.
@sehe I'm not actually sure (got that part though)
 
Me neither anymore
 
@sehe Is there really production code?
 
12:05 AM
There is
 
@Puppy strchr is an onomatopoeia.
 
user1804599
there is only protoduction code
 
I think it may be apocryphal.
 
@StackedCrooked Don't know, don't care. All I care about is that shit like stat is unreadable.
 
user1804599
It's apocalyptical.
 
12:06 AM
I think I used it wrongly :)
 
and what is it an onomatopoeia of? some dude choking?
4
 
but so fancy
 
@Puppy The function makes you grumble noise that sounds like "strchr".
 
it makes me grumble noise like "Who the fuck ever thought this shit was a good idea"
 
Maybe Dennis.
 
user1804599
12:07 AM
strchr and strstr are nice functions.
 
@рытфолд I suppose that's why PHP adopted them.
 
One of my dogs is in love. I think he has only smelled her pee.
 
user1804599
@StackedCrooked That makes no sense. Your parents didn't adopt you because you were nice either.
 
Now now.
 
user1804599
When?
 
12:10 AM
@рытфолд nice.
 
user1804599
I like how splice in JavaScript is completely different from splice in C++.
 
user1804599
It removes elements from an array.
 
@sehe I would have thought you would use the optional braces.
 
@Puppy I don't think this cruft can get more informative. It can only get more longwinded, in which case it can be thought to "cloud" the meaning instead.
 
oic
 
12:13 AM
 
@StackedCrooked I'm not smart enough to be embarrassed.
 
I want to drive a spike demo effectively. It's throw away code.
I did spend ~20minutes + verifying correctness though (and I mean of /just/ the algorithm implementation)
 
user1804599
Eiffel has beautiful syntax.
 
user1804599
It's a shame it's obsolete.
 
12:17 AM
@рытфолд At least as they were originally defined in C, they're a type-unsafe mess. They basically require overloading to avoid that.
 
user1804599
I like how there's no private, but instead you can allow access to specific classes.
 
user1804599
If you want private you just restrict access to the bottom type.
 
This guy NORMAN on YT has some funny videos.
 
@рытфолд The syntax is verbose but otherwise sort of all right. The semantics started out as a type-unsafe mess. They've since patched up the rules to be safer, but it's still not exactly what I'd call particularly wonderful.
A relative newcomer with a nice answer:
3
A: Vector erase iterator outside range

Igor KorzhanovAlthough it doesn't answer where your error comes from, you may try to rework the code as follows: const auto pred = [](Deferred& d){ return !d.Condition(); }; auto itMatch = std::partition( defs.begin(), defs.end(), pred); const auto action = [](Deferred& d){ d.Execution(); }; std::for_each(it...

 
12:27 AM
@StackedCrooked Nice combination of perspective distortion and barrel distortion from (almost certainly) a wide angle zoom lens.
 
user1804599
I want food.
 
user1804599
Give me food.
 
user1804599
FOOD.
 
@JerryCoffin zoom? I think not.
Is there even a fisheye with zoom?
 
every lense zooms...; focus is zoom too
 
12:29 AM
not sure
 
@рытфолд I have some chicken tikka masala left over from lunch here. Welcome to some.
 
to me zooming is changing focal length
 
@JohanLarsson That's not even close to fisheye. Lots of short zooms have that much barrel distortion.
@JohanLarsson Takes more than than. A varifocal lens also changes focal length (but the focus may change as it does). A zoom is a varifocal that's also parfocal (i.e., the focus doesn't change as you change the focal length). Due to mechanical tolerances, most zooms do change focus a little as you change the focal length though.
 
user1804599
> Indeed, you don't want to hold a gun to your client authors' forehead ("Upgrade now or die !"); but you do want to let them know that there is a new version and that they should upgrade at their leisure.
 
user1804599
I do.
 
12:33 AM
Eternal problemshttp://blogs.msdn.com/b/oldnewthing/archive/2015/01/30/10589818.aspx
 
Lenses with internal focus (which is most, even many that are labeled as fixed focal length) do change focal length as you focus though.
 
user1804599
C?
 
@рытфолд C++.
 
@JerryCoffin Since it looks like video it is most likely zoom. You are right.
 
night all
 
user1804599
 
food & conditioning
 
user1804599
> Are you guys stupid or 12? Unless one of them has the virus, you can't just get it from mutual blood contact. One of the humans have to have the virus. Do they not teach you that in school?
 
user1804599
lol
 
@рытфолд lol, what?
 
12:41 AM
@sehe G'night.
 
@JerryCoffin I don't know all that fancy. I just know fixed and zoom lenses and that fixed are worth it.
What camera do you have btw?
 
@JohanLarsson Fair enough. Varifocal lenses are mostly historical artifacts. Just for example, I don't know of a single varifocal lens currently available for a typical dSLR (e.g., a Canon, Nikon, Sony, Olympus, etc.) Googling for them is also difficult, because the name is also used for some of the continuously varying strength eye-glasses.
 
right
total succeeded: 42, total failed: 215.
I guess that 42 is a start.
 
lol /cc @LightnessRacesinOrbit
 
42 is unfortunate as it reminds of the terrible book the hitchhiker
Maket it 43 fast
 
user1804599
 
@JohanLarsson I have an old Minolta 9, a Sony A700, and a Sony A900. Oh, and almost forgot, but I still have a Minolta 9000 around somewhere too.
@Puppy Now you know 42 of your tests are inadequate.
@рытфолд The original, thanks to Claude Shannon.
 
@JerryCoffin ok, I'm thinking about upgrading but too lazy to read specs. Looking for a canonman :)
 
getters and setters..lol
 
user1804599
What if OOP was just FP with syntactic sugar for tuples of functions?
 
@рытфолд and dropped the first-class functions.
 
12:56 AM
how does that account for members that store state
 
user1804599
Define "first-class functions".
 
user1804599
@Pris they are private, nobody cares.
 
user1804599
They can be closed over by the functions.
 
> Good code starts with the lack of special cases.
I like that one.
 
Erik Meijer is nice listening to.
 
user1804599
12:58 AM
YongYea is nice listening to.
 
never heard him
 
What a nice night. Good beer at the club, (Wadworth 6X), and no fight-club in the Lounge, just music and a low noise-level of piss-taking.
 
Good times.
 
@MartinJames If you're missing it, I guess I could try to start a fight about whether beer is good or bad (but I doubt my heart would be in it).
 
Beer is nice.
 
1:07 AM
my catgirls are in heat and not doing anything about it seems to be bad for their health
I'm not sure I'd have been able to come up with something like this
no matter how much I'd have tried
this game is insane on so many levels
 
Try Saya no Uta.
 
now it's some sort of recursive heat
I don't even understand what is happening anymore
 
@StackedCrooked Mine certainly was.
 
@StackedCrooked holy shit
 
@AlexM. Yeah.
 
1:16 AM
I should learn SQL.
Well I know a little here and there.
But I'm not really good at it.
 
@Rapptz No, you really shouldn't.
 
y
 
y would you
 
Why not?
 
SQL is not super hard.
 
1:19 AM
@Rapptz Some employer might find out, and expect you to write it semi-regularly (and that would be awful).
 
Good thing I work in medicine.
 
@StackedCrooked Easy enough, but rarely used for doing anything very interesting.
 
Yeah.
 
Sometimes I have dreams of reprogramming our old Windows 9x software we use.
Sometimes.
 
I had some fun reading about
what was is again
the RDBMS theory stuff
with phantom reads and all that
forgot most of it
but it was part of the most fun stuffs in college
 
1:20 AM
@AlexM. Xeo stopped playing halfway because he was scared.
 
@Rapptz / school now?
 
@StackedCrooked I'm thinking about stopping nekopara halfway because I'm scared
 
@JohanLarsson I'll finish PhD this May more than likely.
 
I was not aware things could be taken to this level
and I was not aware people entertained by this existed
 
1:22 AM
@Rapptz Will you work with it or write code?
 
I will hopefully never write code professionally.
 
it only gets weirder
 
@Rapptz PhD in mathematics?
 
how did this get accepted on steam again
 
@AlexM. lol
 
1:24 AM
@JerryCoffin Biomedical sciences.
Math and Programming are part of my hobbies :p
 
So you are good at bioware games?
..Or am I gettin it wrong?
 
lol
 
@Rapptz I see. One way or another, things should be interesting (but the guy who sits next to me has a science degree and previously did work in immunology, but now writes code).
 
A psychiatrist briefly tried to explain about what protein is to me.
I did not understand.
 
You guys will probably think I'm very weird but a few days ago I was actually missing going to school like the old days.
 
1:26 AM
@StackedCrooked Now try protein folding.
 
Like when you wake up in the morning to go to school and come back in the afternoon.
 
@Rapptz I can sort of understand that.
 
School was great ime, at least uni. Downside was €
Before uni it was too slow.
 
That's why you skip grades :p
 
You did?
 
1:28 AM
@AlexM. lol
 
@StackedCrooked Yeah.
 
@Rapptz I skipped classes instead.
 
I repeated a year instead.
..
 
@JerryCoffin I don't think I'll ever write code professionally. I don't think it's too much fun and reading about it through the experiences shared here it doesn't sound as fun as doing it as a hobby like I'm doing it.
Not to mention the job might not pay as well as my current job does (at least when taking into consideration standard of living of the state).
Though I think that we're more likely to share negative experiences more than the positive ones anyway so might be why I never get to hear much about the positive side of software engineering.
 
Yeah programming does not pay much.
I like programming but I'm also more of a hobby programmer.
 
1:32 AM
I think it pays pretty well here in the states.
 
The problem solving and feedback loop is so pure and nice when programming.
 
What's good salary in your opinion?
 
above $80k where I live
 
@Rapptz I compared to medicine.
 
I decided I wanted to become a programmer after tinkering on the C64 when I was 12 years old.
 
1:33 AM
at around $80k+ you get enough left over money to be fine for a long time
 
I didn't write any good programs back then, but I was definitely hooked.
 
do you still have them around?
and does coliru support basic?
 
I wrote TI-BASIC programs on my calculator when I was a little kid.
 
@Rapptz I challenge you to get a positive experience from the cosh.
 
@n0rd Varies (widely) with location.
 
1:35 AM
Not a fun challenge, I admit.
 
I imagine it'd be harder to get one out of cat.
 
He used to be ..normal.
Back in 2011.
 
When I came in 2012 he was still pretty negative.
 
he should find something else to do.
too young for that negativity
 
Nah, he's really good at what he does.
 
1:37 AM
I don't doubt that.
 
@Rapptz ...if you're single. Getting married drives costs up a lot (especially in the case of my wife).
 
I think he will be good at anything he decides to do.
 
Yeah I'm not married.
I'd marry a doll for the tax benefits if I could.
 
@Rapptz The other thing is that taxes go up as you get paid more, so (for example) $160K isn't even close to twice as much as $80K.
 
1:39 AM
a Fate fan eh
Yeah the tax spike from the $80k bracket to the $90k+ bracket is a bit much.
 
@Rapptz Fate zero fan more than fate/stay night.
 
being married would save me around 10% of my income though.
I haven't calculated it for the new brackets
 
you should also consider how much would it cost
 
@Rapptz Nice theory. In reality, it loses you 100% of your income.
 
Oh I meant marriage to a hypothetical doll.
 
1:44 AM
A mugger demands your money or your life. A woman takes both.
 
Not a real person.
@n0rd Marriage is cheap if you don't throw a big party.
 
@Rapptz Oh, well that would cut costs (quite) a bit.
@Rapptz That's the wedding, not the marriage.
 
Yeah. I assumed he made them synonymous though so I was playing along.
 
What is the reason for tax benefits from marriage? What is the state buying? Children?
We don't have that here.
 
Married more likely to have something to lose, so they are easier to control
 
1:48 AM
Well there could be a marriage penalty too.
 
@JohanLarsson Mostly buying votes--more voters are married than single (and many people who are single want to be married, so they don't mind the idea much).
 
hmm sounds strange.
 
@Rapptz Irisviel is a hypothetical doll.
 
You're a hypothetical doll.
 
Your mom's a hypothetical doll.
 
1:53 AM
you two will make a beautiful couple
 
@Mysticial ./facepalm
 
2:11 AM
@JohanLarsson Meh - you're all torque.
 
what does it mean?
 
Wait wat
ASCII is an internet standard?
WAT
 
Yippee!
 
2:36 AM
@Mysticial Your dad is a hypothetical doll.
 
2:48 AM
@JohanLarsson I think the idea is to encourage marriage under the assumption that society is better off overall when more people are married. A very debatable assumption, of course, but it seems to be effective. I've heard people that weren't planning on getting married deciding to do so because the benefits were so much better that way.
Is there an algorithm that compares alternating values of the a range? cc@JerryCoffin
I'm looking at the list of algorithms right now.
I'm not seeing anything that does it right out, but I'm suspecting I might be able to do it via hacking some different algorithms together.
 
3:05 AM
This passes my test but I'm not sure it's legit =/
 
@caps What do you mean by "compares alternating values of a range"?
 
@JerryCoffin given { 1, 2, 3, 4, 5, 6 } I want to compare 1 < 2, 3 < 4, 5 < 6
if any of those return true (...) I want to know
this is what I came up with, but I'm not totally comfortable with it
template<typename InputItr_>
bool alternating_less_than(InputItr_ Begin,
InputItr_ End)
{
assert(std::distance(Begin, End) % 2 == 0);

InputItr_ Prev(Begin++);
while(Begin != End && Prev != End)
{
if (*Prev < *Begin)
return true;

std::advance(Prev, 2);
std::advance(Begin, 2);
}

return false;
}
 
@caps to my knowledge there is not
 
@Borgleader That was my conclusion after looking at the algorithms library as well.
 
@caps Nothing to do that directly. You could use std::adjacent_difference to compute all the differences, then remove every other element. The result would be positive numbers where it was true and 0/negative where false.
 
3:19 AM
@JerryCoffin I saw adjacent_difference and wondered about it. Unfortunately I'm dealing with PODs and not ints so it is not that simple.
You answered my question though, thanks.
 
4:08 AM
@Columbo ahahahah
nice one
ah dat Win95
and the Lost logo!
a true work of art.
the only thing missing is a naked Emily Ratajkowski
 
4:31 AM
Hey @R.MartinhoFernandes Google Earth Pro is free for a limited time.
 
5:10 AM
buh. Are there any decent streaming services that work on linux?
 
5:21 AM
@caps You can stride the range twice, and zip that with the comparison. Requires the range to be replayable/saveable/forward or better.
Funny thing is, I was thinking of going at it with chunksOf at first. But that’s runtime-sized chunks, so we end up with [[a]], not [(a, a)].
 
@LucDanton I'm not sure I follow.
 
Take a look at the operands of <. On the LHS, it’s successively those at offsets 0, 2, 4…, while on the RHS it’s 1, 3, 5….
 
@LucDanton That is what I described, yes.
 
The description is a candidate solution.
 
@LucDanton Did you see this?
2 hours ago, by caps
template<typename InputItr_>
bool alternating_less_than(InputItr_ Begin,
InputItr_ End)
{
assert(std::distance(Begin, End) % 2 == 0);

InputItr_ Prev(Begin++);
while(Begin != End && Prev != End)
{
if (*Prev < *Begin)
return true;

std::advance(Prev, 2);
std::advance(Begin, 2);
}

return false;
}
 
5:28 AM
What do you think?
 
@LucDanton I'm just not following what the algorithm you're proposing would actually look like. Maybe it is the late hour here.
 
Ah; I am not proposing an algorithm.
 
@LucDanton I'm just not following what ... you're proposing would actually look like. :)
 
make_iterator_range is in namespace boost, not boost::range. Lovely.
 
5:51 AM
I have to shave off the last element (requiring bidi iterators) because either Boost.Range or Boost.Iterator is cocking it up when zipping. It’s sad.
If that’s documented it’s well hidden.
 
6:09 AM
not sure what you expected
end occurs at a different point in each container
so it will never equal stop
so, yeah, it's not Boost.Range's fault; it's yours
night
 
6:45 AM
@caps It’s perhaps easier to see without the C++ cruft—this time with the one algorithm you want, which is logical conjunction.
 
@LucDanton That is maybe even harder for me to follow.
I don't know what Stride does.
Is that a boost thing or a C++11 thing?
 
It’s shorthand for every 2 (which both names I made up). In the C++/D/Rust world we do call it striding when we iterate/make a sequence out of over every nth (get it?) element of a sequence.
In loop form, it’s when you adjust from for(; i != j; ++i) to for(; i != j; i += n) (beware loop termination!).
 
Ah, okay.
so what is a zip iterator?
 
In loop form, it’s when you do for(; i != j; ++i) { f(a[i], b[i]); /* go over both arrays in lockstep */ }.
 
@LucDanton okay, that makes sense
So, what does your solution offer that mine does not?
 
6:58 AM
It’s made up of small, familiar components. (That should be easy to use, but Boost.Range is lacking. And now Boost.Iterator too.)
 
@LucDanton Unfortunately they are very unfamiliar to me.
Maybe it is because I am in a C++03 world without very much boost.
Or maybe it is because I have only been doing C++ for a few years.
I don't know.
 
These are things that pop up when writing loops, SQL queries, and when iterating over stuff in any language (with any version).
 
But it looks more complicated than what I came up with.
 
Nothing to do with C++ in itself.
I can write a Python itertools version if you want. (Except I’ll have to clone an iterable, heh.)
 
@LucDanton That might not help either.
 
7:01 AM
Right, that was to give you an idea of the universality of it.
E.g. striding is written a[::n] in Python.
 
I only just now comprehended that offset and shave are local functions that generate ranges, and not actually ranges.
That really helped everything else click together.
Along with your explanation of stride.
Well I like what you did.
I still don't understand why it is simpler than the algorithm I brought up. More flexible/reusable perhaps? Less restrictive in its accepted inputs?
 
Sadly I think I purposefully have to do everything in one line with Boost.Range. Otherwise you could have a didactic version to explain the C++ busywork e.g. auto evens = make_iterator_range(…); // range over the even offsets of in.
 
More correct perhaps?
 
@caps Verifying the correctness of iteration that’s done by hand is very taxing. Hence why off-by-one errors are one of the most prevalent errors in the large.
The essence of what we are doing (e.g. as captured in the Haskell snippet, except that we had to write every ourself) admits no error and no edge cases.
every, zip and and cannot possibly fail or lead to bugs individually, ergo they can’t fail when used all together.
(tail is bad.)
 
@LucDanton Ah, I see. Yeah, I was concerned about edge cases with my algorithm.
 
7:16 AM
Fixed Haskell version, so that I can live with myself.
I didn’t showcase it in the C++ version, but you’d use something like std::accumulate (for a range of bool) or std::all_of (for a range of pairs) as the algorithm to compute the final result.
There’s a boost::accumulate, too (once again not inside boost::range).
 

« first day (1568 days earlier)      last day (3372 days later) »