« first day (1377 days earlier)      last day (3572 days later) » 

4:05 PM
Trigraphs are up for discussion for the next meeting, AFAIK. That's not yet a certainty.
 
someone performing a X->Y text-replacement task through our codebase (got a bit of a debt from old terminology) just said to me (paraphrasing) "ok after merging trunk to the branch, some of the X->Y text replacements have been missed out, but the namespace conflicts are now resolved. is it ok to reintegrate to trunk?"
 
@Cubbi According to this, they were voted into C++17.
 
same guy who prematurely RESOLVED/FIXED the relevant bug on bugzilla before even thinking about reintegrating to trunk (or, indeed, finishing the task) some five days ago
this should have been a trivial one hour job
 
I could just be misunderstanding the terminology.
 
40-odd years old, many years of commercial C++ development experience, probably earns more than me
fucking fuck.
 
4:06 PM
@chris that article is wrong on a few things
 
Well, that's nice to know. It's really the most up to date thing I've seen in a while.
 
or perhaps overly enthusiastic
 
@LightnessRacesinOrbit Is that what being a professional software developer is all about? Working with morons?
 
@FredOverflow Ask his co-worker.
 
4:09 PM
@FredOverflow apparently :(
at least I outrank him. thank fuck for that
 
posted on July 24, 2014 by Scott Meyers

[For this post, I'm going to pretend that std::unique_ptr is a type, instead of a template, because the issue being examined is independent of what a std::unique_ptr points to.] Suppose I want to pass a std::unique_ptr to a constructor, where the std::unique_ptr will be moved into a data member. The std::unique_ptr parameter thus acts as a sink. To the extent that we have enough experience wit

 
Oh, he's making a great point.
I love how it takes years to find best practices for new language features.
 
@FredOverflow Depends on whether you have the intelligence (and ability) to get a good job.
 
@FredOverflow That's what life is about
 
Moron's Law?
 
4:19 PM
@FredOverflow Moroni's Law
 
Xeo
> Scheduled For Early Delivery On:
Friday, 07/25/2014, By End of Day
Originally Scheduled For Delivery On:
Monday, 07/28/2014, By End of Day
yeeeees
 
so now you have 3 days less?
 
Xeo
I can finally build my PC completely on Saturday, if nothing goes completely wrong
 
is it better to have a field for first and last name, or to have a field for fullname?
 
4:24 PM
> if nothing goes completely wrong
@Crow first name + last name is incredibly ethnocentric
 
luckily, this app will only be in Murickah
 
Xeo
@Puppy I think that you're Anonymous
 
@Crow Protip: any assumption about cultural things will fail sooner or later.
 
@Xeo Building is fun... unless the hardware you choose turns out to be incompatible.
 
Xeo
Nope, that should be fine
pcpartpicker checks compatibility
 
4:28 PM
For starters, you're assuming all people have a name :P
 
@Crow ... where no one from any other part of the world ever lives, right?
@Crow kalzumeus.com/2010/06/17/… (see assumptions 24-27).
 
Guise, here it says that a SequenceContainer is guaranteed to have X(n,t) (which constructs a container with n copies of t). And then at the bottom it says that std::array is a sequence container. But std::array does not have such a constructor.
 
Xeo
lol
@Jefffrey std::array violates a few requirements
 
That sucks.
 
@Jefffrey There are explicit exceptions for it.
 
4:41 PM
@Jefffrey array has fill which does the same thing. Due to its fixed length nature that requirement doesn't make sense for it.
 
@Mgetz Generic programming.
 
@Jefffrey use fill
it's in <algorithim>
 
@Mgetz The problem is not filling. It's generically constructing either a std::array or std::vector with n copies of the element t.
 
Xeo
wrong container choice
 
@Jefffrey why does it have to be on construction? Inherently that's impossible for array as array is constructed as part of the stack frame.
 
4:47 PM
wat
 
@Mgetz Not what he means. I guess he wants to avoid special casing std::array
 
@Mgetz It has to be on construction because I'm trying to construct it.
 
@ParkYoung-Bae my point was that there is a way to not need too. fill or fill_n that are container agnostic
 
@Mgetz "Due to its fixed length nature that requirement doesn't make sense for it." -- Then why is there a std::array<T, N>::size member function? See the point?
 
@Mgetz Oh, I see
 
4:51 PM
@Jefffrey because I might want to pass that array to another function by say... const reference... and it might need to know the length
 
T container = { T::value_type(x), T::value_type(x), /* some magic to fill the rest */ }
 
@Mgetz Erm, the length is implicit in the type. Even if you pass it by reference.
 
@Jefffrey I'm not a committee member go ask one of those lunatics
 
It's because std::array should satisfy the requirements of Container AFAIK.
Nothing is random with "those lunatics".
 
std::array is based on boost::array. One of the decisions of boost::array was to make this class an aggregate to support brace initialization.
 
4:54 PM
as to your conundrum, it has annoyed me as well
 
Therefore, boost::array has no constructors.
 
Wasn't there a RandomAccessContainer concept?
 
SGI STL documentation mentions it.
 
@milleniumbug Maybe with a macro.
 
@Xeo Yes, that was implied.
 
user1804599
5:05 PM
62
Q: C# lambda expression reverse direction <=

user215675I have seen some code which uses the <= operator. Can you explain what is the use of having lambda in reverse direction?

 
haha
is it possible to create a list from a vector of objects of just one property? e.g. vector<Foo> foos, and i essentially want to iterate and foos and have a vector<int> of foo.id for example, without a for loop
 
http://coliru.stacked-crooked.com/a/0e8cda09db1aced8
Are lines 43 and 45 dangerous? I think it works if std::string uses contiguous memory correct? I'd like to use 43 and 45 because they seem more efficient than 42 and 44.
 
@user3791372 You can try boost::transform_iterator.
 
i'd rather use a for loop than bring boost into the equation at this point
 
5:14 PM
@Chimera Forgot about std::hex?
 
@Puppy No, I tried it, but wasn't working in every case.
 
hm, I don't blame you for not wanting to piss around with iostreams if they don't work right away.
anyway, the long and short is that yes, you can assume that std::string's storage is contiguous, but your code is broken anyway because of strict aliasing. You should memcpy from the data to the int, not use a pointer type cast.
 
Hmm ok. Lemme give that a try.
 
also
couldn't help but notice that you use a hardcoded index for l, instead of calculating the offset.
hope that sizeof(int) doesn't change between machines...
 
@Puppy I know, it's just test code. I wouldn't use this in production.
 
5:18 PM
okeydokey
actually the main reason it surprises me is because it's trivial to find the offset and I have no idea how you calculated 28.
 
@CatPlusPlus I was waiting for something more :)
 
@Puppy I just counted the bytes knowing the length of int and the string in the middle before the long.
 
@Chimera Way more effort than calculating it
 
@Puppy yeah that works.
 
trust me, I know way too much about that stuff.
 
5:22 PM
@user3791372 or just std::transform
 
@milleniumbug thanks, i'll take a look
 
@milleniumbug 2muche4t
 
@Puppy ...is it?
 
yes
 
2muche4t?
 
5:26 PM
@user3791372 Pronounce it.
 
too mooche for tea?
2
 
...close enough.
 
I'm pretty sure muche is not pronounced mooche
 
moochy?
so, i saw a guy with a badge yesterday about having a starred message in chat... i thought i could do that! i see i have 20 stars now!
haha - thanks :)
 
