« first day (446 days earlier)      last day (4507 days later) » 

5:00 PM
I have no idea what I'm saying.
 
What??
 
@FredOverflow That's my reaction when I read what I wrote.
You're assuming only assert(CHAR_BIT == 8);.
 
To get rid of bar you could use std::conditional. Not sure if it would count as improvement.
 
sbi
To throw my hat into the ring, too: I must be doing something wrong with this, but I can't find it.
 
5:03 PM
Typelists. That's so 2010.
All the cool kids use parameter packs these days.
 
sbi
@RMartinhoFernandes Actually, this is more like 2002.
@RMartinhoFernandes I'm not a cool kid. I'm a grumpy old man.
 
Isn't the problem that your if_ is strict?
Sorry, about that, Haskellspeak. Not-lazy?
 
Ell
does std::unique_ptr automatically call new?
 
Ell
kk
 
5:06 PM
It automatically calls delete.
 
Ell
i dont really know much about smart pointes
so when its constructed, it points to garbage? or null?
 
sbi
@RMartinhoFernandes None of my ifs are lazy, they are all hard-working. IOW: What are you talking about?
 
@sbi if_< N == sizeof(Head), Head, typename find_N_byte_type<N,Tail>::result >::result evaluates both Head and the recursive call.
 
sbi
@RMartinhoFernandes Ah! Oh. Mhmm. Does it?
 
Dunno, just asking.
I remember reading about some similar problem once.
 
sbi
5:09 PM
@RMartinhoFernandes I don't think I ever used any other compile-time if than this, and I'm sure I had this working once.
 
But at least one of the problems is that if_ has a Result member, not result.
Yep, I was right. It was the strictness.
Adding some laziness fixes it ideone.com/JfAPE.
 
sbi
@RMartinhoFernandes Indeed. I must have overlooked that when I copied together fragments from different old sources. :-{
 
See, knowing Haskell helps.
 
sbi
@RMartinhoFernandes Oh, you lazified it, right?
 
Ell
5:14 PM
hm
 
sbi
@RMartinhoFernandes Thanks! @Stacked, you copy?
 
Ell
I cant assign unique_ptr can I?
 
sbi
@Ell To what?
 
Ell
or if so, how?
 
@Ell You can move.
 
Ell
5:15 PM
@RMartinhoFernandes how exactly
 
std::unique_ptr<int> a(new int);
std::unique_ptr<int> b(new int);
a = b; // error: cannot make copies
a = std::move(b); // ok, moving is fine
a = std::unique_ptr<int>(new int); // ok, rvalues are moved
 
Ell
erm well say I have unique_ptr<T> and I dont construct it in the initializer list (in class constructor) I need to assign to new T
kk
 
But a.reset(new int); is better.
 
Ell
hmm still get compile errors
 
Can you show some code?
 
Ell
5:17 PM
yeah, should I put it on pastebin?
its simple though
 
If it's more than a few lines, yes.
 
Ell
and also, the compile error is on both pointers
not just mMenuBar
 
Why not construct it on the ctor initialization list?
 
Ell
i have to go now but I will be back! I know this is some silly mistake :o
 
What you want is reset. But I'd just put it in the initialization list.
mMenuBar.reset(new wxMenuBar);
 
5:33 PM
@sbi: here's a C++11-ish version of your code: ideone.com/BX6sS
 
sbi
@RMartinhoFernandes Ah, indeed, so much terser! Thanks! I should find the time to play with C++11...
 
Ah, I can get my lazy_false with standard library stuff: ideone.com/a3p7Z
But its purpose is not as clear now.
 
Is this a correct use of a c++ lambda? pastebin.com/MXfjpPUQ
 
Looks fine (assuming the signature is compatible with what async_accept expects).
Oh, and assuming the lifetime won't cause issues.
Given the async there, that looks likely.
 
Yeh, I just saw that, conn will be destroyed by the time it's invoked, that won't work
if I give Connection a move constructor and use [=], that should fix it?
 
5:45 PM
Lambdas suck about moves.
 
how about [=std::move(conn)] ?
 
Doesn't work either.
 
doh
 
It's painful.
It would probably be easier with bind. Something like std::bind(handle_accept, std::move(conn), acceptor);.
 
That will use the move constructor?
 
5:47 PM
But that would require changing handle_accept to take the connection by value.
 
Ok, I can do that
 
Is the lifetime of acceptor "safe"?
 
seems like the best option
yeh, it's in a vector that's a member of the class
 
Oh, I'm not entirely sure about that bind thing. I haven't used bind yet, so I can't vouch for it. It's just something I would try if I had your problem.
 
I'll test it first, and let you know how it works
 
5:50 PM
Put an output statement in the move ctor so you know it worked :)
 
