« first day (1453 days earlier)      last day (3496 days later) » 

4:01 PM
@Ell At that time, DEC mostly used octal instead of hexadecimal (and a group of three gives one octal digit). The one I used also used 6 bit characters, so each 12-bit word held two characters (and two octal digits was one character).
 
Ell
oh I see
 
Ugh reST is another super clever ~~plain text~~ shit nonsense that should die gist.github.com/TheCatPlusPlus/c3f98252a93c3d1e6f06
I have to indirect the links with a substitution because some other link already uses label "Git" etc but points to something else
 
oh nice
 
#include<stdio.h>
int main(){
int a[]={2,19,2,3,6};
int b[]={1,2,3};
int *p[2];
p[0]=a;
p[1]=&b + 1;
printf("%d",p[1][1]);


}
here o/p is always the second element of array a
 
im the op
 
4:05 PM
12
A: Word for a person you consider personal and don't want to share with anyone

imsotiredicantsleepIt sounds as though you are describing a "thrall" or "slave". If the arrangement is mutually recognised and consensual then a "submissive", "pet", or "bottom" - taken to the extreme, possibly even "gimp". If the individual has been emotionally browbeaten into your thrall they may be said to be "w...

@SusanSweedyk: Hi
 
hi sir
 
no need for "sir"!
 
can u just pls help me out wid this code
 
we're all friends here
 
@SusanSweedyk NO.
 
