« first day (746 days earlier)      last day (4217 days later) » 

12:03 AM
@Xeo As things are you'll have a problem because there are two levels of packs and it's problematic for expansion.
Try recursive delegating constructors. But that's not in place.
Yeah I think it's fucked.
 
@LucDanton I can't think of why that would be allowed other than it'd be impossible to diagnose.
 
wut?
 
@LucDanton I'm tired, if I said soemthing that doesn't make sense, let me know and I'll go back to what I'm suppoesd to be doing.
 
@MooingDuck You can delegate as much as you want. But the object is considered constructed as soon as any constructor is finished executing.
 
It's the function template kind of 'recursion'.
 
12:10 AM
@LucDanton oh, that
I was thinking mutually recursive
and trying to think of any usage for such a thing
but there's no way to put in an escape, other than excpetions
and that'd be silly
escape = base case
 
user142019
It’s funny how in Futurama several “futuristic” things are shown in the year 3000 that are already here now in 2012.
 
Some kind of self(/* args */): c ? self(foo) : self(bar, baz) {} syntax was discussed on a Standard list not too long ago. Although it was in the context of bases, it's much the same.
 
@Xeo post it in a comment on stackoverflow.com/q/13148772/845092
 
@Xeo, sweet!
 
Xeo
12:18 AM
Why comment? :P That thing's worth an answer.
(together with an explanation why std::initializer_list won't suffice)
 
That's cool! Now I really need to sleep, cheers!
 
Xeo
bb
 
@Xeo for_each(uncurry(emplace_in(c)), std::forward_as_tuple(/* tuples */))
 
Xeo
heh
Not everyone has such a library at their disposal :P
 
I need to make operators version of those for nested situations.
E.g. for_each(operators::for_each {}, /* things */ ))
@Xeo Don't you get tired of putting indices everywhere? I know I do!
How come I don't have a curry tool!
 
I'm not sure why I put unique_task inside functional/, but okay.
 
user142019
LOL
 
Xeo
@LucDanton What was the operators namespace originally for? :P
 
user142019
> We’re in the heart, also known as the love muscle.
 
user142019
> Where the food is digested.
 
Xeo
12:34 AM
0
Q: How do I initialize a vector of unique_ptr objects?

OmnifariousI've tried this, but get complaints about calling ::std::unique_ptr's copy constructor. That doesn't seem right. :-( #include <vector> #include <memory> int main() { typedef ::std::unique_ptr<int> qint_ptr_t; ::std::vector<qint_ptr_t>{ {new int(5), new int(6) } }; ...

close votes
 
@Xeo Surprisingly enough, operators. Like plus and so on.
 
Xeo
@LucDanton Heh, don't you think it's time to rename that, if you want to have for_each and similar stuff in that?
 
I don't want for_each and so on in them, I want operators version of for_each.
Much like I have uncurry and operators::uncurry.
 
Xeo
Sure, but they're not operators, are they?
 
I can't rename the namespace to functors, that's no better.
operators::for_each is to for_each as operators::plus is to +!
 
Xeo
12:37 AM
Naming sure is hard, heh.
 
What I mean is, operators::plus looks, I think, nothing like an operator.
 
Xeo
Make for_each a class and do normal for_each operation in its ctor that takes arguments, let it have a default ctor, and an operator()!
@Stacked: Atleast edit your answer to code to make it look nice. :P
 
@Xeo How is the result reported?
 
Xeo
There is no result, obviously. :3
 
Well that's where you're wrong! for_each traditionally returns the functor.
 
