« first day (941 days earlier)      last day (4005 days later) » 

9:00 AM
Someone posted food and I'm not hungry. That's a first.
 
Coliru VPS is dead again.
 
Rebooting.
 
> He has enunciated a set of directions for the TomTom in-car navigation system. This allows itself humorous notes at non-critical moments, for instance when asking for a U-turn and when signing off: "I'm not going to carry your baggage—from now on, you're on your own" and "Bear right..Beaver left." John Cleese
 
Hi How can I replace char[] with std::replace?
std::replace (s.begin(), s.end(), "abc", "def"); won't compile
Guess only char is supported
 
Xeo
9:12 AM
Hi How about you search SO / Google, and ask on SO instead?
 
@warl0ck char[] doesn't have members begin() and end()
 
use std::begin(s) and std::end(s) instead
 
Xeo
@TonyTheLion I think he means as the replacement chars
 
oh
:/
I suck
 
Xeo
9:13 AM
Anyways, since std::replace is generic and not string-only, it only works with single values.
 
Solution?
Hopefully not with std::find
 
@warl0ck, can you use Boost?
 
I've got a simple question to asks you guys..I'm using Qt to make a simple arithmetic Game..my question is ..should I use a while loop or a timer to run the function that makes the arithmetic problems..any help is appreciated
 
9:26 AM
@H.J_Rios Dunno. If it's a Qt GUI, probably a Form::Timer. You designed the game - you should know!
 
3
Q: Does typecasting consume extra CPU cycles

vishalDoes typecasting in C/C++ result in extra CPU cycles? My understanding is that is should consume extra CPU cycles atleast in certain cases. Like typecasting from float to integer where the CPU should require to convert a float structure to integer. float a=2.0; int b= (float)a; I would like t...

 
lol..yeah its QtGUI I'm learning this coding stuff on my own..I've strugged with things for hours that would take you guys a few seconds of thought to figure out
 
Xeo
@TonyTheLion I just want to hit those people with a clue-stick
Like, seriously?
 
@Xeo OP or the commenters?
 
Xeo
OP
Didn't look at the comments yet
 
9:30 AM
right
 
Oh awesome. The wiki document where I'm putting all my notes on this keyboard handling crap is up to 7 print pages now.
 
0
Q: object goes out of scope before = operation

Yitzhak GoldstineOk, so I have thous objects: Polygon p1, p2; And I have an inheriting class of Polygon called Triangle, and I try to do: p1 = Triangle(temp1, temp2, temp3); // temp 1,2,3 are lengths of sides but for some reason the deconstructor for Triangle is called at the end of construction. Rectangle...

oh ma gawd
that's bad
 
Xeo
if (sides != NULL)
{
    delete [] sides;
    sides = NULL;
}
sigh
 
Xeo
Also, likely no rule-of-three
Oh, and the slicing
sigh
 
9:32 AM
fail
 
Xeo
Can't people just read a fucking book?
 
I know right
seriously
 
@Xeo I read a book once
:)
 
Xeo
Me too
 
9:33 AM
I've read many books.
 
Xeo
I read exactly two books to learn programming (and Effective C++)
 
Then you've probably read more than most noobs on SO
 
@TonyTheLion you done test or am I just really bad at timing stuff?
 
you're bad at timing
My test is at 11:40
 
oh, well hurry the fuck up already
 
9:34 AM
I have a driving lesson in 10 mins
arrggfghhhhh
 
Xeo
hehe
 
> Is there a way to achieve a bypass of an override of operator new?
what?
0
Q: Bypass override of operator new in C++

dan.pIs there a way to achieve a bypass of an override of operator new? Something like this: void* ::operator new( std::size_t size ) { void *p = ( ::operator new( size ) ); // But original, _not_ infinite recursion // do stuff with p return p; } Background: I have some legacy code...

 
Xeo
Your code is all kinds of bad. Please, get a good book. — Xeo 49 secs ago
 
strange... seems every so often, a few of my questions go through rounds of getting bdages :P
 
yea I got lots of popular question badges on some of my questions
 
9:36 AM
mostly recently, a new notable question
 
ahhh cool
 
thats three of notable questions now :)
I ask good
 