4:06 PM
(please don't arrest me)
 
Kitty jail for you
 
here output is always the second element of array a
i dont understand why
 
@SusanSweedyk What output did you want instead
 
Also, don't think that on n-th try you can get away with it.
 
i want to know why iss it so
 
4:07 PM
It should be the third value, no?
 
p[1][1] means *(p[1] + 1)
 
@SusanSweedyk Well, p[1] is &b + 1, which is a pointer to the second element of b. Doing p[1][1] is the same as doing *(p[1] + 1), which gives you a pointer to the third element of b and dereferences it.
Really you should avoid this mucking about with pointers. It's not very clear code.
 
this qn was given in my book so i asked
 
Ok, so, it doesn't actually compile as C++ due to type mismatch. Are you sure you didn't mean to ask in a C room?
@SusanSweedyk Hmm which book is it?
 
our own school's books
 
oh hey susan's back
 
OK yeah, I've tried it, and changing line 7 to p[1]=&b[0] + 1; allows it to compile, and the result is the third element of b, as I suspected
 
&b is a pointer to array
 
so your book is wrong :(
@SusanSweedyk yep; but for this to compile you need it to be a pointer to an element of the array, instead. i.e. &b[0] instead of &b
 
@LightnessRacesinOrbit Thank you for playing, Vanna has a beautiful parting gift for you. &b gives the address of b of type array of 3 ints. &b+1 is then a pointer to the address immediately after the end of b. Thanks to this being on the stack, that ends up as the address of the beginning of a (though, of course, that's not actually required--it's really just UB). We then assign that to a pointer to integer, and dereference the next element--the second element of a.
 
4:12 PM
it's kinda nasty to make you start with this complicated stuff :(
 
but we has p[1] has a pointer to integer when we write &b is it automatically typecasted to pointer to array
 
nah the conversion isn't automatic ("implicit") in C++
that's why it won't compile
I bet it's implicit in C though
 
It's C, not C++
 
Can you tell me the name of the book, @Susan?
or is it literally written by people at your school?
 
its name is Seeing C
 
4:14 PM
Right, so you're taking a C class, not a C++ class :)
 
C and C++ are historically related, but they are different programming languages with different rules
This chat room has a focus on C++.
 
yes i know
 
Although personally I don't mind helping with C, some of the others get funny about it
Was the C room any help to you earlier?
 
no not at all
 
even if it is implicit in c , i donot get why the second element of a is printed
 
@SusanSweedyk It should be the third element IMO
 
@R.MartinhoFernandes looks like a fly
 
@R.MartinhoFernandes Wow TIL the ISS travels in orbit by repeatedly being beamed ahead of itself
 
okj ithink i shud leave this question
 
4:18 PM
@SusanSweedyk Maybe come back to it yeah
 
if i write p[1][2] it gives 3rd element of a
and not of b
 
thats what i cant understand p[1] =& b + 1 ; then why is it giving elements from array a
 
I think that's the "fourth element of b", which doesn't exist, so you're reading random places of memory (sort of)
 
4:21 PM
I suspect you are getting 2 and that's actually from being the first element of a, not the third
due to how your arrays happen to be arranged around each other in memory, and given you're overflowing off the end of b
 
@SusanSweedyk When you do &b + 1, you get the address immediately after the end of b. Since these are on the stack, that happens to be the beginning of a, so you're getting the equivalent of a[1].
 
ohhhh.. yes this sounds to be a gud reason sir
 
seriously, lose the "sir" ;p
 
also don't look at the starboard
 
4:23 PM
lol
 
@jerry coffin &b + 1 takes to end of array b
 
Ell
@LightnessRacesinOrbit why sir?
 
@Ell no, you, you must call me sir
it's only Ms. Sweedyk who doesn't need to
 
Ell
I ain't doin' that mister
 
where's that name from, btw?
 
4:25 PM
@jerry coffin then acc. to u a[0] address to be next to array b
???
ok bye every one
time for study now ..
 
ok thnks
 
@LightnessRacesinOrbit Not really and not really.
 
user1804599
Hello.
 
Ell
4:41 PM
@rightføld hi
 
user1804599
I understand the language helps you move towards inmutability. Thus you can concrete a class method to an inmutable field but never otherwise. — Pablo Francisco Pérez Hidalgo 2 hours ago
 
user1804599
Ugh no it's LSP dammit.
 
@sehe Got #8. Good little quiz, that. I like how it tests logical deduction skills, as that's exactly my first- and second-phase bug hunting approach and I wish more people could do it. I should have done better, really.
I suspect I'm going to lose my power soon. It's a-flickering. Ta, thunderstorm!
 
Is there a CppCon talk with Scott's advice on parameter passing?
I'm curious, since he mentioned that bar brawl thing with Herb.
 
they had a bust-up?
 
4:54 PM
> A special attraction of C++ and Beyond in Stuttgart is looking like it might be a full-blown bar brawl between me and Herb Sutter. In recent weeks, he and I have been going back and forth about the wisdom (or lack thereof) of advising people to use pass-by-value in function interfaces.
We've exchanged some posts on this topic in comments on my blog and in posts to a Microsoft C++ MVP mailing list, plus there have been some behind-the-scenes email messages, and at this point, having carefully weighed all the facts, it looks like the only thing we fully agree on is that the other person mea
Oh, it's C++&B, not CppCon.
 
@LightnessRacesinOrbit I did hear some rumblings from the east. Not got here yet:)
 
seems to have passed without incident
enjoy
 
5:11 PM
Well balls. Seems I have till the end of the year to sort out getting a mortgage or I'll have find a 20% deposit.
 
Painful read.
> Those who will feel it “right on the nose,” says Miller, include people born near October 8, plus or minus five days. January 8, plus or minus five days; April 8, plus or minus five days; and July 8, plus or minus five days.

“That includes the United States,” Miller says.
OMG I would never have guessed those dates include the United States.
 
lol astrology
 
Wait, she means the birth date of the US.
 
@R.MartinhoFernandes I was in pain from laughing. Especially at: "This eclipse is a full moon..." I'm really waiting for a lunar eclipse that happens at, say, half moon. That'd be awesome!
 
Yeah, that's Time.
 
5:20 PM
@R.MartinhoFernandes I'm actually kind of surprised. As countries go, I'm not sure the US is old enough to be dating yet.
Maybe the school dance with a chaperon, but definitely no slow dancing...
 
So, how do I tell a moderator that a question really really needs to be deleted?
-9
Q: What is the meaning of the Developers Life?

IgleAs i asked, i want to know what is the meaning of our life. I mean, when we work for others, we only do what they want. When we work like indie, we work in what we Love. But what is the point of our Life. If someone told you: you can work in what you want but your name, will not turn up in the f...

 
@gunr2171 "a question really really needs to be deleted"
Like that?
 
user1804599
You don't have to tell a moderator that that question needs to be deleted. Just downvote it into oblivion.
 
Won't because it has 2 answers, one which is accepted, it won't be deleted automatically?
 
We're working on it.
One more vote and it goes.
 
user1804599
5:26 PM
It's still of higher quality than most questions, though.
 
@rightføld Not a homework dump, debugging order or Google-slave command, so yes, should upvote it.
Meh - Lounged to death.
 
And deleted, thanks to those that voted.
 
Ell
> error: too many template arguments for class template 'function'
> error: implicit instantiation of undefined template 'std::__1::function<int>'
I'm missing something obvious hmm. I've included <functional>
 
5:46 PM
int() maybe?
Or void(int)?
 
user1804599
@Ell int is not a function type.
 
Ell
oh yah
I forgot they used funky syntax
 
I killed a sick woman who wanted to die in Wasteland 2. I figured that since she ended up in that situation, her husband who left to search for a cure wouldn't return anyway and is probably dead
knowing how Wasteland 2 treated me so far, I'm expecting to find the guy and curse my decision forever
 
Ell
auto foo = bar.m<J::Ref, J::Ref>("foo", "(LTestClass;)Ljava/lang/Object;"); // foo is a lambda
std::function<J::Ref(J::Ref)> foo_f = foo; //error: no viable conversion
 
even now I feel like putting the blame on the "raiders" who took over the place and made medicine be too expensive for people, and go kill them all
goddamn this game
it plays with me
anyway, it's hard to properly understand why I killed her without hearing her messages for her husband on the radio
which were essentially, come back I can't die without you
 
Ell
5:54 PM
Ah I found the problem
 
I hope there won't be many more moral issues like this in the game, letting communities die so that others can live is easier to decide with a pragmatic POV
when it's just a person, it gets hard
 
Ell
I forgot to return inside my lambda. But also this sucks because return type might be void. I'm going to have to make another class again to partially specialize this function
hmm. maybe I won't have to
> note: candidate template ignored: couldn't infer template argument ''
which argument couldn't you inferrrrrr?
 
0
Q: Why can't users below 13 show their age in its profile page?

LuísI was born in the 8th of February of 2014 and Stack Overflow gives me the following error: Birthday must be before 2001/10/08. That means users below 13 can't show their age in its profile page. My question is: why Stack Overflow does that?

^^ lol
 
Ell
6:09 PM
can I sfinae a member function template?
 
sure
 
"I was born in the 8th of February of 2014" Really? — πάντα ῥεῖ 3 mins ago
lol
 
Ell
template<class ReturnT, class... ArgsT, typename std::enable_if<std::is_same<ReturnT, void>::value>::type> m(std::string name);
 
you need a return type
that should be the enable_if thing
 
Ell
@AndyProwl I don't think it has to be in c++11
 
6:15 PM
@Ell right, it doesn't have to, but the function needs a return type
 
Ell
oops. sorry that was my bad copy-pasting :(
template<class ReturnT, class... ArgsT, typename std::enable_if<std::is_same<ReturnT, void>::value>::type> auto m(std::string name) { ... };
 
user1804599
That reminds me; I should implement seeking in Baka.
 
^ yeah
 
@Mysticial You think it's a joke, but...
Knew how to use the tablet before he could walk or talk.
 
6:22 PM
he looks cute
 
Ell
@R.MartinhoFernandes just read it. let's hope it fixed my problem :P
 
@Rapptz I think he is, but it's possibly I'm just a tiny bit biased... :-)
 
bah what a long and stressfull day
but luckily it ended on a good note, I got my stuff working
 
Ell
Though I don't really know why it would fix it >.<
 
user1804599
Is it possible to set a timeout on Catch tests?
 
user1804599
6:26 PM
I'm playing with FIFO's. :v
 
@JerryCoffin Oh, he's yours? :)
 
@Mysticial Yup--my youngest.
 
user1804599
dat pun :D reminds me of this:
 
user1804599
May 2 '12 at 19:44, by FredOverflow
Did you bring a book and have Bjarne cast it from unsigned to signed?
 
6:31 PM
@JerryCoffin I remember you showing a picture of him a year or so ago here. :)
 
