« first day (325 days earlier)      last day (4622 days later) » 

2:00 PM
C is full of stupid things.
 
euh, do I have to answer?
 
@MrAnubis libpng is like a slice of bread. You need an additional layer on top of that.
 
libmeat.
 
@TonyTheTiger ask me again when I'm done with this existence
would be my answer
 
lol
 
2:01 PM
I've used SDL_Image mostly.
 
I am proficient with libjpeg :(
 
Who needs JPEG.
 
@jalf lol
 
Like those Windows Update popups.
Ask me again in: 5 minutes, 10 hours, 25 years.
 
@CatPlusPlus lol
 
2:04 PM
Though I think the weirdest thing in libpng API is setjmp stuff.
 
What?
WTF would a image handling library need non-local jumps?
 
Poor man's exceptions?
 
real man's exceptions
the other day I saw "pokemon exception handling"
gotta catch'em all
 
Sounds like Java.
 
It's been two weeks since I read my C++ book :/
damn. fucking video games
 
2:08 PM
been reading up on templates the last two days
 
Templates are cool.
 
learning a lot, had no idea so much involved in templates
all these rules you have to know
 
Templates are <insert concrete word here>.
2
 
like that a nontype cannot be a double or float
wtf
@CatPlusPlus concrete?
 
What nontype?
 
2:09 PM
Nontype parameters, I guess.
 
template< double N> class // invalid
 
I think the only reason for that is historical.
 
yes nontype params
 
Oh, that. Yeah, those aren't terribly useful with all those limitations.
@TonyTheTiger Things are either abstract or concrete.
 
Like a lot of other issues.
 
2:09 PM
@RMartinhoFernandes I think the reason is that floats don't compare for equality very well.
Rational numbers work much better. Hence std::rational.
 
@CatPlusPlus I've created a concrete abstraction before... LULZ
@Potatoswatter oh yea, now that you mention it. Makes sense
 
All constants at compile-time should be arbitrary precision.
With headers, it wouldn't make a difference in compilation speed anyway.
 
I could use it without needing to compare for equality.
 
Compiler would probably want to compare them to see if type is the same.
 
If I don't do compile-time math with them, it won't be an issue.
 
2:11 PM
"A template template argument must be a class template with parameters that exactly match the parameters of the template template parameter it
substitutes."
 
@RMartinhoFernandes You couldn't usefully generate arguments with expressions.
 
Few times I could've used string literals as template arguments.
But they've got a silly type.
 
that confuses me this template template parameter, what exactly does it have to match?
 
String literals would be very nice. Even the new variadic string expansions have silly limits.
User-defined literals used a s template arguments can only include the basic source character set, i.e. no $ or £
 
@TonyTheTiger A template.
Or alias, as we learned today.
 
2:13 PM
@TonyTheTiger Given template <template <typename> class T> struct foo {}; you can't do foo<std::unique_ptr> in C++03 (and a std::unique_ptr, of course).
 
@RMartinhoFernandes so what can you do?
so you can only pass something like
 
@TonyTheTiger std::unique_ptr has two template arguments, that's why it doesn't match.
You can only use a template with exactly one argument.
 
template <typename T> class {}; ?
 
Yes.
But in C++11 you have aliases.
 
oh I get it
 
2:15 PM
As I happily learned after coming from lunch, you can no use alias templates to work around this limitation :)
13
Q: Can I use template aliases as template template parameters?

R. Martinho FernandesCan I use template aliases as template template parameters? template <template <typename> class> struct foo {}; template <typename T> using simple_ptr = std::unique_ptr<T>; foo<std::unique_ptr> a; // this doesn't work, std::unique_ptr has two parameters foo<sim...

 
and what if you pass a template that has default template argument as the second arg? Can you pass it then to foo?
 
@TonyTheTiger No, that's the issue above with std::unique_ptr.
std::vector too.
They must match exactly.
 
Even in C++11?
 
Considering the alias option, it seems silly. Generating the needed anonymous alias should be about as easy as generating the error message :vP
 
2:18 PM
I can't believe this got twelve upvotes, lol
@RMartinhoFernandes oh I see
 
@Potatoswatter Yeah, it's a bit silly. But at least there is a simple workaround now.
 
Careful about your debate tactics, they'll ban you for longer now.
 
@Potatoswatter What do you mean?
 
@Potatoswatter Well, you can declare all your template template parameters with packs and any template will then match: template<template<typename...> class T> ...
 
2:22 PM
@RMartinhoFernandes He mentioned that the ban was short proportionally to the age of the post…
 
@LucDanton Good point. A bit hackish, but template template parameters are never useful in practice anyway.
 
The hackish nature is because it was a bug in an early implementation of GCC IIRC. Then it was Standardized because it's neat.
 
