« first day (603 days earlier)      last day (4571 days later) » 

23:00
maybe I just do not know how to use documentation properly
do you read through every single page of such things
Try using an attenuating functor
@AgainstASicilian I'll actually grant you that confusion, the math expression thing is implied, but you have to be quite advanced with C++ to notice it. They really should say that right out, and that part of the docs is confusing.
@RadekSlupik You should post in Haskell chat so it doesn't die again
is there any int bigger than long int?
I know Diablo 3 is lagging when my templar starts moonwalking
23:02
i don't want this variable to risk overflowing in itself
@AgainstASicilian long long, though GNU doesn't work with it
user457812
That just means your templar is down with it
just my luck
@AgainstASicilian :( That's not a joke
23:02
@MooingDuck int64_t?
@AgainstASicilian also known as long long, yes. int64_t is a nonstandard name
is long long considered standard?
@AgainstASicilian just as standard as int, yes
I remember someone giving me heat for using long long in the past over some standardization issue
@AgainstASicilian it didn't become standard until last October
23:04
what was standard before that?
@AgainstASicilian Biggest standard before that was long
I hate dying due to lag in single player games :/
user457812
Pretty sure int64_t is a C standard thing, so you probably don't want to touch that.
@CatPlusPlus Thanks man. I now got Snap running. :)
It's optional in <cstdint>.
Anyone has a good example of XY problem on hand?
23:08
Now it's throwing errors and it won't even tell me WHERE in my program
@endoalir Just to be clear, is that a joke or do you really know that those things are?
it's just pulling up some error from gmpxxx.h
user457812
I have a good example of me being lazy by playing Minecraft right now.
@RMartinhoFernandes joke
guys i've just created a VSCROLL bar but it doesnt actually scroll the main window content, any advice on what im doing wrong? to be fair i can barely see considering i havent slept for 30 hours or so. I tried using the WS_VSCROLL dwStyle and using CreateWindowEx() with "scrollbar" class -.-
ifs it complicated, don't feel obliged to answer. I will try again after sleep xD
@RMartinhoFernandes did you get it :D
Yeah, I ranted about that here a while ago.
19 hours ago, by R. Martinho Fernandes
> What I mean with attenuation patterns basically are simple reusable design patterns that make it possible to attenuate the authority that is conveyed by an object reference, and in the case of the proposed library, by a functor.
program now works but I think my use of long ints are overflowing
might have to code custom get_si()'s or something
hahaha I read part of his proposal. maybe he's a troll
23:15
@AgainstASicilian just check if it's less than LNG_MAX, before calling .get_si()
If you're using it as an index to an array, and it is overflowing, avoiding the overflow is unlikely to help.
> attenuation patterns that help increase program robustness by enabling drop-in attenuation on a functor level
The buzzword-to-word ratio is off the charts!
@ScottW lol k :P
@EtiennedeMartel Sounds like something out of dack.com/web/bullshit.html, right?
@RMartinhoFernandes Yep. I got the feeling that this guy is a senior Enterprise Java developer.
23:19
it seems like he wants the ability to dynamically reassign function references just to preprocess their arguments
Well, I fully agree with Dave.
> Looking at your individual building blocks, most perform functionality that can be expressed more concisely and clearly using std::bind or lambdas.
We already have better functionality.
oh well i have a question
What the fuck does attenuate means?
Either I'm way too drunk, or this guy is just bullshitting everyone involved.
Q. is numeric_limits<int>::is_modulo guaranteed to be true for two's complement form and false for sign-and-magnitude and one's complement form?
23:22
> a quota based condition proxy
i am sure about the "guaranteed to be true"
i am not sure about the "and false"
@CheersandhthAlf for what type?
@CheersandhthAlf No.
23:23
for any signed integer type
Only for unsigned integers.
@RMartinhoFernandes unsigned integers don't use any of the three representations i listed. and is_modulo is of course true for two's complement form int. which means on most any modern machine.
I mean, it's only guaranteed true for them.
@ScottW here is the repo, anyway. You need GHC and Snap (cabal install snap) to run it (cd hexapoda; sudo cabal install; hexapoda -p 1337).
@RMartinhoFernandes no
23:25
@CheersandhthAlf But most compilers won't give you that behaviour for signed integers.
You need -fwrapv on GCC for example.
@RMartinhoFernandes what?
Overflowing a signed integer represented as two's complement doesn't always wrap around, because GCC uses UB to optimize.
@CheersandhthAlf that's UB
@RMartinhoFernandes no you're mistaken. it's just about faulty optimization in gcc. not about the wrapping itself (which of course happens, except on Unisys).
Not faulty.
Signed integer overflow is UB.
It can use that property to optimize.
23:28
@MooingDuck only formally: in practice only on one archaic line of computers. the formal UB does not matter.
If you pass -fwrapv it won't do such optimizations.
@CheersandhthAlf no, it's UB in every conforming compiler
@CheersandhthAlf In practice. Wanna see it?
@MooingDuck sorry, that's bullshit
@RMartinhoFernandes yes. you are mistaking faulty optimization for integer op behavior.
15
Q: GCC Fail? Or Undefined Behavior?