@thecoshman IDGI
oh wait
 
@LightnessRacesinOrbit RIP
 
I read it
still, what's that book?
 
@Mysticial I'll have to take your word for it. I only remember what I had for breakfast by eating the same thing nearly every day. I certainly don't remember much from a whole year ago.
 
Ell
I'm reading robot's post though.
 
6:36 PM
@JerryCoffin I found this, but I remember it having a bunch of stars on it. So it probably wasn't it:
Jul 29 '12 at 3:53, by Jerry Coffin
FWIW, a shot from tonight, shortly after mom and son arrived home:
 
@SecureTips, San Francisco, CA
Tips to help you stay secure!
213 tweets, 10k followers, following 1 users
 
now that's just irresponsible
 
@Mysticial Oh, here we go:
Jul 26 '12 at 17:18, by Jerry Coffin
Don't have much time to really chat, but I have a new baby boy:
 
user1804599
Why?
 
@JerryCoffin There we go! Which for some reason, doesn't show up when I search go jpg.
 
6:40 PM
user image
11
 
user1804599
Also why is Python's documentation so ridiculously unstructured.
 
So he's 2 years old already. He should already be able to troll meta.SO!
 
Ell
@Griwes haha that is so hilarious
 
@Mysticial Probably, but I'm trying to teach him "old-fashioned" netiquette. :-)
 