I've encountered a few situations where they'd have been useful
but I couldn't remember the syntax for them, so I stuck with some workaround instead
 
Have been or would have been?
 
2:26 PM
would have been if I could remember how to use them ;)
or if I'd bothered to look it up :)
 
The make< template > utility to emulate constructor argument deduction a la make_tuple is on my list of solutions, and I've used it a couple times only to take it back out again.
So I concede it's within the realm of possibility, but they look a lot better than they work.
 
They never worked very well because you couldn't pass std::vector to template <typename T> class.
 
But the reason that doesn't work is exactly the reason it's not useful: the only thing vector adds is the notion of allocation, which is what the troublesome allocator argument does!
So parameterize on the iterator and pass the range.
 
2
Q: Do I understand C/C++ strict-aliasing correctly?

Andy TI've read this article about C/C++ strict aliasing. I think the same applies to C++. As I understand, strict aliasing is used to rearrange the code for performance optimization. That's why two pointers of different (and unrelated in C++ case) types cannot refer to the same memory location. Do...

 
@Potatoswatter What if I want a backing container for my container adapter?
super_duper_adapter<T, std::vector> seems like a neat thing to do.
 
sbi
2:32 PM
1
A: Why am I suspended from chatting for a message that's from May this year?

sbiSome teenager, who never answered a single C++ question on SO, and who was never before seen in the C++ chat room, storms into the room, actively searches the room's history for words and phrases he finds offensive and then goes on a rampage flagging a bunch of old messages. Of course, given just...

 
@RMartinhoFernandes And you need to generate several different container types?
 
sbi
Had that in mind for days. Finally wrote it.
 
@Potatoswatter The adapter template doesn't care what the backing storage is, as long as it fulfills the concept requirements.
 
Such a complicated policy is likely to require a traits class which can encapsulate the same with more flexibility by using a member template.
@RMartinhoFernandes Then why should the backing store be required to be a template at all?
 
@Potatoswatter Ok, you got a point there.
 
2:34 PM
Non-template classes can also satisfy the Container requirements. That's why the standard adaptors don't take template arguments.
 
Template template parameters could be useful for TMP to build higher-order functions.
Hmm.
 
Ah, that looks pretty legitimate.
Still, you could define a wrapper class with a rebind member for any template you want to pass to e.g. apply… template template arguments simply don't add any fundamental capability.
 
Yes, that's what Boost.MPL does.
 
Oh, lol, I failed to notice that there aren't any template template arguments on the page you linked. Damn this insomnia.
 
2:50 PM
Now I had the silly idea of writing my library of Haskell pointfree combinators in TMP.
It's all higher-order functions!
Pity I don't have a compiler that would actually be able compile it.
 
if you overload operator+ as a non member of a class, should it be a friend of the class?
if the operator is actually an overload for that specific class?
 
@TonyTheTiger Only if you really need so. Can't you implement it in terms of operator+=?
Or better yet, use Boost.Operators.
 
@RMartinhoFernandes Why not? Combinators are usually simple, right?
The problem is that they're not useful by themselves.
 
I could do like Boost.MPL, but it really pains me to write all those typename and template disambiguators everywhere.
 
I played with it years back when TMP was very exciting to me, but in perspective it's just TMP for TMP's sake.
I can see using it for heavy lifting on expression templates, but thankfully I haven't yet subjected myself to that.
 
2:55 PM
@Potatoswatter Yeah, that was most of the "silly" part in the above sentence.
 
Well, I've been contemplating the idea of writing an interactive (text-based) Tic-Tac-Toe in the C preprocessor, if you want silly.
 
Interactive?
How do you take input?
 
^ corrected ;v) first things first
I'm writing a preprocessor which streams the data right through
A properly written macro ends with an unterminated call to another macro
 
user input provides the needed arguments to that call, and the user needs to type a closing paren, which calls the macro, which generates another call…
But the language semantics try very hard to prevent any recursion, so it's a gonna be a real pain. A macro can't even generate a call to itself, even if that call isn't executed.
So there have to be two copies of the program which co-recurse.
 
3:01 PM
5 mins ago, by Potatoswatter
I can see using it for heavy lifting on expression templates, but thankfully I haven't yet subjected myself to that.
@Potatoswatter And yet you subject yourself to this?
;)
 
This preprocessor is a little, self-contained project… < 2000 LOC
A project needs to be large to support a requirement for expression templates.
 
Man just that channel rewrite took me 400+ LOC.
I guess I like vertical space?
 
Yeah… I write a bit densely. The entire macro engine is 400 lines: codepad.org/ifn39z55
 
Haha I put return types on a separate line and I almost always declare + define out of line.
 
dammit is there a code paste site that displays tab stops at 4 spaces?
 
3:07 PM
I do like vertical space.
 