MysticialThe following code goes into an infinite loop on GCC: #include <iostream> using namespace std; int main(){ int i = 0x10000000; int c = 0; do{ c++; i += i; cout << i << endl; }while (i > 0); cout << c << endl; ret...

23:29
that's faulty optimization at work
@CheersandhthAlf not faulty because it's UB
0
Q: Particle Swarm Optimization in C++

BobI need to implement the PSO algorithm in C++. Is there any C++ library I can use to start with?

That's a remarkably bad one.
@MooingDuck it's faulty because it's impractical and never originally intended as so. but gcc guys have a habit of documenting their faults as intended. like guitar player who plays wrong note twice again to make it appear to be intentional.
note that that the selected answer is wrong also
23:32
it says "usually".
that's directly wrong
it is always
the dumb person is mistaking the faulty loop optimization for an integer op
he could just have looked at the machine code
I disagree with the "faulty".
it can't be relied on. the flag to make it reliable is documented as unreliable. it's shit stuff.
@CheersandhthAlf they don't always, as the behavior shows
that's "faulty" as I see it: a machine that doesn't work
@MooingDuck that's wrong
@CheersandhthAlf it follows the spec precisely
23:33
it's not the integer op that doesn't wrap
the person who answered talked about integer ops on x86
that person doesn't know anything about what he talks about
he is mistaking the gcc compiler's faulty optimization of a LOOP, for an integer op
dumb person
Post a comment.
Or just fix it.
i don't want to get into an edit war
people on SO don't check assumptions
mostly
@CheersandhthAlf oh, wait, that usually. Yes, that one is wrong.
why oh why doesn't GMP work with long longs
oi
@AgainstASicilian they didn't exist until recently?
23:40
i think the answer to that Q is "yes, GCC fail, and yes, formally UB"
@CheersandhthAlf Where is that documentation?
> It is breaking encapsulation to have public fields in a class and access them. Please wrap them in accessors if you must have them.
(Seen in an answer on a Java question)
Silly Java programmers.
@MooingDuck using these gmplib.org/list-archives/gmp-discuss/2005-April/001606.html to translate to long longs
@CheersandhthAlf That's not documentation. That's a bug report of a fixed bug.
23:42
That's documentation that the bug exists in versions of gcc prior to the fix.
That's not a fruit, that's a banana.
So your argument is that -fwrapv is unreliable because it was buggy in 2006?
@AgainstASicilian that's a very slow way to translate, there's much faster ways
@RMartinhoFernandes i think, i've done enough googling for you now
It's a bit of "stream of conciousness" thing.
23:48
@CatPlusPlus I have rules against thinking
@MooingDuck When I use that, it crashes my program
all else held equal
@MooingDuck I assume you wanted n>>32 on the first line.
@CatPlusPlus not bad at all :)
@AgainstASicilian sorry, it was just a train of thought, I didn't test/debug
ah yes, that works
is that bitshift 32 bits?
23:51
@RMartinhoFernandes ....yes I did
@AgainstASicilian fix'd
so what you guys been doing?
That thing above.
yea, read that, good stuff
If I were using plain long longs though would I use si instead of ui?
23:52
@RMartinhoFernandes ah, you do "stuff" eh?
@AgainstASicilian yes and no in that order. I think. I'd definitely want to test that.
Writing a blog post.
Request for comments/improvements: asking questions on Lounge.
8
anyway, I'm off to the store, be back in 20ish
It's not a typo.
1 message moved to bin
Binning ^
23:54
ohh
@RMartinhoFernandes about what?
@RMartinhoFernandes note also that since g++ has is_modulo true for int, either its optimization assumption of non-wrapping is incorrect, or its numeric_limits is incorrect (also in this).
@CheersandhthAlf I agree with that statement.
@TonyTheLion It's a secret! No, it's not. Some TMP tricks.
oh nice :)
23:56
@CheersandhthAlf That I agree.
> Just don't feel all offended, this is not a serious place.
Don't come in this room if you are easily offended and take things seriously :)
room topic changed to Lounge<C++>: There was a tyop in the topic, so I changed it. [c++] [c++11] [c++-faq]
hahaha
Well, I think Flash killed my kernel.

« first day (603 days earlier)      last day (4571 days later) »