« first day (616 days earlier)      last day (4558 days later) » 

22:00
@sbi Too late, I got him!
That's n
@CheersandhthAlf Uh, also linear?
Why would it be n^2
@CheersandhthAlf do you mean multiplying lots of digits?
@danuker That's "3 * (sum from i=1 to n of i)" (multiplication is distributive), which is "3 * n*(n+1)/2" (sum of an arithmetic progression), which is O(n^2).
sbi
sbi
22:01
> every day, misogynists and homophobes use the internet and benefit from the work of Ada Lovelace and Alan Turing. — Kristen McHugh
@CheersandhthAlf wow, that was a revelation
using the word 'freakin' did it
@Cicada Because that's the correct answer.
but wouldn't it be n*logn?
@RMartinhoFernandes Uh, maybe I'm missing something, but (sum from i = 1 to n) is O(N).
22:02
@danuker No, see proof above.
since log10(n) is the number of digits
@RMartinhoFernandes Uh. Did your circuits overheat or something.
@RMartinhoFernandes that's about the final value, not complexity, yes?
@DeadMG (sum from i=1 to n of i)
@Cicada See proof above.
sbi
sbi
@RMartinhoFernandes A robot's attempt at "explaining"...
22:02
what's "of i" when it's at home?
@CheersandhthAlf Oh, I may be misunderstanding something.
sum from i=1 to n of 3*i :
> for (var i = 1, sum = 0; i < n; sum += 3 * i, ++i);
How is that n^2
i wonder if young folks are familiar with geometric proof of that, making rectangle?
how about return n*(n+1)/2?
i still agree with Cicada
22:04
@CheersandhthAlf I did once see a proof but promptly forgot it as it's utterly irrelevant.
@Cicada it isn't, he misunderstood the question
now i'm split between n and nlogn
@danuker There is very definitely no log(N) factor.
@danuker the simple expression n has complexity log n if n is very very large, because you need them digits
I need to sleep.
22:05
Hahahaha
Please ignore anything I say until tomorrow.
So do I
folks
pwned
@RMartinhoFernandes Gladly.
22:06
I'm off to bed.
GN
night
I'mma get downvoted like hell for this
0
A: Find the shortest way/route from a given point to the sea?

DeadMGCongratulations on realizing your desire.