You good man#
 
woah, damn rep graph is looking sparse :P
 
Manual memory management? Not knowing about slicing? Manually calling the base destructor? That means you didn't get started properly. Either your course is bad (like most are), or you picked the wrong book. — Xeo 24 secs ago
 
9:39 AM
so yeah... thinking I might set up my server to mine litecoins...
 
damn, someone is pissed
@thecoshman what the hell are litecoins?
 
Xeo
I'm not pissed
 
@TonyTheLion "the silver to bit coins gold"
 
Xeo
Well, I may be pissed, but not at that poor fellow, but at whoever taught him
 
they are a complementary system
in theory better suited to more frequent smaller transactions.
though each litecoin is worth a lot less then a bitcoin, about 0.03 IIRC
 
Xeo
9:41 AM
also the object slicing thingy is not a problem because Rectangle does not add new attributes or new functions, It is there just for the constructor (don't ask me why...that is just the exercise.) — Yitzhak Goldstine 41 secs ago
Oh my gawd.... @JerryCoffin, please, get to that clue-stick-clubbing right about now!
 
@jalf Care to share? <3
 
@ThePhD He's doing documentation, and you want shares?
 
Yes.
 
@ThePhD Uhh.. OK. The Lounge is even weirder than I thought.
 
@ThePhD Not really. It is not happy reading.
 
9:53 AM
@jalf Hehe - if it's software documentation, I don't suppose it will be a best-seller :)
 
It's not even that, as such. It's a big huge listing of all the quirks and bugs and corner cases I'll have to work around, as well as a high-level sketch of how my solution could be designed
 
Sounds fun. :D
Arrgh
This si driving me nuts
DeadMG told me there's some functor-ing that I shouldn't be doing in my functor_chain
But I don't know what! ;~;
Apparently an extra virtual dispatch.. but the only virtual dispatch is in my std::function. >_<
 
Xeo
What do you need std::function for?
 
user1182183
hey guys how can I do enum QueryType(<<= 1) in C++? this gives an compilation error :F
 
Xeo
What?
 
user1182183
10:03 AM
<<= 1, shifts each bit of the next enumerator one to the left
 
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
HHHHHHHHHHHHHHHHHHHHHHHHHH
AAAAAAAAAAAAAAAA
TTTTTTTTTTT
 
user1182183
enum QueryType(<<= 1)
{
	a,//0001
	b,//0010
	c,//0100
	d //1000
};
 
You cannot just put random tokens together and hope they magically do whatever you dreamed of they could do.
 
user1182183
isn't that possible in C++?
 
user1182183
thatn's not random..
 
Xeo
10:04 AM
No it's not
 
enum wat {
  a = 1 << 0,
  b = 1 << 1,
  c = 1 << 2,
};
 
Xeo
I meant that it automatically increases by one left-shift.
 
user1182183
@Pubby hm yeah will have to use that
 
user1182183
@Xeo would be really nice if supported by compiler
 
Xeo
Where did you even get the shift idea from?
 
10:06 AM
@R.MartinhoFernandes that's why standard proposals exist!
 
user1182183
@Xeo from another language where it's totally valid code..
 
@Pubby Yeah, but there's no magic in that.
 
you can do
enum wat {
a = 6;
b, c, d; // 7, 8, 9
}
 
Xeo
That produces something completely different.
 
user1182183
@thecoshman yeah that I do know, but I need bitshifting ^.^
 
user1182183
10:07 AM
you know, checking for permissions in one variable etc
 
@ThePet yeah, you canny do that
 
Xeo
@ThePet Aha. As Robot said, don't just think stuff from one language would magically work equivalently in another one.
 
user1182183
@Xeo yeah, that's such a basic language I thought C++ would support it too heh xD
 
Xeo
wtf
 
Yeah, that's exactly why every other language supports that thing. Wait.
 
Xeo
10:11 AM
I don't even know which language actually supports that
 
> syntax error : missing ';' before identifier 'languages'
^ VS speak for "the type in your declaration is broken"
 
Xeo
lol
 
Context-sensitive parsing be messed up.
 
go home animals, you'r drunk
 