@user3791372 you can have a star for that. Too much effort is my guess btw.
 
5:29 PM
I wonder how negative stars would go over.
 
well there it is. all caught up on GoT. I believe they're only just starting to film S5 about now, so I have a wait. sigh.
 
/me slaps forehead
i see this ain't nowt like irc
 
@R.MartinhoFernandes is it a trick? :)
I have no idea why the outputs are not in the right order.
 
@CatPlusPlus taste should be forbidden
 
@LightnessRacesinOrbit I was so happy when I realized S3 was starting almost right after I started watching GoT
 
5:32 PM
I just run the script and redirect the output to a file named "output" using 2>&1.
 
kids.... kids everywhere!
script?
 
@sehe why are you reading back there?
 
@StackedCrooked What he's saying is that you first display all commands and then display all outputs
 
@JohanLarsson is what I do. I don't think I need to defend that
 
I'm not looking at your code because it's horrible
:v
 
5:34 PM
@sehe My question was not an accusation.
 
Mine was an answer
 
Ell
Hi all
 
@CatPlusPlus That was requested by a few people here. They wanted that the original commands were printed followed by the output. I told them that set -x does that but apparently I gave in.
 
Should be
command #1
output #1
command #2
output #2
 
@CatPlusPlus You are too young for my code.
@CatPlusPlus I could do that.
 
Ell
5:37 PM
man my mustache is bad
 
@Ell I didn't do it. It was my mustache.
3
 
@StackedCrooked Ugh, where are those people.
I'll punch them.
 
I think it was lightness.
 
@StackedCrooked do you have the Burt Reynolds?
 
violence++
 
5:39 PM
lol... not going to fly in the US
 
@user3791372 Get a proper name.
 
I could go according to this approach. (Without the funny prepending, but to get the expected interleaving.)
 
@StackedCrooked no
well maybe right at the start before I found out how to make the fucking thing work
 
I could simply split the user cmd and the program output in two separate <pre> blocks to create some visual distinction.
 
@Mgetz Sure it will, someone will figure out how to 'just think of the children!' it.
 
sbi
5:45 PM
Hi.
 
Ell
@sbi hi
How are you?
 
hey
 
sbi
I have some problems with member (function) pointer syntax. We've been staring at this for 5mins now and can't see what's wrong. It must be obvious, yet we both can't see it. Would you have a look at it?
 
I can bring more confusion to the table.
 
@SamDeHaan 1st Amendment, Google cannot be forced to violate US law in the US
 
sbi
5:47 PM
int adapt_0(Class* p, bool (Class::* func)() ) {
  return p->*func() ? 1 : 0;
}
 
@StackedCrooked I'll bring some lack of skill.
 
