« first day (1204 days earlier)      last day (3746 days later) » 

9:00 PM
@ThePhD static_assert(N == 3 || N == 7, "no cross product for u");
 
In mathematics, the cross product or vector product is a binary operation on two vectors in three-dimensional space. It results in a vector which is perpendicular to both and therefore normal to the plane containing them. It has many applications in mathematics, physics, and engineering. If the vectors have the same direction or one has zero length, then their cross product is zero. More generally, the magnitude of the product equals the area of a parallelogram with the vectors for sides; in particular for perpendicular vectors this is a rectangle and the magnitude of the product is the ...
 
user3010322
Mmm.
 
(links to "Generalizations" subsection)
 
user3010322
I'm going to go now.
 
@ThePhD lol
 
9:01 PM
@R.MartinhoFernandes I am too noob
 
@Rapptz I think everyone but me is.
 
lol
 
yo fuck!
I visited a new planet and got one-shot by some kind of meteor something
 
what
@R.MartinhoFernandes starbait averted
0
Q: Error in "The C++ Programming Language" Section "23.4.7 Friends"

bmmI have been trying to get the following code work from the book "The C++ Programming Language (4th Edition)" section "23.4.7 Friends" but could not succeed. template<typename T> class Matrix; template<typename T> class Vector { T v[4]; public: friend Vector operator*<>(const Matrix<T>&,...

 
If the memory has already been pre-allocated. Is placement new slower than creating a regular stack variable?
(don't ask why I'm just curious)
 
9:04 PM
@Borgleader Depends on a whole host of caching effects.
 
Hmm =/ damn
 
why?
 
@R.MartinhoFernandes !!welcome is allowed again, we asked the SE staff.
 
@BenjaminGruenbaum Ah, neat. Need to take some time to look at that.
 
@DeadMG Robot was looking for a way to benchmark constructors with nonius, but the problem is the way it's set up right now (as I understand it) the destructor would run too. So I thought, what if the functor has pre-allocated memory and all the function that is benchmarked does is placement new the object and then after the benchmark is done the owning functor calls delete thus separating the ctor and dtor calls.
I knew it was a stupid idea, but I had to ask.
 
9:07 PM
@Borgleader aligned_storage on the stack + placement new should be about the same.
 
@R.MartinhoFernandes are we setting up Caprica here? o.O
 
fuck, @sehe is catching up to me
need more repz
 
I could use some repz too
 
Hm.. Me too.
 
9:16 PM
@Rapptz you could ask a question :)
 
0 questions for life.
 
I think that good questions are as valuable as good answers
after all, without questions there would be no answers
 
That's cool but I'm never going to ask a question probably.
 
@Rapptz why?
 
I have (and probably will never have) a question to ask to SO. Even if I did it'd be a duplicate for sure.
 
9:25 PM
I have nearly 50/50 ratio of q/a on SO.
 
@LightnessRacesinOrbit that's really meh
 
@BartekBanachewicz It's totally clear and totally straightforward. What's the problem?
 
it's offtopic
 
@BartekBanachewicz Why?
 
9:27 PM
it's not about programming.
 
@P0W Just generalize 'make_binop' to recognize more than single char tokens: coliru.stacked-crooked.com/a/37faa9423bb47bbc (oh and some cleanup. Rule #1: clear code makes a clear mind) — sehe 43 secs ago
 
I can agree on migrating it to GD.SE
@Flexo hey, could we get that Q migrated to Gamedev? it was closed a bit too hastily
 
@LightnessRacesinOrbit oh come on, you know that question sucks
it's just that happened that you knew where to look for an answer
 
@BartekBanachewicz It obviously is.
@Jefffrey It's not the best question in the world but I don't see why it needed to get downvoted and closed.
@Jefffrey Not really. If you actually read my answer you'll see it says "I don't know and we can't find out".
 
@LightnessRacesinOrbit you could spawn that question for every software written ever
 
9:30 PM
@BartekBanachewicz So? What does that strawman argument (i.e. this has nothing to do with slippery-slope (what a fucking surprise)) have to do with this question?
 
@LightnessRacesinOrbit lol. desperate much. I'm doing /nothing/ for this. All I do is troll the questions and look what this brings me: user:85371 [boost] is:answer score:0
 
@LightnessRacesinOrbit that it's bad in its current form.
 
> Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming
 
@BartekBanachewicz That's not an argument; it's a repeat of your initial assertion.
 
9:31 PM
@LightnessRacesinOrbit that's not an answer :/
 
@Jefffrey I think a game engine is a tool used primarily for programming
@Jefffrey It's the only possible answer since the true answer is unknowable. "We don't know" is a fundamental possible response to any scientific inquiry
 
@LightnessRacesinOrbit oh wait
lol
 
let me use an example: if it asked, for example, "by what means is effect X created in FrostBite and how could I replicate it", then "C++" would be an okay answer
 
I don't see how the question would add any value for anyone.
 
@BartekBanachewicz what???
@chris It might be interesting for someone. Maybe someone wants to make a chart of game engines by programming language, as part of some research or statistical analysis. How do you know it's not useful, just because you don't care?
 
9:32 PM
in a more general form it can be put on GD, because it makes way more sense to ask about gamedev specific things there
 
@BartekBanachewicz that I agree with. forgot about that site
 
my point is that Frostbite is not interesting enough from SO point of view to make a question for it
 
@BartekBanachewicz given GD's existence, yeah okay
ugh
 
@LightnessRacesinOrbit I thought frostbite was a game
 
that reminds me of ugh
 
9:34 PM
what's ugh?
 
yesterday, by Lightness Races in Orbit
> Captain, given your awareness of Khan's true location in the medbay, may I know the details of your plan?
 
@LightnessRacesinOrbit then it should be moved to gamedev
 
@Jefffrey ah, okay
@Jefffrey that's a quorum! too late now, though
 
too late?
 
@BartekBanachewicz gamedev.stackexchange.com/help/on-topic - "and is not about..." "what technology some particular game used" makes me think that it won't do well over there too
 
9:37 PM
@Jefffrey the question was closed and deleted ages ago
@Flexo It's not a game.
 
@LightnessRacesinOrbit It's not deleted
 
@Jefffrey oh, must have gotten undeleted then \o/
 
eh, I wonder who casted the last vote
* . *
 
@LightnessRacesinOrbit I'll ask them in TL
 
9:39 PM
 
@Borgleader I was thinking that too
UB if ~T() has observable effects and you use the benchmark object more than once, though.
 
@Borgleader nonius doesn't use macros though I thought
 
I wrote on facebook that people who don't treat themselfs or their child with important vaccines should pay "vaccine" tax
that upset some people
 
9:44 PM
@Rapptz wut?
 
Oh it does.
 
@JohannesSchaub-litb I didn't see that
 
do you think the plan is too aggressive?
 
I liked the older way better
 
9:44 PM
assuming I have an uncomparable class
 
@LightnessRacesinOrbit oh i said it in german
 
but I need to store objects of it in the set
 
Ell
@JohannesSchaub-litb No, I agree
 
what could be the solution sans adding arbitrary index to it?
 
@LightnessRacesinOrbit Ideally there would be a cleanup function that would be called after each iteration (outside of the benchmarked section) to allow cleanup.
 
Ell
9:45 PM
Vaccinating yourself is for the good of humankind as well as yourself
 
but this is just a proof a concept
 
@JohannesSchaub-litb oh, I see it now. fucking germans
 
@Borgleader yeah. kinda fucks with the whole thing though because you want to run the iterations back-to-back and do block timing
 
9:47 PM
@Ell one girl asked me whether i'm dad and how i come to think i know why those parents reject vaccines
but i didn't claim that i know :D
 
@LightnessRacesinOrbit Yeah =/
 
that is, after all, the purpose of doing multiple iterations at once: minimising the impact of not just time variation but also poor time measurement precision for hyper-short durations
 
Ell
@JohannesSchaub-litb No sane parent rejects vaccination
 
@Ell and then she called me "intolerant"
 
> Vaccine opponents who vaccinate their children against measles, etc would have to leave if they already are forced not to control pay costs other nothing for the health of society as a whole to do! (Translated by Bing)
awesome
@JohannesSchaub-litb I hate that argument. "We should be tolerant of anyone who wants to do whatever they like even if that puts their kids or my kids or everyone as a whole at risk"
 
9:48 PM
lol
 
Ell
Meh, it is not your duty to be tolerant
 
Fucking lefty bullshit with no basis in reality or logic
 
@LightnessRacesinOrbit totally agreed.
 
Ell
@LightnessRacesinOrbit +1
 
if they don't like to vacc against genital warts they are all free to do, but that's a whole different thing than, say, measles
 
9:49 PM
> And it is not true that all agree! I know pediatricians who think nothing of the vaccination!
this chick is off her fucking meds
 
@LightnessRacesinOrbit maybe she doesn't believe in meds :)
 
@melak47 ha, it would sure explain a lot!
 
i should have said that i know biologists who claim earth were made in 6 days
 
I actually do know some biologists like that
I don't think there are any paediatricians who think nothing of vaccination though.
 
9:56 PM
looks like homework
 
it is my attempt at improving the guy's solution, whatever it is
"reference implementation", so to speak
so, is it OK?
 
I got rid of remove(Song) because of unclear equality relation
 
Search on SO is too damn hard
 
if the code is ok I will explain, comment it and post as an answer
but I wouldn't want to post something that has some terrible mistakes
 
user1804599
9:58 PM
36 y u no power of two.
 
@BartekBanachewicz did you seriously use a double for length?!
 
@Rapptz It's still there.
 
@rightfold gooooood question
 
@sehe what should I use instead?
 
user1804599
@BartekBanachewicz chrono duration.
 
9:59 PM
@Borgleader Need to be able to pass arguments to ctors, though.
 
@rightfold awww
 
@BartekBanachewicz seconds. or sectors in red-book format specs?
 
@R.MartinhoFernandes Store them in a tuple
 
@R.MartinhoFernandes Yeah that can be done easily.
 
10:03 PM
hm
they changed the github issue tracker
the UI of it anyway
looks good
 
user1804599
They also changed organisation pages.
 
@sehe How do I output seconds as minutes:seconds?
 
@BartekBanachewicz You'll figure it out! I think you could ask this on Stack Overflow if you're really desperate :/
 
user1804599
int mins = seconds / 60;
int secs = seconds % 60;
std::printf("%d:%d\n", mins, secs);
 
uh wtf
main.cpp:42:26: error: 'std::literals' has not been declared
     using namespace std::literals::chrono_literals;
 
10:08 PM
that's a C++14 thing
 
that's straight from cppreference example! :/
@Rapptz god damn it
what do I do in C++11?
define those myself?
 
Yes
 
Song s2("The song of Pie", std::chrono::minutes(3) + std::chrono::seconds(14));
 
or use std::chrono::seconds(..) et al
yes
 
user1804599
If I want a hash table that checks equality based on merely the hash function (no ==), should I just use std::unordered_map<T, hash<T>, hash_equality<T>> where hash_equality<T>()(a, b) == (hash<T>()(a) == hash<T>()(b))?
 
user1804599
10:11 PM
Will the compiler do CSE?
 
@Rapptz gah if I shim them that's UB :/
 
@BartekBanachewicz WAIT. You mean that you actually wanted double(3.14) to mean 3'14"?!?!? Like, WTF dude
 
can I #ifdef C++14?
@sehe that was OP not me :/
 
user1804599
@sehe lol
 
@BartekBanachewicz Oh. Phew
 
user1804599
10:12 PM
Base-60 floating point number. :D
 
github.com/Rapptz/Gears/blob/master/gears/chrono/literals.hpp just copy paste these if you really want them
 
I wasn't aware of a question :)
 
2
A: Is there a preprocessor directive for detecting C++11 Standard library?

TemplateRexTesting for features is an active research direction for the Standard Committee. THere is a Study Group 10 with its own freely accessible mailinglist where current development is being discussed. For the next meeting, this N3694 working paper has been submitted.

damn it
 
user1804599
Hmm, wait. I think I actually need a binary search tree with the hashes as keys.
 
@Rapptz I found an example impl at cppreference, but I wanted it to be c++14 compatible :F
 
10:13 PM
@rightfold Ooops. Are you conflating hashing with equating? You can iff the BST facilitates hash buckets
 
shims don't really exist in C++ as it seems because UB
 
user1804599
@sehe Equality is just hash equality in my case.
 
user1804599
And the hash function is locality-sensitive, so similar inputs should collide.
 
I have no idea what shims is
 
@rightfold So... you have a guaranteed perfect hash? That's an id then
 
user1804599
10:13 PM
No. If 1 and 2 both hash to 400, 1 and 2 are considered equal.
 
@rightfold Okay. That's still ... surprising. A fuzzy map.
 
user1804599
But e.g. 1 and 1000 should not hash to the same hash.
 
user1804599
Then I want to find the one in the map that is closest to the given hash.
 
@sehe is that a builtin?
@Rapptz shims and polyfills are javascript terms used to describe code that defines some statements for compatibility with browsers, exactly like the one I wanted to write.
 
Just shown to my daughter RT @electionista: The Defence Ministers of Norway, Sweden, Netherlands and Germany http://t.co/qYpIgx2cke
@BartekBanachewicz what?
 
10:17 PM
@sehe seconds / 60 , seconds % 60
 
user1804599
I think std::map with std::lower_bound will do.
 
is there a builtin function in chrono to do that?
 
user1804599
I don’t think so.
 
@BartekBanachewicz nope. I think Hinnant has something for this on his site. And it might be in a proposal
 
10:18 PM
lame.
 
Mar 22 '13 at 9:54, by R. Martinho Fernandes
http://home.roadrunner.com/~hinnant/bloomington/chrono_io.html
@BartekBanachewicz Go back to Haskell
 
@sehe :P
anyway, rest of the code looking fine?
 
What's the value of reference_wrapper over just pointers? (Nonnullability?)
 
@Rapptz interesting
 
@sehe that and performance(jk) :P
 
10:23 PM
...
 
heh, just non-nullability is an ok argument imho
if you don't find anything worth picking at I'm posting it
 
@Rapptz Tumblr peeps are watching 8 minute intro vids? Nah.
 
it makes fun of tumblr
 
@BartekBanachewicz remove by index? Seems asking for trouble. Do you allow duplicate songs? Why not by value?
 
30 mins ago, by Bartek Banachewicz
I got rid of remove(Song) because of unclear equality relation
 
10:28 PM
@Rapptz dammit I'm at 6 minutes and it's getting overwhelming
 
@BartekBanachewicz Okay. That's settled then
 
@StackedCrooked lol
 
@StackedCrooked I didn't make it. I skipped ahead after ~1 min and immediately bailed
 
I should add a check with exception of OOB maybe
 
@BartekBanachewicz Oh, that. Yeah. Maybe much. I was thinking about races/stale indexes.
But in a sense, by index models an album better. (Though in real life, we can't really graft a track away)
 
10:29 PM
@sehe dang it. You're kinda right. I think that stating it's not threadsafe upfront should be enough, though.
 
@Rapptz that presenter has a horrible pronunciation of Madoka ("ma dooka" or something).
 
(that's the joke)
 
@BartekBanachewicz Yeah. See my next message
 
user3010322
So, TIL base classes disqualify something from being a PoD or standard layout.
 
congrats
 
10:35 PM
> I have added an additional class called Song. It has 2 private variables (title and length) some basic constructors and operation overloads for = and ==
fuck i missed that part
eh, whatever. I still think I was right about that.
 
user3010322
I personally think it's kind of dumb that something can't be considered PoD or such because of base classes (especially if they're empty base classes), but w/e.
 
user3010322
I'm sure the standard knows best. This throws all my work out the window, though.
 
+1 for being masochist. I don't even have the gut to use regexes, let alone write a parser for them... — H2CO3 16 mins ago
^ lol
 
your issue is somewhere else
 
@ThePhD is_trivially_copyable?
 
10:37 PM
there. inb4 "doesn't answer the question"
but fuck it, I consider it a reasonable-quality C++ and I haven't written such thing in a while
 
146
A: What are Aggregates and PODs and how/why are they special?

R. Martinho FernandesWhat changes for C++11? Aggregates The standard definition of an aggregate has changed slightly, but it's still pretty much the same: An aggregate is an array or a class (Clause 9) with no user-provided constructors (12.1), no brace-or-equal-initializers for non-static data members (9.2),...

 
user3010322
I know how to read and what a PoD and Aggregates are.
 
user3010322
struct fstruct { float woof; };
struct gstruct : fstruct { };
static_assert( std::is_pod<gstruct>::value, ".." );
 
user3010322
Fails in VC++.
 
10:39 PM
@sehe ^ :F (did that before posting)
 
Xeo
wheee
 
Ell
Does anyone know of the website/plugin which lists a load of common websites and how "good" their EULAs are? for example if you go onto facebook, it will warn you that you can't delete your account
 
@BartekBanachewicz Me too.
What. Are we taking MS Calc.exe as the holy word on floating point truth now?
 
Ell
Ahh got it, it was "Terms of Service; Didn't Read"
 
10:41 PM
@ThePhD They probably don't implement the C++11 rules.
@Ell I deleted my FB account
 
Ell
@DeadMG Me too once
 
@BartekBanachewicz Apparently, it is ok:
> The innards of Calc - the arithmetic engine - was completely thrown away and rewritten from scratch. The standard IEEE floating point library was replaced with an arbitrary-precision arithmetic library. This was done after people kept writing ha-ha articles about how Calc couldn't do decimal arithmetic correctly, that for example computing 10.21 - 10.2 resulted in 0.0100000000000016. R.Chen
 
Xeo
@DeadMG same
 
Ell
Now I have it back again
 
10:43 PM
> Today, Calc's internal computations are done with infinite precision for basic operations (addition, subtraction, multiplication, division) and 32 digits of precision for advanced operations (square root, transcendental operators).
 
it's 8 * 1.0000110011001100110011001100110011001100110011001101 on 64-bit double
 
Xeo
also, Dark Heresy today was loads of fun, with two new players. haven't laughed that much in a while
 
@BartekBanachewicz yeah. quit writing unreasonable quality code!
@BartekBanachewicz Have you spotted the edit in the comment though?
 
@R.MartinhoFernandes I think I almost have it
 
@sehe I had to :/ The test I wrote at work had terrible shaky behaviour so I stripped all good stuff from it and left it at bare C to diagnose the problem :(
@sehe oho.
 
Xeo
10:45 PM
@DeadMG you plinked 8 hours ago?
 
@Xeo Been playing some Starbound.
 
Xeo
ah
 
is it just me, or holy shit, the bow is super fuckin' weak?
 
Xeo
it's okay-ish, because of the range
 
hmm
 
Xeo
10:46 PM
it's quickly left behind, though
 
I think it wouldn't be so bad, but the game seems to think that if you fire whilst moving, your shots pass right through enemies.
 
Xeo
it's good for its tiers, but after that...eh
 
btw what the hell with std::advance? why doesn't it return a new iterator?
 
Xeo
@BartekBanachewicz no, that'd be std::next
 
Never used or knew that the scroll bar in Visual Studio's code editor has a context menu. http://t.co/k3qhSnHVsp
So.... useful
 
10:47 PM
@Xeo oh fail. Imma change that
 
so
how easy/hard is that UFO penguin thing?
 
Xeo
quite easy
just keep moving
 
@sehe That's common to many native Windows scrollbars
 
hm
I have full iron armour and a poisonous harpoon and an iron hunting bow
 
@LightnessRacesinOrbit I know. Still.
 
10:50 PM
@DeadMG started a new game, my starting planet had lava on top of it
 
lol
 
I wonder what the guy will say when he sees that answer
 
@ThePhD That's not an empty base class, now is it? :)
 
the penguin is easy to get with the arrow, it's kind of lame yet you just have to build yourself something on top of you to protect you
 
Hey @Xeo, wanna setup your character for tomorrow?
 
user3010322
10:52 PM
@Rapptz I specified other kinds of cases where it should work. Obviously, the primary case is where there's a constructorless, PoD base member.
 
Xeo
@LoïcFaure-Lacroix it destroys that now
 
user3010322
And either way, it's just VC++ being stupid as usual.
 
Sehe has a question about it iirc
 
Xeo
@R.MartinhoFernandes sorry, can we do that tomorrow?
 
@Xeo it did but the damage were minimal
 
10:52 PM
@Xeo np
 
Xeo
thanks
 
@BartekBanachewicz What guy, and what answer?
 
but I haven't tried yet with the update so may be it worse than it was
 
@LightnessRacesinOrbit this one
 
I can't find a keyboard on android that I like enough to stick with =[
 
10:54 PM
I liked Swiftkey when I tried it
 
@Rapptz which android?
 
4.2.2
@Borgleader I tried it out but it asked me to read my emails and stuff so I decided against it
 
user3010322
Okay
 
user3010322
RVector works. I trimmed some ~2K lines of code.
 
user3010322
Now I need generic RMatrix, to get rid of 4x4 and 3x3 matrix specializations
 
10:56 PM
Why do you have prefixes in your classes and what does the R prefix mean
 
user3010322
R = raw. Or, it used to, before MSVC fucked it up.
 
Xeo
@Rapptz Hacker's Keyboard <3
 
@Xeo At least you don't have to dick around with ammo anymore.
 
user3010322
It means no constructors, no operator=, nothing. It's for the base PoD types I have, who have typedefs for Matrix = RMatrix<float, 4, 4> and such.
 
user3010322
It's also applicable to be pasted into a union.
 
Xeo
10:57 PM
@DeadMG on the other hand, a shame you can't dick around with ammo anymore!
 
@Rapptz Have you tried Touchpal ?
 
yes
 
I've tried Google Keyboard, TouchPal, SwiftKey, and Kii Keyboard
 
Xeo
1 min ago, by Xeo
@Rapptz Hacker's Keyboard <3
 
10:58 PM
to be honest now I only use the Google one since kitkat
But touchpal was pretty good on phone with crappy screen
 
> 4_min + 52_s
yuck
 
why is it yuck?
 

« first day (1204 days earlier)      last day (3746 days later) »