22:07
@DeadMG well, i need the complexity of the function, not of an algorithm having the runtime number of steps specified by the function.
I think I'm afraid of sleep. I'm constantly fighting the urge to do so, even when I have nothing to do and am dead tired.
@danuker Please write the function.
@RMartinhoFernandes Happens, usually because you ate too much sugar. Just go to bed.
@RMartinhoFernandes sum from i=1 to n of 3*i
@danuker In code.
22:09
@danuker What counts as a step in this notation?
it is not specified
i got to the same conclusion then
It's not log(n) of that you can be sure.
Also, I'm glad the teachers on my school at least know how to properly specify (most) exercises.
yep, you should be thankful of that
i will specify and disambiguate for every possible interpretation if a question of the sort comes then.
22:11
@DeadMG You got a +1!
Hmm, I just saw a "Mannschaft for the win" in my Facebook feed. Damn.
@danuker I'm particularly mean about that. If you give me a test with a poorly specified question, you can be sure I'll try to subvert it to produce an effortless answer. Doesn't always work for your own good, though.
@EtiennedeMartel What's that?
@RMartinhoFernandes Looks like she's rooting for the Germans.
@RMartinhoFernandes I'll subvert her by giving her a good answer and showing her the ambiguity. Hopefully she'll take notice.
shit my exam is tomorrow, in 6h45m, what am i doing here
good night
22:16
@ScottW I'm also tired and it's not even 6 pm here.
@sbi This guy is nuts.
sbi
sbi
@EtiennedeMartel I don't think so. I think he's a Swede, actually.
Nutland, it that where they produce Nutella?
@sbi Oh.
Awesome.
sbi
sbi
I also like that comment: "If you need any more tips on how to improve your video let me know. I have extensive experience in writing comments about videos."
22:20
I like "THIS IS SO FUCKING AWESOME!!!" more.
@sbi i think that's probably awesome. but too low bandwidth to see. i post it on facebook and see what others say?
sbi
sbi
@CheersandhthAlf Why are you asking me?
Bladerunner is just awesome enough to make anything derived from it instantly awesome.
@sbi well, why not?
SCIENCE!
@ScottW Most movie adaptations of Philip K. Dick's stories are kinda crappy, though.
22:24
@Cicada thanks... Olive oil?
@Cicada Zing!
@ScottW I only like... three.
But I really like his literature.
@sehe I'm impressed with your dedication to read so far back in the chat logs.
The others are Next and Screamers.
22:28
@ScottW I never even heard of the word "those" haha!
@StackedCrooked Always do :)
Also, GOOD FILMMAKERS Y U NO UBIK MOVIE.
@ScottW I prefer to woman those
Lol, I'm not making sense. Should sleep soon.
@StackedCrooked oh i'm dumb. i thought "to woman those" was like wordplay on "to mail those". looking back it wasn't. hm.
Lol, I'm actually really tired since I skipped a night.
22:30
he he, e-male
@CheersandhthAlf Ah, now I get it :)
@StackedCrooked You should try skipping days (i.e. sleeping through the whole thing).
@RMartinhoFernandes That's what I normally do. But I failed this time.
sbi
sbi
@StackedCrooked In the beginning, I also read everything that happened while I was away. But there's that thing called "real life", always interfering with ambitions.
@sbi I use my real life to read the chat.
Or is that not it?
22:33
@sbi :)
Lol, my iPhone is like a mirror in the dark if my monitor shines against it. I feel so happy about that :D
@sbi Don't be a slave to real life! Free yourself! Grab a knife and slit your wrists.
sbi
sbi
@StackedCrooked You sleep through days? I thought only the @Cat does that?
@ScottW The first one was cool.
@ScottW was that the one with with one of the action-hero actors?
sbi
sbi
22:34
@StackedCrooked The kids would disagree.
@CheersandhthAlf Yeah, Arnold.
sbi
sbi
@sehe You laugh, but you also get along well with 4hrs of sleep/night.
@sbi Normally I code through the Friday night and start sleeping on Saturday morning around 8 or 9. Then I get up around 17:00 and start coding again until 9 in the Sunday morning. However this time I failed to do the sleeping part on Saturday.
sbi
sbi
@RMartinhoFernandes You're confusing "life" with "real life".
@sbi For varying values of 'well' :)
yesterday, by StackedCrooked
@Cicada I think we all immediately thought about the same particular person in this room :D
@StackedCrooked yesterday I even starred this gem... after unearthing that the message it was in response to :)
(deleted out piety to the persons involved. respecting their wishes)
(to an extent, that is)
interesting
stop that?
Damn it my edit ^^^^ left in a stray 'that'
The heck is going on?
sbi
sbi
The Message Remover has secretly infiltrated the room! Flee if you can!
IOW: Good night!
Sleep well
22:54
@RMartinhoFernandes y u no in bed
I should, yeah.
I'm contemplating going to bed in a couple hours, and you haven't been to bed since the previous time I woke up
although today has been a really bad day for my productivity
14
Q: Set all bytes of int to (unsigned char)0, guaranteed to represent zero?

refp This is not a matter of recommended practise (nor undefined behavior), but about what the c++-standard actually guarantees in the matter of turning all bytes of an integer type to the value of (unsigned char)0. The Question(s) In the snippet below, is the expression used by the if-stateme...

I'm not sure what to do about this question, it had some interesting answers a few days ago but they all got deleted (probably due to the fact that the standard is kinda vague on the matter)
not even sure if I should leave my answer-to-my-own-question, since I'm not sure wether it's correct or not.. I put it there to see if it would be voted upon, but it's kinda a dead end. some people vote it up, others vote it down..
anyone who got some interesting thoughts on the matter?
the downvote someone just put on the answer doesn't provide much help without a comment of why.. :/
I think it's not correct.
I placed the downvote, btw (was just reading the other answer before commenting further).
I agree with ruben.
The standard doesn't say 00000000 has to be zero for signed types.
It can be INT_MIN.
@RMartinhoFernandes in another answer (that was there previously) he/she said that the guarantee provided by C must be valid in C++, otherwise the C-functions (from <c*>) wouldn't hold up.. is this really true?
23:06
@RMartinhoFernandes In reference to...? I've seen some discussion on int representation in chat, is there a Q on Stack Overflow?
@sehe Erm, did you screen get really small all of a sudden? If so, scroll up a bit... :P
I've discussed the matter with @sehe earlier, maybe he's suffering from temporary memory loss? ;-)
@RMartinhoFernandes Apparently. There's nothing in related to this that I can spot in the loaded messages.
8 mins ago, by refp
14
Q: Set all bytes of int to (unsigned char)0, guaranteed to represent zero?

