« first day (772 days earlier)      last day (4159 days later) » 

12:00 AM
@FredOverflow Answer is 42;
 
16
Q: Implicitly treating returned lvalue as rvalue

FredOverflow12.8 Copying and moving class objects [class.copy] §31 and §32 say: in a return statement in a function with a class return type, when the expression is the name of a non-volatile automatic object (other than a function or catch-clause parameter) with the same cv-unqualified type as the funct...

 
@AlbertoBonsanto You mean using parenthesis to declare an int? That would be legal.
 
I don't have Flash lol
 
12:01 AM
enable HTML5 ;)
 
I have the latest Firefox.
 
h.264 is not supported, apparently
 
Ell
really? I wonder if Opus will be adopted
 
@FredOverflow I use FF too and it worked here, and yes flash sucks
 
12:04 AM
Oh wait, I have NoScript. Maybe that's why?
 
I don't support h.264 either..
 
@Ell Adopted by whom? It's already adopted as an RFC.
 
Anyway, what's the video about?
 
There's no way to get the type of a lambda expression?
Because if I could get at the type, I could get a member function pointer.
 
lambda expressions have "unspeakable types". You can't write it down.
 
12:05 AM
@ThePhD Nope. Each expression has to have a unique type.
 
Xeo
auto x = []{}; using lambda_type = decltype(x);
 
but even if you got it
 
@ThePhD We should all be against h.264. Anything that uses "Golomb codes" is clearly a mess (even without knowing what they are, the name is enough of a clue on that one...) :-)
 
I don't really see what good it would do ya
 
Xeo
@ThePhD How do you think templates work? :P
 
12:06 AM
@Xeo I think They didn't work.
 
I'm going to guess MSVC's decltype is broken, because the following is apparently utterly illegal:

auto b = [testint] () {
std::cout << "Lambda's captured my " << testint << "<3!" << std::endl;
};
using lambda_type = decltype( b );
 
it doesn't support aliases
 
Xeo
MSVC doesn't implement using-aliases.
typedef decltype(b) ltype;
 
Tits.
 
Ell
@jerry oh I was under the impression it wasn't seen by many people o.O
@thephd correct.
 
user1182183
 
user1182183
whenether I try to edit the source of the page in chrome
 
user1182183
it redirects me to a page which says adblocker must be turned off...
 
user1182183
and if I disable JS it says I need to enable JS.. any help?
 
user1182183
(tried editing the popup z index to -1)
 
@FredOverflow You said you are a programmer teacher, and I want to ask you Have you seen any of the assignments of your students asked in SO?
 
user1182183
12:11 AM
ah lol
 
user1182183
it's an old episode
 
user1182183
don't bother it
 
user1182183
nvm
 
@Ell What isn't seen by many people? h.264 video or the h.264 standard, or something else?
 
@AlbertoBonsanto I'm in same position as Fred, and No. Close but not straight on. I can recommend SO for tricky coding, but at the same time I warn them "If you don't post a really good question, you will be hammered down."
 
12:14 AM
@CaptainGiraffe Yes, I noticed that I call them "Happy Triggers"
 
@AlbertoBonsanto I don't think the Happy triggers comes from my class though =)
@AlbertoBonsanto Hope not :O
 
Ell
@jerry the Opus encoding - opus-codec.org ignore me though, it appears I don't k.ow what I'm talking about :L
 
@CaptainGiraffe Happy triggers are the "pros" which downvote people without any explanation, because they feel pleasure when they click on that arrow "Oh feels so good"
 
@Ell Oh -- well, apparently the IETF has looked at it, and as I recall a link to it was posed on Reddit or somesuch a few months ago or so -- that probably resulted in quite a few people looking as well. Not sure how many have really looked very closely though. I suspect quite a few looked long enough to think: "ooh, free replacement for MP3", and left it at that.
 
@AlbertoBonsanto Fortunately this is not reddit.
 
