« first day (2133 days earlier)      last day (3155 days later) » 

01:31
@RobertHarvey I did. isn't that a library/tool? Yes, its opensource, but its not a mock implementation, easy to hack and learn...
@deostroll You have access to the same search tools we do.
@deostroll Try this: tls.mbed.org. It's designed for embedded devices, so it has a small code footprint.
 
1 hour later…
02:57
Yay, my talk went well! I didn't totally embarrass myself!
:D
 
1 hour later…
04:06
(anyone here?)
@AaronHall Any talk that you can walk away from is a good talk.
Or aircraft landing, whichever comes first.
 
9 hours later…
13:39
#include<stdio.h>
int main()
{
int i=3;
i= i++;
printf("%d",i++);

getch();
return 0;
}
what will be the output of above program and why
@user143252 undefined
@ratchetfreak no ..
here is tiny modification ... #include<stdio.h>
int main()
{
int i=3;
i= i++;
printf("%d",i);

getch();
return 0;
}
yes, the result is undefined because of the i=i++ line
i run the above code in devc++ and its not undefined @ratchetfreak
19
A: is i=i++ truly a undefined behavior?

Marcelo CantosThe phrase, "…the final value of i will be 4 no matter what the order of evaluation…" is incorrect. The compiler could emit the equivalent of this: i = 3; int tmp = i; ++i; i = tmp; or this: i = 3; ++i; i = i - 1; or this: i = 3; i = i; ++i; As to the definitions of terms, if the answer ...

"undefined behavior" can do anything from working as intended to blowing up your home
13:42
but what about devc++ result ???????
Undefined means that the language specification doesn't say what to do. A compiler needs to do something. If you used a different compiler, you may get a different result. Or even a diffeent version of the same compiler.
what i will answer if this question is asked in interview and there is no option like UNDEFINED.. what to do in that case ??
nobody uses devc++, and haven't for almost a decade.
complain to the guy that made the interview
one more question ??? if i use any ide like devc++ or codeblock ... what is the different .. every ide is using gcc , so result will be the same in all case ide ...
is it ??
13:46
@user143252 If you are being interviewed by someone who claims to know C++ and doesn't know that it's undefined behavior, that would be a red flag.
undefined is the only right answer in this case
@user143252 no because undefined behavior can change from one compile to the next
ok. @ThomasOwens red flag for me for interviewer ?
@user143252 it means that the interviewer doesn't know C++ all that well
@user143252 For you. If I'm being asked such technical questions about language behavior, I expect the interviewer to know the right answer. If they don't, that doesn't give me confidence in the company or the people I'd be working with.
ok .. i got it.. thnks
codeblock & devc++ both is based on GCC , i am correct ? and both will produce same result
13:50
Like I said, it could vary depending on version of the compiler. Two versions of GCC may behave differently. There could be compile-time flags in GCC to change the behavior depending on OS. No matter what, you cannot rely on any undefined behavior being consistent.
there could be surrounding code changing the behavior
one more question .... how to know which code is has undefined behavior and which don't ?
knowing the spec
what spec?
the language spec
13:55
thnks for the help :)
 
