« first day (619 days earlier)      last day (4327 days later) » 

6:00 PM
What a trainwreck. I can't get a moment of peace, dammit.
 
@CatPlusPlus play porn. loudly
 
@CatPlusPlus Is it as bad as when my porn browser plays opera in the background after I close it?
 
@JerryCoffin No, but might be equally awkward.
 
@CatPlusPlus Who listens to porn audio anyway?
 
@CatPlusPlus Time to get drunk!
@DeadMG I recall seeing some porn audiobooks on the Web. And what do you think porn hotlines are?
 
6:02 PM
@EtiennedeMartel Dumb?
 
@DeadMG Yes, but that doesn't mean there's nobody to pay for them.
 
∀things.∃person who'll pay for that
Thread killed.
 
@EtiennedeMartel Can you imagine having a job reading porn out loud for audio books? I guess for a guy who was really into it, it could give a new meaning to "hard day at the office!"
 
There are people who dub over porn.
Mostly Germans.
For some reason.
 
@JerryCoffin That's one bad pun.
 
6:06 PM
Porn again? Srsly
 
@CatPlusPlus I always knew @sbi was weird.
 
@EtiennedeMartel It's hard to make a good one.
 
@Cicada Well, it's not like we have anything better to do.
 
@EtiennedeMartel "Bad pun" is redundant.
 
@JerryCoffin Depends. Some puns are so bad they wrap around and become good.
 
6:09 PM
Pun arithmetic
 
@EtiennedeMartel I'll reserve judgement, but find it difficult to believe.
 
Well, I am running firefox nightly...
 
@EtiennedeMartel like javascript!
 
@CatPlusPlus I bought it two weeks ago. Next beta weekend is this week
 
@Cicada Pun semantics.
 
6:10 PM
Dammit don't tempt me.
 
The Temptinator.
 
55€ ;_;.
 
HOT GURL PLAYING GW2 ONLY 55 €
Yeah well.
It was that or D3
 
That's not really a hard choice.
 
Precisely
 
6:11 PM
7
Q: Difference between static_cast<primitive_type>(foo) and primitive_type(foo)

David BrownWhat is the difference between static_cast<float>(foo) and float(foo)? I often see static_cast<float> or similar in template code to get from any integral type to some specific integral type. For example say I wanted a function to perform floating point division on any integral type. ...

I'm struggling to make a contrived example where anything bad happens
if T isn't a pointer there's not a lot you can hang yourself with
 
In C++ there's always something to hang yourself with.
After blowing your feet off. It's multiparadigm, see.
Finally someone found a duplicate so I don't have to.
 
I'm not 100% sure I buy that dupe - this was pretty specific about the float thing, but that's looking at the more general case
 
@CatPlusPlus Multiple ways to kill yourself.
 
New, exciting ways.
 
Well, not exactly new: most of those ways haven't changed since 1998.
 
6:18 PM
@Flexo the answers apply equally to both examples
 
But definitely exciting.
 
Ell
what you can do static_cast<Derived>(Base)?
 
@Flexo actually, that first answer is kinda lousy, because it only talks about pointers, but neither question mentions pointers.
 
@Ell With pointers, yes, it's downcasting without runtime check.
With values, no, unless Base has conversion to Derived, and it probably doesn't.
 
an example that didn't rely on pointers would be good either way
 
Ell
6:22 PM
@CatPlusPlus I thought you had to to dynamic_cast for that, or reinterpret_cast. I was wrong, obviously xD
 
No, never use reinterpret_cast for downcasting.
dynamic_cast is with runtime check.
 
Ell
so just use static_cast, as long as you know?
 
You'll get nullptr if the cast is invalid, instead of invalid pointre.
Yes.
Well, where it makes sense, as usual.
 
Ell
I can't see a use for dynamic_cast? when would you not know?
 
At runtime
 
Ell
6:24 PM
@Cicada give me a for instance
 
for (;;)
 
lol
witty cat
 
@Ell void f(Base& b)
 
Downcasting should be rare anyway.
 
class base {}; class d1 : public base{}; class d2 : public base {};. Now, given a base *, find out whether it's really pointing to a base, a d1 or a d2.
 
6:27 PM
@Ell It's a very specialized tool.
 
No, you don't want to very often (or shouldn't, anyway), but sometimes it's useful.
 
Huh. In front of the house, there's a tree. On the tree, there's a pizza box. What is this, I don't even.
 
boost::any wouldn't be possible without dynamic_cast, for instance.
 
0
A: What is the best way to treat large arrays of numbers in C++?