Good idea :)
 
Does anyone here have an SO careers profile?
 
btw if you define a move constructor, the compiler will not create a default copy/assignment constructor?
I think I read that somewhere on a boost list
 
5:51 PM
Do they send out the invitations in batch? I made it to 150 completeness on my career profile but don't have any invites.
 
@robjb It's not instantaneous. It took me about an hour or two.
 
Ah
 
@Eloff If you still want them, you can still ask the compiler to generate them: foo(foo const&) = default;
But I'm not sure that makes sense for a connection class.
 
It usually doesn't make sense if you want move semantics
 
I think this is a nicer looking resume than I've ever had before... black and white is so boring. :p
@RMartinhoFernandes Is your CV public?
 
5:55 PM
Not sure. I think so.
Yep.
It even has 3 views. Awesome.
 
Is anyone familiar with the details of valgrind?
Is there a way to make its malloc() return randomized addresses?
 
> Written 655 answers. Active in c#, c++, .net, c, regex and 37 other tags.
I don't want this on my CV!
regex?
 
@RMartinhoFernandes Mind if I see? I'm looking for inspiration to improve mine
 
myclass followed by void is illegal, did you forget a ; ?
 
6:00 PM
I don't think that's the public URL
 
I need a personal statement.
 
suddenly I imagine my compiler in a tux looking like jeeves
 
I hardly can come up with something better than "I'm a dude that writes code."
@robjb Oops. I just clicked "public view".
 
@RMartinhoFernandes I like to see that you're passionate about what you do when I read a personal statement in a resume.
Something that shows you're not just a code monkey
 
6:02 PM
Also, I should probably use a photo of mine instead of Robbie. I wonder if I can change my gravatar just for careers.
 
Ah, yours is very SO-content heavy. Mine not so much.
 
@Eloff And what do you think shows the difference?
 
@RMartinhoFernandes std::bind works with std::move and a function that takes the argument by value. Thanks
 
@robjb I guess I could detail my previous job and my academic projects.
I really suck at this CV things.
 
Something sincere and passionate, not too cheesy. Let me check what I put in mine
 
6:06 PM
"I'm a dude that likes to program. Some people say I'm good. You can either take their word for it, or talk to me."
@Eloff Most of the things I see in other people's CVs sound cheesy.
 
yeh, you have to flirt with cheesy, there's a line somewhere
if it's too cheesy it sounds fake
 
0
Q: tuple as function argument

samI am a little confused if it possible an how to use a variadic tuple as an argument in a function and how to initialize it. template <typename T, Arg ...> void foo (int a, std::tuple<T, sizeof(Arg)> TupleTest); ... foo(TupleTest(2, "TEST", 5.5)); How could that be impl...

 
I feel like it should include something about your goals. Mine will probably include text along the lines of "I'm looking for a position that leverages my existing skills and provides opportunities for professional development."
 
I'm a little confused abotu that question
 
@robjb See, that sounds cheesy to me.
It doesn't really mean anything, does it?
 
6:09 PM
@robjb you just lost me
 
That's just what everyone writes.
 
exactly
if you don't stand out, I might not ask you for an interview
 
talking about CVs. @jalf helped me with mine, which is now pretty nice, if you want an example, I don't mind sending it to you @RMartinhoFernandes
 
Can't just put a banner on top: "Pretend this says all the things everyone says, like 'I want world peace' and all that crap"?
 
something short, original, that shows passion and I'll schedule an interview to find out more
 