user1182183
10:18 AM
lol, heh at least not "your"xD
 
¬_¬
 
7 hours ago, by vinipsmaker
@DeadMG thanks. I'll reference this namespace in future code that I don't care about. :P
haha lol
WTF
 
@ThePet Maybe you'r' drunk.
 
@R.MartinhoFernandes btw, it seems bitbuckets wikis are a bit confused. The options seem to imply that a public wiki is publicly editable, but the docs seem to imply that this is not the case, just that it is publicly readable.
 
@R.MartinhoFernandes :3c
You cannot stop cowboy_cast.
It will spread all over teh world.
 
10:25 AM
@thecoshman The former is correct.
I edited DeadMG's wiki before.
 
was in here earlier btw
 
Xeo
lol?
 
o.0
Oh god
And he's answered 2 boost-spirit questions.
 
haha, bastard!
 
Well, he's slowly weening himself off it SO I guess.
It might take a while.
 
10:29 AM
He's here now.
@not-sehe ha, so it has come to this.
 
I can't keep up. There should be a database of ID's so we can track all the not-sehe, not-Telkitty, not-Cicada, not-Zoidberg etc etc.
 
@R.MartinhoFernandes yeah... it's annoying as fuck
 
<- not me
 
well, it's only BB users who can edit the wiki... but still, why?
erm... isn't socking against the rules :P
 
@thecoshman Stupid as fuck. I mean, I can understand the desire for a totally public wiki, but having no public readable/private writable option is just stupid.
 
Xeo
10:35 AM
@thecoshman Sock puppeting would imply he's upvoting himself
 
So I can go and edit the ogonek wiki? <3
 
@Xeo ah
@ThePhD it's not on BB anymore
 
@Xeo I'm waiting for him to downvote himself.
 
@R.MartinhoFernandes yeah. lunch break. I decided I follow boost spirit questions only, but unsubscribe from the [spirit-general] mailing list for now :/
@MartinJames hey, at least I made mine non-cryptic! I don't mind you knowing. That said, I should probably log out :)
 
@thecoshman You sock.
 
10:36 AM
@ThePhD If you can find it...
 
@not-sehe doesn't this defeat the purpose?
 
Go go gadget functor chain!
Whatever
I can't figure out what DeadMG's criticism is all about
so I'm just going to shovel it out the window.
MOVING ON.
haskell.h, functor_chain... I feel so functional lately.
Is there any other interesting programming paradigms?
 
How can anyone claim C++ supports functional programming if lazy iterators are so fucking hard to come by.
 
who's claiming that? :O
 
Now I am pining for this sort of thing at work :/
Need to iterate over the keys of a map? Copy them into a vector first! Don't pay for what you don't use!
What a joke.
 
10:42 AM
... Wat.
Why copy them into a vector first?
 
Xeo
42 mins ago, by Xeo
What do you need std::function for?
 
@R.MartinhoFernandes isn't that what Boost's TransformIterator is for?
 
That reminds me that I want to learn about projections but don't know where to start.
 
although I agree that it should be simpler
 
Xeo
@jalf Theoretically, map | boost::adaptors::map_keys
 
10:44 AM
@Xeo Oh. Uh. I need a somewhat type-erased invoker.
E.g. I want to erase all the insides.
 
But not the very beginning and the very end.
 
Xeo
Uhm
No, bad Xeo. Don't ask. You have work to do.
 
Oh wait
Wait, wait!
I'll be more clear
Aww TITS why is coliru down ;~;
 
@jalf Yeah, I'll use Boost.Range.
 
10:46 AM
@StackedCrooked y coliru so schizo lately ;~;
 
But I'm annoyed that I am watching this movie again.
 
Xeo
Gogo Taussig :P
 
@ThePhD Stacked is a terrible sysadmin.
 
Oh well.
 
@R.MartinhoFernandes You're a terrible system :P
 
10:48 AM
@Xeo ( Psst. Xeo. Temptation~ )
 
Xeo
So, basically, function composition?
 
Yes.
You can chain two, three, twenty functors.
 
Xeo
std::bind(a, std::bind(b, std::bind(c, _1))) :D
 
