« first day (862 days earlier)      last day (4084 days later) » 

1:00 PM
well you have to register it somehow
 
Ell
Meh stuff shoulst know about its children classes
 
Xeo
Question: Why does it need to be static?
 
Ell
Derived I mean
 
@BartekBanachewicz How about a map from type ids to strings?
 
@Xeo Probably some kind of type "trait"
 
1:01 PM
@FredOverflow I want to do it compile-time
 
Xeo
@BartekBanachewicz Compile-time map, then.
 
I've made a working solution passing int template parameter
@Xeo mhm, continue
 
Also why does the base class need to know of its children at compile time? That sounds terrible
 
62
Q: Is continue considered bad style?

FredOverflowI feel myself tempted to write the following nested loop: for (int i = 0; i < N; ++i) { for (int k = 0; k < N; ++k) { if (i == k) continue; // ... other stuff ... } } Would this be acceptable, or should I use if (i != k) and thus introduce another level of nes...

 
1:02 PM
@Cicada Because a) number of children is fixed b) it's just a literal identificator used for debug messages
 
That's not an answer
 
Also please change your avatar back
 
no u
 
user1357851
 
@Cicada I would have to repeat the member function in all derived classes, which is DRY violation
@FredOverflow uh.
 
1:04 PM
@BartekBanachewicz Can you post a link to where you first described the problem?
 
Xeo
template<class T, class = EnableIf<is_base_of<Base, T>>>
struct Base_derived_name{ static constexpr char value[] = "Base"; };

template<>
struct Base_derived_name<Derived, void>{ static constexpr char value[] = "Derived"; };
something along those lines.
 
make the base function virtual and every children calls the base with the static identifier as argument?
 
@Telkitty can you stop posting random pictures, pretty please?
 
user1357851
@FredOverflow Why is using continue considered bad coding style?
 
@Telkitty click the link, duh
 
Xeo
1:05 PM
@Cicada ~Compile Time~
 
@Xeo right
 
Xeo
Also, yeah, change your avatar back please, it's irritating, since your and Cat's name both start with C.
 
that's the spirit
be glad i can't change my nick
 
no, it's annoying
 
user1357851
1:07 PM
@Cicada I did read the question. But the question has not been clear whether it would be considered bad coding style in that case alone or in generally continue should not be used in C++ programs
 
Not mentioning artistic value of your pretty face over that Cat.
 
:cripes:
 
@Xeo do you think that boost::mpl might have something for this?
 
@Telkitty In C++1y, the continue keyword will be recycled for continuation-passing style.
 
Xeo
@BartekBanachewicz Did you check what I wrote above?
@FredOverflow lawl
 
1:09 PM
@Xeo yes. I am having some trouble in understanding that, tbh.
 
f() continue g();   // Call f now, and when f is done, continue with g
 
Xeo
Yeah, nvm, I somehow had in mind that you have the derived class type available.
Sorry, my mind's preoccupied with something right now.
 
okay then.
I guess I'll go with CRTP
 
@Xeo naked women?
 
though it's probably more verbose that I'd like it to be
 
user1357851
1:11 PM
@FredOverflow and if you have a case statement inside loop => a,b,c (continue), d,f, (do something else)?
 
Xeo
@FredOverflow #define continue ;? :)
 
@Telkitty If you want the old continue, just write continue; without anything preceding or following it.
@Xeo xD
 
Xeo
@FredOverflow Did you prepare this or are you just going with the flow?
 
It's such a simple design, no need for preparing really.
I'll use the chat log verbatim as a proposal.
 
Xeo
lawl
 
1:16 PM
"My dear, what's on your mind?" - "I am thinking about proposing." - "Oh darling! blushes Please tell me more!" - "I want to re-purpose the continue keyword for continuation-passing style in C++14." - "...You sleep on the couch tonight."
10
 
Xeo
@CatPlusPlus Or only write template meta wankery and you'll never get to debugging!
 
jesus I need to close my account there
 
Someone called?
 
@sehe no but since you are there, you might be able to help me
 
@Mhjr Funny thing I'm competing with an Indian for a job opportunity
The recruiter finds the Indian's price very tempting :P
 
user1357851
1:27 PM
BTW the founder of freelancer used to be a lecturer at E.E. deparment which I was a student of
 
most are undervaluing the posted projects
 
> Perhaps Spirit assumed too much about the C++ expertise of its users.
 
@sehe lol
 
^ whouch. that's quite snarky on the Spirit-general mailing list
@BartekBanachewicz Mmm. i'm in the middle of a birthday party. Little time. Just drop the question and I might see it
 