6:10 PM
@RMartinhoFernandes Your full is so long :)
 
Hmm, I guess I can see that being cheesy
 
@TonyTheLion If you're ok with that, my e-mail is my real name (no R. at teh start) with a dot in the middle, at gmail.
 
I'm a good programmer because I'm passionate about programming. I love learning about every aspect of software development.
 
At the same time, though... not all jobs encourage employees to learn on the job.
 
6:12 PM
you can do better, but if I saw that I'd give you an interview
 
How would you state that without being cheesy?
 
@RMartinhoFernandes well I don't mind, as long as it doesn't float around on this chat
 
@TonyTheLion Don't worry, I won't. I'm not sure you're aware, but I already know your real name. (I believe it was Als who spilled the beans once).
 
@RMartinhoFernandes oh lol, yes I remember
 
Ell
ugh my ruby is messed up!
 
6:14 PM
@RMartinhoFernandes ok sent
 
Ell
in `irb`
RUBY_VERSION = 1.8.1
in `irb1.9.1`
RUBY_VERSION = 1.9.2 #<--- WTF?
 
lol I think that would be a versioning error
 
Ell
yes :P
 
@TonyTheLion you forgot that non-geeks then complain on losing their manual work job.
 
hahah
 
6:16 PM
To come back to typedef vs builtin types and why the hell I even care: I'd like my output to handle char, char and char16_t, and char32_t as characters, not integers. I can't possible to that with typedefs, or can I?
 
For a moment there I thought I had deleted my gmail password from my password database. I almost panicked (it can't be found anywhere else, not even my mind). Turned out I just needed to scroll up a bit.
@rubenvb Nope.
 
@RMartinhoFernandes So I'll have to rely on char* types being builtin, which is for now only true for GCC and clang. Damn. MSVC doesn't have any others I could rely on probably?
 
You'll find that in most compilers int8_t x = 65; std::cout << x; will print A because of that crap.
 
@RMartinhoFernandes damn that would seriously suck if that happened, though you could just request a reset, no?
 
@TonyTheLion Possibly.
I'm don't really know how that works with Google.
 
6:19 PM
maybe I could misuse wchar_t for the char16 definition
 
@RMartinhoFernandes They usually link it with a secondary e-mail account if you provide one, which can be used for recovery
 
I don't think I have that.
 
you don't have a secondary email?
 
Ell
get it :P
They have my mobile number, you could use that?
 
@TonyTheLion I don't think I have one setup in gmail.
 
6:20 PM
I have a public account which I use for all internet forums, etc...
oh I see
 
@Eloff If I wanted to say that I prefer an employer who actively encourages employee development (for example, by sending them to conventions), how could I do that without sounding cheesy? Or should I leave that kind of thing out of the personal statement?
 
Well, I probably have, because my account is from the time of the invites (when it was only 1000MB of space!), but the account I used to get the invite at the time is long gone.
 
meh, I'd never give my mobile number to a Google or FB.
oh lol, I think my mobile number is on my CV
:/
 
Heh, they both have mine
 
@robjb "If you send me to conventions and such, it makes me happy".
See, that's how I'd put it.
 
6:22 PM
@RMartinhoFernandes Hahaha that would do it. :) That doesn't sound cheesy in the least.
 
@TonyTheLion Oh, yes, it is :S
 
hahah :P
 
@robjb you should express an interest in learning/self-improvement, but you don't have space to be more specific. You have to keep it short because people don't spend long reading resumes.
shit I forgot the coke in the freezer
 
is there a zero-overhead struct-and-member approach that can emulate missing builtin types, but otherwise keep their properties (specifically char16_t and char32_t? Perhaps an abomination of enum class?
 
@rubenvb enum char16_t : uint16_t {}; might do it!
You get all the same builtin conversions, but it's a distinct type (i.e. overloadable so streams treat them differently).
Not sure how that'd work with literals though.
 
6:27 PM
@RMartinhoFernandes yeah, that'd be important too :/
 
it could have been worse, I could have walked out the door with my cell phone and locked myself out
 
I don't think you can keep u"blahblah" working.
@Eloff Haha.
 
:)
 
