@Aaron3468 But do you know why? Sigh std::accumulate
Why are you in <numeric> instead of <algorithm>? Oh, thee, std::accumulate how yonder youth fleets from thou. Ye grammar, mark, perhaps smoothens from the vine like lice from the womb.
Not very well why, but I know it's a type-coercion failure despite pretty explicit statements that double is the intended type. 0 parses as an int instead of an indeterminate type as it should.
Another hilarious issue is that adding integers together is prone to overflow, while adding floating numbers together is prone to inaccuracies (see khan summation). From personal experience, when I need a sum of integers I switch to double/float... Problem becomes very clear when trying to find the average pixel intensity of an eight bit, unsigned char image...
Still C++ is nowhere near as bad as python where dogs can be houses if you knock on the door. 0is an int, but it's ambiguous whether the programmer meant 0. Better to check context first because it's a common initialization value for many different types (even if the compiler is clear which type 0 is by default, programmers get careless sometimes)
@Mikhail lol, yes, this is always where I get bitten. Conversion between floating point and int is not as straight forward as it could be, and there've been many times 5/4 yields 0 (or worse 0.0) before I catch the problem
I'm partial to Rust's decision to stop compilation and tell the programmer to be more clear ^^;
@Aaron3468 I can believe 4/5 gave 0, but I surely hope 5/4 didn't.
@Aaron3468 For this particular problem, I think Pascal did things pretty well: / always produces a floating point result. If you want integer division, that's div.
@JerryCoffin Oh lord, I messed up the order. Damn, where was the warning before my message compiled! I agree, it seems counterintuitive that so many languages default to integer division when floating division is generally intended.
@VermillionAzure Fair enough, there's definitely a large difference. I advocate choosing consistent and intuitive defaults for casting, but retaining a rich set of operations. And in this case, a more effective decision might be an implicit cast to a fixed-point integer type rather than to floating point
^ Exactly. The only solution to not knowing what is intuitive is to have a reasonably rich set of primitives and primitive operations. Or lacking that, a way to expand them with minimal overhead.
Decisions like, "Well I think this is better!" "No this is better!" "But templates!" Too much freedom, and the effects of language design are not too well known around the block
@Aaron3468 And sometimes, not even that. Because too many primitives also induces noise.
For example, continuations are great... Until you realize that they implicitly may require copying the entire stack at the time and keeping it in hand until the last reference to it goes out...
websites for listing real estate rental/sales must be making a fortune - a listing for a house rent ad on a well known website here costs $254 ... and it's for 2 weeks.
> Make kits the class mechanic instead of crappy toolbelt skills. Allow one or two to be equipped to F1/F2 just like revenant legends. Boom, now engineers can use their utility slots for actual utilities.
yeah, I don’t think it’s anet’s style to do a whole rework so many years after the fact. still, interesting food for thought. I could never quite put down what bugged me about kits
I actually got into the game almost by impulse, so I didn’t follow the build-up. I think I saw some of the early skill previews (things like mesmer portal, necromancer bone minions if that rings a bell) and that’s it
@AldwinCheung so like plant mine, plant bleeding mine, plant freezing mine etc.? and then they came to their senses and realised that was the bomb kit?
@BartekBanachewicz When people tell me I work in an "industry with no morality" (which I kind of agree), I ask them what's worse, to work for a bank or to work for FB?
Pretty sure that if you put 10 people on an island, with no prior knowledge and each with a different function, one of them will end up acting as a bank.
@R.MartinhoFernandes it's not that those religious freaks were ever very consistent in their silly laws. Cue "god can't see me sin, so I'll flip over his image on the wall". Or "Allah can't see us drink in the dark". Or w/e
> Since 1968, he had championed the idea that income tax was illegal, and stopped paying his own income taxes in 1974. This resulted in Irwin being jailed many times throughout the years, including the final 14-year sentence during which he passed away.
@LucDanton Interesting but overly simplistic so far
> The noble thing about private capitalism is that it forces those who may only be motivated by personal gain to raise the standard of living of others!
is It it {}; /* n.b. value init */ it < it; well defined for a random-access iterator? it looks that way in the spec
cos I’m used to carefully writing equality comparisons so that it works for value-initialised iterators, since that’s mentioned explicitly
but it never occurred to me to see if I have to do the same for the rel. ops
> The domain of == for forward iterators is that of iterators over the same underlying sequence. However, value-initialized iterators may be compared and shall compare equal to other value-initialized iterators of the same type.
So I'll play along when I hear that requirement I'm gonna be the one to implement it right You better move before I get bored out of the room Looks like my magic fingers will be only mine
I am reading this line 'genius love to read' ... then a question hits me: how can we reduce a 3D space + time into 2D space, wouldn't there be any lose in information, wouldn't we learn any knowledge in this 3D + time space faster in the same or higher dimensions?
also humans tend to introduce plenty of low info knowledge or no info garbage, how do I find the ones with the highest information concentration pertain to me?