« first day (1423 days earlier)      last day (3524 days later) » 

8:00 PM
@Arcoth Actually anyone with 0 rep can only do that...
 
@Arcoth Hmm...well, I suppose I might be able to come up with a worse comparison if I really tried, but I didn't feel like spending more than a couple seconds thinking about it.
 
Aw puppy, flagging?
 
Xeo
don't think that's him
 
hahahahaha you guys get pissed off easy
 
Oh wait, I can check
 
8:00 PM
Someone give hawk a wooden stake.
 
Xeo
and you are not getting help. Fair deal
 
@JerryCoffin I got one - compare the amounts of upvotes in the C++ Lounge.
 
@Xeo I just remembered, this also extends to other games
10 hours ago, by Alex M.
it's very hard to anticipate shit like this, the designers alternate between magic wells telling jokes and making puns and almost comically sounding ghosts saying they'll kill everyone... and actually doing it
 
hahahahaha
 
my future elf waifu was killed by a ghost I randomly released in divine divinity
 
8:01 PM
I am gonna try and exceed your top answers in sexyness.
 
@Arcoth Number of starred posts? Not sure if that's truly worse or not. On one hand, most comments have little to do with C++. On the other, the average level of knowledge of C++ here is substantially higher here than on Stack Overflow as a whole. Though it's mostly accidental, I'd guess correlation is tighter here.
 
England 1, bastards who made me go through security on a connection to Vienna and then made me disassemble my Zippo,0.
 
@Arcoth If you're thinking in terms of a few answers that are individually really sexy (as you put it) then you're trying to compete with @Mysticial. Good luck.
 
@JerryCoffin Here, why not std::copy( std::istreambuf_iterator<char>(t), {}, std::back_inserter(buffer))? Is that really significantly slower than using your second version? (Of course you reserve storage in the string beforehand)
@JerryCoffin Meh, i gave up :p
 
@Arcoth Did you read the comments on Tyler's code using istreambuf_iterator's?
 
8:13 PM
@JerryCoffin Perhaps Tyler's code... wait
 
> Benchmarked: both Tyler's solutions take about 21 seconds on a 267 MB file. Jerry's first takes 1.2 seconds and his second 0.5 (+/- 0.1), so clearly there's something inefficient about Tyler's code. – dhardy Oct 1 '12 at 12:32
 
Eh, unanticipated backfiring
Didn't even look at his post :o)
 
@Mysticial is much harder to compete with, especially when it comes to votes per answer.
 
make that rep per answer
so that the bounty adds extra difficulty
 
@JerryCoffin Probably your version uses the whole register width for copying. The one-liner copies one char at a time. That doesn't explain the 1:42 ratio though... plus theres unnecessary initialization in your code (that i don't like either). I reckon there has been invalid measurements.
 
8:20 PM
@JerryCoffin Basically he doesn't even have to post anything ever again and will still keep hitting daily limit. Crazy
 
Or read is optimized really well for big files. One should test it for smaller ones, perhaps.
 
One char at a time... sure that's gonna be real fast..
 
iostream should do some internal buffering
 
@JerryCoffin Did that give him 130'000 rep ?
 