It was an important call!
And I'm RAII-enabled, so I always close the door when I leave a room.
 
@RMartinhoFernandes damn. Maybe I should ask it as a full-blown question. Seems important enough
 
6:29 PM
yes, but you should have used a smart ptr when you allocated your keys
 
You can have your own "blahblah"_u but it's not the same :(
@Tony: Is that level of detail good? People always told me to not write much in a CV.
So I always just describe my projects in a one-liner.
Maybe I'm pushing it too far.
 
@RMartinhoFernandes well I've had good responses for this CV, so I'm guessing it's good.
 
Like "Boo: implemented some matching constructs" plus a link.
 
Point is, that if you don't put it on you get asked anyways. So if it's on, then they don't have to ask
and some detail shows what you did, and also then shows what you know
 
@TonyTheLion Yes, the few times I got an interview they asked.
 
6:33 PM
They asked on every single interview I did
so that's good enough reason to put it in
 
Well, I only ever got two so far :)
 
I've got about 6
 
So you're thrice as experienced as I am!
 
@ChrisP see, that's why we don't need to set precedents... nearly on my ignore list (that would be the second entry)
 
6:35 PM
When we talk about music here, it's usually not troubleshooting song database software.
 
lol
so I think I've pretty much failed miserably at keeping my real identity secret, because most regulars know now
:/
 
This room is forever off-topic, but its denizens usually don't like it when people come here and introduce themselves with an off-topic question.
 
Well, here goes...
http://stackoverflow.com/questions/8747855/fully-emulating-missing-distinct-builtin-types-specifically-char16-t-and-char3
 
@rubenvb I'll +1, but I really don't think I have an answer.
You should mention the importance of built-in vs user-defined conversions.
 
ok
 
6:39 PM
If you write a type that emulates it with an user-defined conversion, it will fail somewhere else that needs a chain.
 
How so? In some arithmetic or implicit conversion?
I need a solution, not a theoretical "no, it's impossible" :s
 
struct foo { foo(int); }; char16_t c; foo x = c; works.
But if you emulate it with struct char16_t { operator uint16_t() const; }; it won't work because it needs two UD conversions.
 
here's the wording for the literals (euh, character literals):
The universal-character-name construct provides a way to name other characters.
hex-quad:
hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit
universal-character-name:
\u hex-quad
\U hex-quad hex-quad
 
std::bind(foo, std::move(movable_but_not_copyable)) // cannot access private member (the copy constructor)
Is it not possible to define a movable but not copyable class?
 
@rubenvb Thanks. I rewrote it without the literal anyway.
 
6:43 PM
btw, foo is: void foo(movable x)
 
@Eloff Yes, you can have movable but not copyable class. The problem must be something else.
 
Ah you can define it, but it doesn't play nice with bind it seems
 
Maybe std::bind doesn't work as I expected. You might need a "moving reference wrapper" or something.
That sucks.
 
if I make the copy constructor public I can see that bind(foo, move(movable_instance)) calls move constructor followed by copy constructor
 
Ah. It gets moved into the function object, and then copied out to pass to the function itself.
Fuck.
 
6:46 PM
@Eloff careers.stackoverflow.com/robjb <= short enough? still cheesy?
 
You do need a wrapper.
> It makes me happy when you send me to conventions.
I know it's my line but it sounds a bit like you don't want to work.
 
haha: "It makes me happy when you send me to conventions."
 
Yea, I pretty much ripped your statement directly
 
I agree with @RMartinhoFernandes here, it's good, but somehow sounds like you prefer going to conventions than working. There has to be a better way to say that.
 
Alright
 
6:50 PM
void foo(movable& x) and std::bind(foo, std::move(y)) compiles and runs, but I think it must be squarely in the realm of UB.
 
Actually, it's probably fine.
Assuming there's a move ctor call.
 
It does call the move constructor
 
y gets moved into the function object and then the one in the function object is passed by reference to the function.
 
I guess the movable object now lives inside the std::bind instance
 
The function object lives as long as you need to call the function.
@Eloff Exactly.
 