rubenvbPlain numerical data you need to sequentially operate on? std::valarray<double> If profiling shows this is slowing you down, look for ways to make it faster by std::valarray<double>::resize() (yes, there's no reserve() unfortunately. Why std::valarray<double> for numerica...

 
@EtiennedeMartel Careful -- that makes it sounds like you're arguing that dynamic_cast shouldn't exist...
 
6:28 PM
Who needs any when there's variant.
 
upvotes please. The other answers suck ballz.
 
0 new answers to this question. Click to reload.
 
and std::valarray needs more love.
 
HEY EVERYONE SOMEONE USED VALARRAY.
 
@CatPlusPlus DDOOOWWWWNNNVOOOOOOOTEEEEE
 
6:29 PM
What the hell is wrong with valarray?
 
@JerryCoffin I'm saying exactly the opposite.
 
@EtiennedeMartel The joke is that boost::any sucks.
 
@EtiennedeMartel I can't find any ...tsixe t'ndluohs tsac_cimanyd taht gniugra er'uoy ekil sdnuos ti sekam taht -- luferaC
2
 
-1
A: What is the best way to treat large arrays of numbers in C++?

m0skit0Depends on what you want to do with them. Also, as chris said in the comments, use new and friends (to get memory from the heap) and avoid using it as a local variable (which is allocated in the stack).

 
@rubenvb Quite a bit, really. It's basically designed/optimized for vector machines, and is fairly cache antagonistic. It's also only somewhat finished (at best) because its designer abandoned the effort halfway through. It's also a pain to use for non-trivial tasks, when you start to get into slice and gslice and indirect_slice, and...
 
6:32 PM
deserves downvotes for suggesting new
 
@CatPlusPlus Oh, you.
Still, type erasure is cool.
 
@JerryCoffin they're great for mass use of math functions anyhoo. They have guaranteed sequential storage like std::vector (combining lots of standard quotes that is) and have some weird splice functions I did not know about :)
 
Nobody uses valarray.
 
so?
 
@CatPlusPlus Is there really someone named "Nobody"?
And what are his credentials?
 
6:35 PM
He's perfect.
 
ferpect - FTFY.
 
98
Q: How to properly use the HsOpenSSL API to implement a TLS Server?

hvrI'm trying to figure out how to properly use the OpenSSL.Session API in a concurrent context E.g. assume I want to implement a stunnel-style ssl-wrapper, I'd expect to have the following basic skeleton structure, which implements a naive full-duplex tcp-port-forwarder: runProxy :: PortID -> ...

 
(Or furpect if he's a cat as well)
 
Ahahahaha look at the first deleted answer.
 
Ell
purrrfect
 
Oh, wait, I have sort by vote. The PHP one.
 
@MooingDuck Eh, PHP and MySQL.
@CatPlusPlus That's what I call not reading the question at all.
 
Nobody uses PHP
 
We can only dream.
 
@rubenvb Oh I know (a little) about what they can do.
You don't have to combine quotes to find the requirement for contiguous storage either.
 
6:40 PM
@JerryCoffin ah, well, I remember looking through the Standard a while ago. My standardese must have been awful back then :)
 
@rubenvb It just takes time. I've had more of that than anybody wants to think about...
 
And I still don't know why the splice stuff is bad (I honestly have no clue what they're for). Just don't use it those functions then :) std::string::length() is also useless, why not abandon std::string and use vector<unsigned char> all the way?!
 
Ell
@rubenvb length() is useless?
@MooingDuck for getting the length? I think readability may suffer...
 
(I was thinking of std::list, no idea how I messed that up)
 
@Ell there's std::string::size() that does exactly the same. length() should return the number of characters, not bytes.
 
6:44 PM
@Ell Neither useless, nor (in a competent implementation) slow.
 
Ell
@MooingDuck ahh kk
 
duplication of interface is useless uselessness.
 
@rubenvb The problem is that without it valarray is relatively crippled, but with it so obscure that only one programmer in thousands will know what you're doing.
 
@rubenvb Then you'd have to actually implement decent Unicode support.
 
@rubenvb That would be worse.
length and size doing different things is terrible.
 
Ell
6:47 PM
Couldn't there be like a char<ascii>, char<utf-8> etc. etc. and then a string<char<ascii>> or whatever?
 
@RMartinhoFernandes because of backwards compatibility? That's not a good reason for them to have done it in the first place.
 
char should be called byte, for starters.
 
@rubenvb Because is insanely confusing.
 
@Ell it's more complicated than you think
 
@rubenvb Who said that? For the vast majority of purposes, it's better the way it is.
 
6:47 PM
@Ell No.
 
And not have the whole signed/unsigned shenanigans attached.
 
@Ell and no, because utf8 must always be on a 8bit type.
 