29 mins ago, by Bartek Banachewicz
IOW I need a static string literal identificator for every derived class that can be accessed by base class method
 
user1357851
1:29 PM
@sehe Oo I am touched, you are in a party and you prefer to come over and talk with us :p
 
@sehe Why are you chatting in the middle of a birthday party?
 
user1357851
coz he's bored?
 
user image
3
@R.MartinhoFernandes will deprecate us all :(
 
@BartekBanachewicz typeid?
 
1:48 PM
47 mins ago, by Bartek Banachewicz
@FredOverflow I want to do it compile-time
 
@Cicada By the way, if you're up to playing SC2, lemme know. (I honestly don't care for that 1v1, if you're better that me that just makes you even more awesome). We can play team 2v2 if you want; would be cool, actually.
 
2:06 PM
@Xeo In case of future Haskell questions, ping @Zoidberg or me in here.
 
Xeo
2:21 PM
room topic changed to Lounge<C++>: Dirty functional wankery. [c++] [c++11] [c++-faq] [no-helpdesk]
 
Do you have the necessary privileges to move our discussion to the FP room? Then I would suggest doing that.
 
Xeo
Yup, have the rights.
Seems you only need the rights in the source room - ew.
 
user142019
Morning.
 
well
 
user142019
@FredOverflow haha I just woke up.
 
Xeo
2:24 PM
mornin
 
now I has variables, mutable variables, and lvalues/rvalues.
 
Xeo
Man, tinkering around with a compiler sounds fun. :(
 
hmm
 
Xeo
Maybe I should actually go and participate in that cppgm thing.
 
it's less fun when LLVM throws a type error, but your types are the same instance.
or when Clang refuses to give you what you need
of course, if you don't need Clang, then
Main() {
    str := "Hello, World!";
    str_two := "Goodbye, World!";
    str_three := "Innit, World!";
    str = str_two = str_three;
    cpp("<iostream>").std.cout << str << str_two << str_three;
}
prints intended output
 
user142019
2:26 PM
Say I want to make a variable const.
 
user142019
How do you do that? Is manifest typing possible?
 
I'm pretty sure that it is
but I've totally forgotten how
 
user142019
lol
 
Xeo
lol
 
I certainly haven't implemented any explicit typing, or const.
or anysuch thing
 
2:28 PM
freelancer makes you feel bad about yourself
like you know nothing
 
user142019
Don't freelance problem solved.
 
i meant the website
freelancer.com
 
user142019
Don't hire freelancers problem solved.
 
I am looking to be hired
most look for one man army hahaha
 
user142019
You must be good and have something to show off.
 
2:30 PM
so i must be good to develop an amazon like website for just 200$ and barely receive it , don't you think you are being to harsh here ?
 
user142019
I would never ever hire a noob.
 
user142019
That's nothing but a waste of money.
 
your problem
 
user142019
Also Magento.
 
are you trying to be sarcastic ?
 
user142019
2:31 PM
@Mhjr (Pro tip: others won't either.)
 
user142019
At least, if they're not dumb.
 
OK
whatever makes you comfortable
 
user142019
Plonkfest. Wonderful.
 
user142019
 
user142019
I once pirated Windows 95 just to play this game.
 
Xeo
2:34 PM
lol
 
user142019
It didn't run well on Windows 7.
 
2:45 PM
0
A: How should I rectify the error "reference to 'p' is ambiguous"?

MithrandirYou could do something like this: using namespace std; int p=3; namespace n1 {int p=7;} namespace n2 {int q=9;} main(){ cout << std::p << q; cout << n1::p << q; }

What.
 
That answer is wrong
using namespace std; doesnt magically make all your global variables part of the std namespace
 
Thank you, captain.
 
No problem :D
=.=;
Oh well its gone now
 
Yeah. What I find weird is that it got an upvote...
 
Probably by someone who had the same incorrect understanding of namespaces as the guy who made the answer
 
2:56 PM
@Borgleader Or just missed the std::, I was confused why it was all that bad for a couple minutes
 
I saw "std::p" and I went nuh-uh that can't be good.
 
ub, infact
 
Wouldn't it not compile?
Oh and the q will blow up too
 
It shouldn't compile because "p is not a member of std"
That's why I downvoted.
 
whoops
I went into the kitchen, and did something, and then left, without doing what I went in there in the first place for
 
3:11 PM
@DeadMG get food?
 
drink
 
Ell
Hi guys
 
user1182183
hmm does anyone know what kind of rotation system this is? : "3 float values between -1 and 1".
 
you sure there's no fourth value?
 
user1182183
I really looked into the memory but at (first)-4 bytes and last+4 bytes there are only 0's
 
3:19 PM
@FredOverflow it just so happens that when I need my computer, a browser is in my view
 
@GamErix Probably w happens to be 0.
then that would be a quaternion.
 
user1182183
and 0,0,0 is vehicle pointing to the north, upwards and no roll
 
user1182183
so this are quaternions?
 
probably.
 
user1182183
hm, I saw some code which can manipulate those
 
user1182183
3:21 PM
as I don't know because I tried randomly setting the values and my car gets weird rotations :P
 
yeah
quaternions are rotations on a four-dimensional hypersphere.
you don't wanna go setting the values randomly
 
user1182183
I'll look for some quat transformation code, if there is any ; >
 
try GLM
that has support for Quaternions
but beware of spatial handedness
 
@DeadMG that makes it sound so much complex :P
 
@thecoshman Quaternions aren't fun.
 
user1182183
3:30 PM
directx quaternions are the same as opengl quats (I see GLM is for opengl)?
 
I didn't bother trying to understand them.
@GamErix They are, except for handedness.
 
user1182183
@DeadMG I tried, and do a bit, but I don't know how it can be applied to real world maths
 
Ell
ahh I'm so confused! Just installed mingw and opened the shell and it's like a virtual linux file system or some shiz
and now I have D:/Mingw and D:/Mingw32
 
time for me to refactor my semantic analyzer.
it only builds an AST, analyzes that AST, and then generates code.
 
@DeadMG your code is bad.
 
3:34 PM
nah
it just needs a bit of separating that's all
 
you should drop it and rewrite from scratch
ten times.
 
user142019
What does an ID3D11Device represent?
 
user142019
A graphics card?
 
a device.
 
Yes. ID3D11Device::Unplug unplugs it, for example.
 
user142019
3:37 PM
T_T
 
lol
 
user142019
@Abyx that's overly general.
 
user142019
What kind of device.
 
@Zoidberg Not really.
ID3D11Device can represent any device that can draw things and compute stuff.
 
Ell
surely if it was specified they would call it ID3D11GraphicsCard
 
3:38 PM
@Zoidberg A Direct3D11-capable device.
 
for example, WARP can be a software device.
 
@Zoidberg any device which can implement that interface
 
user142019
Ahh.
 
there's no real restrictions on what a "Device" can be.
 
IIRC, the SDK ships a software device.
Or used to.
 
3:38 PM
yeah, WARP.
 
user142019
Thanks.
 
Ell
I'm so confused >.< I thought Qt was free
but it's saying 30 day evaluation
 
for commercial use it's not free
 
user142019
s/free/junk/
 
Any idea which is the less valued currency in use today?
 
Ell
3:45 PM
No idea
east european one
gah I only have 1.4Gb on my c drive
 
@GamErix 3D rotations suck, 4D rotations work
 
user142019
@R.MartinhoFernandes nobody knows
 
@R.MartinhoFernandes Zimbabwean Dollar
 
@DeadMG except that is not in use
 
it is in Zimbabwe
(although not very much even in there).
 
3:51 PM
@DeadMG no it's not. it is not considered a valid currency
 
Ell
The use USD in zimbabwe
 
@DeadMG No, not really. They just gave up on it. Any currency other than Zimbabwean dollars is accepted there since 2009.
 
Ell
zimbabwe dollars are out of commisson or whatevsies
 
oic
well, offhand I can't name any other failed currencies
the most inflated one I know secondly is the yen.
 
Oooh.
The least valued currency unit is the currency in which a single unit buys the least number of any given other currency or the smallest amount of a given good. Most commonly, the calculation is made against a major reserve currency such as the United States dollar (USD) or the euro (EUR). Sub-units are not considered when looking for the least valued currency: for example, while a British pound sterling might be considered, a British penny would not be. Current least valued currency units As of 26 January 2013, there were 42 currencies for which 1 USD was worth over 100 units. In add...
How... specific.
 
3:56 PM
oh, Zimbabwe have reissued a new currency this year though
 
I feel basic
 
Ell
In maths, is ⋅ just multiplication? ie is a ⋅ b ≡ a * b true?
 
@Ell yes
 
Could be the dot product.
 
3:58 PM
cross-product vs dot product
 
Ell
I'm reading about matrices here open.gl/transformations
 
search linear algebra -> vectros
 
@R.MartinhoFernandes AFAIK multiplication is just dot product with 1D values, no?
 
Ell
Just confusing haha
 
@Ell depends. are a and b scalars? :p
 
3:59 PM
or open any physics textbook and check the first few chapters
 
Ell
Ohh I see videos
 

« first day (862 days earlier)      last day (4084 days later) »