6:52 PM
well that seems perfect :)
 
"Keeping up-to-date on current technologies is critical for any software developer; just send me to the occasional convention to keep me happy." <= now?
 
too long, the first part tells me what I already know
 
Thought that might be the case
My writing is usually very formal / perhaps too wordy, this personal statement thing is tricky.
 
how do I printf a unicode string literal?
a real const char16_t* thing.
 
in Room for Lucifer and Paresh Mayani, Dec 26 '11 at 6:39, by Lucifer
Hi, please visit my profile & vote up some questions & answers given by me
Spam!
> This account is temporarily suspended for rule violations. The suspension period ends in 5 days.
Oh.
 
6:55 PM
@robjb congratulations on disliking .NET and VB.
 
@fabianhjr just VB.NET, I do like C#
 
@RMartinhoFernandes yep, you should never ask for undeserved upvotes. You could word it like: "If you liked this response please accept it" if they do not accept an answer for a while.
Crap, they also reset Lucifer's reputation to 1.
 
That's temporary as it's part of the suspension package.
 
in case he "hacks around" not being able to log in?
 
I used to ask for accepts if the OP is new and says "thanks!" or "this solves it" and I have the highest voted answer by a large margin... But even then I feel kinda dirty doing so.

So now I only do it, if it denies me the enlightened badge.
 
6:59 PM
haha. Whore.
 
Bahaha
 
lol ok @Mysticial
 
@fabianhjr Badge whoring is somewhat more fun than rep-whoring... :)
 
Yes I know. :P
I am not /that/ new to SE. I only don't have much time.
 
I shall use the term "badge hoare" from now on.
 
7:01 PM
28 consecutive I am so close to a great badge. :D
 
At least that's how I pronounce Tony's second name.
 
Rep-whoring takes too much time... Badges, you just sit around until you find an amazing question to answer...
 
I am so close to get the Enthusiast badge. :D
@Mysticial look at the right side, you got a star. :P
 
@fabianhjr lol
 
Is dress code common in the software industry?
 
7:05 PM
@RMartinhoFernandes I would quit if there was a dress code while sining 'Murica Fuck Yeah.
 
I'm not asking if there should be (it's an abomination). I'm wondering if it's common.
Someone just tauted "no dress code" as a good thing about working on a certain company.
 
No, at least not in Mexico City. Dunno about your non-yet-disclosed location.
 
@fabianhjr He's Portuguese
 
Missing an "u".
Also, this is not a Portuguese company.
Damn, I missed an "u" as well.
 
Haha
@RMartinhoFernandes Here (US) I imagine that it depends on the size of the company
I would expect dress code for most large companies (except possibly FB, Google) but not anywhere else
 
7:09 PM
@robjb small companies don't care, big companies ask you to be creative and show how much you love your work, except MS, then there are the medium companies that started giving a fuck and then realize it doesn't matter at all.
 
Heh
 
MS doesn't have a dress-code either. But everyone, I mean, EVERYONE wears blue jeans...
 
lol, I guess I'd fit in, that's about all I own
 
:/ I know it is anoying, they also wear any con t-shirt they have and only those t-shirts.
 
If I get a hire offer from someone with a dress code I'll probably turn it down
 
7:10 PM
(While singing 'Murica Fuck Yea)
 
You can wear something other than blue jeans? That's physically possible?
I never read "Where the Wild Things Are", but I already like its author, Maurice Sendak. Q:"Why don't you do Wild Things 2? Wild Things 1 was such a success" A: "Go to hell! Go to hell. I'm not a whore."
 
I got black and Beige jeans mostly.
Then my brother only want to wear white ones. So yes, it is physically possible.
@RMartinhoFernandes can you tell me the time in the video?
 
lol, not the tone and timing I expected
 
Any author that won't make a sequel based on success of the original gets massive bonus points from me.
 
7:21 PM
Christ, making a graphics engine is hard, specially when you are just starting with Qt and OpenGL for the first time. ):
 
I wouldn't guess.
 
Arrgh, don't like to "life-sucking" sites!
I almost clicked it!
 