@ThePhD Started coliru again. Sorry :(
 
That's an unholy mess.
 
Xeo
10:51 AM
Single argument, in this case
Your code is an unholy mess
 
=[
I guess I'll just use std::bind then. D:
 
Xeo
Nah, std::bind is bad at variadic arguments
 
If I want to invoke that later, I'd have to store it in a std::function, right?
 
Oh, right, neither std algorithms nor boost ones support INVOKE.
Gosh, what a fucking mess.
 
Xeo
std::ref(x)(args)!
 
10:53 AM
o.0
 
Xeo
Oh, wait "support"
 
Huh?
 
std::mem_fn with pair should be painless.
 
@Xeo Does it just... not handle them well?
... OH WAIT
Placeholders.
Are there variadic placeholders?
 
is this here issue tracker visible to y'all, can you try both logged in and not logged in please.
 
10:58 AM
Denied
 
logged in or not?
 
Access denied, logged in.
 
@thecoshman You can try not logged in yourself. That's what porn mode is for.
 
right so, what about now?
@R.MartinhoFernandes derp, ofc
 
Seeing stuff and things.
 
10:59 AM
though I can't try when logged in
@LucDanton can yo create issues?
 
Apparently.
 
lol, you can use a github account to log into bitbucket :P
@LucDanton for fuck sake
 
Ha, same plan as the wiki, eh?
 
grumble grumble
@R.MartinhoFernandes fucking seems so
 
Though on an issue tracker I think it's a lot more justifiable to let the public create stuff.
 
11:01 AM
@R.MartinhoFernandes Wot?
 
@LucDanton Wiki's a publically editable.
On Bitbucket.
 
how do i exploded gif
 
It's probably easier to crack that one programmatically: you have a bunch of different frames to scan and increase certainty...
 
lol indeed
 
11:09 AM
Perfect white backgroud, letters with outlines... Looks fancy, but... is kind of worthless.
 
But but but it's Apple. This must be the best captcha.
 
@R.MartinhoFernandes Stop scanning anti-robot defenses!
 
@rubenvb It was clearly designed by idiots. Or designers.
 
Or idiotic designers.
This one was too easy
12
Q: How do I typedef a function pointer with the C++11 using syntax?

rubenvbI'd like to write this typedef void (*FunctionPtr)(); using using. How would I do that?

8 votes for using "using using".
 
Xeo
Hm. What was the trick to get recursive trailing-return to work again?
Change it to a meta-computation? :|
 
11:21 AM
I have several tricks under that umbrella I think.
Perhaps making it a member function?
 
Xeo
hm
 
ADL? (<- brittle though)
 
Xeo
Yeah, member function works
 
It's how I implement e.g. my folds over tuples.
 
Xeo
So, function composition through named operators and through member functions /cc @ThePhD
 
11:24 AM
*click*
What's the purpose?
 
Xeo
Read the mouse-over on the arrow
"only 32"
 
Is that in the line of whichever was the trick at where again? ACCU?
 
Well, either I want them all or I don't. It's worthless to show 5 more out of 37...
 
Xeo
We have currently 37 in here
and it only shows 32
 
Often there's more.
 
Xeo
11:27 AM
What's the problem?
 
We're teh popularz
 
It just doesn't make sense
 
Xeo
@Jeffrey The cut-off point has to be somewhere. And SO decided it should be at 32
@LucDanton ?
 
Just the named operators I mean.
 
2^5 (or 2**5 if you're a Python/Fortran/whatever kind of (wo(man), or (std::)pow(2,5))
 
11:28 AM
Oh wait, I just realized it makes perfectly sense. Nevermind.
 
Xeo
@LucDanton Dunno where I saw it first.
Oh, wait, are you thinking of extension functions in C++?
x<-foo(...)?
 
@Xeo Thanks, yes.
 
-1
A: Ways to wrap 32-bit .dll so it will work in a 64-bit OS

user2380573i'm fully aware that i'm not supposed to ask for help as a response here BUT this is very URGENT. PLEASE help.... I've downloaded JPIB rar n installed as per the instructions i.e put jpib.dll in the directory you are lauching the Java application OR in the windows directory (usually c:\window...

If its urgent then ok, go ahead
 
PASSED MY DRIVING TEST!!! :) :) WOO :)
17
 