@Nelxiost Not even close--he lost huge amounts to the daily rep-cap (you're limited to 200/day from up-votes).
 
8:33 PM
Oh. That is what I thought, it would be weird with his 174k rep
 
@AlexM. Doesn't seem to me like it makes a huge difference, but sure.
 
hey folks, wtf is up with cppcon and no live feed?
 
@Rapptz bunch of amateurs
 
@TemplateRex lol
 
8:36 PM
why channel 9 can't do this, MS is a gold sponsor FCS
 
England 2, Zippo-murdering cuckoo-fuckers 0
 
live streaming is expensive
plus it ruins incentive to join
 
Xeo
wat
 
@Rapptz yeah, like live streaming is making me forget spending $3K in expenses
oh wait, I wasn't going to anyway
 
grats
 
8:42 PM
This is hilarious. How did I miss it when it happened?
-8
A: Unicode in C++11

Puppy Is the above analysis correct, or are there any other Unicode-supporting facilities I'm missing? You're also missing the utter failure of UTF-8 literals. They don't have a distinct type to narrow-character literals, that may have a totally unrelated (e.g. codepages) encoding. So not only d...

 
eh
 
it was 4 upvotes
there's literally nothing worth upvoting there
who would upvote it?
 
it's factually accurate
 
It's a bad answer.
 
it's a terrible answer
 
8:45 PM
@Rapptz It contains this gem "So in short, C++ is broken beyond repair, and this is just one example." so obviously there will be people who will upvote it.
 
It's a bad question as well.
 
@Xarn "So in short, fuck the Committee. C++ is broken beyond repair, and this is just one example."* :D
 
question is fine
 
it's a perfectly good answer.
every point I raised is absolutely true.
 
it's a terrible answer
you're seriously delusional if you think it's any good
 
8:50 PM
when the question is "Why don't the Committee act?" then it's inevitable that any answer will involve describing observed Committee behaviour.
 
@Puppy It is perfectly good rant. However, rant != answer.
 
every point that I made is both true and relates directly to why there has been no movement on the Unicode front in C++.
except the very last line, I guess.
 
your answer is terrible compared to, e.g. stackoverflow.com/a/17106065/1381108
 
Also love the part "I should follow up with my proposition? Fuck you, pay me."
 
no rant
just objective things
 
8:53 PM
that answer is just a reference page.
it does not relate to the behaviour of a group of human beings.
 
... Usually I hate to pile up on someone like that
 
the only possible answer to the question "Why didn't a group of human beings perform an action?" is going to be the observed behaviour of those beings.
 
but, Puppy, you really shouldn't talk about behaviour of human beings.
I am halfway convinced you would be first one to fail Turing test.
 
Actually, the question is "Is there a particular well-known reason that Unicode support remains so poor in C++ ?", not specifically about some human behaviour.
 
well, the only way the language can gain support is by the action of the aforementioned beings.
so they are equivalent questions.
 
8:57 PM
The problem is that if the question is about why a group of human beings is acting in a particular fashion, then it should be closed as primarily subjective. It's only open to objective answers if we read it as being (at least primarily) about 1) what does the language currently offer, and 2) what proposals have been made (and not already shot down) to improve it. Read the first way, you've given a good answer to an OT question. Read the second way, you've failed to answer at all.
 
That still does not invoke human behaviour.
 
hm
I dunno about that.
it's pretty objective that none of the established Committee members have chosen to push Unicode-related features.
 
@JerryCoffin I don't think it's a good answer to the offtopic question
 
as for the amount of time discussing optional<T>'s comparison operators, I wish that was subjective... but it's entirely objective that I sat through many hours of it.
 
In either case, I read the question as the second way you proposed.
 
8:59 PM
Well, they have chosen so for some reason (not only because they "don't give a shit about Unicode", although that might be true)
 
@Rapptz Come to think of it, my answer on meta is also a bit ranty along with profanity and a bit of offensive terminology. But it got received well - probably because I apologized ahead of time? :P
 
if they did give a shit about Unicode, they'd push on support for it.
 
@Rapptz Poor phrasing on my part--I wasn't trying to pass judgement (in either direction) if we read the question that way, just trying to say that we have to read the question that way for it to have any hope of being a good answer.
 
@Puppy Something can be entirely objective but its relation to something else would still be subjective
At least that is how I see this part of your answer
 
@Mysticial Not really.
 
9:03 PM
Yay! Deh wifi is on again now soccer streaming is over.
 
@Puppy Now that i think about it, it doesn't seem as trivial as it seemed to be when i first had a look at the std-proposal
 
speaking of rants
10k only.
hah
glad I've never posted an answer terrible enough to be deleted with the low quality queue.
 
@Mysticial While reading [that answer of yours](http://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-an-unsorted-array/11227902), I was wondering how `int t = (data[c] - 128) >> 31;
sum += ~t & data[c]` works. If I am not mistaken, `data[c] - 128` is negative or positive depending on the original condition (`data[c] >= 128`) and so `t` has its last bit set or not. But I do not understand how the second line replaces `sum += data[c];` ...
Duh. Why is that link not working
 
10
Q: How is if-statement and bitwise operations same in this example?

yasarI was reading this answer and it is mentioned that this code; if (data[c] >= 128) sum += data[c]; can be replaced with this one; int t = (data[c] - 128) >> 31; sum += ~t & data[c]; I am having hard time grasping this. Can someone explain how bitwise operators achieve what if statement d...

 
Oh thanks
 
9:30 PM
@Martin "soccer" #wtf
link not working probably due to multiline message, though it's hard to tell on mobile chat
 
posted on September 08, 2014 by Zhu Meng

This blog post describes C++ AMP remappable shader feature and the changes that it brings to the compilation/execution model in Visual Studio 2014. This feature improves C++ AMP code compilation speed without affecting runtime performance. We will provide...(read more)

 
While reading that answer of yours, I was wondering how `int t = (data[c] - 128) >> 31;
 
Updated clang and libcxx to 3.5.0.
2
 
@LightnessRacesinOrbit Yeah right...
 
@StackedCrooked Finally, thx.
 
9:43 PM
WTF
 
Hmm... I can't seem to specialize a templated constructor on a class which is not templated:
Different compilers give different complaints.
 
1 message moved to bin
 
This same technique works for other, non constructor methods.
 
You could just use overloading.
 
@Nelxiost I'm serious. Markdown is disabled on multi-line messages. Try bold.
 
9:53 PM
@LeviMorrison gotw.ca/gotw/049.htm ^ like he said
@LightnessRacesinOrbit Go yo ass on the beach!
 
not that kind of holiday
 
The issue in this case is that I have a constructor that works with bools, int64_t and double.
 
@LightnessRacesinOrbit Nah I meant "you are right". And also "That kinda sucks"
 
i'm just popping in to download Unforgettable for some bedtime viewing :)
 
So when a user gives a literal 0 it gives a compiler error, beacuse it doesn't know what it should cast to (ambiguous)
 
9:55 PM
@Nelxiost lol right ok then
 
So I thought... why not provide the type via a template argument?
 
@LightnessRacesinOrbit then what is it? You're in Ibiza hotel<lounge>?
 
550kb/s from Usenet in a remote villa.. quite impressed
 
But it doesn't work. Is there some other template incantation I need to chant first?
 
i'm nestled in the mountains witih family
 
9:55 PM
Maybe it's the "too late" thing?
 
best way of putting it
 
@LeviMorrison Whom are you talking to? Questions go here: Stack Overflow
 
this sounds like a perfect fit for chat. it's discussive. on SO i'd close it
 
@LightnessRacesinOrbit Ah.
 
oh, maybe not his original q
 
9:57 PM
@sehe ... I'm pretty sure this is better in chat, not main SO.
 
@LightnessRacesinOrbit And the rest of onesided exchange?
@LeviMorrison How can you be so sure? Have you been here before? (I think I've seen you before. Yes)
 
@sehe I ask similar types of questions in here from time to time and I get responses and discusssions.
This is the first time someone told me to bugger off to main SO.
 
Ok. I will get out of the way. You just have a very very strange way of saying "Hi"
@LeviMorrison I don't recall saying such words :)
 
i think he's ok, personally
though with a testcase it'd be a good SO question
 
I'm starting to think so too. Like I said, it was the way to barge in
 
9:59 PM
i've seen much more discussive qs
 
@sehe Oh, you just have a very very strange way of saying it :D
 
now how the fuck do I unrar on android
 
@LeviMorrison You know, we get such question dumpers too often to start interrogating first. Even regulars wouldn't be "allowed" to post such walls of code, anyways
 
I do admit it was probably a bit too big of a code dump.
 
Ok. Carry on :)
 
10:00 PM
Sorry for that.
 
Xeo
I just noticed /cc @EtiennedeMartel
 
Yep, also just did.
 
It's ok. It's indeed something of an interesting question
 
Too bad I've never been a fan of the FFVII soundtrack.
 
Xeo
I love it
 
10:02 PM
if I were at home I'd start looking into the question. then give up after three minutes
fuck templates, seriously. the standard wording is ridonculous
 
@LeviMorrison T cannot be deduced so T must be specified as an explicit template param. However, this is not possible for constructors (there's no syntax for it.)
 
@StackedCrooked Hmm. You can have a templated class which also has a templated constructor and construct it like, SomeClass<int><float>(), right?
 
user3010322
@Xeo Not bad. Still like Star Light Zone and Rainbow Road dabes.
 
I wonder why I thought this was the case. Hmm.
This might be why there is a make_shared() function to construct shared_ptrs
 
10:07 PM
Maybe because it becomes too hard for the compiler to figure out if < means less-than or start of template-param list.
 
Nah
make_shared is a feature, not a workaround.
 
user3010322
make_shared and make_unique are things to protect from unsafety through the complicated nature of exceptions.
 
factory functions are constructors with an extra level of indirection.
superconstructors!
Maybe new should have been a (overloadable) function.
Oh wait.
it is
somewhat
 
Fuck make_unique.. I'm i'm in 'Filling Station', waiting for double_
Fuck..
Pepperoni and jalapenos.
 
Is the size of an object always divisible by its alignment?
 
10:12 PM
@StackedCrooked Probably not able to a template specialization on it, eh? :D
 
Definitely not.
 
Btw, you can emulate template constructor by passing an object of type Identity<T> and overload on that.
If you really must.
 
If the object is a pointer to a DB subsystem, it's unlikely.
 
In this case I'm making class that would represent an variable in a dynamic language like PHP in Python (I am so original, I know).
 
10:15 PM
@LeviMorrison are you looking for something to disambiguate, like this: coliru.stacked-crooked.com/a/fbac8b849a855ad8 ? (honestly, that code you posted is beyond me; T in typename X<T>::type is in undeducible context AFAICT)
@StackedCrooked That's another good technique, much to the same effect as ^
@LeviMorrison boost::variant, done
 
user3010322
boost::variant<everything, ever>
 
@StackedCrooked Yes.
else, making arrays of it cannot work.
 
There's Poco::Dynamic and folly::dynamic
For "softer" typing.
 
boost::any?
 
Those are possibly interesting if you're ready to take on dependencies (but I bet he isn't, since he's... rolling his own)
@Rapptz That's a lot more work for a known type list
 
10:18 PM
@Puppy cool
 
@sehe Interesting. I'm not sure why that resolves ambiguity, to be honest. I'll have to look at that closer.
 
@sehe I meant vs folly::dynamic.
I don't know what they are.
 
@Rapptz they are variant types for a fixed set of member types
@LeviMorrison You just add an extra parameter so none of the overloads apply. Then you add the single-arg templated constructor and make it supply the extra parameter based purely on the type deduced. Now, you cannot be ambiguous anymore, because two, different, parameters will match the proper type
 
oh
it's just a JSON value from the look of it
 
Like QVariant, yeah I reckon
 
10:23 PM
> Sorry, we could not display the entire diff because too many files (308) changed.
sucks
Do you guys do #include "stuff" or #include <stuff> for your libraries?
 
I always use #include <Wide/Subproject/Header.h>.
 
like I find myself including my own files with #include "../stuff/other.hpp"
 
bad because then it breaks if you move the file.
 
Depends on where stuff is.
 
I guess I should change it
 
10:26 PM
bah
my C# friend and I had a nice discussion
which ended up on, more or less, "too bad that Haskell is not Idris"
followed by "I suppose we could enable Liquid Haskell"
 
... wonderful conversation. Sounds like the kind of architecting that never needs to worry about real life
WTF. Who said compiling kernels was slow?? Moore's Law brings it down to 42.7s with a Core i7 5960X
 
@sehe no, quite the contrary. We're developing a game (that is quite functional already)
functional and functioning :P
 
In Liquid Haskell? Or Idris?
 
@sehe in just haskell. The conversation was about type reification contracts that you can't express in regular haskell. As in, assume data D = D { a :: Maybe A, b :: Maybe B }, but a function wants to take only D with a being Just.
 
10:37 PM
buh, I have no idea what I am doing with C++ right now
 
you can only say f :: D -> D, you can't write f :: D (with a being not Nothing) -> D
you have to create another type and convert, which is very cumbersome.
Liquid Haskell allows you to do pretty much that.
 
@sehe In retrospect I've never used it in a parameter... but I've used it as the return type several times, which his how I learned the construct in the first place.
 
@LeviMorrison Hmm? "It"?
 
@sehe "typename X<T>::type" (in the message I replied to)
 
@BartekBanachewicz Ah. reification was a bit woosh there, but this I understand :)
@LeviMorrison Ah. In parameters it's okay, but it's nondeducable. So in ctor parameters is it not feasible
 
10:44 PM
@sehe Even if it was it can't be called because there isn't syntax for it.
StackedCrooked pointed that out.
 
@sehe apparently it's a much... wider term than I thought.
I'm now reading about Vienna Development Method
 
Why [isn't this pinned yet]? IMPAHTANT: Scott Hair Poll
@LeviMorrison That's precisely why I said it's not feasible :)
 
Oh :D
 
Also Koenigsegg apparently revealed a car called One:1, that has 1360HP and weighs 1360kg
which is pretty damn amazing when you think about it.
considering that a human has about a half HP and weighs ~80kg.
 
@sehe So I just double checked and this construct works for parameters for methods and functions; just not constructors.
I guess I need to have a factory function, right? \o/ Praise the factory!
 
10:56 PM
@Puppy something for you attack on AES!
@LeviMorrison A forwarding helper, yes
@BartekBanachewicz wut. That's... how?
:)
 
ask them :)
> On top of this, the One:1 is the first homologated production car in the world with one Megawatt of power,
 