1 hour later…
15:15
Would that warn if compiled with -Wall?
(Of course I could just test it myself... :P)
You can do a here-doc into gcc, right?
$ gcc -xc -Wall - << EOF
> #include<stdio.h>
>  int main()
>  {
>  int i=3;
>  i= i++;
>  printf("%d",i++);
>
>  getch();
>  return 0;
>  }
> EOF
<stdin>: In function ‘main’:
<stdin>:5:3: warning: operation on ‘i’ may be undefined [-Wsequence-point]
<stdin>:8:2: warning: implicit declaration of function ‘getch’ [-Wimplicit-function-declaration]
/tmp/ccpjpvqz.o::(.text+0x41): undefined reference to `getch'
collect2: error: ld returned 1 exit status
And there you have it!
(Did I do that right?)
By the way I did that on Cygwin, maybe not the same as doing it on Linux...
Wikipedia can be wrong, but since it says I'm right, I'm inclined to agree with it.
 
2 hours later…
17:57
I'd absolutely suggest references, As far as performance I'd rec. creating some type of local caching system and then getting each data when it's version is different than your own and updating it, perhaps through a subscription notification. That being said perhaps this isn't the best forum for this question, you may have better luck at programmers.stackexchange.com or the apple dev forums. — thefredelement 17 secs ago
18:21
-2
Q: Where to begin Python?

ArchitectI would like to learn Python but have very little programming experience. In the past (many years) i've dabbled a little with C C# and Unix. ATM all I have access too is an ipad. I'm wondering what I will need to properly learn Python on ipad and what's considered the gold standard source for ...

lol
what is output and why #include <stdio.h>

int main() {
// int i = 1+2+3+4+5+6+7+8+9+10;

i = (3,4);
printf("%d",i);
return 0;
}
ignore comment
???
@AaronHall thnks
-6
Q: iOS Development in Berlin

larrombaI've been an iOS developer in London for the past few years. The contractor market in London is very much alive. I've recently moved to Berlin and I'm wondering how the contractor market is here, and the best way of forming a recruitment network. For example, are recruitment agencies an effectiv...

Ack ack a dack
BOOM.
18:49
@user143252 I do not know C well enough to answer your questions with any kind of authority, but I can still attempt to compile code:
$ gcc -xc -Wall - << EOF
> #include <stdio.h>
>

>  int main() {
>  // int i = 1+2+3+4+5+6+7+8+9+10;
>
>  i = (3,4);
>  printf("%d",i);
>  return 0;
>  }
> EOF
<stdin>: In function ‘main’:
<stdin>:6:2: error: ‘i’ undeclared (first use in this function)
<stdin>:6:2: note: each undeclared identifier is reported only once for each function it appears in
<stdin>:6:8: warning: left-hand operand of comma expression has no effect [-Wunused-value]
@user143252 you need to learn to do this for yourself.
There's a C chatroom on Stackoverflow, you should ask your questions there. This site is about software engineering.
plz give the link for software link
software not chatroom
@AaronHall where is c chatroom of stackoverfloq

 C

C stands for Control.
:( You must have 20 reputation on Stack Overflow to talk here
Then start building rep there. It's all about the sweet rep there.
I'm so close to rep-capping today! :D
19:05
ok thanks
19:19
shibboleet
19:33
This question may find better resolution on programmers.stackoverflow.com, but it's entirely a design choice on your part. There's no problem to solve here, you're simply asking for advice. — g.d.d.c 22 secs ago
yay, rep-capped! (I wonder if someone was serially upvoting today...)
+140 for me for one rando question.
link or it didn't happen
4
Q: Are single-character constants better than literals?

wolverine16I have recently encountered a class which provides pretty much every single-character as a constant, everything from COMMA to BRACKET_OPEN. Wondering whether this was necessary, I read an "article" which suggests that it may be helpful to pull single-character literals into constants. So I'm skep...

A link makes it happen
The comma ( , ) is a punctuation mark that appears in several variants in various languages. It has the same shape as an apostrophe or single closing quotation mark in many typefaces, but it differs from them in being placed on the baseline of the text. Some typefaces render it as a small line, slightly curved or straight but inclined from the vertical, or with the appearance of a small, filled-in number 9. The comma is used in many contexts and languages, mainly for separating parts of a sentence such as clauses, and items in lists, particularly when there are three or more items listed. The word...
There are lots of different variants on commas: en.wikipedia.org/wiki/Comma#Comma_variants - perhaps this is not such a dumb idea, especially if your source code can be encoded as utf-8. — Aaron Hall 15 secs ago
20:09
right.
20:32
Unrep-capped. :(
Oh well. :)
21:27
I think we could salvage a lot of questions if we could migrate them to TEHCODEZ.SE.
22:07
Hey guys, I just wanted to know if my question is fit for this site. I want to reverse-engineer an old game and document the process on my blog, how would employers look at that?

« first day (2133 days earlier)      last day (3155 days later) »