Xeo
12:49 AM
Woah. I thought it returned void. :(
 
It's not that useful for std::for_each because you don't know what the result is a copy of. Mine has a defined order of forwards.
Oh, the order is specified now. That's sensible.
 
this is probably well-known already, but herbsutter.com/2012/10/29/…
 
it is.
I was so excited that I didn't even check.
 
1:07 AM
Wasn't there a recent launch for a site that reviews and rates EULAs and/or TOS? I can't locate it.
 
@Xeo I was kind of overwhelmed by fatigue at that moment. I should really fix it.
 
Xeo
@LucDanton On SE?
 
@Xeo No.
 
@LucDanton tos-dr.info
 
@Rapptz Thank you.
 
1:14 AM
While the site is cool, there aren't that many ratings so it's just there.
 
1:25 AM
@Rapptz It looks very new. Hopefully it catches on and more sites get ratings.
 
Yeah it's new. It had a crowd source campaign and everything yet it lacks momentum.
 
Bad domain name
tos.info was taken?
 
I take it you didn't click on it.
 
So it is taken
 
@Pubby Still, the domain name fits.
 
1:29 AM
I'm not sure why it matters because the service is called tos-dr
Related, the url didnotread.org redirects to it.
 
1:54 AM
1
Q: return const value for built-in type

FihopZz Is it a good custom to return a const value for built-in type? The reason is: const int F() { } int y; F(x) = y; The above code will not compile if the return value is const. However if it's not, F(x) = y; is a very hidden mistake. Since it has no meaning to assign a value ...

Is there a good reason? I saw Alf do it in an answer a few days ago but I wasn't sure why.
 
The current answer would make sense: F(x) is not a lvalue, so the assignment is illegal anyway.
 
user142019
Favorite websites y u hosted in New York.
 
Xeo
@EtiennedeMartel Yep, rvalues for built-ins are not assignable
 
But what difference is there between int and const int?
 
Latter is not assignable.
What am I saying, neither is the former. Oh well.
 
2:07 AM
@Pubby I think I know what answer you're talking about. Alf used it for void foo( const int i ) { ... }
 
Oh, parameter makes more sense
 
const on the return value is worthless in this case cause I can still do int x = F(); x *= 2;
 
user142019
@Praetorian it does make sense if you’re returning a reference or a pointer to a const object.
 
user142019
(But yeah, making the pointer itself const is kinda silly.)
 
@Zoidberg'-- Of course, but the function in that question is returning by value
 
user142019
2:12 AM
lol
 
user142019
// They told me to use std::unique_ptr!
std::unique_ptr<myclass> *answer = new std::unique_ptr<myclass>(new myclass(42));
 
You need to wrap that in a shared_ptr for safety.
 
user142019
assert((**operator->(answer)).getValue() == 42);
 
user142019
Fuck pointers.
 
@Zoidberg'-- That's not valid.
answer->operator->(), and then you have one dereference too many.
 
user142019
2:17 AM
answer is a raw pointer.
 
user142019
I can’t wait till Thursday. I’ll see non-parents people again!
 
The A.V. Club is an entertainment newspaper and website published by The Onion. It features reviews of new films, music, television, books, games and DVDs, as well as interviews and other regular offerings examining both new and classic media and other elements of pop culture. Unlike its parent publication, The A.V. Club is not satirical, though much of its content maintains a similarly humorous tone. The A.V. Club print edition is bundled with The Onion and distributed as a free publication in Indianapolis, Philadelphia, Madison, Milwaukee, New York City, Chicago, Minneapolis-St. Paul,...
 
user142019
Oh The Onion.
 
Non-satirical part of the Onion.
They are quite serious when it comes to music and movie reviews.
 
user142019
Oh they are serious. How boring.
 
user142019
2:25 AM
Seriously, who is serious?
 
user142019
Man, #python is boring.
 
@StackedCrooked Well, entertainment is serious business.
 
user142019
Don’t be so serious, serious.
 
user142019
Fuck it.
 
2:28 AM
Image not found?
 
user142019
It’s about 5 MB anyway.
 
Do it.
 
user142019
 
user142019
Terripun, I know.
 
user142019
Man.
 
2:30 AM
@Zoidberg'-- Because he ain't gonna be attracting no chicks
 
user142019
Writing porn sites is boring.
 
user142019
I can’t think of any interesting projects.
 
Creating a porn site involves .. writing?
 
user142019
Writing code, that is.
 
porn code?
 
user142019
2:31 AM
Ruby code.
 
Ah, that's pretty much the same, isn't it?
 
user142019
Nah.
 
user142019
I prefer Haskell.
 
user142019
Or Python.
 
user142019
Ruby is for pussies. And I have a dick, not a pussy.
 
user142019
2:32 AM
I could write the website in Haskell or Python.
 
user142019
But I’d rather do something non-webdev.
 
user142019
But everything already exists. :<
 
Dammit my application's user count has dropped to 1.801. I used to have a glorious 1.800 or something.
 
user142019
Ehm, 1801 > 1800.
 
@Zoidberg'-- So you want to be a museum guide?
 
user142019
2:34 AM
WTF?
 
Just pollin.
 
user142019
No. XD
 
My application has been downloaded 382 times. Which isn't bad considering I only posted it in one place.
 
user142019
I wish I were born twenty years ago, when people still wrote desktop software rather than crappy web apps and terrible games.
 
@Rapptz Where did you post it?
 
2:35 AM
A forum. It was a very niche app lol
 
RIP MooingDuck.
 
The duck let out it's last glorious moo..
Zoidberg however...
 
user142019
I’M ALIVE
 
user142019
I prefer Hypnotoad over Psyduck.
 
2:38 AM
1 message moved to bin
I feel bad binning that. :)
 
no fun
 
user142019
 
user142019
Anyway.
 
@Mysticial I can ban stuff for you when I get's too hard on ya.
 
user142019
I deserve a prize for posting the first binned message on Halloween.
 
2:41 AM
@StackedCrooked lol, why was that so funny
I need a neat name for my gui library
 
Dammit, my brains are starting to leak.
 
user142019
@Rapptz Zoidlib
 