Hello, Cruel World!
 
> 0 - 400 km/h approx. 20 sec
 
@BartekBanachewicz An X-15 weighed ~5.588 kg, and had a motor with ~26.000 Kg of thrust. It's a bit tough to convert thrust to horsepower (impossible unless you make some assumptions about speed and such), but you can probably figure at least 2 HP to produce one kg of thrust.
 
@JerryCoffin I knew someone will bring jet planes into that :P
 
11:09 PM
@BartekBanachewicz The X-15 wasn't a jet plane.
 
that was the rocket one?
ah right
 
@BartekBanachewicz Yes.
 
@BartekBanachewicz I'm pretty sure I would not care to try that out with such a feather-light
 
@BartekBanachewicz Yes, probably
 
@CatPlusPlus uh oh
 
11:17 PM
Also Vagrantfile being a DSL is kinda annoying (again that no programmatic access shit) but it doesn't really matter
 
orite
So I shouldn't even bother creating a shell script
 
It's 20 lines you p much write once and forget about
 
and jump to Salt at once
 
what high level language are usually used with games with C++ engines?
 
disclaimer I haven't used those things at all
@corvid Lua
 
11:18 PM
C#
@BartekBanachewicz Primo opportunity to learn!!!
 
@CatPlusPlus Aye. I'll prolly need your help though.
I kinda don't have two weeks for that.
 