12:20 AM
@JerryCoffin it's what we thought :)
Aug 28 at 23:03, by Jerry Coffin
@sehe The selling points seem to be: 1) single codec that's good at both voice and music, 2) very low latency. Fidelity per bitrate seems to be competitive, but not a big advantage.
 
@AlbertoBonsanto I find most of the votes (lets say 90% to be generous) are within concensus of the community
 
@CaptainGiraffe Then you guys should downvote some books, i have seen horrible mistakes in several books, they even confuse C++ with C, they confuse headers with libs, macros, etc... they call methods when they are functions and functions when they are methods, and several of the users like Raynolds love to vote negative for noobs (I won't forget that size_t downvote he made to me) :)
 
@sehe What coding are you discussing? history is ambiguos for me.
 
@CaptainGiraffe opus encoding:
Aug 28 at 22:49, by sehe
Opus is an open and royalty-free lossy audio compression format developed by the IETF and made especially suitable for interactive real-time applications over the Internet. Opus incorporates technology from the speech-oriented SILK codec and the low-latency CELT codec. Publication as an RFC is expected within the next few weeks. Opus can seamlessly scale to high and low bitrates and can transition between a linear prediction codec at lower bitrates and a transform codec at higher bitrates, as well as a hybrid for a short overlap. Opus has very low algorithmic delay compared to popular m...
 
@AlbertoBonsanto I can't see your entire message.
 
12:24 AM
@CaptainGiraffe Then you guys should downvote some books, i have seen horrible mistakes in several books, they even confuse C++ with C, they confuse headers with libs, macros, etc...
they call methods when they are functions and functions when they are methods, and several of the users like Raynolds love to vote negative for noobs (I won't forget that size_t downvote he made to me) :)
 
@AlbertoBonsanto I need names. Name me names!
 
YES
I've gotten INSIDE the lambda
Hahahaha, the war continues!
 
@ThePhD You sound as if s/lambda/woman
 
@DeadMG That was quick.
 
I'm not sure what to say to that.
I can't necessarily deny it, because my grin is that big...
 
12:28 AM
@CaptainGiraffe Most of books don't explain pointers well, students (like me) must crack their heads with the walls to understand them, or they don't cover all the content.
 
... This would be a good time to reevaluate my life and the choices I've made.
 
DeadMG is always a little peculiar
 
Really
 
@AlbertoBonsanto As I have explained elsewhere our introductory programming in c++ now uses string and vector and even map with spectacular results. I have only once talked about arrays and pointers. Iterators yes...
 
Most of books do the fool example *ptr, ptr = &i . and done you learned pointers ¬_¬
 
12:32 AM
@AlbertoBonsanto I'm quite aware of that. And it is an idiotic explanation.
 
DAMNIT.
It FAILS
... Like my spelling fails. ._.
 
And Niagara still falls..
 
@ThePhD You went too far. way too far. You went all the way to the Mu.
 
@CaptainGiraffe Maybe that is one of the reasons why the students come over and over again with the same problems
 
@DesmondHume Not my definition of a still
 
12:36 AM
... Wait
... For real?
For fucking real?
Const? Are you kidding me?
const is the problem?!
Just, grr. Aaaghahgahg Table-flip.
 
TIL: Static functions are always declared const, so you never have to stick Const on them or their template specializations.
 
@ThePhD What?
 
Member functions, however, can be differentiated by const. I knew this, but Today is special, because function templates must also specialize on const ness, lest the system collapses on a single 'const'.
@Pubby you will see.
@Xeo @R.MartinhoFernandes @DeadMG Ready to have your minds blown?
Ooh, maybe they're not here...
Oh well. Lambda This!
Now let's get it up on ideone...
Hopefully GCC won't spank me. :c
 
Ell
12:59 AM
I'm confused
what have you achieved? :P
 
I have done what Puppy and Xeo told me were impossible.
 
Ell
which is?
 
No, you have not.
 
I have successfully reduced lambdas - capturing or not - into things that can be (A) Uniquely identified and (B) Call-backable.
 
No, you have not.
 
1:01 AM
Show, don't tell.
 
Ell
isn't that an std::function?
 
SHHHH
 
What about the removal?
 
Doing it right now.
 
1:02 AM
i want to imrpove the quality of my programs :(
 
It is legal to get operator() of lambdas?
 
@ThePhD So, you have not done it yet. Congratulations on claiming you have done something you have not.
 
@Pubby Yes.
 
@Pubby The standard mandates it, so it has to be there.
 
Well, what about comparing callables?
 
1:05 AM
Here, write this test case. ideone.com/1qlh7g
 
@R.MartinhoFernandes Done: ideone.com/MOJGgE
 
The simple fact that you have no way to write it should be enough to show you that you cannot even begin to make it work.
@ThePhD Do my test case.
 
std::count
 
Alright, Challenge accepted, let's see here...
 
@Pubby Ooops.
@ThePhD Hint: all the lambdas print different values, yet they all have the same type.
 
1:06 AM
I was supposed to sleep but I want to see someone crash and burn, bad.
 
std::count is melak47
 
@ThePhD Just try writing the test case before you make it work.
 
Okay then, um.
 
At the end I couldn't use the notation he wanted :( stackoverflow.com/a/13557364/1689706
 
Uh
Where does
 
1:10 AM
I have to use {{{ }}} to initialize my struct, that's just silly.
 
std::count come from / what is it supposed to do?
 
Okay, I'm kinda baffled by the code. I think you built too many structures to properly see the essential functionality you're after.
 
'Cause I'm erroring when trying to build.
 
@ThePhD It's std::cout.
 
OOH
Sorry.
 
1:10 AM
Nice typo.
 
@Rapptz Luckily I did not forget the o.
 
Not fast enough eh
:P
 
Ell
nope :P
do you ever stop to think how insignificant we are? as a planet?
 
It's freaking cold outside.
 
Ell
man, life is strange
 
1:14 AM
=[
 
Ell
just a bunch of electrical and chemical reactions, all dictated by laws of physics
 
@ThePhD Finally convinced that you are wasting your time?
 
I can't get the test case to work ( I can add 100 lambdas, I can't remove the one that prints 3 (althought on MSVC they all print 99.... )
 
Ell
yet we make ourselves believe we have a purpose
 
@R.MartinhoFernandes Not just yet. Let me see if I can trick the compiler...
 
1:15 AM
@ThePhD Sounds like MSVC is buggy.
 
Astute. Observation.
 
If I stored the lambdas, that'd make it easier. No, there has to be a way to do it without backtracking damnit....
I WILL GET THIS RIIIIGHT
 
Here's another hint: the lambda that prints 3 has no identity (IOW it is an rvalue). Good luck uniquely identifying it.
 
Xeo
@ThePhD Made sure to capture by copy?
 
@ThePhD If you store the lambdas you will end up with std::function.
 
1:16 AM
@R.MartinhoFernandes Damnit, you're right.
Well... it was a nice run.
It onyl sort of works if you keep track of your lambdas, but who keeps track of their lambdas with an auto anyways? ._.
 
Storing a pointer + pointer to member pair is not an improvement over storing just a functor. It's a downgrade.
 
Making it sound like that's a bad thing... :)
The robot is _usually_ right
 
@sehe Yeah, but in this case he's right and I'm wrong. Which - comforting that the Robot will always be right - adds a significant and sniffle-inducing burn to my inferior human intellect. :c
 
Ell
does anyone here believe in an after life?
 
nop
 
Ell
1:19 AM
nor do I. what a waste of time, really
 
Isn't an after life still living?
 
Lambdas aren't meant to be uniquely IDd, which defies the system of a tokenless event system.
 
Ell
eventually it will all be gone and it will just have been a huge waste of time, and nobody will care
 
Technically, it still works if you're not using Lambdas, but that's hardly.... any comfort.
 
Xeo
@R.MartinhoFernandes Yeah, you could get it removed if you stored the lambda somewhere specifically. However, thanks to the next [i]{ std::cout << i; } creating a completely new type, you're outta luck.
 
1:20 AM
@Xeo What?
 
What's IOW, by the way?
 
They all have the same type.
 
Xeo
@ThePhD In other words
 
@R.MartinhoFernandes They all have a different type. :c
... Or... do they?
 
@ThePhD In my test case, they all have the same type. I crafted it so.
 
Ell
1:21 AM
can't you differentiate them from their captured values?
 
Xeo
@R.MartinhoFernandes If we're talking about the same expression, but I meant if someone tried .remove([i]{ ... });
 
Wait a second.
 
Xeo
@Ell Yes, if you have access to a copy of whatever you want to remove.
 
If I construct a second lambda that looks exactly like the old one...
 
1:21 AM
Yes, try that.
 
@Xeo You cannot tell what a lambda captured.
 
Xeo
Different type.
 
@LucDanton hehe
 
@LucDanton >__>
Bleerrrrggghhhh.
I can't get at the type inside the looop
 
It is instructive. Not just for the purpose of learning C++.
 
Ell
1:23 AM
just le give up
 
Xeo
@R.MartinhoFernandes reinterpret_cast + typeid might go a long way. If it has the same type and the exact same representation, it should be the same, right?
 
I think you should also try that, whatever that is.
 
Ell
you know the saying, if at first you do not succeed, give up.
 
@Xeo That's a one way implication.
 
Xeo
?
 
1:24 AM
@Xeo typeid will fail miserably for identifying functions because two member functions of the same signature that have different names but do completley different things, typeid will say all of those functions are the same.
 
@Xeo They can be (copies of) the same and have different representations.
 
Xeo
@ThePhD Talking functor types.
 
We tried it last (two nights ago?) night with @StackedCrooked
 
Xeo
@R.MartinhoFernandes How so?
 
By the way static member functions are not 'const', in almost every sense possible.
 
1:25 AM
@Xeo Consider std::optional. When you assign none to it, the storage may be left with whatever garbage it had from a previous value. If you copy that, that garbage will not necessarily be copied.
 
Xeo
@R.MartinhoFernandes Ah, true.
 
Throws hands up.
Lambdas, you win.
 
Xeo
*boost::optional :P Or thinking in terms of the proposal already?
 
You... win...
 
@Xeo Oh... erm. Freudian slip, maybe.
 
1:27 AM
@ThePhD That's variadics?
 
@ThePhD Lambadas.
 
Xeo
@ThePhD *function objects, it's not special to lambdas, really.
 
@sehe Wha?
 
In computer science, a programming language is said to have first-class functions if it treats functions as first-class citizens. Specifically, this means the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures. Some programming language theorists require support for anonymous functions as well. In languages with first-class functions, the names of functions do not have any special status; they are treated like ordinary variables with a function type. The te...
 
@Xeo But one day, Xeo. One day I will beat them.
 
1:28 AM
@ThePhD std::forward<TWha>(Wha)...
@ThePhD In javascript
 
If it's any consolation, you've hit a hard problem of CS.
 
Xeo
@R.MartinhoFernandes Btw, I don't think that problem can creep up with lambdas.
 
That just makes me feel like I'm not smart enough to solve hard problems.
 
Xeo
Since you either copy into the lambda already, or store a reference.
 
What if you store an optional in them?
 
1:30 AM
@Xeo Just capture an optional?
 
Xeo
Like I said, that's copied into the lambda already.
 
23 hours ago, by sehe
@ThePhD Well, the stuff that mattered most was there. I would say you did a good job
 
(x += 1) is not equivalent to (++x) for integers. Wut?
 
@Xeo Yes, and the copy you are comparing to will have a copy of that optional, no?
 
Xeo
Okay, screw it, you can only truly make that work for PODs
Screw copy ctors. :s
 
1:31 AM
I mean, just looking at how I got into the lambda's pants in the first place, I'm storing a function pointer and a lambda. This means I can't delete it unless I keep the lambda as a token, I can't get back into it at all.
 
Yes, you need tokens. The sooner you accept the way the universe works, the sooner you can get stuff working.
 
Boost.Signals uses token. Not because it's fun.
 
Xeo
@R.MartinhoFernandes I was thinking that the first copy will zero-out the buffer so it won't be different from subsequent copies, but then I thought again and remembered that it may leave it uninitialized and zero-out directly before something is constructed in it.
 
@LucDanton I know, I just wanted to get as far as I could without tokens but I guess I'll just keep both.
 
@Xeo It does not need to zero-out anything ever.
 
1:32 AM
I mean, I can hand out tokens or delete by signature now. That's not so bad, right?
 
Xeo
Dang, true.
 
@ThePhD I don't mind that you tried tbh. I hope you got a sense of how 'equality' can be tricky from it though.
 
Grr.... Dirty lying scumbag lambdas, pretending to be static functions but really just being objects with specific member functions, blowing themselves up off the stack before I can get to them...
One day.
ONE DAAA- Agh, shit I'm too tired to declare vengeance. ._.
 
I don't get why you're attached to dumb functions. Functors are better.
 
I know I know, I'll just store a size_t token and be done with it.
 
1:35 AM
@LucDanton To make it worse, let's imagine we have is_extensionally_equal(f, g), thanks to the blood of sacrificed virgins. In C++ that may not be good enough, because "functions" are not referentially transparent.
 
Or just use Boost::Signals like everybody else.
 
IOW, -1 not enough virgins.
 
What if you had a reversible world?
I guess that works but is stupid?
So when you compare two things, the program should attach a reverse debugger to itself in an attempt to preserve its current state before investigating things. It also attaches reverse debuggers to any external process (on other machines/networks) too if/when the state of the program depends on it of course.
 
@LucDanton And attaches reverse debuggers to the users too, right?
And to the atmospheric sensors it may be using to predict the weather.
 
I'm not sure why I thought about I/O over the network before even thinking about user interaction.
 
1:41 AM
> If you try to call the nested function through its address after the containing function has exited, all hell will break loose. — gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/…
I should really, really be asleep now.
 
That abstraction is so fucked up by the time you get to labels. Also should be sleeping.
 
@R.MartinhoFernandes whtf
 
2:27 AM
7
Q: In C/C++, for an array a, I just learned that (void*)&a == (void*)a. How does that work?

JuliusSo, I always knew that the array "objects" that are passed around in C/C++ just contained the address of the first object in the array. How can the pointer to the array "object" and it's contained value be the same? Could someone point me towards more information maybe about how all that works...

I can't find anything on this. Is this defined behavior?
 
@R.MartinhoFernandes nop nop! Who's there
 
Hmm.
It seems like a pointer to array could point to an element other than the first for non-standard-layout types
 
sizeof(T[N]) makes this tricky though.
 
Isn't sizeof(T[N]) the same as sizeof(T) * N?
 
Yes. Doesn't leave much to the imagination.
 
2:45 AM
Hullo
I'm looking for some help with my assignment.
 
hey
 
@Moshe Ohai. Look what I just did :)
 
does anyone know what does this warning from valgrind mean? warning set address range perms
 
@sehe shiznat.
 
I did allocate a large amount of memory on heap
 
2:46 AM
Whoa.
 
@BeyondSora ‘Warning: set address range perms: large range <number>’ Diagnostic message, mostly for benefit of the Valgrind developers, to do with memory permissions. (network-theory.co.uk/docs/valgrind/valgrind_29.html)
 
@sehe I'm actually laughing.
 
@sehe yeah I found that as well, but I dun quite get what it means... :-(
 
That's great.
I'm incredibly amused.
 
@Moshe I noticed you threw your homework at us again last night. I thought I'd humour you with a nice and useless implementation :)
 
2:47 AM
But my version doesn't work.
@sehe Haha. Well, this time I'm almost done.
 
@Moshe Too many raw arrays, IMO
 
@sehe what does memory permission have to do with me allocating a large amount of ram? The allocation did succeed, so I had the permission?
 
@BeyondSora I don't know, ask "valgrind devs", maybe? Perhaps some of them dwell on Stack Overflow?
 
@sehe In which? My version?
 
@sehe lol wasn't sure this would be a valid question. but ya I ll ask now
 
2:49 AM
@Moshe Yup
@BeyondSora Mention how you did search, and how you hope a vg dev might read the question... :) (Or just someone ready to spelunk into some valgrind source code, YAY FOSS)
 
@sehe Lol, entirely possible. For some reason, it doesn't properly add shipments to the warehouses, so I end up with all unfilled orders.
 
@Moshe Well, that's working as advertised then: "test unfulfilled orders - check"
 
@sehe haha, but really.
Mind seeing if my abuse of pointers has to do with it?
I'm in total awe of some real C++, btw. My attempt is rather pathetic...
 
@Moshe Mmm. Maybe some time. Not today. Anyways, here's my output: pastebin.com/FpDfWw9Q
 
@sehe Lol, ok, thanks.
Thanks for the show of coding prowess. Really awesome.
 
2:53 AM
FWIW, two 'trickier' testcases:
* when deciding an order 'unfulfilled' after checking remote stock, be sure to rollback any stock mutations
* when an order is _empty_ (no items are actually _requested_) it should print nothing (not Unfulfilled, nor updated stocks)
@Moshe Thx you too. I love the finger exercise
 
haha
@sehe good point, forgot about that.
 
I'm off :) Cheers
 
posted my question
 
fuck, I accidentally deleted my file and then :wq in vim, is there anyway to get it back?
(it wasn't committed yet)
 
does ur vim have swap turned on?
 
3:01 AM
@Pubby look for .swp files?
 
You mean those swp file things? I don't see any.
 
They're hidden files, so depending on your system, you might have to look for them specifically.
 
Don't see
 
.*.swp (notice leading dot.)
:-/
 
Fuck, that was hours of work
 
3:09 AM
"Hacking my vagina" - (re)engineering of a vibrator: http://scanlime.org/2012/11/hacking-my-vagina/ #gadgets
 
Nobody would have cared if it was "Hacking my penis"
 
@BeyondSora Do you have undofile/undodir set? Do you have viminfo? It might have kept your yanked registers (say :reg)
 
@sehe No, but I'll get one now
 
@Pubby How did you delete it, since 'wq' should unconditionally write it
 
Anyone know why a += might behave as an = operator?
 
3:11 AM
@Moshe badly implemented operator+=
 
I think I accidentally mashed my hand on the keyboard before typing :wq, lol
 
@Moshe bad assumption about prior value
 
@sehe I'm not overloading anything. I think that's causing my problems.
 
@Pubby well. Pro tip: don't mash your hand in Vim...
@Moshe Show more code. Actually, I'm 99% sure you're adding it to a new instance each time.
 
And this is where I get the warehouse from: github.com/MosheBerman/spiked-punchcards/blob/master/…
I could be creating a new warehouse in there.
 
3:15 AM
@Moshe Warehouse workingWarehouse = *warehouseForNameFromArray(card.city, warehouses, numberOfWarehouses); copies the warehouse, you probably want to reference instead:
        Warehouse& workingWarehouse = *warehouseForNameFromArray(card.city, warehouses, numberOfWarehouses);
 
@sehe Ooof.
 
I should create an undofile for my life
 
@sehe Better, thanks. Although I think I'm doing that in one or two other places too. The other pointer method probably needs a good kick in the ampersand.
@sehe Specifically, am I doing something similar here?
 
template <int N>
Warehouse &warehouseForNameFromArray(string name, Warehouse (&warehouses)[N])
{
    for (Warehouse* it=warehouses; it!=(warehouses+N); ++it)
        if (it->name == name)
            return *it;

    throw "whoops";
}
@Moshe No, there you just keep the pointer, which will... copy the pointer value rather than the referee
 
Hrm... Ok.
I think my output is wrong.
 
3:23 AM
In case you wondered how to embed that ^ sample function: pastebin.com/f93e3Hve
@Moshe I'm going to go to sleep now. Cya next time
 
@sehe Lol, ok, thanks so much.
 
@Moshe Oh just noticed: here github.com/MosheBerman/spiked-punchcards/blob/master/… you are indeed forgetting you already reduced stock in another store. Also, you seem to assume you can/must fulfill the whole order/quantity from the alternative store then...?
The assignment specifically mentions "If no single warehouse has enough extra to fill the order for a particular item" --> hence you should be prepared to use n from the local warehouse plus m from the alternate
 
4:27 AM
Hello friend
 
Being sexy
 
Alakazam.
 
I rewrote my file and it seems to be working
 
4:46 AM
Which file?
 
A file which I accidentally deleted right after finishing it
 
5:21 AM
It's quiet... too quiet... Watch out! It's a trap!
Whoever finds the reference first, we'll refrain from assimilating.
 
Umm guys , I am having a weird problem
The default memberwise copy(that the compiler makes for me) in my derived class , is actually properly copying private values from its base class, which ... should not happen , right ?
pastebin.com/VDBE3miY an example for anyone who cares
 
Why shouldn't it work?
 
@CatPlusPlus because _x,_y and _z are private to Vector3, so technically, point , shouldnt have access to them
and since the default = is a memberwise copy, the whole thing should crash and burn
i.e. if I try to print the values of "aPoint "
 
It has accessible copy ctor, nothing else is needed.
 
it should freak out, or display the old values
ohh .. so the copy constructor of Vector3 is available ?
in the derived class and that is what is called ?
 
5:59 AM
@angryInsomniac Of course it's available, it's public. AFAIK unless present, a copy & default constructors will always be generated by the compiler (and be made public) if you want to disallow those or reduce their scope you can declare them to be either private or protected.
 
6:19 AM
I love me
 
6:44 AM
@Mysticial Have any idea about this? Is it a dumb question?
0
Q: What is the least positive integer with no reciprocal in typical floating point?

PotatoswatterA common assumption is that 1 / x * x == 1. What is the least positive integer that breaks this on common IEEE 754-compliant hardware? When the assumption of a multiplicative inverse fails, poorly-written rational arithmetic ceases to work. Because many languages including C and C++ by default c...

 
I added two tags to it.
 
@Rapptz thanks but I removed the tag. It's not a C question much less GCC. I don't care about what standards or compiler specs have to say.
 
It isn't going to get many people viewing it if you don't apply a language tag to it but okay.
 
@Rapptz True, but I'm not really in a hurry. I'd rather not spend effort arguing with language-based answers.
Few people have a copy of the IEEE 754 spec, and few are really qualified to answer.
 
Well I think floating points have their own standard.
 
6:50 AM
@Rapptz Exactly.
 
Which I believed other programming languages adhered to.
 
@Rapptz C and C++ let the programmer know whether the float and double types have the precision specified by IEEE 754, but don't say anything about the results of computations (which 754 does discuss).
 
btw you should add <!-- language: cpp --> so it syntax highlights your code. Just a suggestion
 
Feel free. The code isn't rocket science, though.
 
Yeah I know, I just like coloured code.
Sorry I can't help you by the way.
 
6:53 AM
NP :)
 

« first day (772 days earlier)      last day (4159 days later) »