@Rapptz gushin granny (This article is a lie because it doesn't mention that the real winning entry was "Hitler did Nothing Wrong" (sic)).
 
Well I ask mainly because I want a decent namespace lol
 
user142019
zoid::
 
2:43 AM
Pass on zoid.
@StackedCrooked Yeah I remember that forever ago in internet time.
 
user142019
I want to write software.
 
It's so funny. Calling a mountain dew drink "Hitler did nothing wrong." I couldn't stop laughing when I first read that.
 
Shame they didn't go with it.
 
user142019
You know, I’ve always liked chemistry.
 
user142019
I’ll write something that has to do with chemistry.
 
2:46 AM
Have you guys heard Jessie Ware's album?
 
user142019
Who is Jessie Ware?
 
Chemistry is my least favourite of the sciences.
 
user142019
Or maybe something with physics or mathematics. I love mathematics.
 
How far are you in math?
 
user142019
2:47 AM
@StackedCrooked That’s not my kind of music.
 
@Zoidberg'-- She is a contemporary singer.
 
user142019
@Rapptz How do I measure that?
 
@Rapptz 42
 
user142019
Math is a very broad subject.
 
In the US we follow a curriculum in a certain order up until a certain point.
 
user142019
2:48 AM
In the Netherlands you have Wiskunde A, Wiskunde B, Wiskunde C or Wiskunde D in high school.
 
Jessie isn't that pretty IMO, but her voice kinda sticks.
 
user142019
And I don’t follow mathematics on my school.
 
Lol, what do you learn then?
 
user142019
I did Wiskunde A because it was the least effort.
 
user142019
Informatica, HBO-niveau. Bachelor.
 
2:49 AM
HBO-niveau isn't something you should mention as if it's something to be proud of :)
 
Pre-Algebra, Algebra 1, Geometry, Algebra 2, Pre-Calculus, Calculus 1 (Derivatives, Basic Integration), Calculus 2 (Advanced integration, taylor series, sequences, converge/diverge), Calculus 3 (Multivariable/Vector Calculus), then Differentiable Equations.
 
@Zoidberg'-- (I've been there ;) )
 
user142019
@StackedCrooked I know. I’d rather not go to school at all.
 
user142019
I want to work.
 
then after that you get to do whatever.. like linear algebra and analysis
 
2:49 AM
@Zoidberg'-- I know the feeling all too well.
:6027030
@Rapptz So you are in a US CS college?
 
user142019
@Rapptz Oh we got basic algebra, chances and some basic geometry in high school.
 
We learned how to calculate the volume of a carton box.
 
I'm a biomedical scientist. I graduated a while ago and I'm getting my PhD.
 
That's quite cool.
 
user142019
I used set theory on my final exam to solve a problem even though we’ve never had it in class. :P
 
2:51 AM
I'm jealous of two kind of people: electronic engineers and bioengineers.
 
user142019
SOFTWARE ENGINEERS
 
I feel like I'm missing out of so much interesting stuff.
 
I'm jealous of physicists. They get to do some cool stuff.
 
@Zoidberg'-- Yeah, I can crunch sofware.
 
user142019
I feel like I’m wasting so much time at school learning absolutely nothing at all.
 
Xeo
2:52 AM
0
A: in-place vector construction from initialization list (for class with constructor arguments)

XeoList-initializing std::vector in your snippet is no different from doing the following (if initializer_list had a public non-explicit constructor or std::vector accepted an array reference.): // directly construct with the backing array of 'initializer_list' std::vector<A2> v(alias<A2[]...

Woot, finally came around to formulating and posting it as an answer. Any visible errors?
 
user142019
We learn how to do variables, functions, if-statements and for-loops in JavaScript and next semester we’ll learn Java and OOP. =_=
 
user142019
======_======
 
Physicist are definitely cool, however they can be a kind of "all the talk without the walk". In the end it's the engineers that perform the real work.
 
user142019
psyboom.gif
 
They get to work in interesting places most of the time.
 
2:54 AM
> We learn how to do variables
Dear God.
 
user142019
I’m the only non-noob in my class. XD
 
In my university they used to make you take C as a pre-requisite for C++.
Don't know if it's still like that.
 
I hope you have a teacher who isn't bothered by you doing something else during his class.
 
user142019
@StackedCrooked Actually, I do my JavaScript homework in Haskell so I actually learn something.
 
user142019
He said I could skip the lessons if I didn’t like them.
 
2:55 AM
You're a clever chap aren't you. When I was 17 I was nowhere near your level.
 
user142019
But I’m getting sick of vacation already and the first lesson after vacation is development. So I’m not skipping this time.
 
user142019
@StackedCrooked I started at 11 with cplusplus.com. :P
 
I started at 13 with C64..
 
user142019
We had a JavaScript test two weeks back and I got 29/30 right. :P
 
So, it's official, I'm lagging behind.
 
user142019
2:56 AM
The only one I got wrong was because I didn’t read the answers well enough.
 
It can be a challenge to not appear to smug to tour teacher even if you are more knowledgeable than him.
 
user142019
My first IDE was Dev-C++! :D
 
user142019
@StackedCrooked I correct his mistakes and he appreciates that.
 
user142019
Or sometimes he asks me if he isn’t sure. :P
 
2:59 AM
That's cool.
Apparently he's not a prick with low self esteem.
 
user142019
Fortunately I’m terrible at teaching.
 

« first day (746 days earlier)      last day (4217 days later) »