Not much here yet but this is loungecppdotnet state tree github.com/LoungeCPP/state-tree
 
@corvid python
EVE Online uses Python
 
@CatPlusPlus uh oh
 
Civ IV also has its own Python interpreter bundled
ToEE was also using python
 
11:20 PM
FWIW it looks really complicated
 
Excellent pun for the Robot:
Google Chrome to suggest pronounceable passwords http://www.theregister.co.uk/2014/09/07/google_recommends_pronounceable_passwords/ For me it just suggested [mɑrˈtɛin ˈɣroːtən]
Night all
 
@BartekBanachewicz Also define 'release env'
 
user1646075
As usual, XKCD presents the best case:

http://www.xkcd.com/936/
 
@AlexM. I have no clue how to make my python interact with C++
 
I'd tell you but this is family-friendly channel
 
11:35 PM
I like where this is going
 
Ell
Bonjoir
Bonjuir
@bartek where are you in the ugay?
I'm drunk
 
11:50 PM
do you guys use size_t or std::size_t and why?
 
user1646075
size doesn't matter
 
I use butt_t
 
@CatPlusPlus butte_t?
 
@nightcracker They are equivalent; one is just namespaced.
 
I know they are
 
user1646075
11:51 PM
Hey Ell - How did the breakfast go?
 