@Griwes Self-documenting
 
6:42 PM
@rightføld It was originally structured, but somebody accidentally removed the indentation...
 
@Griwes Good trolling
 
Ell
Man I hope I don't die of ebola
that'd be way unfair
 
If I were to get Ebola and die, would you all come to my funeral?
 
There'd be Ebola there
 
at least I'd have a geeky funeral :P
 
6:43 PM
"Wefail" probably deliberate
you fell into the trap, all of you.
 
@Ell Are you planning to visit some uncivilized part of the world like Africa or Texas?
 
pub time bai
 
@CatPlusPlus oh damn
 
Ell
@JerryCoffin Nope
 
@Ell That's a well known bug of Clang. coliru.stacked-crooked.com/a/07c1f1889f4b9457
 
6:43 PM
@JerryCoffin I'm going to LA at the end of the year, hope it doesn't go there
 
(The linked code is not anywhere near being how it should be done, btw :P)
 
@LightnessRacesinOrbit I agree. I hate the input mechanism, but the questions are very life-like (well, the code is bad, but there's patches of code like that - legacy, proof-of-concept, 3rd-party - around always). Yes, it does make you look for the subtly wrong.
I already look for "false sense of structure" in repetitive code, but I missed for example the missing throw keyword. That's mucho subtle for my trained eye.
/cc @MarcoA.
 
yeah that's a clang problem
 
user1804599
Should I throw std::logic_error when attempting to read from a moved-from object? There is no valid state it could be in.
 
@TonyTheLion Based on the rate it's spreading in the US LA will be dead and gone by then it'll be fine.
 
6:44 PM
you usually do constexpr auto _ = detail::enabler{};
 
@Ell Don't enable_if<is_same> :S Just specialise.
 
user1804599
Or is a different exception type more appropriate?
 
then you can do = _
@R.MartinhoFernandes I think it was just an example, but iunno.
 
@JerryCoffin :)
 
Ell
@R.MartinhoFernandes I thought you couldn't partially specialise member functions?
or functions of any kind
 
6:45 PM
That's full specialisation
 
you have to specialise outside the class body
 
Try to guess who reported it before clicking.
 
Ell
@CatPlusPlus balls. so it is. I'm screwing up my examples a lot today
 
> CNN is the Ebola of journalism tweet
 
user1804599
std::logic_error it is.
 
6:53 PM
greetings inferior beings
 
You could greet us too.
 
user1804599
Why don't you say hi to me? :(
 
I wondered how many people would make that joke
 
user1804599
I hate you! D:<
 
user1804599
Puppy the ungentleman.
 
6:55 PM
hopefully, as of tomorrow, Puppy the ungentleman with accomodation in Bristol near his job
 
@rightføld domain_error or invalid_argument. Implicit this is argument. Also:
6
Q: How to make an intelligent decision about which standard exception to throw?

John YangWe know that the exception class has two derived classes: logic_error and runtime_error. logic_error has four derived classes: domain_error, invalid_argument, length_error and out_of_range. runtime_error has three derived classes: range_error, overflow_error and underflow_error. While some of ...

@Puppy hi
 
user1804599
@sehe hmm.
 
@Puppy Nice.
 
it is pretty nice.
 
No, Bristol. The distance is ~1132 km
 
user1804599
6:58 PM
Might fix the memory leaks first. They're more important. :v
 
-4
Q: Disable Alt+Ctrl+Delete Windows Form for Windows 7

user3017450I Write this code but I do not have true result: private void textBox1_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.Alt) { e.Handled = true; } }

 

« first day (1453 days earlier)      last day (3496 days later) »