@CatPlusPlus aye to that.
 
wchar_t should not exist at all.
 
Ell
@MooingDuck what do you mean about 8 bit(you mean byte?) type?
 
6:48 PM
@CatPlusPlus Agreed
 
@MooingDuck wrong. you can use int for storing UTF8 code points and only use the lower bits ;)
 
Strings should be built on Unicode, not ASCII.
 
and we're discussing unicode+std::string again like a bunch of old wives. (no offense @Cicada)
 
C++ is completely inadequately prepared to deal with text.
 
@rubenvb You could, but nobody sane would.
 
6:49 PM
@CatPlusPlus IS there anything saying they are built on ASCII?
 
@JerryCoffin Technically, no.
 
@JerryCoffin Well, no, not even that. Because we have to support EBCDIC.
 
Ell
also when i said char<ascii> etc. I was implying that there would also be a byte type
 
@CatPlusPlus No, because ASCII has only 127 values.
Cue Windows codepages.
 
C++ needed strong typedefs and byte.
 
6:50 PM
ASCII, ANSI, ISO codepages, who cares.
Same outdated shit.
 
agreed
 
strong_typedef char8_t unsigned byte;
it would even be technically easy to do.
 
Ell
what is _t?
 
Byte should not have signedness modifiers.
 
@CatPlusPlus how would byte math work then?
 
6:52 PM
@Ell It's Hungarian Notation.
 
@Ell POSIX specifier for typedef names.
 
@rubenvb you cast it to something
 
@rubenvb bytes should not be numbers.
 
@DeadMG No, it's not.
 
@RMartinhoFernandes pointers aren't numbers, yet you can increment and subtract them...
 
6:53 PM
@CatPlusPlus Absolutely it is. Why does the Standard put _t at the end of names? To indicate they are types.
 
@rubenvb And that is good?
 
@DeadMG HN uses lower-case prefixes without underscores.
 
@RMartinhoFernandes oh, never said that :)
 
@JerryCoffin That's irrelevant.
 
@rubenvb I thought you were trying to design good things.
 
6:53 PM
@DeadMG You're irrelephant.
 
tchar8 and char8_t are equally Hungarian Notation
 
@DeadMG I don't think that's Hungarian Notation, I think that's a different thing
 
@RMartinhoFernandes Why would you think that? This is the C++ Lounge right?
@MooingDuck Call it Notation Hungarian then.
 
Hungarian notation is a specific thing.
 
it's a part of the identifier which tries to indicate the type
that's Hungarian Notation
 
6:54 PM
Meh, it's Eastern European notation. Everybody happy?
 
@DeadMG "In Hungarian notation, a variable name starts with a group of lower-case letters which are mnemonics for the type or purpose of that variable, followed by whatever name the programmer has chosen;" en.wikipedia.org/wiki/Hungarian_notation
 
Might as well be Japanese Notation.
 
@MooingDuck Because that's a totally reliable source.
 
Vandalize it to say whatever you want!
 
Ell
wikipedia is quite reliable imho
 
6:55 PM
@DeadMG I know you don't understand this concept, but you're wrong. This is the part of the argument where you giiiive uuuuup.
 
@Ell So innocent.
 
@DeadMG better a questionable source than no source at all
 
@DeadMG Hungarian notation is prefixing a name with the type.
 
@SamDeHaan Uh, no.
 
@DeadMG Okay, here's the original source:
 
6:56 PM
@MooingDuck It's called "logic"
 
@MooingDuck wrong.
 
Not the other way around.
 
I'm right and you're wrong.
4
 
@DeadMG Hungarian Notation is strictly defined. And you're saying "No, it's whatever I want as long as it shows the same meaning." Which is in the spirit of Hungarian Notation. But it isn't Hungarian Notation.
 
@DeadMG logic cannot tell you what "hungarian notation" means.
 
6:57 PM
and "logic" says that lpVar and Varlp exist for exactly the same reasons, and have exactly the same problems, and shouldn't exist for exactly the same reasons.
 
@DeadMG It's still not "hungarian".
 
therefore, there is no functional distinction.
and any distinction you might wish to introduce is entirely arbitrary and irrelevant
 
@SamDeHaan lol @"in the spirit".
 
No Objective-C strings, please.
 
@CatPlusPlus Could be C# verbatim strings, which are cool.
 
6:58 PM
@DeadMG Hungarian names are <family name> <given name>. Hence "hungarian notation", which are <type> <name>.
 
Monkey strings.
 
2 mins ago, by DeadMG
and any distinction you might wish to introduce is entirely arbitrary and irrelevant
 

« first day (619 days earlier)      last day (4327 days later) »