refp This is not a matter of recommended practise (nor undefined behavior), but about what the c++-standard actually guarantees in the matter of turning all bytes of an integer type to the value of (unsigned char)0. The Question(s) In the snippet below, is the expression used by the if-stateme...

Oh. A very old plonk... Lemme drop the plonk :)
23:09
@RMartinhoFernandes integral types, 0 is always 0 , no matter if signed / unsigned , in other words there's no -0 or +0 , (techncially 0 is always positive in integral depending on how you look at it) , only when it comes to floating point types does this issue really rear it's ugly head
@sehe what's the definition of a "plonk"?
@refp I can't see that answer (and I can see deleted answers).
@johnathon we are talking about the binary representation, not the actual value itself
@johnathon This is not about numbers. It's about representations.
23:10
@refp It means I had you on ignore. It must have happened last year around august, or something
@RMartinhoFernandes it was a comment on one of the answers, I believe
@sehe had me on ignore? but we spoke about this just a few days ago (when I posted the question), or you were reading my mind and wrote stuff to me that actually fit what I was talking about.
I guess my trollin' in here isn't as much fun for others as it is for me.. and now this is one of the times where I need to pay the price
@refp Hmm. The author must have deleted it :(
@refp i am as well, an int is 4 bytes, signed unsigned is always 0x00000000, it's only when it is a float does it really matter. because a float's biniary representation has NAN's and those are to be feared my friend
NAN haha it's like those cranks who think .999... = 1
23:12
@johnathon Where is that guarantee for signed types coming from?
@johnathon if you can prove that the binary representation is guarantee to be 0000 0000 0000 0000 for an int on any system (according to the standard), please leave an answer on the question
Consider this scheme: High bit is a sign bit: 0 means signed, 1 means unsigned. The rest is as with two's complement.
In that scheme, 10000000 is zero, and 00000000 is -128.
@johnathon also read the quotes from the C99-standard where it actually says that an integer type must have all bits set to 0 to evaluate to the value of zero (0) for that type
@refp Hehe :) I must admit I noticed earlier I had you plonked and thought I unplonked you - but apparently there are two options 'show messages' vs. 'don't ignore this user' - which, evidently, do different things. I was seriously stymied this time, since there was no message showing hints like @refp :)
@RMartinhoFernandes integral types. yes RMatinhoFernandes, however the number 0 .. is where it is important, 0 has no sighn on integral types... thats the point
23:13
@RMartinhoFernandes oh, it does. by reference to the c99 standard.
@johnathon We're not talking about numbers.
@sehe I'm glad I'm back on your "not on your ignore"-list ;-)
@RMartinhoFernandes Numbers suck, man. Who needs those bastards? They'll shiv you in the back and steal your bloodied, ripped clothes as soon as they get the opportunity.
@CheersandhthAlf I don't see the part where it defers to the C standard. AFAICS it redefined everything right there.
@johnathon we are talking about their representation
23:14
@refp welcome
@RMartinhoFernandes but that's what you really ARE talking about , because your talking about integral types, and an integral type IS technically a number
@johnathon We're talking about the representation of integral types.
@RMartinhoFernandes you have to look for it, true. but it does. the footnote about binary numeral system is even copied verbatim from c99. c++ also incorporates almost all of the C standard library.
@refp and @RMartinhoFernandes yes, but listen to me again, an INTEGRAL ZERO is always how ever many bits represented by that INTEGRAL type set to 0
@johnathon we are really talking about stackoverflow.com/questions/11138188/…
23:15
@refp yes, i read the question post
for minimum guaranteed ranges, and for the representation details, you have to go down to the C standard.
2 mins ago, by R. Martinho Fernandes
Consider this scheme: High bit is a sign bit: 0 means signed, 1 means unsigned. The rest is as with two's complement.
No, it's not.
@RMartinhoFernandes signed integers cannot have - zero.. that domain is ONLY for floating point
Zero is zero. So what? I can represent zero as "0", "zero", "oh". I can also represent it as "*" if we both agree that is a symbol for zero. They're all representations of the same number.
@johnathon I'm sad to say that it seems you have misinterpreted either the standard or the question. to sum things up; where in the c++11 standard does it say that 0 is guaranteed to have all bits set to 0?
23:16
@johnathon There is no minus zero in my scheme.
@johnathon you're wrong. but so is, in this case, the good robot.
Just read the damn messages.
@RMartinhoFernandes yes there is , your consiering that a signed integer representing 0 has to USE the sign bit, when it doesnt , it does not use the signed bit, that signed bit is 0
@johnathon Where does that come from?
You're just making up rules.
@johnathon the requirement is that when the sign bit is 0, the rest of the value representation bits have the same meaning as with unsigned representation. sign bit 1 is allowed to have representation-dependent value (for ones' complement and two's complement) or effect (for sign-and-magnitude).
23:18
@johnathon If you're not making things up, please quote and post an answer.
@RMartinhoFernandes actually im not making jack up. it's part of the definition of INTEGRAL types
@johnathon as said by @RMartinhoFernandes, quote the standard and post an answer to my question, that would be great!
jonathon is correct
hm, have you guys plonked me, or are you just not interested in how it really is?
23:19
@AgainstASicilian Good. Glad that's sorted then.
I don't mind being wrong.
@RMartinhoFernandes by the way; is it against the rules of SO for you to printscreen the deleted messages and forward them to me? I'd love read them, think I missed a few when I was afk
just figured I'd fight for the underdog
@refp Sure, I can do that. Gimme a moment.
@AgainstASicilian as said; where in the standard is that written?
23:20
I have no idea what's being discussed
@AgainstASicilian ...
@AgainstASicilian That's not fighting. In debate, fighting requires arguments. You're cheering at most. And that's not helping anyone think critically
Worked for the Catholic church
critical thinking, what an overrated phenomenon, hoooo~~~
@RMartinhoFernandes C++ inherits that from C
@johnathon No. C++ defines all that on its own.
23:21
Way to go. I'll have a net balance of 0 users on my ignore list pretty soon
If it inherited it, it wouldn't have that big chapter there, now would it?
Or would have it there verbatim.
@AgainstASicilian Wut?
@RMartinhoFernandes 1.2
@RMartinhoFernandes you're wrong
So jonathan is basically arguing that, say, in an 8-bit data type, 0 is represented as 00000000?
23:22
@johnathon §3.9.
You're using the abstract as an argument, btw.
@AgainstASicilian he's saying that the standard guarantees it
@RMartinhoFernandes: if you look for it you find several places that the C++ standard makes explicit its reliance on the C standard, even using the words "incorported by reference" (iirc). Appendix C of the C++ standard details the differences with the C standard.
@AgainstASicilian in practice most systems represent zero that way, but the question is if the standard says that systems MUST represent zero that way.
@CheersandhthAlf Yes, I know that. This is not one of those places.
@refp they do not
23:24
If it is, please quote it.
@RMartinhoFernandes chapter and verse please. for it it isn't, then e.g. the FAQ Lite is utterly wrong in listing minimum guaranteed ranges. and so would everybody else
§3.9.
@CheersandhthAlf The scheme I described above doesn't violate the ranges.
try to get a little more detailed than that
I need to met up a friend, I'll be back in a few hours.. hopefully there will be a definite answer on the question linked, thanks for discussing it guys :)
@RMartinhoFernandes thanks a lot mate, much appreciated!
23:27
@RMartinhoFernandes 1.7
@RMartinhoFernandes let's start with C++11 §1.1/2
@johnathon What about it?
"C++is a general purpose programming language based on the C programming language as described in ISO/IEC 9899:1999 Programming languages — C (hereinafter referred to as the C standard).”
@CheersandhthAlf Yes, the abstract. It says that C++ provides several things in addition to C.
@CheersandhthAlf which means it it inherits the C type system
23:28
Allowing a fourth representation of signed integers types seems perfectly fine with that.
I've already told you folks you're wrong.
We know you told us that.
Just post an answer.
Next, §17.5.1.5
"Paragraphs labeled “See also:” contain cross-references to the relevant portions of this International Standard and the ISO C standard, which is incorporated into this International Standard by reference."
incorporated is pretty strong language
but even more strong, is annex C
which details the differences
bold is even more strong
@CheersandhthAlf Allowing my integer representation doesn't take C away.
23:30
"This subclause lists the differences between C++and ISO C, by the chapters of this document."
It incorporates all of C and adds things.
@RMartinhoFernandes you seem to be unaware that the C standard requires that bitpattern all zeroes for the value bits, represents 0. the only problem lies in padding bits. i.e., whether all zeroes for the whole object representation, can be a trap value.
Meh, just post that in an answer. I really need to sleep.
Btw, the entire standard is made of differences between C++ and C. Otherwise there'd be no point in having it.
it seems it's already there
by the author of the question
@CheersandhthAlf It lacks the sections you mentioned here. At least edit that in.
23:34
@CheersandhthAlf when do people need to worry about the underlying binary representation of the data that a type holds, other than when serializing data from a big endian to a little endian machine (ie over a network) to begin with
@CheersandhthAlf speaking of course, about the base language types, int char ect
@CheersandhthAlf my take is, They don't
Ell
Ell
I really don't undeerstand why endianness is a problem? Every machine is BE so why should it change? Or every machine is LE. It doesn't matter which though, they are all the same
@johnathon mostly only when they do unholy low level things, like reinterpret_cast. but there are a number of important consequences. these include negation of INT_MIN, and whether a plain char can hold as many values as unsigned char, and stuff like that.
@johnathon why did you ask if you have formed an (uninformed) opinion already?
I think the main point of disagreement here is that I think the C++ standard is redefining the fundamental types (otherwise it would just say "fundamental types are the same as in the C standard"), but others think all that text is merely for convenience. If no one can change from one of those positions, we'll never agree.
@CheersandhthAlf well, i mean the whole agreement about it, and of course your answer is absolutely correct, when casting to a base type that ha,s a smaller storage space than the type your currently using of course your going to be throwing information away, your basicaly going to slice the bits down to what the casting to type holds. But the real point is
@RMartinhoFernandes the only thing theay redefine is bool
@RMartinhoFernandes oh, C++ is redefining the fundamental types a bit. in particular bool, and wchar_t.
23:38
@johnathon No, casts are numerical conversions.
@CheersandhthAlf Yes, I know. But there's lots of text around that. That's our point of contention.
@RMartinhoFernandes there is a simple practical way to look at it. the standard has to support using the same C library implementation for C and C++. therefore, the types must be compatible.
@Ell endiness matters when you want to send say a struct of int's , long's and short's across a network. if your machine is little endian, that does not mean the reciepiant machine is little endian. Network biniary representation is supposed to be in big endian to begin with, hence the need for ntohs() , ntohl() ect
@CheersandhthAlf Pardon me if I sound too stupid, but I don't see where that is required either. AFAICT, it's perfectly fine to have different implementations, #ifdefed on __cplusplus for example. In fact, that already has to happen, see the string functions with const and non-const overloads.
@Eli you have to remember a socket sends data out as a char* , a char array gets put into the network buffer and that's how the data is sent out over the wire, so the order of those char's DOES MATTER
@Ell Not every machine is BE, and not every machine is LE.
23:43
@RMartinhoFernandes the whole point of C++ is to be able to use the C libraries (that's in D&E somewhere), and no vendor would maintain two different C library implementations. nobody did. that's why the rules for .h versus no-dot headers were amended in C++11.
ARM machines are BE and x86 is LE, not to mention that all the routers and stuff in the middle are of undefined endianness.
@DeadMG not all x86 is LE , amd is big endian
@johnathon No they're not. That's "Black Edition".
Some ARMs are at-will-endianness.
23:45
@DeadMG ok let me rephrase, the amd athlon 64 i had was big endian
@johnathon I find that entirely impossible.
the x86 instruction set assumes a certain endianness.
and all AMD, as well as all Intel, procs derived from that set must be LE.
@DeadMG hence me using htons and hotnl :)) your right i was wrong sorry
@DeadMG i dunno though man, the early amd's WHERE little endian
@DeadMG im having to dig through technical doc's , give me a min
your Engrish fail immediately loses any effectiveness your statement may have had
lol
Man, now I got a headache. And I had already decided to sleep. :(
you need good sleep. unless you have stomach ulcer, gumble some aspirin or other medication with the same acid (I forget its English name)
acetylsalicylic acid
works for me
23:54
I don't think I have that around. Proof: I have no meds around.
hm, it seems "gumble" is not an English word. i must have made that up! hopefully meaning clear anyway. :)
lol, yeah, it got the point across.
Ell
Ell
What non embedded architectures use LE?
@Ell ARM is embedded?
Ell
Ell
23:59
I mean BE
Isn't it?

« first day (616 days earlier)      last day (4558 days later) »