but I'm interested in stylistic arguments
 
You should use std::size_t.
 
user1646075
@nightcracker start reading GQ then
 
> and why?
 
user1646075
/mutters ... about time
 
11:53 PM
@nightcracker It's less C-like?
 
@LeviMorrison being less like C is not a goal in of itself - if you're not fixing one of C's issues then that's no reason at all
 
@nightcracker size_t. The std:: feels like clutter for what I consider 'fundamental types' (even if it's a typedef).
same goes for uint64_t, etc.
For some reason this doesn't apply to ptrdiff_t.
I couldn't get it to work without std::.
 
size_t is only defined in deprecated headers.
 
as if C++ will ever introduce breaking changes
 
They're libc headers, C++ can deprecate them whatever they want
 
11:55 PM
if they did we wouldn't have this shit language :P
 
It doesn't matter in the slightest
 
You decide whether using deprecated headers is good style or not.
 
@StackedCrooked No
They're in the global and namespace std iirc.
 
@nightcracker It already has (just doesn't break much code, and most breakage is easily repaired).
 
Ell
11:57 PM
@aclarke I never actually woke up in time :L I'll do it some day though haha
 
unless I'm remembering wrong
time to look it up.
 
@JerryCoffin I mean non-trivial breaking changes, disallowing ::size_t would be not a trivial non-breaking change, breaking almost every program
 
If you only include "modern" header s like cstddef.h then size_t is not guaranteed to be in the global namespace.
 
@nightcracker changing the meaning of auto was a breaking change.
 
@nightcracker I usually use either size_t or whatever::size_type.
 
11:59 PM
@chris Darude - Sandstorm pun opportunity missed. I am disappoint.
 
user1646075
@Ell heh best layed plans. I'm on a mission now to see if black pud is available in australia. I've found out that there's an english grocery store (wot brings in real cheeses and everything!) in a near-city suburb called Balmain...
 
@nightcracker When C++ was new (but definitely a lot less so now) requiring all parameter types to be declared was a distinctly non-trivial breaking change.
 
92
A: Does "std::size_t" make sense in C++?

Johannes Schaub - litbThere seems to be confusion among the stackoverflow crowd concerning this ::size_t is defined in the backward compatibility header stddef.h . It's been part of ANSI/ISO C and ISO C++ since their very beginning. Every C++ implementation has to ship with stddef.h (compatibility) and cstddef where ...

 

« first day (1423 days earlier)      last day (3524 days later) »