But declare + define means things are sometimes uninitialized…
 
Functions?
 
It wouldn't hurt much if I put return types on a separate line, because I define so few functions ;v)
 
I mean functions/templates.
I don't like to define in-class, even for templates.
 
Oh, OK, I thought you meant local variables too.
 
3:09 PM
Can't define them out-of-line! :)
Also time to sleep.
 
Me too. Confused definition with initialization :vP
 
oo, 11 rep short of 80k
 
I'm at 20k! I'm a trusted user now!
 
@RMartinhoFernandes trusted by whom?
 
3:13 PM
@RMartinhoFernandes muhahahha?
 
But that's what the privileges ladder says for 20k.
The only benefit I see is that I can edit tag wikis without peer review.
 
I guess what it actually means is "we trust that you won't leave now, even though you won't get any more bonuses for gaining rep"
 
What about badges? I still don't have them all!
 
Als
@RMartinhoFernandes: So now u plan to be a Badge-Whore?
 
My oh my! There is a lot of swearing going on in this room.
Time for some flagging!
Just kidding.
 
Als
3:16 PM
@Pekka: Are you the one who flagged our @TonyTheTiger ?
 
@Als We could produce a SO TV show where some beautiful woman is looking for a Badge-L-Whore!
 
@Pekka not funny. We get aggressive if people take away our swears
 
@Als hell no!
I think offensive-flagging is silly.
 
@Als See @sbi's answer on Tony's question. He linked to that user's profile.
 
Well, mostly.
 
Als
3:18 PM
@FredOverflow: Now you said woman.....eh....what is it with you people! :P
 
hey cool, I'm at 25,555. That's the same whether you reverse it or rotate 180°
 
@Potatoswatter No, it isn't.
55552 is not the same as 25555.
 
Als
how is that same lulz
 
I'm pretty sure an upside down 2 isn't the same as a 5 either
I bet there's a unicode code point for upside down 2
 
Als
@jalf: You can't help but be a pedantic nerd eh
 
3:20 PM
I mean the reversal is the same as the rotation, not that either are the same as the original. And yes, 5 is an upside down 2. I see everything in 7-segment display vision ;v)
 
Als
@Potatoswatter: Booooo
 
I'm 92% trusted.
 
@Als aaaaah?
 
Hi all
 
Als
I am 100% trusted i think oh but then am I?
@Mahesh: Ohla
 
3:22 PM
I am 100% everything.
 
Als
There is very little interesting perks after 10k
 
The 10k perks are not very interesting either.
 
Als
15k gives right to protect q's ---oh shoot you would use that probably once in a year
 
I'm 10% short of 110%, if you know what I mean.
 
Als
and 20k gives editing tags....mostly you wont do that ever
 
3:24 PM
I did that before.
 
Let me give you all a song which most of you don't understand but can enjoy the music.
 
Als
@RMartinhoFernandes: The acces to see most popular, most commented etc etc is interesting though
 
I collected about 10 rep just from tag wiki editing.
Yay.
 
Als
uh ...What is this room now a music room? That @AlfPSteinbach, started the trend ya....he is in love or something
@Mahesh: The chick seems pretty though
 
The last interesting privilege is at 2k: edit everything (well, except tag wikis).
 
Als
3:26 PM
@RMartinhoFernandes: they should award multiple gold badges for some tags!
 
Close and reopen votes are cool too, but that's politics.
 
@Als - Well, let's make SO a platform to know the other parts of world also. Not just the programming is my opinion.
 
Er, SE?
 
I think there's a Travel. Yep, there is, the chat resolved [travel.se].
 
Als
@Mahesh: Sure..Don't worry and don't take everything we say seriously....We don't mean to be offensive but what can we do, we inherently are that
:P
 
3:27 PM
I have no idea how that works.
 
If there's a subliminal message in there, then it's brain programming…
 
Als
@RMartinhoFernandes: Does one has to travel to know other parts of world?
 
They travel through the tubes.
 
@Als Well, it helps.
 
Travel.se should be where you book a flight to Sweden…
 
Als
3:29 PM
@RMartinhoFernandes: Books/Discussion might do the same.
@Potatoswatter: Oh..I have been to sweden
nice place.
 
Well, not the same. You can't tell me that being there is the same as reading about it.
 
No doubt.
 
Als
@RMartinhoFernandes: I just meant, you dont have to travel to a place to know it.
@Potatoswatter: Are in Sweden by any chance?
 
@Als Never been north of Milan, in Europe.
 
Als
@Potatoswatter: Ah okay, I was in Malmo, Sweden once..so thought maybe you know
 
@Als What's wrong with saying "woman"?
@AlfPSteinbach yay porcupine tree
 
i playing it on the stereo so i thought posting woud be nice
 