What are you doing in a SE site then?
 
1
Q: Software licenses in practice

FarmorAlmost all questions and information on both SO and "Google" describes how different licenses works and what license to choose for your work? But how do they work in reality. Almost everyone I have spoken to have vastly different thoughts of how they work, including hard core open source devel...

Does that belong on programmers?
 
7:28 PM
:/ I would guess to a Business or Startup one.
 
Why can't a license text be just something like "Do as you please, but give me credit". Why the fuck do we need legalese? Is this not enough to describe things? Sometimes I think lawyers invented legalese just to make sure normal people would need them.
 
@RMartinhoFernandes you could technically never give a license and only have that text on your sourcecode. If someone violates you could sue him in the basis that he does not have a license to use it.
 
Yes, and I would need a fucking lawyer to sue them.
 
Then why do you want a fucking legalese or not if your aren't going to do anything about it?
(Sorry, when someone says fucking I start adding it as an adjective for every /fucking/ word)
 
I was asking why we need piles of obfuscating text that only lawyers can comprehend, instead of simple text that everyone can.
 
7:38 PM
Why do you need to sanitize input, check security clearance, and limit the access and scope of functions?
I could surely decrease the LOCs by using unsafe methods and makying everything very simple.
 
Is that relevant?
What's wrong with "Do as you please, but give me credit"?
 
There is nothing wrong, it is simply vague and prompt for abuse, therefore man invented legalese, a combination of an overly formal language with every single permutation mankind has think of doing covered.
 
How can you abuse it?
 
You can do anything you want, but give credit. Remove that requirement for relicencing, relicense to self, done.
Now there is no requirement, so legalese also covers how you can relicense something.
 
Why can you remove that requirement?
 
7:44 PM
You didn't said he couldn't relicense it, he gives himself a new license under new terms.
 
That tells me "we need legalese because people are dicks." That actually makes sense.
 
@RMartinhoFernandes exactly
 
Indeed, that is why it is a too formal language which covers every premutation known to man of what you could do with something,
Here look at the GPL clause 10 on licensing: gnu.org/licenses/gpl-3.0.txt
legalese is the one that stands and is argued upon in court.
 
Yes, and it's also the reason some murderers get away on technicalities.
 
:/ at least you don't have oral trials. Somewhat acceptable translation: translate.google.com/…
 
7:50 PM
Well, I would say it's because natural language is not precise
 
Just think of it as hacking, you want your code to be secure and manage everything properly; it is the same situation with contracts and you don't want people to hack their way out of a contract.
 
I see legalese as an attempt to rectify that by adding as much precision as possible to any and every statement.
 
Indeed
 
If natural language was as explicit as machine instructions, there would be no ambiguity and we would have no need for legalese
 
I don't know, I find "You must not kill people." pretty explicit.
 
7:52 PM
"You cannot" implies an inability to do so
 
Sorry, not a native speaker.
 
So is it a statement about someone's ability or a statement about what they're allowed to do?
Ah, alright
 
-8
Q: Delete this post

iPCPlease delete post. Please delete post. Please delete post.

Should that be rolled back?
 
And I agree with you @RMartinhoFernandes, legalese is pretty rediculous. Let's roll back to the ten commandments.
@Mysticial From seeing a previous discussion on MSO, I think yes
 
@Mysticial I just did.
@robjb Well, I do think some of those are really fine. Like the "Thou shall not kill" (or however that was phrased) thing.
 
7:57 PM
@RMartinhoFernandes Agreed, my statement was only partially joking.
 
@robjb machine instructions are only as ambiguous as they are interpreted by the machine.
Which means, that all the legalese is on the machine, instead of in the machine code.
 
@Xaade But the machine's interpretation of the instruction is well defined
Err, I think you're taking my analogy too far :)
 
That's the problem with analogies.
 
@robjb Is it? You can add or remove peripherals, and the way a machine instruction is carried out physically, can change.
 
There's always someone that makes a hammer out of it and then it's like everything is a nail. (see what I did there?)
 
7:59 PM
lol
 

« first day (446 days earlier)      last day (4507 days later) »