Xeo
11:31 AM
cool
Gratz
 
great
 
@TonyTheLion Poor sod ;\
 
@Xeo Have you noticed the pack expansion has two interesting spots? I have compose and compose_over to choose between the two.
 
Xeo
Robot doesn't like cars
@LucDanton Uhm... no? Are you thinking of fanning or some other fancy (arrow) stuff?
 
f(g(a...)) and f(g(a)...).
 
Xeo
11:33 AM
ah
 
f(g(a...)) is variadic boobs.
 
Xeo
Heh
I'm still amazed how (.).(.).(.)... works
 
I'm hungry
 
Xeo
I don't think I really get it yet.
 
11:35 AM
Have you read about SECs?
 
Xeo
About what?
 
I think you might enjoy reading about SECs if you haven't already.
You might think "why would this matter"? But SECs are the best!
I have to warn you, it's a gateway to lenses :v
 
@R.MartinhoFernandes haha
 
Xeo
@LucDanton I think I read something about lenses already
But I can't seem to remember :(
 
Ekmett mentions SECs in some places. Notably some of the lens material, and one presentation. (More as historical background though.)
 
11:40 AM
what's the difference between is_trivially_copyable and is_trivially_copy_constructible?
 
Assignment?
 
Maybe this is one for SO.com.
 
Xeo
I'd wager it's about T x(y); vs T x = y;
 
I don't understand those 'Please Ctrl-F n3290 for me' questions.
@Xeo No. Copyable <=> copy constructible + copy assignable.
 
Xeo
ah
 
11:44 AM
@rubenvb No such thing as the first one.
 
@LucDanton Feel free to downvote at your leasure.
0
Q: What is the difference between is_trivially_copyable and is_trivially_copy_constructible?

rubenvbWhen would these give a different answer, and when would this difference be useful, if at all?

 
@R.MartinhoFernandes Yes.
@Xeo The real answer is more complicated btw.
 
Trivially copyable is the guarantee for e.g. std::memcpy. Trivially copy constructible means e.g. having a trivial copy constructor.
 
11:45 AM
Oh. Of course.
 
@LucDanton but the latter would mean std::memcpy is also usable instead of a copy constructor call, no?
 
@Xeo Oh good lord! I think there may be a problem here. Kind of reminds me of that old line about "give me a lever long enough and I can move the world." The problem here, is that I'm not sure I'm strong enough to even pick up a clue stick big enough to deal with this level of idiocy!
 
@rubenvb I don't recall off-hand, but I'd go with 'no'.
Consider a type with trivial copy but user-provided destructor. Bit blasting would be bad.
 
@LucDanton what does a destructor have to do with copyable-ness?
 
Invariants.
 
11:48 AM
ah wait
there's a list
I'm gonna answer that question myself now.
dammit
the robot beat me to it.
He's fast.
 
Btw there's some Johannes trivia on that topic.
 
@Xeo ... You're just not fair.
It's gross.
How do you even manage to do this kind of nonsense?
 
8
Q: Passing a class object with trivial copy constructor, but no output?

Johannes Schaub - litbI tried this program with GCC and Clang, but both output nothing #include <iostream> struct A { A(){} template<typename T> A(T &) { std::cout << "copied!"; } }; void f(...) { } int main() { A a; f(a); } According to my Standards reading, this program should output "copied!"...

 
Xeo
lol
 
Here I am, overloading comma operators, and you're just like
"Oh let me make my own named shit."
 
11:57 AM
(Trivial copy construction is the req. for ellipsis passing.)
 
Well, I suppose that would be the path to make Haskell++ then.
I could probably even do something like
{ Range Transformer } | { Generator } <filter> { Filter }
Comma would be nice but comma's too low on the spectrum.
 
Xeo
@ThePhD I just wanted to show that your function chain stuff is way too convoluted and "an unholy mess"
This has nothing to do with list comprehension
 
But it can be used for List Comprehension.
Big Picture, man.
 

« first day (941 days earlier)      last day (4005 days later) »