Als
@FredOverflow: It makes us go all bonkers!
@AlfPSteinbach: Here comes the room DJ
:P
 
@Als What's "DJ", a crossing between D and Java?
 
Als
@FredOverflow: ah if I said BJ the world would know what i mean but if i DJ (Disk Jockey) you would ask woot? :P
 
3:34 PM
@Als BJ = Bad Java?
 
Als
@FredOverflow: lulz, You want me to get banned don't you
 
Ah, you mean "windwork".
 
@Als actually i did DJ service when I was a kid, playing Bellamy Brothers :-)
 
Als
@FredOverflow: I meant the act of blowing
Leave it to interpretation as to what
 
@Als hey, don't be 2 sure flag-man is really gone
 
Als
3:37 PM
@AlfPSteinbach: I see, no wonder you look well seasoned with the DJ-ing.
@AlfPSteinbach: Did we find out who S/He was?
 
@Als hm, i only your attentions for a day. oh well.
 
Als
Parse Error.....
 
what, no in the sentence?
 
Als
1 min ago, by Alf P. Steinbach
@Als hm, i only your attentions for a day. oh well.
 
right, no
 
Als
3:39 PM
I don't understand what that means really, I am no native English speaker.
 
@Als His profile says he is a 15 year old kid from Czech Republic.
 
he he, reminds me, anyone here read "Glasshouse"?
 
Als
@RMartinhoFernandes: Link? How did we detect the kid? ssmart kid screwed the Tiger once lol
 
@AlfPSteinbach It's awesome.
Buy it.
 
@RMartinhoFernandes I have, I just haven't got the other books in that series (I think it is a series?)
 
3:41 PM
@Als With a kid detector.
 
@Als that's because you can't see the word
 
Als
@RMartinhoFernandes: Uh That one looks familiar..Who detected?
 
@Als He confessed.
 
Als
@RMartinhoFernandes: In Here?
 
@AlfPSteinbach I believe it's set in the same universe as Accelerando (which is also nice, and available under a CC licence if you don't want to buy it), many years later, but not really a sequel.
 
3:43 PM
hey, can anyone tell me how to start a bounty?
 
i sure hope we don't get that botched
 
@AlfPSteinbach Get what botched?
 
If flags can be abused, there should be flags on flags. And then this guy would probably flag his own flags. Yo, dawg.
2
 
@RMartinhoFernandes knows not real history, all botched by malware
 
Ah, that.
Yeah, that's why I said I believe it's the same universe, because you can't really tell for sure.
 
3:47 PM
oh I see how it is, we have a robot, a DJ, a Genius(tm), sex talker, a cat and a bonobo in disguise, so what are we missing?
 
@TonyTheTiger The ass. Oh wait, I'm here too... :-)
 
@JerryCoffin I thought you were a bug.
 
Als
Who is the sex talker? @TonyTheTiger
 
it is an arguable matter
 
3:50 PM
@Als who else?
 
Als
@TonyTheTiger: You!
@TonyTheTiger: you missed me in the list :(
 
@RMartinhoFernandes That too -- I'm polymorphic!
 
Als
@JerryCoffin: <----------------- Is Jerry Springer too, sometimes!
 
@Als Eeeeeeh, not that!
 
@Als I don't know how to attribute you yet?
 
Als
3:54 PM
@JerryCoffin: That is the guy who brings lots of chicks oh his show, who do terrible terrible things with men.
@TonyTheTiger: Ahem, I am Undefined Behavior then, Standard describes me well i think.
 
this reminds me of Kill Bill movies but google does not report any connection
mystery
 
@Als In fact, the standard does not describe undefined behaviour very well.
That's the whole point, isn't it?
 
Als
@RMartinhoFernandes: The standard defines What Undefined Behavior is and very well.
it does not define what might be the result of Undefined Behavior.
 
So, you're the guy that can get my girlfriend pregnant? I'm guess I'm going to have to kill you.
 
Als
@RMartinhoFernandes: Section §1.3.12
behaviour, such as might arise upon use of an erroneous program construct or erroneous data, for which this International Standard imposes no requirements
requirements - permissible undefined behavior ranges from ignoring the situation completely with unpredictable results, to behaving during translation or program execution in a documented manner characteristic of the environment (with or with- out the issuance of a diagnostic message), to terminating a translation or execution (with the issuance of a diagnostic message).
@RMartinhoFernandes: Uh...why me? lulz
 
3:59 PM
Because you're undefined behaviour!
 
Als
@RMartinhoFernandes: Why your gf then ?
lol
 
cause it could be any gf, and it happened to be this one
lol
 
Good News: I cleared the 3 telephonic technical interviews. Bad News: I failed in one of the 6 rounds of face to face interview. Result: Didn't make it. ;)
 

« first day (325 days earlier)      last day (4622 days later) »