@sbi (p->*func)()
 
sbi
The compiler says error: must use '.*' or '->*' to call pointer-to-member function in 'func (...)'`
 
p->*func() is parsed as p->*(func()), which doesn't really make sense.
 
@Puppy I always get that wrong.
 
5:48 PM
Operator precedence is fun.
 
@FredOverflow That... Is brilliant. We're legendary!
 
Until I get it right after 5 minutes or so.
 
@StackedCrooked PTMF syntax is a total bitch.
3
 
sbi
@Puppy Thanks, that did it!
 
If I may use we to mean me and you guys.
 
5:49 PM
poem:
0
A: Android GCM app force closes at the GCMRegistrar.checkManifest(this) line in my android app with unknown error

Krupa PatelI faced the same problem before few months. But in my case I was debugging my app on Emulator, that was the problem. When I run the same on real device it works fine. Because emulator doesn't have DeviceId to register for push notification.

 
@sbi No problem.
 
In C++ I never bothered with any of that and use boost::bind and boost::function for everything.
 
@Mgetz I'm 'murican. I'm well aware of our government's selective enforcement policies.
 
sbi
@Puppy Yeah, just go on convincing yourself that ` (p->*func)()` makes much sense...
 
@Puppy you will be popular but not rich if you always mentor like that. What was it 200 ms?
 
5:49 PM
@JohanLarsson What?
 
If this would have been a codementor job :)
 
also, sbi doesn't need my mentorage, unless it's C++11, he just needs my brief assistance.
 
@JohanLarsson He's answered the exact same question for me in the past.
He's a secret ptmf specialist.
 
sbi
@StackedCrooked Yes, so do I, but in this case, doing it the rough way gets me rid of a traits template declaration, two specializations, and three function templates.
 
@sbi Ah I see.
 
sbi
5:51 PM
@StackedCrooked You mean PTSS, Shirley?
 
@Puppy it was a joke
 
@JohanLarsson Yeah, I got that far, but "200 ms"? I have no idea what that is supposed to mean.
 
@Puppy Two hundred milliseconds.
 
ohh
 
5:51 PM
200 multiple sclerosis
 
I parsed it as 200 meters per second, and I'm like, ???
 
sbi
@Puppy Yeah, I do need you for the lesser tasks like shooting the PTM syntax in 200msecs. I do the design. :)
 
@Puppy What how why
 
lol in context
 
@sbi Well, if you're super lucky, even if I do succeed in charging I might give you a discount.
@CatPlusPlus Dunno. I guess that for times, I usually put the unit right after the number, like, 200ms.
 
5:53 PM
That makes all the difference, yes
 
@sbi dude.
 
sbi
@CatPlusPlus Why? He's British. (For @Puppy: see here.)
 
He typed it at 70 bbps.
 
sbi
@Puppy What do you want to charge me? Advice for what you should do to end up having a job?
 
5:54 PM
wonder how much of the 200 ms was eaten by swamp internet connection?
 
sbi
@BartekBanachewicz What?
 
I am oficially allowed to learn how to drive 2Mg vehicle on the streets
 
@JohanLarsson The vast majority.
 
@sbi this code is scary nsfw.
 
@sbi Heh. Officially, my post-operative recovery period ends on Friday.
 
Xeo
5:55 PM
Anybody know a free tool to convert a .svg to a .png, while allowing me to specify the output size?
 
@Puppy do you also parse 100km as 100 kilos per meter?
@Xeo <canvas>
 
no
 
@Xeo GIMP
 
sbi
@BartekBanachewicz Actually, it's fairly simple. It takes a pointer to a member function returning bool and returns an int. I need this for calling into a C API (int for bool) from modern code.
 
oh, C API. Proceed.
 
5:56 PM
@BartekBanachewicz You should see Di Gennaro's chapter on specializations of inner class templates in class templates.
 
Did Puppy just misread "200 ms" as "two hundred metres per second" because he thinks we don't write a space for durations?
 
sbi
@BartekBanachewicz What does your OS offer? A C++ API? Or is it Haskell?
 
Ell
@Xeo inkscape
although a bit overkill maybe :3
 
eh
it's too hot, that's the real cause.
 
Ell
5:57 PM
but you can use it command line
 
we managed to get rain for a whole 10 minutes today.
 
@sbi "my OS"?
 
sbi
@BartekBanachewicz The one you're coding for/against.
 
I am simply not touching OSdev :P
@sbi there's this thing called abstractions
don't get me wrong I suspect you need that code
 
not for GCC 4.1.2 or whatever it is
 
sbi
5:58 PM
@BartekBanachewicz Yeah. I am in the process of creating such a beast.
 
they don't know what abstractions are.
 
sbi
@Puppy It's a proprietary layer over VxWorks 5.5. The latter being from, IIRC, 1996. :-/ But that doesn't matter, because C APIs look like this even when they're from the 2000's.
 
@sbi Or the 2010s.
 
@StackedCrooked, How much effort is it to update libc++ on Coliru?
 
12.7
 

« first day (1377 days earlier)      last day (3572 days later) »